/* Prometheus: The Stolen Flame — shell styles. The scene itself is canvas. */
:root {
  --ink: #f2ead8;
  --dim: #a9a392;
  --gold: #ffce54;
  --card: rgba(13, 16, 34, 0.92);
  --edge: rgba(255, 206, 84, 0.22);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: #05060f;
  color: var(--ink);
  font: 16px/1.5 Georgia, 'Times New Roman', serif;
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#app { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#cv {
  width: min(100vw, calc(100vh * 1.6));
  height: min(100vh, calc(100vw / 1.6));
  display: block;
  background: #0b0e1d;
  touch-action: none;
  cursor: pointer;
}

/* floating HUD buttons (bottom-right, clear of the dawn bar) */
#hud {
  position: absolute; bottom: 12px; right: 14px;
  display: flex; gap: 8px; z-index: 5;
}
#hud[hidden] { display: none !important; }
.hbtn {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--edge);
  background: rgba(10, 12, 26, 0.6);
  color: var(--ink); font-size: 17px; cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
}
.hbtn:hover { transform: translateY(-1px); border-color: rgba(255, 206, 84, .5); }

/* overlays */
.ov {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.ov[hidden] { display: none !important; }
.card {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: 28px 30px;
  max-width: 560px; width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .4);
  animation: rise .38s cubic-bezier(.2, .9, .3, 1.2);
  max-height: 92vh; overflow-y: auto;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.card.wide { max-width: 720px; }
.kicker {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
h1 {
  font-size: clamp(44px, 9vw, 68px); font-weight: 700; letter-spacing: .04em;
  color: var(--ink);
  text-shadow: 0 0 34px rgba(255, 157, 59, .35), 0 2px 0 rgba(0, 0, 0, .6);
}
.sub {
  font-size: clamp(17px, 3.4vw, 24px); color: var(--gold);
  letter-spacing: .18em; margin: 2px 0 14px;
}
h2 { font-size: 26px; margin-bottom: 8px; }
.lore { color: var(--dim); font-size: 15px; line-height: 1.65; margin: 10px 0 16px; }
.goal { font-size: 15px; color: var(--ink); margin-bottom: 16px; }
.goal strong { color: var(--gold); }
.hint { color: var(--dim); font-size: 14px; line-height: 1.6; }
.final { display: block; margin-top: 12px; color: var(--ink); font-style: italic; }
.stars { font-size: 34px; color: var(--gold); letter-spacing: .18em; margin: 6px 0 10px; text-shadow: 0 0 18px rgba(255, 206, 84, .5); }

button.big, button.ghost {
  display: block; width: 100%;
  font: 700 17px Georgia, serif;
  border-radius: 12px; padding: 13px 18px;
  cursor: pointer; margin: 8px 0 0;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s;
}
button.big {
  background: linear-gradient(180deg, #ff9d3b, #e8691d);
  border: 1px solid #ffd28a;
  color: #2a1503;
  box-shadow: 0 6px 24px rgba(232, 105, 29, .35);
}
button.big:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(232, 105, 29, .5); }
button.ghost {
  background: transparent; color: var(--dim);
  border: 1px solid rgba(255, 255, 255, .14);
}
button.ghost:hover { color: var(--ink); border-color: rgba(255, 206, 84, .4); }

/* chapter grid */
#grid-btns { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 14px 0 10px; }
.act-h {
  grid-column: 1 / -1;
  text-align: left; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); opacity: .85; margin-top: 6px;
}
.act-h:first-child { margin-top: 0; }
.ch {
  position: relative; aspect-ratio: 1;
  border-radius: 10px; border: 1px solid var(--edge);
  background: rgba(255, 206, 84, .06);
  color: var(--ink); font: 700 17px Georgia, serif; cursor: pointer;
  transition: transform .1s ease, background .1s ease;
}
.ch:hover:not(:disabled) { transform: translateY(-2px); background: rgba(255, 157, 59, .18); }
.ch.locked { opacity: .35; cursor: default; }
.ch .st { display: block; font-size: 9px; letter-spacing: .05em; color: var(--gold); }

@media (max-width: 560px) {
  #grid-btns { grid-template-columns: repeat(5, 1fr); }
  .card { padding: 20px 16px; }
}
