:root {
  color-scheme: light;
  /* warm paper, shared with 本命小靈's cream pages (was a cool grey #F2F2F6) */
  --bg: #F6F1EA; --bg2: #ECE5DA;
  --surface: rgba(255,253,250,.88); --surface-solid: #FFFDFA; --surface-2: #FAF6F0;
  --ink: #1F1B18; --ink-2: #585049; --ink-3: #655C54;
  --hair: rgba(63,45,34,.10); --hair-2: rgba(63,45,34,.055);
  --accent: #086A51; --accent-soft: rgba(11,122,94,.10); --on-accent: #FFFFFF;
  --sand: #7A5818; --sand-soft: rgba(184,144,79,.16);
  --bubble-in: #EDE7DF; --bubble-out: #086A51; --on-out: #FFFFFF;
  --ok: #166C3B; --ok-soft: rgba(30,142,78,.12);
  --danger: #B4271F; --danger-soft: rgba(214,54,47,.10);
  --male: #1F58B5; --male-soft: rgba(47,111,209,.12); --female: #A92D63; --female-soft: rgba(214,83,138,.12);
  --none-bg: #FFFFFF; --none-ink: #3A3A42; --none-line: rgba(28,28,33,.22);
  --shadow: 0 18px 40px -18px rgba(20,24,40,.28);
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="dark"] { /* deep indigo night, not black; chosen in 我的 → 外觀 */
  color-scheme: dark;
  --bg: #151933; --bg2: #1C2142; --surface: rgba(36,42,76,.82); --surface-solid: #222849; --surface-2: #2A3157;
  --ink: #F3F0EA; --ink-2: #B9B6C9; --ink-3: #9C99B0; --hair: rgba(255,255,255,.10); --hair-2: rgba(255,255,255,.06);
  --accent: #4FD1AA; --accent-soft: rgba(79,209,170,.15); --on-accent: #062A20;
  --sand: #E3BD84; --sand-soft: rgba(227,189,132,.15); --bubble-in: #2C335A; --bubble-out: #1B7A5E; --on-out: #FFFFFF;
  --ok: #5CD08C; --ok-soft: rgba(92,208,140,.15); --danger: #FF7A72; --danger-soft: rgba(255,122,114,.15);
  --male: #A9C8FF; --male-soft: rgba(127,176,255,.16); --female: #FFB4D4; --female-soft: rgba(255,147,193,.16);
  --none-bg: #F4F4F7; --none-ink: #1C1C21; --none-line: rgba(255,255,255,.4); --shadow: 0 18px 40px -18px rgba(0,0,0,.55);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
:root:lang(ja) { --sys: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", Meiryo, sans-serif; } /* (日本語: Japanese glyph shapes, not the Taiwan ones) */
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--sys); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
h2 { font-size: 22px; letter-spacing: -.01em; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.muted { color: var(--ink-2); }
.small { font-size: 13px; color: var(--ink-3); }

/* ---------- app frame ---------- */
#app { height: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; position: relative; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.top { padding: calc(var(--top) + 14px) 18px 10px; display: flex; align-items: center; gap: 10px; }
.top h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.top-text h2 { overflow-wrap: anywhere; }
.body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px calc(var(--bottom) + 96px); display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.body > * { flex-shrink: 0; }
.body { overscroll-behavior-y: contain; } /* (a swipe past the end stays in the list: chained to the page, which can't scroll, iPhone held the next swipe) */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(560px, 100%); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 8px calc(var(--bottom) + 6px); background: var(--surface); backdrop-filter: saturate(170%) blur(20px); -webkit-backdrop-filter: saturate(170%) blur(20px); border-top: 1px solid var(--hair); z-index: 5; }
.tab { border: 0; background: none; display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 11px; color: var(--ink-3); border-radius: 12px; min-height: 48px; position: relative; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--accent); }
.tab .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* ---------- controls ---------- */
.btn { border: 0; border-radius: 14px; min-height: 48px; padding: 12px 18px; font-weight: 600; background: var(--accent); color: var(--on-accent); width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { min-height: 38px; padding: 8px 14px; width: auto; border-radius: 12px; font-size: 14px; white-space: nowrap; flex: none; }
.icon-btn { border: 0; background: var(--surface-2); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.seg { display: flex; padding: 3px; border-radius: 12px; background: var(--hair); gap: 2px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 7px 10px; font-size: 14px; color: var(--ink-2); min-height: 36px; }
@media (max-width: 380px) { .seg button { padding: 7px 5px; font-size: 13px; } }
.seg.lang button { white-space: nowrap; flex: 0 0 auto; } /* (中文 / EN / 日本語: each on one line) */
.seg button[aria-pressed="true"] { background: var(--surface-solid); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.field { display: grid; gap: 6px; }
.input, textarea.input { width: 100%; border: 1px solid var(--hair); background: var(--surface-solid); border-radius: 12px; padding: 12px 14px; min-height: 48px; }
.input::placeholder { color: var(--ink-3); }
.row { display: flex; align-items: center; gap: 10px; }
.row:has(> .btn ~ .btn) { align-items: stretch; } /* (buttons side by side: one height, whichever wraps in a longer language; 2026-11-02) */
/* the member market buttons: wrap whole buttons, never inside a label */
.mkt-btns { flex-wrap: wrap; }
.mkt-btns .btn { flex: 1 1 auto; width: auto; white-space: nowrap; padding-inline: 14px; }
.between { justify-content: space-between; }
.hint { font-size: 13px; color: var(--ink-2); min-height: 1.2em; }
.hint.error { color: var(--danger); }
.card { background: var(--surface-solid); border: 1px solid var(--hair-2); border-radius: 18px; padding: 16px; display: grid; gap: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.group { background: var(--surface-solid); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--hair); background: var(--surface-2); border-radius: 999px; padding: 5px 11px; font-size: 13px; color: var(--ink-2); }
button.chip { min-height: 38px; padding: 7px 13px; }
button.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.chip .x { margin-left: 4px; border: 0; background: none; padding: 0 2px; color: var(--ink-3); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.switch { width: 52px; height: 32px; border-radius: 16px; border: 0; background: var(--hair); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:disabled { opacity: .4; }

/* ---------- identity ---------- */
.g { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.g-m { background: var(--male-soft); color: var(--male); }
.g-f { background: var(--female-soft); color: var(--female); }
.g-x { background: var(--none-bg); color: var(--none-ink); border: 1px solid var(--none-line); }
.avatar { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 0; padding: 0; }
.avatar i { width: 16px; height: 16px; border-radius: 50%; background: currentColor; opacity: .65; }
.avatar.g-m { background: var(--male-soft); color: var(--male); }
.avatar.g-f { background: var(--female-soft); color: var(--female); }
.avatar.g-x { background: var(--none-bg); color: var(--none-ink); border: 1px solid var(--none-line); }
.avatar { position: relative; } .avatar.live::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px var(--surface-solid, #fff); }
.live-tag { font-size: 12px; font-weight: 700; color: #15803d; display: inline-flex; align-items: center; gap: 4px; } .live-tag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.chip.title { background: linear-gradient(135deg, rgba(234, 179, 8, .22), rgba(249, 115, 22, .14)); color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px rgba(217, 165, 32, .45); }
.chip.trait { background: linear-gradient(135deg, rgba(139, 92, 246, .14), rgba(236, 72, 153, .12)); color: var(--ink); font-weight: 600; }
.item .main .tr, .chat-top .who .tr { display: block; font-size: 12px; color: #7c3aed; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="dark"] .item .main .tr, :root[data-theme="dark"] .chat-top .who .tr { color: #c4b5fd; }
.headline { font-size: 17px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }

/* ---------- welcome ---------- */
.wel-what { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.inapp-card { display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: #fff3e0; border: 2px solid #e8892a; text-align: center; }
.inapp-card b { font-size: 18px; color: #8a3a0a; }
.inapp-card p { margin: 0; font-size: 14px; line-height: 1.55; color: #4a2a10; }
.inapp-card .btn { font-size: 17px; min-height: 50px; }
.wel-invite { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; text-align: left; padding: 10px; border-radius: 16px; background: #1e1410; color: #f3e6cf; border: 1px solid #d8b04a; }
.wel-invite img { width: 96px; height: 75px; object-fit: cover; border-radius: 10px; }
.wel-invite b { display: block; font-size: 15px; line-height: 1.4; }
.wel-invite p { margin: 4px 0 0; color: #e6d6b8; }
.wel-item { display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center; }
.wel-item img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(40,26,14,.18)); }
.wel-item small { font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.welcome { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: calc(var(--top) + 24px) 24px calc(var(--bottom) + 24px); }
.logo { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow); }
.wel-who { color: var(--ink-2); line-height: 1.6; }
.wel-trust { text-align: left; padding: 12px 16px; border-radius: 16px; background: var(--ok-soft); color: var(--ink); font-size: 14px; line-height: 1.6; }
.wel-trust ul { margin: 6px 0 0; padding-left: 0; list-style: none; }
.wel-trust li { padding-left: 22px; position: relative; color: var(--ink-2); }
.wel-trust li::before { content: '✓'; position: absolute; left: 2px; color: var(--ok); font-weight: 700; }
.wel-links a { color: var(--accent); text-decoration: none; font-weight: 600; }
.gsi { min-height: 44px; display: flex; justify-content: center; }
.lang { align-self: flex-end; width: 150px; }

/* ---------- lists ---------- */
.list { background: var(--surface-solid); border-radius: 16px; overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: none; width: 100%; text-align: left; min-height: 64px; }
.item + .item { border-top: 1px solid var(--hair-2); }
.item .main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 26px 16px; text-align: center; color: var(--ink-3); font-size: 15px; }
.count { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 13px; }

/* ---------- chat ---------- */
.chat-top { padding: calc(var(--top) + 8px) 12px 8px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--hair); background: var(--surface); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.chat-top .who { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-top .who small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.b { max-width: 78%; padding: 9px 13px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; }
.b.in { align-self: flex-start; background: var(--bubble-in); border-bottom-left-radius: 6px; }
.b.out { align-self: flex-end; background: var(--bubble-out); color: var(--on-out); border-bottom-right-radius: 6px; }
.b.out.pending { opacity: .6; }
.sys { align-self: center; font-size: 12px; color: var(--ink-3); background: var(--surface-2); padding: 4px 10px; border-radius: 999px; text-align: center; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 8px 10px calc(var(--bottom) + 8px); border-top: 1px solid var(--hair); background: var(--surface); }
.composer textarea { flex: 1; resize: none; max-height: 140px; min-height: 44px; border-radius: 22px; padding: 11px 16px; border: 1px solid var(--hair); background: var(--surface-solid); }
.send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.send svg { width: 20px; height: 20px; fill: currentColor; }
.send:disabled { opacity: .4; }

/* ---------- sheets & overlays ---------- */
/* A sheet never grows past the visible screen (dvh follows the phone's address bar; vh does not, which used to push
   the top of a long sheet off screen), scrolls on its own, and the page behind it doesn't scroll along. */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.38); display: flex; align-items: flex-end; justify-content: center; z-index: 20; overflow: hidden; overscroll-behavior: contain; padding-top: calc(var(--top) + 12px); }
.sheet { width: min(560px, 100%); max-height: 88vh; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; align-content: start; scrollbar-width: thin; background: var(--surface-solid); border-radius: 22px 22px 0 0; padding: 10px 18px calc(var(--bottom) + 18px); display: grid; gap: 12px; }
.sheet::-webkit-scrollbar { width: 4px; }
.sheet::-webkit-scrollbar-thumb { background: var(--hair); border-radius: 2px; }
body.sheet-open .body { overflow: hidden; }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--hair); justify-self: center; margin-bottom: 4px; }
.sheet ul { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 6px; }
.doc-body { display: grid; gap: 12px; font-size: 15px; color: var(--ink-2); }
.doc-body b { color: var(--ink); display: block; margin-bottom: 2px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom) + 88px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-size: 14px; z-index: 40; max-width: calc(100% - 32px); text-align: center; }
.invite-pop { position: fixed; left: 12px; right: 12px; top: calc(var(--top) + 10px); max-width: 536px; margin: 0 auto; z-index: 30; background: var(--surface-solid); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); display: grid; gap: 10px; border: 1px solid var(--hair); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.ad { display: grid; gap: 12px; text-align: center; }
.ad-creative { border: 1px dashed var(--hair); border-radius: 16px; padding: 22px 14px; display: grid; gap: 10px; justify-items: center; background: var(--surface-2); }
.ad-tag { justify-self: start; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--sand-soft); color: var(--sand); }
.words { margin: 0; padding: 0 0 0 26px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; font-size: 16px; }
.words li { padding: 4px 0; border-bottom: 1px solid var(--hair-2); }
.soon { display: grid; gap: 8px; padding: 20px; border-radius: 18px; background: var(--surface-solid); }
.soon-tag { justify-self: start; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--sand-soft); color: var(--sand); }
.mono { font-family: var(--mono); }
.link-row { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; background: none; padding: 12px 0; min-height: 44px; text-align: left; }
.link-row + .link-row { border-top: 1px solid var(--hair-2); }
.danger-link { border: 0; background: none; color: var(--danger); padding: 14px; font-weight: 600; }
.install { display: grid; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); }
/* (2026-11-26: the app-wide reduced-motion stop is gone: the owner's phone very likely has Reduce Motion on, and it froze every game; watching things move is the content) */
@media (min-width: 700px) { body { background: radial-gradient(900px 500px at 50% -10%, var(--bg2), var(--bg) 70%) fixed, var(--bg); } }

/* ---------- 射龍門 ---------- */
.felt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 22px 16px; border-radius: 22px;
  background: radial-gradient(120% 90% at 50% 0%, #1f6b52, #0d3b2d 70%); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), var(--shadow); justify-items: center; }
.pcard { width: min(92px, 26vw); aspect-ratio: 5 / 7; border-radius: 12px; background: #fdfdfb; color: #16181c; display: grid; place-items: center; align-content: center; gap: 2px;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.45); font-family: var(--sys); max-width: 100%; }
.pcard .r { font-size: 26px; font-weight: 700; line-height: 1; }
.pcard .s { font-size: 22px; line-height: 1; }
.pcard.red { color: #c0273b; }
.pcard.back { background: repeating-linear-gradient(45deg, #2a3b8f 0 6px, #22327a 6px 12px); border: 3px solid #fdfdfb; }
.pcard.slot.back { background: rgba(255,255,255,.08); border: 2px dashed rgba(255,255,255,.35); box-shadow: none; }
.pcard.flip { animation: flip .45s ease-out; }
@keyframes flip { from { transform: rotateY(90deg) scale(.9); } to { transform: none; } }
.g-result { min-height: 1.4em; text-align: center; font-weight: 700; font-size: 18px; }
.g-result.win { color: var(--ok); } .g-result.lose, .g-result.post { color: var(--danger); }
.g-controls { display: grid; gap: 10px; }
.ok-text { color: var(--ok); }
.item.me { background: var(--accent-soft); }
.tab { font-size: 10.5px; }

/* ---------- two-step verification ---------- */
.code-in { font-size: 26px; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.pill { border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 600; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.recovery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-size: 17px; text-align: center; }
.recovery span { background: var(--surface-2); border-radius: 10px; padding: 10px 6px; letter-spacing: .06em; }

/* ---------- game rooms ---------- */
.item.room .count { font-size: 15px; color: var(--ink-2); }
.item.room .count.full { color: var(--danger); }
.seats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.seat { background: var(--surface-solid); border: 1px solid var(--hair-2); border-radius: 14px; padding: 8px 6px; display: grid; justify-items: center; gap: 4px; min-height: 92px; align-content: start; }
.seat .hl { font-size: 11px; color: var(--ink-2); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.seat b { font-size: 13px; }
.seat.empty { background: transparent; border-style: dashed; color: var(--ink-3); font-size: 12px; place-items: center; align-content: center; }
.seat.me { border-color: var(--accent); }
.seat.turn { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.g-turn { font-size: 15px; font-weight: 600; text-align: center; min-height: 1.4em; color: var(--ink-2); }
.g-turn.mine { color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); min-height: 32px; }
/* keep the bet buttons clear of the tab bar when scrolled into view */
.g-controls { scroll-margin-bottom: calc(var(--bottom) + 96px); }
.g-controls .btn { scroll-margin-bottom: calc(var(--bottom) + 96px); }
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pack { border: 1px solid var(--hair); background: var(--surface-2); color: var(--ink); border-radius: 14px; padding: 12px 8px; display: grid; gap: 2px; justify-items: center; min-height: 64px; }
.pack b { font-size: 18px; }
.seat { position: relative; }
.seat .banker { position: absolute; top: 4px; left: 4px; font-size: 11px; font-weight: 700; color: var(--on-accent); background: var(--sand); border-radius: 6px; padding: 1px 5px; }
/* 雙龍門: two gates, one above the other */
.felt.double { grid-template-columns: 1fr; gap: 10px; padding: 14px 12px; }
.felt.double .gate { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 8px; align-items: center; justify-items: center; }
.felt.double .gate-label { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.8); writing-mode: vertical-rl; }
.felt.double .pcard { width: min(72px, 21vw); }
.install-trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.install-trust li::before { content: '✓ '; color: var(--accent); font-weight: 700; }
.install-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.install-steps .ios-share { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drop-bar { height: 10px; border-radius: 6px; background: var(--hair); overflow: hidden; }
.drop-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sand), var(--accent)); border-radius: 6px; }
/* TKL in chat */
.tkl-btn { border: 0; background: var(--sand-soft); color: var(--sand); font-weight: 800; font-size: 12px; border-radius: 12px; min-width: 44px; height: 40px; flex: none; }
.b.tkl-card { display: grid; gap: 6px; min-width: 200px; border: 1px solid var(--sand-soft); }
.b.tkl-card .btn.small { justify-self: start; }
.b.tkl-card .tkl-status { margin: 0; }
.b.out.tkl-card .tkl-status { color: var(--on-out); opacity: .85; }
.item .badge.unread { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
/* Every tap shows at once, even while the network answers (Taiwan → US edge is ~0.3–0.6 s a round trip). */
button, .btn, a.btn { touch-action: manipulation; transition: transform .08s ease, opacity .08s ease, filter .08s ease; }
button:not(:disabled):active, a.btn:active { transform: scale(.96); opacity: .8; }
.tab:active { transform: scale(.92); }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ---------- 算命 ---------- */
.game-seg { margin: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
.game-seg::-webkit-scrollbar { display: none; }
.game-seg button { flex: 1 0 auto; white-space: nowrap; padding-inline: 8px; }
.fate-btn { font-size: 15px; }
.fate-form { display: grid; gap: 12px; }
.fate-field { display: grid; gap: 6px; }
.fate-other { display: grid; gap: 10px; }
.fate-tabs { background: none; padding: 0; border-radius: 0; border-bottom: 1px solid var(--hair); gap: 0; }
.fate-tabs button { white-space: nowrap; font-size: 14px; padding: 8px 2px; border-radius: 0; min-height: 40px; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.fate-tabs button[aria-pressed="true"] { background: none; box-shadow: none; color: var(--accent); border-bottom-color: var(--accent); }
.fate-pro-head { display: grid; gap: 2px; margin-top: 6px; }
.fate-pro-head h3 { margin: 0; font-size: 20px; }
.fate-intro { margin: 0 2px; line-height: 1.55; }
.fate-ly { gap: 8px; }
.bz-grid { display: grid; grid-template-columns: 3.4em repeat(4, minmax(0, 1fr)); gap: 4px 6px; align-items: center; text-align: center; }
.bz-head { font-size: 13px; font-weight: 700; color: var(--ink-2); padding-bottom: 2px; }
.bz-label { font-size: 12px; color: var(--ink-3); text-align: left; white-space: nowrap; }
.bz-cell { min-width: 0; overflow-wrap: anywhere; }
.bz-cell.small { font-size: 12.5px; color: var(--ink-2); }
.bz-cell.stack { display: grid; gap: 1px; font-size: 11.5px; color: var(--ink-2); line-height: 1.35; }
.bz-hid i { font-style: normal; font-weight: 700; margin-right: 2px; }
.bz-ch { font-size: 26px; line-height: 1.15; display: block; }
.bz-cell .bz-ch { background: var(--surface-2); border-radius: 10px; padding: 4px 0; }
.bz-god { font-size: 12.5px; color: var(--ink-2); }
.bz-god.me { color: var(--accent); font-weight: 700; }
.bz-luck { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.bz-dy { flex: none; display: grid; justify-items: center; gap: 1px; width: 58px; padding: 6px 0; border-radius: 12px; background: var(--surface-2); }
.bz-dy .bz-ch { font-size: 20px; }
.bz-dy.now { outline: 2px solid var(--accent); background: var(--accent-soft); }
button.zw-cell { border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.fate-content { display: grid; gap: 12px; }
.fate-kv { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.fate-kv b { text-align: right; }
.fate-big { font-size: 22px; }
.fate-hero { grid-template-columns: minmax(96px, 36%) 1fr; align-items: start; }
.fate-hero-text { display: grid; gap: 6px; min-width: 0; }
.bodygraph { width: 100%; height: auto; max-width: 180px; }
.bodygraph .ch { stroke: var(--hair); stroke-width: 2; }
.bodygraph .ch.on { stroke: var(--ink-2); stroke-width: 3; }
.bodygraph .ctr { fill: var(--surface-2); stroke: var(--ink-3); stroke-width: 1.2; }
.bodygraph .ctr.on { fill: var(--sand); stroke: var(--sand); }
.bodygraph .ctr.on.c-sacral, .bodygraph .ctr.on.c-heart { fill: var(--danger); stroke: var(--danger); }
.bodygraph .ctr.on.c-g, .bodygraph .ctr.on.c-head { fill: var(--accent); stroke: var(--accent); }
.pc-life { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.pc-life p { margin: 0 0 4px; }
.pc-num { font-size: 48px; line-height: 1; color: var(--accent); min-width: 1.1em; text-align: center; font-variant-numeric: tabular-nums; }
.pc-adult { --peach: #C2456E; --peach-soft: rgba(194,69,110,.10); border: 1px solid var(--peach-soft); }
.pc-adult .label { color: var(--peach); }
.pc-adult p { margin: 0; }
.pc-meter { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.pc-ring { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--peach) calc(var(--v) * 1%), var(--hair) 0); }
.pc-ring > div { width: 80px; height: 80px; border-radius: 50%; background: var(--surface-solid); display: grid; place-items: center; align-content: center; text-align: center; line-height: 1.1; }
.pc-ring b { font-size: 30px; color: var(--peach); font-variant-numeric: tabular-nums; }
.pc-style { font-size: 19px; }
.pc-count { font-size: 22px; color: var(--peach); font-variant-numeric: tabular-nums; }
.fate-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fate-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.fate-table td { padding: 4px 4px; border-top: 1px solid var(--hair-2); }
.fate-big3 { display: grid; gap: 2px; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.pillar { display: grid; gap: 2px; background: var(--surface-2); border-radius: 12px; padding: 8px 0; }
.pillar b { font-size: 24px; }
.el-wood { color: #2E7D32; } .el-fire { color: #C62828; } .el-earth { color: #8D6E2F; } .el-metal { color: #607080; } .el-water { color: #1F58B5; }
.el-bars { display: grid; gap: 6px; }
.el-bar { display: grid; grid-template-columns: 3.5em 1fr 1.5em; gap: 8px; align-items: center; }
.el-bar i { display: block; height: 10px; border-radius: 5px; background: var(--hair); position: relative; overflow: hidden; }
.el-bar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--f) * 100%); border-radius: 5px; background: currentColor; }
.bg-wood { color: #2E7D32; } .bg-fire { color: #C62828; } .bg-earth { color: #8D6E2F; } .bg-metal { color: #607080; } .bg-water { color: #1F58B5; }
.zw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; font-size: 12px; }
.zw-cell { background: var(--surface-solid); border-radius: 8px; padding: 5px; min-height: 86px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.zw-cell.ming { outline: 2px solid var(--accent); }
.zw-stars { display: grid; gap: 1px; }
.zw-stars b { font-size: 12px; }
.zw-foot { display: flex; justify-content: space-between; gap: 2px; }
.zw-name { font-weight: 700; color: var(--sand); }
.zw-center { grid-column: 2 / span 2; grid-row: 2 / span 2; background: var(--surface-2); border-radius: 8px; padding: 8px; display: grid; gap: 4px; align-content: center; font-size: 13px; }
.fate-dirs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.fate-dirs div { background: var(--surface-2); border-radius: 10px; padding: 6px 0; display: grid; }
.fate-score { display: grid; justify-items: center; }
.fate-score b { font-size: 48px; color: var(--accent); line-height: 1.1; }
.fate-card .btn { margin-top: 6px; }
.fate-share { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
:root[data-theme="dark"] .el-wood, :root[data-theme="dark"] .bg-wood { color: #66BB6A; } :root[data-theme="dark"] .el-fire, :root[data-theme="dark"] .bg-fire { color: #EF5350; } :root[data-theme="dark"] .el-earth, :root[data-theme="dark"] .bg-earth { color: #D4A76A; } :root[data-theme="dark"] .el-metal, :root[data-theme="dark"] .bg-metal { color: #A0B0C0; } :root[data-theme="dark"] .el-water, :root[data-theme="dark"] .bg-water { color: #64A0F0; }
/* ---------- 放置 ---------- */
.idle-card { justify-items: center; text-align: center; }
.idle-clock { font-size: 40px; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--accent); }
.idle-bar { width: 100%; height: 12px; border-radius: 6px; background: var(--hair); overflow: hidden; }
.idle-bar i { display: block; height: 100%; width: calc(var(--f) * 100%); background: var(--accent); border-radius: 6px; transition: width .9s linear; }
.game-seg button { font-size: 13px; }
.trial-hero { background: linear-gradient(135deg, var(--accent-soft), var(--sand-soft)), var(--surface-solid); border: 1px solid var(--accent-soft); }
.trial-hero .trial-title { font-size: 20px; }
/* iPhone Safari gives date/time inputs their own minimum width (they ignore width:100% and spill out of the
   card); strip the native look and let them shrink like any other field. */
input[type="date"].input, input[type="time"].input { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; text-align: left; line-height: 1.3; }
input[type="date"].input::-webkit-date-and-time-value, input[type="time"].input::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
.fate-form, .fate-field, .fate-other { min-width: 0; }
.fate-field select.input { max-width: 100%; }
/* 射龍門 hand log */
.g-log { display: grid; gap: 6px; }
.g-logline { display: grid; gap: 4px; padding: 8px 10px; border-radius: 12px; background: var(--surface-solid); font-size: 13px; }
.g-logline.me { outline: 1.5px solid var(--accent-soft); }
.g-logcards { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.pcard.mini { width: 26px; height: 36px; font-size: 11px; border-radius: 5px; }
.pcard.mini .s { font-size: 10px; }
.pcard.mini.mid { outline: 2px solid var(--sand); }
.g-arrow { color: var(--ink-3); padding: 0 2px; }
.swap-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
#swapOpen { display: inline-grid; place-items: center; text-decoration: none; }

/* 雙龍門: one button per kind of room (the mode is fixed when the room is made) */
.pick3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pick2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kind { border: 0; border-radius: 14px; min-height: 64px; padding: 10px 6px; background: var(--accent); color: var(--on-accent); display: grid; align-content: center; justify-items: center; gap: 3px; text-align: center; }
.kind b { font-size: 15px; line-height: 1.2; }
.kind .small { color: inherit; opacity: .8; font-size: 11.5px; line-height: 1.25; }
.kind:disabled { opacity: .45; cursor: not-allowed; }
.g-mode { font-weight: 600; color: var(--ink); }
.g-modes { display: grid; gap: 6px; }

/* 配對 result: overall rank, one bar per system, reasons marked good / hard */
.fate-score { grid-auto-flow: column; justify-content: center; align-items: center; gap: 14px; }
.fate-score > span { display: grid; gap: 2px; }
.fate-band { font-weight: 700; font-size: 17px; color: var(--ink); }
.fate-parts { display: grid; gap: 8px; }
.fate-part { display: grid; grid-template-columns: 5.5em 1fr 2.2em; align-items: center; gap: 10px; }
.fate-part b { text-align: right; font-variant-numeric: tabular-nums; }
.fate-bar { height: 8px; border-radius: 4px; background: var(--hair); overflow: hidden; }
.fate-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.fate-why { margin: 0; color: var(--ink-2); line-height: 1.5; }
.fate-why.good::first-letter { color: var(--ok); }
.fate-why.hard::first-letter { color: var(--danger); }

/* 用 USDT 買 TKL */
#buyCard .row .input { flex: 1; min-width: 0; }
/* 台幣 ATM 買 TKL (js/twd.js) */
.twd-read { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; }
.twd-pct { font-size: 15px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; }
.twd-tkl { font-size: 22px; font-variant-numeric: tabular-nums; }
.twd-nt { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.twd input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; --fill: 25%; }
.twd input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--hair) var(--fill)); }
.twd input[type=range]::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--hair) var(--fill)); }
.twd input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: var(--surface-solid); border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.twd input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-solid); border: 3px solid var(--accent); }
.twd-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.twd-amt-row { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; } .twd-amt-row .twd-amt { flex: 1; min-width: 0; font-size: 24px; min-height: 54px; }
.twd-chips:has(.chip[data-nt]) { grid-template-columns: repeat(3, 1fr); }
.twd-get { margin: 0; } .twd-get .twd-tkl { font-size: 18px; }
.twd-chips .chip { min-height: 44px; }
.twd-chips .chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.twd-field { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.twd-big { font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; letter-spacing: .02em; }
.buy-status.twd-sent { color: var(--ok); }
.buy-status.twd-expired, .buy-status.twd-rejected { color: var(--danger); }
.pill.twd-sent { background: var(--ok-soft); color: var(--ok); }
.pill.twd-open, .pill.twd-issued, .pill.twd-paid, .pill.twd-review { background: var(--accent-soft); color: var(--accent); }
.pill.twd-expired, .pill.twd-rejected { background: var(--hair); color: var(--ink-3); }
.buy-amount { font-size: 22px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.buy-status { font-weight: 600; margin: 0; }
.buy-status.buy-sent { color: var(--ok); }
.buy-status.buy-expired { color: var(--danger); }
.pill.buy-sent { background: var(--ok-soft); color: var(--ok); }
.pill.buy-open, .pill.buy-paid { background: var(--accent-soft); color: var(--accent); }
.pill.buy-expired { background: var(--hair); color: var(--ink-3); }
.buy-order { width: 100%; text-align: left; border: 0; background: none; font: inherit; color: inherit; }

/* ---------- 人格測驗 ---------- */
.p-quiz { display: grid; gap: 14px; }
.p-progress i { transition: width .2s ease; }
.p-pic { display: block; width: 100%; height: auto; aspect-ratio: 608 / 416; border-radius: 14px; object-fit: cover; background: var(--hair); }
.p-q { font-size: 19px; font-weight: 650; line-height: 1.45; min-height: 3.2em; margin: 6px 0; text-wrap: balance; }
.p-scale { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.p-dot { border: 2px solid var(--hair); background: transparent; border-radius: 50%; padding: 0; flex: none; transition: transform .08s ease, background .12s ease; }
.p-dot.s3 { width: 44px; height: 44px; } .p-dot.s2 { width: 38px; height: 38px; } .p-dot.s1 { width: 32px; height: 32px; } .p-dot.s0 { width: 26px; height: 26px; }
.p-dot.pos { border-color: var(--accent); } .p-dot.neg { border-color: var(--sand); }
.p-dot[aria-checked="true"].pos, .p-dot[aria-checked="true"].s0 { background: var(--accent); }
.p-dot[aria-checked="true"].neg { background: var(--sand); }
.p-ends span { color: var(--ink-3); }
.p-hero { justify-items: center; text-align: center; }
.p-art { all: unset; display: block; width: min(100%, 300px); border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--hair); margin-bottom: 6px; }
.p-art img { display: block; width: 100%; height: auto; aspect-ratio: 624 / 912; object-fit: cover; }
.p-art:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.p-zoom { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 10px;
  padding: calc(var(--top) + 12px) 16px calc(var(--bottom) + 16px); background: rgba(10, 8, 18, .92); color: #fff; text-align: center; cursor: zoom-out; }
.p-zoom img { min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; }
.p-zoom-x { position: absolute; top: calc(var(--top) + 10px); right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 18px; cursor: pointer; }
.p-code { font-size: 40px; letter-spacing: .04em; color: var(--accent); line-height: 1.1; }
.p-name { font-size: 18px; font-weight: 700; }
.p-bars { display: grid; gap: 12px; }
.p-bar { display: grid; gap: 4px; }
.p-bar .label { font-size: 11px; }
.p-win { font-weight: 700; color: var(--ink); }
.p-track { position: relative; height: 8px; border-radius: 4px; background: var(--hair); }
.p-track::before { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--ink-3); opacity: .5; }
.p-track i { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; }
.p-track i.l { right: 50%; } .p-track i.r { left: 50%; }
.p-right { text-align: right; }
.fate-pals { gap: 8px; }
.fate-pals-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; text-align: center; }
.fate-pal { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.fate-pal b { font-size: 14px; }
.fate-pals-mid { display: grid; justify-items: center; gap: 2px; text-align: center; }
.fate-pair-icon { font-size: 26px; line-height: 1; }
.fate-pair-name { font-size: 15px; white-space: nowrap; }
.fate-hearts { color: #e0577a; letter-spacing: 1px; font-size: 16px; white-space: nowrap; }
.fate-pals-mini { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; }
.fate-pals-mini .fate-hearts { font-size: 13px; }

/* ---------- 我的: the round button at the top right of each tab ---------- */
.me-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; background: none; flex: none; display: grid; place-items: center; }
.me-btn .avatar { width: 38px; height: 38px; pointer-events: none; box-shadow: 0 0 0 2px var(--surface-solid), 0 2px 8px -2px rgba(0,0,0,.25); }
.me-btn[aria-current="page"] .avatar { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--accent); }
.me-btn > svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.out-head .me-btn { margin-left: auto; }

/* ---------- 今日 (web/js/today.js) ---------- */
.td-page { display: grid; gap: 12px; }
.td-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 2px 2px 0; }
.td-hero b { font-size: 20px; }
.td-hero span { color: var(--ink-2); font-size: 14px; }
.td-text { font-size: 15px; }
.td-go { color: var(--accent); font-weight: 600; font-size: 14px; white-space: nowrap; }
.td-bday { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--hair); text-align: left;
  background: linear-gradient(135deg, rgba(255,166,193,.22), rgba(255,214,140,.22)); color: var(--ink); font-size: 15px; font-weight: 600; }
.td-bday.today { background: linear-gradient(135deg, rgba(255,120,160,.35), rgba(255,200,110,.35)); }
.td-ask .row { gap: 8px; }
.td-sel { width: auto; min-width: 74px; padding-right: 8px; }
.td-ask b, .td-remind b { font-size: 15px; }
.td-remind .btn { justify-self: start; }
.td-notify { display: grid; gap: 12px; }
.fo-qian { gap: 10px; }
#fortuneSeg { margin: 0 16px 8px; overflow-x: auto; scrollbar-width: none; }
#fortuneSeg button { flex: none; }
/* 出去玩 as a tab: its page fills the screen above the tab bar */
.out-host { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: calc(var(--bottom) + 64px); }
:root[data-theme="dark"] .pc-adult { --peach: #F07AA0; --peach-soft: rgba(240,122,160,.16); }
:root[data-theme="dark"] .pc-adult { --peach: #F07AA0; --peach-soft: rgba(240,122,160,.16); }
.mmo-art { display: flex; justify-content: center; align-items: flex-end; height: 120px; margin: -4px 0 4px; }
.mmo-art img { width: 110px; height: 110px; object-fit: contain; margin: 0 -14px; }
.mmo-art img:nth-child(2) { width: 124px; height: 124px; position: relative; z-index: 1; }

/* ---------- 功能首頁 (web/js/hub.js): picture cards for everything in 占卜 / 遊戲 / 出去玩 ---------- */
.hub-body { padding-top: 0; }
.hub { padding: 0 16px calc(28px + var(--bottom)); }
.hub-lead { color: var(--ink-2); font-size: 15px; line-height: 1.5; margin: 0 2px 6px; }
.hub-group { margin-top: 20px; }
.hub-h { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--ink-3); margin: 0 2px 10px; }
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hub-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  min-height: 156px; padding: 14px 14px 13px; border: 0; border-radius: 22px; text-align: left; color: #FFFFFF;
  box-shadow: 0 14px 28px -18px rgba(40,26,14,.55), inset 0 0 0 1px rgba(255,255,255,.08); transition: transform .18s ease, box-shadow .18s ease; }
.hub-card:active { transform: scale(.975); }
@media (hover: hover) { .hub-card:hover { transform: translateY(-2px); box-shadow: 0 20px 34px -18px rgba(40,26,14,.6), inset 0 0 0 1px rgba(255,255,255,.1); } }
.hub-card.feature, .hub-card.wide { grid-column: 1 / -1; min-height: 196px; }
.hub-card.wide { min-height: 132px; }
.hub-art { position: absolute; inset: 0; z-index: -1; }
.hub-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 38%, rgba(0,0,0,.34) 100%); }
.hub-art > svg { position: absolute; right: -6px; top: -4px; width: 104px; height: 104px; fill: none; stroke: rgba(255,255,255,.88); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 6px 14px rgba(0,0,0,.18)); }
.hub-card.feature .hub-art > svg { width: 150px; height: 150px; right: 8px; top: 6px; }
.hub-art > .hub-icon { position: absolute; right: 2px; top: 2px; width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0,0,0,.3)); }
.hub-card.feature .hub-art > .hub-icon { width: 160px; height: 160px; right: 6px; top: 50%; transform: translateY(-50%); }
.hub-card.feature:has(.hub-icon) .hub-text { max-width: 56%; }
.hub-img { position: absolute; bottom: 0; right: 0; height: 100%; width: 72%; object-fit: cover; object-position: center 18%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); }
.hub-card:not(.feature) .hub-img { width: 100%; -webkit-mask-image: none; mask-image: none; object-position: center 22%; }
.hub-card:has(.hub-img):not(.feature) .hub-art::after { background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(20,12,8,.72) 100%); }
.hub-card.art-cream:has(.hub-img), .hub-card.art-cream:has(.hub-img) .hub-text b { color: #FFFFFF; text-shadow: 0 1px 10px rgba(0,0,0,.3); }
.hub-img.n3 { width: 40%; height: 100%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%, #000 80%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 30%, #000 80%, transparent 100%); }
.hub-img.n3.i0 { right: 34%; z-index: 1; } .hub-img.n3.i1 { right: -3%; z-index: 2; } .hub-img.n3.i2 { right: 15%; z-index: 3; height: 106%; bottom: -6%; }
.hub-card.feature:has(.n3) .hub-text { max-width: 46%; }
.hub-text { position: relative; display: grid; gap: 3px; }
.hub-card.feature .hub-text, .hub-card.wide .hub-text { max-width: 64%; }
.hub-text b { font-size: 18px; font-weight: 800; letter-spacing: .01em; text-shadow: 0 1px 10px rgba(0,0,0,.22); }
.hub-card.feature .hub-text b { font-size: 24px; }
.hub-text small { font-size: 12.5px; line-height: 1.38; opacity: .92; }
.hub-badge { position: absolute; top: 12px; left: 12px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; background: rgba(255,255,255,.94); color: #A92D63; box-shadow: 0 4px 12px -4px rgba(0,0,0,.25); }
.hub-badge.b-isNew { color: #086A51; }
/* the looks (each card its own painted colour) */
.art-night .hub-art { background: radial-gradient(120% 90% at 85% 10%, #C78BE0 0, rgba(199,139,224,0) 55%), linear-gradient(150deg, #22164B, #4B2F8C 60%, #7A4FB8); }
.art-zhunti .hub-art { background: linear-gradient(150deg, #fbd3dd, #f4a9bf 60%, #e3869f); } .art-zhunti .hub-img { object-position: 50% 30%; } /* (準提堂: soft pink, 2026-11-25) */
.art-temple .hub-art { background: radial-gradient(110% 80% at 90% 0, #F2B544 0, rgba(242,181,68,0) 55%), linear-gradient(150deg, #7E1717, #B5362A 60%, #D6672F); }
.art-cream .hub-art { background: linear-gradient(150deg, #FBF1E3, #F4DCC4); }
.art-cream, .art-cream .hub-text b { color: #3A2A1E; text-shadow: none; } .art-cream .hub-art::after { background: none; }
.art-navy .hub-art { background: radial-gradient(110% 80% at 90% 0, #4FA3C4 0, rgba(79,163,196,0) 55%), linear-gradient(150deg, #0D2340, #1B4772 60%, #2D6E96); }
.art-mint .hub-art { background: radial-gradient(110% 80% at 90% 0, #9BE3C6 0, rgba(155,227,198,0) 55%), linear-gradient(150deg, #0A5546, #138466 60%, #2FA982); }
.art-peach .hub-art { background: radial-gradient(110% 90% at 85% 10%, #FFC2CF 0, rgba(255,194,207,0) 55%), linear-gradient(150deg, #8E1F48, #C8436F 60%, #E8789B); }
.art-mmo .hub-art { background: radial-gradient(90% 90% at 75% 20%, #E59AC3 0, rgba(229,154,195,0) 55%), linear-gradient(150deg, #161C2B, #2E2654 55%, #6B3E70); }
.art-felt .hub-art { background: radial-gradient(110% 80% at 90% 0, #57C08B 0, rgba(87,192,139,0) 55%), linear-gradient(150deg, #083A2C, #0F5E43 60%, #1E7F57); }
.art-arcade .hub-art { background: radial-gradient(100% 80% at 90% 0, #F5CE45 0, rgba(245,206,69,0) 50%), linear-gradient(150deg, #150F36, #2E2378 60%, #4B37A8); }
.art-globe .hub-art { background: radial-gradient(110% 80% at 90% 0, #9FD3F0 0, rgba(159,211,240,0) 55%), linear-gradient(150deg, #0F3460, #235F9E 60%, #3D86C4); }
.art-sand .hub-art { background: radial-gradient(110% 80% at 90% 0, #F0D49A 0, rgba(240,212,154,0) 55%), linear-gradient(150deg, #5E4312, #94702F 60%, #B98F4E); }
.art-meadow .hub-art { background: radial-gradient(110% 80% at 90% 0, #D4EA8A 0, rgba(212,234,138,0) 55%), linear-gradient(150deg, #24572A, #3F8A3C 60%, #6DB352); }
.art-cake .hub-art { background: radial-gradient(110% 80% at 90% 0, #FFD3B5 0, rgba(255,211,181,0) 55%), linear-gradient(150deg, #922F5F, #C55583 60%, #E3889F); }
.art-sky .hub-art { background: radial-gradient(110% 80% at 90% 0, #B8DEF6 0, rgba(184,222,246,0) 55%), linear-gradient(150deg, #1D4B85, #3474B8 60%, #5A9AD6); }

/* a page inside a hub: back, its name, 我的 */
.page-top { gap: 6px; }
.back-btn { flex: none; width: 40px; height: 40px; margin-left: -8px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); }
.back-btn:active { background: var(--hair); }
.back-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.out-head.single { align-items: center; }
.out-head.single .back-btn { margin-left: -6px; }

/* 首頁 shortcuts (hub.js shortcuts()) */

/* each card's own solid colour under its painting (the text stays readable even before the picture shows) */
.hub-card.art-night { background-color: #3A2670; } .hub-card.art-temple { background-color: #A12E25; } .hub-card.art-zhunti { background-color: #C9607F; } .hub-card.art-navy { background-color: #163C62; }
.hub-card.art-mint { background-color: #0F6E57; } .hub-card.art-peach { background-color: #AE3460; } .hub-card.art-mmo { background-color: #2A2348; }
.hub-card.art-felt { background-color: #0D513A; } .hub-card.art-arcade { background-color: #261D66; } .hub-card.art-globe { background-color: #1C4E88; }
.hub-card.art-sand { background-color: #6F521D; } .hub-card.art-meadow { background-color: #2F6E31; } .hub-card.art-cake { background-color: #A64470; }
.hub-card.art-sky { background-color: #2860A0; } .hub-card.art-cream:has(.hub-img) { background-color: #4A3426; }
.hub-card.wide:has(.n1):not(.feature) { min-height: 150px; } .hub-card.wide:has(.n1):not(.feature) .hub-art::after { background: linear-gradient(90deg, rgba(20,12,8,.86) 0%, rgba(20,12,8,.55) 55%, rgba(20,12,8,.1) 100%); } /* (a wide picture card: dark on the text side, so the words never sit on bright lanterns) */
.hub-card.wide:has(.n3) { min-height: 176px; } .hub-card.wide:has(.n3) .hub-text { max-width: 46%; }

/* 首頁 banners (hub.js promos()): one big card at a time, swipe or wait */
.promo .hub-text b { font-size: 22px; }

/* 交易紀錄 (/me/history) */
.hist-row { width: 100%; border: 0; background: none; color: inherit; text-align: left; font: inherit; display: flex; align-items: center; gap: 10px; }
.hist-row.in .t { color: var(--ok); } .hist-row .s { font-size: 12.5px; color: var(--ink-3); }
.hist-sum .hist-in { color: var(--ok); }
/* 邀請好友: each friend and what's still missing */
.refer-friends { display: grid; gap: 8px; margin-top: 6px; }
.refer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.refer-list li { display: grid; gap: 2px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.refer-list li b { font-size: 14px; font-weight: 600; }
.refer-list li.st-credited b { color: var(--ok); }
.refer-list li.st-same_network b, .refer-list li.st-hosting_network b, .refer-list li.st-capped b { color: var(--ink-3); }
#refCodeBox .row { gap: 8px; } #refCodeBox .input { flex: 1; text-transform: uppercase; letter-spacing: .08em; }
/* 台幣儲值 on the top bar */
.topup-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 8px; border-radius: 18px; border: 0;
  background: linear-gradient(135deg, #FFD86B, #F5A623); color: #3A2600; font: 700 15px/1 system-ui, sans-serif; box-shadow: 0 2px 8px rgba(245,166,35,.35); }
.topup-btn .coin { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFF6C8, #F2B705 60%, #B57F00); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.art-gold .hub-art { background: radial-gradient(100% 80% at 90% 0, #FFE08A 0, rgba(255,224,138,0) 55%), linear-gradient(150deg, #4A3205, #8A5D06 55%, #C98B0E); }
.hub-card.art-gold { background-color: #6E4A06; }
@media (max-width: 360px) { .topup-btn { padding: 0 10px 0 6px; font-size: 14px; gap: 4px; } }

/* ---------- 首頁 (2026-10-19): calm, four blocks, one screen ---------- */
.td-page { gap: 22px; }
.td-hero { padding: 0 2px; margin-top: -10px; }
.td-date { color: var(--ink-2); font-size: 14px; }
.td-block { display: grid; gap: 10px; }
.td-block h2, .td-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.td-head { display: flex; align-items: baseline; justify-content: space-between; }
.td-count { font-size: 14px; color: var(--ink-2); }
.home-fortune { position: relative; overflow: hidden; display: flex; align-items: center; width: 100%; min-height: 176px; padding: 20px 0 20px 20px; border: 0; border-radius: 26px; text-align: left;
  background: #0C7259 linear-gradient(155deg, #0A6650, #11896A); color: #FFFFFF; box-shadow: 0 16px 30px -20px rgba(8,80,60,.7); }
.home-fortune:active { transform: scale(.985); }
.hf-text { position: relative; z-index: 1; display: grid; gap: 8px; flex: 1; min-width: 0; }
.hf-text small { font-size: 14px; font-weight: 600; color: #CFEFE4; }
.hf-text b { font-size: 20px; line-height: 1.45; font-weight: 700; }
.hf-go { justify-self: start; margin-top: 4px; padding: 9px 16px; border-radius: 999px; background: #FFFFFF; color: #0A6650; font-size: 15px; font-weight: 700; }
.home-fortune .hf-pal { flex: none; margin: 0 14px 0 8px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.25)); }
.td-rituals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.td-ritual { display: grid; justify-items: center; gap: 4px; padding: 14px 6px 12px; border: 0; border-radius: 20px; background: var(--surface-solid); color: var(--ink);
  box-shadow: 0 12px 26px -18px rgba(40,26,14,.5), inset 0 0 0 1px var(--hair-2); }
.td-ritual .hub-icon { width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(0 5px 7px rgba(40,26,14,.2)); }
.td-ritual b { font-size: 15px; } .td-ritual small { font-size: 13px; color: var(--ink-2); min-height: 18px; }
.td-ritual.done small { color: var(--ok); font-weight: 700; }
.td-ritual.done .hub-icon { opacity: .55; }
.td-ritual:active { transform: scale(.97); }
.td-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.td-escape { position: relative; display: grid; align-content: end; gap: 2px; min-height: 150px; padding: 14px; border: 0; border-radius: 18px; overflow: hidden; text-align: left; color: #f6ead2; background: #1e1410; font: inherit; box-shadow: 0 8px 22px rgba(40, 26, 14, .25); }
.td-escape img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.td-escape::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.8)); }
.td-escape > span, .td-escape > b, .td-escape > small { position: relative; z-index: 1; }
.td-escape b { font-size: 20px; }
.td-escape small { font-size: 13px; line-height: 1.4; color: #eadcc2; }
.td-esc-hot { justify-self: start; padding: 2px 9px; border-radius: 999px; background: #c9302a; color: #fff; font-size: 12px; font-weight: 700; }
.td-game small { text-align: center; line-height: 1.35; }
.td-next { display: grid; gap: 22px; }
.home-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; border: 0; border-radius: 20px; background: var(--surface-solid); color: var(--ink); text-align: left;
  box-shadow: 0 12px 26px -18px rgba(40,26,14,.5), inset 0 0 0 1px var(--hair-2); }
.home-row-pic { flex: none; width: 52px; height: 52px; display: grid; place-items: center; }
.home-row-pic img { width: 52px; height: 52px; object-fit: contain; } .home-row-pic img.round { border-radius: 50%; object-fit: cover; }
.home-row-text { flex: 1; display: grid; gap: 2px; min-width: 0; } .home-row-text b { font-size: 16px; } .home-row-text small { font-size: 14px; color: var(--ink-2); }
.home-row-go, .me-row-go { color: var(--ink-3); font-size: 22px; line-height: 1; }
#homeSuggest { min-height: 150px; }

/* ---------- 我的 (2026-10-19): who I am, what I've collected, a few rows ---------- */
.me-page { gap: 16px; }
.me-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: var(--surface-solid); box-shadow: 0 12px 26px -18px rgba(40,26,14,.5); }
.me-card .avatar { width: 64px; height: 64px; flex: none; }
.me-card-text { flex: 1; display: grid; gap: 4px; min-width: 0; }
.me-card-text b { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .me-card-text small { font-size: 14px; color: var(--ink-2); }
.me-edit { flex: none; min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--accent); font-weight: 700; font-size: 15px; }
.me-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.me-stat { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 18px; background: var(--surface-solid); }
.me-stat b { font-size: 21px; font-weight: 800; } .me-stat small { font-size: 13px; color: var(--ink-2); }
.me-group { border-radius: 22px; background: var(--surface-solid); overflow: hidden; }
.me-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 16px; border: 0; background: none; color: var(--ink); text-align: left; font-size: 16px; }
.me-row + .me-row { box-shadow: inset 0 1px 0 var(--hair-2); }
.me-row-pic { width: 34px; height: 34px; object-fit: contain; flex: none; }
.me-row-t { flex: 1; } .me-row-v { color: var(--ink-2); font-size: 15px; white-space: nowrap; }
.me-row:active { background: var(--surface-2); }
.me-about { justify-self: center; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink-2); font-size: 15px; }
.me-sub { gap: 12px; }
/* 錢包: the two ways to top up, side by side */
.topup-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
.topup-big { display: grid; justify-items: center; gap: 4px; min-height: 120px; padding: 14px 8px; border: 0; border-radius: 22px; color: #2B1E00; box-shadow: 0 12px 26px -18px rgba(40,26,14,.55); }
.topup-big.twd { background: linear-gradient(150deg, #FFE08A, #F5B731); }
.topup-big.usdt { background: linear-gradient(150deg, #9BE7CF, #2FAE8A); color: #04261C; }
.topup-big img { width: 56px; height: 56px; object-fit: contain; }
.usdt-mark { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #FFFFFF; color: #26A17B; font: 800 30px/1 system-ui, sans-serif; font-style: normal; }
.topup-big b { font-size: 17px; } .topup-big small { font-size: 13px; opacity: .8; }
.topup-big:active { transform: scale(.97); }
/* AI 解讀 under a reading (web/js/ai-card.js): works on light pages and on the dark tarot table */
.ai-card { display: grid; gap: 8px; margin-top: 12px; padding: 16px; border-radius: 18px; background: color-mix(in srgb, currentColor 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 12%, transparent); text-align: left; }
.ai-card .ai-title { font-size: 17px; }
.ai-card p { margin: 0; line-height: 1.7; white-space: pre-line; }
.ai-card .ai-fine { font-size: 13px; opacity: .75; }
.ai-card .ai-fine.error { color: var(--danger); opacity: 1; }
.qian-ask { margin: 12px 0 0; font-weight: 700; text-align: center; }
.hub-badge.b-soon { color: #5B3FA8; }
/* 首頁 on one phone screen, iPhone included (6.1" with Safari's bars: ~600 px for the page) */
.td-page { gap: 18px; }
.home-fortune { min-height: 148px; padding: 16px 0 16px 18px; } .home-fortune .hf-pal { margin: 0 10px 0 6px; }
.hf-text { gap: 6px; } .hf-text b { font-size: 18px; line-height: 1.4; } .hf-go { padding: 8px 14px; font-size: 14px; }
.home-fortune .hf-pal svg { width: 112px; height: 112px; }
.td-ritual { padding: 10px 6px 10px; gap: 2px; } .td-ritual .hub-icon { width: 50px; height: 50px; }
#homeSuggest { min-height: 112px; }
#homeSuggest .hub-icon { width: 104px; height: 104px; }
#homeSuggest .hub-text b { font-size: 19px; }
/* 線上密室逃脫 lobby (web/js/escape/lobby.js) */
.esc-lobby { display: grid; gap: 14px; }
.esc-first { display: grid; gap: 8px; border: 2px solid #e8a35a; background: linear-gradient(160deg, #3a2210, #1a0f08); color: #f6e7cf; } .esc-first .small { color: #ecdcc0; } .esc-first .btn { white-space: normal; height: auto; min-height: 44px; line-height: 1.35; padding-top: 8px; padding-bottom: 8px; } .esc-first .hint:empty { display: none; } .esc-first .btn.ghost { background: transparent; color: #ffd9a8; border: 1px solid rgba(255, 210, 160, .55); } /* (第一次玩？: escape lobby.js firstBox) */
.esc-hero { background: linear-gradient(160deg, #2a1712, #120b0a); color: #f3e6cf; }
.esc-hero .small { color: #e8d9bd; } .esc-hero .muted { color: #b7a58a; }
.esc-title { font-size: 20px; }
.esc-made { display: grid; gap: 8px; }
.esc-priv { display: flex; align-items: center; gap: 8px; margin: 2px 0; cursor: pointer; } .esc-priv input { width: 20px; height: 20px; accent-color: var(--gold, #d4a94a); }
.esc-opennote { margin: 0; }
.esc-code { font-size: 30px; letter-spacing: .12em; text-align: center; }
.esc-row { padding: 6px 0; border-top: 1px solid var(--hair); }
.esc-rank .esc-row.me { background: var(--accent-soft); border-radius: 8px; padding: 6px 8px; font-weight: 600; }
.esc-filters { display: grid; gap: 8px; }
.esc-era { width: auto; min-width: 0; flex: 0 1 auto; padding: 6px 10px; font-size: 16px; min-height: 36px; }
.esc-find { flex: 1 1 auto; min-width: 0; padding: 6px 10px; font-size: 14px; min-height: 36px; }
.esc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.esc-story { position: relative; display: grid; align-content: end; min-height: 128px; padding: 10px; border: 2px solid transparent; border-radius: 16px; overflow: hidden; text-align: left; color: #f3e6cf; background: linear-gradient(160deg, #3a2018, #120b0a); }
.esc-story img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.esc-story::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.78)); }
.esc-story > span { position: relative; z-index: 1; }
.esc-story.on { border-color: #d8b04a; }
/* the lobby in tabs, shelves and a story sheet (escape/lobby.js, 2026-10-29) */
.esc-tabs { position: sticky; top: 0; z-index: 3; background: var(--surface-solid); border: 1px solid var(--hair); box-shadow: 0 6px 14px -10px rgba(0,0,0,.35); }
.esc-tabs button { font-size: 14px; padding-left: 4px; padding-right: 4px; }
.esc-pane { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); } .esc-pane[hidden] { display: none; } /* (a long label, Japanese especially, never widens the pane) */
.esc-gostories { font-size: 16px; min-height: 52px; }
.esc-hero summary { font-weight: 700; cursor: pointer; } .esc-hero[open] summary { margin-bottom: 8px; }
.esc-list.esc-shelves { display: grid; grid-template-columns: none; gap: 18px; }
.esc-shelf { display: grid; gap: 8px; min-width: 0; }
.esc-shelf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .esc-shelf-head b { font-size: 17px; }
.esc-more { border: 0; background: none; color: var(--accent); font-weight: 700; font-size: 14px; padding: 4px 0; }
.esc-shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
.esc-shelf-row::-webkit-scrollbar { display: none; }
.esc-shelf-row .esc-story { scroll-snap-align: start; min-height: 0; aspect-ratio: 4 / 5; }
@media (min-width: 600px) { .esc-shelf-row { grid-auto-columns: 26%; } }
.esc-list.esc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.esc-grid .esc-story { min-height: 0; aspect-ratio: 3 / 4; padding: 8px; } .esc-grid .esc-st-name { font-size: 13px; } .esc-grid .esc-st-place { font-size: 11px; }
.esc-dcover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; display: block; margin-bottom: 8px; }
.esc-detail, .esc-board { display: grid; gap: 8px; } .esc-board { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--hair, rgba(0,0,0,.1)); }
.esc-findrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; } .esc-findrow .esc-era { width: auto; max-width: 42vw; }
.esc-kinds { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .esc-kinds::-webkit-scrollbar { display: none; } .esc-kinds .chip { flex: none; }
.esc-filtered { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .esc-filtered[hidden] { display: none; }
.esc-tabs button { white-space: nowrap; font-size: 13.5px; }
.esc-st-name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.esc-st-place { font-size: 12px; color: #d9c7a4; }
.esc-st-done { position: absolute !important; top: 8px; right: 8px; background: #d8b04a; color: #2a1610; border-radius: 10px; padding: 0 7px; font-weight: 800; font-size: 13px; }
.esc-detail { display: grid; gap: 10px; scroll-margin-top: 70px; }
.esc-tags { margin: 0; }
.esc-linfo { margin: 0; }
.esc-bugs { border: 0; background: none; padding: 8px 0; color: var(--muted, #8a8070); text-align: left; cursor: pointer; } /* (rats and cockroaches on/off: critters.js) */
.esc-linfo.lv-nightmare { color: #7a3a8e; }
.esc-linfo.lv-hell { color: #b3261e; font-weight: 600; }
#escCode { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .1em; }
#escJoin { flex: none; width: auto; padding: 0 22px; }
/* the jump to the phone's browser was blocked: the two steps, and an arrow at the app's own menu (top right) */
.inapp-steps { text-align: left; background: #fff; border-radius: 12px; padding: 10px 14px; border: 1px dashed #e8892a; }
.inapp-steps b { font-size: 15px; } .inapp-steps ol { margin: 6px 0 4px; padding-left: 22px; font-size: 16px; line-height: 1.7; color: #3a2414; }
.inapp-arrow { position: fixed; top: 6px; right: 10px; z-index: 50; display: grid; justify-items: end; pointer-events: none; color: #e8892a; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); animation: inapp-bob 1s ease-in-out infinite alternate; }
.inapp-arrow span { font-size: 44px; line-height: 1; } .inapp-arrow b { font-size: 15px; background: #e8892a; color: #fff; padding: 2px 10px; border-radius: 10px; }
@keyframes inapp-bob { from { transform: translateY(0); } to { transform: translateY(-8px); } }
.inapp-more { margin: 4px 0 8px; } .inapp-more summary { cursor: pointer; color: #8a3a0a; font-size: 14px; text-decoration: underline; list-style: none; } .inapp-more[open] summary { margin-bottom: 8px; }
/* 線上密室逃脫's growth in the lobby (js/escape/lobby.js): the detective's file, the story book, the achievements */
.esc-lvrow { display: flex; align-items: center; gap: 10px; } .esc-lv { color: #b47a1a; white-space: nowrap; }
.esc-xpbar { flex: 1; height: 10px; border-radius: 5px; background: rgba(0, 0, 0, .1); overflow: hidden; } .esc-xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #f6d98a, #e0a020); }
.esc-book { display: grid; gap: 6px; }
/* the story book's and the achievements' title and close button stay on top while the sheet scrolls (the sheet fills the screen: no backdrop left to tap) */
.esc-sheettop { position: sticky; top: -10px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -10px -18px 0; padding: 12px 18px 8px; background: var(--surface-solid); border-bottom: 1px solid var(--hair); }
.esc-sheettop h2 { margin: 0; font-size: 18px; } .esc-sheettop .btn { flex: none; min-height: 40px; }
.esc-sheetend { justify-self: stretch; }
.esc-bk summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; padding: 6px; border-radius: 12px; background: rgba(0, 0, 0, .04); }
.esc-bk summary::-webkit-details-marker { display: none; }
.esc-bk img { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.esc-bk:not(.got) img { filter: grayscale(1) brightness(.7); }
.esc-bk-t { flex: 1; min-width: 0; display: grid; } .esc-bk-t b { font-size: 14px; } .esc-bk-t small { font-size: 12px; opacity: .7; }
.esc-bk-b i { font-style: normal; color: #c9c0b0; letter-spacing: 1px; } .esc-bk-b i.on { color: #e0a020; }
.esc-bk-tale { padding: 6px 10px 10px; display: grid; gap: 4px; } .esc-bk-tale p { margin: 0; }
.esc-achv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.esc-ac { padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, .04); display: grid; gap: 2px; opacity: .6; } .esc-ac.got { opacity: 1; background: linear-gradient(160deg, rgba(232, 192, 99, .25), rgba(232, 192, 99, .06)); border: 1px solid rgba(232, 192, 99, .5); }
.esc-ac small { font-size: 12px; opacity: .8; }
/* 揪團 board (js/rally.js; owner, 2026-10-27: 揪團的介面好像很擁擠): air between the buttons, the words, the headings and the cards */
.rally-board { display: grid; gap: 12px; padding-bottom: 8px; }
.rally-board > .label { margin: 10px 2px 0; }
.rally-top { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px !important; }
.rally-top .btn { min-height: 50px; }
.rally-how { margin: 0 4px; line-height: 1.55; }
.rally-board .empty { padding: 26px 12px; text-align: center; color: var(--ink-3); background: var(--surface-solid); border-radius: 16px; }
.card.rally { gap: 10px; padding: 14px 16px; border-left: 4px solid #0b6b50; }
.card.rally.mine { border-left-color: #e0a020; }
.card.rally.hl { box-shadow: 0 0 0 3px rgba(224, 160, 32, .45); }
.rally-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rally-game { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.card.rally .headline { font-size: 18px; }
.rally-seats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rally-dots { display: inline-flex; gap: 4px; } .rally-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--hair); } .rally-dots i.on { background: #0b6b50; }
.rally-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; } .rally-btns .btn { flex: 1 1 auto; min-width: 84px; }
.rally-new { display: grid; gap: 10px; } .rally-new .label { margin-top: 6px; } .rally-new .seg { flex-wrap: wrap; } .rally-new #rallyGo { margin-top: 8px; min-height: 50px; }
.rally-new #rallyWhen { display: grid; grid-template-columns: repeat(3, 1fr); } .rally-new #rallyWhen button { padding: 8px 4px; }
/* 占卜紀錄 (js/readings.js) */
.rd-kinds { flex-wrap: wrap; }
.rd-list { display: grid; gap: 10px; }
.rd-group { display: grid; gap: 6px; padding: 10px; border-radius: 16px; background: rgba(0, 0, 0, .035); }
.rd-q { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0 2px; } .rd-q b { font-size: 15px; }
.rd-item { border: 1px solid var(--hair-2); border-radius: 14px; background: var(--surface-solid); }
.rd-sum { display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; } .rd-sum::-webkit-details-marker { display: none; }
.rd-ic { font-size: 22px; flex: none; } .rd-main { display: grid; gap: 2px; min-width: 0; } .rd-qt { font-size: 15px; overflow-wrap: anywhere; } .rd-title { font-size: 14px; overflow-wrap: anywhere; }
.rd-body { display: grid; gap: 8px; padding: 0 14px 14px; } .rd-body h4 { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.rd-fact { font-size: 16px; font-weight: 600; }
.rd-ai { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .03); } .rd-ai p { margin: 0; line-height: 1.6; font-size: 15px; }
/* 地球之初 in the escape lobby (js/escape/world.js) */
.esc-world { display: grid; gap: 10px; } .esc-world-cover { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 14px; }
.esc-world-head { display: grid; gap: 2px; } .esc-world-head b { font-size: 18px; } .esc-world-head small { opacity: .75; }
.esc-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.esc-dim { display: grid; gap: 4px; justify-items: start; padding: 10px; border-radius: 14px; background: rgba(0,0,0,.04); border: 1px solid var(--hair-2); }
.esc-dim.mine { border-color: #e0a020; } .esc-dim.done { background: rgba(80, 180, 120, .12); } .esc-dim-ic { font-size: 24px; } .esc-dim small { opacity: .75; }
.esc-keeps { display: grid; gap: 6px; } .esc-keeprow { display: flex; flex-wrap: wrap; gap: 6px; }
.esc-keep { font-size: 13px; padding: 4px 9px; border-radius: 10px; background: rgba(0,0,0,.04); opacity: .45; } .esc-keep.got { opacity: 1; background: linear-gradient(160deg, rgba(232, 192, 90, .25), rgba(232, 192, 90, .08)); }
/* 聊天紀錄 across devices (app.js keepCard, keepReceive) */
.keep-code { margin: 6px 0; font: 700 30px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .18em; text-align: center; }
#keepQr { display: block; margin: 6px auto; max-width: 100%; height: auto; image-rendering: pixelated; }
.keep-pw { display: grid; gap: 8px; }
.keep-pw[hidden], #keepActs[hidden] { display: none; }
.keep-banner { display: block; width: 100%; margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--accent, #c9a36b); background: color-mix(in srgb, var(--accent, #c9a36b) 14%, transparent); color: inherit; font: inherit; text-align: left; }
#keepSendCode:not(:placeholder-shown) { text-transform: uppercase; letter-spacing: .12em; }
#keepActs { display: flex; flex-wrap: wrap; gap: 8px; }
#keepActs .btn { flex: 1 1 auto; min-width: 0; white-space: normal; }
#keepPwCard, #keepMoveCard, #keepGetCard { min-width: 0; overflow-wrap: anywhere; }
/* 今日密室 (escape/daily.js) */
.esc-daily { display: grid; gap: 8px; border: 1px solid color-mix(in srgb, var(--accent, #c9a36b) 55%, transparent); }
.esc-daily-cover { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 14px; }
.esc-daily-head { display: grid; gap: 2px; } .esc-daily-head b { font-size: 18px; } .esc-daily-story { font-size: 16px; }
.esc-daily-mine { margin: 0; font-weight: 700; } .esc-daily-streak { margin: 0; font-size: 16px; font-weight: 700; color: #d9622b; } .esc-daily-keep { margin: 0; color: #d9622b; }
.esc-daily-top { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 14px; }
.esc-daily-top li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px; border-radius: 8px; } .esc-daily-top li.me { background: color-mix(in srgb, var(--accent, #c9a36b) 22%, transparent); font-weight: 700; }
.esc-daily-top b { font-variant-numeric: tabular-nums; }
/* 前世今生 (web/js/past.js) */
.past-page { display: grid; gap: 14px; }
.past-card, .past-realm, .past-ak, .past-form { display: grid; gap: 10px; }
.past-form .input { width: 100%; }
.past-art { width: calc(100% + 32px); margin: -16px -16px 4px; aspect-ratio: 19 / 13; object-fit: cover; border-radius: 18px 18px 0 0; display: block; }
.past-who { margin: 0; font-size: 20px; line-height: 1.35; }
.past-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.past-pair > div, .past-soul { padding: 10px 12px; border-radius: 14px; background: var(--accent-soft); display: grid; gap: 2px; }
.past-pair small, .past-soul small, .past-page-card small { color: var(--ink-3); font-size: 12px; }
.past-soul { display: block; } .past-soul small { display: block; } .past-soul p { margin: 4px 0 0; }
.past-rhead { display: flex; align-items: center; gap: 10px; } .past-rhead h2 { margin: 0; font-size: 20px; }
.past-sym { font-size: 34px; line-height: 1; }
.past-learn { padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; margin: 0; }
.past-ask { display: grid; gap: 8px; } .past-ask textarea { width: 100%; resize: vertical; }
.past-pages { display: grid; gap: 10px; }
.past-page-card { padding: 12px 14px; border-radius: 16px; background: linear-gradient(160deg, rgba(120, 90, 200, .14), rgba(232, 192, 99, .14)); box-shadow: inset 0 0 0 1px rgba(232, 192, 99, .35); display: grid; gap: 4px; animation: past-in .6s ease both; }
.past-page-card b { font-size: 17px; } .past-page-card p { margin: 0; }
@keyframes past-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .past-page-card { animation: none; } }
/* 七宗罪與七美德 (web/js/sins.js) */
.sins-page { display: grid; gap: 14px; }
.sins-intro { display: grid; gap: 10px; } .sins-intro h2 { margin: 0; }
.sins-cover { width: calc(100% + 32px); margin: -16px -16px 4px; aspect-ratio: 19 / 10; object-fit: cover; border-radius: 18px 18px 0 0; display: block; }
.sins-result { display: grid; gap: 14px; }
.sins-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sins-title { font-size: 24px; } .sins-index { font-size: 14px; color: var(--accent); font-weight: 700; }
.sins-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .sins-two { grid-template-columns: 1fr; } }
.sins-card { display: grid; gap: 4px; align-content: start; overflow: hidden; }
.sins-card img { width: calc(100% + 32px); margin: -16px -16px 6px; aspect-ratio: 19 / 13; object-fit: cover; display: block; }
.sins-card small { color: var(--ink-3); font-size: 12px; } .sins-card b { font-size: 19px; } .sins-card p { margin: 0; font-size: 14px; }
.sins-card.virtue { box-shadow: inset 0 0 0 1px rgba(11, 122, 94, .35); } .sins-card.sin { box-shadow: inset 0 0 0 1px rgba(196, 26, 26, .35); }
.sins-tip { padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); }
.sins-track { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #c94a4a, #d8c9a8 50%, #2f9e7a); }
.sins-track i { position: absolute; top: -4px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--surface, #fff); box-shadow: 0 0 0 3px var(--ink-1, #222); }
/* 魔神仔夜話's lobby (web/js/tale/lobby.js) */
.tale-lobby { display: grid; gap: 14px; }
.tale-hero { display: grid; gap: 8px; overflow: hidden; }
.tale-cover { width: calc(100% + 32px); margin: -16px -16px 4px; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 18px 18px 0 0; }
.tale-title { font-size: 26px; letter-spacing: .1em; } .tale-tag { color: var(--accent); font-weight: 600; }
.tale-steps { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.tale-roles { display: grid; gap: 8px; } .tale-role { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: start; }
.tale-role img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; } .tale-role p { margin: 2px 0 0; }
/* 我的收藏 (web/js/showcase.js) */
.sc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.sc-title { display: grid; gap: 2px; padding: 10px; border-radius: 14px; background: var(--surface-2); opacity: .75; }
.sc-title.got { opacity: 1; background: linear-gradient(160deg, rgba(232, 192, 99, .22), rgba(11, 122, 94, .12)); box-shadow: inset 0 0 0 1px rgba(232, 192, 99, .55); }
.sc-sym { font-size: 26px; line-height: 1.2; } .sc-title:not(.got) .sc-sym { filter: grayscale(1); }
.sc-title b { font-size: 15px; } .sc-title small { font-size: 12px; color: var(--ink-3); }
.sc-bar { display: block; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .1); overflow: hidden; margin-top: 4px; } .sc-bar i { display: block; height: 100%; background: var(--accent); }
.sc-games { display: grid; gap: 10px; } .sc-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; margin-top: 8px; }
.sc-stat { display: grid; padding: 8px; border-radius: 12px; background: var(--surface-2); } .sc-stat b { font-size: 17px; } .sc-stat small { font-size: 12px; color: var(--ink-3); }
/* the fortune tests' effects (web/js/quizfx.js) */
.qfx-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.qfx-confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: qfx-fall linear both; }
@keyframes qfx-fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: .85; } }
.qfx-glow { animation: qfx-glow .9s ease; } @keyframes qfx-glow { 0% { box-shadow: 0 0 0 0 rgba(232, 192, 99, .0); } 40% { box-shadow: 0 0 16px 4px rgba(232, 192, 99, .8); } 100% { box-shadow: 0 0 0 0 rgba(232, 192, 99, 0); } }
.sins-qpic { width: 100%; aspect-ratio: 19 / 13; object-fit: cover; border-radius: 16px; display: block; animation: sins-in .35s ease both; }
@keyframes sins-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.sins-titlepic { width: calc(100% + 32px); margin: -16px -16px 8px; aspect-ratio: 19 / 13; object-fit: cover; display: block; border-radius: 18px 18px 0 0; animation: sins-pop .8s cubic-bezier(.2,.9,.25,1) both; }
@keyframes sins-pop { from { opacity: 0; transform: scale(.92); filter: blur(4px); } }
@media (prefers-reduced-motion: reduce) { .sins-qpic, .sins-titlepic { animation: none; } }
.sins-titlebox { overflow: hidden; }
.sins-qpic { max-height: 30vh; } /* (the dots stay on a small screen) */
.tale-grow { display: flex; align-items: center; gap: 8px; } .tale-lv { font-size: 18px; } .tale-xpbar { flex: 1; height: 10px; border-radius: 5px; background: rgba(0, 0, 0, .12); overflow: hidden; } .tale-xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #f6d98a, #e0a020); }
.tale-maps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.tale-map { display: grid; gap: 2px; padding: 0 0 8px; border-radius: 14px; overflow: hidden; border: 2px solid transparent; background: var(--surface-2); text-align: left; }
.tale-map img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; } .tale-map b, .tale-map small { padding: 0 8px; } .tale-map small { font-size: 12px; color: var(--ink-3); }
.tale-map.on { border-color: var(--accent); } .tale-map.locked { opacity: .55; } .tale-map.locked img { filter: grayscale(1) blur(1px); }
/* 魔神仔夜話・闖關 (tale/journeyui.js) */
.tale-journey .btn.small { align-self: flex-start; }
.tale-jtotal { font-size: 22px; font-weight: 700; color: #d9a520; margin: 4px 0; }
.tale-chap { position: relative; border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow, 0 2px 10px rgba(0,0,0,.08)); }
.tale-chap > img { width: 100%; aspect-ratio: 16 / 6; object-fit: cover; display: block; }
.tale-chap-head { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 16 / 6; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 14px; color: #fff; background: linear-gradient(transparent 30%, rgba(0,0,0,.65)); }
.tale-chap-head b { font-size: 17px; } .tale-chap-head small { color: #f6d98a; font-weight: 600; }
.tale-chap.locked > img { filter: grayscale(1) brightness(.6); } .tale-chap.locked .tale-soups { opacity: .5; }
.tale-soups { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; padding: 10px; }
.tale-soup { display: grid; gap: 2px; padding: 8px; border-radius: 12px; background: var(--surface-2); text-align: left; border: 2px solid transparent; color: var(--ink); }
.tale-soup .n { font-size: 11px; color: var(--ink-3); } .tale-soup b { font-size: 14px; line-height: 1.3; } .tale-soup .st { color: #d9a520; letter-spacing: 1px; }
.tale-soup.done { border-color: rgba(217, 165, 32, .5); } .tale-soup.going { border-color: var(--accent); }
.tale-soup-head { justify-content: space-between; align-items: center; gap: 8px; } .tale-soup-head .tale-title { font-size: 21px; letter-spacing: .04em; }
.tale-jstars, .tale-bigstars { color: #d9a520; font-size: 22px; letter-spacing: 2px; white-space: nowrap; }
.tale-face { font-size: 17px; line-height: 1.7; }
.tale-hints { margin: 6px 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.tale-hintline { padding: 8px 12px; border-radius: 12px; background: rgba(246, 217, 138, .22); border-left: 4px solid #e0a020; }
.tale-hintline.fresh { animation: tale-in .5s ease; } @keyframes tale-in { from { opacity: 0; transform: translateY(6px); } }
.tale-answers { display: grid; gap: 8px; }
.tale-answer { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 2px solid transparent; text-align: left; font-size: 15px; line-height: 1.5; color: var(--ink); }
.tale-answer.no { border-color: #c0303a; opacity: .6; animation: tale-shake .4s; } .tale-answer.yes { border-color: #2a9a5a; background: rgba(42, 154, 90, .15); }
@keyframes tale-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.tale-solved { text-align: center; } .tale-bigstars { font-size: 44px; margin: 6px 0; animation: tale-pop .7s cubic-bezier(.2,1.6,.4,1); } @keyframes tale-pop { from { transform: scale(.3); opacity: 0; } }
.tale-bottom { font-size: 16px; line-height: 1.8; text-align: left; } .tale-notes { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; color: var(--accent); font-weight: 700; font-size: 17px; }
@media (prefers-reduced-motion: reduce) { .tale-hintline.fresh, .tale-answer.no, .tale-bigstars { animation: none; } }
/* 偵探搭檔 in the lobby (escape/partner-ui.js) */
.esc-partners { display: grid; gap: 8px; }
.esc-phead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; } .esc-phead b { font-size: 18px; } .esc-pnow { font-size: 14px; color: #c0567e; }
.esc-prow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.esc-pcard { display: grid; justify-items: center; gap: 4px; padding: 6px 2px; border-radius: 14px; border: 1px solid var(--line, #ddd); background: transparent; color: inherit; font: inherit; min-width: 0; }
.esc-pcard img { width: 100%; max-width: 76px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.esc-pcard b { font-size: 14px; } .esc-pcard small { font-size: 11px; color: var(--muted, #888); text-align: center; overflow-wrap: anywhere; }
.esc-pcard.on { border: 2px solid #d9628f; background: color-mix(in srgb, #d9628f 10%, transparent); }
.esc-ppage { display: grid; gap: 8px; } .esc-pportrait { width: 100%; max-height: 52vh; object-fit: cover; object-position: top; border-radius: 16px; }
.esc-ppage h3, .esc-pread h3 { margin: 0; } .esc-pbond { display: grid; gap: 4px; font-size: 14px; } .esc-pbar { height: 8px; border-radius: 4px; background: color-mix(in srgb, #d9628f 18%, transparent); overflow: hidden; } .esc-pbar i { display: block; height: 100%; background: #d9628f; }
.esc-pchs { display: grid; gap: 6px; } .esc-pch { display: grid; text-align: left; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line, #ddd); background: transparent; color: inherit; font: inherit; } .esc-pch.locked { opacity: .55; }
.esc-plooks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.esc-plook { position: relative; padding: 0; border: 2px solid transparent; border-radius: 50%; background: none; aspect-ratio: 1; overflow: hidden; }
.esc-plook img { width: 100%; height: 100%; object-fit: cover; display: block; } .esc-plook.on { border-color: #d9628f; }
.esc-plook.locked img { filter: grayscale(1) blur(2px) brightness(.7); } .esc-plook small { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px #000; }
.esc-pread { display: grid; gap: 10px; } .esc-pread p { margin: 0; line-height: 1.85; } .esc-pface { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
/* 匿名聊天's festival looks (festive.js; html[data-fest] only in the festival's days) */
.fest-banner { position: relative; border-radius: 18px; overflow: hidden; min-height: 92px; display: grid; align-items: end; box-shadow: 0 6px 18px -10px rgba(0,0,0,.4); }
.fest-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fest-banner b { position: relative; margin: 0; padding: 18px 14px 10px; color: #fff; font-size: 15px; text-shadow: 0 1px 4px rgba(40, 10, 60, .8); background: linear-gradient(transparent, rgba(50, 20, 80, .55)); }
.fest-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; } /* (behind the messages: never over a word) */
.fest-deco .fd { position: absolute; width: 54px; opacity: .9; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); animation: fest-bob 4s ease-in-out infinite; }
.fest-deco .fd0 { left: 6px; bottom: calc(var(--bottom) + 70px); } .fest-deco .fd1 { right: 8px; top: calc(var(--top) + 82px); width: 46px; animation-delay: -1.3s; }
.fest-deco .fd2 { right: 14px; bottom: calc(var(--bottom) + 140px); width: 40px; animation-delay: -2.1s; } .fest-deco .fd3 { left: 10px; top: calc(var(--top) + 96px); width: 38px; animation-delay: -.6s; opacity: .75; }
@keyframes fest-bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .fest-deco .fd { animation: none; } }
#chatScreen { position: relative; } #chatScreen .msgs { position: relative; z-index: 1; } #chatScreen .chat-top, #chatScreen .composer { position: relative; z-index: 2; }
:root[data-fest="halloween"] #chatScreen { background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), url(/img/fest/halloween/bg.webp) center / cover no-repeat; }
:root[data-fest="halloween"][data-theme="dark"] #chatScreen { background: linear-gradient(rgba(20,10,40,.35), rgba(20,10,40,.35)), url(/img/fest/halloween/bg.webp) center / cover no-repeat; }
:root[data-fest="halloween"] #chatScreen .chat-top { background: linear-gradient(90deg, rgba(255, 186, 120, .55), rgba(190, 160, 255, .55)), var(--surface); }
:root[data-fest="halloween"] #chatScreen .b.out { background: linear-gradient(135deg, #ff9a4d, #c77dff); color: #fff; }
:root[data-fest="halloween"] #chatScreen .b.in { background: rgba(255, 255, 255, .92); color: #2a1b3d; box-shadow: 0 1px 3px rgba(80, 40, 120, .18); }
:root[data-fest="halloween"] #chatScreen .sys { background: rgba(255,255,255,.85); }
:root[data-fest="halloween"] .chats-screen .item { border: 1px solid rgba(199, 125, 255, .25); }
/* the other festivals (owner, 2026-10-31: 節慶到了就能更換): the same look in their colours; on only once drawn (festdays.js DRAWN) */
:root[data-fest="christmas"] #chatScreen { background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), url(/img/fest/christmas/bg.webp) center / cover no-repeat; }
:root[data-fest="christmas"][data-theme="dark"] #chatScreen { background: linear-gradient(rgba(10,30,20,.35), rgba(10,30,20,.35)), url(/img/fest/christmas/bg.webp) center / cover no-repeat; }
:root[data-fest="christmas"] #chatScreen .chat-top { background: linear-gradient(90deg, rgba(232,106,106, .55), rgba(111,191,142, .55)), var(--surface); }
:root[data-fest="christmas"] #chatScreen .b.out { background: linear-gradient(135deg, #e85d5d, #2f9e6e); color: #fff; }
:root[data-fest="christmas"] #chatScreen .b.in { background: rgba(255, 255, 255, .92); color: #1f2b24; box-shadow: 0 1px 3px rgba(47,158,110, .18); }
:root[data-fest="christmas"] #chatScreen .sys { background: rgba(255,255,255,.85); }
:root[data-fest="christmas"] .chats-screen .item { border: 1px solid rgba(47,158,110, .25); }
:root[data-fest="newyear"] #chatScreen { background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), url(/img/fest/newyear/bg.webp) center / cover no-repeat; }
:root[data-fest="newyear"][data-theme="dark"] #chatScreen { background: linear-gradient(rgba(10,15,40,.35), rgba(10,15,40,.35)), url(/img/fest/newyear/bg.webp) center / cover no-repeat; }
:root[data-fest="newyear"] #chatScreen .chat-top { background: linear-gradient(90deg, rgba(255,179,71, .55), rgba(122,140,255, .55)), var(--surface); }
:root[data-fest="newyear"] #chatScreen .b.out { background: linear-gradient(135deg, #ff8fb1, #6a7dff); color: #fff; }
:root[data-fest="newyear"] #chatScreen .b.in { background: rgba(255, 255, 255, .92); color: #1d2340; box-shadow: 0 1px 3px rgba(106,125,255, .18); }
:root[data-fest="newyear"] #chatScreen .sys { background: rgba(255,255,255,.85); }
:root[data-fest="newyear"] .chats-screen .item { border: 1px solid rgba(106,125,255, .25); }
:root[data-fest="valentine"] #chatScreen { background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), url(/img/fest/valentine/bg.webp) center / cover no-repeat; }
:root[data-fest="valentine"][data-theme="dark"] #chatScreen { background: linear-gradient(rgba(40,10,20,.35), rgba(40,10,20,.35)), url(/img/fest/valentine/bg.webp) center / cover no-repeat; }
:root[data-fest="valentine"] #chatScreen .chat-top { background: linear-gradient(90deg, rgba(255,154,181, .55), rgba(255,196,214, .55)), var(--surface); }
:root[data-fest="valentine"] #chatScreen .b.out { background: linear-gradient(135deg, #ff5c8a, #ff8fab); color: #fff; }
:root[data-fest="valentine"] #chatScreen .b.in { background: rgba(255, 255, 255, .92); color: #3d1b28; box-shadow: 0 1px 3px rgba(255,92,138, .18); }
:root[data-fest="valentine"] #chatScreen .sys { background: rgba(255,255,255,.85); }
:root[data-fest="valentine"] .chats-screen .item { border: 1px solid rgba(255,92,138, .25); }
:root[data-fest="cny"] #chatScreen { background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), url(/img/fest/cny/bg.webp) center / cover no-repeat; }
:root[data-fest="cny"][data-theme="dark"] #chatScreen { background: linear-gradient(rgba(40,10,10,.35), rgba(40,10,10,.35)), url(/img/fest/cny/bg.webp) center / cover no-repeat; }
:root[data-fest="cny"] #chatScreen .chat-top { background: linear-gradient(90deg, rgba(255,107,91, .55), rgba(255,207,92, .55)), var(--surface); }
:root[data-fest="cny"] #chatScreen .b.out { background: linear-gradient(135deg, #e8433a, #f5a623); color: #fff; }
:root[data-fest="cny"] #chatScreen .b.in { background: rgba(255, 255, 255, .92); color: #3d1b16; box-shadow: 0 1px 3px rgba(232,67,58, .18); }
:root[data-fest="cny"] #chatScreen .sys { background: rgba(255,255,255,.85); }
:root[data-fest="cny"] .chats-screen .item { border: 1px solid rgba(232,67,58, .25); }
:root[data-fest="lantern"] #chatScreen { background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), url(/img/fest/lantern/bg.webp) center / cover no-repeat; }
:root[data-fest="lantern"][data-theme="dark"] #chatScreen { background: linear-gradient(rgba(30,15,40,.35), rgba(30,15,40,.35)), url(/img/fest/lantern/bg.webp) center / cover no-repeat; }
:root[data-fest="lantern"] #chatScreen .chat-top { background: linear-gradient(90deg, rgba(255,176,102, .55), rgba(255,122,89, .55)), var(--surface); }
:root[data-fest="lantern"] #chatScreen .b.out { background: linear-gradient(135deg, #ff8c42, #e85d75); color: #fff; }
:root[data-fest="lantern"] #chatScreen .b.in { background: rgba(255, 255, 255, .92); color: #3a2418; box-shadow: 0 1px 3px rgba(255,140,66, .18); }
:root[data-fest="lantern"] #chatScreen .sys { background: rgba(255,255,255,.85); }
:root[data-fest="lantern"] .chats-screen .item { border: 1px solid rgba(255,140,66, .25); }
:root[data-fest="dragonboat"] #chatScreen { background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), url(/img/fest/dragonboat/bg.webp) center / cover no-repeat; }
:root[data-fest="dragonboat"][data-theme="dark"] #chatScreen { background: linear-gradient(rgba(10,30,30,.35), rgba(10,30,30,.35)), url(/img/fest/dragonboat/bg.webp) center / cover no-repeat; }
:root[data-fest="dragonboat"] #chatScreen .chat-top { background: linear-gradient(90deg, rgba(111,214,196, .55), rgba(155,224,122, .55)), var(--surface); }
:root[data-fest="dragonboat"] #chatScreen .b.out { background: linear-gradient(135deg, #2bb5a0, #5aa832); color: #fff; }
:root[data-fest="dragonboat"] #chatScreen .b.in { background: rgba(255, 255, 255, .92); color: #173530; box-shadow: 0 1px 3px rgba(43,181,160, .18); }
:root[data-fest="dragonboat"] #chatScreen .sys { background: rgba(255,255,255,.85); }
:root[data-fest="dragonboat"] .chats-screen .item { border: 1px solid rgba(43,181,160, .25); }
:root[data-fest="qixi"] #chatScreen { background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), url(/img/fest/qixi/bg.webp) center / cover no-repeat; }
:root[data-fest="qixi"][data-theme="dark"] #chatScreen { background: linear-gradient(rgba(20,10,40,.35), rgba(20,10,40,.35)), url(/img/fest/qixi/bg.webp) center / cover no-repeat; }
:root[data-fest="qixi"] #chatScreen .chat-top { background: linear-gradient(90deg, rgba(179,157,255, .55), rgba(127,178,255, .55)), var(--surface); }
:root[data-fest="qixi"] #chatScreen .b.out { background: linear-gradient(135deg, #9b6bff, #5a8dff); color: #fff; }
:root[data-fest="qixi"] #chatScreen .b.in { background: rgba(255, 255, 255, .92); color: #241b3d; box-shadow: 0 1px 3px rgba(155,107,255, .18); }
:root[data-fest="qixi"] #chatScreen .sys { background: rgba(255,255,255,.85); }
:root[data-fest="qixi"] .chats-screen .item { border: 1px solid rgba(155,107,255, .25); }
:root[data-fest="midautumn"] #chatScreen { background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), url(/img/fest/midautumn/bg.webp) center / cover no-repeat; }
:root[data-fest="midautumn"][data-theme="dark"] #chatScreen { background: linear-gradient(rgba(10,15,40,.35), rgba(10,15,40,.35)), url(/img/fest/midautumn/bg.webp) center / cover no-repeat; }
:root[data-fest="midautumn"] #chatScreen .chat-top { background: linear-gradient(90deg, rgba(255,210,122, .55), rgba(143,168,255, .55)), var(--surface); }
:root[data-fest="midautumn"] #chatScreen .b.out { background: linear-gradient(135deg, #f2b33d, #6b7fd7); color: #fff; }
:root[data-fest="midautumn"] #chatScreen .b.in { background: rgba(255, 255, 255, .92); color: #2b2414; box-shadow: 0 1px 3px rgba(242,179,61, .18); }
:root[data-fest="midautumn"] #chatScreen .sys { background: rgba(255,255,255,.85); }
:root[data-fest="midautumn"] .chats-screen .item { border: 1px solid rgba(242,179,61, .25); }
/* 匿名聊天's stickers (stickers.js) */
.stick-btn { font-size: 20px; min-width: 40px; padding-left: 6px; padding-right: 6px; }
.composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stick-tabs { margin-bottom: 8px; }
.stick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stick { display: grid; justify-items: center; gap: 2px; padding: 4px 2px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink); font-size: 11px; }
.stick img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.b.sticker-b { background: none !important; box-shadow: none !important; padding: 0; position: relative; width: 132px; max-width: 132px; }
.b.sticker-b img { width: 132px; height: 132px; object-fit: contain; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.b.sticker-b .cap { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); white-space: nowrap; font-weight: 900; font-size: 16px; color: #fff; -webkit-text-stroke: 4px #5b3a8c; paint-order: stroke fill; letter-spacing: .02em; }
/* the hour's music (music.js): ♪ in the top bar; three dancing bars while it plays */
.music-btn { position: relative; width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.music-btn .mb-note { font-size: 19px; line-height: 1; } .music-btn .mb-bars { display: none; gap: 2px; align-items: flex-end; height: 16px; }
.music-btn .mb-bars i { width: 3px; height: 6px; border-radius: 2px; background: var(--accent); animation: mb-bar .9s ease-in-out infinite; } .music-btn .mb-bars i:nth-child(2) { animation-delay: -.3s; } .music-btn .mb-bars i:nth-child(3) { animation-delay: -.6s; }
.music-btn.on { background: var(--accent-soft); } .music-btn.on .mb-note { display: none; } .music-btn.on .mb-bars { display: flex; }
@keyframes mb-bar { 50% { height: 16px; } }
@media (prefers-reduced-motion: reduce) { .music-btn .mb-bars i { animation: none; height: 12px; } }

/* 偵探搭檔 round 2: today, gifts, dates (owner, 2026-10-31) */
.esc-ptoday { display: grid; gap: 6px; margin: 8px 0; }
.esc-psay { margin: 4px 0; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, #d9628f 10%, transparent); line-height: 1.6; }
.esc-pgifts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.esc-pgift { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line, #ddd); background: transparent; color: inherit; font-size: 22px; touch-action: manipulation; }
.esc-pgift small { font-size: 11px; } .esc-pgift:disabled { opacity: .45; }
.esc-pdates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.esc-pdate { display: grid; gap: 4px; padding: 6px; border-radius: 12px; border: 1px solid var(--line, #ddd); background: transparent; color: inherit; text-align: left; }
.esc-pdate img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; } .esc-pdate b { font-size: 13px; } .esc-pdate small { font-size: 11px; color: var(--muted, #888); }
.esc-pdate.locked { opacity: .55; }
.esc-pcg { width: 100%; border-radius: 12px; aspect-ratio: 3 / 2; object-fit: cover; }
.esc-pchoices { display: grid; gap: 6px; } .esc-pme { font-weight: 700; color: #d9628f; }
/* 三星 in the escape lobby (owner, 2026-10-31) */
.esc-stars { display: grid; gap: 2px; margin: 8px 0; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, #f2b33d 10%, transparent); }
.esc-stars p { margin: 0; opacity: .65; } .esc-stars p.on { opacity: 1; font-weight: 600; } .esc-stars p.muted { opacity: 1; }
/* 每週詛咒 in the escape lobby (owner, 2026-10-31) */
.esc-curses { display: grid; gap: 10px; }
.esc-curse { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 10px; border-radius: 14px; background: color-mix(in srgb, #6b3fa0 12%, transparent); border: 1px solid color-mix(in srgb, #6b3fa0 30%, transparent); }
.esc-curse > img { width: 92px; height: 120px; object-fit: cover; border-radius: 10px; filter: saturate(.6) brightness(.85); }
.esc-curse-b { display: grid; gap: 3px; min-width: 0; } .esc-curse-b small { font-size: 12px; } .esc-curse-mine { color: #2f9e6e; font-weight: 600; }
.esc-curse-top { margin: 2px 0 4px 18px; padding: 0; font-size: 12px; } .esc-curse-top li.me { font-weight: 700; color: #6b3fa0; }
/* 無盡之塔 in the escape lobby (owner, 2026-10-31) */
.esc-towerbox { background: linear-gradient(160deg, color-mix(in srgb, #3c6eaa 14%, transparent), transparent); }
.esc-tower-top { margin: 0 0 0 20px; padding: 0; font-size: 13px; } .esc-tower-top li.me { font-weight: 700; color: #3c6eaa; }
/* 永久紀錄 (records-ui.js): the hall of fame, the career card (cells one height in every language), the tower's first climbers */
.esc-hall-k { display: block; margin: 10px 0 2px; font-weight: 700; color: var(--ink-3); }
.esc-hall-week { border-top: 1px solid var(--hair); padding: 6px 0; } .esc-hall-week > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.esc-hall .esc-row.me, .esc-board .esc-row.me { background: var(--accent-soft); border-radius: 8px; padding: 6px 8px; font-weight: 600; }
.esc-career { margin-top: 10px; } .esc-cr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: stretch; margin: 6px 0; }
.esc-cr { display: flex; flex-direction: column; justify-content: space-between; gap: 2px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 10px; min-width: 0; }
.esc-cr small { color: var(--ink-3); line-height: 1.3; overflow-wrap: anywhere; } .esc-cr b { font-size: 16px; overflow-wrap: anywhere; }
.esc-pulse { margin: 2px 0 6px; white-space: pre-line; font-weight: 600; } .esc-feed-l.rec { color: #a26b00; font-weight: 600; }
/* 展示室 and 家具行 (furniture-ui.js) */
.esc-room3d { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; background: #15100c; touch-action: pan-y; }
/* the room full screen and walked in (2026-11-22) */
.esc-roomstage { position: relative; }
.esc-roomstage .esc-walkbar, .esc-roomstage .esc-walkhint { display: none; }
.esc-roomstage.full { position: fixed; inset: 0; z-index: 9000; background: #000; }
.esc-roomstage.full .esc-room3d { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.esc-roomstage.full .esc-walkbar { display: flex; gap: 8px; position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 12px; flex-wrap: wrap; }
.esc-roomstage.full .esc-walkbar .btn { background: rgba(255,255,255,.92); color: #3a2618; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.esc-roomstage.full .esc-walkbar #roomStand { background: #ffcf4a; }
.esc-roomstage.full .esc-walkhint { display: block; position: absolute; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); margin: 0; text-align: center; color: #fff; font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,.8); pointer-events: none; }
.esc-roomstage .esc-walkpad { display: none; }
.esc-roomstage.full .esc-walkpad:not([hidden]) { display: block; position: absolute; left: 28px; bottom: calc(52px + env(safe-area-inset-bottom)); width: 96px; height: 96px; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); background: radial-gradient(circle, rgba(255,255,255,.35) 0 18px, rgba(255,255,255,.08) 19px); pointer-events: none; }
html.esc-noscroll, html.esc-noscroll body { overflow: hidden; }
.esc-room-btns { gap: 8px; margin-top: 8px; align-items: stretch; } .esc-room-btns .btn { flex: 1; }
.esc-inv { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .esc-inv-c.on { outline: 2px solid var(--accent); background: var(--accent-soft); }
.esc-furn-acts { gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.esc-shop-tabs { overflow-x: auto; flex-wrap: nowrap; } .esc-shop-tabs button { flex: none; white-space: nowrap; }
.esc-shop { display: grid; gap: 8px; margin-top: 8px; }
.esc-fcard { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 12px; }
.esc-fcard.got { background: var(--accent-soft); } .esc-fcard-i { font-size: 26px; text-align: center; }
.esc-fcard-t { display: flex; flex-direction: column; min-width: 0; } .esc-fcard-t small { color: var(--ink-3); overflow-wrap: anywhere; }
.esc-fcard-b { display: flex; flex-direction: column; gap: 4px; align-items: stretch; max-width: 44vw; } .esc-fcard-b small { text-align: right; }
.esc-giftwho { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
/* 偵探社的老街 (street-ui.js) */
.esc-street3d { display: block; width: 100%; aspect-ratio: 16 / 11; border-radius: 12px; background: #0b1024; touch-action: pan-y; margin: 6px 0; }
.esc-bustle { font-weight: 600; margin: 2px 0 6px; } #streetCollect { width: 100%; margin-bottom: 6px; } /* (城市建造: city.js) */
.esc-builds { display: grid; gap: 8px; } .esc-build { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 12px; }
.esc-build-i { font-size: 26px; text-align: center; } .esc-build-t { display: flex; flex-direction: column; min-width: 0; } .esc-build-t small { color: var(--ink-3); overflow-wrap: anywhere; }
.esc-visit-street { margin-top: 10px; }
/* 逛偵探社, 合作房 (neighbors-ui.js) */
.esc-browse, .esc-coops { display: grid; gap: 8px; margin-top: 8px; }
.esc-brow, .esc-coop { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--hair); border-radius: 12px; }
.esc-coop { grid-template-columns: minmax(0, 1fr) auto; } .esc-brow-i { font-size: 24px; } .esc-brow-t { display: flex; flex-direction: column; min-width: 0; } .esc-brow-t small { color: var(--ink-3); overflow-wrap: anywhere; }
/* 拼圖收藏 (puzzle-ui.js) */
.esc-pz { display: grid; grid-template-columns: repeat(var(--c), 1fr); gap: 2px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #2a2018; }
.esc-pz i { display: grid; place-items: center; background-size: calc(var(--c) * 100%) calc(var(--r) * 100%); font-style: normal; font-size: 11px; color: #c8b8a0; }
.esc-pz i:not(.on) { background-image: none !important; background: #3a2e24; } .esc-pz.big { margin: 8px 0; } .esc-pz.big i { font-size: 16px; }
.esc-pzlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0; align-items: stretch; }
.esc-pzcard { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--hair); border-radius: 12px; background: none; text-align: left; min-width: 0; }
.esc-pzcard b { font-size: 13px; overflow-wrap: anywhere; } .esc-pzcard small { color: var(--ink-3); } .esc-pzcard.done { border-color: #c9a052; background: rgba(201, 160, 82, .12); }
.esc-pz-pm { display: block; width: 100%; border-radius: 8px; margin: 6px 0; }
.esc-pzgo { display: block; text-align: center; text-decoration: none; }
.esc-pzregion { border-top: 1px solid var(--hair); padding: 6px 0; } .esc-pzregion > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
/* 三個遊戲統一版型 (game-shell.js) */
.game-lobby { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.game-hero { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.game-hero .game-art, .game-hero .mc-fan { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; overflow: hidden; } .game-hero .mc-fan { position: relative; transform: scale(.5); transform-origin: left center; width: 64px; }
.game-hero-t { display: flex; flex-direction: column; min-width: 0; } .game-title { font-size: 19px; } .game-tag, .game-sub { margin: 2px 0 0; overflow-wrap: anywhere; } .game-how { white-space: nowrap; align-self: start; }
/* (one card for all three: the games' own hero looks (.mc-hero, .esc-hero, .tale-hero) give way inside the shell) */
.game-lobby .game-hero.game-hero { background: var(--surface-solid); color: var(--ink); border: 1px solid var(--hair); text-align: left; box-shadow: none; padding: 14px; }
.game-lobby .game-hero .game-tag { color: var(--ink-2); } .game-lobby .game-hero .game-sub { color: var(--ink-3); } .game-lobby .game-hero .game-how { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.game-tabs { position: sticky; top: 0; z-index: 3; background: var(--surface-solid); border: 1px solid var(--hair); box-shadow: 0 6px 14px -10px rgba(0,0,0,.35); overflow-x: auto; scrollbar-width: none; }
.game-tabs::-webkit-scrollbar { display: none; } .game-tabs button { flex: 1 0 auto; white-space: nowrap; font-size: 13.5px; padding-left: 4px; padding-right: 4px; }
.game-pane[hidden] { display: none; } .game-col { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.game-agency .btn { margin-top: 8px; text-decoration: none; text-align: center; display: block; } .game-gives { margin: 6px 0 0 18px; padding: 0; }
/* 不屈榜 (grit-ui.js) */
.esc-grit .esc-row { gap: 10px; align-items: baseline; } .esc-grit-r { text-align: right; min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
.esc-tough { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hair); }
.esc-tough-t { display: flex; flex-direction: column; min-width: 0; } .esc-tough-t small { color: var(--ink-3); } .esc-tough .btn { flex: none; text-decoration: none; }
.esc-season { margin: 4px 0 8px; padding: 6px 10px; border-radius: 10px; background: var(--accent-soft); font-weight: 600; }
.esc-tower-firsts { margin-top: 8px; } .esc-tower-firsts p { margin: 2px 0; } .esc-tower-firsts p.me { font-weight: 700; color: #3c6eaa; }
.esc-ends { display: grid; gap: 2px; margin: 4px 0 8px; } .esc-ends p { margin: 0; } .esc-ends p.on { font-weight: 600; }
.esc-curse .row { flex-wrap: wrap; } .esc-curse .row .btn { flex: 1 1 auto; } /* (narrow phones: the two buttons stack, nothing runs off the card) */
/* 配對 in the escape lobby (owner, 2026-10-31: 揪團沒人理) */
.esc-livebox { display: grid; gap: 8px; border: 1px solid color-mix(in srgb, #e8433a 30%, transparent); background: color-mix(in srgb, #e8433a 6%, transparent); }
.esc-live-list { display: grid; gap: 6px; }
.esc-live { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: center; padding: 6px; border-radius: 12px; background: var(--surface, #fff); }
.esc-live img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; } .esc-live-b { display: grid; min-width: 0; } .esc-live-b small { font-size: 12px; color: var(--muted, #888); }
.esc-live-go { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: stretch; } .esc-live-go .seg { align-items: stretch; } /* (the level switch as tall as the button, in every language: 2026-11-02) */ .esc-livebox details summary { cursor: pointer; }
/* 收藏 (escape prizes-ui.js) */
.esc-next { display: grid; gap: 4px; margin: -4px 4px 8px; } .esc-next-bar { display: block; height: 5px; border-radius: 3px; background: var(--line, #e5ded2); overflow: hidden; } .esc-next-bar b { display: block; height: 100%; background: var(--gold, #d4a94a); }
.esc-prizes { display: grid; gap: 12px; } .esc-prize-mode { display: grid; gap: 8px; }
.esc-prize { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line, #e5ded2); opacity: .7; }
.esc-prize.got { opacity: 1; } .esc-prize.on { border-color: var(--gold, #d4a94a); box-shadow: 0 0 0 1px var(--gold, #d4a94a) inset; }
.esc-prize-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 20px; border-radius: 50%; background: rgba(0, 0, 0, .05); }
.esc-prize.got .esc-prize-icon { box-shadow: 0 0 10px var(--c, rgba(212, 169, 74, .55)); }
.esc-prize-txt { flex: 1; min-width: 0; display: grid; gap: 2px; } .esc-prize-txt small { opacity: .75; } .esc-prize-n { flex: none; opacity: .7; }
/* 偵探搭檔 round 3: chapters 5 and 7, the skill, the foreshadowing */
.esc-parc.done small { opacity: .7; } .esc-pskill { margin: 6px 0; } .esc-pfore { font-style: italic; opacity: .85; border-left: 3px solid var(--gold, #d4a94a); padding-left: 8px; }
.esc-pend { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(212, 169, 74, .12); }
/* (網友, 2026-11-01: 手機狂點時會選到字、會放大) No zoom on a quick double tap anywhere (pinch still zooms, for anyone who
   needs bigger text); buttons, tabs and chips never select as text. Chat and everything typed stay selectable. */
html { touch-action: manipulation; }
button, .btn, a.btn, .chip, .seg button, [role="tab"], .esc-pch, .esc-plook, .esc-pgift, .esc-prize, .esc-story { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
/* 大家正在玩 (live-ui.js): the stories being played now, the latest escapes */
.esc-hot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .esc-hot-t { opacity: .75; margin-right: 2px; } .esc-hot-c { text-decoration: none; }
.esc-feed { display: grid; gap: 2px; } .esc-feed-l { margin: 0; }
/* 偵探社 (escape/agency-ui.js, 2026-11-01; owner: 精美藝術、女性特別喜愛；有些女生喜歡酷酷的或可愛的): three looks, each its own
   colours, type and shapes: 典雅 ivory cards and gold on walnut, 酷 neon on night, 可愛 pink and mint, round and soft. */
.ag { --ag-bg: linear-gradient(180deg, #1d1611, #120d0a); --ag-card: #f7efe0; --ag-ink: #2b2118; --ag-sub: #7a6a56; --ag-acc: #b8893a; --ag-acc2: #1f4d3a; --ag-line: #e2d2b2; --ag-r: 14px;
  --ag-head: #f3e2b8; --ag-font: "Noto Serif TC", "Songti TC", "PMingLiU", serif; --ag-btn: linear-gradient(180deg, #d4a94e, #a87a2c); --ag-btnink: #1d1408; --ag-glow: 0 0 0 1px rgba(216,178,90,.35), 0 10px 24px -14px rgba(0,0,0,.6);
  background: var(--ag-bg); color: var(--ag-ink); border-radius: 18px; padding: 14px 12px 18px; display: grid; gap: 14px; font-family: var(--ag-font); }
.ag[data-style="cool"] { --ag-bg: radial-gradient(120% 60% at 50% 0%, #142030 0%, #0a0d12 60%); --ag-card: #121821; --ag-ink: #e6ecf5; --ag-sub: #8a96a8; --ag-acc: #3fe0d0; --ag-acc2: #ff3d7f; --ag-line: #243040;
  --ag-head: #c9fff8; --ag-font: "Noto Sans TC", system-ui, sans-serif; --ag-btn: linear-gradient(180deg, #3fe0d0, #22a89c); --ag-btnink: #041412; --ag-glow: 0 0 0 1px rgba(63,224,208,.25), 0 0 18px -6px rgba(63,224,208,.35); --ag-r: 10px; }
.ag[data-style="cute"] { --ag-bg: linear-gradient(180deg, #ffeef6, #f4efff); --ag-card: #ffffff; --ag-ink: #5a3a4a; --ag-sub: #a07a8a; --ag-acc: #ff6fae; --ag-acc2: #5fcab8; --ag-line: #ffd3e4;
  --ag-head: #ff5fa2; --ag-font: "Noto Sans TC", "Arial Rounded MT Bold", system-ui, sans-serif; --ag-btn: linear-gradient(180deg, #ff9ac6, #ff6fae); --ag-btnink: #ffffff; --ag-glow: 0 6px 18px -8px rgba(255,111,174,.55); --ag-r: 22px; }
.ag h2, .ag h3, .ag h4 { margin: 0; color: var(--ag-head); letter-spacing: .04em; }
.ag[data-style="cool"] h2, .ag[data-style="cool"] h3 { text-shadow: 0 0 10px rgba(63,224,208,.55); letter-spacing: .08em; }
.ag[data-style="cute"] h2, .ag[data-style="cute"] h3 { font-weight: 900; }
.ag .small { font-size: 13px; } .ag .muted { color: var(--ag-sub); }
.ag-sheet { background: var(--ag-bg); margin: -8px -12px; padding: 16px 14px; border-radius: 18px 18px 0 0; }
.ag-sheet h3, .ag-sheet h4 { color: var(--ag-head); } .ag-sheet p { color: inherit; }
.ag-head, .ag-sec, .ag-hero, .ag-field, .ag-letter, .ag-odds, .ag-result { background: var(--ag-card); border: 1px solid var(--ag-line); border-radius: var(--ag-r); padding: 12px; box-shadow: var(--ag-glow); }
.ag[data-style="elegant"] .ag-sec h3, .ag[data-style="elegant"] .ag-head h2 { color: #6a4a1a; }
.ag[data-style="elegant"] .ag-sec h3::after { content: ' ❦'; color: var(--ag-acc); font-size: .8em; }
.ag[data-style="cute"] .ag-sec h3::after { content: ' ✧'; color: var(--ag-acc2); }
.ag-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-name { font-size: 22px; }
.ag-fund, .ag-pill { background: var(--ag-acc); color: var(--ag-btnink); border-radius: 999px; padding: 3px 10px; font-weight: 800; font-size: 13px; white-space: nowrap; font-family: var(--sys, system-ui); }
.ag-fame { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--ag-sub); }
.ag-bar { display: block; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ag-line) 70%, transparent); overflow: hidden; }
.ag-bar b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--ag-acc), var(--ag-acc2)); transition: width .6s ease; }
.ag-stage { position: relative; border-radius: calc(var(--ag-r) + 4px); overflow: hidden; box-shadow: var(--ag-glow); }
.ag-cv { display: block; width: 100%; height: min(62vh, 440px); touch-action: pan-y; cursor: grab; }
.ag-preview { height: min(44vh, 320px); }
.ag-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(0,0,0,.45); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 99px; pointer-events: none; white-space: nowrap; font-family: var(--sys, system-ui); }
.ag-mailbadge { position: absolute; top: 10px; right: 10px; background: var(--ag-acc2); color: #fff; font-weight: 800; padding: 4px 10px; border-radius: 99px; animation: agBob 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes agBob { 50% { transform: translateY(-4px); } }
.ag-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ag-q { display: grid; justify-items: center; gap: 2px; border: 1px solid var(--ag-line); background: var(--ag-card); color: var(--ag-ink); border-radius: var(--ag-r); padding: 10px 4px; font-family: inherit; box-shadow: var(--ag-glow); }
.ag-q b { font-size: 13px; } .ag-q small { font-size: 12px; color: var(--ag-sub); font-family: var(--sys, system-ui); } .ag-qi { font-size: 22px; }
.ag-q.hot { border-color: var(--ag-acc); animation: agPulse 2s ease-in-out infinite; } @keyframes agPulse { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ag-acc) 35%, transparent); } }
.ag-sec { display: grid; gap: 10px; scroll-margin-top: 64px; } .ag-sechead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ag-sec.flash { animation: agFlash 1.2s ease; } @keyframes agFlash { 30% { box-shadow: 0 0 0 4px var(--ag-acc); } }
.ag-cases, .ag-outs, .ag-ups, .ag-files { display: grid; gap: 10px; }
.ag-case, .ag-out, .ag-up, .ag-file { border: 1px solid var(--ag-line); border-radius: calc(var(--ag-r) - 4px); padding: 10px; display: grid; gap: 6px; background: color-mix(in srgb, var(--ag-card) 92%, var(--ag-acc)); }
.ag[data-style="elegant"] .ag-case { background: #fbf6ea url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M0 8L8 0' stroke='%23efe2c6' stroke-width='.6'/%3E%3C/svg%3E"); }
.ag-casetop, .ag-outtop, .ag-casefoot, .ag-outfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ag-kind { font-size: 12px; color: var(--ag-sub); font-family: var(--sys, system-ui); } .ag-stars { color: var(--ag-acc); letter-spacing: 1px; font-size: 13px; white-space: nowrap; }
.ag-casename { font-size: 16px; } .ag-case p { margin: 0; line-height: 1.55; }
.ag .btn { font-family: var(--sys, system-ui); }
.ag-sendbtn, .ag-collect, .ag-cta { background: var(--ag-btn) !important; color: var(--ag-btnink) !important; border: 0 !important; font-weight: 800; box-shadow: var(--ag-glow); }
.ag-cta { width: 100%; min-height: 50px; font-size: 17px; border-radius: calc(var(--ag-r) + 4px); }
.ag-cta:disabled, .ag-sendbtn:disabled { opacity: .45; }
.ag-teamrow { display: flex; gap: 6px; } .ag-teamrow img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ag-acc); }
.ag-out.ready { border-color: var(--ag-acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ag-acc) 40%, transparent); }
.ag-out.ready .ag-left { color: var(--ag-acc); font-weight: 800; }
.ag-up { grid-template-columns: auto 1fr auto; align-items: center; } .ag-upicon { font-size: 26px; } .ag-upmid { display: grid; gap: 2px; } .ag-pips { color: var(--ag-acc); letter-spacing: 2px; font-size: 12px; }
.ag-up small { color: var(--ag-sub); }
.ag-looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ag-look { display: grid; gap: 4px; justify-items: center; text-align: center; border: 2px solid var(--ag-line); background: var(--ag-card); color: var(--ag-ink); border-radius: var(--ag-r); padding: 10px 6px; font-family: inherit; }
.ag-look small { font-size: 11.5px; color: var(--ag-sub); line-height: 1.4; } .ag-look.on { border-color: var(--ag-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ag-acc) 30%, transparent); } .ag-lookicon { font-size: 26px; }
.ag-looks.small .ag-look { padding: 8px 4px; }
.ag-field { display: grid; gap: 8px; } .ag-field > span { font-weight: 800; color: var(--ag-head); }
.ag[data-style="elegant"] .ag-field > span { color: #6a4a1a; }
.ag-field input, #agRename { width: 100%; font-size: 17px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ag-line); background: color-mix(in srgb, var(--ag-card) 85%, #fff); color: var(--ag-ink); font-family: inherit; }
.ag-firsts, .ag-team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ag-face { display: grid; justify-items: center; gap: 2px; border: 2px solid transparent; background: color-mix(in srgb, var(--ag-card) 90%, var(--ag-acc)); color: var(--ag-ink); border-radius: var(--ag-r); padding: 6px 2px; font-family: inherit; position: relative; }
.ag-face img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--ag-r) - 4px); } .ag-face b { font-size: 13px; } .ag-face small { font-size: 11px; color: var(--ag-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ag-face.on { border-color: var(--ag-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ag-acc) 30%, transparent); } .ag-face.on::after { content: '✓'; position: absolute; top: 4px; right: 6px; background: var(--ag-acc); color: var(--ag-btnink); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.ag-face.fits:not(.busy) small { color: var(--ag-acc); font-weight: 700; } .ag-face.busy { opacity: .45; filter: grayscale(.7); }
.ag-letter { display: grid; gap: 6px; } .ag[data-style="elegant"] .ag-letter { background: #fbf3e2; border-color: #d9c39a; } .ag-letter p { margin: 0; line-height: 1.6; }
.ag-odds { display: grid; gap: 6px; } .ag-oddshead { display: flex; justify-content: space-between; align-items: baseline; } .ag-pct { font-size: 26px; font-weight: 900; color: var(--ag-acc); font-family: var(--sys, system-ui); }
.ag-why { margin: 0; font-size: 13px; color: var(--ag-sub); } .ag-why.up { color: var(--ag-acc2); } .ag[data-style="cool"] .ag-why.up { color: var(--ag-acc); } .ag-why.down { color: #d0402a; }
.ag-sheet .ag-team, .ag-sheet .ag-odds, .ag-sheet h4, .ag-sheet .ag-cta { margin-top: 10px; }
.ag-result { position: relative; display: grid; gap: 6px; margin-top: 10px; animation: agIn .5s ease both; } .ag-result p { margin: 0; line-height: 1.6; }
@keyframes agIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.ag-stamp { justify-self: start; border: 3px solid currentColor; color: #b3122e; padding: 2px 10px; border-radius: 8px; font-weight: 900; transform: rotate(-6deg); letter-spacing: .2em; font-size: 18px; }
.ag-result.no .ag-stamp, .ag-file.no .ag-stamp { color: #7a7a86; } .ag-stamp.small { font-size: 12px; padding: 0 6px; border-width: 2px; }
.ag-gains { display: flex; gap: 12px; font-weight: 800; color: var(--ag-acc); font-family: var(--sys, system-ui); } .ag-say { color: var(--ag-sub); font-style: italic; }
.ag-fameup { background: var(--ag-btn); color: var(--ag-btnink); padding: 10px; border-radius: var(--ag-r); font-weight: 800; text-align: center; animation: agIn .6s .3s ease both; }
.ag-keep { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: center; border-radius: calc(var(--ag-r) - 2px); padding: 8px; background: color-mix(in srgb, var(--ag-card) 80%, var(--ag-acc)); position: relative; overflow: hidden; animation: agPop .7s .25s cubic-bezier(.2,1.6,.4,1) both; }
.ag-keep::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.65) 50%, transparent 60%); transform: translateX(-100%); animation: agShine 1.4s .8s ease both; pointer-events: none; }
@keyframes agPop { from { opacity: 0; transform: scale(.6); } } @keyframes agShine { to { transform: translateX(100%); } }
.ag-keep .ag-tag { color: var(--ag-acc2); font-weight: 900; } .ag[data-style="cool"] .ag-keep .ag-tag { color: var(--ag-acc2); }
.ag-thumb { width: 84px; height: 84px; object-fit: contain; display: block; } .ag-thumb.big { width: 180px; height: 180px; margin: 0 auto; filter: drop-shadow(0 10px 14px rgba(0,0,0,.25)); }
.ag-coltabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .ag-coltabs button { flex: none; white-space: nowrap; font-size: 12.5px; } .ag-coltabs button.on { background: var(--ag-acc); color: var(--ag-btnink); font-weight: 800; }
.ag-colgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.ag-colcard { display: grid; justify-items: center; gap: 2px; text-align: center; border: 2px solid var(--ag-line); background: color-mix(in srgb, var(--ag-card) 94%, var(--ag-acc)); color: var(--ag-ink); border-radius: var(--ag-r); padding: 8px 4px; position: relative; font-family: inherit; min-height: 150px; }
.ag-colcard b { font-size: 12.5px; line-height: 1.3; } .ag-colcard small { font-size: 11px; color: var(--ag-sub); } .ag-colcard .ag-lv { color: var(--ag-acc); font-weight: 800; }
.ag-colcard.r2 { border-color: #8aa8ff; } .ag-colcard.r3 { border-color: #e8c35a; box-shadow: 0 0 14px -4px rgba(232,195,90,.8); }
.ag-colcard.locked { opacity: .7; } .ag-shadow { width: 84px; height: 84px; display: grid; place-items: center; font-size: 40px; font-weight: 900; color: color-mix(in srgb, var(--ag-ink) 25%, transparent); background: color-mix(in srgb, var(--ag-ink) 8%, transparent); border-radius: 50%; }
.ag-colcard.shown { outline: 3px solid var(--ag-acc2); outline-offset: -3px; } .ag-onshow { position: absolute; top: 4px; right: 6px; font-size: 14px; }
.ag-file { grid-template-columns: auto 1fr; align-items: center; } .ag-file small { grid-column: 1 / -1; color: var(--ag-sub); }
.ag-setup { display: grid; gap: 12px; } .ag-hero p { margin: 6px 0 0; line-height: 1.6; }
#agItem { text-align: center; display: grid; gap: 8px; justify-items: center; } #agItem .ag-cta { width: 100%; }
.esc-tabs { overflow-x: auto; scrollbar-width: none; } .esc-tabs::-webkit-scrollbar { display: none; } .esc-tabs button { flex: 1 0 auto; }
.ag .btn:disabled { opacity: .42; filter: grayscale(.5); }
/* 偵探社 batch 2: the staff, the pairs' stories, friends and visits (escape/agency-ui.js) */
.ag-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ag-mini { display: flex; align-items: center; gap: 4px; width: 100%; } .ag-mini .ag-bar { flex: 1; height: 5px; } .ag-mini em { font-style: normal; font-size: 13px; }
.ag-bar.ag-en b { background: linear-gradient(90deg, #f2b84a, #6fd27a); }
.ag-staffs { display: grid; gap: 10px; }
.ag-staff { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--ag-line); border-radius: calc(var(--ag-r) - 4px); padding: 8px; background: color-mix(in srgb, var(--ag-card) 92%, var(--ag-acc)); }
.ag-staff img { width: 64px; height: 64px; border-radius: calc(var(--ag-r) - 6px); object-fit: cover; } .ag-staff.busy img { filter: grayscale(.5); }
.ag-staffmid { display: grid; gap: 3px; min-width: 0; } .ag-staffmid small { font-size: 12px; }
.ag-meter { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; } .ag-meter .ag-bar { height: 6px; }
.ag-stories { display: grid; gap: 8px; margin-top: 4px; } .ag-story { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ag-story > span { font-weight: 700; flex: 1; min-width: 120px; }
.ag-line { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: start; margin-top: 10px; animation: agIn .5s ease both; } .ag-line.r { grid-template-columns: 1fr 52px; } .ag-line.r img { order: 2; }
.ag-line img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ag-acc); }
.ag-line p { margin: 0; background: var(--ag-card); border: 1px solid var(--ag-line); border-radius: 14px; padding: 8px 10px; display: grid; gap: 2px; line-height: 1.55; } .ag-line p b { font-size: 12px; color: var(--ag-acc); }
.ag-friends { display: grid; gap: 10px; } .ag-friends .row .btn { flex: 1; }
.ag-links { display: grid; gap: 8px; } .ag-link { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; border: 1px solid var(--ag-line); border-radius: calc(var(--ag-r) - 4px); padding: 8px; }
.ag-link.couple { border-color: #ff7eb6; background: color-mix(in srgb, var(--ag-card) 88%, #ff7eb6); } .ag-linkicon { font-size: 26px; } .ag-linkmid { display: grid; gap: 2px; }
.ag-linkbtns { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; } .ag-linkbtns .btn { flex: 1 0 auto; }
.ag-guests { display: grid; gap: 3px; } .ag-guests small { color: var(--ag-sub); }
.ag-linkbox { display: block; word-break: break-all; font-size: 12px; padding: 8px; border-radius: 10px; background: color-mix(in srgb, var(--ag-card) 80%, var(--ag-ink)); margin: 8px 0; color: var(--ag-ink); }
.ag-reacts { margin-top: 10px; display: grid; gap: 6px; } .ag-reacts .row .btn { flex: 1; }
.ag-with { color: var(--ag-acc2); font-weight: 700; } .ag[data-style="cool"] .ag-with { color: var(--ag-acc); }
.ag-moodline { display: block; } .ag-moodline.up { color: #3a9a5a; } .ag-moodline.down { color: #c0503a; }
.ag-storybtn { width: 100%; margin-top: 8px; background: color-mix(in srgb, var(--ag-card) 80%, var(--ag-acc2)) !important; color: var(--ag-ink) !important; font-weight: 800; }
.ag-coopbtn { width: 100%; margin-top: 8px; }
.ag-out.wait { border-style: dashed; } .ag-out.wait .row .btn { flex: 1; }
.agency-card .btn { margin-top: 6px; }
/* 偵探社 batch 3: the week's big case */
.ag-big { display: grid; gap: 6px; } .ag-big p { margin: 0; line-height: 1.55; }
.ag-bigart { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--ag-r) - 4px); }
.ag-bigpay { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; color: var(--ag-sub); }
.ag-roomlinks { display: grid; gap: 4px; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--ag-line); } .ag-roomlinks small { line-height: 1.5; }

/* Quick taps on buttons and links never zoom the page (owner, 2026-11-04: 點太多下會放大). The game pages: js/nozoom.js. */
button, a, [role="button"], .seg button, summary { touch-action: manipulation; }
/* (and no zoom when a text box is tapped on an iPhone: it zooms into any text under 16px) */
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: max(16px, 1em); }

/* The key art on top of a game's lobby (owner, 2026-11-04: 畫風與風格是首要): the picture across the card, the characters in
   front, the name and one line, one big button; nothing else (？玩法 holds the words). */
.game-lobby .game-hero.game-kv { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(300px, 92vw, 430px); padding: 18px; border: 0; border-radius: 22px; overflow: hidden; color: #fff; text-align: left;
  background: #120d14 var(--kv) center / cover no-repeat; box-shadow: 0 14px 34px rgba(20, 10, 30, .28); isolation: isolate; }
.game-kv::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(12, 8, 16, .94) 0%, rgba(12, 8, 16, .62) 34%, rgba(12, 8, 16, .08) 66%, rgba(12, 8, 16, 0) 100%); pointer-events: none; }
.kv-cast { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.kv-cut { position: absolute; bottom: 12%; height: 92%; width: auto; max-width: 70%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); animation: kvIn .7s ease-out both; animation-delay: calc(var(--i) * .12s); }
.kv-cast.n1 .kv-cut { right: 0; }
.kv-cast.n2 .kv-cut:nth-child(1) { right: 30%; height: 80%; } .kv-cast.n2 .kv-cut:nth-child(2) { right: 0; }
.kv-cast.n3 .kv-cut:nth-child(1) { left: 0; height: 74%; } .kv-cast.n3 .kv-cut:nth-child(2) { right: 22%; height: 86%; } .kv-cast.n3 .kv-cut:nth-child(3) { right: 0; height: 94%; }
.kv-card { position: absolute; top: 9%; width: 34%; max-width: 170px; aspect-ratio: 600 / 877; object-fit: cover; border-radius: 14px; border: 2px solid rgba(255, 236, 190, .85); box-shadow: 0 12px 26px rgba(0, 0, 0, .5); animation: kvIn .7s ease-out both; animation-delay: calc(var(--i) * .12s); }
.kv-cast .kv-card:nth-child(1) { right: 30%; transform: rotate(-7deg); } .kv-cast .kv-card:nth-child(2) { right: 6%; transform: rotate(5deg); top: 13%; } .kv-cast .kv-card:nth-child(3) { right: 52%; transform: rotate(-12deg); top: 18%; width: 28%; }
.kv-cast.n1 .kv-card { right: 8%; transform: rotate(4deg); width: 40%; }
@keyframes kvIn { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .kv-cut, .kv-card { animation: none; } }
.kv-t { position: relative; z-index: 2; display: grid; gap: 4px; max-width: 30em; }
.game-lobby .game-kv .kv-title { font-size: clamp(28px, 8.5vw, 38px); font-weight: 900; letter-spacing: .03em; line-height: 1.15; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .7); }
.game-lobby .game-kv .kv-tag { margin: 0 0 10px; font-size: 15px; color: rgba(255, 246, 228, .92); text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.game-lobby .game-kv .kv-go { min-height: 56px; font-size: 19px; font-weight: 800; border-radius: 16px; border: 0; color: #2a1806; background: linear-gradient(180deg, #ffe08a, #f2b33d); box-shadow: 0 6px 0 #b9781d, 0 12px 24px rgba(0, 0, 0, .35); }
.game-lobby .game-kv .kv-go:active { transform: translateY(3px); box-shadow: 0 3px 0 #b9781d, 0 6px 14px rgba(0, 0, 0, .3); }
.game-lobby .game-kv .game-how { position: absolute; z-index: 3; top: 12px; right: 12px; background: rgba(12, 8, 16, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.cw-kvwrap { margin-bottom: 4px; } .cw-kvwrap .kv-cut[src*="icons/claw"] { height: 64%; bottom: 20%; }
/* 今日腦筋急轉彎 (密室 3.0): three riddles, four answers each */
.esc-teasers { display: grid; gap: 14px; } .esc-tq { display: grid; gap: 8px; } .esc-tq-q { margin: 0; font-weight: 600; line-height: 1.6; }
.esc-tq-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .esc-tq-o { min-height: 44px; border-radius: 12px; border: 1px solid var(--hair); background: var(--surface-solid); color: var(--ink); font: inherit; padding: 6px 10px; }
.esc-tq-o.right { border-color: #2e9e6a; background: rgba(46, 158, 106, .12); font-weight: 700; } .esc-tq-o.wrong { border-color: #c8553d; background: rgba(200, 85, 61, .1); }
.esc-tq-o:disabled { opacity: 1; } .esc-teaser-foot { display: grid; gap: 6px; justify-items: start; }
/* 我的老街 full screen (2026-11-05): the lane fills the phone; a glass bar on top (town, fund, fame, income, bustle), the
   collect-all button below; bubbles over the buildings follow them on screen. Under sheets (20) and toasts (40). */
.esc-street-full { width: 100%; margin: 4px 0 8px; }
body.esc-cityfs-on { overflow: hidden; }
.esc-cityfs { position: fixed; inset: 0; z-index: 15; background: #0b1024; overflow: hidden; }
.esc-cityfs-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.esc-cityfs-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(env(safe-area-inset-top, 0px) + 10px) max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px)); display: flex; gap: 10px; align-items: flex-start; pointer-events: none; }
.esc-cityfs-top > * { pointer-events: auto; }
.esc-cityfs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.esc-cityfs-x { flex: none; width: 34px; height: 34px; margin: -4px -6px -4px 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 17px; }
.esc-cityfs-head { flex: 1; min-width: 0; display: grid; gap: 5px; padding: 8px 12px; border-radius: 16px; background: rgba(20, 16, 28, .62); color: #fff; backdrop-filter: blur(8px); }
.esc-cityfs-head b { font-size: 15px; letter-spacing: .02em; }
.esc-cityfs-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.esc-cityfs-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #ffd56a, #ff9a3c); transition: width .6s ease; }
.esc-cityfs-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.esc-cityfs-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 12px) max(14px, env(safe-area-inset-left, 0px)); display: grid; gap: 8px; justify-items: center; background: linear-gradient(to top, rgba(10, 8, 18, .7), rgba(10, 8, 18, 0)); }
.esc-cityfs-bottom .btn { width: min(420px, 100%); }
.esc-cityfs-how { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .82); text-align: center; }
.esc-cityfs-tabs { width: min(420px, 100%); }
.esc-cityfs-bubs { position: absolute; inset: 0; pointer-events: none; }
.esc-cityfs-bub { position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; border-radius: 999px; padding: 6px 11px; font-size: 14px; font-weight: 700; color: #3a2400; background: #ffe08a; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); white-space: nowrap; font-variant-numeric: tabular-nums; }
.esc-cityfs-bub::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #ffe08a; }
.esc-cityfs-bub.up { background: #7fe0a8; color: #0f3a22; } .esc-cityfs-bub.up::after { border-top-color: #7fe0a8; } .esc-cityfs-bub.new { background: #fff; color: #5a3a1a; padding: 4px 12px; font-size: 18px; } .esc-cityfs-bub.new::after { border-top-color: #fff; }
.esc-cityfs-bub.full { animation: cityBub 1.1s ease-in-out infinite; }
@keyframes cityBub { 50% { box-shadow: 0 0 0 6px rgba(255, 224, 138, .35), 0 3px 10px rgba(0, 0, 0, .35); } }
.esc-cityfs-coin { position: fixed; z-index: 16; font-size: 22px; pointer-events: none; transition: left .7s cubic-bezier(.5, 0, .7, 1), top .7s cubic-bezier(.3, -.4, .7, 1), opacity .7s; }
@media (prefers-reduced-motion: reduce) { .esc-cityfs-bub.full { animation: none; } .esc-cityfs-coin { transition: none; } }
/* 現在就想聊 (2026-11-08) */
.quick-match { display: grid; gap: 4px; width: 100%; margin: 8px 0; padding: 14px; border: 0; border-radius: 16px; text-align: left; font: inherit; color: #fff; background: linear-gradient(120deg, #ff5a8a, #ff9a3a); box-shadow: 0 4px 12px rgba(255, 90, 138, .3); cursor: pointer; }
.quick-match b { font-size: 18px; } .quick-match small, .quick-match .small { color: rgba(255, 255, 255, .92); }
.quick-wait { display: grid; gap: 10px; text-align: center; } .quick-wait #quickLeft { font-size: 32px; font-variant-numeric: tabular-nums; }
.live-tag.today { background: #e8f4ff; color: #2a6ab0; } .live-tag.week { background: #f2efe8; color: #7a6450; }
.live-tag.fresh { background: #fff3d6; color: #a05a00; } .live-tag.fresh::before { display: none; } /* (新朋友: the first three days, 2026-11-10) */

/* 密室 4.0 繼續冒險 (journey-ui.js): the play tab's one main card, and the side games folded under 更多玩法 */
.esc-journey { display: grid; gap: 10px; padding: 0 0 14px; overflow: hidden; border: 2px solid #e8a35a; background: linear-gradient(170deg, #2c1a0c, #170d07); color: #f6e7cf; }
.esc-journey > :not(.esc-jart) { margin-left: 14px; margin-right: 14px; } .esc-journey .small { color: #ecdcc0; margin-top: 0; margin-bottom: 0; } .esc-journey .hint:empty { display: none; }
.esc-jart { position: relative; height: 168px; background: #241408 center / cover no-repeat; display: flex; align-items: flex-end; }
.esc-jart::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(23, 13, 7, 1) 0%, rgba(23, 13, 7, .1) 60%, rgba(23, 13, 7, .35) 100%); }
.esc-jart .esc-jt { position: absolute; top: 10px; left: 12px; z-index: 1; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(0, 0, 0, .55); color: #ffe2a0; }
.esc-jname { position: relative; z-index: 1; display: grid; gap: 2px; padding: 0 14px 4px; } .esc-jname b { font-size: 24px; line-height: 1.2; color: #fff; text-shadow: 0 2px 8px #000; } .esc-jname span { font-size: 15px; color: #ffd98a; font-weight: 700; }
.esc-jpips { display: flex; gap: 8px; } .esc-jpips i { flex: 1; height: 30px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .45); }
.esc-jpips i.done { background: #5b4312; color: #ffd86a; } .esc-jpips i.next { background: #f2b84a; color: #2a1804; box-shadow: 0 0 0 2px rgba(242, 184, 74, .35); }
.esc-journey .esc-jgo { white-space: normal; height: auto; min-height: 52px; line-height: 1.3; padding: 10px 12px; font-size: 17px; }
.esc-journey .btn.ghost { background: transparent; color: #f6e7cf; border-color: rgba(246, 231, 207, .35); }
.esc-jbar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; } .esc-jbar i { display: block; height: 100%; background: linear-gradient(90deg, #f2b84a, #ffe9a8); }
.esc-journey .esc-jroad { color: #cdb992; font-size: 12px; }
.esc-more { display: grid; gap: 12px; } .esc-more > summary { cursor: pointer; padding: 14px 16px; border-radius: 16px; background: var(--card, #fffdf8); border: 1px solid var(--line, #e6ddd0); font-weight: 700; list-style: none; } .esc-more > summary::-webkit-details-marker { display: none; }
.esc-more > summary::after { content: "＋"; float: right; opacity: .6; } .esc-more[open] > summary::after { content: "－"; } .esc-more[open] > summary { margin-bottom: 12px; } .esc-more > * + * { margin-top: 12px; }
.esc-journey > .btn { width: auto; min-width: 0; }
.game-lobby .game-hero.game-kv.kv-slim { min-height: 84px; padding: 12px 16px; justify-content: center; } .game-kv.kv-slim .kv-cast, .game-kv.kv-slim .kv-go, .game-kv.kv-slim .kv-tag { display: none; } .game-lobby .game-kv.kv-slim .kv-title { font-size: 24px; }
/* 密室 4.0 我的進度 (journey-ui.js hubSection): my file, the collection, the agency: three doors on the play tab */
.esc-hub { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; margin-top: 12px; } .esc-hubc { display: grid; gap: 2px; justify-items: start; text-align: left; padding: 10px 10px 8px; border-radius: 16px; border: 1px solid var(--line, #e6ddd0); background: var(--card, #fffdf8); color: inherit; font: inherit; min-height: 78px; min-width: 0; touch-action: manipulation; }
.esc-hubc b { font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; } .esc-hubc small { font-size: 11px; opacity: .65; line-height: 1.3; } .esc-hubi { font-size: 20px; line-height: 1; }
.esc-hubbar { display: block; width: 100%; height: 4px; border-radius: 4px; background: rgba(0, 0, 0, .1); overflow: hidden; margin-top: 2px; } .esc-hubbar i { display: block; height: 100%; background: #e8a35a; }
/* 密室 4.0 E2 戰利品櫃 (trophy-ui.js): the cabinet in 收藏, the thing in the hand */
.esc-trophies { display: grid; gap: 8px; } .esc-tr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; } .esc-tr-n { font-size: 13px; font-weight: 700; color: #f0c75a; }
.esc-tr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.esc-tr { display: grid; gap: 2px; justify-items: center; padding: 6px 4px 7px; border-radius: 14px; border: 1.5px solid var(--tc, rgba(255, 255, 255, .1)); background: rgba(255, 255, 255, .04); color: inherit; font: inherit; min-width: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.esc-tr b { font-size: 11.5px; line-height: 1.25; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; min-height: 2.5em; } .esc-tr small { font-size: 10.5px; line-height: 1.2; opacity: .75; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tc, inherit); }
.esc-tr-pic { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; background: #f3ead6; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); } .esc-tr-pic img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; display: block; }
.esc-tr.t0 { border-style: dashed; } .esc-tr.t0 .esc-tr-pic { background: #2a2622; } .esc-tr.t0 .esc-tr-pic img { mix-blend-mode: multiply; filter: grayscale(1) contrast(4) brightness(.25) invert(1); opacity: .5; } .esc-tr.t0 b { opacity: .5; } .esc-tr.t0 small { opacity: .6; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; }
.esc-tr.t3 { box-shadow: 0 0 10px rgba(240, 199, 90, .25); } .esc-tr.t4 { box-shadow: 0 0 14px rgba(255, 122, 92, .4); background: linear-gradient(160deg, rgba(255, 122, 92, .14), rgba(240, 199, 90, .08)); }
.esc-tr-pic.big { width: 140px; margin: 0 auto; background: #2a2622; } .esc-tr-pic.big img { mix-blend-mode: normal; filter: brightness(0) invert(1); opacity: .2; } .esc-tr-lock { padding: 6px 0; }
.esc-trv-box { position: relative; border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 50% 38%, #3a3129 0%, #17120e 72%); border: 1.5px solid var(--tc, #b9824e); } .esc-trv { display: block; width: 100%; height: min(46vh, 320px); touch-action: none; cursor: grab; }
.esc-trv-tier { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 999px; background: var(--tc, #b9824e); color: #1b140e; font-size: 12px; font-weight: 800; } .esc-trv-hint { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: #fff; opacity: .7; pointer-events: none; } .esc-trv-flat { display: block; width: 200px; margin: 20px auto; border-radius: 12px; background: #f3ead6; }
/* 匿名聊天 UI/UX 優化 (2026-11-15) */
.find-tools { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; } .find-tools .seg button { padding: 7px 12px; white-space: nowrap; } .find-tools .input { min-height: 42px; padding-top: 8px; padding-bottom: 8px; }
.card.person { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; } .pc-main { display: grid; gap: 6px; min-width: 0; } .card.person > .btn { min-width: 86px; max-width: 112px; padding: 8px 10px; white-space: normal; line-height: 1.2; } .card.person .headline { font-size: 16px; } .card.person .chips:empty { display: none; }
.composer .plus-btn { font-size: 24px; font-weight: 400; line-height: 1; border-radius: 50%; width: 40px; min-width: 40px; height: 40px; padding: 0; background: var(--hair); color: var(--ink); margin-bottom: 2px; } .composer .stick-btn { background: none; font-size: 24px; min-width: 34px; width: 34px; padding: 0; margin-bottom: 2px; }
.tray { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; padding: 6px 0 12px; } .tray-tile { display: grid; gap: 6px; justify-items: center; align-content: start; border: 0; background: none; color: var(--ink); font: inherit; font-size: 12.5px; line-height: 1.25; padding: 2px 0; text-align: center; -webkit-tap-highlight-color: transparent; } .tray-ic { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--sand-soft); font-size: 27px; } .tray-tile:active .tray-ic { transform: scale(.94); }
.chat-note { align-self: center; font-size: 11.5px; color: var(--ink-3); text-align: center; margin: 0 0 4px; max-width: 88%; } .chat-time { align-self: center; font-size: 11.5px; color: var(--ink-3); margin: 8px 0 2px; }
.chat-opener { align-self: center; display: grid; justify-items: center; gap: 8px; text-align: center; margin: auto 0; padding: 12px 6px; width: min(100%, 420px); } .chat-opener b { font-size: 19px; overflow-wrap: anywhere; } .chat-opener .chips { justify-content: center; } .chat-opener .chips:empty { display: none; } .chat-opener .avatar { width: 68px; height: 68px; } .chat-opener .ice-t { margin-top: 6px; }
.ice { display: grid; gap: 8px; width: 100%; } .ice-chip { border: 1px solid var(--hair); background: var(--surface-solid); color: var(--ink); border-radius: 16px; padding: 11px 14px; font: inherit; font-size: 15px; text-align: left; line-height: 1.35; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); } .ice-chip:active { transform: scale(.985); }
.item .when { font-size: 12px; color: var(--ink-3); align-self: flex-start; margin-top: 4px; white-space: nowrap; flex: none; } #findMore { margin-top: 12px; } #discoverHint:empty, #invitesOut:empty { display: none; } .find-tools + .small { margin-top: 2px; }
/* 求一支籤: the guide sheet (2026-11-15) */
.qs .label { margin-top: 6px; } .qs-needs { gap: 6px; } .qs-needs .chip { border: 1px solid var(--hair); background: var(--surface-solid); color: var(--ink); font: inherit; font-size: 14px; padding: 7px 11px; border-radius: 999px; min-height: 36px; } .qs-needs .chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.qs-list { display: grid; gap: 6px; } .qs-row .out-row-main { flex: 1; min-width: 0; } .qs-row { align-items: center; } .qs-go { flex: none; font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; margin-left: 6px; } .qs-open { margin-bottom: 10px; }
/* 連動: link cards between 占卜 / 出去玩 and the chats (2026-11-15) */
.sheet-back.top { z-index: 4000; } .share-list { max-height: 46vh; overflow-y: auto; } .share-what { font-weight: 600; color: var(--ink); } .link-card b { overflow-wrap: anywhere; } .b.out.link-card .small { color: var(--on-out); opacity: .88; } .b.out.link-card .btn { background: rgba(255, 255, 255, .22); color: var(--on-out); } .link-card .small { white-space: pre-wrap; opacity: .9; margin: 2px 0 0; } .chat-share { margin-top: 8px; }
/* 生日只填一次 (birth.js, 2026-11-15) */
.birth-note { color: var(--accent); font-weight: 600; }
/* 射龍門 inside the 不留情 lobby (2026-11-15) */
.mc-dragon { display: flex; flex-direction: column; gap: 12px; }
/* 吃豆狂潮's page: a picture first (2026-11-15) */
.pac-hero { border-radius: 22px; overflow: hidden; background: #0b1030; color: #fff; box-shadow: 0 6px 18px rgba(11, 16, 48, .35); } .pac-maze { position: relative; aspect-ratio: 320 / 184; background: #0b1030 url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 184' preserveAspectRatio='xMidYMid slice'><rect width='320' height='184' fill='%230b1030'/><g fill='none' stroke='%233b6cff' stroke-width='5' stroke-linecap='round' stroke-linejoin='round' opacity='.9'><path d='M14 14h292v156H14zM58 62h70M150 62h34M206 62h70M58 118h34M114 118h92M228 118h48'/></g><g fill='%23ffd84a'><circle cx='34' cy='38' r='4'/><circle cx='58' cy='38' r='4'/><circle cx='82' cy='38' r='4'/><circle cx='106' cy='38' r='4'/><circle cx='130' cy='38' r='4'/><circle cx='154' cy='38' r='4'/><circle cx='178' cy='38' r='4'/><circle cx='202' cy='38' r='4'/><circle cx='226' cy='38' r='4'/><circle cx='250' cy='38' r='4'/><circle cx='274' cy='38' r='4'/><circle cx='298' cy='38' r='4'/><circle cx='34' cy='92' r='4'/><circle cx='58' cy='92' r='4'/><circle cx='82' cy='92' r='4'/><circle cx='106' cy='92' r='4'/><circle cx='130' cy='92' r='4'/><circle cx='154' cy='92' r='4'/><circle cx='178' cy='92' r='4'/><circle cx='202' cy='92' r='4'/><circle cx='226' cy='92' r='4'/><circle cx='250' cy='92' r='4'/><circle cx='274' cy='92' r='4'/><circle cx='298' cy='92' r='4'/><circle cx='34' cy='146' r='4'/><circle cx='58' cy='146' r='4'/><circle cx='82' cy='146' r='4'/><circle cx='106' cy='146' r='4'/><circle cx='130' cy='146' r='4'/><circle cx='154' cy='146' r='4'/><circle cx='178' cy='146' r='4'/><circle cx='202' cy='146' r='4'/><circle cx='226' cy='146' r='4'/><circle cx='250' cy='146' r='4'/><circle cx='274' cy='146' r='4'/><circle cx='298' cy='146' r='4'/><circle cx='34' cy='92' r='9'/><circle cx='298' cy='38' r='9'/></g></svg>") center / cover no-repeat; }
.pac-key { display: block; width: 100%; height: auto; aspect-ratio: 1344 / 768; object-fit: cover; }
.pac-hero-t { display: grid; gap: 6px; padding: 14px 16px 16px; } .pac-title { font-size: 26px; letter-spacing: .04em; color: #ffd84a; } .pac-tag { margin: 0 0 6px; font-size: 14.5px; line-height: 1.5; color: rgba(255, 255, 255, .9); } .pac-hero .btn { background: #ffd84a; color: #0b1030; font-size: 18px; min-height: 54px; }
.pac-how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pac-how-p { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: block; margin-bottom: 4px; }
.pac-how-c { display: grid; gap: 3px; justify-items: center; text-align: center; padding: 8px 8px 12px; border-radius: 18px; background: var(--surface-solid); border: 1px solid var(--hair-2); } .pac-how-i { font-size: 34px; line-height: 1.1; } .pac-how-c b { font-size: 15px; } .pac-how-c small { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.pac-more summary { font-weight: 600; cursor: pointer; } .pac-more[open] summary { margin-bottom: 8px; }
/* 放置 on 首頁 (2026-11-15) */
.td-idle { margin: 0 0 12px; } .td-idle-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--hair-2); background: var(--surface-solid); color: inherit; font: inherit; text-align: left; }
.td-idle-ic { font-size: 24px; } .td-idle-t { display: grid; gap: 2px; min-width: 0; } .td-idle-t b { font-size: 14.5px; } .td-idle-t small { font-size: 12px; color: var(--ink-3); line-height: 1.35; } .td-idle-bar { display: block; height: 6px; border-radius: 999px; background: var(--hair); overflow: hidden; margin-top: 3px; } .td-idle-bar b { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.td-idle-more { border: 0; background: none; font-size: 22px; color: var(--ink-3); padding: 4px 6px; }
/* 遊戲 hub with the painted key art (2026-11-15) */
.hub-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 0 2px 4px; } .hub-top .hub-lead { margin: 0; } .hub-topimg { width: 76px; height: 76px; border-radius: 20px; object-fit: cover; box-shadow: 0 6px 14px -8px rgba(40, 26, 14, .5); }
.hub-keyimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; } .hub-card.keyed .hub-art::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 42%, rgba(16, 10, 8, .86) 100%); } .hub-card.keyed.feature { min-height: clamp(210px, 56vw, 260px); } .hub-card.keyed:not(.feature) { min-height: 176px; } .hub-card.keyed .hub-text b { text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.hub-wrap { grid-column: 1 / -1; display: grid; gap: 8px; } .hub-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .hub-chip { border: 1px solid var(--hair-2); background: var(--surface-solid); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; padding: 10px 4px; border-radius: 14px; min-height: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); } .hub-chip:active { transform: scale(.97); }
.hub-open { color: #c2410c; font-weight: 700; font-size: 13px; padding: 0 2px; }
.hub-live { display: block; margin-top: 3px; color: #15803d; font-weight: 700; font-size: 12px; } /* (正在玩: 2026-11-22) */
.hub-live[hidden] { display: none; }
.quick-match.keyed { padding: 0; overflow: hidden; gap: 0; grid-template-columns: 112px minmax(0, 1fr); align-items: stretch; } .quick-key { display: block; width: 112px; height: 100%; min-height: 104px; object-fit: cover; object-position: 38% 45%; } .quick-t { display: grid; gap: 4px; padding: 12px 14px 12px 12px; align-content: center; }
.chat-emptyimg { display: block; width: 100%; height: auto; aspect-ratio: 1344 / 768; object-fit: cover; border-radius: 18px; margin: 4px 0 8px; }
.mc-hero2 .kv-cast { display: none; }
/* 匿名聊天's tray in groups, 二選一 (2026-11-16) */
.tray-groups { display: grid; gap: 2px; max-height: 68vh; overflow-y: auto; padding-bottom: 6px; } .tray-h { font-size: 12.5px; font-weight: 700; color: var(--ink-3); margin: 6px 2px 0; } .tray-groups .tray { padding: 6px 0 2px; gap: 8px 6px; } .tray-groups .tray-ic { width: 50px; height: 50px; font-size: 23px; border-radius: 16px; } .tray-groups .tray-tile { gap: 4px; }
.ice-card small { display: block; opacity: .75; font-size: 11.5px; margin-bottom: 2px; } .ice-card b { display: block; } .ice-ab .btn:disabled { opacity: .5; } .ice-ab .btn.picked { opacity: 1; box-shadow: inset 0 0 0 2px currentColor; } .ice-ab { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; } .ice-ab .btn { width: 100%; white-space: normal; line-height: 1.25; min-height: 44px; padding: 8px 6px; }
/* each 占卜 / 出去玩 page's picture, line and three steps (js/pagehero.js, 2026-11-16) */
.pg-hero { flex: none; border-radius: 20px; overflow: hidden; background: var(--surface-solid); box-shadow: 0 6px 16px -10px rgba(40, 26, 14, .45); } .pg-pic { position: relative; aspect-ratio: 960 / 430; overflow: hidden; } .pg-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; display: block; }
.pg-line { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 10px; color: #fff; font-size: 16.5px; line-height: 1.3; background: linear-gradient(180deg, rgba(16, 10, 8, 0), rgba(16, 10, 8, .82)); text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.pg-steps { list-style: none; margin: 0; padding: 10px 8px 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .pg-steps li { display: grid; gap: 4px; justify-items: center; align-content: start; text-align: center; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); overflow-wrap: anywhere; } .pg-steps i { font-style: normal; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 12.5px; font-weight: 700; }
.pg-hero.slim .pg-pic { aspect-ratio: auto; height: 84px; } .pg-hero.slim .pg-line { font-size: 15px; padding: 22px 12px 8px; }
.out-body.map-page .pg-hero .pg-pic { aspect-ratio: auto; height: 96px; }
/* 景點情報's topics; 塔羅's own text header gives way to the page's picture (2026-11-16) */
.out-topic { border: 1px solid var(--hair-2); background: var(--surface-solid); color: var(--ink); font: inherit; font-size: 14px; padding: 8px 13px; border-radius: 999px; min-height: 40px; } .out-topic[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
#foBody > .pg-hero ~ .tr-hero { display: none; }
.hub-card.keyed, .hub-card.keyed .hub-text b, .hub-card.keyed .hub-text small { color: #fff; } .hub-card.keyed .hub-text small { text-shadow: 0 1px 6px rgba(0, 0, 0, .7); opacity: .95; } /* (a light-coloured door with a picture: white words on the picture's dark foot) */
/* painted little pictures where emoji stood (2026-11-16) */
.tray-ic.pic { background: none; box-shadow: none; padding: 0; overflow: hidden; } .tray-ic.pic img { width: 50px; height: 50px; max-width: 100%; max-height: 100%; object-fit: contain; display: block; } /* (px sizes: 100% of a grid cell let the 160 px picture spill over the label on iPhone) */
#foBody > .pg-hero ~ * .sins-cover, #foBody > .pg-hero ~ .sins-cover { display: none; } /* (the page's picture already shows the scale) */
.out-emoji.pic { display: block; width: 44px; height: 44px; margin: 0 auto 2px; } .out-emoji.pic img, .out-badge-icon.pic img { width: 100%; height: 100%; object-fit: contain; display: block; } .out-badge-icon.pic { display: block; width: 56px; height: 56px; margin: 0 auto; }
.cw-cabpic { flex: none; width: 84px; height: 92px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .28)); } .cw-hero2 .kv-cast { display: none; }
/* 比分數, and the tray with every game (2026-11-16) */
.tray-groups { max-height: 74vh; }
.score-card .sc-head, .score-card .sc-row { display: grid; grid-template-columns: minmax(0, 1.5fr) 1fr 1fr; gap: 6px; align-items: center; text-align: right; font-size: 13.5px; } .score-card .sc-head { opacity: .75; margin-top: 6px; } .score-card .sc-row span { text-align: left; } .score-card .sc-row { padding: 3px 0; border-top: 1px solid rgba(128, 128, 128, .22); font-variant-numeric: tabular-nums; }
.score-card .sc-row.win .sc-b::after { content: ' 👑'; } .score-card .sc-row.lose .sc-a::after { content: ' 👑'; } .score-card .btn { margin-top: 8px; width: 100%; }
.find-play.btn { width: 100%; min-height: 36px; height: 36px; padding: 0 10px; margin: -9px 0; font-size: 13.5px; background: none; box-shadow: none; color: var(--accent); } /* (slim: the people list keeps its place on the first screen) */
.out-quest-icon.pic { display: block; flex: none; width: 44px; height: 44px; } .out-quest-icon.pic img { width: 100%; height: 100%; object-fit: contain; display: block; } /* (廟宇的求什麼 and the quests: painted, 2026-11-17) */
/* 台灣小鎮, a game of its own (js/town/home.js, js/escape/town-ui.js, 2026-11-17): the top bar, the tabs, the map drawn at an angle */
.tg-body { gap: 10px; padding-top: 0; }
.tg { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tg-hud { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 0 -16px; padding: 8px 16px; background: #fffdf7; color: #3b2a1c; box-shadow: 0 8px 16px -14px rgba(80, 60, 20, .7); }
.tg-crest { width: 40px; height: 40px; object-fit: contain; }
.tw-who { display: grid; gap: 2px; min-width: 0; } .tw-who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tw-who small { font-size: 12px; color: #7a6656; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-bar { display: block; height: 7px; border-radius: 4px; background: rgba(140, 90, 30, .18); overflow: hidden; } .tw-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd56a, #f08a1c); }
.tw-fund { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px 4px 5px; border-radius: 999px; background: #fff6dc; box-shadow: inset 0 0 0 1px rgba(140, 90, 30, .2); font-variant-numeric: tabular-nums; color: #5a3a10; } .tw-fund img { width: 24px; height: 24px; }
.tg-tabs { top: 56px; } .tg-tabs button { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; font-size: 12.5px; line-height: 1.2; min-height: 48px; padding: 4px 2px; } .tg-ti { font-size: 18px; line-height: 1; }
.tg-pane { display: flex; flex-direction: column; gap: 12px; min-width: 0; } .tg-pane[hidden] { display: none; } .tg-slot { min-width: 0; }
.tg-play { align-self: center; }
/* the agency's parts by tab: its one element moves between the tabs */
.ag[data-view="cases"] :is(.ag-head, .ag-stage, .ag-quick, #agStaff, #agFriends, #agUp, #agCol, #agFiles, #agSet),
.ag[data-view="office"] :is(#agBig, #agCases, #agOut, #agFriends, #agCol, #agFiles),
.ag[data-view="col"] :is(.ag-head, .ag-stage, .ag-quick, #agBig, #agCases, #agOut, #agStaff, #agFriends, #agUp, #agSet),
.ag[data-view="pals"] :is(.ag-head, .ag-stage, .ag-quick, #agBig, #agCases, #agOut, #agStaff, #agUp, #agCol, #agFiles, #agSet) { display: none !important; }
.esc-towngo { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-decoration: none; color: inherit; background: linear-gradient(135deg, #fff8e4, #e9f6dc); }
.esc-towngo img { width: 72px; height: 72px; object-fit: contain; } .esc-towngo span { display: grid; gap: 3px; } .esc-towngo small { color: var(--ink-2); font-size: 13px; } .esc-towngo i { font-style: normal; font-size: 26px; color: var(--ink-3, #998); }
/* the map */
.tw-map { display: flex; flex-direction: column; gap: 8px; margin: 0 -16px; }
.tw-tip { margin: 0 16px; padding: 8px 12px; border-radius: 12px; background: #fff6dc; color: #4a3010; font-size: 14px; font-weight: 700; text-align: center; box-shadow: 0 2px 0 rgba(140, 90, 30, .18); } .tw-tip[hidden] { display: none; }
.tw-stage { position: relative; height: max(260px, calc(100dvh - 532px)); /* (the map, and under it 全部收取 above the tab bar) */ background: radial-gradient(120% 70% at 50% 45%, #cdeeb4 0%, #a9dc8c 60%, #8fcb73 100%); overflow: hidden; }
.tw-scroll { position: absolute; inset: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; display: grid; place-items: center; } .tw-scroll::-webkit-scrollbar { display: none; }
.tw-board { --tw: 64px; position: relative; margin: 24px 28px 18px; flex: none; }
.tw-cell { position: absolute; width: var(--tw); height: calc(var(--tw) / 2); padding: 0; border: 0; background: #9fd67f; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tw-cell.alt { background: #95cf75; } .tw-ground { position: absolute; inset: 0; } /* (no per-tile outline layer: the alternating colours show the grid) */
.tw-cell.has { background: #c9b48a; } .tw-cell.road { background: none; } .tw-rd { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tw-cell.free { background: #c7f0a8; } .tw-cell.free:nth-child(odd) { background: #bfeaa0; } .tw-cell.moving { background: #ffd56a; }
.tw-cell:active { filter: brightness(1.08); }
.tw-cell.tw-seacell { background: #6cc4e8; } .tw-cell.tw-seacell.alt { background: #63bce2; } .tw-cell.tw-seacell.has { background: #58b2da; } /* (the two rows of sea: water kinds stand there, 2026-11-22) */
.tw-sp { position: absolute; transform: translateY(-100%); line-height: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tw-sp.moving { opacity: .55; } .tw-b { width: 100%; height: auto; display: block; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(30, 60, 20, .35)); }
.tw-lv { position: absolute; left: 6%; bottom: 4%; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #fff; color: #3b2a1c; font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.tw-warn { position: absolute; right: 6%; bottom: 4%; width: 17px; height: 17px; border-radius: 50%; background: #e0483a; color: #fff; font-style: normal; font-size: 12px; font-weight: 900; line-height: 17px; text-align: center; box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.tw-coin { position: absolute; transform: translate(-50%, -100%); display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px 2px 3px; border: 0; border-radius: 999px; background: #fff; color: #7a4a00; font: 800 11.5px/1.2 inherit; white-space: nowrap; box-shadow: 0 2px 0 rgba(140, 90, 30, .4); -webkit-tap-highlight-color: transparent; }
.tw-coin img { width: 17px; height: 17px; } .tw-coin.full { background: #ffe08a; } .tw-coin::after { content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: #fff; } .tw-coin.full::after { border-top-color: #ffe08a; }
.tw-zoom { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; z-index: 2; }
.tw-zb { width: 38px; height: 38px; border: 0; border-radius: 12px; background: rgba(255, 253, 247, .95); color: #3b2a1c; font-size: 20px; font-weight: 800; line-height: 1; box-shadow: 0 2px 0 rgba(140, 90, 30, .25); }
.tw-rate2 { position: absolute; left: 10px; top: 10px; z-index: 2; padding: 5px 10px; border-radius: 999px; background: rgba(255, 253, 247, .95); color: #5a3a10; font-size: 12.5px; font-weight: 700; box-shadow: 0 2px 0 rgba(140, 90, 30, .2); }
.tw-foot { display: flex; gap: 10px; padding: 0 16px; } .tw-foot .btn { flex: 1; } .tw-foot .btn[hidden], .tw-foot [hidden] { display: none; }
/* the sheets */
.tw-opts { display: grid; gap: 8px; max-height: 56vh; overflow-y: auto; } .tw-opt { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--hair-2); border-radius: 16px; background: var(--surface-solid); color: var(--ink); font: inherit; text-align: left; } .tw-opt img { width: 58px; height: 58px; object-fit: contain; border-radius: 8px; }
.tw-opt:disabled { opacity: .5; } .tw-opt.lock img { filter: grayscale(1); } .tw-optt { display: grid; gap: 2px; } .tw-optt small { font-size: 12.5px; color: var(--ink-2); } .tw-optt .tw-optn { color: #b8650c; font-weight: 700; }
.tw-sheethead { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; } .tw-sheethead img { width: 84px; height: 84px; object-fit: contain; } .tw-sheethead h3 { margin: 0 0 4px; } .tw-rate { font-size: 17px; font-weight: 800; color: #b8650c; margin: 4px 0; }
.tw-likes { display: flex; flex-wrap: wrap; gap: 6px; } .tw-like { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--surface-2, #f3ece0); font-size: 12.5px; opacity: .6; } .tw-like img { width: 24px; height: 24px; object-fit: contain; } .tw-like.on { opacity: 1; background: #ffe9b0; font-weight: 700; } .tw-acts { gap: 8px; } .tw-acts .btn { flex: 1; }
.tw-zones { overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; } .tw-zones::-webkit-scrollbar { display: none; } .tw-zones button { flex: 1 0 auto; white-space: nowrap; font-size: 13.5px; padding: 6px 10px; }
/* 台灣小鎮 phase 2: materials and residents on the top bar, the sea, material costs */
.tg-hud { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 6px; } .tg-strip { grid-column: 1 / -1; display: flex; gap: 6px; min-width: 0; }
.tg-mats, .tg-city { display: flex; gap: 8px; align-items: center; min-width: 0; padding: 4px 10px; border: 0; border-radius: 999px; background: #f5eedc; color: #4a3010; font: 700 12.5px/1.3 inherit; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.tg-mats { flex: 1 1 55%; } .tg-city { flex: 1 1 45%; justify-content: flex-end; } .tg-city .low { color: #c0392b; }
.tg-tabs { top: 92px; }
.tg-meter { display: grid; grid-template-columns: 64px minmax(0, 1fr) 34px; gap: 8px; align-items: center; margin: 6px 0; } .tg-meter i { height: 10px; border-radius: 5px; background: var(--hair); overflow: hidden; } .tg-meter u { display: block; height: 100%; background: linear-gradient(90deg, #ffd56a, #4cb06a); text-decoration: none; } .tg-meter span { text-align: right; font-variant-numeric: tabular-nums; }
.tg-pop { font-weight: 800; } .tg-matlist { display: flex; flex-wrap: wrap; gap: 8px; } .tg-matlist span { padding: 4px 10px; border-radius: 999px; background: var(--surface-2, #f3ece0); font-size: 13px; }
.tw-sea { position: absolute; width: var(--tw); height: calc(var(--tw) / 2); background: #6cc4e8; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); pointer-events: none; } .tw-sea.alt { background: #63bde3; }
.tw-cell.coast:not(.has):not(.road) { background: #e9dca8; } .tw-cell.coast.alt:not(.has):not(.road) { background: #e3d49c; }
.tw-optm { font-size: 12px; color: #6a5a3a; } .tw-optm.short, .tw-upmat.short { color: #c0392b; font-weight: 700; }
.tw-shopbtn { flex: 0 0 auto !important; } .tw-packs { display: grid; gap: 8px; } .tw-pack { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2, #f3ece0); } .tw-pack > div { display: grid; gap: 2px; } .tw-pack small { font-size: 12.5px; color: var(--ink-2); }
/* 台灣小鎮: morning, day, dusk, night by Taiwan time (.tw-map[data-time]) */
.tw-map[data-time="dawn"] .tw-stage { background: radial-gradient(120% 70% at 50% 45%, #f6e2c6 0%, #d9c9a0 60%, #b7c48c 100%); }
.tw-map[data-time="dusk"] .tw-stage { background: radial-gradient(120% 70% at 50% 45%, #f4c99a 0%, #c99a7a 60%, #8a7a8a 100%); }
.tw-map[data-time="night"] .tw-stage { background: radial-gradient(120% 70% at 50% 45%, #2c3f6b 0%, #1d2a4d 60%, #141c36 100%); }
.tw-map[data-time="dawn"] .tw-ground { filter: sepia(.15) brightness(.97); }
.tw-map[data-time="dusk"] .tw-ground { filter: sepia(.35) saturate(1.1) brightness(.85); }
.tw-map[data-time="dusk"] .tw-b { filter: sepia(.25) brightness(.9) drop-shadow(0 0 5px rgba(255, 190, 110, .55)); }
.tw-map[data-time="night"] .tw-ground { filter: brightness(.48) saturate(.75) hue-rotate(-10deg); }
.tw-map[data-time="night"] .tw-b { filter: brightness(.62) saturate(.9) drop-shadow(0 0 7px rgba(255, 205, 120, .85)) drop-shadow(0 0 2px rgba(255, 230, 160, .9)); }
.tw-map[data-time="night"] .tw-rate2, .tw-map[data-time="night"] .tw-zb { background: rgba(40, 50, 80, .9); color: #f4ecd8; }
.tw-sp { min-height: calc(var(--tw) * .6); } /* (a picture that fails to load still leaves the building to tap) */
/* 台灣小鎮: 市政 */
.tg-gov { flex: 0 0 auto; padding: 4px 10px; border: 0; border-radius: 999px; background: #1f4d3a; color: #fff; font: 700 12.5px/1.3 inherit; white-space: nowrap; }
.tg-city .up { color: #2e8b57; } .tg-city .down { color: #c0392b; }
.tg-gov-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) 64px; gap: 10px; align-items: center; margin: 10px 0; } .tg-gov-row input { width: 100%; accent-color: #1f4d3a; } .tg-gov-row b { text-align: right; font-variant-numeric: tabular-nums; }
.tg-eff { font-weight: 700; color: #b8650c; }
.tg-gov-item { margin: 4px 0 10px; } .tg-gov-item .tg-gov-row { margin: 0 0 2px; } .tg-gov-item small { display: block; font-size: 12px; line-height: 1.45; } .tg-gov-g { display: block; margin: 14px 0 2px; font-size: 14px; color: #1f4d3a; } .tg-gov-row { grid-template-columns: 112px minmax(0, 1fr) 64px; }
/* 台灣小鎮: friends' towns, hearts, a visit */
.tg-friends { display: grid; gap: 8px; } .tg-frt { font-size: 15px; } .tg-frlist { display: grid; gap: 6px; } .tg-fr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2, #f3ece0); } .tg-fr > div { display: grid; gap: 2px; min-width: 0; } .tg-fr small { font-size: 12px; color: var(--ink-2); }
.tg-visit-t { font-size: 16px; }
.tw-foot .tg-gov { flex: 0 0 auto; padding: 0 14px; min-height: 44px; border-radius: 14px; font-size: 14px; } .tw-foot .tg-gov[hidden] { display: none; }
.tg-mats, .tg-city { gap: 6px; padding: 4px 8px; font-size: 12px; } .tg-mats { flex: 1 1 auto; } .tg-city { flex: 0 1 auto; }
.tw-foot { align-items: stretch; } .tw-foot > * { width: auto; min-width: 0; margin: 0; } .tw-foot .btn { flex: 1 1 0; } .tw-foot .tw-shopbtn, .tw-foot .tg-gov { flex: 0 0 auto !important; padding: 0 14px; white-space: nowrap; }
/* 台灣小鎮 phase 4: the event card, damaged buildings, the heroes walking */
.tw-event { margin: 0 16px; padding: 12px; border-radius: 16px; background: #fff6dc; color: #3b2a1c; box-shadow: 0 2px 0 rgba(140, 90, 30, .2); display: grid; gap: 8px; } .tw-event[hidden] { display: none; }
.tw-event[data-state="on"] { background: linear-gradient(135deg, #ffe6c4, #f6d7f0); box-shadow: 0 0 0 2px #e0483a inset, 0 2px 0 rgba(140, 90, 30, .2); }
.tw-ev-head { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; } .tw-ev-ic { width: 56px; height: 56px; object-fit: contain; } .tw-ev-head > div { display: grid; gap: 2px; } .tw-ev-head small { font-size: 12.5px; line-height: 1.45; color: #6a5440; }
.tw-ev-line { margin: 0; font-weight: 700; font-size: 13.5px; } .tw-ev-mons { display: flex; gap: 4px; justify-content: center; } .tw-ev-mons img { width: 64px; height: 64px; object-fit: contain; animation: tw-bob 1.6s ease-in-out infinite; } .tw-ev-mons img:nth-child(2) { animation-delay: -.4s; } .tw-ev-mons img:nth-child(3) { animation-delay: -.8s; }
.tw-ev-ways { display: grid; gap: 6px; } .tw-way { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid rgba(140, 90, 30, .25); border-radius: 12px; background: #fffdf7; color: #3b2a1c; font: inherit; } .tw-way small { font-size: 12px; color: #6a5440; } .tw-way.strong { box-shadow: 0 0 0 2px #2e8b57 inset; } .tw-way.peace { background: #eaf7e3; } .tw-way:disabled { opacity: .5; }
.tw-ev-acts { gap: 8px; } .tw-ev-acts .btn { flex: 1; }
.tw-sp.dmg .tw-b { filter: grayscale(.75) brightness(.8) drop-shadow(0 3px 2px rgba(30, 60, 20, .35)); } .tw-rubble { position: absolute; left: 50%; bottom: 8%; width: 46%; transform: translateX(-50%); pointer-events: none; animation: tw-bob 1.4s ease-in-out infinite; }
.tw-hero { position: absolute; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .35)); animation: tw-walk 6s ease-in-out infinite; }
@keyframes tw-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.tw-rubble { animation-name: tw-bob2; } @keyframes tw-bob2 { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -3px); } }
@keyframes tw-walk { 0% { transform: translate(-30%, 12%) scaleX(1); } 45% { transform: translate(30%, -12%) scaleX(1); } 50% { transform: translate(30%, -12%) scaleX(-1); } 95% { transform: translate(-30%, 12%) scaleX(-1); } 100% { transform: translate(-30%, 12%) scaleX(1); } }

.tw-gifts { margin: 4px 16px 0; padding: 12px; border-radius: 16px; background: #eef7ff; display: grid; gap: 6px; } .tw-gifts[hidden] { display: none; } .tw-gf-got { margin: 0; font-size: 13px; font-weight: 700; color: #1f4d3a; } .tw-gf-boost { margin: 0; font-weight: 800; color: #b8650c; }
.tw-gf-left { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .tw-gf-left small { width: 100%; color: var(--ink-2); } .tw-gf-go { padding: 6px 12px; border-radius: 999px; background: #fff; color: #1f4d3a; font-size: 13px; font-weight: 700; text-decoration: none; box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.tw-stage { isolation: isolate; z-index: 0; } /* (the map's buildings stay under the town's sticky top bar and tabs when the page scrolls) */
.tw-fly { position: absolute; left: -15%; z-index: 900; pointer-events: none; filter: drop-shadow(0 10px 6px rgba(0, 0, 0, .18)); animation: tw-fly 14s linear infinite; } @keyframes tw-fly { 0% { left: -15%; transform: translateY(0); } 50% { transform: translateY(-10px); } 100% { left: 105%; transform: translateY(0); } } 
/* 台灣小鎮 full screen, upright and sideways (2026-11-17) */
.tw-scroll { touch-action: pan-x pan-y; cursor: grab; } .tw-board { transform-origin: 0 0; will-change: auto; }
.tw-mini { display: none; } .tw-fsb { font-size: 18px !important; }
html.tw-fs, html.tw-fs body { overflow: hidden; overscroll-behavior: none; }
.tw-map.tw-full { position: fixed; inset: 0; z-index: 15; margin: 0; gap: 0; background: #a9dc8c; }
.tw-map.tw-full .tw-stage { position: absolute; inset: 0; height: auto; }
.tw-map.tw-full > .tw-event, .tw-map.tw-full > .tw-tip { position: absolute; z-index: 3; top: calc(env(safe-area-inset-top, 0px) + 58px); left: 50%; transform: translateX(-50%); width: min(92vw, 440px); margin: 0; max-height: 40vh; overflow: auto; }
.tw-map.tw-full > .tw-foot { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); width: min(94vw, 560px); padding: 0; }
.tw-map.tw-full > .tw-gifts { display: none; }
.tw-full .tw-mini { display: flex; gap: 8px; position: absolute; z-index: 3; left: calc(env(safe-area-inset-left, 0px) + 10px); top: calc(env(safe-area-inset-top, 0px) + 10px); padding: 6px 12px; border-radius: 999px; background: rgba(255, 253, 247, .95); color: #4a3010; font: 700 12.5px/1.3 inherit; font-variant-numeric: tabular-nums; box-shadow: 0 2px 0 rgba(140, 90, 30, .2); white-space: nowrap; max-width: calc(100vw - 80px); overflow: hidden; }
.tw-full .tw-rate2 { top: calc(env(safe-area-inset-top, 0px) + 48px); left: calc(env(safe-area-inset-left, 0px) + 10px); }
.tw-full .tw-zoom { top: calc(env(safe-area-inset-top, 0px) + 10px); right: calc(env(safe-area-inset-right, 0px) + 10px); }
@media (orientation: landscape) {
  .tw-map.tw-full > .tw-foot { left: auto; transform: none; right: calc(env(safe-area-inset-right, 0px) + 12px); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); width: auto; flex-direction: column; }
  .tw-map.tw-full > .tw-foot .btn { flex: 0 0 auto; min-width: 150px; min-height: 42px; }
  .tw-map.tw-full > .tw-event, .tw-map.tw-full > .tw-tip { top: calc(env(safe-area-inset-top, 0px) + 10px); max-height: 46vh; }
}
@media (orientation: landscape) and (max-height: 540px) { .tw-stage { height: 72vh; min-height: 230px; } }
.tw-scroll { z-index: 0; isolation: isolate; } /* (the buildings stay under the map's own buttons: ＋, －, ⛶, the bars) */
/* 台灣小鎮: moving house news; the battle */
.tw-tip[data-mv="out"] { background: #fde3df; color: #8a2a1f; } .tw-tip[data-mv="in"] { background: #e3f6e3; color: #1f5a2a; }
.tw-battle { position: fixed; inset: 0; z-index: 18; display: grid; grid-template-rows: 1fr auto 1fr; align-items: center; padding: 40px 16px; background: radial-gradient(circle at 50% 50%, rgba(80, 30, 90, .97), rgba(20, 10, 30, 1)); color: #fff; animation: tw-bt-in .25s ease-out; }
.tw-bt-side { display: grid; gap: 10px; justify-items: center; } .tw-bt-row { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; } .tw-bt-row img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.tw-bt-side.foe .tw-bt-row img { animation: tw-bt-foe .5s ease-in-out infinite alternate; } .tw-bt-side.ours .tw-bt-row img { animation: tw-bt-ours .45s ease-in-out infinite alternate; } .tw-bt-row img.hero { width: 60px; height: 60px; }
.tw-bt-bar { width: min(80vw, 320px); height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .2); overflow: hidden; } .tw-bt-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff6b5a, #ffb03a); transition: width 1.1s ease-out; } .tw-bt-bar.ours i { background: linear-gradient(90deg, #4cd07a, #a6f06a); }
.tw-bt-mid { display: grid; justify-items: center; gap: 6px; } .tw-bt-vs { font: 900 34px/1 inherit; letter-spacing: 2px; text-shadow: 0 3px 0 #b8650c; } .tw-bt-fx { font-size: 42px; animation: tw-bt-fx .35s ease-in-out infinite; } .tw-bt-res { font-size: 26px; min-height: 32px; }
.tw-battle[data-result] .tw-bt-fx, .tw-battle[data-result] .tw-bt-vs { display: none; } .tw-battle[data-result="won"] .tw-bt-res { color: #ffe08a; } .tw-battle[data-result="lost"] .tw-bt-res { color: #ffb0a8; }
@keyframes tw-bt-in { from { opacity: 0; } } @keyframes tw-bt-foe { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(12px) rotate(4deg); } } @keyframes tw-bt-ours { from { transform: translateY(0); } to { transform: translateY(-12px); } } @keyframes tw-bt-fx { 0%, 100% { transform: scale(.8) rotate(-10deg); } 50% { transform: scale(1.3) rotate(10deg); } }

/* 台灣小鎮: the townspeople walking, the visitors waiting at the edge */
.tw-folk { position: absolute; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .3)); animation: tw-walk 8s ease-in-out infinite; }
.tw-mon { position: absolute; object-fit: contain; pointer-events: none; filter: drop-shadow(0 4px 4px rgba(60, 0, 60, .45)); animation: tw-bob 1.2s ease-in-out infinite; } .tw-mon.portal { filter: drop-shadow(0 0 10px rgba(160, 80, 255, .9)); animation: tw-spin 4s linear infinite; }
@keyframes tw-spin { to { transform: rotate(360deg); } }
.tw-map[data-time="night"] .tw-folk { filter: brightness(.7) drop-shadow(0 2px 1px rgba(0, 0, 0, .3)); }

/* 台灣小鎮: the radio, the forecast bar, cars, sky, weather, the guide (2026-11-17) */
.tw-news { display: flex; gap: 8px; align-items: center; margin: 0 16px; padding: 8px 12px; border: 0; border-radius: 12px; background: #2b2118; color: #ffe9b0; font: 700 13px/1.35 inherit; text-align: left; overflow: hidden; }
.tw-news[hidden] { display: none; } .tw-news-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tw-news-t.in { animation: tw-news-in .4s ease-out; } @keyframes tw-news-in { from { opacity: 0; transform: translateY(6px); } }
.tw-news-all p { margin: 6px 0; font-size: 14px; }
.tw-fc { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; align-items: center; margin: 0 16px; padding: 6px 10px; border-radius: 12px; background: #fff6dc; } .tw-fc[hidden] { display: none; } .tw-fc img { width: 40px; height: 40px; object-fit: contain; }
.tw-fc[data-kind="raid"] { background: #f3e3fb; } .tw-fc-t { display: grid; gap: 4px; } .tw-fc-t small { font-size: 12.5px; font-weight: 700; color: #4a3010; } .tw-fc-t i { height: 8px; border-radius: 4px; background: rgba(140, 90, 30, .18); overflow: hidden; } .tw-fc-t u { display: block; height: 100%; background: linear-gradient(90deg, #ffd56a, #e0483a); text-decoration: none; }
.tw-car { position: absolute; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .3)); animation: tw-drive 10s linear infinite; }
@keyframes tw-drive { 0% { transform: translate(-45%, -22%); } 48% { transform: translate(45%, 22%); } 50% { transform: translate(45%, 22%) scaleX(-1); } 98% { transform: translate(-45%, -22%) scaleX(-1); } 100% { transform: translate(-45%, -22%); } }
.tw-cloud { position: absolute; left: -20%; z-index: 880; opacity: .55; pointer-events: none; animation: tw-fly 60s linear infinite; } .tw-birds { position: absolute; left: -10%; z-index: 885; pointer-events: none; animation: tw-fly 26s linear infinite; }
.tw-map[data-time="night"] .tw-cloud { opacity: .35; } .tw-map[data-time="night"] .tw-birds { display: none; } .tw-map[data-time="night"] .tw-car { filter: brightness(.75) drop-shadow(0 0 4px rgba(255, 230, 150, .8)); }
.tw-wx { position: absolute; inset: 0; z-index: 1; pointer-events: none; } .tw-wx:not([data-wx]), .tw-wx[data-wx=""] { display: none; }
.tw-wx[data-wx="typhoon"], .tw-wx[data-wx="plumrain"], .tw-wx[data-wx="slide"], .tw-wx[data-wx="tornado"], .tw-wx[data-wx="thunder"] { background: repeating-linear-gradient(105deg, rgba(200, 220, 255, .0) 0 10px, rgba(200, 220, 255, .55) 10px 11px, rgba(200, 220, 255, 0) 11px 22px); background-size: 200% 200%; animation: tw-rain .5s linear infinite; }
.tw-wx[data-wx="typhoon"] { background-color: rgba(40, 60, 90, .28); } .tw-wx[data-wx="thunder"] { animation: tw-rain .5s linear infinite, tw-flash 3.2s steps(1) infinite; } .tw-wx[data-wx="plague"] { background: rgba(120, 200, 80, .18); }
@keyframes tw-rain { to { background-position: -40px 120px; } } @keyframes tw-flash { 0%, 100% { background-color: transparent; } 88% { background-color: rgba(255, 255, 230, .7); } 90% { background-color: transparent; } 93% { background-color: rgba(255, 255, 230, .5); } }
.tw-map[data-wx="quake"] .tw-board { animation: tw-quake .35s ease-in-out infinite; } @keyframes tw-quake { 0%, 100% { translate: 0 0; } 25% { translate: -4px 2px; } 75% { translate: 4px -2px; } }
.tw-dex-h { display: block; margin: 14px 0 6px; color: #1f4d3a; } .tw-dex-c { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; margin: 6px 0; } .tw-dex-c img { width: 56px; height: 56px; object-fit: contain; } .tw-dex-c > div { display: grid; gap: 2px; } .tw-dex-c small { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.tw-dex-c.raid { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); } .tw-dex-mons { display: flex; flex-wrap: wrap; gap: 2px; } .tw-dex-mons img { width: 38px; height: 38px; }
.tg-city .boost { color: #b8650c; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .tw-wx[data-wx="thunder"] { animation: tw-rain .5s linear infinite; } .tw-map[data-wx="quake"] .tw-board { animation: none; } } /* (the town's life still moves; only flashes and shaking stop) */
.tw-stage > .tw-fc { position: absolute; z-index: 3; left: 8px; bottom: 8px; width: min(72%, 300px); margin: 0; padding: 5px 8px; grid-template-columns: 30px minmax(0, 1fr); background: rgba(255, 246, 220, .94); box-shadow: 0 2px 0 rgba(140, 90, 30, .2); } .tw-stage > .tw-fc img { width: 30px; height: 30px; } .tw-stage > .tw-fc[data-kind="raid"] { background: rgba(243, 227, 251, .95); }
.tw-full .tw-stage > .tw-fc { bottom: calc(env(safe-area-inset-bottom, 0px) + 74px); }
.tw-full .tw-stage > .tw-fc { bottom: calc(env(safe-area-inset-bottom, 0px) + 20px + var(--tw-foot-h, 62px)); } /* (owner 2026-11-19: the visitor card floats just above the buttons, however tall they wrap) */
@media (orientation: landscape) { .tw-full .tw-stage > .tw-fc { bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); } }
html.tw-fs .tabbar { display: none; } html.tw-fs .body { -webkit-overflow-scrolling: auto; } /* (owner 2026-11-19: in full screen the app's tabs covered 活動 and 補給; iPhone draws a fixed box inside a touch scroller under its siblings) */
/* 台灣小鎮 on wide screens: a bigger map (2026-11-18) */
@media (min-width: 900px) { .tw-stage { height: max(440px, calc(100dvh - 300px)); } }
.tw-car.rider { filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .3)); }
.tg-find { gap: 6px; } .tg-find .input { flex: 1; min-width: 0; }
.tg-fr:has(> .tg-frbtns) { grid-template-columns: minmax(0, 1fr) auto; } .tg-fr > .tg-frbtns { display: flex; flex-direction: row; gap: 4px; flex-wrap: nowrap; justify-content: flex-end; align-items: center; } .tg-frbtns > .btn { width: auto; flex: none; margin: 0; } .tg-gv { min-width: 36px; padding-inline: 6px; }
/* 社員 聊聊 (2026-11-18) */
.ag-talk { display: grid; gap: 2px; max-height: 52vh; overflow-y: auto; } .ag-talk-t { font-size: 15px; margin-top: 4px; }
.ag-line.ag-me { grid-template-columns: 1fr 40px; } .ag-meav { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 22px; background: var(--ag-card); border: 2px solid var(--ag-line); }
.ag-line.ag-me p { text-align: right; } .ag-talk-foot { display: grid; gap: 6px; margin-top: 10px; } .ag-talk-pick { text-align: left; justify-content: flex-start; white-space: normal; } .ag-talk-mood { font-weight: 700; }
/* 台灣小鎮 phase 1 (2026-11-18): two maps, land, voyages, things that move */
.tw-areas { position: static; margin: 0 0 6px; padding: 3px; background: var(--surface-2, #f3ece0); border-radius: 999px; }
.tw-areas { display: flex; gap: 2px; width: auto; } .tw-areas button { padding: 5px 10px; font-size: 13px; white-space: nowrap; border-radius: 999px; flex: none; } .tw-areas button.on { background: #1f6b4f; color: #fff; font-weight: 700; }
.tw-train { position: absolute; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .3)); animation: tw-train 6s linear infinite alternate; }
@keyframes tw-train { from { transform: translate(0, 0) scaleX(var(--fx, 1)); } to { transform: translate(var(--dx), var(--dy)) scaleX(var(--fx, 1)); } }
.tw-heli { position: absolute; object-fit: contain; pointer-events: none; filter: drop-shadow(0 18px 8px rgba(0, 0, 0, .2)); animation: tw-heli 16s ease-in-out infinite; }
@keyframes tw-heli { 0%, 12% { transform: translate(0, 0) scale(.8); } 22% { transform: translate(0, calc(var(--r) * -.6)) scale(1); } 45% { transform: translate(var(--r), calc(var(--r) * -.9)) scale(1); } 70% { transform: translate(calc(var(--r) * -1), calc(var(--r) * -.7)) scale(1); } 88% { transform: translate(0, calc(var(--r) * -.5)) scale(1); } 100% { transform: translate(0, 0) scale(.8); } }
.tw-plane { position: absolute; object-fit: contain; pointer-events: none; opacity: 0; filter: drop-shadow(0 10px 6px rgba(0, 0, 0, .2)); animation: tw-takeoff 18s ease-in infinite; }
.tw-plane.down { animation-name: tw-landing; animation-delay: -9s; }
@keyframes tw-takeoff { 0% { opacity: 1; transform: translate(0, 0) scale(.7); } 25% { opacity: 1; transform: translate(calc(var(--tx) * .3), calc(var(--ty) * .3)) scale(.75); } 50% { opacity: 1; transform: translate(var(--tx), calc(var(--ty) * -1.2)) scale(1.4); } 55%, 100% { opacity: 0; transform: translate(calc(var(--tx) * 1.3), calc(var(--ty) * -2)) scale(1.6); } }
@keyframes tw-landing { 0%, 45% { opacity: 0; transform: translate(calc(var(--tx) * -1.3), calc(var(--ty) * -2)) scale(1.6); } 50% { opacity: 1; transform: translate(calc(var(--tx) * -1), calc(var(--ty) * -1.2)) scale(1.4); } 80% { opacity: 1; transform: translate(calc(var(--tx) * -.2), calc(var(--ty) * -.2)) scale(.75); } 95% { opacity: 1; transform: translate(0, 0) scale(.7); } 100% { opacity: 0; transform: translate(0, 0) scale(.7); } }
.tw-ship { position: absolute; object-fit: contain; pointer-events: none; animation: tw-sail 30s linear infinite alternate; }
@keyframes tw-sail { from { transform: translate(0, 0); } to { transform: translate(var(--dx), var(--dy)); } }
@media (prefers-reduced-motion: reduce) { .tw-train, .tw-heli, .tw-plane, .tw-ship { animation-duration: inherit; } }
.tw-landpart { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: var(--surface-2, #f3ece0); margin: 6px 0; } .tw-landbtns { display: grid; gap: 6px; }
.tw-voy { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: #eaf5ff; } .tw-voy-list { display: grid; gap: 6px; } .tw-voy-dest { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; } .tw-voy-dest small { display: block; color: var(--ink-2); }
.tw-voy-out.back { color: #1a7f37; font-weight: 700; }
/* 開心農場 (2026-11-18) */
.tw-crop { position: absolute; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .25)); } .tw-crop.ripe { animation: tw-ripe 1.4s ease-in-out infinite; }
@keyframes tw-ripe { 50% { transform: translateY(-4px) scale(1.06); } } .tw-growb.steal { background: #ffe0e0; } .tw-growb.water { background: #dff2ff; }
.tw-grow { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: #f1f9ea; } .tw-growbar { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; } .tw-growbar img { width: 52px; height: 52px; object-fit: contain; }
.tw-growlist { display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; } .tw-growopt { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: center; text-align: left; padding: 6px 8px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, .08); background: #fff; font: inherit; color: inherit; }
.tw-growopt img { width: 44px; height: 44px; object-fit: contain; } .tw-growopt span { display: grid; gap: 1px; } .tw-growopt small { font-size: 12px; } .tw-growopt.sea { border-color: #6cbf4a; background: #f2fbe9; } .tw-growopt:disabled { opacity: .55; }
.tw-grow .tw-fcbar { height: 8px; margin-top: 4px; background: rgba(0, 0, 0, .1); border-radius: 99px; overflow: hidden; } .tw-grow .tw-fcbar i { display: block; height: 100%; background: #6cbf4a; }
/* incidents (2026-11-19) */
.tw-inc { position: absolute; object-fit: contain; pointer-events: none; } .tw-inc.fire { animation: tw-flame .5s ease-in-out infinite alternate; } .tw-inc.thief { animation: tw-sneak 1.6s ease-in-out infinite; } .tw-inc.hack { animation: tw-glitch .3s steps(2) infinite; }
@keyframes tw-flame { from { transform: scale(1, .92); filter: brightness(1); } to { transform: scale(1.06, 1.08); filter: brightness(1.2); } } @keyframes tw-sneak { 50% { transform: translateX(8px); } } @keyframes tw-glitch { 50% { transform: translate(2px, -1px); opacity: .7; } }
.tw-incb { background: #ffe1d6; animation: tw-pulse 1s ease-in-out infinite; } @keyframes tw-pulse { 0%, 100% { transform: translate(-50%, -100%) scale(1); } 50% { transform: translate(-50%, -100%) scale(1.12); } } /* (keep the button's own offset: it jumped and taps missed it) */
.tw-rescue { position: absolute; object-fit: contain; pointer-events: none; animation: tw-rescue 5s linear forwards; } @keyframes tw-rescue { from { transform: translate(0, 0); } to { transform: translate(var(--dx), var(--dy)); } }
/* the ocean, underground and space maps (2026-11-19) */
.tw-areas { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .tw-areas::-webkit-scrollbar { display: none; }
.tw-board[data-area="sea"] .tw-cell { background: #4fa8dc; } .tw-board[data-area="sea"] .tw-cell.alt { background: #48a0d4; } .tw-board[data-area="sea"] .tw-cell.has { background: #3d93c6; }
.tw-board[data-area="under"] .tw-cell { background: #8a6a4e; } .tw-board[data-area="under"] .tw-cell.alt { background: #806246; } .tw-board[data-area="under"] .tw-cell.has { background: #6f543c; }
.tw-board[data-area="space"] .tw-cell { background: #2a2f5a; } .tw-board[data-area="space"] .tw-cell.alt { background: #262a52; } .tw-board[data-area="space"] .tw-cell.has { background: #353b6e; }
.tw-board[data-area="space"] { background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.7) 0 1px, transparent 2px) 0 0 / 60px 60px, radial-gradient(circle at 70% 60%, rgba(255,255,255,.5) 0 1px, transparent 2px) 0 0 / 90px 90px, #10132e; }
.tw-board[data-area="under"] { background: #3b2a1e; } .tw-board[data-area="sea"] { background: #2f86bd; }
.tw-seav { position: absolute; object-fit: contain; pointer-events: none; animation: tw-bob 2.4s ease-in-out infinite; } .tw-seav.whale { animation: tw-swim 9s ease-in-out infinite alternate; }
@keyframes tw-bob { 50% { transform: translateY(-6px) rotate(-3deg); } } @keyframes tw-swim { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
.tw-incb.good { background: #d9f6ff; } .tw-seavpic { width: 120px; height: 120px; object-fit: contain; margin: 0 auto; display: block; }
.tw-board[data-area="sea"] .tw-cell.coast:not(.has):not(.road) { background: #4fa8dc; } .tw-board[data-area="sea"] .tw-cell.coast.alt:not(.has):not(.road) { background: #48a0d4; }
.tw-board[data-area="under"] .tw-cell.coast:not(.has):not(.road) { background: #8a6a4e; } .tw-board[data-area="space"] .tw-cell.coast:not(.has):not(.road) { background: #2a2f5a; }
.tw-stage:has(.tw-board[data-area="sea"]), .tw-scroll:has(.tw-board[data-area="sea"]) { background: #2f86bd; } .tw-stage:has(.tw-board[data-area="under"]), .tw-scroll:has(.tw-board[data-area="under"]) { background: #3b2a1e; } .tw-stage:has(.tw-board[data-area="space"]), .tw-scroll:has(.tw-board[data-area="space"]) { background: #10132e; }
.tw-voypal { display: grid; gap: 4px; } 
/* 台灣小鎮 big maps (2026-11-19): the land under the tiles not drawn yet, one diamond, in the map's colour */
.tw-board[data-big]::before { content: ''; position: absolute; left: calc(var(--tw) / 2); top: var(--head); width: calc(var(--tw) * var(--side)); height: calc(var(--tw) / 2 * var(--side)); background: #9fd67f; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); pointer-events: none; }
.tw-board[data-big][data-area="sea"]::before { background: #4fa8dc; } .tw-board[data-big][data-area="under"]::before { background: #8a6a4e; } .tw-board[data-big][data-area="space"]::before { background: #2a2f5a; }
/* 📣 分享打卡 (2026-11-19): the share button on every top bar, a red dot while today's gift for this page waits */
.share-top { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line, rgba(0,0,0,.12)); background: var(--card, #fff); font-size: 19px; display: grid; place-items: center; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.share-top .share-dot { position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 2px var(--card, #fff); display: none; }
.share-top.due .share-dot { display: block; } .share-top.due { animation: share-nudge 2.6s ease-in-out infinite; }
@keyframes share-nudge { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(-12deg); } 94% { transform: rotate(10deg); } }
/* 台灣小鎮 phase 5 (2026-11-19): 連續鋪設 beside each road, 🎉 活動 sheet, the scoreboard, lanterns and balloons in the sky */
.tw-optrow { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; } .tw-pave { white-space: nowrap; }
.tw-fun { display: grid; gap: 8px; } .tw-fun h4 { margin: 10px 0 0; } .tw-funrow { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); } .tw-funrow > span { flex: 1; min-width: 0; } .tw-funrow select { max-width: 9em; }
.tw-score { overflow-x: auto; } .tw-score table { border-collapse: collapse; font-variant-numeric: tabular-nums; } .tw-score th, .tw-score td { padding: 4px 7px; border: 1px solid var(--line, rgba(0,0,0,.12)); text-align: center; white-space: nowrap; } .tw-score td.r { font-weight: 800; } .tw-ballpic { width: 64px; height: 64px; justify-self: center; display: block; margin: 0 auto; }
.tw-lan { position: absolute; pointer-events: none; animation: tw-lan-rise 10s linear infinite; filter: drop-shadow(0 0 6px rgba(255, 190, 90, .9)); }
@keyframes tw-lan-rise { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 10% { opacity: 1; } 80% { opacity: .9; } 100% { transform: translate(18px, -260px) scale(.35); opacity: 0; } }
.tw-balloon { position: absolute; pointer-events: none; animation: tw-bal-drift 7s ease-in-out infinite alternate; }
@keyframes tw-bal-drift { from { transform: translate(-8px, 6px); } to { transform: translate(10px, -16px); } }
/* 寶島人生's door (web/js/app.js renderBaoTab, 2026-11-19) */
.bao-door { display: grid; gap: 10px; } .bao-key { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 16px; } .bao-art { display: flex; justify-content: center; align-items: flex-end; gap: 0; padding: 14px 6px 4px; border-radius: 16px; background: linear-gradient(#bfe3f7, #cfe8b4 70%); }
.bao-art img { width: 19%; aspect-ratio: 1; object-fit: contain; margin: 0 -2%; filter: drop-shadow(0 4px 0 rgba(80, 60, 20, .18)); } .bao-art img:first-child { width: 24%; }
.bao-pack { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--hair); } .bao-pack > div { display: grid; } .bao-pack small { color: var(--ink-3); }
.bao-in { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--hair); background: var(--surface-solid); color: var(--ink); font: inherit; margin: 4px 0; }
.bao-rent { display: grid; gap: 8px; } .bao-adprev { aspect-ratio: 2 / 1; border-radius: 12px; border: 2px dashed var(--hair); display: grid; place-items: center; overflow: hidden; color: var(--ink-3); font-size: 13px; } .bao-adprev img { width: 100%; height: 100%; object-fit: cover; }
.bao-myads { display: grid; gap: 4px; } .bao-myad { display: grid; padding: 6px 0; border-top: 1px solid var(--hair); } .bao-myad small { color: var(--ink-3); }
/* 回到房間 at the top of the escape lobby (2026-11-22) */
.esc-back2room { display: flex; align-items: stretch; gap: 8px; margin: 0 0 12px; }
.esc-back2room .esc-b2r-go { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, #ff8a3d, #ff5f6d); color: #fff; text-decoration: none; box-shadow: 0 4px 14px rgba(255,95,109,.35); }
.esc-back2room .esc-b2r-go b { font-size: 17px; } .esc-back2room .esc-b2r-go small { font-size: 12.5px; opacity: .95; }
.esc-back2room .esc-b2r-no { flex: none; padding: 0 12px; border-radius: 16px; border: 1px solid rgba(0,0,0,.12); background: rgba(255,255,255,.85); color: #6b5a48; font-size: 13px; }
/* 公佈欄: weekly groups (board.js, 2026-11-22) */
.board { display: grid; gap: 10px; }
.board-top .btn { flex: 1; }
.board-heat { background: var(--card, #fff); border-radius: 14px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.board-heat .board-hot { color: #c2410c; font-weight: 700; }
.heat-grid { display: grid; grid-template-columns: 18px repeat(24, 1fr); gap: 2px; margin-top: 8px; align-items: center; }
.heat-hr { font-size: 10px; color: #8a7a6a; }
.heat-day { font-size: 11px; color: #6b5a48; text-align: center; }
.heat-c { aspect-ratio: 1; border: 0; padding: 0; border-radius: 3px; background: rgba(255, 106, 61, var(--k)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); min-width: 0; }
.heat-c.on { outline: 2px solid #3a2418; outline-offset: 1px; }
.board-tabs { margin-top: 2px; }
.board-slot { justify-self: start; }
.board-card .board-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.board-card .chip.hot { background: #ffedd5; color: #c2410c; font-weight: 700; }
.board-card.on { box-shadow: 0 0 0 2px #fb923c, 0 4px 14px rgba(251,146,60,.25); }
.board-card .board-when { font-weight: 700; color: #3a2a1e; margin: 2px 0; }
.board-card .board-note { color: #6b5a48; margin: 2px 0; }
.rally-quick { margin: 14px 0 4px; font-size: 15px; }
/* 社團 (club.js, 2026-11-22) */
.clubs { display: grid; gap: 8px; }
.clubs .btn { flex: 1; }
.club-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--card, #fff); box-shadow: 0 1px 3px rgba(0,0,0,.08); color: inherit; }
.club-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: #fff3e0; }
.club-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.club-main b { font-size: 15px; } .club-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.club-go { flex: none; color: #9a8a7a; font-size: 18px; } .club-go.join { font-size: 13px; font-weight: 700; color: #fff; background: #0f766e; padding: 6px 12px; border-radius: 999px; }
.club-badge { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #ef4444; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.club-room { display: flex; flex-direction: column; height: calc(100dvh - 220px - env(safe-area-inset-bottom)); min-height: 360px; }
.club-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 6px; border-bottom: 1px solid rgba(0,0,0,.06); }
.club-head .club-title { flex: 1; min-width: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.club-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 2px; overscroll-behavior: contain; }
.club-msg { max-width: 82%; align-self: flex-start; display: grid; gap: 2px; }
.club-msg.mine { align-self: flex-end; }
.club-who { font-size: 11px; color: #8a7a6a; display: flex; align-items: center; gap: 4px; } .club-who i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.club-text { margin: 0; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); white-space: pre-wrap; word-break: break-word; }
.club-msg.mine .club-text { border-radius: 16px 16px 4px 16px; background: #dcfce7; }
.club-gcard { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, #fff7ed, #ffedd5); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.club-bar { display: flex; gap: 6px; align-items: center; padding-top: 8px; border-top: 1px solid rgba(0,0,0,.06); }
.club-bar .input { flex: 1; min-width: 0; } .club-bar .club-play { font-size: 20px; padding: 6px 10px; }
.club-icons { display: flex; flex-wrap: wrap; gap: 6px; } .club-icons button { font-size: 22px; width: 42px; height: 42px; border-radius: 10px; border: 1px solid #e3d3bf; background: #fff; }
.club-icons button[aria-pressed="true"] { background: #ffcf4a; border-color: #e8b52a; }
.club-games { display: grid; gap: 8px; }
/* 每月好禮 (month.js, 2026-11-23) */
.month { display: grid; gap: 10px; } .month h4 { margin: 8px 0 0; font-size: 15px; }
.month-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.month-cal b { font-size: 11px; color: #8a7a6a; } .month-cal span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: #f4ece2; font-size: 13px; color: #6b5a48; }
.month-cal span.on { background: #ffcf4a; color: #3a2418; font-weight: 900; } .month-cal span.ad { background: #ffe4a8; } .month-cal span.today { outline: 2px solid #ff8a3d; } .month-cal span.later { opacity: .5; }
.month-track { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.month-step { flex: none; width: 92px; scroll-snap-align: start; display: grid; gap: 2px; justify-items: center; text-align: center; padding: 8px 6px; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.month-step .ms-ico { font-size: 24px; } .month-step b { font-size: 13px; } .month-step small { font-size: 10.5px; color: #8a7a6a; line-height: 1.25; }
.month-step.got { background: #ecfdf5; } .month-step.ready { box-shadow: 0 0 0 2px #fb923c; }
.month-pts { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, #fff7ed, #ffedd5); } .month-pts b { font-size: 18px; color: #c2410c; } .month-next { color: #9a3412; font-weight: 700; }
.month-top { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; } .month-top li { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 10px; background: #fff; font-size: 14px; } .month-top li.me { background: #fef3c7; font-weight: 700; }
.month-row { margin-bottom: 10px; }


/* 公佈欄 👍 (2026-11-23) */
.board-card .btn.liked { background: #ffe1ea; color: #c2185b; border-color: #f7a8c0; } .board-likes { align-self: center; }

/* 社團徽章 (2026-11-23) */
.club-badges { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 8px; } .club-badges button { padding: 4px; border-radius: 12px; border: 2px solid transparent; background: #fff7ec; } .club-badges button[aria-pressed="true"] { border-color: #f59e0b; background: #fff1d6; } .club-badges img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
img.club-ico.club-badgeimg { width: 40px; height: 40px; object-fit: contain; } img.club-titleico { width: 26px; height: 26px; vertical-align: middle; object-fit: contain; }

/* 社團 ＋ / 😊 (2026-11-23) */
.club-bar .club-plus, .club-bar .club-stick { flex: none; min-width: 40px; padding: 0 8px; font-size: 18px; } .club-msg.card { background: none; box-shadow: none; padding: 0; } img.club-sticker { width: 120px; height: 120px; object-fit: contain; display: block; } .club-tkl b { color: #b45309; } .club-tkl .mono { font-family: ui-monospace, monospace; }

/* 台灣小鎮 地形, 水上, 建築特效 (owner 2026-11-23) */
.tw-cell.tw-t-forest { background: #4f9a45; } .tw-cell.tw-t-forest.alt { background: #48913f; } .tw-cell.tw-t-mountain { background: #b08d62; } .tw-cell.tw-t-mountain.alt { background: #a6845a; }
.tw-cell.tw-t-rock { background: #a9adaa; } .tw-cell.tw-t-rock.alt { background: #a1a5a2; } .tw-cell.tw-t-wetland { background: #7fb9a6; } .tw-cell.tw-t-wetland.alt { background: #77b19e; }
.tw-cell.tw-t-flower { background: #f3b6d0; } .tw-cell.tw-t-flower.alt { background: #eeaac7; } .tw-cell.tw-t-sand, .tw-cell.coast.tw-t-sand { background: #f1dfa5; } .tw-cell.tw-t-sand.alt { background: #ead697; }
.tw-cell.tw-t-lake { background: #6cc4e8; } .tw-cell.tw-t-lake.alt { background: #63bce2; }
.tw-ter { position: absolute; transform: translateY(-100%); pointer-events: none; } /* (taps go to the cell under it: a picture stands over the cells behind) */
.tw-sp.wet .tw-b { -webkit-mask-image: linear-gradient(to bottom, #000 78%, rgba(0, 0, 0, .35) 92%, transparent 100%); mask-image: linear-gradient(to bottom, #000 78%, rgba(0, 0, 0, .35) 92%, transparent 100%); }
.tw-ripple { position: absolute; left: 8%; right: 8%; bottom: -4%; height: 22%; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .75); background: radial-gradient(ellipse at center, rgba(255, 255, 255, .35), rgba(120, 200, 240, 0) 70%); animation: tw-ripple 2.6s ease-out infinite; pointer-events: none; }
@keyframes tw-ripple { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.25); opacity: 0; } }
.tw-fx { position: absolute; left: 50%; top: 4%; width: 0; height: 0; pointer-events: none; z-index: 2; } .tw-fx b { position: absolute; left: -6px; top: 0; width: 12px; height: 12px; border-radius: 50%; opacity: 0; animation: tw-fx-up 2.8s ease-out infinite; }
.tw-fx b:nth-child(2) { animation-delay: .9s; left: 2px; } .tw-fx b:nth-child(3) { animation-delay: 1.8s; left: -10px; }
.fx-steam b { background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%); width: 16px; height: 16px; } .fx-smoke b { background: radial-gradient(circle, rgba(120, 120, 120, .8), rgba(120, 120, 120, 0) 70%); width: 18px; height: 18px; }
.fx-water b { background: radial-gradient(circle, rgba(120, 210, 255, .95), rgba(120, 210, 255, 0) 70%); animation-name: tw-fx-spray; }
.fx-spark b, .fx-coin b, .fx-note b, .fx-heart b, .fx-bolt b { width: auto; height: auto; border-radius: 0; font-size: 14px; line-height: 1; } .fx-spark b::before { content: '✨'; } .fx-coin b::before { content: '🪙'; } .fx-note b::before { content: '♪'; color: #7c3aed; font-weight: 900; } .fx-heart b::before { content: '💗'; } .fx-bolt b::before { content: '⚡'; }
@keyframes tw-fx-up { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(6px, -46px) scale(1.4); opacity: 0; } }
@keyframes tw-fx-spray { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 20% { opacity: 1; } 60% { transform: translate(8px, -26px) scale(1); } 100% { transform: translate(14px, -4px) scale(.6); opacity: 0; } }
.tw-board[data-big] .tw-fx { display: none; } @media (prefers-reduced-motion: reduce) { .tw-fx, .tw-ripple { display: none; } }
.tw-terbox { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 14px; margin-bottom: 8px; color: #2b2b2b; } .tw-terbox small { line-height: 1.4; } .tw-terbtns { flex-wrap: wrap; gap: 6px; }

/* 全螢幕也能切換主城、郊區、海洋、地底、太空 (owner 2026-11-23) */
.tw-map.tw-full > .tw-areas { position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 150px); margin: 0; max-width: calc(100vw - 24px); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); background: rgba(255, 250, 240, .94); }

/* 禪院 / 大廟 parts (2026-11-23) */
.tw-complex { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: #fff7e6; margin: 6px 0; } .tw-complex.done { background: linear-gradient(120deg, #fff3c4, #ffe0f0); }

.tw-optl { display: block; color: #1f6b4f; font-weight: 600; line-height: 1.3; }

/* 貼合地塊 (2026-11-23): a fitted building has no lift; its water fade off (the plot is the water) */
.tw-sp.fit { transform: none; } .tw-sp.fit.wet .tw-b { -webkit-mask-image: none; mask-image: none; } .tw-sp.fit .tw-ripple { bottom: 2%; }

/* 密室 誰在哪裡 (2026-11-23) */
.esc-where { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 6px; } .esc-where-c.tower { background: #fff1d6; border-color: #f0b44c; font-weight: 700; } #escMore > summary[data-live]::after { content: '　' attr(data-live); color: #c76a00; font-weight: 700; }

/* 一起玩過 (2026-11-23) */
.chat-met { margin: 0 0 8px; padding: 6px 12px; border-radius: 999px; background: #fff1d6; color: #8a5200; font-weight: 700; font-size: 14px; display: inline-block; } .chat-met-tag { display: inline-block; font-size: 12px; color: #8a5200; background: #fff1d6; border-radius: 999px; padding: 0 8px; margin: 2px 0; }

/* astra a1 (2026-11-23): level numbers only up close; 透視 makes buildings see-through and lets taps reach the cells behind */
.tw-board[data-small] .tw-lv { display: none; }
.tw-board[data-xray] .tw-sp, .tw-board[data-xray] .tw-ter, .tw-board[data-xray] .tw-crop { opacity: .28; pointer-events: none; } .tw-board[data-xray] .tw-cell.has { outline: none; filter: brightness(1.08); }
#twXray[aria-pressed="true"] { background: #1f6b4f; color: #fff; }

/* astra a1 second batch (2026-11-23): a shut card's reason readable; fewer effects when zoomed out */
.tw-opt:disabled { opacity: 1; } .tw-opt:disabled img { opacity: .45; } .tw-opt:disabled .tw-optt b, .tw-opt:disabled .tw-optn, .tw-opt:disabled .tw-optm, .tw-opt:disabled .tw-optl { opacity: .55; } .tw-optt .tw-optwhy { color: #a14a00; font-weight: 700; }
.tw-board[data-small] .tw-fx { display: none; } .tw-zones button:focus:not(:focus-visible) { outline: none; }

/* full screen (astra a1 #3/#11): the tip and event card below the money and rate pills, clear of the zoom column; collect-all never breaks mid-word */
@media (orientation: portrait) { .tw-map.tw-full > .tw-event, .tw-map.tw-full > .tw-tip { top: calc(env(safe-area-inset-top, 0px) + 92px); left: calc(env(safe-area-inset-left, 0px) + 10px); right: calc(env(safe-area-inset-right, 0px) + 66px); width: auto; transform: none; } }
.tw-foot .btn { word-break: keep-all; }

/* 📷 photo mode and 🔍 find (astra a1, 2026-11-23) */
.tw-map.tw-photo .tw-coin, .tw-map.tw-photo .tw-lv, .tw-map.tw-photo .tw-warn, .tw-map.tw-photo .tw-fx, .tw-map.tw-photo .tw-fc, .tw-map.tw-photo .tw-rate2, .tw-map.tw-photo .tw-mini, .tw-map.tw-photo .tw-wx,
.tw-map.tw-photo .tw-foot, .tw-map.tw-photo .tw-tip, .tw-map.tw-photo .tw-areas, .tw-map.tw-photo .tw-news, .tw-map.tw-photo .tw-event { display: none !important; }
.tw-map.tw-photo #twPhoto { opacity: .6; }
.tw-findq { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--hair); font-size: 16px; margin: 4px 0 8px; background: var(--surface-solid); color: var(--ink); }
.tw-findlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 50vh; overflow: auto; }
.tw-findrow { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--hair); border-radius: 14px; background: var(--surface-solid); color: var(--ink); min-height: 44px; }
.tw-findrow img { width: 52px; height: 52px; object-fit: contain; } .tw-findrow b { font-size: 13px; text-align: center; line-height: 1.25; } .tw-findrow small { font-size: 11.5px; color: var(--ink-2); min-height: 14px; }
@keyframes tw-flash { 0%, 100% { filter: none; } 25%, 75% { filter: drop-shadow(0 0 10px #ffd34d) drop-shadow(0 0 4px #fff) brightness(1.15); } 50% { filter: drop-shadow(0 0 16px #ffb300) brightness(1.25); } }
.tw-sp.tw-flash { animation: tw-flash 1.2s ease-in-out 2; z-index: 9000 !important; }

/* the tool column: the less used behind ⋯ (astra a1 #3: buttons covered the map) */

/* ⋯ opens a row to its left (astra a2 #2); 📷 full screen with only its ✕ (a2 #1); the bonus on this cell (a2 #5) */
.tw-morewrap { position: relative; } .tw-extra { display: none; position: absolute; right: calc(100% + 6px); top: 0; flex-direction: row; gap: 6px; }
.tw-morewrap.open .tw-extra { display: flex; }
.tw-map.tw-photo .tw-zoom > :not(.tw-morewrap), .tw-map.tw-photo #twMore, .tw-map.tw-photo .tw-extra > :not(#twPhoto) { display: none !important; } .tw-map.tw-photo .tw-extra { display: flex !important; position: static; }
.tw-map.tw-photo .tw-board::after, .tw-map.tw-photo .tw-stage > :not(.tw-scroll):not(.tw-zoom) { display: none !important; }
.tw-optt .tw-opthere { color: #0b6b52; font-weight: 800; }

/* small phones (iPhone 13): the tool column and its ⋯ row above the forecast bar; the bar narrower and clear of the column */
.tw-zoom { z-index: 4; } .tw-stage > .tw-fc { width: auto; max-width: min(64%, 270px); right: auto; }

.tw-optt .tw-optnoroad { color: #b3261e; font-weight: 700; } /* (臨路 warning on a build card: astra 2026-11-23) */

/* 新朋友先聊 (astra 2026-11-23) */
.chat-grace{margin:0;padding:6px 12px;font-size:13px;text-align:center;background:color-mix(in srgb,var(--accent,#0b6b52) 12%,transparent);color:inherit}

/* 每月好禮 painted (owner 2026-11-23: 版面很醜、兩個 🎁) */
.month-card { position: relative; display: grid; align-content: end; gap: 3px; width: 100%; min-height: 156px; margin: 0 0 12px; padding: 14px 16px; border: 0; border-radius: 18px; overflow: hidden; text-align: left; font: inherit; color: #3a2418; background: #ffe9d2; box-shadow: 0 8px 22px rgba(120,60,20,.16); cursor: pointer; }
.month-card .mc-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% center; }
.month-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,247,236,.97) 0%, rgba(255,247,236,.9) 40%, rgba(255,247,236,0) 68%); }
.month-card > :not(.mc-pic) { position: relative; z-index: 1; max-width: 60%; }
.month-card .mc-title { font-size: 21px; font-weight: 900; line-height: 1.2; }
.month-card > small { font-size: 13px; line-height: 1.35; color: #6b4a32; }
.month-card .mc-next { font-weight: 700; color: #b4471c; }
.mc-tag { justify-self: start; padding: 2px 9px; border-radius: 999px; background: #e8572e; color: #fff; font-size: 12px; font-weight: 700; }
.mc-bar { display: block; height: 8px; margin-top: 3px; border-radius: 99px; background: rgba(160,90,40,.18); overflow: hidden; }
.mc-bar > b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffb23f, #ff7a3d); }
.month-hero { width: 100%; aspect-ratio: 1344 / 576; object-fit: cover; border-radius: 16px; }
.month-h { display: flex; align-items: center; gap: 6px; } .month-h img { width: 28px; height: 28px; object-fit: contain; }
.month-step .ms-ico { position: relative; display: block; width: 48px; height: 48px; } .month-step .ms-ico img { width: 48px; height: 48px; object-fit: contain; }
.month-step .ms-ico .ms-got { position: absolute; right: -8px; bottom: -6px; width: 28px; height: 28px; }
.month-step.got .ms-ico > img:first-child { opacity: .55; }
.month-cal span .mc-stamp { width: 82%; height: 82%; object-fit: contain; }
.month-cal span.on { background: #fff3d6; }
.month-share { display: flex; align-items: center; justify-content: center; gap: 8px; } .month-share img { width: 30px; height: 30px; object-fit: contain; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .month-card { color: #3a2418; } }

/* 市政: 公布實施 and 關閉 stay at the sheet's bottom (astra 2026-11-24) */
.tg-govbar { position: sticky; bottom: calc(-1 * var(--sheet-pad, 16px)); display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin: 6px calc(-1 * var(--sheet-pad, 16px)) 0; padding: 10px var(--sheet-pad, 16px) calc(10px + env(safe-area-inset-bottom)); background: var(--surface-solid, #fffdf8); border-top: 1px solid var(--hair-2, #eee4d8); z-index: 2; }
.tg-govbar .btn { min-height: 48px; margin: 0; }

/* ── 台灣小鎮 2.0 (owner 2026-11-25: 介面改成像日日小窩、準提、貓仔湯鋪的風格，比較清楚可見；目前介面有點太亂，不夠吸引女生) ──
   one calm cream page: rounded cards, soft peach and pink, fewer things on the map. Scoped to .tg2 (js/town/home.js). */
.tg2 { --t2-cream: #fffaf3; --t2-card: #fffdf9; --t2-ink: #5a3a2e; --t2-ink2: #8a6a58; --t2-peach: #ff9d7a; --t2-peach2: #e57c5a; --t2-pink: #ffe3ea; --t2-pinkink: #b9476a; --t2-line: #f1dccd; color: var(--t2-ink); }
.tg2 .tg-hud { background: var(--t2-cream); border-radius: 0 0 24px 24px; box-shadow: 0 6px 16px rgba(160, 100, 60, .12); padding-top: 10px; padding-bottom: 10px; border-bottom: 0; }
.tg2 .tg-crest { width: 46px; height: 46px; border-radius: 16px; background: #fff0e6; padding: 3px; object-fit: contain; }
.tg2 .tw-who b { color: var(--t2-ink); font-size: 16px; } .tg2 .tw-who small { color: var(--t2-ink2); }
.tg2 .tw-bar { background: #f6e5d8; } .tg2 .tw-bar i { background: linear-gradient(90deg, #ffb59c, #f08ca8); }
.tg2 .tw-fund { background: #fff1d6; box-shadow: none; color: #9a5a1a; }
.tg2 .tg-strip { flex-wrap: wrap; } .tg2 .tg-mats { display: none; } /* (the materials are in the city sheet: one tap on 👥) */
.tg2 .tg-city { flex: 0 1 auto; background: #fff1e8; color: var(--t2-ink); }
.tg-vis { flex: 1 1 auto; min-width: 0; padding: 5px 12px; border: 0; border-radius: 999px; background: var(--t2-pink, #ffe3ea); color: var(--t2-pinkink, #b9476a); font: 800 12.5px/1.3 inherit; font-family: inherit; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.tg2 .tg-tabs { background: var(--t2-card); border-radius: 22px; box-shadow: 0 3px 10px rgba(160, 100, 60, .08); padding: 4px; border: 0; }
.tg2 .tg-tabs button { border-radius: 18px; color: var(--t2-ink2); } .tg2 .tg-tabs button.on { background: var(--t2-pink); color: var(--t2-pinkink); box-shadow: none; }
.tg2 .btn:not(.ghost):not(.danger) { background: linear-gradient(#ffad8f, var(--t2-peach)); color: #fff; border: 0; box-shadow: 0 3px 0 var(--t2-peach2); border-radius: 16px; }
.tg2 .btn.ghost { background: #fff; color: var(--t2-ink); border: 1.5px solid var(--t2-line); box-shadow: none; border-radius: 16px; }
/* the map: the tools in one soft capsule, the areas as pills, the news as a cream pill, the buttons below as a dock */
.tg2 .tw-zoom { gap: 2px; padding: 4px; border-radius: 22px; background: rgba(255, 250, 243, .94); box-shadow: 0 4px 12px rgba(60, 30, 10, .18); }
.tg2 .tw-zb { width: 38px; height: 38px; border-radius: 50%; background: transparent; box-shadow: none; color: var(--t2-ink); font-size: 18px; }
.tg2 .tw-zb:active { background: #ffe9dc; } .tg2 .tw-morewrap.open .tw-extra { background: rgba(255, 250, 243, .97); border-radius: 18px; box-shadow: 0 4px 12px rgba(60, 30, 10, .16); padding: 3px; }
.tg2 .tw-map[data-time="night"] .tw-zoom { background: rgba(48, 46, 78, .9); } .tg2 .tw-map[data-time="night"] .tw-zb { background: transparent; color: #f4ecd8; }
.tg2 .tw-areas { background: var(--t2-card); box-shadow: 0 2px 8px rgba(160, 100, 60, .1); } .tg2 .tw-areas button { color: var(--t2-ink2); } .tg2 .tw-areas button.on { background: var(--t2-pink); color: var(--t2-pinkink); box-shadow: none; }
.tg2 .tw-news { background: var(--t2-card); color: var(--t2-ink); box-shadow: 0 2px 8px rgba(160, 100, 60, .1); border-radius: 18px; }
.tg2 .tw-foot { gap: 8px; } .tg-footx { display: contents; }
.tg2 .tw-foot .btn, .tg2 .tw-foot .tg-gov { min-height: 46px; border-radius: 18px; font-size: 14px; }
.tg2 .tw-foot .tg-gov { background: #fff; color: var(--t2-ink); border: 1.5px solid var(--t2-line); box-shadow: none; }
.tg2 .tw-foot .tg-tour { background: var(--t2-pink); color: var(--t2-pinkink); border: 0; }
.tg2 .tw-rate2 { background: rgba(255, 250, 243, .94); color: var(--t2-ink); border-radius: 999px; box-shadow: 0 2px 8px rgba(60, 30, 10, .14); }
.tg2 .tg-play { border-radius: 18px; }
/* visiting someone's town */
.tg-visitcard { display: grid; gap: 6px; margin: 4px 0 10px; padding: 14px 16px; border-radius: 22px; background: var(--t2-card, #fffdf9); box-shadow: 0 4px 14px rgba(160, 100, 60, .12); }
.tg-visitcard .tg-visit-t { font-size: 17px; color: var(--t2-pinkink, #b9476a); } .tg-vline { color: var(--t2-ink2, #8a6a58); font-size: 13px; }
.tg-visitbtns { display: flex; flex-wrap: wrap; gap: 8px; } .tg-visitbtns .btn { flex: 1 1 auto; min-height: 42px; }
/* 參觀 list */
.tg-toursort { margin: 4px 0 8px; } .tg-tourlist { display: grid; gap: 8px; }
.tg-tourcard { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 2px 8px rgba(80, 50, 20, .07); text-align: left; font-family: inherit; color: inherit; cursor: pointer; }
.tg-tourcard img { width: 48px; height: 48px; border-radius: 14px; background: #fff0e6; object-fit: contain; } .tg-tourcard span { display: grid; gap: 2px; min-width: 0; } .tg-tourcard b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tg-tourcard small { color: #a68c76; }
.tg-tourcard i { font-style: normal; font-weight: 800; color: #b9476a; background: #ffe3ea; padding: 6px 12px; border-radius: 999px; font-size: 13px; }
/* the welcome (no town yet) */
.tg-welcome { position: relative; display: grid; justify-items: center; margin: 6px 0 14px; } .tg-welimg { width: 100%; max-height: 280px; object-fit: cover; border-radius: 24px; box-shadow: 0 6px 18px rgba(160, 100, 60, .18); }
.tg-welcard { position: relative; margin: -40px 12px 0; display: grid; gap: 10px; padding: 18px; border-radius: 24px; background: #fffaf3; box-shadow: 0 8px 22px rgba(120, 70, 40, .18); text-align: center; width: calc(100% - 24px); box-sizing: border-box; }
.tg-welcard h2 { margin: 0; font-size: 20px; color: #5a3a2e; } .tg-welcard p { margin: 0; font-size: 14px; line-height: 1.6; color: #8a6a58; } .tg-welcard .input { text-align: center; font-size: 16px; } .tg-welgo { min-height: 48px; font-size: 16px; }
.tg-pane.tg-wel-on > .tw-map, .tg-pane.tg-wel-on > .tg-play { display: none; }
/* the sheets while the town is open */
body:has(#townGame) .sheet { background: #fffaf3; border-radius: 26px 26px 0 0; }
body:has(#townGame) .sheet h3 { color: #5a3a2e; }
body:has(#townGame) .sheet .btn:not(.ghost):not(.danger) { background: linear-gradient(#ffad8f, #ff9d7a); color: #fff; border: 0; box-shadow: 0 3px 0 #e57c5a; border-radius: 16px; }
body:has(#townGame) .sheet .btn.ghost { background: #fff; color: #5a3a2e; border: 1.5px solid #f1dccd; border-radius: 16px; }
body:has(#townGame) .sheet .seg button.on { background: #ffe3ea; color: #b9476a; }
body:has(#townGame) .sheet input[type=range] { accent-color: #f08ca8; }
/* 台灣小鎮 2.0: the buttons under the map share one row evenly (參觀 inside a display:contents wrapper was taking it all); the visit card's buttons in a row */
.tg2 .tw-foot { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.tg2 .tw-foot > *, .tg2 .tg-footx > * { width: auto; min-width: 0; margin: 0; flex: none !important; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg2 .tw-foot > [hidden], .tg2 .tg-footx > [hidden] { display: none !important; }
@media (orientation: landscape) { .tg2 .tw-map.tw-full > .tw-foot { grid-auto-flow: row; grid-auto-columns: auto; } .tg2 .tw-map.tw-full > .tw-foot .btn, .tg2 .tw-map.tw-full .tg-footx > * { min-width: 150px; } }
.tg-visitbtns .btn { width: auto; flex: 1 1 0; min-width: 0; padding: 0 8px; white-space: nowrap; }

/* ── 台灣小鎮 game screen (owner 2026-11-25: 要像貓仔湯鋪的介面，Unity 的概念；之前只改了顏色): no app bars; the map fills the screen; the top floats
   (‹, the town, its money, people and visitors); the areas under it; 委託・偵探社・收藏・朋友 as picture buttons down the right; the buttons along
   the bottom; whatever opens comes over the map with ✕. (js/town/home.js .tg3, js/escape/town-ui.js opts.game) ── */
.tg-screen { min-height: 100dvh; background: #fff3e6; } .tg-screen > .body { padding: 0; max-width: none; margin: 0; }
.tg3 .tg-tabs, .tg3 .tg-play, .tg3 .tw-game .tw-mini { display: none !important; }
.tg3 .tw-game > .tw-news { position: absolute; z-index: 4; top: calc(env(safe-area-inset-top, 0px) + 150px); left: calc(env(safe-area-inset-left, 0px) + 8px); right: 70px; margin: 0; padding: 6px 12px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* (the town radio, one slim line under the areas) */
.tg3 .tg-hud { position: fixed; z-index: 20; left: calc(env(safe-area-inset-left, 0px) + 8px); right: calc(env(safe-area-inset-right, 0px) + 8px); top: calc(env(safe-area-inset-top, 0px) + 8px); margin: 0; padding: 6px 10px 6px 6px; border-radius: 22px;
  grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 8px; row-gap: 4px; background: rgba(255, 250, 243, .95); box-shadow: 0 6px 16px rgba(60, 30, 10, .18); }
.tg3 .tg-back { grid-row: 1 / span 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #fff; color: #5a3a2e; font-size: 24px; font-weight: 900; line-height: 1; box-shadow: 0 2px 6px rgba(120, 80, 30, .2); }
.tg3 .tg-crest { grid-row: 1 / span 2; width: 42px; height: 42px; }
.tg3 .tg-hud .tw-who b { font-size: 15px; } .tg3 .tg-hud .tw-who small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg3 .tg-strip { grid-column: 3 / -1; flex-wrap: nowrap; gap: 6px; } .tg3 .tg-city { padding: 3px 8px; font-size: 11.5px; } .tg3 .tg-vis { padding: 3px 10px; font-size: 11.5px; }
.tg3 .tw-game > .tw-areas { top: calc(env(safe-area-inset-top, 0px) + 104px); bottom: auto; left: calc(env(safe-area-inset-left, 0px) + 8px); transform: none; max-width: calc(100vw - 16px); }
.tg3 .tw-game .tw-zoom { top: calc(env(safe-area-inset-top, 0px) + 150px); }
.tg3 .tw-game .tw-rate2 { top: calc(env(safe-area-inset-top, 0px) + 192px); left: calc(env(safe-area-inset-left, 0px) + 10px); }
.tg3 .tw-game > .tw-event, .tg3 .tw-game > .tw-tip { top: calc(env(safe-area-inset-top, 0px) + 232px); }
.tg3 .tw-game > .tw-foot { bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); width: calc(100vw - 16px); left: 8px; transform: none; }
.tg3 .tw-game > .tw-foot .btn, .tg3 .tw-game .tg-footx > * { min-height: 50px; padding: 0 4px; font-size: 12.5px; display: grid; place-items: center; align-content: center; gap: 0; line-height: 1.15; white-space: normal; }
/* little pictures on the bottom buttons */
.tg3 #townTour, .tg3 #townGov, .tg3 #twFun, .tg3 #twShop, .tg3 #twCollect { background-repeat: no-repeat; background-size: 24px 24px; background-position: 50% 5px; padding-top: 26px !important; }
.tg3 #townTour { background-image: url(/img/town/ti-visit.webp); } .tg3 #townGov { background-image: url(/img/town/ti-gov.webp); } .tg3 #twFun { background-image: url(/img/town/ti-event.webp); }
.tg3 #twShop { background-image: url(/img/town/ti-shop.webp); } .tg3 #twCollect { background-image: url(/img/town/ti-collect.webp), linear-gradient(#ffb59c, #ff9d7a); background-size: 24px 24px, auto; background-position: 50% 5px, 0 0; }
.tg3 .tw-game .tw-stage > .tw-fc { bottom: calc(env(safe-area-inset-bottom, 0px) + 72px); right: 92px; }
/* the rail: big picture buttons down the right, as in 貓仔湯鋪 */
.tg-rail { display: none; }
.tg3 .tg-rail { position: fixed; z-index: 18; right: calc(env(safe-area-inset-right, 0px) + 8px); bottom: calc(env(safe-area-inset-bottom, 0px) + 74px); display: grid; gap: 8px; }
.tg3.tg-overon .tg-rail, .tg3.tg-visiting .tg-rail, .tg3.tg-visiting .tg-hud { display: none; }
.tg-railbtn { display: grid; justify-items: center; gap: 0; width: 70px; padding: 6px 0 5px; border: 0; border-radius: 20px; background: rgba(255, 250, 243, .95); box-shadow: 0 4px 12px rgba(60, 30, 10, .2); font-family: inherit; color: #5a3a2e; }
.tg-railbtn img { width: 46px; height: 46px; object-fit: contain; } .tg-railbtn small { font-size: 12px; font-weight: 800; } .tg-railemo { font-size: 32px; line-height: 46px; }
.tg-railbtn:active { transform: scale(.94); }
/* what opens over the map */
.tg3 .tg-pane:not([data-pane="town"]):not(#townVisit) { position: fixed; inset: 0; z-index: 40; overflow-y: auto; overscroll-behavior: contain; background: #fff8ef; padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 24px); animation: tg-up .25s ease-out; }
@keyframes tg-up { from { transform: translateY(30px); opacity: .4; } }
.tg-overhead { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; margin: 0 -12px 10px; padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 10px; background: rgba(255, 248, 239, .96); box-shadow: 0 4px 10px -6px rgba(120, 80, 30, .25); }
.tg-overhead b { font-size: 19px; color: #5a3a2e; } .tg-overx { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f6e7dc; font-size: 20px; color: #5a3a2e; }
/* visiting: the card floats on top of their map */
.tg3 #townVisit .tg-visitcard { position: fixed; z-index: 22; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 8px; right: 8px; margin: 0; padding: 10px 12px; }
.tg3.tg-visiting .tw-game > .tw-areas { top: calc(env(safe-area-inset-top, 0px) + 130px); } .tg3.tg-visiting .tw-game .tw-zoom, .tg3.tg-visiting .tw-game .tw-rate2 { top: calc(env(safe-area-inset-top, 0px) + 176px); }
/* no town yet: the welcome card under the floating top */
.tg3 .tg-welcome { padding: calc(env(safe-area-inset-top, 0px) + 110px) 12px 20px; margin: 0; }
@media (orientation: landscape) and (max-height: 520px) { .tg3 .tg-rail { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 60px); grid-template-columns: repeat(2, 1fr); } .tg3 .tw-game > .tw-areas { top: calc(env(safe-area-inset-top, 0px) + 96px); } }
.tg3.tg-welon .tg-rail { display: none; }
/* the sheet's ✕ (2026-11-26) and sheets above a game screen's panels (the town's 委託 panel covered the 派人 sheet) */
.sheet-top { position: sticky; top: 0; z-index: 3; height: 0; display: flex; justify-content: center; overflow: visible; }
.sheet-top .grabber { margin-top: 0; }
.sheet-x { position: absolute; right: -4px; top: -4px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(246, 231, 220, .96); color: #5a3a2e; font-size: 17px; font-weight: 800; line-height: 1; box-shadow: 0 2px 6px rgba(80, 50, 30, .18); cursor: pointer; }
body:has(.tg3) .sheet-back, body:has(.cw3) .sheet-back, body:has(.gd6) .sheet-back { z-index: 70; }
body:has(.tg3) .toast, body:has(.cw3) .toast { z-index: 90; }

/* ── 遊戲畫面 for 密室逃脫・不留情・魔神仔夜話 (game-shell.js .gs; owner 2026-11-26: 所有遊戲介面都要改，像貓仔湯鋪): the key art fills the screen,
   the characters stand in it, a floating top, picture buttons down the right, panels over the art with ✕, the big start button at the bottom ── */
.gs-screen { min-height: 100dvh; background: #1a1420; } .gs-screen > .body { padding: 0; max-width: none; margin: 0; }
html.gs-on, html.gs-on body { overflow: hidden; overscroll-behavior: none; }
.gs { position: fixed; inset: 0; overflow: hidden; }
.gs-stage.game-kv { position: absolute; inset: 0; margin: 0; border-radius: 0; min-height: 0; height: auto; aspect-ratio: auto; box-shadow: none; background: linear-gradient(rgba(20, 14, 30, .1), rgba(20, 14, 30, .25) 55%, rgba(20, 14, 30, .78)), var(--kv) center / cover no-repeat; }
.gs-stage .kv-cast { position: absolute; left: 0; right: 76px; top: calc(env(safe-area-inset-top, 0px) + 78px); bottom: 34%; display: flex; justify-content: center; align-items: center; }
.gs-stage .kv-card { width: min(40vw, 230px); max-height: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.gs-stage .kv-cut { max-height: 100%; width: auto; }
.gs-stage .gs-t { position: absolute; left: 16px; right: 84px; bottom: calc(env(safe-area-inset-bottom, 0px) + 104px); top: auto; text-align: left; }
.gs-stage .kv-title { font-size: clamp(28px, 8.5vw, 44px); } .gs-stage .kv-tag { font-size: 14px; margin: 4px 0 0; }
.gs-top { position: absolute; z-index: 6; left: 8px; right: 8px; top: calc(env(safe-area-inset-top, 0px) + 8px); display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 22px; background: rgba(255, 250, 243, .94); box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.gs-back, .gs-how { width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%; background: #fff; color: #4a3328; font-size: 22px; font-weight: 900; line-height: 1; box-shadow: 0 2px 6px rgba(80, 50, 30, .2); }
.gs-how { font-size: 18px; } .gs-name { flex: 1; min-width: 0; font-size: 17px; color: #4a3328; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-rail { position: absolute; z-index: 6; right: 8px; top: calc(env(safe-area-inset-top, 0px) + 74px); display: grid; gap: 8px; }
.gs-railbtn { display: grid; justify-items: center; width: 66px; padding: 5px 0 4px; border: 0; border-radius: 18px; background: rgba(255, 250, 243, .94); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); font-family: inherit; color: #4a3328; }
.gs-railbtn img { width: 40px; height: 40px; object-fit: contain; } .gs-railbtn small { font-size: 11.5px; font-weight: 800; white-space: nowrap; } .gs-railbtn.on { box-shadow: 0 0 0 3px #ff9d7a, 0 4px 12px rgba(0, 0, 0, .25); }
.gs-cta.btn { position: absolute; z-index: 6; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); width: auto; min-height: 60px; margin: 0; font-size: 19px; border-radius: 22px; }
.gs-panel { position: absolute; inset: 0; z-index: 40; overflow-y: auto; overscroll-behavior: contain; background: var(--bg, #f6f0e6); padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 28px); animation: gs-up .25s ease-out; }
@keyframes gs-up { from { transform: translateY(30px); opacity: .4; } }
.gs-ph { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; margin: 0 -12px 12px; padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 10px; background: var(--bg, #f6f0e6); box-shadow: 0 4px 10px -6px rgba(80, 50, 30, .3); }
.gs-ph b { font-size: 19px; } .gs-px { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(140, 100, 70, .14); font-size: 20px; color: inherit; }
.gs.gs-overon > .gs-rail, .gs.gs-overon > .gs-cta { visibility: hidden; }
body:has(.gs) .sheet-back { z-index: 70; } body:has(.gs) .toast { z-index: 90; }
@media (orientation: landscape) and (max-height: 520px) { .gs-rail { grid-template-columns: repeat(2, 1fr); } .gs-stage .kv-cast { bottom: 28%; } }
@media (min-width: 820px) { .gs-cta.btn { left: 50%; right: auto; width: 420px; transform: translateX(-50%); } }
/* 密室逃脫's main screen: what the big button starts (owner 2026-11-26: 不知道要如何開始，不直觀) */
.gs-next { position: absolute; z-index: 6; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 148px); display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 20px; background: rgba(255, 250, 243, .95); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); color: #4a3328; }
.gs-nextpic { width: 76px; height: 76px; flex: none; border-radius: 14px; object-fit: cover; }
.gs-nextt { display: grid; gap: 2px; min-width: 0; } .gs-nextt small { font-size: 12px; font-weight: 800; color: #c2456c; } .gs-nextt b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .gs-nextt span { font-size: 12.5px; color: #7a5a48; }
.gs-alt { position: absolute; z-index: 6; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gs-altbtn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border: 0; border-radius: 16px; background: rgba(255, 250, 243, .9); color: #4a3328; font: 800 14px inherit; font-family: inherit; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.gs-altbtn img { width: 26px; height: 26px; object-fit: contain; }
.gs:has(.gs-alt) .gs-cta.btn { bottom: calc(env(safe-area-inset-bottom, 0px) + 62px); }
.gs:has(.gs-next:not([hidden])) .gs-stage .gs-t { bottom: calc(env(safe-area-inset-bottom, 0px) + 250px); }
.gs:has(.gs-next:not([hidden])) .gs-stage .kv-cast { bottom: 46%; }
.gs.gs-overon > .gs-next, .gs.gs-overon > .gs-alt { visibility: hidden; }
@media (min-width: 820px) { .gs-next, .gs-alt { left: 50%; right: auto; width: 420px; transform: translateX(-50%); } }
@media (max-height: 760px) { /* short phones: the side buttons as a row under the top bar, so they never sit on the cards */
  .gs-rail { top: calc(env(safe-area-inset-top, 0px) + 66px); left: 8px; right: 8px; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
  .gs-railbtn { width: auto; padding: 4px 0 3px; border-radius: 14px; } .gs-railbtn img { width: 28px; height: 28px; } .gs-railbtn small { font-size: 10.5px; }
  .gs-stage .kv-cast { top: calc(env(safe-area-inset-top, 0px) + 130px); right: 0; }
  .gs-stage .gs-t { right: 16px; } .gs-stage .kv-title { font-size: clamp(24px, 7.5vw, 34px); }
  .gs:has(.gs-next:not([hidden])) .gs-stage .gs-t { bottom: calc(env(safe-area-inset-bottom, 0px) + 236px); } .gs:has(.gs-next:not([hidden])) .gs-stage .kv-cast { bottom: 50%; }
  .gs-next { padding: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 140px); } .gs-nextpic { width: 60px; height: 60px; } .gs-nextt b { font-size: 16px; }
}
/* 靈獸牌桌's three games on the main screen (owner 2026-11-26: 有三款遊戲，按下之後就是不留情開始玩，不直觀) */
.gs-modes { position: absolute; z-index: 6; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 136px); display: grid; gap: 6px; }
.gs-modest { justify-self: start; padding: 3px 12px; border-radius: 99px; background: rgba(255, 250, 243, .92); color: #6a4a38; font-weight: 800; font-size: 12.5px; }
.gs-moderow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gs-mode { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 0 0 8px; border: 0; border-radius: 18px; overflow: hidden; background: rgba(255, 250, 243, .95); box-shadow: 0 4px 12px rgba(0, 0, 0, .3); font-family: inherit; color: #4a3328; opacity: .82; transition: transform .15s, opacity .15s; }
.gs-mode img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; } .gs-mode b { font-size: 15px; margin-top: 4px; } .gs-mode small { font-size: 11px; line-height: 1.3; color: #7a5a48; padding: 0 6px; text-align: center; }
.gs-mode.on { opacity: 1; transform: translateY(-4px); box-shadow: 0 0 0 3px #ffb03a, 0 8px 18px rgba(0, 0, 0, .35); }
.gs:has(.gs-modes) .gs-stage .gs-t { bottom: calc(env(safe-area-inset-bottom, 0px) + 330px); } .gs:has(.gs-modes) .gs-stage .kv-cast { bottom: 52%; }
.gs.gs-overon > .gs-modes { visibility: hidden; }
@media (max-height: 760px) { .gs-mode small { display: none; } .gs-mode img { aspect-ratio: 16 / 10; } .gs-modes { bottom: calc(env(safe-area-inset-bottom, 0px) + 128px); } .gs:has(.gs-modes) .gs-stage .gs-t { bottom: calc(env(safe-area-inset-bottom, 0px) + 270px); } }
@media (min-width: 820px) { .gs-modes { left: 50%; right: auto; width: 460px; transform: translateX(-50%); } }
