
:root{
  --bg:#f4e7bf;
  --card:#fffaf2;
  --text:#5a311d;
  --muted:#7a5a4a;
  --line:#eadfcb;
  --primary:#ff6a56;
  --primary-2:#ff8f5b;
  --secondary:#f8efe0;
  --shadow:0 14px 40px rgba(126,88,34,.12);
  --radius:28px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:"Nunito",system-ui,sans-serif;
  background:var(--bg);
  color:var(--text);
}
img{max-width:100%;display:block}
button,a{font:inherit}
.app-shell{
  max-width:1100px;
  margin:0 auto;
  padding:18px;
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:rgba(255,250,242,.8);
  border:1px solid rgba(163,126,67,.12);
  border-radius:24px;
  padding:14px 18px;
  box-shadow:var(--shadow);
  backdrop-filter: blur(8px);
}
.brand{
  font-family:"Baloo 2",cursive;
  font-size:2rem;
  line-height:1;
  font-weight:800;
}
.top-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.pill{
  border:1px solid var(--line);
  background:#fff;
  color:#6a5345;
  padding:12px 16px;
  border-radius:999px;
  cursor:pointer;
  font-weight:700;
}
.experience{margin-top:20px}
.scene{
  display:none;
}
.scene.active{
  display:block;
}
.card{
  background:var(--card);
  border-radius:var(--radius);
  padding:34px;
  box-shadow:var(--shadow);
}
.hud{
  margin:18px 0 12px;
}
.progress-wrap{
  text-align:center;
}
.progress-bar{
  width:min(720px,100%);
  height:12px;
  background:#f7dcb4;
  border-radius:999px;
  overflow:hidden;
  margin:0 auto 10px;
}
.progress-bar span{
  display:block;
  height:100%;
  width:0%;
  background:linear-gradient(90deg,#ff9f1a,#ff5f6d,#4f7cff);
  border-radius:999px;
  transition:width .35s ease;
}
#progressText{
  margin:0;
  font-weight:800;
  color:#785940;
}
.hero .card{
  min-height:520px;
  display:grid;
  grid-template-columns:1.1fr .9fr;
  align-items:center;
  gap:28px;
}
.kicker,.speaker{
  display:inline-block;
  background:#ffe8a6;
  color:#b06c12;
  border-radius:999px;
  padding:8px 14px;
  font-weight:800;
  margin-bottom:12px;
}
.hero-copy h1,
.dialogue-panel h2,
.wide-card h2,
.voting-panel h2,
.final-copy h2{
  font-family:"Baloo 2",cursive;
  font-size:clamp(2.2rem,5vw,4.4rem);
  line-height:1.04;
  margin:0 0 14px;
  color:var(--text);
}
.hero-copy p,
.dialogue-panel p,
.wide-card p,
.voting-panel p,
.final-copy p{
  font-size:1.18rem;
  line-height:1.65;
  color:var(--muted);
}
.hero-buttons,.nav-row{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  align-items:center;
}
.btn,.choice,.tag-answer,.vote,.step{
  border:none;
  border-radius:18px;
  padding:14px 18px;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover,.choice:hover,.tag-answer:hover,.vote:hover,.step:hover{
  transform:translateY(-1px);
}
.btn-primary{
  background:linear-gradient(180deg,var(--primary-2),var(--primary));
  color:white;
  font-weight:800;
  box-shadow:0 12px 24px rgba(233,68,65,.22);
}
.btn-secondary{
  background:var(--secondary);
  color:#7d5e49;
  font-weight:800;
  text-decoration:none;
  border:1px solid var(--line);
}
.btn-accent{
  background:#ffd36b;
  color:#7a4e00;
  font-weight:800;
}
.choice,.tag-answer,.vote{
  background:#fff;
  color:#654838;
  border:1px solid var(--line);
  font-weight:800;
}
.choice.correct,.tag-answer.correct,.vote.active.yes{
  background:#dbf7df;
  border-color:#87cc95;
}
.choice.wrong,.tag-answer.wrong,.vote.active.no{
  background:#ffe1dd;
  border-color:#e8a099;
}
.choice:disabled,.tag-answer:disabled,.vote:disabled,.next:disabled,.btn:disabled{
  opacity:.7;
  cursor:not-allowed;
  transform:none;
}
.hero-characters{
  display:flex;
  justify-content:center;
  align-items:end;
  gap:22px;
}
.hero-characters img{
  width:210px;
}
.float{animation:float 3.6s ease-in-out infinite}
.bob{animation:bob 2.8s ease-in-out infinite}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.scene-grid{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:30px;
  align-items:center;
}
.scene-grid.reverse{
  grid-template-columns:1fr 280px;
}
.character.large{
  width:240px;
  margin:0 auto;
}
.dialogue-panel,.voting-panel,.final-copy{
  max-width:640px;
}
.choices.two-up,.mini-board,.vote-buttons{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:22px 0 16px;
}
.mini-board{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.feedback{
  min-height:28px;
  font-weight:800;
  margin:8px 0 16px;
}
.feedback.ok{color:#23713a}
.feedback.nope{color:#a54636}
.mission-card,.step-panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
  margin:20px 0;
}
.law-panel{
  position:relative;
  text-align:center;
}
.law-bubble{
  display:inline-block;
  margin-top:14px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 16px;
  font-weight:800;
  color:#7c5a44;
}
.timeline{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:18px 0 20px;
}
.step{
  background:#fff;
  border:1px solid var(--line);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  font-weight:800;
  color:#6f5240;
}
.step span{
  width:36px;
  height:36px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#ffe8a6;
}
.step.active{
  background:#fff5dd;
  border-color:#f0c665;
}
.voting-card{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:24px;
  align-items:center;
}
.pleno-wrap{
  position:relative;
  overflow:hidden;
  border-radius:24px;
}
.pleno-img{
  width:100%;
  height:100%;
  object-fit:cover;
  min-height:360px;
}
.overlay-text{
  position:absolute;
  left:20px;
  right:20px;
  bottom:20px;
  padding:14px 16px;
  border-radius:18px;
  background:rgba(57,32,15,.65);
  color:#fff8f0;
  font-weight:800;
}
.finale{
  position:relative;
  display:grid;
  grid-template-columns:220px minmax(320px,1fr) 220px;
  align-items:center;
  gap:28px;
  min-height:520px;
  padding:40px 48px;
  overflow:hidden;
}
.final-copy{
  max-width:560px;
  margin:0 auto;
  text-align:center;
  z-index:2;
}
.final-copy h2{
  margin:10px 0 18px;
  font-size:clamp(2rem,4vw,3.4rem);
  line-height:1.05;
}
.final-copy .say,.final-copy .small-note{
  font-size:1.15rem;
  line-height:1.7;
  color:var(--muted);
  margin:0 0 16px;
}
.final-copy .hero-buttons{
  justify-content:center;
  margin-top:18px;
}
.finale-char{
  width:180px;
  max-width:100%;
  height:auto;
  align-self:end;
}
.finale-char.left{justify-self:start}
.finale-char.right{justify-self:end}
@media (max-width:980px){
  .hero .card,.voting-card,.scene-grid,.scene-grid.reverse,.finale{
    grid-template-columns:1fr;
  }
  .hero-characters{
    order:-1;
  }
  .hero-characters img{width:170px}
  .character.large,.finale-char{
    width:150px;
    justify-self:center;
  }
  .finale-char.left{order:1}
  .final-copy{order:2;max-width:100%}
  .finale-char.right{order:3}
  .mini-board,.choices.two-up,.timeline{
    grid-template-columns:1fr;
  }
  .card{padding:24px}
  .brand{font-size:1.6rem}
  .topbar{align-items:flex-start;flex-direction:column}
}
