:root {
  --ink: #081516;
  --ink-soft: #102627;
  --jade: #67b6a6;
  --jade-dim: #315f58;
  --gold: #d5b271;
  --gold-bright: #f4dba4;
  --paper: #efe2c8;
  --paper-dim: #c8b899;
  --vermillion: #a64637;
  --line: rgba(222, 197, 143, 0.2);
  --panel: rgba(8, 20, 21, 0.9);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

#app {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 10%, rgba(70, 126, 115, 0.24), transparent 36%),
    #071213;
}

#scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#scene.is-dragging {
  cursor: grabbing;
}

.ambient-vignette,
.grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.ambient-vignette {
  background:
    linear-gradient(180deg, rgba(2, 9, 10, 0.52), transparent 19%, transparent 75%, rgba(2, 8, 9, 0.75)),
    radial-gradient(ellipse at center, transparent 42%, rgba(0, 6, 7, 0.58) 100%);
}

.grain {
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(22px, env(safe-area-inset-top)) clamp(22px, 4vw, 64px) 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-seal {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(213, 178, 113, 0.62);
  background: rgba(164, 62, 48, 0.9);
  color: #f7e8c9;
  font-size: 22px;
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.3);
  transform: rotate(-2deg);
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  letter-spacing: 0.16em;
  font-size: 15px;
  font-weight: 600;
}

.brand-copy small {
  color: rgba(239, 226, 200, 0.58);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.top-actions {
  display: flex;
  gap: 9px;
}

.round-action {
  min-width: 54px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 18, 19, 0.44);
  color: rgba(239, 226, 200, 0.74);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.round-action:hover {
  border-color: rgba(213, 178, 113, 0.6);
  background: rgba(17, 38, 38, 0.7);
  color: var(--gold-bright);
}

.game-action {
  border-color: rgba(244, 219, 164, 0.42);
  color: var(--gold-bright);
}

.hall-heading {
  position: absolute;
  top: 21%;
  left: clamp(24px, 5vw, 78px);
  z-index: 6;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: min(620px, 65vw);
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.hall-heading.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hall-index {
  margin-top: -14px;
  color: rgba(213, 178, 113, 0.58);
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.08em;
}

.hall-rule {
  width: 1px;
  height: 74px;
  margin-top: 3px;
  background: linear-gradient(var(--gold), transparent);
}

.hall-heading p {
  margin: 0 0 9px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
}

.hall-heading h1 {
  margin: 0;
  font-size: clamp(21px, 2.3vw, 36px);
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.45;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

.hotspots {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  transition: opacity 220ms ease;
}

.hotspots.is-walking {
  opacity: 0;
}

body.is-walking #scene {
  cursor: default;
}

.hotspot {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease;
}

.hotspot::before {
  content: "";
  width: 22px;
  height: 22px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--gold-bright) 0 2px, transparent 3px),
    rgba(11, 28, 28, 0.7);
  box-shadow: 0 0 0 6px rgba(213, 178, 113, 0.08), 0 0 20px rgba(213, 178, 113, 0.2);
  backdrop-filter: blur(5px);
}

.hotspot::after {
  content: "";
  position: absolute;
  left: 10px;
  bottom: 22px;
  width: 1px;
  height: 28px;
  background: linear-gradient(transparent, rgba(213, 178, 113, 0.66));
}

.hotspot span {
  padding: 8px 12px;
  border: 1px solid rgba(213, 178, 113, 0.18);
  background: rgba(7, 19, 20, 0.74);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24);
}

.hotspot:hover span {
  border-color: rgba(244, 219, 164, 0.58);
  color: var(--gold-bright);
}

