:root {
  color-scheme: light;
  --paper: #f2eee5;
  --paper-deep: #e8e0d2;
  --surface: #fcfaf6;
  --ink: #293044;
  --muted: #6d7180;
  --line: #ded7ca;
  --indigo: #465477;
  --indigo-dark: #303d5d;
  --sage: #7b907e;
  --sage-light: #e2e9df;
  --clay: #bc7158;
  --clay-light: #f2e2d9;
  --ochre: #bd9657;
  --ochre-light: #f1e8d4;
  --white: #fffdfa;
  --shadow: 0 18px 50px rgb(44 49 67 / 8%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 12%, rgb(198 157 94 / 7%), transparent 27rem),
    linear-gradient(180deg, #f7f4ed 0%, var(--paper) 56%, #eee9df 100%);
}

button, select { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid #a06b49;
  outline-offset: 3px;
}

/* Headings get focus after each screen change so screen readers announce them; they are not controls. */
.main-content h1[tabindex="-1"]:focus { outline: none; }

.app-shell { min-height: 100vh; }

.topbar {
  min-height: 74px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(20px, 4.5vw, 68px);
  border-bottom: 1px solid rgb(74 75 88 / 10%);
  background: rgb(247 244 237 / 82%);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 40px;
  color: var(--indigo);
}

.brand-title {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  letter-spacing: .01em;
}

.brand-caption {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.session-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(252 250 246 / 78%);
  font-size: 11px;
}
.session-badge > span:first-child { color: var(--muted); }
.session-badge strong { color: var(--indigo-dark); font-size: 14px; letter-spacing: .1em; }
.session-presence { color: var(--sage); white-space: nowrap; }
.session-badge .text-button { padding: 6px 8px; font-size: 11px; }

.quiet-button, .text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.quiet-button:hover, .text-button:hover { background: rgb(70 84 119 / 8%); color: var(--indigo-dark); }
.quiet-button:disabled { opacity: .45; cursor: default; }

.game-layout {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 30px clamp(18px, 4vw, 54px) 70px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(28px, 5.2vw, 74px);
}

.welcome-layout {
  width: min(1180px, 100%);
  grid-template-columns: minmax(0, 1fr);
}

.journey-aside {
  align-self: start;
  position: sticky;
  top: 28px;
  padding: 23px 18px 20px;
  border: 1px solid rgb(87 86 88 / 10%);
  border-radius: 18px;
  background: rgb(252 250 246 / 72%);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--clay);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.journey-aside h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
}

