:root {
  --g1: #2E8B57;
  --g2: #1F6B45;
  --g3: #164F34;
  --gold: #C9A227;
  --gold-d: #7E6410;
  --gold-l: #F6EBC0;
  --ink: #17261E;
  --muted: #45564D;
  --mist: #EDF4EF;
  --line: #C9DDD0;
  --paper: #FFFFFF;
  --err: #9B3326;
  --err-bg: #FBEDEA;
  --ok-bg: #E4F3E9;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #E8EEEA; overflow: hidden; }
body { font-family: var(--sans); color: var(--ink); }

#stage {
  position: absolute;
  left: 0; top: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  background: #fff url("../assets/background.png") no-repeat 0 0 / 1920px 1080px;
  overflow: hidden;
}

/* ---------- Header ---------- */
#logo { position: absolute; left: 62px; top: 62px; width: 420px; height: auto; max-height: 100px; object-fit: contain; }
#hdr { position: absolute; left: 530px; top: 52px; width: 900px; height: 150px; display: flex; align-items: center; }
#title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 46px; line-height: 1.12; color: var(--g3); }

/* ---------- Content area ---------- */
#content {
  position: absolute;
  left: 80px; top: 232px;
  width: 1760px; height: 708px;
  font-size: 28px; line-height: 1.45;
  overflow: hidden;
  outline: none;
}
#content p { margin: 0 0 14px; }
#content p:last-child { margin-bottom: 0; }

/* ---------- Footer / nav ---------- */
#nav {
  position: absolute;
  left: 80px; top: 956px; width: 1760px; height: 70px;
  display: flex; align-items: center; gap: 28px;
}
#progress { flex: 1; display: flex; flex-direction: column; gap: 8px; }
#progressText { font-size: 22px; color: var(--muted); text-align: center; }
#progressText.blocked { color: var(--gold-d); font-weight: 600; }
#bar { height: 8px; background: var(--mist); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
#barFill { height: 100%; width: 0; background: var(--g1); transition: width .3s ease; }