.guide-hint {
  position: absolute;
  right: clamp(20px, 4vw, 60px);
  bottom: 114px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(239, 226, 200, 0.48);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.drag-icon {
  position: relative;
  width: 25px;
  height: 15px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.drag-icon::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: drag-dot 2.4s ease-in-out infinite;
}

@keyframes drag-dot {
  0%, 20%, 100% { transform: translateX(0); }
  55%, 70% { transform: translateX(9px); }
}

.hall-nav {
  position: absolute;
  left: 50%;
  bottom: max(23px, env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.hall-tabs {
  display: flex;
  gap: 3px;
  padding: 5px;
  border: 1px solid rgba(213, 178, 113, 0.18);
  border-radius: 999px;
  background: rgba(6, 17, 18, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.34);
}

.hall-tab {
  min-width: 130px;
  padding: 11px 17px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(239, 226, 200, 0.52);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.hall-tab b {
  margin-right: 7px;
  color: rgba(213, 178, 113, 0.46);
  font-size: 9px;
}

.hall-tab.is-active {
  background: rgba(213, 178, 113, 0.14);
  color: var(--gold-bright);
}

.hall-tab.is-active b {
  color: var(--gold);
}

.exit-button {
  padding: 12px 17px;
  border: 1px solid rgba(213, 178, 113, 0.2);
  border-radius: 999px;
  background: rgba(6, 17, 18, 0.78);
  color: rgba(239, 226, 200, 0.58);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.exit-button:hover {
  border-color: rgba(244, 219, 164, 0.56);
  color: var(--gold-bright);
}

.loading-screen,
.intro-screen,
.help-modal {
  position: absolute;
  inset: 0;
  z-index: 50;
}

.game-modal {
  position: absolute;
  inset: 0;
  z-index: 48;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 68% 24%, rgba(71, 128, 117, 0.28), transparent 28%),
    rgba(2, 9, 10, 0.78);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.game-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.game-card {
  position: relative;
  width: min(720px, 100%);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(213, 178, 113, 0.28);
  background:
    linear-gradient(145deg, rgba(18, 42, 41, 0.98), rgba(6, 18, 19, 0.99)),
    var(--ink);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.5);
}

.game-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.game-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.game-intro {
  max-width: 39em;
  margin: 16px 0 24px;
  color: rgba(239, 226, 200, 0.58);
  font-size: 14px;
  line-height: 1.8;
}

.game-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(213, 178, 113, 0.72);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.game-progress-line {
  position: relative;
  flex: 1;
  height: 1px;
  overflow: hidden;
  background: rgba(213, 178, 113, 0.16);
}

.game-progress-line i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 320ms ease;
}

.game-prompt {
  margin: 38px 0 20px;
  color: #f2e5cb;
  font-size: clamp(19px, 2.5vw, 28px);
  line-height: 1.65;
  letter-spacing: 0.06em;
}

.game-options {
  display: grid;
  gap: 9px;
}

.game-option {
  position: relative;
  padding: 15px 18px 15px 48px;
  border: 1px solid rgba(213, 178, 113, 0.16);
  background: rgba(4, 14, 15, 0.4);
  color: rgba(239, 226, 200, 0.72);
  text-align: left;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.game-option::before {
  content: attr(data-index);
  position: absolute;
  left: 18px;
  color: rgba(213, 178, 113, 0.56);
  font-family: var(--serif);
}

.game-option:hover:not(:disabled) {
  border-color: rgba(213, 178, 113, 0.54);
  background: rgba(213, 178, 113, 0.08);
  color: var(--gold-bright);
}

.game-option.is-correct {
  border-color: rgba(103, 182, 166, 0.7);
  background: rgba(103, 182, 166, 0.1);
  color: #d8f2e9;
}

.game-option.is-wrong {
  border-color: rgba(182, 94, 77, 0.7);
  background: rgba(182, 94, 77, 0.1);
  color: #f0c9c0;
}

.game-feedback {
  min-height: 44px;
  margin-top: 16px;
  color: rgba(239, 226, 200, 0.54);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.7;
}

.game-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
  padding-top: 22px;
  color: rgba(239, 226, 200, 0.36);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.loading-screen {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background: #071213;
  color: rgba(239, 226, 200, 0.58);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  transition: opacity 500ms ease, visibility 500ms ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(213, 178, 113, 0.42);
  color: var(--gold);
  font-size: 25px;
  animation: breathe 2.2s ease-in-out infinite;
}

.loading-screen > span {
  width: 150px;
  height: 1px;
  overflow: hidden;
  background: rgba(213, 178, 113, 0.12);
}

.loading-screen > span::after {
  content: "";
  display: block;
  width: 36%;
  height: 100%;
  background: var(--gold);
  animation: loading-line 1.5s ease-in-out infinite;
}

@keyframes loading-line {
  from { transform: translateX(-120%); }
  to { transform: translateX(380%); }
}

@keyframes breathe {
  50% { border-color: rgba(244, 219, 164, 0.72); box-shadow: 0 0 35px rgba(213, 178, 113, 0.12); }
}

.intro-screen {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 42%, rgba(57, 110, 101, 0.35), transparent 28%),
    linear-gradient(115deg, rgba(5, 14, 15, 0.99) 20%, rgba(9, 26, 27, 0.9) 68%, rgba(10, 29, 29, 0.84));
  transition: opacity 700ms ease, visibility 700ms ease;
}

.intro-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.intro-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(90deg, transparent 49.8%, rgba(213, 178, 113, 0.28) 50%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.8%, rgba(213, 178, 113, 0.2) 50%, transparent 50.2%);
  background-size: 74px 74px;
  mask-image: radial-gradient(circle, black, transparent 68%);
}

.intro-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.intro-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 14, 15, var(--cover-overlay, 0.9)) 0%, rgba(4, 14, 15, calc(var(--cover-overlay, 0.72) * 0.58)) 52%, rgba(4, 14, 15, calc(var(--cover-overlay, 0.72) * 0.86)) 100%),
    linear-gradient(180deg, rgba(3, 10, 11, calc(var(--cover-overlay, 0.72) * 0.3)), rgba(3, 10, 11, var(--cover-overlay, 0.72)));
}

