/* Ten Leopards: layers on top of daily.css (shared parchment, tiles, buttons). */
body.game { padding: 0; overflow: hidden; height: 100vh; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 12px;
  background: linear-gradient(180deg, rgba(5, 4, 8, 0.85), transparent);
  pointer-events: none;
}
#hud > * { pointer-events: auto; }
#hud-title { font-family: "Grenze Gotisch", Georgia, serif; font-size: 26px; color: var(--gold); text-shadow: 0 0 16px rgba(227, 181, 74, 0.4); white-space: nowrap; }
#hud-title span { font-family: "IM Fell English", Georgia, serif; font-style: italic; font-size: 18px; color: var(--text-hi); }
#objective {
  flex: 1; text-align: center; font-style: italic; color: var(--gold-hi);
  font-size: 18px; text-shadow: 0 1px 6px #000;
}
#objective.pulse { animation: obj 1.2s ease-out; }
@keyframes obj { 0% { transform: scale(1.12); color: #fff; } }
#hud-right { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 16px; }
#coins { color: var(--ember); }
#coins b { color: var(--gold-hi); font-weight: normal; }
#hud .ghost { padding: 5px 12px; font-size: 15px; background: rgba(0, 0, 0, 0.35); }

#notebook {
  position: fixed; left: 18px; top: 84px; z-index: 3; width: 190px;
  padding: 12px 16px; border-radius: 8px; color: var(--ink);
  background: linear-gradient(160deg, var(--vellum), var(--vellum-dark));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); transform: rotate(-1.5deg);
}
#notebook h3 { margin: 0 0 6px; font-family: "Grenze Gotisch", Georgia, serif; font-weight: normal; color: var(--rubric); font-size: 22px; }
#notebook ul { margin: 0; padding-left: 18px; }
#notebook li { font-size: 18px; animation: drop 400ms cubic-bezier(.3, 1.6, .5, 1); }

#alert-label {
  position: fixed; z-index: 2; transform: translate(-50%, -100%);
  font-family: "Grenze Gotisch", Georgia, serif; font-size: 40px; color: #ff4a2a;
  text-shadow: 0 0 14px rgba(255, 60, 30, 0.9); pointer-events: none;
}
#prompt {
  position: fixed; z-index: 2; transform: translate(-50%, -100%);
  padding: 5px 12px; border-radius: 999px; font-size: 16px; white-space: nowrap;
  background: rgba(10, 8, 12, 0.8); color: var(--gold-hi); border: 1px solid rgba(227, 181, 74, 0.5);
  pointer-events: none;
}

#dialog {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); z-index: 4;
  transform: translateX(-50%); width: min(760px, calc(100% - 32px));
  padding: 16px 22px 14px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(180deg, rgba(20, 15, 22, 0.94), rgba(10, 8, 12, 0.96));
  border: 1px solid rgba(227, 181, 74, 0.35); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  animation: leaf-in 300ms both;
}
#dialog-name { font-family: "IM Fell English SC", Georgia, serif; color: var(--gold); font-size: 20px; margin-bottom: 4px; }
#dialog-name small { font-family: "IM Fell English", Georgia, serif; font-style: italic; color: rgba(246, 236, 214, 0.8); font-size: 15px; margin-left: 8px; }
#dialog-text { margin: 0; font-size: 21px; line-height: 1.5; min-height: 2.6em; }
#dialog-next { text-align: right; font-size: 14px; color: rgba(246, 236, 214, 0.7); animation: breathe-text 1.4s infinite; }
@keyframes breathe-text { 50% { opacity: 0.35; } }

#choices {
  position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom, 0px)); z-index: 5; transform: translateX(-50%);
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; width: min(760px, calc(100% - 32px));
}

