:root {
  color-scheme: dark;
  --bg: #131312;
  --panel: #22201d;
  --line: #4b453d;
  --ink: #ebe4d6;
  --muted: #c0b7a8;
  --gold: #c4a780;
  --soft: #ead1b1;
  --display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at top, #24221f, var(--bg) 45rem); color: var(--ink); font: 15px/1.65 var(--sans); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.22; }
:focus-visible { outline: 2px solid var(--soft); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 10; top: 10px; left: 10px; background: var(--ink); color: var(--bg); border-radius: 6px; padding: 8px 12px; transform: translateY(-160%); }
.skip:focus { transform: none; }
.shell, .header-inner { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid #99887435; background: #161514f2; }
.header-inner { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; justify-self: start; white-space: nowrap; font: 700 22px/1.08 var(--display); letter-spacing: .07em; }
.brand small { display: block; margin-top: 5px; font: 600 8px/1.1 var(--sans); color: var(--gold); letter-spacing: .19em; }
.main-nav { display: flex; gap: clamp(12px, 3vw, 42px); }
.main-nav a { display: grid; align-items: center; min-height: 44px; color: var(--muted); border-bottom: 1px solid transparent; font-size: 14px; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--soft); border-color: #ab8166; }
.header-tools { display: flex; gap: 11px; justify-self: end; align-items: center; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #252320; color: var(--soft); }
.icon-button:hover { background: #37332e; }
.icon-button svg, .button svg, .status-icon svg { width: 18px; height: 18px; }
.visitor { background: #322923; border-color: #836552; }
#content { min-height: calc(100vh - 180px); padding-top: 27px; padding-bottom: 52px; }

.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .17em; }
.eyebrow { font-weight: 600; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 45px; padding: 9px 19px; border: 1px solid #a597858e; border-radius: 8px; background: #1d1c1acf; color: var(--ink); line-height: 1.35; font-weight: 650; transition: background .18s, border-color .18s; }
.button:hover { background: #3a3530; border-color: var(--gold); }
.button.primary { border-color: var(--gold); background: #d8bf9e; color: #28201a; }
.button.primary:hover { background: #ead3b8; }

.temple-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.temple-heading h1 { margin-top: 5px; font-size: clamp(37px, 5vw, 56px); letter-spacing: .09em; }
.temple-hint { margin: 7px 0 15px; color: var(--muted); }
.temple-host { display: flex; align-items: center; gap: 10px; padding-bottom: 4px; }
.temple-host-portrait { width: 51px; height: 51px; border: 1px solid #887866; border-radius: 50%; object-fit: cover; object-position: 79% 19%; }
.temple-host small, .temple-host strong { display: block; white-space: nowrap; }
.temple-host small { color: var(--gold); font-size: 10px; letter-spacing: .12em; }
.temple-host strong { font: 700 17px/1.2 var(--display); }
.temple-stage { position: relative; isolation: isolate; width: 100%; aspect-ratio: 9 / 5; max-height: max(380px, calc(100svh - 248px)); overflow: hidden; border: 1px solid #776d61; border-radius: 16px; background: #292622; }
.temple-backdrop { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.temple-stage::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #181512a0 0%, #18151218 29%, transparent 60%); pointer-events: none; }
.temple-map { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.temple-destination { position: absolute; left: var(--place-x); top: var(--place-y); display: grid; align-content: center; justify-items: center; gap: 3px; min-width: 52px; min-height: 52px; padding: 1px 4px; border-radius: 6px; transform: translate(-50%, -50%); color: #f4debd; text-align: center; white-space: nowrap; pointer-events: auto; touch-action: manipulation; }
.temple-pin { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #c4a77d; border-radius: 50%; background: #251f17e8; box-shadow: 0 0 0 3px #ddbd8e38, 0 2px 11px #0007; }
.temple-pin svg { width: 16px; height: 16px; }
.temple-label { padding: 2px 8px; border: 1px solid #a88a67; border-radius: 4px; background: #201b16f0; font-size: 13px; line-height: 1.35; font-weight: 650; }
.temple-destination[data-destination="door"] .temple-label { font-family: var(--display); font-size: 16px; }
.temple-destination:hover .temple-pin, .temple-destination:focus-visible .temple-pin, .temple-destination[data-arriving] .temple-pin { border-color: #ffdb9d; background: #594028; box-shadow: 0 0 0 4px #ddbd8e60, 0 0 18px #dca45f80; }
.temple-destination:focus-visible { outline-offset: 1px; }
.temple-walker { position: absolute; z-index: 1; left: var(--walk-x, 65%); top: var(--walk-y, 96%); display: grid; justify-items: center; width: clamp(60px, 8vw, 99px); padding: 0; border: 0; border-radius: 8px; background: transparent; transform: translate(-50%, -100%); filter: drop-shadow(0 4px 5px #000c); transition: left .43s ease-out, top .43s ease-out; }
.temple-walker img { width: 100%; height: auto; }
.temple-walker span { padding: 1px 6px; border: 1px solid #8a7260; border-radius: 4px; background: #231e1aef; color: var(--soft); font-size: 11px; white-space: nowrap; }
.temple-walker.walking { pointer-events: none; }
.temple-walker.walking img { animation: temple-step .16s ease-in-out 3; }
@keyframes temple-step { 50% { transform: translateY(-5px) rotate(-3deg); } }
.page-head h1 { margin-top: 6px; font-size: clamp(32px, 5vw, 46px); font-weight: 700; letter-spacing: .035em; }
.page-head > p:last-child { color: var(--muted); }
.page-head { margin: 10px 0 23px; }
.page-head > p:last-child { margin-top: 11px; }

.breadcrumb { display: inline-block; margin-bottom: 15px; color: var(--soft); }
.room-scene { position: relative; isolation: isolate; min-height: clamp(390px, 42vw, 510px); display: grid; align-items: end; border: 1px solid #777067; border-radius: 17px; overflow: hidden; background: var(--room-color); }
.room-scene::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #181614f5, #1816146b 26%, transparent 64%), linear-gradient(90deg, #18161465, transparent 55%); }
.room-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 64% 15%; }
.room-heading { padding: 30px; }
.room-heading h1 { font-size: clamp(44px, 7vw, 76px); margin: 5px 0 9px; }
.room-heading > p:last-child { color: #eae1d1; font-size: 15px; }
.room-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-block: 20px; }
.status-icon { display: inline-flex; gap: 9px; align-items: center; color: var(--muted); font-size: 13px; }
.status-icon svg { color: var(--gold); }
.wall-layout { display: grid; grid-template-columns: minmax(270px,.8fr) minmax(0,1.2fr); gap: 19px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 22px; }
.panel h2 { font-size: 26px; margin-bottom: 14px; }
.wall-identity, .wish-person { display: flex; gap: 9px; align-items: center; color: var(--soft); font-weight: 600; }
.wall-identity { margin-bottom: 14px; }
.wall-identity button { margin-left: auto; border: 0; background: none; padding: 9px; color: var(--soft); text-decoration: underline; }
.wall-identity img, .wish-person img { width: 37px; height: 37px; background: #3a332c; border-radius: 50%; }
.wish-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.wish { border: 1px solid #b6a28b49; border-radius: 9px; background: #292521; padding: 13px 15px; }
.wish time { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; }
.wish > p { margin-top: 7px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.wish small { color: var(--gold); }
.helper, .wall-status { color: var(--muted); font-size: 13px; margin: 9px 0; }
.error { color: #f7b3a3; }
.field-label { display: block; margin: 0 0 6px; color: var(--soft); font-weight: 600; }
input:not([type=radio]), textarea { display: block; width: 100%; border: 1px solid #827568; border-radius: 7px; background: #1a1816; padding: 11px 12px; color: var(--ink); }
textarea { resize: vertical; min-height: 90px; }
input::placeholder, textarea::placeholder { color: #a89e92; }
.meditation { display: grid; justify-items: center; text-align: center; padding: clamp(22px, 5vw, 51px) 18px; background: radial-gradient(ellipse at 50% 50%, #38332e, #221f1d 68%); }
.meditation .page-head { margin-top: 0; }
.breath-wrap { display: grid; place-items: center; width: 200px; height: 200px; margin-block: 5px 12px; }
.breath-orb { display: grid; place-items: center; width: 151px; height: 151px; border: 1px solid #ccab89; border-radius: 50%; background: radial-gradient(circle, #cdad8b26, #b8ac9c14); box-shadow: 0 0 0 13px #b8ac9c10, 0 0 0 24px #b8ac9c0b, 0 0 52px #dfbb9227; color: var(--soft); font-family: var(--display); font-size: 23px; }
.breath-wrap.running .breath-orb { animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.17); } }
.timer-display { font-size: 42px; line-height: 1.1; font-variant-numeric: tabular-nums; margin-bottom: 13px; }
.timer-options, .timer-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 12px; }
.timer-options button[aria-pressed=true] { border-color: var(--gold); color: var(--soft); }
.dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); margin: auto; padding: 22px; border: 1px solid #927863; border-radius: 14px; background: #29241f; color: var(--ink); }
.dialog::backdrop { background: #0b0a09d4; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog h2 { font-size: 28px; margin-top: 5px; }
.dialog-copy { color: var(--muted); margin-bottom: 12px; }
.close { font-size: 27px; }
.avatar-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin-bottom: 18px; }
.avatar-choice { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 88px; padding: 5px 2px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; background: #24201c; font-size: 12px; text-align: center; }
.avatar-choice:has(input:checked) { border-color: var(--gold); background: #42342c; color: var(--soft); }
.avatar-choice:focus-within { outline: 2px solid var(--soft); }
.avatar-choice img { width: 55px; height: 55px; }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.prayer-log { margin-top: 17px; color: var(--muted); font-size: 13px; }
.prayer-log summary { cursor: pointer; }
.prayer-log li { overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 8; bottom: 20px; left: 50%; width: max-content; max-width: calc(100% - 24px); transform: translateX(-50%); border: 1px solid var(--gold); border-radius: 9px; background: #352b23; color: var(--ink); box-shadow: 0 10px 34px #0008; padding: 11px 16px; }
.footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 15px; align-items: center; min-height: 71px; color: var(--muted); font-size: 12px; }
.footer span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); }
@media (max-width: 900px) {
  .shell, .header-inner { width: calc(100% - 44px); }

}
@media (max-width: 610px) {
  .shell, .header-inner { width: calc(100% - 26px); }
  .header-inner { grid-template-columns: 1fr 1fr; gap: 0 8px; padding-top: 7px; }
  .brand { font-size: 20px; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: 4px; }
  .main-nav a { padding-inline: 8px; }
  #content { padding-top: 13px; padding-bottom: 32px; }

  .temple-heading { gap: 7px; }
  .temple-heading h1 { font-size: 38px; }
  .temple-host { gap: 6px; padding-bottom: 2px; }
  .temple-host-portrait { width: 38px; height: 38px; }
  .temple-host strong { font-size: 14px; }
  .temple-hint { margin: 7px 0 11px; font-size: 13px; }
  .temple-stage { aspect-ratio: 3 / 2; max-height: none; border-radius: 11px; }
  .temple-destination { gap: 1px; min-width: 44px; min-height: 44px; padding-inline: 2px; }
  .temple-pin { width: 21px; height: 21px; }
  .temple-pin svg { width: 12px; height: 12px; }
  .temple-label { padding: 1px 4px; font-size: 11px; }
  .temple-destination[data-destination="door"] .temple-label { font-size: 13px; }
  .temple-walker { width: 52px; }
  .temple-walker span { padding-inline: 3px; font-size: 10px; }
  .room-scene { min-height: 342px; }
  .room-art { object-position: 66% 33%; }
  .room-heading { padding: 17px; }
  .wall-layout { grid-template-columns: 1fr; }
  .panel { padding: 15px; }
  .footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.wall-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 10px; }
.wall-heading .button { min-height: 38px; padding: 6px 13px; }
.deity-art-fallback { object-position: center; }

.brand img { opacity: .92; }
.room-avatar { position: absolute; right: 27px; bottom: 23px; width: clamp(57px, 8vw, 92px); padding: 0; border: 0; border-radius: 50%; background: transparent; filter: drop-shadow(0 6px 8px #0009); }
.room-heading { padding-right: clamp(75px, 12vw, 150px); }
@media (max-width: 610px) { .room-avatar { right: 12px; bottom: 15px; } }

@media (max-width: 360px) { .main-nav a { padding-inline: 3px; font-size: 13px; } }
