html:has(.consult-page),
body:has(.consult-page) {
  height: 100%;
  overflow: hidden;
}
.consult-page {
  --hud-top: calc(56px + var(--safe-t));
  --hud-side: 68px;
  --hud-bottom: clamp(228px, 28svh, 276px);
  --hud-tabs: 0px;
  --hud-inset: 14px;
  height: 100dvh;
  height: 100svh;
  overflow: hidden;
  background: #0a0704;
}
.consult-page .skip-link:focus { z-index: 80; }
.room {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transform-origin: 50% 42%;
}
.layer, .prop, .master-anchor { will-change: transform; }
.layer-room {
  position: absolute;
  inset: -4%;
  z-index: 1;
}
.layer-room img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
}
.layer-glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(42% 36% at 18% 28%, rgba(232, 170, 70, .16), transparent 70%),
    radial-gradient(38% 32% at 86% 30%, rgba(232, 170, 70, .14), transparent 70%),
    linear-gradient(180deg, rgba(10,7,4,.5) 0%, transparent 18%, transparent 48%, rgba(10,7,4,.62) 100%);
}

.master-anchor {
  position: absolute;
  left: 50%;
  bottom: calc(var(--hud-bottom) + var(--hud-tabs) - 6%);
  z-index: 4;
  height: calc(100svh - var(--hud-top) - var(--hud-bottom) - var(--hud-tabs) + 18%);
  max-height: 78vh;
  width: auto;
  transform: translateX(-50%);
  pointer-events: none;
  overflow: visible;
}
.master-anchor .layer-master,
.master-anchor picture,
.master-anchor img {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.42));
  object-fit: contain;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, rgba(0,0,0,.7) 82%, transparent 97%);
  mask-image: linear-gradient(to bottom, #000 62%, rgba(0,0,0,.7) 82%, transparent 97%);
}

.layer-table {
  position: absolute;
  inset: -4%;
  z-index: 5;
  -webkit-mask-image: linear-gradient(to bottom, transparent 54%, #000 66%);
  mask-image: linear-gradient(to bottom, transparent 54%, #000 66%);
  pointer-events: none;
}
.layer-table picture,
.layer-table img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
}

.prop { position: absolute; transform-origin: 50% 100%; }
.prop picture { display: block; }
.prop img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.45));
}
.prop-plum {
  left: max(18px, calc(var(--hud-side) + 6px));
  bottom: calc(var(--hud-bottom) + var(--hud-tabs) + 3%);
  width: min(12.5vw, 168px);
  z-index: 7;
}
.prop-censer {
  left: max(22%, calc(var(--hud-side) + 118px));
  bottom: calc(var(--hud-bottom) + var(--hud-tabs) + 4%);
  width: min(5.6vw, 74px);
  z-index: 8;
}
.prop-censer::after {
  content: "";
  position: absolute;
  left: 30%;
  bottom: 54%;
  width: 40%;
  height: 150%;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255,248,230,.45), transparent 62%),
    radial-gradient(ellipse at 40% 40%, rgba(230,220,190,.28), transparent 70%);
  filter: blur(7px);
  animation: smokeLift 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.prop-tea {
  right: 5%;
  bottom: calc(var(--hud-bottom) + var(--hud-tabs) + 3%);
  width: min(18vw, 240px);
  z-index: 7;
}
.smoke-layer {
  position: absolute;
  left: 6%;
  bottom: 52%;
  width: 88%;
  height: 220%;
  pointer-events: none;
  z-index: 1;
  opacity: .9;
}
@keyframes smokeLift {
  0%, 100% { transform: translate3d(0, 4px, 0) scaleX(1); opacity: .28; }
  50% { transform: translate3d(3px, -10px, 0) scaleX(1.08); opacity: .55; }
}