#overlay {
  position: fixed; inset: 0; z-index: 6; overflow-y: auto;
  background: radial-gradient(ellipse at 50% 40%, rgba(30, 20, 15, 0.82), rgba(5, 4, 8, 0.96));
  padding: 80px 16px 40px;
}
#overlay-inner { max-width: 780px; margin: 0 auto; text-align: center; }
#overlay #leaf { text-align: left; }
#verse { font-size: 27px; line-height: 1.6; color: var(--text-hi); margin: 10px auto 24px; max-width: 680px; }
#verse .line { opacity: 0; animation: verse-in 1100ms ease-out forwards; display: block; }
#verse .line.big { font-size: 34px; color: var(--gold-hi); text-shadow: 0 0 24px rgba(255, 200, 90, 0.5); }
#verse .cite { display: block; margin-top: 18px; font-size: 16px; font-style: italic; color: rgba(246, 236, 214, 0.75); opacity: 0; animation: verse-in 900ms ease-out forwards; }
@keyframes verse-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

#cold {
  position: fixed; inset: 0; z-index: 9; background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center;
}
#cold-lines { font-size: 30px; line-height: 1.7; max-width: 760px; }
#cold-lines .line { display: block; opacity: 0; animation: verse-in 1600ms ease-out forwards; }
#cold-lines .line.leopards { font-family: "Grenze Gotisch", Georgia, serif; font-size: 52px; color: var(--gold); text-shadow: 0 0 30px rgba(227, 181, 74, 0.55); }
#cold-cite { margin-top: 22px; font-style: italic; color: rgba(246, 236, 214, 0.7); opacity: 0; transition: opacity 1.2s; }
#cold-cite.on { opacity: 1; }
#btn-begin { margin-top: 34px; }
#cold .place { font-family: "Grenze Gotisch", Georgia, serif; font-size: 80px; color: var(--gold); text-shadow: 0 0 40px rgba(227, 181, 74, 0.6); }
#cold .place-sub { font-style: italic; font-size: 20px; color: var(--text-hi); }

#end { position: fixed; inset: 0; z-index: 8; display: grid; place-items: center; padding: 16px; background: rgba(5, 4, 8, 0.8); animation: leaf-in 900ms both; }
#end-card {
  max-width: 560px; padding: 30px 34px; border-radius: 12px; color: var(--ink); text-align: center;
  background: linear-gradient(160deg, var(--vellum), var(--vellum-dark)); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8), 0 0 80px rgba(255, 170, 60, 0.15);
}
.end-kicker { font-family: "IM Fell English SC", Georgia, serif; color: var(--rubric); letter-spacing: 1px; }
#end-card h2 { font-family: "Grenze Gotisch", Georgia, serif; font-weight: normal; font-size: 60px; color: var(--rubric); margin: 0; }
#end-stats { list-style: none; padding: 0; margin: 12px 0; }
#end-stats li { margin: 4px 0; }
.end-next { font-style: italic; color: #4a3826; }
.end-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
#end-card .ghost { color: var(--ink); border-color: rgba(42, 29, 18, 0.4); }

#loading {
  position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: #050408;
  font-style: italic; font-size: 22px; color: var(--gold-hi);
}
#foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; padding: 4px 14px calc(4px + env(safe-area-inset-bottom, 0px));
  font-size: 13px; color: rgba(246, 236, 214, 0.75); text-align: center; pointer-events: none;
}

@media (max-width: 640px) {
  #hud { gap: 6px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
  #hud-title { font-size: 20px; }
  #hud-title span { display: none; }
  #objective { order: 3; flex-basis: 100%; font-size: 16px; }
  #notebook { top: auto; bottom: 170px; left: 10px; width: 150px; padding: 8px 12px; }
  #notebook li { font-size: 16px; }
  #dialog-text { font-size: 18px; }
  #cold-lines { font-size: 22px; }
  #cold-lines .line.leopards { font-size: 38px; }
  #cold .place { font-size: 56px; }
  #verse { font-size: 21px; }
  #verse .line.big { font-size: 26px; }
  #foot { display: none; }
}