.intro-screen.has-cover .intro-cover {
  display: block;
}

.intro-copy {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100vw - 48px));
  margin-left: min(14vw, 170px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.intro-copy h2 {
  margin: 0 0 24px;
  max-width: 8em;
  color: #f4e9d3;
  font-size: clamp(64px, 10vw, 146px);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 0.95;
  text-shadow: 0 20px 80px rgba(0, 0, 0, 0.4);
}

.intro-lead {
  max-width: 580px;
  margin: 0 0 30px;
  color: rgba(239, 226, 200, 0.7);
  font-size: clamp(15px, 1.3vw, 19px);
  letter-spacing: 0.08em;
  line-height: 1.9;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.intro-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  color: rgba(239, 226, 200, 0.6);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.theme-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.theme-choice {
  display: grid;
  gap: 4px;
  min-width: 178px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  background: rgba(7, 18, 19, 0.42);
  color: rgba(239, 226, 200, 0.62);
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.theme-choice b {
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.theme-choice span {
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.5;
}

.theme-choice.is-active {
  border-color: rgba(244, 219, 164, 0.68);
  background: rgba(213, 178, 113, 0.12);
  color: var(--paper);
}

.theme-action {
  border-color: rgba(213, 178, 113, 0.38);
  color: var(--gold-bright);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 16px 22px 16px 28px;
  border: 1px solid rgba(213, 178, 113, 0.68);
  background: linear-gradient(110deg, rgba(213, 178, 113, 0.2), rgba(213, 178, 113, 0.08));
  color: var(--gold-bright);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  cursor: pointer;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  transition: background 180ms ease, transform 180ms ease;
}

.primary-button:hover {
  background: linear-gradient(110deg, rgba(213, 178, 113, 0.32), rgba(213, 178, 113, 0.12));
  transform: translateY(-2px);
}

.primary-button i {
  width: 24px;
  height: 1px;
  background: currentColor;
  box-shadow: 8px -3px 0 -0.2px currentColor, 8px 3px 0 -0.2px currentColor;
}

.primary-button.compact {
  padding: 12px 20px;
}

.intro-note {
  margin: 15px 0 0;
  color: rgba(239, 226, 200, 0.34);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.intro-orbit {
  position: absolute;
  right: 7vw;
  top: 50%;
  width: min(35vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(213, 178, 113, 0.15);
  border-radius: 50%;
  transform: translateY(-50%);
}

.intro-orbit::before,
.intro-orbit::after,
.intro-orbit span {
  content: "";
  position: absolute;
  border: 1px solid rgba(213, 178, 113, 0.12);
  border-radius: 50%;
}

.intro-orbit::before { inset: 10%; }
.intro-orbit::after { inset: 27%; }
.intro-orbit span:nth-child(1) { inset: 42%; background: rgba(213, 178, 113, 0.04); }
.intro-orbit span:nth-child(2) {
  width: 8px;
  height: 8px;
  top: 12%;
  left: 47%;
  border: 0;
  background: var(--gold);
  box-shadow: 0 0 22px var(--gold);
  animation: orbit 13s linear infinite;
  transform-origin: 4px calc(38vw / 2);
}

.intro-orbit span:nth-child(3) {
  width: 5px;
  height: 5px;
  bottom: 17%;
  right: 22%;
  border: 0;
  background: var(--jade);
  box-shadow: 0 0 18px var(--jade);
}

.intro-orbit b {
  position: absolute;
  inset: 38%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(213, 178, 113, 0.32);
  color: rgba(213, 178, 113, 0.42);
  font-size: clamp(42px, 7vw, 88px);
  font-weight: 400;
  transform: rotate(45deg);
}

.intro-orbit b::first-letter {
  transform: rotate(-45deg);
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

.help-modal {
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 9, 10, 0.76);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.help-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.help-card {
  position: relative;
  width: min(620px, 100%);
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(213, 178, 113, 0.28);
  background:
    linear-gradient(140deg, rgba(20, 45, 44, 0.92), rgba(7, 20, 21, 0.98)),
    var(--ink);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.46);
}

.help-card h2 {
  margin: 0 0 30px;
  font-size: clamp(25px, 4vw, 38px);
  font-weight: 400;
  letter-spacing: 0.1em;
}

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.help-grid div {
  display: grid;
  gap: 7px;
  padding: 17px;
  border-top: 1px solid var(--line);
}

.help-grid b {
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 0.14em;
}

.help-grid span {
  color: rgba(239, 226, 200, 0.58);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.7;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0 0 3px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(7, 18, 19, 0.45);
  color: rgba(239, 226, 200, 0.72);
  font-family: var(--sans);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.help-card > .icon-button {
  position: absolute;
  top: 20px;
  right: 20px;
}

.detail-panel {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  justify-content: flex-end;
  background: rgba(2, 8, 9, 0.58);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.detail-panel.is-open {
  opacity: 1;
  visibility: visible;
}

.detail-surface {
  display: flex;
  flex-direction: column;
  width: min(720px, 62vw);
  height: 100%;
  padding: clamp(24px, 3vw, 44px);
  border-left: 1px solid rgba(213, 178, 113, 0.2);
  background:
    radial-gradient(circle at 100% 0, rgba(70, 126, 115, 0.22), transparent 30%),
    linear-gradient(145deg, rgba(16, 37, 37, 0.98), rgba(6, 17, 18, 0.99));
  box-shadow: -30px 0 100px rgba(0, 0, 0, 0.42);
  transform: translateX(42px);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: auto;
  overscroll-behavior: contain;
}

.detail-panel.is-open .detail-surface {
  transform: translateX(0);
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
}

.detail-head h2 {
  margin: 0;
  color: #f2e5cb;
  font-size: clamp(27px, 3.4vw, 46px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.08em;
}

.detail-summary {
  max-width: 52em;
  margin: 18px 0 24px;
  color: rgba(239, 226, 200, 0.67);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.04em;
}

.detail-gallery {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.gallery-thumb {
  flex: 0 0 92px;
  height: 68px;
  padding: 0;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.52;
}

.gallery-thumb.is-active {
  border-color: var(--gold);
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(190px, 0.65fr);
  gap: 24px;
  margin-top: 18px;
}

.detail-main-image {
  min-width: 0;
}

.detail-main-image img {
  display: block;
  width: 100%;
  max-height: 48vh;
  object-fit: contain;
  background: #071213;
  border: 1px solid var(--line);
}

.detail-main-image p {
  margin: 10px 0 0;
  color: rgba(239, 226, 200, 0.42);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.7;
}

.detail-facts {
  display: grid;
  align-content: start;
  gap: 12px;
}

.fact-item {
  padding: 13px 0 13px 14px;
  border-left: 1px solid rgba(213, 178, 113, 0.34);
}

.fact-item b {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.fact-item span,
.fact-item p {
  margin: 0;
  color: rgba(239, 226, 200, 0.68);
  font-size: 13px;
  line-height: 1.75;
}

.detail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 26px;
  color: rgba(239, 226, 200, 0.4);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.text-button {
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid rgba(213, 178, 113, 0.34);
  background: transparent;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 95px;
  z-index: 60;
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: rgba(5, 15, 16, 0.88);
  color: rgba(239, 226, 200, 0.72);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 220ms ease, transform 220ms ease;
  backdrop-filter: blur(12px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.scene-fade {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: #071213;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.scene-fade.is-active {
  opacity: 1;
}

@media (max-width: 900px) {
  .intro-copy {
    margin-left: 0;
  }

  .intro-orbit {
    right: -20vw;
    opacity: 0.42;
  }

  .detail-surface {
    width: min(760px, 88vw);
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: max(14px, env(safe-area-inset-top)) 16px 12px;
    gap: 8px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 9px;
  }

  .brand-seal {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }

  .brand-copy strong {
    font-size: 12px;
    max-width: 124px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-copy small {
    display: none;
  }

  .round-action {
    min-width: 42px;
    padding: 8px 9px;
  }

  .top-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  #reset-view {
    display: none;
  }

  .hall-heading {
    top: 17%;
    left: 18px;
    max-width: calc(100vw - 36px);
  }

  .hall-index {
    font-size: 44px;
  }

  .hall-rule {
    height: 55px;
  }

  .hall-heading h1 {
    font-size: 19px;
  }

  .hotspot span {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .guide-hint {
    display: none;
  }

  .hall-nav {
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
  }

  .hall-tabs {
    flex: 1 1 auto;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .hall-tabs::-webkit-scrollbar {
    display: none;
  }

  .hall-tab {
    flex: 0 0 auto;
    min-width: auto;
    padding: 10px 14px;
  }

  .exit-button {
    flex: 0 0 auto;
    padding: 10px 13px;
  }

  .intro-copy {
    width: calc(100vw - 38px);
  }

  .intro-copy h2 {
    margin-bottom: 20px;
    font-size: clamp(58px, 21vw, 92px);
  }

  .intro-lead {
    font-size: 14px;
    line-height: 1.8;
  }

  .intro-meta {
    gap: 6px;
  }

  .intro-meta span {
    padding: 7px 9px;
    font-size: 9px;
  }

  .detail-surface {
    width: 100%;
    padding: 20px 18px max(22px, env(safe-area-inset-bottom));
    border-left: 0;
  }

  .detail-head h2 {
    font-size: 27px;
  }

  .detail-summary {
    font-size: 13px;
  }

  .detail-body {
    grid-template-columns: 1fr;
  }

  .detail-main-image img {
    max-height: 38vh;
  }

  .detail-facts {
    grid-template-columns: 1fr 1fr;
  }

  .help-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .game-modal {
    padding: 12px;
  }

  .game-card {
    min-height: calc(100dvh - 24px);
    padding: 22px 18px;
  }

  .game-foot {
    align-items: flex-end;
  }
}

@media (max-height: 650px) and (orientation: landscape) {
  .hall-heading {
    top: 15%;
  }

  .intro-copy h2 {
    font-size: 62px;
    margin-bottom: 15px;
  }

  .intro-lead {
    margin-bottom: 18px;
  }

  .intro-meta {
    margin-bottom: 18px;
  }
}

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

.qa-autostart #intro-screen,
.qa-autostart #loading-screen {
  display: none !important;
}

.qa-autostart .hall-heading {
  opacity: 1;
  transform: translateY(0);
}

html[data-theme="celadon"] {
  --ink: #9fb4ae;
  --ink-soft: #d2dfdb;
  --jade: #3e7469;
  --jade-dim: #668d83;
  --gold: #5b8076;
  --gold-bright: #245c51;
  --paper: #183a34;
  --paper-dim: #58716b;
  --vermillion: #9f4438;
  --line: rgba(45, 88, 79, 0.2);
  --panel: rgba(238, 244, 241, 0.92);
}

html[data-theme="celadon"] body {
  background: #9fb4ae;
  color: var(--paper);
}

html[data-theme="celadon"] #app {
  background:
    radial-gradient(circle at 50% 10%, rgba(230, 240, 236, 0.76), transparent 40%),
    #9fb4ae;
}

html[data-theme="celadon"] .ambient-vignette {
  background:
    linear-gradient(180deg, rgba(235, 243, 239, 0.42), transparent 18%, transparent 75%, rgba(39, 66, 59, 0.18)),
    radial-gradient(ellipse at center, transparent 48%, rgba(34, 61, 55, 0.18) 100%);
}

html[data-theme="celadon"] .grain {
  opacity: 0.035;
}

html[data-theme="celadon"] .brand-copy strong,
html[data-theme="celadon"] .hall-heading h1,
html[data-theme="celadon"] .game-head h2,
html[data-theme="celadon"] .help-card h2,
html[data-theme="celadon"] .detail-head h2 {
  color: #173a34;
  text-shadow: none;
}

html[data-theme="celadon"] .brand-copy small,
html[data-theme="celadon"] .hall-heading p {
  color: #4b756b;
}

html[data-theme="celadon"] .brand-copy strong {
  color: #f1f7f5;
}

html[data-theme="celadon"] .brand-copy small {
  color: #b2c9c3;
}

html[data-theme="celadon"] .hall-heading h1 {
  color: #f1f7f5;
  text-shadow: 0 2px 24px rgba(15, 47, 40, 0.52);
}

html[data-theme="celadon"] .hall-heading p {
  color: #c2d8d2;
}

html[data-theme="celadon"] .hall-index {
  color: rgba(211, 235, 229, 0.62);
}

html[data-theme="celadon"] .hall-rule {
  background: linear-gradient(#bdd7d1, transparent);
}

html[data-theme="celadon"] .round-action {
  border-color: rgba(55, 103, 93, 0.22);
  background: rgba(245, 250, 248, 0.6);
  color: #365f57;
}

html[data-theme="celadon"] .round-action:hover {
  border-color: rgba(43, 101, 89, 0.52);
  background: rgba(250, 253, 251, 0.82);
  color: #174f44;
}

html[data-theme="celadon"] .hotspot {
  color: #173a34;
}

html[data-theme="celadon"] .hotspot::before {
  border-color: #477f72;
  background:
    radial-gradient(circle, #275f54 0 2px, transparent 3px),
    rgba(244, 249, 247, 0.76);
  box-shadow: 0 0 0 6px rgba(68, 124, 111, 0.08), 0 0 20px rgba(45, 100, 88, 0.16);
}

html[data-theme="celadon"] .hotspot span {
  border-color: rgba(46, 102, 90, 0.18);
  background: rgba(244, 249, 247, 0.86);
  color: #21483f;
  box-shadow: 0 8px 26px rgba(38, 68, 61, 0.12);
}

html[data-theme="celadon"] .hotspot:hover span {
  border-color: rgba(41, 102, 89, 0.54);
  color: #174f44;
}

html[data-theme="celadon"] .guide-hint {
  color: rgba(30, 68, 60, 0.5);
}

html[data-theme="celadon"] .hall-tabs {
  border-color: rgba(44, 95, 84, 0.18);
  background: rgba(238, 245, 242, 0.82);
  box-shadow: 0 12px 44px rgba(39, 70, 62, 0.13);
}

html[data-theme="celadon"] .exit-button {
  border-color: rgba(44, 95, 84, 0.18);
  background: rgba(238, 245, 242, 0.82);
  color: rgba(25, 63, 55, 0.62);
}

html[data-theme="celadon"] .exit-button:hover {
  border-color: rgba(43, 101, 89, 0.52);
  color: #174f44;
}

html[data-theme="celadon"] .hall-tab {
  color: rgba(25, 63, 55, 0.58);
}

html[data-theme="celadon"] .hall-tab b {
  color: rgba(45, 102, 90, 0.48);
}

html[data-theme="celadon"] .hall-tab.is-active {
  background: rgba(55, 116, 102, 0.14);
  color: #174f44;
}

html[data-theme="celadon"] .intro-screen {
  background:
    radial-gradient(circle at 72% 42%, rgba(120, 160, 150, 0.28), transparent 29%),
    linear-gradient(115deg, rgba(214, 228, 223, 0.98) 20%, rgba(177, 199, 192, 0.96) 68%, rgba(157, 183, 176, 0.94));
}

html[data-theme="celadon"] .intro-backdrop {
  opacity: 0.18;
  background-image:
    linear-gradient(90deg, transparent 49.8%, rgba(62, 113, 101, 0.25) 50%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.8%, rgba(62, 113, 101, 0.18) 50%, transparent 50.2%);
}

html[data-theme="celadon"] .intro-copy h2 {
  color: #173a34;
  text-shadow: 0 20px 70px rgba(55, 86, 78, 0.13);
}

html[data-theme="celadon"] .intro-lead {
  color: rgba(24, 62, 54, 0.7);
}

html[data-theme="celadon"] .intro-meta span,
html[data-theme="celadon"] .theme-choice {
  border-color: rgba(45, 98, 86, 0.2);
  background: rgba(244, 249, 247, 0.42);
  color: rgba(25, 64, 55, 0.66);
}

html[data-theme="celadon"] .theme-choice b {
  color: #356c60;
}

html[data-theme="celadon"] .theme-choice.is-active {
  border-color: rgba(45, 111, 96, 0.58);
  background: rgba(66, 129, 114, 0.12);
  color: #173a34;
}

html[data-theme="celadon"] .primary-button {
  border-color: rgba(45, 104, 91, 0.55);
  background: linear-gradient(110deg, rgba(72, 133, 119, 0.2), rgba(72, 133, 119, 0.08));
  color: #174f44;
  box-shadow: 0 16px 50px rgba(42, 75, 67, 0.1);
}

html[data-theme="celadon"] .primary-button:hover {
  background: linear-gradient(110deg, rgba(72, 133, 119, 0.32), rgba(72, 133, 119, 0.14));
}

html[data-theme="celadon"] .intro-note {
  color: rgba(24, 62, 54, 0.4);
}

html[data-theme="celadon"] .intro-orbit,
html[data-theme="celadon"] .intro-orbit::before,
html[data-theme="celadon"] .intro-orbit::after,
html[data-theme="celadon"] .intro-orbit span {
  border-color: rgba(53, 105, 93, 0.15);
}

html[data-theme="celadon"] .intro-orbit b {
  border-color: rgba(53, 105, 93, 0.3);
  color: rgba(39, 90, 79, 0.42);
}

html[data-theme="celadon"] .loading-screen,
html[data-theme="celadon"] .scene-fade {
  background: #dce7e3;
  color: #315c52;
}

html[data-theme="celadon"] .loading-mark {
  border-color: rgba(56, 105, 94, 0.42);
  color: #396f63;
}

html[data-theme="celadon"] .help-modal,
html[data-theme="celadon"] .game-modal,
html[data-theme="celadon"] .detail-panel {
  background: rgba(214, 226, 222, 0.76);
}

html[data-theme="celadon"] .help-card,
html[data-theme="celadon"] .game-card,
html[data-theme="celadon"] .detail-surface {
  border-color: rgba(45, 97, 86, 0.2);
  background:
    radial-gradient(circle at 100% 0, rgba(138, 177, 167, 0.2), transparent 30%),
    linear-gradient(145deg, rgba(241, 247, 244, 0.99), rgba(221, 233, 228, 0.99));
  color: #183a34;
  box-shadow: 0 32px 100px rgba(44, 73, 66, 0.18);
}

html[data-theme="celadon"] .help-grid div {
  border-color: rgba(45, 97, 86, 0.16);
}

html[data-theme="celadon"] .help-grid b,
html[data-theme="celadon"] .fact-item b {
  color: #336f62;
}

html[data-theme="celadon"] .help-grid span,
html[data-theme="celadon"] .fact-item span,
html[data-theme="celadon"] .fact-item p,
html[data-theme="celadon"] .detail-summary,
html[data-theme="celadon"] .game-intro,
html[data-theme="celadon"] .game-feedback {
  color: rgba(24, 62, 54, 0.68);
}

html[data-theme="celadon"] .icon-button,
html[data-theme="celadon"] .game-option,
html[data-theme="celadon"] .gallery-thumb {
  border-color: rgba(45, 97, 86, 0.18);
  background: rgba(247, 251, 249, 0.5);
  color: #315f55;
}

html[data-theme="celadon"] .game-option:hover:not(:disabled) {
  border-color: rgba(45, 103, 90, 0.52);
  background: rgba(66, 129, 114, 0.08);
  color: #174f44;
}

html[data-theme="celadon"] .gallery-thumb.is-active {
  border-color: #4f8a7c;
}

html[data-theme="celadon"] .text-button {
  border-color: rgba(45, 103, 90, 0.38);
  color: #2f6c60;
}

html[data-theme="celadon"] .toast {
  border-color: rgba(45, 97, 86, 0.2);
  background: rgba(240, 246, 243, 0.9);
  color: #315f55;
}
