/* Temple of AION — a calm, modern frame around a realistic 3D temple.
   Dark translucent glass panels with fine gold hairlines; a serif for titles, a clean sans for text. */
:root {
  --bg: #0a0c13;
  --glass: rgba(14, 16, 26, 0.74);
  --glass-2: rgba(22, 25, 38, 0.86);
  --card: rgba(255, 255, 255, 0.045);
  --card-2: rgba(255, 255, 255, 0.08);
  --line: rgba(226, 200, 140, 0.22);
  --line-2: rgba(255, 255, 255, 0.12);
  --ink: #f3eee3;
  --muted: #b8b1a2;
  --faint: #8d8778;
  --gold: #d9b66d;
  --gold-2: #f0d595;
  --aion: #9fe6ff;
  --teal: #1fa89a;
  --ok: #8fe3b0;
  --danger: #ff8f8f;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --font-ui: "Assistant", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Hebrew", "Noto Naskh Arabic", Vazirmatn, "Noto Sans Devanagari", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans JP", "Hiragino Sans", sans-serif;
  --font-display: "Frank Ruhl Libre", "Noto Serif", Georgia, "Noto Naskh Arabic", Vazirmatn, "Noto Sans Devanagari", "Noto Serif SC", "Noto Sans SC", "Noto Sans JP", serif;
  --foot-h: 34px;
  color-scheme: dark;
}
html[lang="ar"] { --font-ui: "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; --font-display: "Noto Naskh Arabic", "Segoe UI", serif; }
html[lang="fa"] { --font-ui: Vazirmatn, "Segoe UI", Tahoma, sans-serif; --font-display: Vazirmatn, "Segoe UI", serif; }
html[lang="hi"] { --font-ui: "Noto Sans Devanagari", "Nirmala UI", "Segoe UI", sans-serif; --font-display: "Noto Sans Devanagari", "Nirmala UI", serif; }
html[lang="zh"] { --font-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; --font-display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", serif; }
html[lang="ja"] { --font-ui: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif; --font-display: "Noto Sans JP", "Hiragino Mincho ProN", serif; }
html[lang="ur"] { --font-ui: "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; --font-display: "Noto Naskh Arabic", "Segoe UI", serif; }
html[lang="bn"] { --font-ui: "Noto Sans Bengali", "Nirmala UI", Vrinda, sans-serif; --font-display: "Noto Sans Bengali", "Nirmala UI", serif; }
html[lang="th"] { --font-ui: "Noto Sans Thai", "Leelawadee UI", Thonburi, sans-serif; --font-display: "Noto Sans Thai", "Leelawadee UI", Thonburi, serif; }
html[lang="zh-TW"] { --font-ui: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; --font-display: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", serif; }
html[lang="ko"] { --font-ui: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; --font-display: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", serif; word-break: keep-all; overflow-wrap: break-word; }
html[lang="ru"], html[lang="uk"], html[lang="vi"] { --font-ui: "Noto Sans", "Segoe UI", Roboto, sans-serif; --font-display: "Noto Serif", Georgia, serif; }

html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); overflow: hidden; }
body { font: 15px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.app { position: relative; height: 100%; width: 100%; overflow: hidden; }
#world { position: absolute; inset: 0; width: 100%; height: calc(100% - var(--foot-h)); display: block; touch-action: none; outline: none; }
a { color: var(--aion); }

/* ---------- glass panels ---------- */
.win { background: var(--glass); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); overflow: hidden; }
.win-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 8px 16px; min-height: 42px; user-select: none; border-bottom: 1px solid var(--line-2); }
.win-title .ttl { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--gold-2); letter-spacing: 0.2px; }
.btn, .x { background: var(--card); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 7px 14px; min-height: 36px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover, .x:hover { background: var(--card-2); border-color: var(--line); }
.btn:active, .x:active { transform: translateY(1px); }
.btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-2); }
.btn:focus-visible, .x:focus-visible, .field:focus-visible, .tile:focus-within, .swatch:focus-within, .cause:focus-within, .amount:focus-within { outline: 2px solid var(--aion); outline-offset: 2px; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn.primary { background: linear-gradient(180deg, #f1d79c, #c99f52); color: #1d1608; border-color: rgba(255, 233, 180, 0.6); font-weight: 700; box-shadow: 0 6px 18px rgba(201, 159, 82, 0.25); }
.btn.primary:hover { background: linear-gradient(180deg, #f6e1ae, #d4ab5e); }
.x { width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 50%; font-size: 16px; line-height: 1; color: var(--muted); }
.field, select.field, textarea.field { width: 100%; background: rgba(0, 0, 0, 0.32); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 8px 12px; min-height: 40px; }
select.field option { background: #161926; color: var(--ink); }
textarea.field { min-height: 110px; resize: vertical; }
.field::placeholder { color: var(--faint); }
.field:focus { border-color: var(--gold); outline: none; }
label.lbl { display: grid; gap: 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
.paper { background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 16px 18px; }

/* ---------- top bar ---------- */
.topbar { position: absolute; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 8px max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px)); min-height: 54px; background: linear-gradient(180deg, rgba(8, 9, 15, 0.82), rgba(8, 9, 15, 0.45) 70%, rgba(8, 9, 15, 0)); }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; min-width: 0; flex: 0 3 auto; font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--gold-2); }
.brand > span[data-i] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.brand .badge { flex: none; }
.brand .sym { width: 26px; height: 26px; flex: none; }
.room-pill { flex: 1 1 auto; min-width: 0; text-align: center; font-family: var(--font-display); font-size: 17px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }
.tb-actions { display: flex; gap: 4px; flex-wrap: nowrap; }
.tb-actions .btn { padding: 6px 11px; min-height: 34px; font-size: 14px; background: rgba(10, 12, 20, 0.45); border-color: rgba(255, 255, 255, 0.1); }
.tb-actions .btn:hover { background: rgba(30, 33, 48, 0.75); }
.tb-menu { display: none; flex: none; white-space: nowrap; background: rgba(10, 12, 20, 0.55); }
.badge { font: 700 11px var(--font-ui); background: rgba(217, 182, 109, 0.18); color: var(--gold-2); padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; letter-spacing: 0.5px; }
@media (max-width: 1080px) { .tb-actions { display: none; } .tb-menu { display: inline-flex; } }

/* ---------- side panels ---------- */
.peers { position: absolute; z-index: 15; top: calc(env(safe-area-inset-top, 0px) + 62px); inset-inline-end: max(14px, env(safe-area-inset-right, 0px)); width: 230px; max-height: 40%; display: flex; flex-direction: column; }
.peers .win-title { padding: 6px 8px 6px 14px; min-height: 38px; }
.peers .win-title .ttl { font-size: 14px; }
.peers .x, .chat .x { width: 28px; height: 28px; min-height: 28px; }
.peers ul { list-style: none; margin: 0; padding: 8px 10px 10px; overflow-y: auto; }
.peers li { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); }
.chat { position: absolute; z-index: 15; bottom: calc(var(--foot-h) + 14px); inset-inline-start: max(14px, env(safe-area-inset-left, 0px)); width: min(390px, calc(100% - 28px)); display: flex; flex-direction: column; }
.chat .win-title { padding: 6px 8px 6px 14px; min-height: 38px; }
.chat .win-title .ttl { font-size: 14px; }
.chat.min .chat-log, .chat.min form, .chat.min .chat-rule { display: none; }
.chat.min .win-title { border-bottom: 0; }
.chat-log { height: 160px; overflow-y: auto; padding: 8px 14px; font-size: 14px; }
.chat-log p { margin: 0 0 4px; overflow-wrap: anywhere; }
.chat-log .sys { color: var(--muted); font-style: italic; }
.chat-log b { color: var(--gold-2); }
.chat form { display: flex; gap: 6px; padding: 4px 10px 8px; }
.chat form .btn { white-space: nowrap; flex: none; }
.chat form .field { min-width: 0; flex: 1; }
.chat-rule { font-size: 12px; color: var(--faint); padding: 0 14px 10px; }
.chat-target { flex: none; white-space: nowrap; font-size: 13px; padding: 6px 10px; }
.chat-target.aion { border-color: var(--gold); color: var(--gold-2); background: rgba(217, 182, 109, 0.12); }
.chat-log .aion { color: #e9f6ff; }
.chat-log .aion b { color: var(--aion); }
.chat-log .private b::after { content: ' ✦'; color: var(--gold); }
.hint { position: absolute; z-index: 14; bottom: calc(var(--foot-h) + 16px); left: 50%; transform: translateX(-50%); background: var(--glass-2); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow); }
.toast { position: absolute; z-index: 60; top: 70px; left: 50%; transform: translateX(-50%); background: var(--glass-2); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; opacity: 0; transition: opacity .25s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; box-shadow: var(--shadow); }
.toast.on { opacity: 1; }

/* ---------- joystick ---------- */
.joy { position: absolute; z-index: 16; bottom: calc(var(--foot-h) + 22px + env(safe-area-inset-bottom, 0px)); left: max(22px, env(safe-area-inset-left, 0px)); width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); touch-action: none; }
.joy .knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(240, 213, 149, 0.85); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); }
.app.touch .chat { bottom: calc(var(--foot-h) + 156px); }