.journey-note {
  margin: 8px 0 23px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.journey-list {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-list::before {
  position: absolute;
  top: 19px;
  bottom: 20px;
  left: 15px;
  width: 1px;
  background: var(--line);
  content: "";
}

.journey-step {
  position: relative;
  display: grid;
  grid-template-columns: 31px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: #777985;
  font-size: 12px;
}

.step-dot {
  z-index: 1;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: #777985;
  font-size: 11px;
  font-weight: 700;
}

.journey-step.is-current { color: var(--ink); font-weight: 700; }
.journey-step.is-current .step-dot {
  border-color: var(--indigo);
  background: var(--indigo);
  color: white;
  box-shadow: 0 0 0 5px rgb(70 84 119 / 10%);
}
.journey-step.is-done .step-dot {
  border-color: var(--sage);
  background: var(--sage);
  color: white;
}
.journey-step.is-done { color: #586956; }

.door-marker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 15px 0 0 5px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--indigo);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}

.door-icon {
  width: 23px;
  height: 27px;
  border: 1.5px solid currentColor;
  border-radius: 13px 13px 2px 2px;
  position: relative;
}
.door-icon::after {
  position: absolute;
  top: 13px;
  right: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.main-content { min-width: 0; }

.welcome {
  min-height: min(740px, calc(100vh - 140px));
  display: grid;
  align-content: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(250px, .9fr);
  align-items: center;
  gap: clamp(28px, 6vw, 88px);
  padding: 30px 0;
}

.welcome-copy { max-width: 590px; }
.welcome h1 {
  margin: 0;
  max-width: 630px;
  color: var(--indigo-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 6.8vw, 84px);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .98;
}

.welcome-subtitle {
  max-width: 460px;
  margin: 22px 0 0;
  color: #5c5f6b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.5;
}

.welcome-promise {
  display: grid;
  gap: 8px;
  margin: 28px 0 30px;
  padding-left: 16px;
  border-left: 2px solid var(--sage);
  color: #666a74;
  font-size: 13px;
  line-height: 1.5;
}

.session-entry {
  max-width: 440px;
  margin: 0 0 12px;
  padding: 18px;
  border: 1px solid rgb(87 86 88 / 12%);
  border-radius: 16px;
  background: rgb(252 250 246 / 78%);
}
.session-entry .eyebrow { margin-bottom: 11px; }
.session-entry > .primary-button { width: 100%; justify-content: space-between; }
.session-help { margin: 10px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.join-session-form label { display: block; margin-bottom: 7px; color: #5c5f6b; font-size: 12px; font-weight: 650; }
.join-session-controls { display: flex; gap: 8px; }
.join-session-controls input {
  min-width: 0;
  flex: 1;
  border: 1px solid #d8d0c2;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  padding: 0 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.join-session-controls input::placeholder { color: #a2a0a0; font-weight: 500; }
.join-session-controls .outline-button { min-height: 44px; }
.session-message { margin: 10px 0 0; color: var(--sage); font-size: 12px; line-height: 1.5; }
.solo-start { margin-top: 9px; }

.primary-button, .secondary-button, .outline-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 0 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.primary-button {
  border: 1px solid var(--indigo);
  background: var(--indigo);
  color: #fffdfa;
  box-shadow: 0 8px 18px rgb(48 61 93 / 15%);
}
.primary-button:hover { transform: translateY(-1px); background: var(--indigo-dark); box-shadow: 0 12px 24px rgb(48 61 93 / 19%); }
.primary-button:disabled { cursor: not-allowed; opacity: .45; transform: none; box-shadow: none; }

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--indigo-dark);
}
.secondary-button:hover, .outline-button:hover { background: var(--sage-light); }

.outline-button {
  border: 1px solid #d8d0c2;
  background: transparent;
  color: var(--indigo-dark);
}

.button-arrow { font-size: 18px; line-height: 0; }
.welcome-footnote { margin: 15px 0 0; color: #83838a; font-size: 11px; }

.house-illustration {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 1 / 1.04;
  justify-self: center;
  display: grid;
  place-items: center;
}

.house-glow {
  position: absolute;
  inset: 9% 8% 4%;
  border-radius: 48% 48% 13% 13%;
  background: radial-gradient(ellipse at 50% 40%, #e6e7d9 0%, #ede7d8 47%, rgb(237 231 216 / 0%) 72%);
}

.house-illustration svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.arch-stroke { fill: none; stroke: var(--indigo); stroke-width: 2; }
.arch-inner { fill: #e2e8dc; stroke: var(--sage); stroke-width: 1.5; }
.arch-door { fill: #f6eee3; stroke: var(--clay); stroke-width: 1.5; }
.house-line { fill: none; stroke: #c4b69e; stroke-width: 1.2; }
.house-detail { fill: var(--ochre); }
.house-flower { fill: none; stroke: var(--sage); stroke-width: 1.2; stroke-linecap: round; }

.screen-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 12px 0 22px;
}

.screen-heading h1, .threshold h1, .ending h1 {
  margin: 0;
  color: var(--indigo-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.1vw, 52px);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.06;
}

.room-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.room-stage {
  overflow: hidden;
  position: relative;
  min-height: 178px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding: 24px clamp(22px, 3.8vw, 40px);
  border: 1px solid #e0d8ca;
  border-radius: 20px;
  background: linear-gradient(110deg, #eee8db 0%, #e3e6dc 72%, #dfe5de 100%);
}

.room-stage::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #b9aa8f);
  content: "";
}

.room-number {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  color: var(--clay);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.room-guardian {
  margin: 0 0 10px;
  color: var(--sage);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .02em;
}

.room-stage p { max-width: 510px; margin: 0; color: #525968; font-size: 14px; line-height: 1.58; }
.room-art { width: 145px; height: 132px; justify-self: center; color: var(--indigo); }
.room-art .scene-fill { fill: rgb(252 250 246 / 52%); }
.room-art .scene-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.room-art .scene-accent { fill: var(--clay); stroke: none; }
.room-art .scene-sage { fill: var(--sage-light); stroke: var(--sage); stroke-width: 1.4; }

.room-grid { display: grid; grid-template-columns: minmax(0, 1.07fr) minmax(250px, .93fr); gap: 18px; align-items: start; }
.panel {
  border: 1px solid #e1dbcf;
  border-radius: 16px;
  background: rgb(255 253 250 / 82%);
  box-shadow: 0 6px 22px rgb(56 55 67 / 3%);
}

.panel-pad { padding: 22px; }
.panel-heading {
  margin: 0 0 8px;
  color: var(--indigo-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 500;
}
.panel-copy { margin: 0; color: #646875; font-size: 13px; line-height: 1.6; }
.puzzle-label {
  margin: 0 0 8px;
  color: var(--clay);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.puzzle-panel { min-height: 300px; }
.puzzle-instruction { margin: 0 0 18px; color: #535866; font-size: 13px; line-height: 1.55; }
.puzzle-controls { display: flex; flex-wrap: wrap; gap: 8px; }

.tile-button, .number-button, .icon-button {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid #ded7ca;
  border-radius: 12px;
  background: #fffdfa;
  color: var(--indigo-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.tile-button:hover, .number-button:hover, .icon-button:hover { border-color: var(--sage); background: #edf1e9; }
.number-button.is-used, .tile-button.is-used { border-color: var(--indigo); background: var(--indigo); color: white; }
.tile-button[disabled], .number-button[disabled] { opacity: .44; cursor: default; }

.selection-strip {
  min-height: 47px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 12px 0;
  padding: 7px 9px;
  border: 1px dashed #d6cebf;
  border-radius: 12px;
  background: #f8f5ee;
}
.selection-strip:empty::before { color: #99979a; content: "Deine Auswahl erscheint hier"; font-size: 12px; }
.selection-chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--ochre-light);
  color: #685431;
  font-size: 12px;
  font-weight: 700;
}

.puzzle-actions, .offer-actions, .navigation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
}
.small-button {
  min-height: 39px;
  border: 1px solid #d9d2c5;
  border-radius: 999px;
  background: transparent;
  color: #555e73;
  padding: 0 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}
.small-button:hover { background: #f0eee8; }
.feedback {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--clay);
  font-size: 12px;
  line-height: 1.5;
}
.feedback.is-good { color: #537058; }

.puzzle-mini-title { margin: 12px 0 6px; color: #777985; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.step-numbers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.pattern-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 18px 0; }
.pattern-card {
  min-height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid #dfd8cb;
  border-radius: 12px;
  background: #fbf8f1;
  color: var(--indigo-dark);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.pattern-card:has(input:checked) { border-color: var(--sage); background: var(--sage-light); color: #3f5142; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.pattern-card:focus-within { outline: 3px solid #a06b49; outline-offset: 3px; }
.pattern-marks { display: flex; gap: 5px; }
.shape-circle, .shape-square, .shape-triangle { width: 9px; height: 9px; display: inline-block; border: 1.4px solid currentColor; }
.shape-circle { border-radius: 50%; }
.shape-square { border-radius: 1px; }
.shape-triangle { width: 0; height: 0; border: 0; border-right: 5px solid transparent; border-bottom: 9px solid currentColor; border-left: 5px solid transparent; }

.sign-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin: 16px 0; }
.sign-grid .tile-button { min-height: 56px; padding: 7px 4px; font-size: 11px; }
.matching-grid { display: grid; gap: 11px; margin: 16px 0; }
.match-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, .9fr); gap: 10px; align-items: center; }
.match-row label { color: #505665; font-size: 12px; line-height: 1.35; }
.match-row select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #ddd5c8;
  border-radius: 10px;
  background: #fffdfa;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
}

.support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.support-choice {
  min-height: 59px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ddd6ca;
  border-radius: 12px;
  background: #fffdfa;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  color: #505665;
  font-size: 12px;
}
.support-choice::before {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  border: 1px solid #c9c2b6;
  border-radius: 50%;
  content: "";
}
.support-choice.is-selected { border-color: var(--sage); background: #edf1e9; color: #425345; }
.support-choice.is-selected::before { border: 5px solid var(--sage); background: white; }

.maze-wrap { display: flex; align-items: center; gap: 18px; margin: 10px 0 0; }
.maze-grid { display: grid; grid-template-columns: repeat(4, 37px); gap: 4px; }
.maze-cell {
  width: 37px;
  height: 37px;
  border: 1px solid #d9d3c8;
  border-radius: 8px;
  background: #fffdfa;
  color: var(--indigo);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.maze-cell.is-wall { border-color: #72798a; background: #72798a; cursor: default; }
.maze-cell.is-path { border-color: var(--sage); background: var(--sage-light); }
.maze-cell.is-current { border-color: var(--clay); background: var(--clay); color: white; }
.maze-cell.is-end { border-color: var(--ochre); }
.maze-key { max-width: 130px; color: #777985; font-size: 11px; line-height: 1.5; }

.side-stack { display: grid; gap: 16px; }
.guardian-card {
  padding: 21px;
  background: linear-gradient(140deg, #e7ebdf, #f5f0e6);
}
.guardian-card h2 { margin: 0 0 8px; color: var(--indigo-dark); font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 500; }
.guardian-card p { margin: 0; color: #5e6570; font-size: 12px; line-height: 1.6; }

.prompt-card { padding: 20px; }
.prompt-card .prompt-text {
  margin: 6px 0 0;
  color: #545b6a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.48;
}
.optional-note { margin: 12px 0 0; color: #7d7e84; font-size: 11px; line-height: 1.5; }
.offer-panel { padding: 20px; }
.offer-list { display: grid; gap: 8px; margin-top: 13px; }
.offer-option {
  width: 100%;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 47px;
  border: 1px solid #e0d9cd;
  border-radius: 12px;
  background: #fffdfa;
  padding: 9px 11px;
  color: #565b68;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
}
.offer-option:hover { border-color: #a7b5a6; background: #f6f8f3; }
.offer-option.is-selected { border-color: var(--sage); background: #e8eee5; color: #3f5142; }
.offer-radio {
  width: 16px;
  height: 16px;
  display: inline-block;
  border: 1px solid #c5c0b6;
  border-radius: 50%;
}
.offer-option.is-selected .offer-radio { border: 5px solid var(--sage); background: white; }

.reveal-card {
  margin-top: 22px;
  padding: clamp(22px, 3.5vw, 34px);
  border: 1px solid #cfdbcf;
  border-radius: 18px;
  background: linear-gradient(135deg, #edf1e9, #faf6eb);
  animation: rise-in .32s ease both;
}
.reveal-card h2 { margin: 0 0 9px; color: var(--indigo-dark); font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 500; }
.reveal-card p { margin: 0; color: #59616b; font-size: 14px; line-height: 1.55; }
.word-tile {
  display: inline-flex;
  align-items: center;
  margin: 18px 0 0;
  padding: 10px 16px;
  border: 1px solid #d8c9a9;
  border-radius: 10px;
  background: #f7ecd4;
  color: #5e4d2e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  letter-spacing: .06em;
}

.threshold, .ending { padding: 12px 0; }
.threshold-intro, .ending-intro { max-width: 640px; margin: 13px 0 24px; color: #606572; font-size: 14px; line-height: 1.65; }
.phrase-card {
  padding: 23px;
  border: 1px solid #ded4c2;
  border-radius: 17px;
  background: #f8f3e8;
}
.phrase-label { margin: 0 0 11px; color: #9a7250; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.phrase { margin: 0; color: var(--indigo-dark); font-family: Georgia, "Times New Roman", serif; font-size: clamp(20px, 3vw, 30px); line-height: 1.35; }

.clue-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.guest-card {
  position: relative;
  overflow: hidden;
  min-height: 155px;
  padding: 19px;
  border: 1px solid #e1dacf;
  border-radius: 15px;
  background: rgb(255 253 250 / 85%);
}
.guest-card.is-guessed { border-color: var(--sage); box-shadow: 0 0 0 3px rgb(123 144 126 / 13%); }
.guest-card h3 { margin: 0 0 11px; color: var(--indigo-dark); font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 500; }
.guest-card p { margin: 6px 0 0; color: #686b75; font-size: 12px; line-height: 1.45; }
.guest-card strong { color: #4d5666; font-weight: 700; }
.guest-select {
  margin-top: 13px;
  padding: 8px 11px;
  border: 1px solid #dad2c5;
  border-radius: 999px;
  background: transparent;
  color: var(--indigo);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.guest-select:hover, .guest-card.is-guessed .guest-select { background: var(--sage-light); border-color: var(--sage); }
.clues-panel { margin: 20px 0; padding: 20px; }
.clue-list { display: grid; gap: 9px; margin: 13px 0 0; padding: 0; list-style: none; }
.clue-list li { display: flex; align-items: flex-start; gap: 10px; color: #616672; font-size: 12px; line-height: 1.45; }
.clue-list li::before {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sage-light);
  color: #5c735f;
  content: attr(data-number);
  font-size: 9px;
  font-weight: 800;
}
.guess-result { margin-top: 14px; color: #616672; font-size: 12px; line-height: 1.5; }

.threshold-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.door-illustration {
  width: 170px;
  height: 205px;
  display: grid;
  place-items: end center;
  margin: 20px auto 24px;
  border-radius: 90px 90px 8px 8px;
  background: radial-gradient(ellipse at 50% 70%, #f7e9ca, #f1eadb 62%, transparent 64%);
}
.door-illustration svg { width: 145px; height: 185px; }
.ending-quote {
  max-width: 620px;
  margin: 23px auto;
  padding: 27px clamp(20px, 5vw, 45px);
  border-left: 2px solid var(--clay);
  background: rgb(255 253 250 / 70%);
  color: #4d5666;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2.7vw, 26px);
  line-height: 1.5;
}
.ending .ending-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.ending-note { max-width: 520px; margin: 0 auto; color: #777985; font-size: 12px; line-height: 1.65; }

.notice {
  margin: 20px 0 0;
  padding: 13px 15px;
  border-radius: 12px;
  background: #f3eee3;
  color: #73717a;
  font-size: 11px;
  line-height: 1.55;
}
.notice strong { color: #5f6170; }

.welcome-safety {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 35px;
}
.safety-chip {
  min-height: 73px;
  padding: 13px;
  border-top: 1px solid #d8d0c2;
  color: #747681;
  font-size: 11px;
  line-height: 1.45;
}
.safety-chip strong { display: block; margin-bottom: 4px; color: var(--indigo); font-size: 11px; }

.home-footer, .screen-footer {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid rgb(99 94 98 / 12%);
  color: #89878b;
  font-size: 10px;
}

.noscript { max-width: 600px; margin: 10vh auto; padding: 30px; color: var(--ink); }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 920px) {
  .game-layout { grid-template-columns: 1fr; gap: 20px; padding-top: 18px; }
  .journey-aside { position: static; order: 0; padding: 14px 16px; }
  .journey-aside h2, .journey-note, .door-marker { display: none; }
  .journey-aside .eyebrow { margin: 0 0 10px; }
  .journey-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .journey-list::before { top: 15px; right: 8%; bottom: auto; left: 8%; width: auto; height: 1px; }
  .journey-step { min-height: auto; display: flex; justify-content: center; }
  .journey-step span:last-child { position: absolute; top: 39px; width: 70px; color: transparent; font-size: 0; }
  .main-content { order: 1; }
  .welcome { min-height: auto; }
}

@media (max-width: 700px) {
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .topbar-actions { width: 100%; justify-content: flex-end; }
  .session-badge { width: 100%; justify-content: flex-end; flex-wrap: wrap; border-radius: 14px; }
  .brand-mark { width: 29px; height: 34px; }
  .brand-title { font-size: 15px; }
  .brand-caption { font-size: 9px; }
  .quiet-button { padding-inline: 9px; font-size: 11px; }
  .game-layout { padding: 14px 14px 44px; }
  .welcome { grid-template-columns: 1fr; gap: 5px; padding: 28px 0; }
  .welcome h1 { font-size: clamp(48px, 15vw, 76px); }
  .welcome-copy { order: 0; }
  .session-entry { padding: 15px; }
  .house-illustration { order: 1; width: min(78%, 280px); margin-top: 16px; }
  .welcome-safety { margin-top: 20px; }
  .safety-chip { padding: 10px 8px; font-size: 10px; }
  .screen-heading { align-items: start; flex-direction: column; gap: 9px; margin-top: 5px; }
  .screen-heading h1, .threshold h1, .ending h1 { font-size: 37px; }
  .room-stage { min-height: 160px; grid-template-columns: 1fr 88px; gap: 8px; padding: 20px 17px; }
  .room-stage p { font-size: 12px; }
  .room-art { width: 87px; height: 100px; }
  .room-grid { grid-template-columns: 1fr; }
  .puzzle-panel { min-height: auto; }
  .side-stack { grid-template-columns: 1fr; }
  .clue-board { gap: 9px; }
  .guest-card { min-height: 169px; padding: 14px; }
  .guest-card h3 { font-size: 17px; }
  .guest-card p { font-size: 11px; }
}

@media (max-width: 440px) {
  .journey-aside { padding-inline: 8px; }
  .journey-list { grid-template-columns: repeat(6, 1fr); }
  .step-dot { width: 28px; height: 28px; font-size: 10px; }
  .journey-list::before { left: 10%; right: 10%; }
  .journey-step span:last-child { display: none; }
  .welcome-safety { grid-template-columns: 1fr; gap: 3px; }
  .safety-chip { min-height: 0; display: flex; gap: 8px; border-top: 0; padding: 5px 0; }
  .safety-chip strong { flex: 0 0 84px; margin: 0; }
  .pattern-row { gap: 4px; }
  .pattern-card { min-height: 58px; }
  .support-grid { grid-template-columns: 1fr; }
  .maze-wrap { align-items: flex-start; flex-direction: column; }
  .maze-key { max-width: 100%; }
  .clue-board { grid-template-columns: 1fr; }
  .guest-card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.breath-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}