.consult-page .hud-speech {
  z-index: 12;
  left: 53%;
  top: calc(var(--hud-top) + 6vh);
  width: min(272px, 28vw);
  max-width: 300px;
  background: linear-gradient(180deg, #fbf4e0, #f1e0b8);
  color: #3a2a16;
  padding: 12px 16px 14px;
  border-radius: 8px 20px 20px 20px;
  box-shadow:
    0 16px 36px rgba(20, 10, 4, .38),
    inset 0 1px 0 rgba(255,255,255,.55);
  pointer-events: none;
  transform-origin: 0 40px;
}
.hud-speech.is-in { animation: speechIn .7s cubic-bezier(.2,.8,.2,1) both; }
.speech-name {
  margin: 0 1.6rem 6px 0;
  color: #8a5a12;
  font-family: var(--font-d);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.2;
}
.speech-body p {
  margin: 0 0 .4rem;
  font-size: .92rem;
  line-height: 1.5;
}
.speech-body p:last-child { margin: 0; }
.speech-dots {
  position: absolute;
  top: 10px;
  right: 12px;
  color: #b08948;
  letter-spacing: .12em;
  font-size: .85rem;
}
.speech-tail {
  position: absolute;
  left: -7px;
  top: 34px;
  width: 18px;
  height: 18px;
  background: #f6ead0;
  transform: rotate(45deg);
  border-radius: 3px 0 0 0;
  box-shadow: -3px 3px 8px rgba(20,10,4,.12);
}
@keyframes speechIn {
  from { opacity: 0; transform: translate(-14px, 8px) scale(.94); }
  to { opacity: 1; transform: none; }
}

.room-top, .topic-rail, .room-verse, .room-main, .room-menu, .consult-page .hud-speech {
  position: fixed;
}
.room-top {
  top: 0; left: 0; right: 0;
  z-index: 16;
  height: var(--hud-top);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(8px + var(--safe-t)) 16px 8px 16px;
  background: linear-gradient(180deg, rgba(8,5,3,.82) 0%, rgba(8,5,3,.35) 70%, transparent);
}
.room-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f6e7c2;
  text-shadow: 0 1px 10px rgba(0,0,0,.8);
}
.room-brand strong {
  display: block;
  font-family: var(--font-d);
  letter-spacing: .14em;
  font-size: 1.08rem;
}
.room-brand small {
  display: block;
  color: #d4a017;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.room-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ghost-link {
  color: #f3e6c8;
  font-size: .82rem;
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(0,0,0,.85);
  background: rgba(16,10,7,.42);
  border: 1px solid rgba(212,160,23,.28);
  border-radius: 999px;
  padding: 6px 12px;
}
.ghost-link:hover { color: #fff6d8; border-color: rgba(240,212,138,.55); }
.consult-page .nav-toggle {
  color: #f6e7c2;
  border-color: rgba(246,231,194,.4);
  background: rgba(16,10,7,.45);
}
.room-menu {
  right: 16px;
  top: calc(var(--hud-top) + 6px);
  z-index: 22;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(16,10,7,.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 210px;
}
.room-menu[hidden] { display: none !important; }
.room-menu a { color: var(--ink); padding: 6px 0; white-space: nowrap; }

.topic-rail {
  left: 10px;
  top: calc(var(--hud-top) + 8px);
  bottom: calc(var(--hud-bottom) + 18px);
  z-index: 14;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 52px;
  padding: 8px 6px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(24,16,10,.78), rgba(12,8,5,.5));
  border: 1px solid rgba(212,160,23,.28);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  transition: width .22s ease;
}
.topic-rail:hover,
.topic-rail:focus-within { width: 196px; }
.topic-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e6d3a8;
  font-size: .86rem;
  min-height: 40px;
  padding: 8px;
  border-radius: 12px;
  white-space: nowrap;
}
.topic-ico { width: 20px; height: 20px; flex: 0 0 20px; opacity: .88; }
.topic-item span {
  overflow: hidden;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .18s ease, transform .18s ease;
}
.topic-rail:hover .topic-item span,
.topic-rail:focus-within .topic-item span {
  opacity: 1;
  transform: none;
}
.topic-item.is-on {
  background: linear-gradient(180deg, #e8c96a, #b8892a);
  color: #2a1b0a;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(160,110,20,.28);
}
.topic-item.is-on .topic-ico { opacity: 1; }

.room-verse {
  z-index: 8;
  right: 18px;
  top: calc(var(--hud-top) + 10%);
  writing-mode: vertical-rl;
  font-family: var(--font-d);
  font-size: 1.18rem;
  letter-spacing: .42em;
  color: #f7ecd0;
  text-shadow: 0 2px 12px #000;
  line-height: 1.75;
  pointer-events: none;
  opacity: .72;
}

.room-main {
  left: var(--hud-side);
  right: 0;
  bottom: 0;
  z-index: 11;
  height: var(--hud-bottom);
  display: flex;
  align-items: stretch;
  padding: 0 var(--hud-inset) calc(10px + var(--safe-b));
  box-sizing: border-box;
}
.room-main::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 100%;
  height: 56px;
  background: linear-gradient(transparent, rgba(10,7,4,.55));
  pointer-events: none;
}
.room-error {
  position: absolute;
  left: 50%;
  bottom: calc(var(--hud-bottom) + 12px);
  transform: translateX(-50%);
  background: rgba(70,20,10,.9);
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 13;
}

