/* SCDO Cloud Zen Cabin / 雲禪倉 — one-screen meditation cabin, mobile-first */
:root {
 /* —— t936 visual system: dark Zen cabin —— */
 --bg: #0a161d;
 --bg-2: #102028;
 --panel: #152e38;
 --panel-2: #1a3a46;
 --panel-raised: #1c404c;
 --ink: #eef7f5;
 --muted: #9bb8b2; /* secondary — clearer on dark cabin */
 --muted-2: #7a9a94; /* hints / meta */
 --line: rgba(159, 214, 208, 0.24);
 --line-strong: rgba(159, 214, 208, 0.38);
 --teal: #7ec8c8;
 --teal-2: #a8ddd6;
 --gold: #d0b078;
 --gold-2: #f7e9cc;
 --gold-line: rgba(208, 176, 120, 0.42);
 --danger: #e07a7a;
 --ok: #7ec8a0;
 --radius: 16px;
 --radius-sm: 12px;
 --radius-xs: 10px;
 --shadow: 0 12px 40px rgba(0, 0, 0, 0.38);
 --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.28);
 --font: "PingFang TC", "Noto Sans TC", "Segoe UI", "Microsoft JhengHei", system-ui, sans-serif;
 /* type scale — title / body / hint (繁體為主) */
 --fs-display: 1.65rem;
 --fs-title: 1.12rem;
 --fs-title-sm: 0.98rem;
 --fs-body: 0.9rem;
 --fs-body-sm: 0.82rem;
 --fs-hint: 0.76rem;
 --fs-label: 0.7rem;
 --lh-tight: 1.25;
 --lh-body: 1.45;
 /* spacing rhythm */
 --space-1: 4px;
 --space-2: 8px;
 --space-3: 12px;
 --space-4: 16px;
 --space-5: 20px;
 --space-6: 24px;
 --gap-stack: 12px;
 --gap-section: 14px;
 --pad-card: 12px 14px;
 --pad-panel: 14px;
 --text: var(--ink);
}
* { box-sizing: border-box; }
html, body {
 margin: 0; padding: 0;
 min-height: 100%;
 max-width: 100%;
 overflow-x: hidden;
 background: radial-gradient(1200px 700px at 50% -10%, #1a3a4a 0%, var(--bg) 55%);
 color: var(--ink);
 font-family: var(--font);
 -webkit-tap-highlight-color: transparent;
}
body.ycc {
 padding-top: env(safe-area-inset-top, 0);
 padding-bottom: env(safe-area-inset-bottom, 0);
 padding-left: env(safe-area-inset-left, 0);
 padding-right: env(safe-area-inset-right, 0);
}
.app {
 max-width: 980px;
 width: 100%;
 margin: 0 auto;
 padding: 10px max(12px, env(safe-area-inset-right, 0px)) 28px max(12px, env(safe-area-inset-left, 0px));
 box-sizing: border-box;
}
.topbar {
 display: flex; flex-wrap: wrap; gap: 10px;
 align-items: center; justify-content: space-between;
 margin-bottom: 8px;
}
.brand { display: flex; gap: 10px; align-items: center; }
.brand-mark {
 width: 44px; height: 44px; border-radius: 14px;
 display: grid; place-items: center;
 background: linear-gradient(145deg, #1f4a55, #0f2a33);
 border: 1px solid var(--line);
 font-size: 0; color: var(--gold-2);
 overflow: hidden;
}
.brand h1 { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.02em; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 0.78rem; }
.top-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-btn {
 border: 0; background: transparent; color: var(--muted);
 padding: 8px 12px; min-height: 44px; cursor: pointer; font-weight: 600;
}
.lang-btn.active { background: rgba(126, 200, 200, 0.18); color: var(--teal-2); }
.banner {
 background: rgba(126, 200, 200, 0.08);
 border: 1px solid var(--line);
 border-radius: 12px;
 padding: 10px 12px;
 font-size: 0.82rem;
 color: var(--teal-2);
 margin: 8px 0 10px;
}
.cards-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.cards-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.cards-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
@media (max-width: 720px) { .cards-row-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .cards-row-3, .cards-row-4 { grid-template-columns: 1fr; } }
#agent-name { display: block; font-size: 0.85rem; color: var(--teal-2); padding-right: 14px; }
.agent-did-short, #agent-did-short { display: block; font-size: 0.68rem; color: var(--gold-2); padding-right: 14px; word-break: break-all; }
.mini-card.agent { border-color: rgba(201, 168, 108, 0.35); }
.mini-card {
 background: var(--panel);
 border: 1px solid var(--line);
 border-radius: 12px;
 padding: 10px 12px;
 min-height: 56px;
 position: relative;
}
.mini-card.tap {
 cursor: pointer;
 transition: border-color .15s, background .15s;
 -webkit-user-select: none; user-select: none;
}
.mini-card.tap:hover, .mini-card.tap:focus-visible {
 border-color: rgba(126, 200, 200, 0.55);
 background: var(--panel-2);
 outline: none;
}
.mini-card.tap:active { transform: scale(0.99); }
.mini-card .mc-lab { display: block; font-size: 0.7rem; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.mini-card code { font-size: 0.78rem; color: var(--gold-2); word-break: break-all; }
.mini-card .mc-hint {
 display: block; margin-top: 4px;
 font-size: 0.68rem; color: var(--teal);
 opacity: 0.9;
}
.mini-card.tap::after {
 content: "›";
 position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
 color: var(--muted); font-size: 1.2rem; line-height: 1;
}
#wallet-status { font-size: 0.85rem; color: var(--teal-2); display: block; padding-right: 14px; word-break: break-all; }
#member-id { display: block; padding-right: 14px; }
.stage { display: grid; grid-template-columns: 1fr; gap: 12px; }
.machine, .card {
 background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
 border: 1px solid var(--line);
 border-radius: var(--radius);
 box-shadow: var(--shadow);
}
.machine { padding: 14px 14px 16px; }
.machine-head { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pill {
 display: inline-flex; align-items: center; gap: 4px;
 padding: 6px 10px; border-radius: 999px;
 background: rgba(255,255,255,0.04);
 border: 1px solid var(--line);
 font-size: 0.78rem; color: var(--ink);
}
.pill.gold { color: var(--gold-2); border-color: rgba(201,168,108,0.35); }
.pill.vault { color: var(--teal-2); }

.breath-stage {
 position: relative;
 display: grid;
 place-items: center;
 min-height: 0;
 padding: 10px 8px 6px;
 background:
 radial-gradient(circle at 50% 42%, rgba(126,200,200,0.18), transparent 55%),
 linear-gradient(180deg, rgba(12,26,34,0.2), rgba(12,26,34,0.55));
 border-radius: 14px;
 border: 1px solid var(--line);
 user-select: none;
 /* t942u: pan-y so mobile can scroll; hold targets opt into none below */
 touch-action: pan-y;
}
.cabin-ring { position: relative; width: 180px; height: 180px; }
.ring-outer, .ring-mid, .ring-core {
 position: absolute; inset: 0; border-radius: 50%;
 display: grid; place-items: center;
 /* t966u Safari halo breath — own layer, CSS only during long-press */
 transform: translate3d(0,0,0);
 -webkit-backface-visibility: hidden;
 backface-visibility: hidden;
 will-change: transform, opacity;
}
.ring-outer {
 border: 2px solid rgba(159,214,208,0.35);
 animation: breathe 4.5s ease-in-out infinite;
}
.ring-mid {
 inset: 22px;
 border: 2px solid rgba(201,168,108,0.45);
 animation: breathe 4.5s ease-in-out infinite 0.2s;
}
.ring-core {
 inset: 48px;
 /* t957u: transparent plate so taiji PNG fish-eyes stay visible */
 background: transparent;
 border: 1px solid rgba(208,176,120,0.45);
 font-size: 0;
 color: var(--gold-2);
 overflow: visible;
}
.ring-core .taiji-core {
 width: 100%;
 height: 100%;
 max-width: 96px;
 max-height: 96px;
 object-fit: contain;
 display: block;
 pointer-events: none;
 user-select: none;
}
.brand-mark .taiji-mark {
 width: 28px;
 height: 28px;
 object-fit: contain;
 display: block;
 pointer-events: none;
}
.pill .taiji-pill {
 width: 14px;
 height: 14px;
 object-fit: contain;
 display: inline-block;
 vertical-align: -2px;
 pointer-events: none;
}
.breath-stage.sitting .ring-outer,
.breath-stage.sitting .ring-mid {
 animation-duration: 3.2s;
 border-color: var(--teal-2);
}
.breath-stage.sitting .ring-core {
 box-shadow: 0 0 28px rgba(126,200,200,0.45);
}
@keyframes breathe {
 /* t966u Safari: translate3d promotes GPU layer; no JS timer for halo */
 0%, 100% { transform: translate3d(0,0,0) scale(0.92); opacity: 0.7; }
 50% { transform: translate3d(0,0,0) scale(1.06); opacity: 1; }
}
.timer {
 margin: 12px 0 0;
 font-size: 2rem;
 font-variant-numeric: tabular-nums;
 color: var(--gold-2);
 font-weight: 700;
}
.hint { margin: 4px 0 0; color: var(--teal-2); font-size: 0.9rem; text-align: center; }
.bci-note { margin: 6px 0 0; text-align: center; }

.metrics {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
 gap: 6px;
 margin-top: 10px;
}
.metrics .m {
 background: rgba(0,0,0,0.22);
 border: 1px solid var(--line);
 border-radius: 10px;
 padding: 8px 6px;
 text-align: center;
}
.metrics .m span { display: block; font-size: 0.68rem; color: var(--muted); }
.metrics .m strong { font-size: 1.05rem; color: var(--teal-2); }
.metrics .m.zen strong { color: var(--gold-2); }
@media (max-width: 420px) {
 .metrics { grid-template-columns: repeat(2, 1fr); }
}

.result {
 margin-top: 10px;
 padding: 10px 12px;
 border-radius: 12px;
 background: rgba(126,200,200,0.08);
 border: 1px solid var(--line);
}
.result.lose { background: rgba(224,122,122,0.1); border-color: rgba(224,122,122,0.35); }
#result-main { font-weight: 600; margin-bottom: 6px; }
.hash-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.78rem; }
.hash-row code { color: var(--muted); }
.badge {
 padding: 2px 8px; border-radius: 999px;
 background: rgba(201,168,108,0.15); color: var(--gold);
 border: 1px solid rgba(201,168,108,0.3);
}
.badge.chain { background: rgba(126,200,160,0.15); color: var(--ok); border-color: rgba(126,200,160,0.35); }
.nft-preview { margin-top: 8px; text-align: center; }
.nft-preview img {
 max-width: 220px; width: 100%;
 border-radius: 12px;
 border: 1px solid var(--line);
 background: #0c1a22;
}

.claw-tip {
 display: flex; gap: 10px; align-items: flex-start;
 margin-top: 12px;
 padding: 10px;
 border-radius: 12px;
 background: rgba(0,0,0,0.18);
 border: 1px dashed rgba(201,168,108,0.35);
}
.claw-face { font-size: 28px; line-height: 44px; }
.claw-body { flex: 1; }
.claw-lab {
 width: 100%; min-height: 44px;
 border-radius: 10px; border: 1px solid rgba(201,168,108,0.4);
 background: linear-gradient(180deg, #2a3f2a, #1a2a1a);
 color: var(--gold-2); font-weight: 700; cursor: pointer;
}
.claw-sub { margin: 8px 0 6px; font-size: 0.78rem; color: var(--muted); }
.claw-amts { display: flex; gap: 8px; }
.claw-amt {
 flex: 1; min-height: 44px; border-radius: 10px; cursor: pointer;
 border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font-weight: 700;
}
.claw-amt:active { transform: scale(0.98); }
/* t934 — default/selected tip + wish chips (6/66/666) */
.claw-amt.active, .wish-amt.active {
 border-color: var(--gold, #c9a86c);
 color: var(--gold-2, #f5e6c8);
 background: rgba(201, 168, 108, 0.16);
 box-shadow: 0 0 0 1px rgba(201, 168, 108, 0.4), inset 0 0 0 1px rgba(201, 168, 108, 0.25);
}
.claw-msg { margin: 6px 0 0; font-size: 0.8rem; color: var(--teal-2); }

.controls { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; margin-top: 12px; }
.dur-pick { display: flex; gap: 6px; margin-top: 8px; }
.dur {
 flex: 1; min-height: 40px; border-radius: 999px; cursor: pointer;
 border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 600;
}
.dur.active { background: rgba(126,200,200,0.18); color: var(--teal-2); border-color: rgba(126,200,200,0.4); }
.btn {
 min-height: 48px; border-radius: 12px; border: 1px solid var(--line);
 background: var(--panel-2); color: var(--ink); font-weight: 700; cursor: pointer;
 padding: 0 14px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #2a5560, #1a3a46); border-color: rgba(126,200,200,0.4); }
.btn.ghost { background: transparent; }
.btn.tg { background: #229ed9; border-color: #1b8bc0; color: #fff; min-width: 48px; }
.btn.sit {
 background: linear-gradient(180deg, #3a6a72, #1f454e);
 border-color: rgba(126,200,200,0.55);
 color: #fff; font-size: 1.05rem;
}
.btn.sit.holding { background: linear-gradient(180deg, #4a8a7a, #2a5a50); box-shadow: 0 0 18px rgba(126,200,200,0.35); }
.btn.seal {
 background: linear-gradient(180deg, #5a4a2a, #3a3020);
 border-color: rgba(201,168,108,0.5);
 color: var(--gold-2);
}
.btn.full { width: 100%; margin-top: 8px; }
.seal-hint { margin: 8px 0 0; font-size: 0.75rem; color: var(--muted); }

.side { display: flex; flex-direction: column; gap: 10px; }
.card { padding: 12px 14px; }
.card h2 { margin: 0 0 8px; font-size: 0.95rem; }
.paytable { list-style: none; margin: 0; padding: 0; }
.paytable li {
 display: flex; justify-content: space-between; gap: 8px;
 padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
 font-size: 0.82rem;
}
.paytable strong { color: var(--gold-2); font-weight: 600; }
.muted, .muted-card { color: var(--muted); }
.small { font-size: 0.75rem; }
.how { margin: 0; padding-left: 18px; font-size: 0.82rem; color: var(--muted); }
.how li { margin: 6px 0; }
.recent { max-height: 220px; overflow: auto; font-size: 0.78rem; }
.recent-row {
 display: flex; justify-content: space-between; gap: 8px;
 padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.recent-row code { color: var(--muted); }
.foot {
 margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px;
 justify-content: center; align-items: center;
 font-size: 0.72rem; color: var(--muted); text-align: center;
}
.foot a { color: var(--teal-2); }

dialog {
 border: 1px solid var(--line);
 border-radius: 16px;
 background: var(--bg-2);
 color: var(--ink);
 max-width: min(560px, 94vw);
 padding: 0;
}
dialog::backdrop { background: rgba(0,0,0,0.55); }
.modal-inner { padding: 12px 14px 16px; }
.modal-inner header { display: flex; justify-content: space-between; align-items: center; }
.ledger-body { max-height: 60vh; overflow: auto; }
.paywall-json {
 white-space: pre-wrap; word-break: break-word;
 background: rgba(0,0,0,0.35); padding: 10px; border-radius: 10px;
 font-size: 0.72rem; color: var(--muted);
}
.paywall-addr { width: 100%; min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: #0a141a; color: var(--gold-2); padding: 8px; }
.paywall-actions { display: flex; gap: 8px; margin-top: 10px; }
.paywall-steps { font-size: 0.85rem; color: var(--muted); }

#seal-mount .scdo-seal-bar { margin-top: 10px; }

.btn.mute {
 min-width: 44px; min-height: 44px; padding: 0 10px;
 font-size: 0.85rem; white-space: nowrap;
}
.ledger-readable { display: grid; gap: 8px; }
.ledger-summary { margin: 0 0 4px; color: var(--teal-2); font-size: 0.85rem; }
.ledger-readable h3 {
 margin: 10px 0 4px; font-size: 0.82rem; color: var(--muted);
 text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700;
}
.ledger-list { display: grid; gap: 8px; }
.ledger-row {
 background: rgba(0,0,0,0.22);
 border: 1px solid var(--line);
 border-radius: 12px;
 padding: 10px 12px;
 display: grid; gap: 6px;
}
.ledger-row .lr-top {
 display: flex; justify-content: space-between; gap: 8px; align-items: baseline;
}
.ledger-row .lr-top b { color: var(--gold-2); font-size: 0.9rem; }
.ledger-row .lr-delta { color: var(--teal-2); font-variant-numeric: tabular-nums; font-weight: 700; }
.ledger-row .lr-meta {
 display: flex; flex-wrap: wrap; gap: 6px 12px;
 font-size: 0.75rem; color: var(--muted);
}
.ledger-row .lr-hash, .ledger-row .lr-tx {
 display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
 font-size: 0.75rem; color: var(--muted);
}
.ledger-row .lr-hash code { color: var(--teal-2); font-size: 0.75rem; word-break: break-all; }
.ledger-tx { color: var(--teal-2); text-decoration: none; word-break: break-all; }
.ledger-tx:hover { text-decoration: underline; }
.member-id-full {
 display: block;
 margin: 6px 0 12px;
 padding: 10px 12px;
 background: rgba(0,0,0,0.28);
 border: 1px solid var(--line);
 border-radius: 10px;
 color: var(--gold-2);
 font-size: 0.78rem;
 word-break: break-all;
}
.member-actions { flex-wrap: wrap; }
.member-actions .btn { flex: 1 1 120px; }
#wallet-modal .btn.full, #member-modal .btn.full { margin-top: 8px; }
#wallet-input { margin: 6px 0 4px; }
.paywall-label { display: block; margin-top: 10px; font-size: 0.75rem; color: var(--muted); }
dialog {
 width: min(560px, calc(100vw - 24px));
 max-height: calc(100vh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}
.ledger-body { max-height: min(60vh, calc(100dvh - 140px)); overflow: auto; -webkit-overflow-scrolling: touch; }

/* Mobile one-screen fit (~390×844 and short TG browsers) */
@media (max-width: 600px) {
 .app { padding-top: 8px; padding-bottom: 18px; }
 .brand h1 { font-size: 1.02rem; }
 .brand p { display: none; }
 .brand-mark { width: 40px; height: 40px; font-size: 0; }
 .brand-mark .taiji-mark { width: 24px; height: 24px; }
 .banner { font-size: 0.74rem; padding: 8px 10px; margin: 6px 0 8px; }
 .top-actions { gap: 4px; }
 .lang-btn { padding: 8px 10px; }
 .btn.primary { padding: 0 10px; font-size: 0.85rem; }
 .controls { grid-template-columns: 1fr; }
 .claw-tip { margin-top: 8px; }
 .side-extra { display: block; }
 .recent { max-height: 140px; }
}
@media (max-height: 860px) and (max-width: 430px) {
 .breath-stage { min-height: 0; padding: 8px 6px 4px; }
 .cabin-ring { width: 132px; height: 132px; }
 .ring-mid { inset: 18px; }
 .ring-core { inset: 40px; font-size: 0; }
 .ring-core .taiji-core { width: 92%; height: 92%; max-width: 64px; max-height: 64px; }
 .timer { font-size: 1.35rem; margin-top: 8px; }
 .hint { font-size: 0.8rem; }
 .bci-note { display: none; }
 .machine { padding: 10px 10px 12px; }
 .machine-head { gap: 4px; margin-bottom: 6px; }
 .pill { padding: 5px 8px; font-size: 0.72rem; }
 .cards-row { gap: 6px; margin-bottom: 8px; }
 .mini-card { padding: 8px 10px; min-height: 52px; }
 .seal-hint { font-size: 0.68rem; }
 .foot { margin-top: 10px; }
}
@media (max-height: 720px) and (max-width: 600px) {
 .breath-stage { min-height: 0; }
 .cabin-ring { width: 120px; height: 120px; }
 .ring-core { font-size: 0; }
 .ring-core .taiji-core { width: 92%; height: 92%; max-width: 58px; max-height: 58px; }
 .timer { font-size: 1.25rem; }
 .side .card:last-child { display: block; }
 .banner { display: none; }
}
@media (max-width: 360px) {
 .btn.mute { font-size: 0.78rem; padding: 0 8px; }
 .btn.tg span, .top-actions .btn.primary { font-size: 0.8rem; }
}


/* —— x402 human paywall (never dump raw JSON) —— */
.ledger-body {
 max-height: 70vh;
 overflow: auto;
 font-size: 0.85rem;
 word-break: break-word;
}
.ledger-body.paywall-body {
 padding: 16px 18px 18px;
 white-space: normal;
 font-family: inherit;
}


/* Pay rails + tip rails */
.pay-rails, .tip-rails {
 display: flex;
 flex-wrap: wrap;
 gap: 6px;
 margin: 8px 0 6px;
}
.pay-rail, .tip-rail {
 flex: 1 1 22%;
 min-width: 64px;
 min-height: 40px;
 border-radius: 10px;
 border: 1px solid var(--line, #2a3d45);
 background: rgba(10, 20, 26, 0.85);
 color: var(--muted, #9fd6d0);
 font-weight: 650;
 font-size: 0.8rem;
 cursor: pointer;
}
.pay-rail.active, .tip-rail.active {
 border-color: var(--gold, #c9a86c);
 color: var(--gold-2, #f5e6c8);
 box-shadow: 0 0 0 1px rgba(201, 168, 108, 0.35);
}
.pay-chains, .other-asset-chips, .pay-chains-scroll {
 display: flex;
 flex-wrap: nowrap;
 gap: 6px;
 margin: 4px 0 6px;
 overflow-x: auto;
 -webkit-overflow-scrolling: touch;
 scrollbar-width: thin;
 padding-bottom: 4px;
 max-width: 100%;
}
.pay-chains .pay-chain, .other-asset-chips .pay-chain, .pay-chains-scroll .pay-chain {
 flex: 0 0 auto;
}
.pay-chain {
 flex: 0 1 auto;
 min-width: 56px;
 min-height: 34px;
 padding: 0 10px;
 border-radius: 999px;
 border: 1px solid var(--line, #2a3d45);
 background: rgba(8, 18, 22, 0.9);
 color: var(--muted, #9fd6d0);
 font-weight: 650;
 font-size: 0.72rem;
 cursor: pointer;
}
.pay-chain.active {
 border-color: var(--gold, #c9a86c);
 color: var(--gold-2, #f5e6c8);
 box-shadow: 0 0 0 1px rgba(201, 168, 108, 0.35);
}
.paywall-chain-tag {
 font-size: 0.75rem;
 font-weight: 600;
 color: var(--muted, #9fd6d0);
 margin-left: 4px;
}
.paywall-rails-title, .paywall-steps-title {
 margin: 8px 0 4px;
 font-size: 0.85rem;
 font-weight: 650;
}
.paywall-rail-hint, .tip-rail-hint { margin: 0 0 8px; font-size: 0.75rem; }
.paywall-wallet-row { margin: 8px 0 12px; }
.paywall-wallet-row .btn.full { width: 100%; }
.paywall-payto-short { margin: 4px 0 0; }
.paywall-line {
 margin: 0 0 10px;
 font-size: 1.05rem;
 font-weight: 650;
 color: var(--gold, #c9a86c);
}
.paywall-addr {
 width: 100%;
 min-height: 44px;
 border-radius: 10px;
 border: 1px solid var(--line, #2a3d45);
 background: #0a141a;
 color: var(--gold-2, #f5e6c8);
 padding: 8px 10px;
 font-family: ui-monospace, monospace;
 font-size: 0.78rem;
}
.paywall-tech {
 margin: 0 0 14px;
 border: 1px solid var(--line, #2a3d45);
 border-radius: 10px;
 background: #0a141a;
 padding: 8px 10px;
}
.paywall-tech summary {
 cursor: pointer;
 color: var(--muted, #9fd6d0);
 font-size: 0.8rem;
 user-select: none;
}
.paywall-tech[open] summary { margin-bottom: 8px; }
.paywall-json {
 white-space: pre-wrap;
 word-break: break-word;
 background: rgba(0,0,0,0.35);
 padding: 10px;
 border-radius: 10px;
 font-size: 0.72rem;
 max-height: 28vh;
 overflow: auto;
}
.paywall-actions {
 display: flex;
 flex-wrap: wrap;
 gap: 8px;
 justify-content: flex-end;
 margin-top: 10px;
}
.paywall-actions .btn { min-width: 110px; }
.paywall-health a { color: var(--gold, #c9a86c); }
.paywall-label { display: block; margin-top: 8px; font-size: 0.75rem; color: var(--muted, #9fd6d0); }
.paywall-steps { font-size: 0.85rem; color: var(--muted, #9fd6d0); margin: 0 0 10px; padding-left: 1.2rem; }


/* Cabin entry intake */
.intake-panel {
 margin: 8px 0 12px;
 padding: 12px 12px 10px;
 border-radius: 14px;
 border: 1px solid var(--line, #2a3d45);
 background: rgba(8, 18, 22, 0.72);
}
.intake-head {
 display: flex; align-items: center; justify-content: space-between; gap: 8px;
 margin-bottom: 8px; font-size: 0.9rem;
}
.intake-head .pill.demo {
 font-size: 0.65rem; padding: 2px 8px; border-radius: 999px;
 border: 1px solid var(--gold, #c9a86c); color: var(--gold, #c9a86c);
}
.intake-consent {
 display: flex; gap: 8px; align-items: flex-start;
 font-size: 0.78rem; color: var(--muted, #9fd6d0); margin-bottom: 10px;
 line-height: 1.35;
}
.intake-consent input { margin-top: 3px; min-width: 16px; min-height: 16px; }
.intake-fields {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 8px;
}
.intake-field {
 display: flex; flex-direction: column; gap: 4px;
 font-size: 0.72rem; color: var(--muted, #9fd6d0);
}
.intake-field.intake-intent { grid-column: 1 / -1; }
.intake-field select, .intake-field input {
 min-height: 40px; border-radius: 10px;
 border: 1px solid var(--line, #2a3d45);
 background: #0a141a; color: var(--gold-2, #f5e6c8);
 padding: 6px 10px; font-size: 0.85rem;
}
.intake-panel.denied { opacity: 0.85; }
.ledger-row .lr-intake {
 font-size: 0.72rem; color: var(--muted, #9fd6d0); margin-top: 4px;
}
@media (max-width: 420px) {
 .intake-fields { grid-template-columns: 1fr 1fr; }
 .intake-panel { padding: 10px; }
}


/* Zen Capt. Whiskers — panel kitten removed (owner t841u) */
.zen-whiskers-panel { display: none !important; }
.machine-head { padding-right: 64px; }


/* Cabin-entry consent — clear what + where */
.intake-panel {
 margin: 0 0 12px;
 padding: 12px 14px;
 border-radius: 14px;
 background: rgba(12, 28, 34, 0.55);
 border: 1px solid rgba(201, 162, 39, 0.28);
}
.intake-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.intake-what {
 margin: 0 0 10px;
 font-size: 0.84rem;
 line-height: 1.45;
 color: var(--muted, #a8b8c0);
}
.intake-agree-box {
 margin-top: 10px;
 padding: 10px 12px;
 border-radius: 12px;
 background: rgba(201, 162, 39, 0.08);
 border: 1px dashed rgba(201, 162, 39, 0.45);
}
.intake-agree-title {
 margin: 0 0 8px;
 font-size: 0.82rem;
 color: var(--gold-2, #e8d9a8);
 font-weight: 600;
}
.intake-consent {
 display: flex;
 gap: 10px;
 align-items: flex-start;
 font-size: 0.86rem;
 line-height: 1.4;
 cursor: pointer;
}
.intake-consent input {
 margin-top: 3px;
 width: 18px;
 height: 18px;
 flex-shrink: 0;
 accent-color: #c9a227;
}
.intake-agree-box.need-consent,
.sit-consent-gate.need-consent {
 animation: consentPulse 1.1s ease 2;
 border-color: #e8b84a;
 box-shadow: 0 0 0 2px rgba(232, 184, 74, 0.25);
}
@keyframes consentPulse {
 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 184, 74, 0); }
 50% { box-shadow: 0 0 0 4px rgba(232, 184, 74, 0.35); }
}
.sit-consent-gate {
 margin: 8px 0 6px;
 padding: 8px 10px;
 border-radius: 10px;
 border: 1px solid rgba(201, 162, 39, 0.25);
 background: rgba(12, 28, 34, 0.35);
}
.sit-gate-label { font-size: 0.8rem; color: var(--muted, #a8b8c0); }



/* YCC ui10 — chanting (念经) over sit/zen stage; tip=seal one channel */
.machine.cabin { position: relative; }
.machine-head { position: relative; padding-right: 12px; }
.breath-row {
 display: grid;
 grid-template-columns: 1fr auto;
 gap: 10px;
 align-items: end;
 margin: 0 0 10px;
}
.zen-mascot-side { display: none !important; }
.zen-whiskers-float {
 position: relative;
 right: auto;
 bottom: auto;
 width: 112px;
 height: 112px;
 z-index: 2;
 pointer-events: none;
 filter: drop-shadow(0 8px 18px rgba(0,0,0,.4));
 opacity: 0.98;
 animation: zenMascotBob 4.8s ease-in-out infinite;
}
@keyframes zenMascotBob {
 0%, 100% { transform: translateY(0); }
 50% { transform: translateY(-6px); }
}
.zen-bubbles {
 position: absolute;
 left: 0; right: 0;
 bottom: 100px;
 top: 0;
 overflow: visible;
 pointer-events: none;
 z-index: 4;
}
.zen-bubble {
 position: absolute;
 left: 50%;
 bottom: 0;
 transform: translateX(-50%);
 padding: 5px 10px;
 border-radius: 999px;
 background: rgba(12, 28, 34, 0.88);
 border: 1px solid rgba(201, 168, 108, 0.45);
 color: var(--gold-2, #f5e6c8);
 font-size: 0.78rem;
 font-weight: 600;
 letter-spacing: 0.04em;
 white-space: nowrap;
 box-shadow: 0 4px 14px rgba(0,0,0,.28);
 animation: zenBubbleRise 4.2s ease-out forwards;
 will-change: transform, opacity;
}
.zen-bubble::after {
 content: "";
 position: absolute;
 left: 50%;
 bottom: -5px;
 width: 8px; height: 8px;
 background: rgba(12, 28, 34, 0.88);
 border-right: 1px solid rgba(201, 168, 108, 0.45);
 border-bottom: 1px solid rgba(201, 168, 108, 0.45);
 transform: translateX(-50%) rotate(45deg);
}
@keyframes zenBubbleRise {
 0% { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.86); }
 12% { opacity: 1; }
 70% { opacity: 0.95; }
 100% { opacity: 0; transform: translateX(calc(-50% + var(--drift, 0px))) translateY(-118px) scale(1); }
}

/* Rules at bottom — does not compete with main play */
.rules-below {
 margin: 14px 0 8px;
 padding: 14px 16px 16px;
 max-width: 980px;
}
.rules-below h2 {
 margin: 0 0 8px;
 font-size: 0.95rem;
 color: var(--gold-2, #f5e6c8);
}
.rules-below .paytable { margin: 0; padding: 0; list-style: none; }
.rules-below .paytable li {
 display: flex;
 justify-content: space-between;
 gap: 12px;
 padding: 8px 0;
 border-bottom: 1px solid var(--line, rgba(159,214,208,0.22));
 font-size: 0.86rem;
}
.rules-below .paytable li:last-child { border-bottom: 0; }
.rules-below .paytable strong { color: var(--gold-2, #f5e6c8); font-weight: 600; white-space: nowrap; }
.rules-below .muted { margin: 10px 0 0; }

.zen-whiskers-modal {
 display: block;
 float: right;
 margin: 0 0 8px 10px;
 width: 72px;
 height: 72px;
 filter: drop-shadow(0 4px 10px rgba(0,0,0,.3));
}
.agent-modal-inner header { text-align: left; overflow: auto; }
.claw-amts { display: flex; flex-direction: column; gap: 8px; }
.claw-amts-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.claw-amts-custom { width: 100%; }
.claw-amts-custom {
 display: flex;
 flex-wrap: wrap;
 align-items: center;
 gap: 6px 8px;
 width: 100%;
}
.claw-custom-lab {
 flex: 0 0 100%;
 font-size: 0.78rem;
 color: var(--muted, #a8b8c0);
 margin: 0;
 line-height: 1.3;
}
.claw-custom-input {
 flex: 1;
 min-width: 88px;
 max-width: 140px;
 padding: 8px 10px;
 border-radius: 10px;
 border: 1px solid rgba(201,162,39,.35);
 background: rgba(12,28,34,.65);
 color: var(--gold-2, #e8d9a8);
 font-size: 0.95rem;
}
.claw-amt-go { min-width: 64px; }
.zen-qa {
 margin: 0 0 12px;
 padding: 12px 14px;
 border-radius: 14px;
 background: rgba(12, 28, 34, 0.5);
 border: 1px solid rgba(159, 214, 208, 0.28);
}
.zen-qa-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.zen-qa-row { display: flex; gap: 8px; align-items: center; }
.zen-qa-row input {
 flex: 1;
 padding: 10px 12px;
 border-radius: 10px;
 border: 1px solid rgba(159,214,208,.3);
 background: rgba(8,20,26,.7);
 color: #e8f4f2;
}
.zen-qa-out {
 margin-top: 10px;
 padding: 10px 12px;
 border-radius: 12px;
 background: rgba(201,162,39,.08);
 border: 1px dashed rgba(201,162,39,.35);
 font-size: 0.88rem;
 line-height: 1.45;
 color: var(--teal-2, #9fd6d0);
 white-space: pre-wrap;
}
.paywall-fiat-desk {
 display: grid;
 gap: 10px;
 margin: 8px 0 12px;
}
.paywall-fiat-desk .btn { text-align: center; }
.paywall-connect-row {
 display: grid;
 gap: 8px;
 margin: 8px 0 10px;
}
.paywall-tech { display: none !important; } /* never dump 402 JSON as main UI */
@media (max-width: 640px) {
 .breath-row {
 grid-template-columns: 1fr 88px;
 gap: 6px;
 align-items: center;
 }
 .zen-bubbles { bottom: 78px; }
 .zen-bubble { font-size: 0.7rem; padding: 4px 8px; }
}
@media (max-width: 420px) {
 .breath-row { grid-template-columns: 1fr 76px; }
 .zen-bubbles { bottom: 68px; }
}


/* ui10 — 念经 bubbles in visible viewport over breath/zen */
.breath-stage { position: relative; overflow: visible; }
.zen-bubbles-stage {
 position: absolute;
 left: 8%;
 right: 8%;
 top: 4px;
 bottom: auto;
 height: 72px;
 overflow: visible;
 pointer-events: none;
 z-index: 5;
}
.zen-bubbles-stage .zen-bubble {
 bottom: 8px;
 animation: zenBubbleRiseStage 4.2s ease-out forwards;
}
@keyframes zenBubbleRiseStage {
 0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.86); }
 12% { opacity: 1; }
 70% { opacity: 0.95; }
 100% { opacity: 0; transform: translateX(calc(-50% + var(--drift, 0px))) translateY(-64px) scale(1); }
}
.prayer-chk {
 display: flex; gap: 8px; align-items: flex-start;
 font-size: 0.78rem; color: var(--muted, #9fd6d0);
 margin: 8px 0 6px; line-height: 1.35;
}
.prayer-chk input { margin-top: 3px; }
.paywall-fiat-desk a.stripe { background: linear-gradient(180deg,#635bff,#4b45c6); }
.paywall-fiat-desk a.square { background: linear-gradient(180deg,#3e4348,#111); }
.paywall-fiat-desk a.paypal { background: linear-gradient(180deg,#0070ba,#003087); }
@media (max-width: 640px) {
 .zen-bubbles-stage { height: 56px; left: 4%; right: 4%; }
}

/* t859u/t863u — Zen kitten FIXED float; default mid-right beside taiji ring (not bottom corner) */
.zen-mascot-float {
 position: fixed;
 right: 12px;
 top: 22vh; /* mid height next to 無心/頓悟 ring; JS refine when no saved pos */
 bottom: auto;
 width: 132px;
 height: 132px;
 z-index: 40;
 display: flex;
 align-items: center;
 justify-content: center;
 flex-direction: column;
 /* t862u: container never steals taps — only the img + action panel capture */
 pointer-events: none;
 cursor: grab;
 user-select: none;
 -webkit-user-select: none;
}
.zen-mascot-float.is-dragging {
 cursor: grabbing;
 animation: none !important;
}
.zen-mascot-float .zen-whiskers-float {
 position: relative;
 width: 132px;
 height: 132px;
 pointer-events: auto;
 touch-action: none;
 cursor: grab;
 filter: drop-shadow(0 10px 22px rgba(0,0,0,.45));
 opacity: 0.98;
 animation: zenMascotBob 4.8s ease-in-out infinite;
}
.zen-mascot-float.is-dragging .zen-whiskers-float {
 animation: none;
 filter: drop-shadow(0 14px 28px rgba(0,0,0,.55));
}
@keyframes zenMascotBob {
 0%, 100% { transform: translateY(0); }
 50% { transform: translateY(-8px); }
}
.zen-bubbles-float {
 position: absolute;
 left: -20%;
 right: -20%;
 bottom: 100%;
 height: 90px;
 overflow: visible;
 pointer-events: none;
 z-index: 2;
}
.breath-row {
 /* was 2-col with mascot; now single column — no crushed text */
 display: block !important;
 grid-template-columns: none !important;
}
.zen-mascot-side { display: none !important; } /* legacy inline slot removed */
@media (max-width: 640px) {
 .zen-mascot-float { width: 112px; height: 112px; right: 8px; }
 .zen-mascot-float .zen-whiskers-float { width: 112px; height: 112px; }
}
@media (max-width: 420px) {
 .zen-mascot-float { width: 100px; height: 100px; }
 .zen-mascot-float .zen-whiskers-float { width: 100px; height: 100px; }
}

/* attendant intents multi + 自選 */
.agent-intents { margin: 10px 0 12px; }
.agent-intent-title { margin: 0 0 8px; font-size: 0.9rem; color: var(--gold-2, #f5e6c8); }
.agent-intent-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.intent-chip {
 padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(159,214,208,.35);
 background: rgba(12,28,34,.55); color: #e8f4f2; font-size: 0.82rem; cursor: pointer;
}
.intent-chip.on, .intent-chip[aria-pressed="true"] {
 background: rgba(201,162,39,.22); border-color: rgba(201,162,39,.65); color: var(--gold-2, #f5e6c8);
}
.agent-intent-custom { margin-top: 8px; }
.agent-intent-custom input {
 width: 100%; padding: 10px 12px; border-radius: 10px;
 border: 1px solid rgba(159,214,208,.3); background: rgba(8,20,26,.7); color: #e8f4f2;
}
.agent-intent-hint { margin: 8px 0; }
#agent-intent-go { margin-top: 8px; }



/* t862u mobile tap safety */
.controls, .dur-pick, .cabin-meta, .agent-name-chips, .agent-intent-chips, .claw-tip, .zen-qa, .intake-agree-box, .sit-consent-gate {
 position: relative;
 z-index: 5;
}
.controls .btn, .cabin-meta .mini-card, .agent-name-chip, .intent-chip, .zen-qa button, #btn-sit, #btn-seal {
 touch-action: manipulation;
 -webkit-tap-highlight-color: rgba(201,162,39,.25);
}
@media (max-width: 420px) {
 .machine.cabin, .page-wrap, main {
 padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
 }
 .controls { display: flex; flex-wrap: wrap; gap: 8px; }
 .controls .btn { flex: 1 1 140px; min-height: 44px; }
 .cabin-meta .mini-card { min-height: 64px; }
 .zen-mascot-float { width: 88px; height: 88px; right: 6px; top: 20vh; bottom: auto; }
 .zen-mascot-float .zen-whiskers-float { width: 88px; height: 88px; }
}

/* attendant name picker */
.agent-names { margin: 8px 0 12px; }
.agent-name-title { margin: 0 0 8px; font-size: 0.9rem; color: var(--gold-2, #f5e6c8); }
.agent-name-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-name-chip {
 padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(159,214,208,.35);
 background: rgba(12,28,34,.55); color: #e8f4f2; font-size: 0.82rem; cursor: pointer;
 touch-action: manipulation;
}
.agent-name-chip.on, .agent-name-chip[aria-pressed="true"] {
 background: rgba(201,162,39,.22); border-color: rgba(201,162,39,.65); color: var(--gold-2, #f5e6c8);
}
.agent-name-custom { margin-top: 8px; }
.agent-name-custom input {
 width: 100%; padding: 10px 12px; border-radius: 10px;
 border: 1px solid rgba(159,214,208,.3); background: rgba(8,20,26,.7); color: #e8f4f2;
}
.cabin-attendant-strip {
 margin: 8px 0 10px;
 padding: 10px 12px;
 border-radius: 12px;
 border: 1px solid rgba(159,214,208,.28);
 background: rgba(8,20,26,.45);
 position: relative;
 z-index: 5;
}
.cabin-attendant-strip .agent-name-title { margin-bottom: 6px; }

/* t864u — tap actions (交流 / 步道) + idle stroll */
.zen-mascot-actions {
 pointer-events: auto;
 position: absolute;
 right: 0;
 bottom: calc(100% + 6px);
 min-width: 148px;
 max-width: 200px;
 padding: 8px 10px;
 border-radius: 12px;
 background: rgba(8, 22, 28, 0.94);
 border: 1px solid rgba(159,214,208,.4);
 box-shadow: 0 10px 24px rgba(0,0,0,.4);
 color: #e8f4f2;
 font-size: 0.78rem;
 line-height: 1.35;
 z-index: 3;
}
.zen-mascot-actions[hidden] { display: none !important; }
.zen-mascot-say { margin: 0 0 8px; color: var(--gold-2, #f5e6c8); }
.zen-mascot-btns { display: flex; gap: 6px; }
.zen-mascot-btns button {
 flex: 1;
 padding: 6px 8px;
 border-radius: 999px;
 border: 1px solid rgba(159,214,208,.4);
 background: rgba(126,200,200,.16);
 color: #e8f4f2;
 font-size: 0.78rem;
 cursor: pointer;
 touch-action: manipulation;
}
.zen-mascot-btns button:active { background: rgba(201,162,39,.28); }
.zen-mascot-float.is-strolling .zen-whiskers-float {
 animation: none;
}
@keyframes zenMascotStrollBob {
 0%, 100% { transform: translateY(0) scaleX(1); }
 50% { transform: translateY(-4px) scaleX(1); }
}
.zen-mascot-float.is-strolling .zen-whiskers-float {
 animation: zenMascotStrollBob 0.7s ease-in-out infinite;
}
@media (max-width: 640px) {
 .zen-mascot-float { top: 20vh; }
}
@media (max-width: 420px) {
 .zen-mascot-actions { min-width: 132px; font-size: 0.72rem; }
}



/* t870–t876 paywall QR + amount */
.paywall-qr-block { text-align: center; margin: 12px 0 8px; }
.paywall-qr { width: 220px; height: 220px; max-width: 70vw; border-radius: 12px; background: #fff; padding: 8px; box-shadow: 0 0 0 1px var(--line, #2a3a40); }
.paywall-amount-block { text-align: center; margin: 8px 0 4px; }
.paywall-amount-lab { margin: 0; font-size: 0.78rem; color: var(--muted); }
.paywall-amount-val { margin: 4px 0; font-size: 1.55rem; font-weight: 700; color: var(--gold-2, #f5e6c8); letter-spacing: 0.02em; }
.paywall-amount-val span { font-size: 0.9rem; font-weight: 600; opacity: 0.9; }
.paywall-addr-row { display: flex; gap: 8px; align-items: stretch; }
.paywall-addr-row .paywall-addr { flex: 1; }
.paywall-addr-row .btn { flex: 0 0 auto; white-space: nowrap; }
#btn-refresh.is-busy { opacity: 0.7; pointer-events: none; }
#refresh-status { margin: 6px 0 0; min-height: 1.1em; }

/* Zen 布道 verses under 此間如何隨喜 */
.zen-verses { list-style: none; margin: 14px 0 0; padding: 0; }
.zen-verses li {
 margin: 0 0 8px; padding: 8px 10px;
 border-left: 2px solid var(--teal-2, #6ec8bc);
 background: rgba(12, 28, 32, 0.45);
 color: var(--gold-2, #f5e6c8);
 font-size: 0.86rem; line-height: 1.45;
 border-radius: 0 8px 8px 0;
}

/* Mascot speech + inline ask */
.zen-mascot-float.is-speaking .zen-mascot-actions { display: block; }
.zen-mascot-chatbox { display: flex; gap: 6px; margin: 0 0 8px; }
.zen-mascot-chatbox input {
 flex: 1; min-width: 0; border-radius: 8px; border: 1px solid var(--line, #2a3a40);
 background: #0a141a; color: var(--gold-2, #f5e6c8); padding: 6px 8px; font-size: 0.78rem;
}
.zen-mascot-chatbox button {
 border-radius: 8px; border: 1px solid var(--teal-2, #6ec8bc);
 background: rgba(30, 80, 72, 0.55); color: var(--gold-2, #f5e6c8);
 padding: 6px 10px; font-size: 0.75rem; cursor: pointer;
}
.zen-mascot-say { white-space: pre-wrap; max-height: 7.5em; overflow: auto; }

.paywall-simple .paywall-steps.plain {
 margin: 0 0 10px;
 padding-left: 1.2rem;
 font-size: 0.86rem;
 line-height: 1.45;
 color: var(--muted, #9fd6d0);
}
.paywall-simple .paywall-what {
 margin: 0 0 12px;
 font-size: 0.84rem;
 line-height: 1.4;
}
.paywall-simple .paywall-qr {
 width: min(260px, 72vw);
 height: auto;
 border-radius: 12px;
 background: #fff;
 padding: 8px;
}
.paywall-simple .paywall-actions {
 display: flex;
 flex-direction: column;
 gap: 8px;
 margin-top: 14px;
}
.paywall-simple .paywall-actions .btn.primary {
 min-height: 48px;
 font-weight: 700;
}


/* t895 — 近期帳本 next to tip / refresh */
.ledger-inline { margin-top: 14px; scroll-margin-top: 12px; }
.ledger-inline-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ledger-inline-head h2 { margin: 0; font-size: 1.05rem; }
.ledger-inline-hint { margin: 0 0 8px; }
/* moved to .ledger-inline-actions */
.recent-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.92rem; }
.recent-row .rr-lab { flex: 1; min-width: 0; }
.recent-row code { opacity: 0.7; font-size: 0.8rem; }
.agent-plain-list { list-style: none; margin: 0; padding: 0; }
.agent-plain-list li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.agent-plain-list .ap-name { font-weight: 600; }
.agent-plain-list .ap-meta { font-size: 0.85rem; opacity: 0.8; margin-top: 2px; }
.other-asset-chips { margin: 8px 0 12px; }
.other-asset-chips button { font-size: 0.85rem; flex: 0 0 auto; }


/* t896u: 查看近期账本 sits with ledger-inline */
.ledger-inline-actions {
 display: grid;
 gap: 8px;
 margin-top: 10px;
}
.ledger-inline-actions .btn.full { margin-top: 0; }
.ledger-inline #btn-ledger-inline { margin-top: 0; }
.ledger-inline #refresh-status { margin: 6px 0 0; }

/* t897u / t930u: cabin-meta + how-align as separate rows — no ~367px blank beside left 3 cards */
.cabin-bottom-band {
 display: grid;
 grid-template-columns: 1fr; /* t930u: stack; how-align no longer sets row height beside cards */
 gap: 12px;
 align-items: start;
 margin: 10px 0 0;
}
.cabin-bottom-band .cabin-meta { margin: 0; }
.cabin-bottom-band .how-align {
 display: flex;
 flex-direction: column;
 justify-content: flex-start;
 min-height: 0;
 width: 100%;
 box-sizing: border-box;
}
.cabin-bottom-band .how-align h2 { margin: 0 0 8px; }
.cabin-bottom-band .how-align .how { margin: 0 0 8px; }
.cabin-bottom-band .how-align .zen-verses { margin: 0; }


/* —— t899u P1/P2 playtest —— */
.app {
 padding-bottom: max(88px, calc(28px + env(safe-area-inset-bottom, 0px)));
}
@media (max-width: 520px) {
 .app { padding-bottom: max(96px, calc(24px + env(safe-area-inset-bottom, 0px))); }
 .machine.cabin, .page-wrap, main {
 padding-bottom: max(88px, env(safe-area-inset-bottom, 0px));
 }
}
.sit-free-line {
 margin: 6px 0 8px;
 text-align: center;
 font-size: 0.92rem;
 font-weight: 700;
 color: var(--gold-2, #f5e6c8);
}
.sit-consent-one { margin: 4px 0 8px; }
.ycc-optional {
 margin: 10px 0 12px;
 border: 1px solid rgba(159,214,208,0.22);
 border-radius: 12px;
 background: rgba(8,20,26,0.35);
 padding: 0 10px 8px;
}
.ycc-optional-sum {
 cursor: pointer;
 list-style: none;
 padding: 10px 4px;
 font-weight: 700;
 color: var(--teal-2, #6ec8bc);
}
.ycc-optional-sum::-webkit-details-marker { display: none; }
.ycc-optional-body { padding-bottom: 4px; }
#btn-sit.need-consent,
#btn-sit[aria-disabled="true"] {
 opacity: 0.45;
 cursor: not-allowed;
}
.paywall-fail {
 margin: 8px 0 0;
 padding: 8px 10px;
 border-radius: 8px;
 background: rgba(180, 60, 60, 0.18);
 border: 1px solid rgba(220, 100, 100, 0.45);
 color: #ffc9c9;
 font-size: 0.86rem;
 font-weight: 600;
}
.paywall-addr, textarea.paywall-addr {
 width: 100%;
 min-height: 44px;
 border-radius: 8px;
 border: 1px solid var(--line);
 background: #0a141a;
 color: var(--gold-2);
 padding: 8px;
 font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
 font-size: 0.78rem;
 word-break: break-all;
 overflow-wrap: anywhere;
 white-space: pre-wrap;
 resize: vertical;
 overflow-x: auto;
}
.paywall-addr-row { align-items: flex-start; }
.ledger-list, .ledger-readable {
 max-width: 100%;
}
.ledger-row {
 word-break: break-word;
 overflow-wrap: anywhere;
}
.ledger-scope {
 display: flex; gap: 8px; margin: 0 0 10px; flex-wrap: wrap;
}
.ledger-scope-btn {
 min-height: 36px; padding: 6px 12px; border-radius: 999px;
 border: 1px solid var(--line); background: transparent; color: var(--muted);
 cursor: pointer; font-weight: 600;
}
.ledger-scope-btn.active {
 background: rgba(126,200,200,0.18); color: var(--teal-2);
 border-color: rgba(126,200,200,0.45);
}
.nft-stub-dead, .nft-stub-dead img, #result-nft.nft-stub-dead {
 pointer-events: none !important;
 cursor: default !important;
 text-decoration: none;
 opacity: 0.85;
}
/* t922u — kitten float NEVER steals tip/sit clicks; only img + action panel hit */
.zen-mascot-float {
 z-index: 35;
 pointer-events: none !important;
}
.zen-mascot-float .zen-whiskers-float,
.zen-mascot-float .zen-mascot-actions:not([hidden]) {
 pointer-events: auto;
 z-index: 36;
}
.controls, .claw-tip, .result, .paywall-actions, .zen-qa, footer, .footer-line {
 position: relative;
 z-index: 60;
 pointer-events: auto;
}
/* tip desk hit target — enlarge + stay above float mascot */
.claw-tip {
 isolation: isolate;
 z-index: 60;
}
#claw-lab, .claw-lab {
 position: relative;
 z-index: 61;
 min-height: 52px;
 padding: 12px 16px;
 touch-action: manipulation;
 -webkit-tap-highlight-color: rgba(201,162,39,.28);
 pointer-events: auto !important;
}
.claw-amts .claw-amt, .tip-rail, #tip-custom-go, #tip-custom {
 position: relative;
 z-index: 61;
 pointer-events: auto !important;
 touch-action: manipulation;
 min-height: 44px;
}
.zen-verses-title {
 margin: 14px 0 6px;
 font-weight: 700;
 color: var(--gold-2, #f5e6c8);
 font-size: 0.9rem;
}
.zen-qa-out {
 max-height: 220px;
 overflow: auto;
 white-space: pre-wrap;
}
.zen-qa-q { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }
.zen-qa-a { color: var(--gold-2); font-size: 0.86rem; margin-bottom: 6px; }
.intake-agree-box.need-consent,
.intake-panel.need-consent {
 outline: 2px solid rgba(201,162,39,0.7);
 border-radius: 10px;
}


/* t920u — tip chip vs verify dust; wider dialog; close not clipped */
.paywall-chip-main {
 font-size: 1.15rem;
 font-weight: 700;
 color: var(--gold-2);
 margin: 4px 0;
}
.paywall-verify-dust {
 margin: 6px 0 2px;
 line-height: 1.35;
}
.paywall-verify-dust .vd-val {
 font-variant-numeric: tabular-nums;
 color: var(--teal-2);
 font-size: 0.82rem;
}
.paywall-check-only { margin-top: 4px; }
dialog {
 width: min(640px, calc(100vw - 16px));
 max-width: min(640px, calc(100vw - 16px));
 max-height: calc(100vh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
 overflow: visible;
}
.modal-inner header {
 gap: 8px;
 padding-right: 4px;
}
.modal-inner header .btn.ghost,
.modal-inner header button[value="close"] {
 flex: 0 0 auto;
 min-width: 44px;
 min-height: 44px;
 margin: 0;
 position: relative;
 z-index: 2;
}
.paywall-body { overflow-x: hidden; }


/* t922u P2 tip-click — no transparent overlay over tip desk */
.claw-tip, #claw-lab, .claw-box, .claw-amts, .tip-rails {
 pointer-events: auto !important;
}
.zen-mascot-float, .zen-bubbles-float {
 /* container / bubbles pass through; img+actions opt in above */
}
.zen-bubbles-float, .zen-bubbles-stage {
 pointer-events: none !important;
}


/* t926u — P0/P1/P2 */
.paywall-scan-hint {
 margin: 6px 0 0;
 font-weight: 600;
 color: var(--teal-2, #6ec8bc);
}
.cabin-ring {
 /* breath-stage no longer forces tall blank under halo */
 margin: 0 auto;
}
.zen-mascot-actions {
 max-height: min(42vh, 280px);
 overflow: auto;
}

/* t927u — P1: #paywall-modal first paint must keep 「只查鏈」「關閉」 visible */
/* t929u — P1: closed dialog must not leak bottom 「怎麼付」 bar (display:flex overrode UA none) */
dialog:not([open]) {
 display: none !important;
}
#paywall-modal[open],
#paywall-modal {
 width: min(640px, calc(100vw - 16px));
 max-width: min(640px, calc(100vw - 16px));
 max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
 max-height: calc(100vh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
 overflow: hidden;
 flex-direction: column;
 padding: 0;
}
#paywall-modal[open] {
 display: flex;
}
#paywall-modal .paywall-modal-inner {
 display: flex;
 flex-direction: column;
 flex: 1 1 auto;
 min-height: 0;
 max-height: 100%;
 overflow: hidden;
 padding: 12px 14px 0;
}
#paywall-modal .paywall-modal-inner > header {
 flex: 0 0 auto;
}
#paywall-modal .paywall-body {
 flex: 1 1 auto;
 min-height: 0;
 max-height: none;
 overflow: hidden;
 display: flex;
 flex-direction: column;
 padding: 8px 4px 0;
 -webkit-overflow-scrolling: touch;
}
#paywall-modal .paywall,
#paywall-modal .paywall-simple,
#paywall-modal .paywall-layout {
 display: flex;
 flex-direction: column;
 flex: 1 1 auto;
 min-height: 0;
 overflow: hidden;
 height: 100%;
}
#paywall-modal .paywall-scroll {
 flex: 1 1 auto;
 min-height: 0;
 overflow-x: hidden;
 overflow-y: auto;
 -webkit-overflow-scrolling: touch;
 /* t970u: keep Copy address clear of sticky 只查鏈 on 390px */
 padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px));
}
#paywall-modal .paywall-addr-spacer {
 height: 24px;
 flex: 0 0 auto;
}
#paywall-modal .paywall-addr-row {
 position: relative;
 z-index: 2;
 margin-bottom: 8px;
}
#paywall-modal .paywall-actions,
#paywall-modal .paywall-actions-bar {
 flex: 0 0 auto;
 position: sticky;
 bottom: 0;
 z-index: 6;
 margin-top: 0;
 padding: 10px 2px calc(10px + env(safe-area-inset-bottom, 0px));
 background: var(--bg-2, #12262f);
 border-top: 1px solid var(--line, rgba(159, 214, 208, 0.22));
 box-shadow: 0 -10px 18px rgba(0, 0, 0, 0.28);
}
#paywall-modal .paywall-simple .paywall-actions {
 flex-direction: column;
}
@media (max-height: 780px) {
 #paywall-modal .paywall-qr,
 #paywall-modal .paywall-simple .paywall-qr {
 width: min(168px, 46vw);
 height: auto;
 }
 #paywall-modal .paywall-amount-val { font-size: 1.25rem; }
}
@media (max-height: 640px) {
 #paywall-modal .paywall-qr,
 #paywall-modal .paywall-simple .paywall-qr {
 width: min(132px, 40vw);
 }
 #paywall-modal .paywall-scan-hint { display: none; }
}

/* t928u — layout hotfix: one vertical sit column (ring → hint → dur → hold → consent → optional) */
.breath-row {
 display: block !important;
 grid-template-columns: none !important;
 margin: 0 0 12px;
}
.breath-stage {
 position: relative;
 display: flex;
 flex-direction: column;
 align-items: stretch;
 gap: 0;
 min-height: 0;
 padding: 12px 12px 10px;
 overflow: visible;
}
.sit-stack {
 display: flex;
 flex-direction: column;
 align-items: center;
 width: 100%;
 max-width: 420px;
 margin: 0 auto;
 gap: 0;
 position: relative;
 z-index: 4;
}
.sit-stack .cabin-ring {
 position: relative;
 margin: 4px auto 0;
 flex: 0 0 auto;
}
.sit-stack .timer {
 margin: 8px 0 0;
 text-align: center;
 line-height: 1.1;
 width: 100%;
}
.sit-stack .hint,
.sit-stack .bci-note,
.sit-stack .prayer-opt,
.sit-stack .sit-free-line {
 margin: 6px 0 0;
 text-align: center;
 width: 100%;
}
.sit-stack .dur-pick {
 display: flex;
 width: 100%;
 gap: 8px;
 margin: 12px 0 0;
}
.sit-stack .dur-pick .dur {
 flex: 1;
 min-height: 40px;
}
.sit-stack .controls {
 display: grid;
 grid-template-columns: 1.25fr 1fr;
 gap: 8px;
 width: 100%;
 margin: 10px 0 0;
}
.sit-stack .intake-agree-box.sit-consent-one {
 width: 100%;
 box-sizing: border-box;
 margin: 12px 0 0;
 padding: 10px 12px;
 overflow: hidden;
}
.sit-stack .intake-consent {
 display: flex;
 gap: 10px;
 align-items: flex-start;
 margin: 0;
 width: 100%;
 box-sizing: border-box;
}
.sit-stack .intake-consent input {
 margin: 2px 0 0;
 width: 18px;
 height: 18px;
 flex: 0 0 18px;
 align-self: flex-start;
}
.sit-stack .intake-consent span {
 flex: 1 1 auto;
 min-width: 0;
 overflow-wrap: anywhere;
 word-break: break-word;
}
.sit-stack .ycc-optional {
 width: 100%;
 box-sizing: border-box;
 margin: 12px 0 0;
}
.breath-stage > .zen-qa,
.breath-stage > .metrics,
.breath-stage > .result,
.breath-stage > .claw-tip,
.breath-stage > .ledger-inline,
.breath-stage > .seal-hint,
.breath-stage > #seal-mount {
 width: 100%;
 max-width: 520px;
 margin-left: auto;
 margin-right: auto;
 position: relative;
 z-index: 6;
}
.breath-stage > .zen-qa { margin-top: 14px; }
.breath-stage > .claw-tip { margin-top: 12px; }
.breath-stage > .ledger-inline { margin-top: 12px; }
/* zen bubbles must not push the column */
.zen-bubbles-stage {
 position: absolute;
 left: 8%;
 right: 8%;
 top: 4px;
 height: 72px;
 pointer-events: none !important;
 z-index: 5;
}
/* keep float kitten off the sit column */
.zen-mascot-float {
 z-index: 35;
 pointer-events: none !important;
}
@media (max-width: 420px) {
 .sit-stack { max-width: 100%; }
 .sit-stack .cabin-ring { width: 132px; height: 132px; }
 .sit-stack .timer { font-size: 1.45rem; }
 .sit-stack .controls { grid-template-columns: 1fr; }
 .sit-stack .controls .btn { min-height: 48px; }
}

/* t929u — cabin-bottom align start; dialog:not([open]) display none */
/* t930u — cabin-bottom-band stacked rows (meta then how); sit-stack + dialog:not([open]) kept */



/* t932u — 許願牆 */
.mini-card.wish { border-color: rgba(201, 168, 108, 0.45); background: linear-gradient(160deg, rgba(40,28,12,0.55), rgba(12,26,34,0.5)); }
.mini-card.wish strong { display:block; font-size:1.05rem; color: var(--gold-2, #f5e6c8); margin: 2px 0 4px; }
.wish-modal-inner { max-width: 520px; }
.wish-list { max-height: 220px; overflow: auto; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.wish-item { padding: 10px 12px; border-radius: 10px; background: rgba(8,20,26,0.45); border: 1px solid rgba(159,214,208,0.18); }
.wish-item .wish-body { margin: 0 0 6px; line-height: 1.4; color: var(--text, #e8f4f2); word-break: break-word; }
.wish-item .wish-meta { margin: 0; font-size: 0.72rem; color: var(--muted, #9fd6d0); display: flex; flex-wrap: wrap; gap: 8px; }
.wish-empty { margin: 8px 0 12px; font-size: 0.85rem; color: var(--muted); }
.wish-compose { margin: 0; padding: 12px; }
.wish-lab { display:block; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
#wish-text { width: 100%; box-sizing: border-box; border-radius: 10px; border: 1px solid rgba(159,214,208,0.28); background: rgba(0,0,0,0.25); color: inherit; padding: 10px; resize: vertical; min-height: 56px; }
.wish-vis { border: none; margin: 10px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.wish-vis legend { font-size: 0.78rem; color: var(--muted); padding: 0; margin-right: 8px; }
.wish-vis-opt { font-size: 0.85rem; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.wish-amts { margin: 6px 0 10px; }
.wish-rails { margin-bottom: 10px; }
#wish-status { margin: 6px 0; }
#wish-submit { margin-top: 4px; }


/* t935 — 許願後一鍵分享 */
.wish-share-panel {
 margin-top: 12px;
 padding: 12px;
 border-radius: 12px;
 border: 1px solid rgba(201, 168, 108, 0.35);
 background: linear-gradient(165deg, rgba(40, 28, 12, 0.4), rgba(12, 26, 34, 0.55));
}
.wish-share-title {
 margin: 0 0 6px;
 font-size: 0.92rem;
 font-weight: 650;
 color: var(--gold-2, #f5e6c8);
}
.wish-share-preview {
 margin: 0 0 10px;
 line-height: 1.4;
 word-break: break-word;
 white-space: pre-wrap;
}
.wish-share-btns {
 display: flex;
 flex-wrap: wrap;
 gap: 6px;
}
.wish-share-btn {
 appearance: none;
 border: 1px solid rgba(159, 214, 208, 0.28);
 background: rgba(0, 0, 0, 0.28);
 color: inherit;
 border-radius: 999px;
 padding: 6px 10px;
 font-size: 0.78rem;
 cursor: pointer;
 line-height: 1.2;
}
.wish-share-btn:hover, .wish-share-btn:focus-visible {
 border-color: rgba(201, 168, 108, 0.55);
 background: rgba(201, 168, 108, 0.12);
 outline: none;
}
.wish-share-btn.primary {
 border-color: rgba(201, 168, 108, 0.5);
 background: rgba(201, 168, 108, 0.16);
}
.wish-share-tip {
 margin: 8px 0 0;
}
.wish-item {
 position: relative;
}
.wish-item .wish-row-actions {
 margin-top: 6px;
 display: flex;
 gap: 8px;
 align-items: center;
}
.wish-item .wish-share-mini {
 appearance: none;
 border: 1px solid rgba(159, 214, 208, 0.25);
 background: rgba(0, 0, 0, 0.22);
 color: var(--muted, #9fd6d0);
 border-radius: 999px;
 padding: 3px 9px;
 font-size: 0.72rem;
 cursor: pointer;
}
.wish-item .wish-share-mini:hover {
 color: var(--gold-2, #f5e6c8);
 border-color: rgba(201, 168, 108, 0.45);
}
.wish-item.wish-highlight {
 border-color: rgba(201, 168, 108, 0.65);
 box-shadow: 0 0 0 1px rgba(201, 168, 108, 0.25);
}
.result-wish-share { margin-top: 10px; }


/* t935 — cert QR + share lang picker */
.nft-cert-row {
 display: flex;
 flex-wrap: wrap;
 gap: 12px;
 align-items: center;
 justify-content: center;
 margin-bottom: 6px;
}
.nft-cert-qr-wrap {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 4px;
 min-width: 120px;
}
.nft-cert-qr {
 width: 120px;
 height: 120px;
 border-radius: 8px;
 background: transparent;
 padding: 0;
 box-sizing: border-box;
}
.nft-cert-qr-lab {
 margin: 0;
 font-size: 0.7rem;
 text-align: center;
 max-width: 130px;
 line-height: 1.25;
}
.share-card-head {
 display: flex;
 flex-wrap: wrap;
 align-items: center;
 justify-content: space-between;
 gap: 8px;
 margin-bottom: 6px;
}
.share-card-head .wish-share-title { margin: 0; }
.share-lang {
 display: inline-flex;
 gap: 4px;
 flex-wrap: wrap;
}
.share-lang-btn {
 appearance: none;
 border: 1px solid rgba(159, 214, 208, 0.28);
 background: rgba(0, 0, 0, 0.25);
 color: inherit;
 border-radius: 999px;
 padding: 3px 8px;
 font-size: 0.7rem;
 cursor: pointer;
 line-height: 1.2;
}
.share-lang-btn.active {
 border-color: rgba(201, 168, 108, 0.55);
 background: rgba(201, 168, 108, 0.18);
 color: var(--gold-2, #f5e6c8);
}


/* ============================================================
 t936u — full-page visual polish (tokens → cabin surfaces)
 Color hierarchy · spacing rhythm · type scale · 繁體為主
 Features untouched: tip rails / wish wall / share / cert QR / 只查鏈
 ============================================================ */

/* Type: brand + section titles */
.brand h1 {
 font-size: var(--fs-title);
 letter-spacing: 0.03em;
 line-height: var(--lh-tight);
 color: var(--ink);
}
.brand p {
 font-size: var(--fs-hint);
 color: var(--muted);
 line-height: var(--lh-body);
}
.card h2,
.how-align h2,
.ledger-inline-head h2,
.wish-share-title,
.modal-inner header h2,
.modal-inner header strong {
 font-size: var(--fs-title-sm);
 font-weight: 700;
 letter-spacing: 0.02em;
 color: var(--gold-2);
 line-height: var(--lh-tight);
}

/* Body / hint */
.hint { font-size: var(--fs-body); color: var(--teal-2); }
.claw-sub,
.tip-rail-hint,
.paywall-rail-hint,
.seal-hint,
.mc-hint,
.nft-cert-qr-lab,
.wish-lab,
.wish-empty,
.wish-share-tip,
.ledger-inline-hint {
 font-size: var(--fs-hint);
 color: var(--muted);
 line-height: var(--lh-body);
}
.how, .paytable li, .wish-body, .wish-share-preview {
 font-size: var(--fs-body-sm);
 line-height: var(--lh-body);
}
.mini-card .mc-lab,
.wish-vis legend,
.claw-custom-lab {
 font-size: var(--fs-label);
 color: var(--muted-2);
 letter-spacing: 0.05em;
}

/* Cards vs gold accents */
.machine, .card {
 background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
 border-color: var(--line);
 box-shadow: var(--shadow-card);
}
.mini-card {
 background: var(--panel);
 border-color: var(--line);
 border-radius: var(--radius-sm);
 padding: var(--pad-card);
}
.mini-card.wish,
.wish-share-panel,
.claw-tip {
 border-color: var(--gold-line);
}
.pill.gold,
.badge:not(.chain) {
 color: var(--gold-2);
 border-color: var(--gold-line);
}
.timer { color: var(--gold-2); font-size: var(--fs-display); }

/* Sit column — consistent breathing, less void / less crush */
.sit-stack {
 gap: var(--space-2);
}
.sit-stack .cabin-ring { margin-top: var(--space-1); }
.sit-stack .timer { margin-top: var(--space-2); }
.sit-stack .hint,
.sit-stack .bci-note,
.sit-stack .prayer-opt,
.sit-stack .sit-free-line {
 margin-top: var(--space-2);
}
.sit-stack .dur-pick { margin-top: var(--space-3); gap: var(--space-2); }
.sit-stack .controls { margin-top: var(--gap-stack); gap: var(--space-2); }
.sit-stack .intake-agree-box.sit-consent-one,
.sit-stack .ycc-optional {
 margin-top: var(--gap-stack);
 padding: var(--space-3);
 border-radius: var(--radius-sm);
}
.breath-stage {
 padding: var(--space-3) var(--space-3) var(--space-2);
 gap: 0;
 border-radius: var(--radius-sm);
}
.breath-stage > .zen-qa { margin-top: var(--gap-section); }
.breath-stage > .claw-tip,
.breath-stage > .ledger-inline,
.breath-stage > .metrics,
.breath-stage > .result {
 margin-top: var(--gap-stack);
 max-width: 520px;
}

/* Tip desk */
.claw-tip {
 gap: var(--space-3);
 padding: var(--space-3);
 border-radius: var(--radius-sm);
 background: rgba(0, 0, 0, 0.22);
 border-style: solid;
 border-width: 1px;
}
.claw-lab {
 border-radius: var(--radius-xs);
 border-color: var(--gold-line);
 background: linear-gradient(180deg, #2c422c, #1a2a1c);
 color: var(--gold-2);
}
.claw-amts { gap: var(--space-2); }
.claw-amts-row { gap: var(--space-2); }
.claw-amt, .wish-amt {
 border-radius: var(--radius-xs);
 min-height: 44px;
}
.claw-amt.active, .wish-amt.active {
 border-color: var(--gold);
 color: var(--gold-2);
 background: rgba(208, 176, 120, 0.18);
 box-shadow: 0 0 0 1px rgba(208, 176, 120, 0.35), inset 0 0 0 1px rgba(208, 176, 120, 0.2);
}
.tip-rails, .pay-rails, .wish-rails {
 gap: var(--space-2);
 margin: var(--space-2) 0;
}
.tip-rail, .pay-rail, .wish-rail {
 border-radius: 999px;
 min-height: 40px;
 font-size: var(--fs-hint);
}
.tip-rail.active, .pay-rail.active, .wish-rail.active {
 border-color: var(--gold-line);
 color: var(--gold-2);
 background: rgba(208, 176, 120, 0.14);
}
.claw-custom-input {
 border-radius: var(--radius-xs);
 border-color: var(--line);
 background: rgba(0, 0, 0, 0.28);
 color: var(--ink);
 min-height: 44px;
}

/* Bottom band — even rhythm, no tall empty beside cards */
.cabin-bottom-band {
 gap: var(--gap-section);
 margin: var(--gap-section) 0 0;
}
.cabin-bottom-band .cabin-meta {
 display: grid;
 gap: var(--space-2);
}
.cabin-bottom-band .how-align {
 padding: var(--pad-card);
 border-radius: var(--radius);
 background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
 border: 1px solid var(--line);
 box-shadow: var(--shadow-card);
}
.cabin-bottom-band .how-align h2 { margin: 0 0 var(--space-2); }
.cabin-bottom-band .how-align .how { margin: 0 0 var(--space-2); }
.cabin-bottom-band .how-align .zen-verses { margin: var(--space-2) 0 0; }
.zen-verses-title {
 margin: var(--space-3) 0 var(--space-2);
 font-size: var(--fs-body-sm);
 color: var(--gold-2);
}

/* Ledger inline */
.ledger-inline {
 margin-top: var(--gap-section);
 padding: var(--pad-card);
 border-radius: var(--radius-sm);
 background: rgba(0, 0, 0, 0.16);
 border: 1px solid var(--line);
}
.ledger-inline-head { margin-bottom: var(--space-2); }
.ledger-row {
 padding: var(--space-3);
 border-radius: var(--radius-sm);
 gap: var(--space-2);
}
.ledger-row .lr-top b { color: var(--gold-2); }
.ledger-row .lr-meta { color: var(--muted); font-size: var(--fs-hint); }

/* Wish wall */
.wish-modal-inner { padding: var(--space-3) var(--space-4) var(--space-4); }
.wish-list {
 max-height: min(240px, 36vh);
 gap: var(--space-2);
 margin: 0 0 var(--space-3);
}
.wish-item {
 padding: var(--space-3);
 border-radius: var(--radius-xs);
 background: rgba(8, 20, 26, 0.5);
 border: 1px solid var(--line);
}
.wish-item .wish-body {
 margin: 0 0 var(--space-2);
 color: var(--ink);
 font-size: var(--fs-body-sm);
 line-height: var(--lh-body);
}
.wish-item .wish-meta {
 font-size: var(--fs-label);
 color: var(--muted-2);
 gap: var(--space-2);
}
.wish-compose {
 margin: 0;
 padding: var(--space-3);
 border-radius: var(--radius-sm);
 border: 1px solid var(--line);
 background: rgba(0, 0, 0, 0.18);
}
#wish-text {
 border-radius: var(--radius-xs);
 border-color: var(--line);
 background: rgba(0, 0, 0, 0.28);
 color: var(--ink);
 padding: var(--space-3);
 font-size: var(--fs-body);
 line-height: var(--lh-body);
 min-height: 64px;
}
.wish-vis {
 margin: var(--space-3) 0 var(--space-2);
 gap: var(--space-3) var(--space-4);
}
.wish-vis-opt { font-size: var(--fs-body-sm); color: var(--ink); }
.wish-amts { margin: var(--space-2) 0 var(--space-3); }
#wish-submit { margin-top: var(--space-2); min-height: 48px; }

/* Share sheet + cert card */
.wish-share-panel,
.result-wish-share {
 margin-top: var(--gap-stack);
 padding: var(--space-3);
 border-radius: var(--radius-sm);
 border: 1px solid var(--gold-line);
 background: linear-gradient(165deg, rgba(42, 30, 12, 0.48), rgba(12, 26, 34, 0.58));
 box-shadow: var(--shadow-card);
}
.wish-share-title {
 font-size: var(--fs-body);
 color: var(--gold-2);
 margin: 0 0 var(--space-2);
}
.wish-share-preview {
 margin: 0 0 var(--space-3);
 color: var(--muted);
}
.wish-share-btns {
 gap: var(--space-2);
}
.wish-share-btn {
 min-height: 36px;
 padding: 7px 12px;
 font-size: var(--fs-hint);
 border-color: var(--line);
 border-radius: 999px;
}
.wish-share-btn.primary,
.wish-share-btn:hover,
.wish-share-btn:focus-visible {
 border-color: var(--gold-line);
 background: rgba(208, 176, 120, 0.14);
 color: var(--gold-2);
}
.share-card-head {
 gap: var(--space-2);
 margin-bottom: var(--space-2);
 align-items: center;
}
.share-lang { gap: var(--space-1); }
.share-lang-btn {
 min-height: 32px;
 padding: 4px 10px;
 font-size: var(--fs-label);
 border-color: var(--line);
}
.share-lang-btn.active {
 border-color: var(--gold-line);
 background: rgba(208, 176, 120, 0.18);
 color: var(--gold-2);
 font-weight: 700;
}
.nft-cert-row {
 gap: var(--space-3);
 margin: var(--space-2) 0;
 padding: var(--space-2);
 border-radius: var(--radius-sm);
 background: rgba(0, 0, 0, 0.18);
 border: 1px solid var(--line);
}
.nft-cert-qr {
 border-radius: var(--radius-xs);
 background: transparent;
 box-shadow: none;
}
.nft-cert-qr-lab {
 color: var(--muted);
 font-size: var(--fs-label);
}
.nft-preview {
 margin-top: var(--space-2);
 padding: var(--space-2);
}
.nft-preview img {
 border-radius: var(--radius-sm);
 border-color: var(--gold-line);
 max-width: 240px;
}
.result {
 padding: var(--space-3);
 border-radius: var(--radius-sm);
 margin-top: var(--gap-stack);
}

/* App / stage spacing — trim big voids */
.app {
 padding-top: var(--space-3);
 padding-left: max(var(--space-3), env(safe-area-inset-left, 0px));
 padding-right: max(var(--space-3), env(safe-area-inset-right, 0px));
 padding-bottom: max(88px, calc(var(--space-6) + env(safe-area-inset-bottom, 0px)));
}
.topbar { margin-bottom: var(--space-2); gap: var(--space-2); }
.banner {
 margin: var(--space-2) 0 var(--gap-stack);
 padding: var(--space-2) var(--space-3);
 border-radius: var(--radius-sm);
 font-size: var(--fs-hint);
}
.cards-row { gap: var(--space-2); margin-bottom: var(--gap-stack); }
.stage { gap: var(--gap-section); }
.machine { padding: var(--pad-panel); }
.side { gap: var(--gap-stack); }
.foot {
 margin-top: var(--space-4);
 gap: var(--space-2);
 font-size: var(--fs-label);
 color: var(--muted-2);
}

/* Dialogs — match cabin */
dialog {
 border-color: var(--line);
 background: var(--bg-2);
 border-radius: var(--radius);
 box-shadow: var(--shadow);
}
.modal-inner { padding: var(--space-3) var(--space-4) var(--space-4); }
#paywall-modal .paywall-actions,
#paywall-modal .paywall-actions-bar {
 background: var(--bg-2);
 border-top-color: var(--line);
}

/* Mobile: keep rhythm without crush */
@media (max-width: 600px) {
 .app {
 padding-top: var(--space-2);
 padding-bottom: max(96px, calc(var(--space-5) + env(safe-area-inset-bottom, 0px)));
 }
 .brand h1 { font-size: 1.02rem; }
 .claw-tip { padding: var(--space-2) var(--space-3); }
 .wish-share-panel, .result-wish-share { padding: var(--space-3); }
 .cabin-bottom-band .how-align { padding: var(--space-3); }
}
@media (max-height: 860px) and (max-width: 430px) {
 .sit-stack .cabin-ring { width: 128px; height: 128px; }
 .sit-stack .timer { font-size: 1.4rem; }
 .breath-stage { padding: var(--space-2); }
 .breath-stage > .claw-tip,
 .breath-stage > .ledger-inline { margin-top: var(--space-2); }
}


/* ============================================================
 t937u — P2 polish (playtest PASS t936) + t940u wish-amts horizontal
 1) wish amount chips horizontal (match tip) 2) tighten blank under halo
 3) 「只查鏈」gold active contrast 4) (JS) purge stray 공유
 Fiat / wish / share / unpaid-not-on-wall / cert QR transparent unchanged. untouched.
 ============================================================ */

/* 1) Wish tip amounts — horizontal row (matches tip .claw-amts-row / .claw-amt) — t940u playtest FAIL fix */
.wish-amts.claw-amts,
.claw-amts.wish-amts {
 display: flex !important;
 flex-direction: row !important;
 flex-wrap: wrap;
 align-items: center;
 gap: var(--space-2, 8px);
 width: 100%;
}
.wish-amts .wish-amt,
.wish-amts .claw-amt {
 flex: 1;
 width: auto;
 min-width: 0;
 min-height: 44px;
}

/* 2) Still empty space under halo / breath — tighten further */
.sit-stack {
 gap: var(--space-1);
}
.sit-stack .cabin-ring {
 width: 156px;
 height: 156px;
 margin-top: 0;
 margin-bottom: 0;
}
.sit-stack .timer {
 margin-top: var(--space-1);
 font-size: 1.5rem;
}
.sit-stack .hint,
.sit-stack .bci-note,
.sit-stack .prayer-opt,
.sit-stack .sit-free-line {
 margin-top: var(--space-1);
}
.sit-stack .dur-pick { margin-top: var(--space-2); }
.sit-stack .controls { margin-top: var(--space-2); }
.sit-stack .intake-agree-box.sit-consent-one,
.sit-stack .ycc-optional {
 margin-top: var(--space-2);
 padding: var(--space-2) var(--space-3);
}
.breath-stage {
 padding: var(--space-2) var(--space-3) var(--space-1);
}
.breath-stage > .zen-qa { margin-top: var(--space-3); }
.breath-stage > .claw-tip,
.breath-stage > .ledger-inline,
.breath-stage > .metrics,
.breath-stage > .result {
 margin-top: var(--space-2);
}
.zen-bubbles-stage {
 height: 56px;
 top: 0;
}
@media (max-width: 420px) {
 .sit-stack .cabin-ring { width: 120px; height: 120px; }
 .sit-stack .timer { font-size: 1.35rem; }
}
@media (max-height: 860px) and (max-width: 430px) {
 .sit-stack .cabin-ring { width: 112px; height: 112px; }
 .sit-stack .timer { font-size: 1.28rem; }
 .breath-stage { padding: var(--space-1) var(--space-2); }
}

/* 3) 「只查鏈」— gold active style, reads clickable (not disabled-muted) */
.btn.seal:not(:disabled),
#btn-seal:not(:disabled),
#paywall-paid:not(:disabled) {
 background: linear-gradient(180deg, #7a6230 0%, #4a3818 100%);
 border: 1px solid rgba(232, 196, 120, 0.85);
 color: #fff6e0;
 font-weight: 800;
 letter-spacing: 0.04em;
 opacity: 1;
 box-shadow:
 0 0 0 1px rgba(208, 176, 120, 0.45),
 0 0 16px rgba(208, 176, 120, 0.28),
 inset 0 1px 0 rgba(255, 236, 190, 0.22);
 text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.btn.seal:not(:disabled):hover,
#btn-seal:not(:disabled):hover,
#paywall-paid:not(:disabled):hover {
 background: linear-gradient(180deg, #8a7238 0%, #5a4520 100%);
 border-color: rgba(245, 220, 160, 0.95);
 box-shadow:
 0 0 0 1px rgba(232, 196, 120, 0.55),
 0 0 22px rgba(208, 176, 120, 0.4),
 inset 0 1px 0 rgba(255, 236, 190, 0.3);
}
.btn.seal:not(:disabled):active,
#paywall-paid:not(:disabled):active {
 transform: translateY(1px);
}
#paywall-paid:disabled,
#btn-seal:disabled,
.btn.seal:disabled {
 opacity: 0.5;
 cursor: not-allowed;
 box-shadow: none;
}
.paywall-actions #paywall-paid {
 min-height: 52px;
 font-size: 1.05rem;
}


/* t941 — referral commission notes (quiet, not spammy) */
.ref-econ,
.ref-mine {
 margin: 6px 0 0;
 font-size: 0.78rem;
 letter-spacing: 0.02em;
 opacity: 0.85;
 line-height: 1.35;
}
.ref-mine {
 opacity: 0.75;
}

/* t942u — P0 mobile scroll: only sit ring/hold block pan; page + tip/QA scroll */
.breath-stage {
 touch-action: pan-y !important;
}
#cabin-ring, #btn-sit, .sit-stack .cabin-ring {
 touch-action: none;
}
#wish-modal[open], #wish-modal {
 width: min(560px, calc(100vw - 16px));
 max-width: min(560px, calc(100vw - 16px));
 max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
 max-height: calc(100vh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
 overflow-x: hidden;
 overflow-y: auto !important;
 -webkit-overflow-scrolling: touch;
 overscroll-behavior: contain;
 padding: 0;
}
#wish-modal .wish-modal-inner {
 max-height: none;
 overflow: visible;
 padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
#wish-modal .wish-modal-inner > header {
 position: sticky;
 top: 0;
 z-index: 5;
 background: var(--bg-2, #102028);
 padding-top: 8px;
 padding-bottom: 6px;
 margin-bottom: 0;
}
#wish-modal .wish-list {
 max-height: min(28vh, 180px);
 overflow: auto;
 -webkit-overflow-scrolling: touch;
}
html, body {
 overflow-x: hidden;
 overflow-y: auto !important;
 -webkit-overflow-scrolling: touch;
 overscroll-behavior-y: auto;
 height: auto !important;
 max-height: none !important;
 min-height: 100%;
 touch-action: pan-y;
}
body.ycc.ycc-modal-lock {
 overflow: hidden !important;
}

/* t943u unlock after close */
body.ycc:not(.ycc-modal-lock) {
 overflow-x: hidden !important;
 overflow-y: auto !important;
 touch-action: pan-y !important;
}
dialog:not([open]) {
 display: none !important;
 pointer-events: none !important;
}


/* t945u — composite share card in panel */
.share-card-visual {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 6px;
 margin: 8px 0 10px;
}
.share-card-img {
 display: block;
 width: min(92vw, 420px);
 height: auto;
 border-radius: 12px;
 border: 1px solid rgba(232, 213, 163, 0.35);
 background: #0a2a30;
 box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
 -webkit-touch-callout: default;
 user-select: auto;
}
.share-card-img[hidden] { display: none !important; }
.share-card-hint {
 margin: 0;
 text-align: center;
 color: rgba(232, 213, 163, 0.85);
 font-size: 0.78rem;
}
.wish-share-preview.share-link-only {
 word-break: break-all;
 font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
 font-size: 0.72rem;
 opacity: 0.85;
 max-height: 3.2em;
 overflow: hidden;
}

/* t947u — lang switcher inside wish modal */
.wish-modal-head {
 display: flex;
 align-items: center;
 gap: 8px;
 flex-wrap: wrap;
}
.wish-modal-head h2 { flex: 1 1 auto; margin: 0; }
.wish-modal-head .wish-lang { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.wish-modal-head .wish-lang .lang-btn { font-size: 12px; padding: 4px 8px; }
.wish-modal-head .btn.ghost { margin-left: auto; }

/* ============================================================
 t950u — mobile P0/P1 (390×844): kitten yield, paywall scroll space,
 sit press-to-start UI, duration/ledger/share tap targets
 ============================================================ */

/* P0 — ≤420px: float mascot bottom-left 64px; hide speech; dur above cat */
@media (max-width: 420px) {
 .zen-mascot-float {
 width: 64px !important;
 height: 64px !important;
 left: 8px !important;
 right: auto !important;
 top: auto !important;
 bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
 z-index: 30 !important;
 pointer-events: none !important;
 }
 .zen-mascot-float .zen-whiskers-float {
 width: 64px !important;
 height: 64px !important;
 pointer-events: none !important; /* mobile: never steal tip/dur/qa/share */
 }
 .zen-mascot-float .zen-mascot-actions,
 .zen-mascot-float.is-speaking .zen-mascot-actions,
 .zen-bubbles-float,
 .zen-mascot-float .zen-bubbles-float {
 display: none !important;
 visibility: hidden !important;
 pointer-events: none !important;
 }
 .dur-pick,
 .sit-stack .dur-pick {
 position: relative;
 z-index: 70;
 }
 .controls,
 .zen-qa,
 .claw-tip,
 .wish-share-panel,
 .result-wish-share,
 .share-lang,
 .share-card-head {
 position: relative;
 z-index: 70;
 }
}

/* shell always pass-through (img may capture on desktop) */
.zen-mascot-float {
 pointer-events: none !important;
}

/* P0 — paywall: clear scroll space under sticky actions; shrink QR; addr column */
#paywall-modal .paywall-scroll,
.paywall-scroll {
 padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px)) !important;
 box-sizing: border-box;
}
#paywall-modal .paywall-actions,
#paywall-modal .paywall-actions-bar {
 /* keep sticky for thumb reach but content has 128px clear space above */
 position: sticky;
 bottom: 0;
}
.paywall-addr-row {
 display: flex;
 flex-direction: column;
 align-items: stretch;
 gap: 8px;
}
.paywall-addr-row .paywall-addr {
 flex: 1 1 auto;
 width: 100%;
 min-height: 44px;
}
.paywall-addr-row .btn,
#paywall-copy {
 flex: 0 0 auto;
 width: 100%;
 min-height: 44px;
}
@media (max-height: 900px) {
 #paywall-modal .paywall-qr,
 #paywall-modal .paywall-simple .paywall-qr,
 .paywall-qr {
 width: min(160px, 42vw);
 height: auto;
 max-height: 160px;
 }
 #paywall-modal .paywall-amount-val { font-size: 1.2rem; }
}
@media (max-height: 720px) {
 #paywall-modal .paywall-qr,
 #paywall-modal .paywall-simple .paywall-qr,
 .paywall-qr {
 width: min(120px, 36vw);
 max-height: 120px;
 }
 #paywall-modal .paywall-scan-hint { display: none; }
}

/* P0 — sit end control */
#btn-end-sit.sit-end,
.controls #btn-end-sit {
 min-height: 44px;
}
#btn-end-sit[hidden] { display: none !important; }
@media (max-width: 420px) {
 .sit-stack .controls {
 display: flex;
 flex-wrap: wrap;
 gap: 8px;
 }
 .sit-stack .controls .btn {
 flex: 1 1 120px;
 min-height: 48px;
 }
}

/* P1 — custom tip amount full width on mobile */
@media (max-width: 420px) {
 .claw-amts-custom {
 display: flex;
 flex-direction: column;
 align-items: stretch;
 width: 100%;
 }
 .claw-custom-input {
 max-width: none !important;
 width: 100% !important;
 flex: 1 1 auto;
 min-height: 44px;
 }
 .claw-amt-go {
 width: 100%;
 min-height: 44px;
 }
}

/* P1 — ledger 精力 / hash: column + word-break */
.ledger-row .lr-intake {
 display: block;
 white-space: normal;
 word-break: break-word;
 overflow-wrap: anywhere;
 line-height: 1.35;
}
.ledger-row .lr-hash,
.ledger-row .lr-tx {
 display: flex;
 flex-direction: column;
 align-items: flex-start;
 gap: 4px;
 max-width: 100%;
}
.ledger-row .lr-hash code,
.ledger-row .lr-tx .ledger-tx,
.ledger-row .lr-tx code {
 word-break: break-all;
 overflow-wrap: anywhere;
 max-width: 100%;
}

/* P1 — 「請問」tap target */
#zen-qa-ask,
.zen-qa-row #zen-qa-ask {
 white-space: nowrap !important;
 min-height: 44px !important;
 min-width: 4.5em;
 flex: 0 0 auto;
 padding-left: 14px;
 padding-right: 14px;
}
.zen-qa-row {
 align-items: stretch;
}
.zen-qa-row input {
 min-height: 44px;
}

/* P1 — share preview + lang buttons; cat yields */
.wish-share-preview,
.wish-share-preview.share-link-only,
#result-share-preview,
#wish-share-preview {
 word-break: break-all !important;
 overflow-wrap: anywhere !important;
 max-height: none !important;
 overflow: visible !important;
 white-space: pre-wrap;
}
.share-lang-btn,
.wish-share-btns .wish-share-btn {
 min-height: 44px;
 padding: 8px 12px;
 font-size: 0.78rem;
}
.share-lang {
 position: relative;
 z-index: 72;
 gap: 6px;
}
@media (max-width: 420px) {
 .share-card-head,
 .wish-share-panel,
 .result-wish-share {
 position: relative;
 z-index: 72;
 padding-bottom: 8px;
 }
}

/* P2 quick — top bar / duration / optional / fiat padding */
@media (max-width: 420px) {
 .topbar {
 flex-wrap: wrap;
 gap: 6px;
 }
 .sit-stack .dur-pick .dur {
 min-height: 40px;
 font-size: 0.85rem;
 padding: 6px 10px;
 }
 .intake-agree-box.sit-consent-one label,
 .sit-consent-gate label {
 font-size: 0.82rem;
 line-height: 1.35;
 }
 .ycc-optional-sum {
 min-height: 40px;
 display: flex;
 align-items: center;
 }
 .paywall-fiat-desk {
 padding: 4px 0 8px;
 gap: 12px;
 }
}

/* ============================================================
 t953u/t958u — float cat: HIDE entirely all widths (≤480 was not
 enough; desktop ≥481 still covered #zen-qa). Keep t951 hide-on-modal.
 Mid-page whiskers (claw/agent) stay.
 payment 只查鏈. t947–t957 kept.
 ============================================================ */

/* Prefer: CSS class toggled from modal/share/ledger open-close (t951 keep) */
.ycc-mascot-hidden,
#zen-mascot-side.ycc-mascot-hidden,
.zen-mascot-float.ycc-mascot-hidden,
.zen-bubbles-float.ycc-mascot-hidden,
.ycc-mascot-hidden .zen-mascot-actions,
.ycc-mascot-hidden .zen-bubbles-float,
.ycc-mascot-hidden .zen-whiskers-float {
 display: none !important;
 visibility: hidden !important;
 pointer-events: none !important;
}

/* t958u: hide float cat at ALL widths (desktop ≥481 also covered 问禅). Mid whiskers stay. */
#zen-mascot-side.zen-mascot-float,
#zen-mascot-side,
.zen-mascot-float,
.zen-bubbles-float,
#zen-mascot-side .zen-whiskers-float,
#zen-mascot-side .zen-mascot-actions,
.zen-mascot-float .zen-whiskers-float,
.zen-mascot-float .zen-mascot-actions,
.zen-mascot-float.is-speaking .zen-mascot-actions {
 display: none !important;
 visibility: hidden !important;
 pointer-events: none !important;
 z-index: 0 !important;
}

/* belt: UI surfaces paint above any residual float layer (all widths) */
#zen-qa,
#zen-qa .zen-qa-row,
#zen-qa-ask,
#zen-qa-input,
#btn-ledger,
#btn-ledger-inline,
#btn-jump-ledger,
#ledger-inline,
.ledger-inline,
.ledger-inline-actions,
.ledger-inline-head,
.wish-share-panel,
.result-wish-share,
#result-share,
#wish-share-panel,
.wish-share-btns,
.wish-share-btn,
.share-lang,
.share-lang-btn,
.share-card-head,
.claw-tip,
.claw-box,
.claw-lab,
.controls,
.dur-pick,
.sit-stack .dur-pick,
.top-actions,
.topbar,
.topbar .btn,
.cabin-bottom-band,
footer,
.footer-line {
 position: relative;
 z-index: 30;
}

@media (max-width: 480px) {
 /* mobile-only: topbar safe-area (float cat already hidden all widths) */

 /* 390: topbar ≥8px (safe-area ok) */
 .topbar {
 padding-top: max(8px, env(safe-area-inset-top, 0px));
 }

 /* footer / 禅语 column clear of former cat zone */
 footer,
 .footer-line,
 .cabin-bottom-band {
 padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
 }
}

/* light multi-width polish: 360–430 no horizontal overflow on tip/qa/share */
@media (max-width: 430px) {
 .claw-tip,
 .claw-box,
 #zen-qa,
 .zen-qa,
 .wish-share-panel,
 .result-wish-share,
 #result-share,
 #wish-share-panel {
 max-width: 100%;
 box-sizing: border-box;
 overflow-x: hidden;
 }
 .zen-qa-row,
 .claw-amts,
 .tip-rails,
 .wish-share-btns,
 .share-lang {
 max-width: 100%;
 min-width: 0;
 box-sizing: border-box;
 }
 .zen-qa-row input,
 #zen-qa-input {
 min-width: 0;
 flex: 1 1 auto;
 }
}


/* t958u — paywall fail sticky above actions (first screen, not below fold) */
.paywall-fail-sticky,
#paywall-fail.paywall-fail-sticky {
 margin: 0;
 padding: 10px 12px;
 border-radius: 8px;
 background: rgba(180, 60, 60, 0.22);
 border: 1px solid rgba(220, 100, 100, 0.55);
 color: #ffc9c9;
 font-size: 0.9rem;
 font-weight: 700;
 flex: 0 0 auto;
 order: 0;
}
#paywall-modal .paywall-layout,
#paywall-modal .paywall-simple.paywall-layout {
 display: flex;
 flex-direction: column;
 min-height: 0;
}
#paywall-modal .paywall-fail-sticky:not([hidden]) {
 display: block;
 margin: 8px 12px 4px;
}

/* —— t955u cream/gold/ink 太极 ——
 brand-mark + #ring-core + sit-pill → media/taiji.png cream fish-eyes (gold #D0B078 / cream #F7E9CC / ink #0C1A22).
 Mobile = desktop for ring core. No ornate bagua. No purple/lilac.
 Halo rings + 無心/頓悟 kept.
 ≤480 hide float cat, payment 只查鏈, t947 lang kept. */


/* ============================================================
   t966u — Safari / iOS P0 (2026-11-02 Australia/Sydney)
   SoftAgg ABSENT SoftGaming WAIT · 華語繁體 copy untouched
   1) halo CSS translate3d (above)
   2) share/cert font-smoothing + long-press img
   3) drawers 100svh + body lock + overflow-scrolling + pay safe-area
   4) amount inputs ≥16px + -webkit-appearance none
   5) ask reveal min-height/opacity; (JS) wish draft + tip busy
   ============================================================ */

/* 2) Share / cert card Safari text + long-press save */
.share-card-visual,
.share-card-img,
.nft-cert-qr-wrap,
.nft-cert-qr,
.wish-share-panel,
.result-wish-share,
#result-share,
#wish-share-panel {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.share-card-img,
.nft-cert-qr {
  -webkit-touch-callout: default !important;
  -webkit-user-select: auto !important;
  user-select: auto !important;
  pointer-events: auto;
  touch-action: manipulation;
}
.share-card-img:not([hidden]) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 3) Drawers: 100svh preferred; body lock already .ycc-modal-lock */
dialog[open],
#paywall-modal[open],
#wish-modal[open],
#ledger-modal[open],
#agent-modal[open] {
  max-height: calc(100svh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
#paywall-modal .paywall-scroll,
#wish-modal,
#wish-modal .wish-list,
#ledger-modal .ledger-body,
.ledger-body {
  -webkit-overflow-scrolling: touch;
}
/* t973u: neutralized t966u touch-action:none — never kill pan on body */
body.ycc.ycc-modal-lock {
  overflow: hidden !important;
  position: relative;
  overscroll-behavior: none;
  touch-action: pan-y !important;
}
/* pay buttons safe-area */
#paywall-modal .paywall-actions,
#paywall-modal .paywall-actions-bar,
#paywall-modal .btn.seal,
#paywall-paid {
  padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
}
#paywall-modal .paywall-actions,
#paywall-modal .paywall-actions-bar {
  padding: 10px 2px max(12px, calc(10px + env(safe-area-inset-bottom, 0px))) !important;
}

/* 4) Amount / text inputs: ≥16px prevents iOS focus zoom; kill native spin */
.claw-custom-input,
#tip-custom,
#wish-text,
.zen-qa-row input,
#zen-qa-input,
#zen-mascot-input,
input[type="number"].claw-custom-input,
textarea#wish-text {
  font-size: 16px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
input[type="number"].claw-custom-input::-webkit-outer-spin-button,
input[type="number"].claw-custom-input::-webkit-inner-spin-button,
#tip-custom::-webkit-outer-spin-button,
#tip-custom::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 5) Ask answer reveal */
.zen-qa-out {
  min-height: 2.75rem;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.zen-qa-out:not([hidden]) {
  opacity: 1;
}
.zen-qa-out[hidden] {
  display: none !important;
  opacity: 0;
}

/* ============================================================
   t967u — round6 iPhone 16 Pro / 華語 safe-area + svh elastic scroll
   SoftAgg ABSENT SoftGaming WAIT · 華語繁體 copy untouched
   Map to REAL YCC class names only (no invented iphone16pro-* selectors)
   1) 100svh container (.app / html,body.ycc)
   2) overscroll-behavior contain (kill elastic rubber-band)
   3) safe-area-inset top/bottom spacers (body.ycc + .app)
   4) drawer overlay 100svh + sticky .paywall-actions safe-area
   5) input ≥16px (all cabin inputs)
   6) island spacer (.topbar clearance under Dynamic Island)
   ============================================================ */

/* 1) 100svh container */
html,
body.ycc {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}
.app {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  box-sizing: border-box;
}

/* 2) t973u: do NOT contain overscroll on html/body/.app/.stage — that traps WebView pan.
   Keep contain only on inner drawer scrollers. */
html,
body,
body.ycc {
  overscroll-behavior: auto;
  overscroll-behavior-y: auto;
}
.app,
.stage,
.machine.cabin,
.cabin-bottom-band {
  overscroll-behavior: auto;
  overscroll-behavior-y: auto;
}
.paywall-scroll,
.ledger-body,
#wish-modal .wish-list {
  overscroll-behavior: contain;
}

/* 3) safe-area-inset top/bottom spacers (real body.ycc / .app) */
body.ycc {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.app {
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  padding-bottom: max(28px, calc(16px + env(safe-area-inset-bottom, 0px)));
}

/* 6) island spacer — .topbar clears Dynamic Island; do NOT re-add full safe-area
   (body.ycc already owns inset-top). Extra 8–12px breathing under island. */
.topbar {
  padding-top: max(8px, 0px);
  margin-top: 0;
}
@media (max-width: 480px) {
  .topbar {
    /* override earlier ≤480 rule that double-applied safe-area-inset-top */
    padding-top: 10px;
  }
  .cabin-bottom-band,
  footer,
  .footer-line {
    padding-bottom: max(16px, calc(12px + env(safe-area-inset-bottom, 0px)));
  }
}

/* 4) drawer overlay 100svh + sticky action group with safe-area padding */
dialog[open],
#paywall-modal[open],
#wish-modal[open],
#ledger-modal[open],
#agent-modal[open],
#wallet-modal[open],
#member-modal[open] {
  height: auto;
  max-height: 100svh;
  max-height: 100dvh;
  max-height: calc(100svh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
#paywall-modal[open] {
  /* prefer full visible frame on iPhone 16 Pro */
  max-height: 100svh;
  max-height: 100dvh;
}
#paywall-modal .paywall-actions,
#paywall-modal .paywall-actions-bar,
.paywall-actions.member-actions,
#wallet-modal .paywall-actions,
#member-modal .paywall-actions,
#agent-modal .paywall-actions {
  position: sticky;
  bottom: 0;
  z-index: 6;
  padding-bottom: max(12px, calc(10px + env(safe-area-inset-bottom, 0px))) !important;
  padding-left: max(2px, env(safe-area-inset-left, 0px));
  padding-right: max(2px, env(safe-area-inset-right, 0px));
  background: var(--bg-2, #12262f);
}

/* 5) input ≥16px — all cabin text fields (iOS focus-zoom guard) */
.app input,
.app textarea,
.app select,
.claw-custom-input,
#tip-custom,
#wish-text,
#wallet-input,
.paywall-addr,
.zen-qa-row input,
#zen-qa-input,
#zen-mascot-input,
input[type="text"],
input[type="number"],
input[type="search"],
input[type="email"],
input[type="tel"],
textarea {
  font-size: 16px !important;
}


/* ============================================================
   t968u — P1 after t967u 试玩官 (2026-11-02 Australia/Sydney)
   SoftAgg ABSENT SoftGaming WAIT · tip/mint untouched
   1) Safari floating toolbar: more bottom safe padding for 問禪艙
   2) Paywall/ledger 關閉 raised above home indicator
   3) Halo float text must not cover countdown capsule
   ============================================================ */

/* 1) 16 Pro Safari floating toolbar — 問禪艙 / cabin bottom need room
   t967u max(28px) was too tight under the ~44–50px Safari chrome. */
.app {
  padding-bottom: max(96px, calc(64px + env(safe-area-inset-bottom, 0px))) !important;
}
@media (max-width: 480px) {
  .app {
    padding-bottom: max(128px, calc(88px + env(safe-area-inset-bottom, 0px))) !important;
  }
  .cabin-bottom-band,
  footer,
  .footer-line {
    padding-bottom: max(48px, calc(28px + env(safe-area-inset-bottom, 0px))) !important;
  }
  .breath-stage > .zen-qa,
  .zen-qa {
    margin-bottom: max(20px, env(safe-area-inset-bottom, 0px));
    padding-bottom: max(28px, calc(18px + env(safe-area-inset-bottom, 0px)));
  }
}

/* 2) Close / 關閉 sticky bar — raise above home indicator (was ~13px) */
#paywall-modal .paywall-actions,
#paywall-modal .paywall-actions-bar,
.paywall-actions.member-actions,
#wallet-modal .paywall-actions,
#member-modal .paywall-actions,
#agent-modal .paywall-actions,
#ledger-modal .paywall-actions,
#wish-modal .paywall-actions {
  padding-bottom: max(40px, calc(28px + env(safe-area-inset-bottom, 0px))) !important;
  padding-top: 12px;
}
#paywall-modal .paywall-scroll,
.paywall-scroll,
#ledger-modal .ledger-body,
.ledger-body {
  /* keep last rows clear of raised sticky close */
  padding-bottom: max(148px, calc(112px + env(safe-area-inset-bottom, 0px))) !important;
}

/* 3) Halo zen-bubbles — stay in upper ring band; never cover .timer capsule */
.zen-bubbles-stage {
  height: 44px !important;
  top: 2px !important;
  bottom: auto !important;
  z-index: 3;
  overflow: hidden; /* clip rise so bubbles cannot paint over countdown */
  pointer-events: none !important;
}
.zen-bubbles-stage .zen-bubble {
  bottom: 4px !important;
  z-index: 3;
  font-size: 0.72rem;
  padding: 3px 8px;
  animation-name: zenBubbleRiseStageT968 !important;
}
@keyframes zenBubbleRiseStageT968 {
  0% { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.86); }
  14% { opacity: 1; }
  70% { opacity: 0.92; }
  100% { opacity: 0; transform: translateX(calc(-50% + var(--drift, 0px))) translateY(-36px) scale(1); }
}
.sit-stack .timer,
.timer {
  position: relative;
  z-index: 8;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  padding: 2px 16px;
  border-radius: 999px;
  background: rgba(12, 26, 34, 0.78);
  box-shadow: 0 0 0 1px rgba(201, 168, 108, 0.18);
  isolation: isolate;
}
.sit-stack {
  position: relative;
  z-index: 4;
}
.sit-stack .cabin-ring {
  z-index: 2;
}

/* 4) Owner: landscape 16 Pro — cert card QR clear of Dynamic Island.
   On-screen row gets island/notch safe padding; export uses fixed square
   offscreen host in game.js (yccHtml2CanvasOffscreenSquare). */
@media (orientation: landscape) {
  .nft-preview,
  .nft-cert-row {
    padding-top: max(20px, calc(10px + env(safe-area-inset-top, 0px))) !important;
    padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
    box-sizing: border-box;
  }
  .nft-cert-qr-wrap {
    flex-shrink: 0;
    align-self: center;
  }
  .nft-cert-qr {
    width: 96px !important;
    height: 96px !important;
  }
  .share-card-visual {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-left: max(8px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }
  .share-card-img {
    width: min(42vh, 260px) !important;
    max-height: min(70vh, 360px);
    object-fit: contain;
  }
  #ycc-h2c-offscreen {
    /* host is position:fixed;left:-9999px from JS — keep square paint box */
    width: 512px !important;
    height: 512px !important;
    max-width: 512px !important;
    max-height: 512px !important;
    overflow: hidden !important;
  }
}


/* t971u — fingerprint copy wrap on narrow */
.paywall-verify-dust .vd-val,
.paywall-fp-wrap {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}
.paywall-fp-copy-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}
.paywall-fp-copy-row .paywall-addr,
.paywall-fp-copy-row textarea.paywall-addr {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
  resize: none;
}
.paywall-fp-copy-row #paywall-copy,
.paywall-fp-copy-row .btn {
  width: 100%;
  flex: 0 0 auto;
}
@media (max-width: 420px) {
  .paywall-verify-dust .vd-val,
  .paywall-fp-wrap {
    font-size: 0.78rem;
  }
  #paywall-modal .paywall-addr-row {
    flex-direction: column !important;
  }
}


/* ============================================================
   t972u — P0 scroll unlock + fingerprint wrap + (JS) 華語 chain labels
   SoftAgg ABSENT SoftGaming WAIT · 華語繁體 copy preserved
   Root cause: body.ycc-modal-lock + touch-action:none could stick after
   wish→paywall / dialog close races; t966u lock used touch-action:none
   which leaves iOS pan dead even after class remove in some cases.
   ============================================================ */

/* P0: page scroll always when no modal */
html,
body,
body.ycc,
body.ycc:not(.ycc-modal-lock) {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 100%;
  position: static !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}

/* Lock ONLY while a dialog is open — overflow hidden is enough; NO touch-action:none, NO position:fixed */
body.ycc.ycc-modal-lock {
  overflow: hidden !important;
  overscroll-behavior: none;
  /* keep pan-y so iOS does not permanently kill touch scrolling after unlock */
  touch-action: pan-y !important;
  position: static !important;
  height: auto !important;
  max-height: none !important;
  width: auto !important;
}

/* Fingerprint / dust: never mid-break 「非手續費」; wrap only at spaces/separators */
.paywall-verify-dust .vd-val,
.paywall-fp-wrap {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word; /* was anywhere — broke 非手續／費）） */
  word-break: keep-all;
  line-break: strict;
  line-height: 1.45;
}
.paywall-verify-dust .vd-amt,
.paywall-verify-dust .vd-atom {
  overflow-wrap: anywhere; /* long decimals / atom ints may wrap */
  word-break: break-word;
}
.paywall-verify-dust .vd-note,
.paywall-verify-dust .vd-fee {
  white-space: nowrap; /* keep 非手續費 / 發票指紋 unbroken */
  display: inline;
}
.paywall-verify-dust .vd-sep {
  white-space: nowrap;
}
/* addresses still may break; dust note must not use break-all */
.paywall-fp-copy-row .paywall-addr,
.paywall-fp-copy-row textarea.paywall-addr {
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* ============================================================
   t973u — P0 scroll GUARANTEE (owner pt1277u 滑不动)
   SoftAgg ABSENT SoftGaming WAIT · 華語繁體 copy untouched
   Root cause vs t972u:
     1) leftover t966u touch-action:none still in cascade
     2) t967u overscroll-behavior:contain on html/body/.app trapped iOS/WebView pan
     3) no interval safety — race after 300ms could re-stick lock
     4) document scroll alone unreliable in mobile WebView/Safari; need .app scroll root
     5) stray } after .zen-whiskers-panel (L708) — CSS recovery risk
   ============================================================ */

/* CSS-only unlock when no dialog[open] — does not depend on JS class */
html:not(:has(dialog[open])) body.ycc,
body.ycc:not(:has(dialog[open])),
body.ycc:not(.ycc-modal-lock) {
  overflow-x: hidden !important;
  overflow-y: hidden !important; /* scroll moves to .app root */
  height: 100% !important;
  max-height: 100dvh !important;
  max-height: 100svh !important;
  position: static !important;
  touch-action: pan-y !important;
  overscroll-behavior: auto !important;
  overscroll-behavior-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

html:not(:has(dialog[open])),
html {
  height: 100% !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: auto !important;
}

/* Scrollable root = .app (and .stage fallback) — WebView/Safari safe */
html:not(:has(dialog[open])) body.ycc .app,
body.ycc:not(:has(dialog[open])) .app,
body.ycc:not(.ycc-modal-lock) .app {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: auto !important;
  max-height: 100% !important;
  max-height: 100dvh !important;
  max-height: 100svh !important;
  height: 100% !important;
  min-height: 0 !important;
  overscroll-behavior: auto !important;
}
/* .stage grows with content inside .app — do NOT nest a second 100dvh scroller */
body.ycc:not(.ycc-modal-lock) .stage,
body.ycc:not(:has(dialog[open])) .stage {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  touch-action: pan-y !important;
}

/* When a dialog IS open: freeze .app background scroll; dialog top-layer scrolls itself */
html:has(dialog[open]) body.ycc,
body.ycc:has(dialog[open]),
body.ycc.ycc-modal-lock {
  overflow: hidden !important;
  touch-action: pan-y !important; /* NEVER none */
  position: static !important;
  height: 100% !important;
  max-height: 100dvh !important;
}
html:has(dialog[open]) body.ycc .app,
body.ycc:has(dialog[open]) .app,
body.ycc.ycc-modal-lock .app {
  overflow: hidden !important;
  touch-action: pan-y !important;
}

/* Closed dialogs never intercept */
dialog:not([open]) {
  display: none !important;
  pointer-events: none !important;
}