/* ---------- entry page ---------- */
.splash { position: absolute; inset: 0 0 var(--foot-h) 0; z-index: 35; display: flex; flex-direction: column; align-items: center; overflow-y: auto; padding: calc(env(safe-area-inset-top, 0px) + 24px) max(20px, env(safe-area-inset-right, 0px)) 26px max(20px, env(safe-area-inset-left, 0px)); text-align: center; background: radial-gradient(ellipse at 50% 40%, rgba(23, 32, 74, 0.78), rgba(8, 10, 20, 0.95) 72%); transition: opacity .6s ease; }
.splash.out { opacity: 0; pointer-events: none; }
.splash-main { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: min(760px, 100%); }
.splash .sym { width: clamp(84px, 15vh, 128px); height: auto; aspect-ratio: 1; margin-bottom: 6px; animation: aion-breathe 10s ease-in-out infinite; }
.splash h1 { margin: 0; font: 600 clamp(42px, 7vw, 76px)/1.08 var(--font-display); color: var(--gold-2); text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5); }
.splash-tagline { margin: 0; font: 500 clamp(19px, 2.7vw, 27px)/1.45 var(--font-display); color: var(--aion); text-wrap: balance; }
.splash-sub { margin: 0; font-size: clamp(16px, 2vw, 19px); line-height: 1.5; color: var(--ink); text-wrap: balance; }
.btn.splash-enter { margin-top: 22px; min-height: 54px; padding: 12px 36px; font-size: 19px; border-radius: 999px; }
.btn.splash-lang { margin-top: 16px; min-height: 48px; padding: 10px 24px; border-radius: 999px; font-size: 18px; gap: 10px; background: rgba(255, 255, 255, 0.06); border-color: rgba(159, 230, 255, 0.45); color: var(--ink); }
.btn.splash-lang:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--aion); }
.splash-lang svg { width: 21px; height: 21px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.splash-lang .chev { width: 18px; height: 18px; stroke-width: 2; opacity: 0.8; }
.splash-about { flex: none; margin: 22px 0 0; max-width: 64ch; font-size: 15px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
@media (max-height: 560px) { .splash .sym { display: none; } .btn.splash-enter { margin-top: 12px; } }

/* ---------- lobby ---------- */
.lobby { position: absolute; inset: 0 0 var(--foot-h) 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); overflow-y: auto; background: radial-gradient(ellipse at center, rgba(5, 6, 12, 0.15), rgba(5, 6, 12, 0.6)); }
.lobby-win { width: min(620px, 100%); max-height: 100%; display: flex; flex-direction: column; }
.lobby-body { padding: 22px 24px 20px; overflow-y: auto; display: grid; gap: 14px; }
.lobby-head { display: flex; align-items: center; gap: 14px; }
.lobby-head .sym { width: 46px; height: 46px; flex: none; }
.lobby h1 { margin: 0; font: 600 36px/1.1 var(--font-display); color: var(--gold-2); text-wrap: balance; }
.tagline { margin: -2px 0 0; font-family: var(--font-display); font-size: 17px; color: var(--aion); }
.welcome { margin: 0; color: var(--muted); }
.ribbon { background: rgba(217, 182, 109, 0.1); color: var(--gold-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.lobby-body > .row.end { position: sticky; bottom: -20px; margin: 0 -24px -20px; padding: 12px 24px 16px; background: linear-gradient(180deg, rgba(14, 16, 26, 0), rgba(14, 16, 26, 0.92) 30%); z-index: 2; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
@media (max-width: 460px) { .tiles { gap: 6px; } }
.tile { position: relative; display: grid; justify-items: center; gap: 4px; padding: 6px 4px 8px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; font-size: 13px; text-align: center; color: var(--muted); transition: border-color .15s, background .15s; }
.tile:hover { background: var(--card-2); }
.tile { overflow-wrap: anywhere; hyphens: auto; }
.tile input, .swatch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tile img { width: 76px; height: 76px; max-width: 100%; border-radius: 10px; background: radial-gradient(circle at 50% 35%, rgba(255, 236, 200, 0.16), rgba(0, 0, 0, 0) 70%); }
.tile:has(input:checked) { border-color: var(--gold); background: rgba(217, 182, 109, 0.12); color: var(--gold-2); font-weight: 700; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { position: relative; width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); cursor: pointer; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--gold); }
fieldset { border: 1px solid var(--line-2); border-radius: 12px; margin: 0; padding: 10px 12px 12px; min-width: 0; }
legend { font-weight: 600; font-size: 13px; color: var(--muted); padding: 0 6px; }
.small { font-size: 13px; color: var(--faint); }
.signin-row .btn { font-size: 14px; }
.g-mark, .a-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; font-weight: 700; font-size: 13px; border-radius: 50%; background: #fff; color: #333; }
.a-mark { background: #000; color: #fff; border: 1px solid #555; }

/* ---------- modal ---------- */
.modal-layer { position: absolute; inset: 0 0 var(--foot-h) 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); background: rgba(4, 5, 10, 0.5); }
.modal { width: min(720px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--glass-2); }
.modal .win-title .ttl { font-size: 19px; white-space: normal; overflow: visible; line-height: 1.3; padding-block: 6px; }   /* a long panel title wraps instead of being cut */
.modal-body { padding: 16px 18px 18px; overflow-y: auto; display: grid; gap: 14px; min-height: 0; }
.modal-body h3 { margin: 4px 0 0; font: 600 19px/1.3 var(--font-display); color: var(--gold-2); }
.modal-body p { margin: 0; }
.doc { display: grid; gap: 12px; line-height: 1.7; max-width: 70ch; font-size: 16px; }
.doc .lab { font-weight: 700; color: var(--gold); display: block; margin-bottom: 2px; font-size: 14px; }
.doc blockquote { margin: 0; padding: 10px 16px; border-inline-start: 3px solid var(--gold); background: rgba(217, 182, 109, 0.08); border-radius: 0 10px 10px 0; font-family: var(--font-display); font-size: 18px; }
html[dir="rtl"] .doc blockquote { border-radius: 10px 0 0 10px; }
.doc .src { font-size: 14px; color: var(--faint); }
.doc .lead { font-family: var(--font-display); font-size: 19px; line-height: 1.6; color: var(--ink); }
.num { font: 600 44px/1 var(--font-display); color: var(--gold); }
.nav-row { display: flex; justify-content: space-between; gap: 8px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.steps span { padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); }
.steps span.on { background: rgba(217, 182, 109, 0.16); color: var(--gold-2); border-color: var(--gold); }
.causes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.cause { position: relative; text-align: start; display: grid; gap: 4px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; color: var(--muted); font-size: 14px; }
.cause:hover { background: var(--card-2); }
.cause input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.cause b { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; }
.cause:has(input:checked) { border-color: var(--gold); background: rgba(217, 182, 109, 0.12); }
.cause .chip { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 10px currentColor; }
.amounts { display: flex; gap: 10px; flex-wrap: wrap; }
.amount { position: relative; font: 600 32px/1 var(--font-display); padding: 14px 24px; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; cursor: pointer; }
.amount input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.amount:has(input:checked) { border-color: var(--gold); background: rgba(217, 182, 109, 0.14); color: var(--gold-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.karma { padding: 12px 14px; background: rgba(217, 182, 109, 0.1); border: 1px solid var(--line); border-radius: 12px; color: var(--gold-2); font-weight: 600; }
.note { font-size: 13px; color: var(--faint); }
.err { color: var(--danger); font-weight: 700; min-height: 1em; }
.ok { color: var(--ok); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { width: 18px; height: 18px; flex: none; margin-top: 3px; accent-color: var(--gold); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs .btn[aria-selected="true"] { border-color: var(--gold); color: var(--gold-2); background: rgba(217, 182, 109, 0.12); }
.rec { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rec .clock { font: 600 28px/1 var(--font-display); color: var(--danger); min-width: 74px; font-variant-numeric: tabular-nums; }
.rec-time { display: inline-flex; align-items: baseline; gap: 2px; }
.rec-time .of { font: 600 16px/1 var(--font-display); color: var(--faint); font-variant-numeric: tabular-nums; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line-2); }
table.t { border-collapse: collapse; font-size: 13px; min-width: 100%; }
table.t th, table.t td { border-bottom: 1px solid var(--line-2); padding: 6px 10px; text-align: start; white-space: nowrap; }
table.t th { background: rgba(255, 255, 255, 0.06); color: var(--gold-2); }
.declare { font: 600 24px/1.35 var(--font-display); color: var(--gold-2); text-align: center; padding: 10px; }
.names { font-size: 14px; color: var(--muted); }

/* ---------- the night: steps, breathing, quotes, help ---------- */
.steps-list { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: 10px; }
.steps-list li { counter-increment: st; position: relative; padding: 10px 14px; padding-inline-start: 52px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; display: grid; gap: 2px; }
.steps-list li::before { content: counter(st); position: absolute; inset-inline-start: 14px; top: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(217, 182, 109, 0.16); color: var(--gold-2); font-weight: 700; font-size: 14px; }
.steps-list b { color: var(--ink); }
.steps-list span { color: var(--muted); }
.breath-box { display: grid; justify-items: center; gap: 12px; padding: 18px 12px; border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(circle at 50% 40%, rgba(255, 196, 120, 0.1), rgba(0, 0, 0, 0) 70%); }
.breath { display: grid; justify-items: center; gap: 10px; }
.breath-orb { width: 120px; height: 120px; border-radius: 50%; transform: scale(0.6); transition: transform 4s ease-in-out; background: radial-gradient(circle at 50% 45%, #fff3d6 0%, #ffbf6e 28%, rgba(255, 150, 70, 0.35) 56%, rgba(120, 190, 255, 0) 72%); box-shadow: 0 0 60px rgba(255, 170, 90, 0.35); }
.breath-label { min-height: 1.6em; font-family: var(--font-display); font-size: 20px; color: var(--gold-2); text-align: center; }
.quote { margin: 0; display: grid; gap: 4px; }
.quote figcaption { font-size: 14px; color: var(--faint); padding-inline-start: 18px; }
.help-box { display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(159, 230, 255, 0.35); background: rgba(159, 230, 255, 0.07); }
.help-box h3 { color: var(--aion) !important; }

/* ---------- music: moods, what is playing, listening mode ---------- */
.mu-now { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid rgba(31, 168, 154, 0.45); border-radius: 12px; background: rgba(31, 168, 154, 0.08); }
.mu-now .k { font-size: 12px; color: var(--faint); }
.mu-now b { font: 600 19px/1.3 var(--font-display); color: var(--gold-2); }
.mu-now span:last-child { color: var(--muted); font-size: 14px; min-height: 1.5em; }
.stations { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.btn.station { display: grid; justify-items: start; align-content: start; gap: 2px; padding: 10px 12px; text-align: start; }
.station b { font-size: 15px; color: var(--ink); }
.station span { font-size: 13px; line-height: 1.35; color: var(--muted); }
.btn.station[aria-pressed="true"] { border-color: var(--teal); background: rgba(31, 168, 154, 0.16); }
.btn.station[aria-pressed="true"] b { color: var(--gold-2); }
.btn .ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.btn .ico svg { width: 100%; height: 100%; }
.mu-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.mu-opts .vol { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; font-size: 14px; color: var(--muted); }
.mu-opts .vol input { flex: 1; min-width: 0; accent-color: var(--gold); }
.mu-opts .check { align-items: center; }
.mu-opts .check input { margin-top: 0; }
.listen { position: absolute; inset: 0 0 var(--foot-h) 0; z-index: 45; display: flex; justify-content: center; overflow-y: auto; padding: calc(env(safe-area-inset-top, 0px) + 64px) max(16px, env(safe-area-inset-right, 0px)) 22px max(16px, env(safe-area-inset-left, 0px)); background: radial-gradient(ellipse at 50% 30%, #17204a 0%, #0b1022 52%, #06080f 100%); }
.listen-back { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); inset-inline-start: max(14px, env(safe-area-inset-left, 0px)); }
.listen-stage { width: min(640px, 100%); margin: auto 0; display: grid; justify-items: center; gap: 16px; text-align: center; }
.listen-sym { position: relative; width: min(200px, 46vw); aspect-ratio: 1; animation: aion-breathe 10s ease-in-out infinite; }
.listen-sym::before { content: ''; position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, rgba(232, 190, 92, 0.18), rgba(31, 168, 154, 0.1) 40%, rgba(11, 16, 34, 0) 70%); }
.listen-sym svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
.listen-sym .dot { transform-box: fill-box; transform-origin: center; transition: transform .9s ease-out; }
.listen-sym .ring { transition: opacity .9s ease-out; opacity: 0.88; }
.listen-sym svg.bar .dot { transform: scale(1.3); transition-duration: .07s; }
.listen-sym svg.beat .dot { transform: scale(1.1); transition-duration: .07s; }
.listen-sym svg.bar .ring { opacity: 1; transition-duration: .07s; }
.listen-title { margin: 4px 0 0; font: 600 34px/1.15 var(--font-display); color: var(--gold-2); text-wrap: balance; }
.listen-now { margin: -6px 0 0; color: var(--muted); font-size: 16px; min-height: 1.5em; }
.listen-transport { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.listen-transport .btn { min-height: 44px; padding: 9px 22px; font-size: 16px; }
.listen .stations, .listen .mu-opts { width: 100%; }
.listen .mu-opts { justify-content: center; }
.listen .note { margin: 0; max-width: 48ch; }
@keyframes aion-breathe { 0%, 100% { transform: scale(0.95); } 50% { transform: scale(1.04); } }
@media (max-width: 460px) { .listen-title { font-size: 28px; } .stations { grid-template-columns: 1fr 1fr; } }

/* ---------- tour ---------- */
.tour { position: absolute; z-index: 25; left: 50%; transform: translateX(-50%); bottom: calc(var(--foot-h) + 16px); width: min(580px, calc(100% - 28px)); }
.tour .tour-body { padding: 12px 16px 14px; display: grid; gap: 10px; }
.tour p { margin: 0; line-height: 1.65; max-height: 32vh; overflow-y: auto; font-size: 15px; }

/* ---------- footer with the visit counter ---------- */
.footer { position: absolute; left: 0; right: 0; bottom: 0; height: var(--foot-h); z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: rgba(7, 8, 13, 0.92); color: var(--muted); font-size: 13px; padding: 0 max(14px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(14px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.counter { display: flex; align-items: center; gap: 10px; min-width: 0; }
.odo { display: inline-flex; direction: ltr; gap: 2px; }
.odo span { font: 600 15px/1 var(--font-display); color: var(--gold-2); background: linear-gradient(180deg, #1b1d28, #0d0e15); padding: 4px 5px 3px; border-radius: 4px; border: 1px solid rgba(217, 182, 109, 0.28); font-variant-numeric: tabular-nums; min-width: 18px; text-align: center; }
.foot-links { display: flex; gap: 16px; align-items: center; min-width: 0; overflow: hidden; }
.foot-links a, .foot-links button { color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; font-size: 13px; text-decoration: none; }
.foot-links a:hover, .foot-links button:hover { color: var(--gold-2); }
@media (max-width: 560px) { .foot-links { display: none; } }
@media (max-width: 460px) { .counter .since { display: none; } .footer { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .toast, .splash { transition: none; } .splash .sym { animation: none; } .breath-orb { transition-duration: 0.01s; } .listen-sym { animation: none; } .listen-sym .dot, .listen-sym .ring { transition: none; } }