.hud-panel,
.birth-dock, .pay-dock, .result-dock, .interpret-dock, .page-dock {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(#e8c96a, #e8c96a) left 10px top 10px / 12px 1.5px no-repeat,
    linear-gradient(#e8c96a, #e8c96a) left 10px top 10px / 1.5px 12px no-repeat,
    linear-gradient(#e8c96a, #e8c96a) right 10px top 10px / 12px 1.5px no-repeat,
    linear-gradient(#e8c96a, #e8c96a) right 10px top 10px / 1.5px 12px no-repeat,
    linear-gradient(#e8c96a, #e8c96a) left 10px bottom 10px / 12px 1.5px no-repeat,
    linear-gradient(#e8c96a, #e8c96a) left 10px bottom 10px / 1.5px 12px no-repeat,
    linear-gradient(#e8c96a, #e8c96a) right 10px bottom 10px / 12px 1.5px no-repeat,
    linear-gradient(#e8c96a, #e8c96a) right 10px bottom 10px / 1.5px 12px no-repeat,
    linear-gradient(180deg, rgba(20,13,8,.92), rgba(8,6,4,.96));
  border: 1px solid rgba(212,160,23,.4);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,220,140,.16);
  padding: 10px 14px 12px;
  backdrop-filter: blur(10px);
}
.birth-dock { display: grid; gap: 10px; }
.dock-steps {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.dock-steps button {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(212,160,23,.28);
  background: rgba(0,0,0,.28);
  color: #cbb894;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}
.dock-steps button.is-on {
  background: linear-gradient(180deg, #e8c96a, #b8892a);
  color: #2a1b0a;
  font-weight: 600;
  border-color: #f0d48a;
}
.dock-next { display: none; width: 100%; margin-top: 8px; }
.dock-track { display: contents; }

.topic-rail,
.dock-track,
.wheel,
.page-dock,
.result-dock,
.interpret-dock,
.pay-dock,
.chi-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 201, 106, .75) rgba(0, 0, 0, .22);
}
.topic-rail::-webkit-scrollbar,
.dock-track::-webkit-scrollbar,
.chi-grid::-webkit-scrollbar,
.page-dock::-webkit-scrollbar,
.wheel::-webkit-scrollbar {
  height: 5px;
  width: 5px;
}
.topic-rail::-webkit-scrollbar-thumb,
.dock-track::-webkit-scrollbar-thumb,
.chi-grid::-webkit-scrollbar-thumb,
.page-dock::-webkit-scrollbar-thumb,
.wheel::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #e8c96a, #b8892a);
  border-radius: 99px;
}
.topic-rail::-webkit-scrollbar-track,
.dock-track::-webkit-scrollbar-track,
.chi-grid::-webkit-scrollbar-track,
.page-dock::-webkit-scrollbar-track,
.wheel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, .22);
  border-radius: 99px;
}
.dock-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.dock-head strong { display: block; color: #f6e7c2; font-size: .95rem; }
.dock-head small { color: #cbb894; font-size: .72rem; }
.dock-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #e8c96a, #b8892a);
  color: #2a1b0a;
  font-weight: 700;
  font-size: .8rem;
}
.cal-toggle { display: flex; gap: 10px; margin-bottom: 6px; font-size: .82rem; color: var(--muted); }
.cal-toggle label { display: flex; gap: 6px; align-items: center; }
.cal-toggle input { width: auto; min-height: 16px; }
.wheels {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 8px;
  height: 88px;
}
.wheel {
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  border: 1px solid rgba(212,160,23,.22);
  border-radius: 12px;
  background: rgba(0,0,0,.28);
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
.wheel button {
  display: block;
  width: 100%;
  height: 32px;
  scroll-snap-align: center;
  background: none;
  border: 0;
  color: #b7a27a;
  font: inherit;
  cursor: pointer;
}
.wheel button.is-on {
  color: #f0d48a;
  background: rgba(212,160,23,.16);
  font-weight: 700;
}
.chi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.chi-chip { position: relative; margin: 0; }
.chi-chip input {
  position: absolute;
  inset: 0;
  opacity: 0.01;
  width: 100%;
  height: 100%;
  margin: 0;
  min-height: 0;
  cursor: pointer;
  z-index: 1;
}
.chi-chip span {
  display: block;
  text-align: center;
  border: 1px solid rgba(212,160,23,.28);
  border-radius: 10px;
  padding: 5px 3px 4px;
  color: #e6d3a8;
  line-height: 1.1;
  font-size: .82rem;
}
.chi-chip small { display: block; color: #8a7a60; font-size: .64rem; margin-top: 1px; }
.chi-chip input:checked + span,
.chi-chip input:focus-visible + span {
  background: linear-gradient(180deg, #e8c96a, #b8892a);
  color: #2a1b0a;
  border-color: #f0d48a;
}
.chi-chip input:checked + span small { color: #5a3d12; }
.tiny-check {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: .76rem;
  margin: 6px 0 0;
}
.tiny-check input { width: auto; min-height: 16px; }
.gender-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gender-tile { margin: 0; position: relative; }
.gender-tile input {
  position: absolute;
  inset: 0;
  opacity: 0.01;
  width: 100%;
  height: 100%;
  margin: 0;
  min-height: 0;
  cursor: pointer;
  z-index: 1;
}
.gender-tile span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  font-weight: 600;
}
.dock-gender.is-need .gender-tile span,
.gender-row:not(:has(input:checked)) .gender-tile span {
  outline: 2px dashed rgba(240,212,138,.85);
  outline-offset: 2px;
}
.gender-tile i { font-style: normal; font-size: 1.2rem; }
.gender-tile.nam span { background: #2b62c7; color: #fff; }
.gender-tile.nu span { background: #c4234a; color: #fff; }
.gender-tile input:checked + span { outline: 2px solid #f0d48a; outline-offset: 2px; }
.dock-go {
  width: 100%;
  margin-top: 6px;
  min-height: 44px;
  font-size: 1rem;
  border-radius: 12px;
}

.pay-grid { display: grid; gap: 12px; align-items: center; }
.pay-qr {
  width: min(180px, 50vw);
  height: auto;
  margin: 0 auto;
  background: #fff;
  padding: 8px;
  border-radius: 12px;
}
.pay-meta { margin: 0; }
.pay-meta div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid rgba(212,160,23,.18); }
.pay-meta dt { color: var(--muted); }
.pay-meta dd { margin: 0; color: #f6e7c2; }
.pay-meta code { color: #f0d48a; }

.consult-page .result-dock .badge { margin: 0 0 4px; }
.consult-page .result-dock .disclaimer {
  font-size: .7rem;
  line-height: 1.35;
  padding: 4px 8px;
  margin: 0 0 6px;
}
.consult-page .chart-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  height: calc(var(--hud-bottom) - 92px);
  min-height: 168px;
}
.consult-page .palace {
  background: rgba(247,232,196,.9);
  color: #3a2a16;
  border-color: rgba(90,60,20,.25);
  min-height: 0;
  padding: 3px 5px;
  overflow: hidden;
}
.consult-page .palace h2 { font-size: .74rem; margin: 0 0 1px; color: #6b3e10; line-height: 1.15; }
.consult-page .palace h2 small { font-weight: 500; opacity: .75; }
.consult-page .palace ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .64rem;
  line-height: 1.2;
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
}
.consult-page .palace-core { display: grid; place-items: center; text-align: center; }
.consult-page .palace-list { display: none; }
.consult-page .star-major { color: #8a4b12; font-weight: 700; }
.interpret-paper { background: rgba(247,232,196,.92); color: #3a2a16; max-height: calc(var(--hud-bottom) - 88px); overflow: auto; }
.interpret-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.interpret-ask .badge { margin: 0; }
.interpret-ask .btn, .interpret-ask form { margin: 0; }
.claim-list { color: var(--muted); font-size: .85rem; }

.page-dock { padding: 12px 16px 14px; }
.page-dock .page-wide,
.page-dock .page-narrow,
.page-dock .auth-card,
.page-dock .article-body {
  width: auto;
  max-width: none;
  margin: 0;
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}
.page-dock h1 { margin: 0 0 .35rem; font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
.page-dock h2 { font-size: 1.08rem; margin: .7rem 0 .3rem; }
.page-dock p { margin: 0 0 .55rem; font-size: .92rem; }
.page-dock label { display: block; margin: 0 0 8px; color: var(--muted); }
.page-dock input, .page-dock textarea {
  width: 100%;
  margin-top: 4px;
  background: rgba(0,0,0,.35);
  color: var(--ink);
  border: 1px solid rgba(212,160,23,.28);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
}
.page-dock .pkg-grid,
.page-dock .article-grid { margin-top: 6px; gap: 10px; }
.consult-page .pkg-card { padding: 12px; }
.consult-page .price { font-size: 1.4rem; }

@media (max-width: 1099px) {
  .room-verse { display: none; }
}

@media (max-width: 799px) {
  .consult-page {
    --hud-top: calc(46px + var(--safe-t));
    --hud-side: 0px;
    --hud-bottom: clamp(250px, 36svh, 310px);
    --hud-tabs: 0px;
    --hud-inset: 10px;
  }
  .consult-page { overflow: hidden; }
  .room { height: 100%; overflow: hidden; }
  .room-top { padding: 6px 10px; gap: 8px; }
  .room-brand small { display: none; }
  .room-brand strong { font-size: .95rem; letter-spacing: .08em; }
  .room-tools .ghost-link { display: none; }
  .consult-page .nav-toggle { display: grid; place-items: center; }
  .prop-plum { left: 2%; width: min(22vw, 88px); }
  .prop-censer { left: 24%; width: min(9vw, 40px); }
  .prop-tea { right: 1%; width: min(28vw, 110px); }
  .master-anchor { max-height: 58vh; }
  .consult-page .hud-speech {
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    top: auto;
    bottom: calc(var(--hud-bottom) + 14px);
    padding: 8px 12px;
    border-radius: 14px;
    max-height: 4.6rem;
    overflow: hidden;
  }
  .speech-tail { display: none; }
  .speech-body p { font-size: .78rem; }
  .speech-body p + p { display: none; }
  .speech-name { font-size: .95rem; margin: 0 1.2rem 2px 0; }

  .room-main {
    left: 10px;
    right: 10px;
    bottom: calc(8px + var(--safe-b));
    height: var(--hud-bottom);
    width: auto;
    padding: 12px 0 8px;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    background:
      linear-gradient(#e8c96a, #e8c96a) left 12px top 12px / 12px 1.5px no-repeat,
      linear-gradient(#e8c96a, #e8c96a) left 12px top 12px / 1.5px 12px no-repeat,
      linear-gradient(#e8c96a, #e8c96a) right 12px top 12px / 12px 1.5px no-repeat,
      linear-gradient(#e8c96a, #e8c96a) right 12px top 12px / 1.5px 12px no-repeat,
      linear-gradient(#e8c96a, #e8c96a) left 12px bottom 12px / 12px 1.5px no-repeat,
      linear-gradient(#e8c96a, #e8c96a) left 12px bottom 12px / 1.5px 12px no-repeat,
      linear-gradient(#e8c96a, #e8c96a) right 12px bottom 12px / 12px 1.5px no-repeat,
      linear-gradient(#e8c96a, #e8c96a) right 12px bottom 12px / 1.5px 12px no-repeat,
      linear-gradient(180deg, rgba(20,13,8,.94), rgba(8,6,4,.97));
    border: 1px solid rgba(212,160,23,.4);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,220,140,.16);
  }
  .room-main::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 99px;
    background: rgba(232, 201, 106, .5);
    pointer-events: none;
    z-index: 2;
  }
  .room-main::after { display: none; }

  .topic-rail {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: auto;
    height: 44px;
    flex: 0 0 44px;
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 12px;
    margin: 0;
    gap: 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid rgba(212,160,23,.18);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .topic-rail:hover,
  .topic-rail:focus-within { width: auto; }
  .topic-item {
    min-height: 36px;
    padding: 6px 10px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  .topic-item span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .topic-item.is-on span {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    overflow: visible;
    opacity: 1;
    transform: none;
    font-size: .72rem;
  }

  .hud-panel,
  .birth-dock, .pay-dock, .result-dock, .interpret-dock, .page-dock {
    flex: 1 1 auto;
    min-height: 0;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
    padding: 8px 12px 4px;
  }
  .birth-dock {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    padding-bottom: 2px;
  }
  .dock-steps {
    display: grid;
    flex: 0 0 auto;
    margin: 0;
  }
  .dock-steps button { min-height: 32px; font-size: .78rem; }
  .dock-next { display: none; }
  .dock-track {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 0;
  }
  .birth-dock .dock-col {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 2px 6px;
  }
  .dock-head small { display: none; }
  .wheels { height: 92px; }
  .chi-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0 8px;
    gap: 8px;
  }
  .chi-chip { flex: 0 0 76px; scroll-snap-align: start; }
  .chi-chip span { padding: 10px 6px 8px; }
  .page-dock {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
  }
  .page-dock .page-wide,
  .page-dock .page-narrow,
  .page-dock .auth-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
  }
  .page-dock h1 { font-size: 1.15rem; }
  .page-dock .page-wide > p,
  .page-dock .page-narrow > p {
    font-size: .78rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 .35rem;
  }
  .page-dock .disclaimer {
    font-size: .7rem;
    -webkit-line-clamp: 1;
    margin-bottom: .35rem;
  }
  .page-dock .pkg-grid,
  .page-dock .article-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 4px 2px 10px;
    margin-top: 4px;
  }
  .page-dock .pkg-card,
  .page-dock .article-card,
  .page-dock .article-grid > * {
    flex: 0 0 min(78vw, 280px);
    scroll-snap-align: start;
  }
  .consult-page .chart-board { display: none; }
  .consult-page .palace-list { display: grid; gap: 4px; }
  .consult-page .palace-row { background: rgba(247,232,196,.9); color: #3a2a16; padding: 6px 8px; border-radius: 8px; }
  .room-error { bottom: calc(var(--hud-bottom) + 10px); }
}

@media (min-width: 800px) {
  .birth-dock {
    grid-template-columns: .95fr 1.2fr 1.05fr;
    align-items: stretch;
  }
  .dock-gender {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(120px, .85fr);
    grid-template-areas: "head head head" "nam nu go";
    column-gap: 8px;
    row-gap: 6px;
    align-items: stretch;
  }
  .dock-gender .dock-head { grid-area: head; margin-bottom: 0; }
  .dock-gender .gender-row { display: contents; }
  .dock-gender .gender-tile.nam { grid-area: nam; }
  .dock-gender .gender-tile.nu { grid-area: nu; }
  .dock-gender .dock-go {
    grid-area: go;
    margin-top: 0;
    height: auto;
    min-height: 48px;
  }
  .chi-grid { grid-template-columns: repeat(6, 1fr); }
  .pay-grid { grid-template-columns: 180px 1fr; }
  .consult-page .nav-toggle { display: grid; place-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .consult-page .smoke-layer,
  .prop-censer::after { display: none; }
  .hud-speech.is-in { animation: none; }
  .topic-rail { transition: none; }
}