.btn {
  font-family: var(--sans); font-size: 26px; font-weight: 600;
  padding: 12px 34px; border-radius: 8px; cursor: pointer;
  border: 2px solid var(--g2); background: var(--g2); color: #fff;
  min-width: 150px;
}
.btn:hover:not(:disabled) { background: var(--g3); border-color: var(--g3); }
.btn.secondary { background: #fff; color: var(--g2); }
.btn.secondary:hover:not(:disabled) { background: var(--mist); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover:not(:disabled) { background: #B58F1C; border-color: #B58F1C; }
.btn { white-space: nowrap; }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn:focus-visible, .tile:focus-visible, .opt:focus-within, .areaCard:focus-visible, .mtn-tier:focus-visible, .link:focus-visible {
  outline: 4px solid var(--gold); outline-offset: 3px;
}
.hidden { display: none !important; }

/* ---------- Generic blocks ---------- */
.lead { font-size: 30px; color: var(--ink); margin-bottom: 22px !important; }
.grid { display: grid; gap: 24px; height: 100%; }
.grid.g2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
.grid.g3 { grid-template-columns: 1fr 1fr 1fr; }
.panel {
  background: var(--paper); border: 2px solid var(--line); border-left: 10px solid var(--g1);
  border-radius: 6px 12px 12px 6px; padding: 22px 30px;
}
.panel.gold { border-left-color: var(--gold); }
.panel h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 30px; color: var(--g3); line-height: 1.2; }
.panel .lbl { font-weight: 700; color: var(--g2); }
.panel.sm { font-size: 26px; line-height: 1.42; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.chip { font-size: 21px; padding: 3px 14px; border-radius: 999px; border: 2px solid var(--g1); color: var(--g2); background: var(--mist); }
.chip.g { border-color: var(--gold); background: var(--gold-l); color: #4F3E06; }
.chip.o { background: #fff; border-style: dashed; }

.link { background: none; border: none; color: var(--g2); font-size: 26px; font-weight: 600; text-decoration: underline; cursor: pointer; font-family: var(--sans); padding: 4px 6px; }

/* ---------- Title slide ---------- */
.titleSlide { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-left: 20px; }
.titleSlide h2 { font-family: var(--serif); font-size: 104px; line-height: 1.02; margin: 0 0 18px; color: var(--g3); max-width: 1000px; }
.titleSlide .sub { font-size: 44px; color: var(--gold-d); font-family: var(--serif); margin-bottom: 52px; }
.titleSlide .btn { align-self: flex-start; font-size: 32px; padding: 16px 52px; }
.titleSlide svg.bgm { position: absolute; right: -10px; bottom: -20px; width: 820px; opacity: .95; }

/* ---------- Welcome ---------- */
.welcome { display: grid; grid-template-columns: 1fr 520px; gap: 60px; height: 100%; align-items: center; }
.welcome p { font-size: 32px; line-height: 1.5; margin-bottom: 22px; }
.welcome svg { width: 100%; }

/* ---------- Locations ---------- */
.locWrap { display: grid; grid-template-columns: 1fr 1.5fr; gap: 36px; height: 100%; }
.locCol h3 { font-family: var(--serif); font-size: 34px; margin: 0 0 14px; color: var(--g3); }
.locCol .panel { margin-bottom: 18px; padding: 16px 26px; }
.locCol .panel .room { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--g3); }
.locCol .panel .d { font-size: 25px; line-height: 1.35; }
.locCol .chips { margin-top: 8px; }

/* ---------- Hub ---------- */
.hubWrap { display: flex; flex-direction: column; height: 100%; }
.areaRow { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; flex: 1; margin-bottom: 20px; }
.areaCard {
  text-align: left; cursor: pointer; font-family: var(--sans); color: var(--ink);
  background: var(--mist); border: 3px solid var(--g1); border-radius: 14px; padding: 30px 40px;
  display: flex; flex-direction: column; justify-content: center; position: relative;
}
.areaCard:hover { background: #E1EFE6; }
.areaCard h3 { font-family: var(--serif); font-size: 46px; margin: 0 0 10px; color: var(--g3); }
.areaCard .blk { font-size: 28px; color: var(--muted); margin-bottom: 18px; }
.areaCard .status { font-size: 26px; font-weight: 600; color: var(--g2); }
.areaCard .status.done { color: #fff; background: var(--g1); display: inline-block; padding: 4px 18px; border-radius: 999px; align-self: flex-start; }
.areaCard.mrs { border-color: var(--gold); background: #FBF6E2; }
.areaCard.mrs:hover { background: #F6EDC8; }
.hubNote { font-size: 26px; color: var(--muted); }
.hubFoot { display: flex; align-items: center; justify-content: space-between; gap: 30px; }

/* ---------- Mountain ---------- */
.mtnWrap { display: grid; grid-template-columns: 760px 1fr; gap: 40px; height: 100%; }
.mtnWrap svg { width: 760px; height: 640px; }
.mtn-tier { cursor: pointer; transition: transform .15s ease; }
.mtn-tier path { transition: filter .15s; }
.mtn-tier:hover path { filter: brightness(1.15); }
.mtn-tier.active path { filter: brightness(1.3) saturate(1.1); }
.mtn-tier:focus { outline: none; }
.mtn-tier:focus-visible path { filter: brightness(1.3); }
.mtn-tier.active text:first-of-type { text-decoration: underline; }
.mtn-tier text { font-family: var(--serif); font-weight: 700; fill: #fff; pointer-events: none; }
.mtn-tier.t1 text { fill: var(--ink); }
.tierPanel { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 28px 36px; display: flex; flex-direction: column; justify-content: center; }
.tierPanel.empty { background: var(--mist); border-style: dashed; text-align: center; color: var(--muted); font-size: 32px; align-items: center; }
.tierPanel h3 { font-family: var(--serif); font-size: 36px; margin: 0 0 18px; color: var(--g3); }
.tierPanel .q { font-weight: 700; margin-bottom: 14px; font-size: 29px; }
.tierPanel .a { font-size: 29px; padding-left: 22px; border-left: 8px solid var(--gold); }
.mtnCount { margin-top: 18px; font-size: 24px; color: var(--muted); }
.mtnHint { font-size: 24px; color: var(--muted); margin-top: 6px; text-align: center; }

/* ---------- Visitor tiles ---------- */
.visWrap { display: flex; flex-direction: column; height: 100%; gap: 20px; }
.visTop { font-family: var(--serif); font-size: 32px; font-weight: 700; color: var(--g3); }
.tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; height: 160px; }
.tile {
  border: 3px solid var(--gold); background: var(--gold-l); border-radius: 12px; cursor: pointer;
  font-family: var(--sans); font-size: 29px; color: var(--ink); padding: 18px 24px; text-align: center;
  display: flex; align-items: center; justify-content: center; line-height: 1.3;
}
.tile:hover { background: #F1E1A0; }
.tile .hint { font-weight: 600; color: var(--gold-d); }
.tile.open { background: var(--g2); border-color: var(--g2); color: #fff; font-weight: 600; cursor: default; }
.visCols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; flex: 1; }

/* ---------- Scenario ---------- */
.scn { display: grid; grid-template-columns: 790px 1fr; gap: 36px; height: 100%; }
.scnLeft { display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.sit { background: var(--mist); border-radius: 12px; padding: 18px 26px; font-size: 25px; line-height: 1.4; border-left: 10px solid var(--g1); }
.sit.mrs { border-left-color: var(--gold); background: #FBF6E2; }
.listen { align-self: flex-start; font-size: 22px; padding: 6px 20px; min-width: 0; }
.dlg { display: flex; flex-direction: column; gap: 12px; }
.line { display: flex; gap: 14px; align-items: flex-start; }
.line .av { width: 58px; height: 58px; flex: 0 0 58px; }
.bubble { background: #fff; border: 2px solid var(--line); border-radius: 4px 18px 18px 18px; padding: 10px 20px; font-size: 24px; line-height: 1.38; }
.bubble .who { font-weight: 700; color: var(--g2); display: block; font-size: 22px; }
.line.v .bubble { border-color: var(--gold); background: #FFFDF4; border-radius: 18px 4px 18px 18px; }
.line.v .bubble .who { color: var(--gold-d); }
.line.speaking .bubble { box-shadow: 0 0 0 4px var(--gold); }

.scnRight { display: flex; flex-direction: column; overflow-y: auto; padding-right: 8px; }
.q-instr { font-family: var(--serif); font-weight: 700; font-size: 31px; color: var(--g3); margin-bottom: 14px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; gap: 16px; align-items: flex-start; border: 2px solid var(--line); border-radius: 10px; padding: 11px 18px; cursor: pointer; background: #fff; font-size: 25px; line-height: 1.35; }
.opt:hover { border-color: var(--g1); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt .badge { flex: 0 0 40px; height: 40px; border-radius: 50%; border: 2px solid var(--g2); color: var(--g2); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-top: 1px; }
.opt.sel { border-color: var(--g2); background: var(--ok-bg); }
.opt.sel .badge { background: var(--g2); color: #fff; }
.opt.out { border-color: #D9B8B2; background: var(--err-bg); cursor: default; }
.opt.out .badge { background: var(--err); border-color: var(--err); color: #fff; }
.opt.right { border-color: var(--g1); background: var(--ok-bg); cursor: default; }
.opt.right .badge { background: var(--g1); border-color: var(--g1); color: #fff; }
.opt.locked { cursor: default; }
.opt .why { display: block; margin-top: 6px; font-size: 22px; line-height: 1.35; color: var(--muted); }
.opt.out .why { color: var(--err); }
.opt.right .why { color: var(--g3); }
.actions { display: flex; align-items: center; gap: 22px; margin-top: 16px; }
.status { font-size: 26px; font-weight: 600; }
.status.bad { color: var(--err); }
.status.good { color: var(--g2); }

/* ---------- Complete ---------- */
.doneWrap { display: flex; flex-direction: column; justify-content: center; height: 100%; max-width: 1300px; }
.doneWrap h2 { font-family: var(--serif); font-size: 76px; margin: 0 0 24px; color: var(--g3); }
.doneWrap p { font-size: 34px; line-height: 1.45; }
.doneWrap .btnRow { display: flex; gap: 24px; margin-top: 30px; flex-wrap: wrap; }
.scoreBadge { display: inline-flex; align-items: baseline; gap: 14px; background: var(--gold-l); border: 3px solid var(--gold); border-radius: 14px; padding: 8px 30px; margin: 10px 0 24px; align-self: flex-start; }
.scoreBadge b { font-family: var(--serif); font-size: 64px; color: var(--g3); }
.scoreBadge span { font-size: 28px; color: var(--gold-d); font-weight: 600; }

/* ---------- Modal ---------- */
#modal { position: absolute; inset: 0; background: rgba(23, 38, 30, .62); display: flex; align-items: center; justify-content: center; z-index: 50; }
#modal .box { background: #fff; border-radius: 14px; border-top: 14px solid var(--gold); padding: 34px 50px 40px; width: 1200px; max-height: 900px; overflow: auto; }
#modal h3 { font-family: var(--serif); font-size: 44px; margin: 0 0 18px; color: var(--g3); }
#modal ul { font-size: 28px; line-height: 1.45; padding-left: 34px; margin: 0 0 26px; }
#modal li { margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

.scnIcon { display: flex; justify-content: center; padding-top: 10px; }
.scnIcon svg { width: 300px; }
.mtn-tier:focus-visible, .mtn-tier:focus { outline: none; }
.hubGo { display: block; margin-top: 22px; font-size: 24px; color: var(--muted); }
