/* =========================================================
   小创游乐园 · 游乐园集章手账
   一本摊开的手账：暖纸底、模切贴纸、圆形墨章、撕下的票根。
   ========================================================= */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./assets/fredoka-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* 纸 */
  --paper: #fff7e6;
  --paper-2: #fdeccb;
  --paper-3: #f6dca8;
  --white: #fffdf8;
  --line: rgba(43, 45, 66, 0.14);
  --line-strong: rgba(43, 45, 66, 0.28);
  /* 墨 */
  --ink: #2b2d42;
  --ink-2: #4a4d6d;
  --ink-3: #5f6280;
  /* 贴纸色 */
  --poppy: #ff6b6b;
  --poppy-deep: #e04e4e;
  --stamp: #cc3a38;
  --poppy-ink: #b32f2f;
  --poppy-tint: #ffe1e1;
  --sun: #ffd166;
  --sun-deep: #f0b62f;
  --sun-ink: #7d5200;
  --sun-tint: #fff1c7;
  --sky: #4d96ff;
  --sky-deep: #2a66c4;
  --sky-ink: #1d56b8;
  --sky-tint: #dbe8ff;
  --mint: #7bd389;
  --mint-ink: #1f7a3a;
  --mint-tint: #ddf5e2;
  --gold: #f4b400;
  /* 语义 */
  --park-red: var(--poppy);
  --park-blue: var(--sky);
  --park-gold: var(--gold);
  --text-main: var(--ink);
  --text-body: var(--ink-2);
  --text-dim: var(--ink-3);
  --focus: var(--sky-deep);
  /* 形 */
  --r-sticker: 22px;
  --r-card: 16px;
  --r-pill: 999px;
  --cut: 0 0 0 3px var(--white);
  --lift: 0 10px 18px -12px rgba(43, 45, 66, 0.38);
  --lift-lg: 0 18px 30px -18px rgba(43, 45, 66, 0.45);
  --font-display: 'Fredoka', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
  --font-sans: 'Fredoka', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t-mid: 240ms;
  --top-height: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-body);
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.17 0 0 0 0 0.18 0 0 0 0 0.26 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; color: var(--text-main); font-family: var(--font-display); font-weight: 600; line-height: 1.25; text-wrap: balance; }
p { margin: 0; }
small { font-size: 0.85em; }
strong { font-weight: 600; color: var(--text-main); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
input, select { font: inherit; color: var(--text-main); }
a { color: var(--sky-ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
* { scrollbar-width: thin; scrollbar-color: var(--paper-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--paper-3); border-radius: 999px; border: 3px solid var(--paper); }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.icon { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: -0.28em; fill: none; stroke: currentColor; flex: none; }
.num-font, .font-num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 12px; }
.skip-link:focus { top: 12px; }

/* ---------- 贴纸与票根：共享原语 ---------- */
.game-screen, .drawer-card, .rail-section, .rail-header-card, .stat-pill, .settlement-summary-card,
.dialog-box, .broke-card, .stamp-card {
  background: var(--white);
  border-radius: var(--r-sticker);
  box-shadow: var(--cut), var(--lift);
}
.drawer-card, .rail-section, .rail-header-card {
  border-radius: var(--r-card);
}
/* 卡片里的条目是手账的行，不是再套一层卡 */
.inventory-item, .shop-item, .loan-card-item, .rail-quick-wheel-card { background: transparent; border-radius: 0; box-shadow: none; border-top: 1.5px dashed var(--line-strong); }
.inventory-item:first-child, .shop-item:first-child, .loan-card-item:first-child { border-top: 0; }

/* 圆形墨章 */
.stamp-mark {
  display: inline-grid; place-items: center;
  width: 2.6em; height: 2.6em; border-radius: 50%;
  border: 3px solid var(--poppy); color: var(--poppy-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 0.8em; line-height: 1;
  transform: rotate(-9deg);
  box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 3.5px var(--poppy);
  background: var(--white);
}

/* 主按钮：一枚红章 */
.primary {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px;
  background: var(--stamp); color: var(--white);
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.06em;
  border-radius: 16px;
  box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.22), 0 0 0 3px var(--white), 0 8px 14px -10px rgba(43, 45, 66, 0.5);
  transform: rotate(-2deg);
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast), box-shadow var(--t-fast);
}
.primary::after {
  content: ''; position: absolute; inset: 4px; border-radius: 12px;
  border: solid rgba(255, 255, 255, 0.78); border-width: 3px 2px 4px 3px; pointer-events: none;
}
.primary:hover { background: #b83231; transform: rotate(-1deg) translateY(-1px); }
.primary:active { transform: scale(0.96) rotate(-3deg); }
.primary:disabled { background: var(--paper-3); color: var(--ink-3); box-shadow: var(--cut); transform: none; }
.primary:disabled::after { border-color: rgba(43, 45, 66, 0.25); }

.secondary, .text-btn, .quick-val-btn, .nav-extra-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 14px;
  background: var(--white); color: var(--ink-2);
  border: 1.5px solid var(--line-strong); border-radius: 12px;
  font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out), border-color var(--t-fast);
}
.secondary:hover, .text-btn:hover, .quick-val-btn:hover, .nav-extra-btn:hover { background: var(--sun-tint); color: var(--ink); border-color: var(--sun-deep); }
.secondary:active, .text-btn:active, .quick-val-btn:active { transform: scale(0.97); }
.text-btn { border-color: transparent; background: transparent; padding-inline: 10px; }
.text-btn:hover { border-color: var(--line-strong); }

/* ---------- 顶栏：手账封面条 ---------- */
.park-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--top-height); padding: 8px 16px;
  background: var(--sun-tint);
  border-bottom: 2px dashed var(--sun-deep);
  backdrop-filter: blur(6px);
}
.brand-zone { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none;
  padding: 6px 12px 6px 8px; background: var(--white); border-radius: 14px;
  box-shadow: var(--cut), var(--lift);
  transform: rotate(-2deg);
  white-space: nowrap;
}
.brand span { color: var(--poppy-ink); }
.brand-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--ink); }
.brand-icon .icon { width: 20px; height: 20px; vertical-align: 0; }
.group-tag {
  display: inline-block; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 5px 14px; font-size: 0.8rem; font-weight: 700; color: var(--ink);
  background: repeating-linear-gradient(-45deg, rgba(255, 209, 102, 0.95) 0 5px, rgba(255, 241, 199, 0.95) 5px 10px);
  mix-blend-mode: multiply; clip-path: polygon(0 14%, 3% 0, 96% 3%, 100% 16%, 98% 86%, 100% 100%, 4% 96%, 1% 82%); transform: rotate(-2deg);
}
.group-switcher-wrap { display: inline-flex; }
.group-switcher {
  min-height: 36px; padding: 4px 30px 4px 10px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--white);
  appearance: none; font-weight: 600; font-size: 0.85rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%232b2d42' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 16px;
}
.connection-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 0.75rem; font-weight: 600; background: var(--mint-tint); color: var(--mint-ink); border: 1.5px solid transparent;
}
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint-ink); }
.connection-badge.reconnecting { background: var(--sun-tint); color: var(--sun-ink); }
.connection-badge.reconnecting .conn-dot { background: var(--sun-deep); animation: pulse 1s infinite; }
.connection-badge.offline { background: var(--poppy-tint); color: var(--poppy-ink); border-style: dashed; border-color: var(--poppy); }
.connection-badge.offline .conn-dot { background: var(--poppy-ink); }
@keyframes pulse { 50% { opacity: 0.35; } }

.top-actions { display: flex; align-items: center; gap: 10px; }
.stats-group { display: flex; gap: 8px; }
.stat-pill { position: relative; display: flex; align-items: center; padding: 6px 14px 6px 18px; border-radius: 6px 12px 12px 6px; }
.stat-pill::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; border-left: 2px dashed var(--line-strong); }
.stat-val { white-space: nowrap; }
.stat-meta { display: flex; flex-direction: column; line-height: 1.15; }
.stat-label { font-size: 0.74rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
.stat-val { font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.points-pill { background: var(--sun-tint); }
.points-pill .stat-val { color: var(--sun-ink); }
.advance-pill .stat-val { font-size: 0.85rem; color: var(--sky-ink); font-weight: 600; }

.drawer-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px;
  background: var(--sky-deep); color: var(--white); border-radius: 14px; font-weight: 600;
  box-shadow: 0 0 0 3px var(--white), 0 8px 14px -10px rgba(43, 45, 66, 0.5);
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast);
}
.drawer-btn:hover { background: #1f57ad; transform: translateY(-1px); }
.drawer-btn .icon { width: 20px; height: 20px; }
.badge-dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--poppy); box-shadow: 0 0 0 2px var(--white); }
.badge-count { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--stamp); color: var(--white); font-size: 0.75rem; font-weight: 700; box-shadow: 0 0 0 2px var(--white); }
.profile-zone { display: flex; align-items: center; }
.user-name { padding: 6px 12px; background: var(--white); border-radius: 10px; border: 1.5px solid var(--line-strong); font-weight: 600; color: var(--ink); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-btn { min-height: 40px; padding: 8px 14px; border-radius: 12px; background: var(--ink); color: var(--white); font-weight: 600; }
.auth-btn:hover { background: var(--ink-2); }

/* ---------- 通知条 ---------- */
.anon-notice { padding: 10px 16px; background: var(--sun-tint); border-bottom: 1.5px solid var(--sun-deep); }
.anon-content { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 12px; font-size: 0.9rem; color: var(--sun-ink); }
.anon-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sun); color: var(--ink); flex: none; }
.anon-text { flex: 1; min-width: 0; }
.anon-text strong { color: var(--ink); }
.anon-actions { display: flex; gap: 4px; }
.slow-hint { padding: 6px 16px; text-align: center; font-size: 0.85rem; color: var(--sun-ink); background: var(--sun-tint); }
.network-retry-box {
  position: sticky; top: var(--top-height); z-index: 39;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
  background: var(--poppy-tint); color: var(--poppy-ink); border-bottom: 2px dashed var(--poppy);
}
.retry-content { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.retry-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--stamp); color: var(--white); }
.retry-btn { min-height: 40px; padding: 8px 16px; }

/* ---------- 布局：摊开的两页 ---------- */
.park-layout {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  max-width: 1360px; margin: 0 auto; padding: 16px 16px 40px;
}
@media (min-width: 900px) { .park-layout { grid-template-columns: 180px minmax(0, 1fr); } .park-social-rail { grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .park-social-rail .rail-header-card { grid-column: 1 / -1; } }
@media (min-width: 1180px) { .park-layout { grid-template-columns: 190px minmax(0, 1fr) 320px; gap: 20px; padding: 24px 24px 56px; } }

/* 左：机器贴纸页签 */
.park-left-nav, .park-main, .park-social-rail { min-width: 0; }
.park-left-nav { display: flex; flex-direction: column; gap: 12px; }
.nav-tabs { display: flex; gap: 10px; overflow-x: auto; min-width: 0; padding: 6px 2px 10px; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .nav-tabs { flex-direction: column; overflow: visible; padding: 4px; position: sticky; top: calc(var(--top-height) + 12px); } }
.game-nav-tab {
  display: flex; align-items: center; gap: 10px; flex: none;
  min-height: 56px; padding: 8px 12px; text-align: left;
  background: var(--white); border-radius: 16px;
  box-shadow: var(--cut), var(--lift);
  color: var(--ink-2);
  transition: transform var(--t-mid) var(--ease-out), border-color var(--t-fast), background var(--t-fast);
}
.game-nav-tab:hover { transform: translateY(-2px) rotate(-1deg); }
.game-nav-tab.active { background: var(--sun-tint); box-shadow: var(--cut), 0 0 0 5px var(--sun-deep), var(--lift); color: var(--ink); transform: rotate(-1.5deg) translateX(2px); }
.game-nav-tab.active .nav-icon { background: var(--stamp); color: var(--white); }
.nav-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--paper-2); color: var(--ink); flex: none; }
.nav-icon .icon { width: 20px; height: 20px; vertical-align: 0; }
.nav-info { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.nav-title { font-weight: 600; font-size: 0.95rem; color: inherit; }
.nav-sub { font-size: 0.75rem; color: var(--ink-3); }
.nav-bottom { display: none; }
@media (min-width: 900px) { .nav-bottom { display: block; } .nav-extra-btn { width: 100%; justify-content: flex-start; } }

/* 中：机器页 */
.park-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stage-container { min-width: 0; }

/* 集章卡 */
.stamp-card { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'head btn' 'marks btn'; gap: 8px 18px; align-items: center; padding: 14px 18px; border-radius: var(--r-card); transform: rotate(-0.6deg); }
.tape, .stamp-card::before, .game-screen::before, .rail-header-card::before, .rail-note::before, .rail-slips::before, .drawer-card:nth-child(2n)::before { content: ''; position: absolute; top: -13px; width: 98px; height: 24px; pointer-events: none; mix-blend-mode: multiply; opacity: 0.9; clip-path: polygon(0 14%, 3% 0, 96% 3%, 100% 16%, 98% 86%, 100% 100%, 4% 96%, 1% 82%); }
.stamp-card::before { left: -8px; transform: rotate(-5deg); background: repeating-linear-gradient(-45deg, rgba(77, 150, 255, 0.5) 0 6px, rgba(77, 150, 255, 0.28) 6px 12px); }
.stamp-card-head { grid-area: head; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.stamp-card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.stamp-card-text { font-size: 0.82rem; color: var(--ink-3); }
.stamp-marks { grid-area: marks; display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.stamp-marks li { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(204, 58, 56, 0.4); display: grid; place-items: center; color: rgba(204, 58, 56, 0.6); font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; transform: rotate(-8deg); }
.stamp-marks li.done { border: 3px solid var(--poppy); color: var(--poppy-ink); box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 3.5px var(--poppy); transform: rotate(-9deg); }
.stamp-marks li.today { border: 2px dashed var(--stamp); background: var(--sun-tint); color: var(--stamp); animation: inkPending 1.6s ease-in-out infinite; }
@keyframes inkPending { 50% { transform: rotate(-8deg) scale(1.1); } }
.stamp-btn { grid-area: btn; width: 88px; height: 88px; padding: 0; border-radius: 50%; background: var(--stamp); color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.2; white-space: nowrap; align-self: center; box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 5px rgba(255, 255, 255, 0.75), inset 0 3px 14px rgba(0, 0, 0, 0.22), 0 0 0 3px var(--white), var(--lift); transform: rotate(-7deg); transition: transform var(--t-fast) var(--ease-out), background var(--t-fast); }
.stamp-btn:hover { background: #b83231; }
.stamp-btn:active { transform: scale(0.94) rotate(-10deg); }
.stamp-btn.done { background: var(--paper-2); color: var(--ink-3); box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 5px var(--line-strong), 0 0 0 3px var(--white); transform: rotate(-4deg); }

/* 机器贴纸卡 */
.game-screen { position: relative; padding: 18px 18px 22px; }
.game-screen.active { display: block; }
.game-screen::before { right: -8px; transform: rotate(4deg); background: repeating-linear-gradient(-45deg, rgba(255, 107, 107, 0.5) 0 6px, rgba(255, 107, 107, 0.28) 6px 12px); }
.screen-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.title-wrap { min-width: 0; }
.screen-title { font-size: 1.75rem; font-weight: 700; }
.screen-desc { margin-top: 4px; font-size: 0.85rem; color: var(--ink-3); }
.screen-desc strong { color: var(--poppy-ink); }

/* ---------- 星星转轮 ---------- */
.stars-machine { display: flex; flex-direction: column; gap: 14px; }
.stars-window {
  position: relative; padding: 18px 16px 22px;
  background: var(--sun); border-radius: 26px;
  box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 6px var(--sun-deep), 0 12px 24px -16px rgba(43, 45, 66, 0.45);
}
.stars-reels { display: flex; justify-content: center; align-items: center; gap: 10px; }
.reel-frame {
  width: min(28%, 128px); height: 120px; overflow: hidden;
  background: var(--white); border-radius: 18px; border: 3px solid var(--sun-deep);
  box-shadow: inset 0 10px 16px -12px rgba(43, 45, 66, 0.4), inset 0 -10px 16px -12px rgba(43, 45, 66, 0.4);
  flex: 1 1 0;
}
.reel-strip { will-change: transform; }
.reel-symbol { height: 120px; display: grid; place-items: center; }
.reel-symbol svg, .reel-svg { width: 72px; height: 72px; }
.reel-separator { width: 4px; height: 100px; border-radius: 2px; background: rgba(125, 82, 0, 0.25); }
.payline-indicator { position: absolute; left: 6px; right: 6px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; pointer-events: none; }
.payline-bar { flex: 1; height: 0; border-top: 3px dashed rgba(224, 78, 78, 0.55); }
.payline-marker { width: 12px; height: 16px; background: var(--stamp); }
.payline-marker.left { clip-path: polygon(0 0, 100% 50%, 0 100%); }
.payline-marker.right { clip-path: polygon(100% 0, 0 50%, 100% 100%); }

.outcome-panel { padding: 12px 16px; text-align: center; background: var(--paper-2); border-radius: 14px; }
.outcome-content { display: flex; flex-direction: column; gap: 2px; }
.outcome-status { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.outcome-details { font-size: 0.85rem; color: var(--ink-3); }
.outcome-panel.win { background: var(--sun-tint); border-color: var(--sun-deep); }
.outcome-panel.lose { background: var(--paper-2); }

/* 结算贴纸 */
.settlement-summary-card { padding: 14px 16px; border-radius: var(--r-card); transform-origin: 50% 20%; transform: rotate(-1.2deg); }
.settlement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.settle-item { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.2; }
.settle-label { font-size: 0.75rem; color: var(--ink-3); }
.settle-val { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.settle-val.positive { color: var(--mint-ink); }
.settle-val.negative { color: var(--poppy-ink); }

/* ---------- 幸运转盘 ---------- */
.wheel-stage-wrap { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.wheel-history-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.82rem; color: var(--ink-3); }
.history-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.hpill { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--white); font-weight: 700; font-size: 0.78rem; font-family: var(--font-display); }
.hpill.red { background: var(--stamp); }
.hpill.blue { background: var(--sky-deep); }
.hpill.gold { background: var(--gold); color: var(--ink); }
.wheel-visual-box, .table-wheel-disc-wrap { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto; }
.wheel-pointer-arrow, .table-wheel-pointer {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 28px; height: 30px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 3px 0 var(--white));
}
.wheel-disc, .table-wheel-disc { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 6px var(--white), 0 0 0 8px var(--ink), var(--lift-lg); background: var(--white); will-change: transform; }
.wheel-svg { display: block; width: 100%; height: 100%; border-radius: 50%; }
.wheel-center-badge, .table-wheel-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 24%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 5px var(--sun);
}
.center-num, .table-wheel-center span { font-family: var(--font-display); font-weight: 700; font-size: clamp(1rem, 6vw, 1.6rem); color: var(--ink); }

.color-choices-area { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.color-choice-btn {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 64px; padding: 10px 12px;
  background: var(--white); border: 2px solid transparent; border-radius: 14px; text-align: left; box-shadow: var(--cut), var(--lift);
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast), background var(--t-fast);
}
.color-choice-btn:hover { transform: translateY(-2px); }
.color-choice-btn.active { border-color: var(--ink); transform: rotate(-1.5deg); }
.color-choice-btn.pick-red.active { background: var(--poppy-tint); }
.color-choice-btn.pick-blue.active { background: var(--sky-tint); }
.color-choice-btn.pick-gold.active { background: var(--sun-tint); }
.choice-swatch { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 2px var(--white), 0 0 0 3.5px var(--ink); }
.swatch-red { background: var(--poppy); }
.swatch-blue { background: var(--sky); }
.swatch-gold { background: var(--gold); }
.choice-info { display: flex; flex-direction: column; line-height: 1.2; }
.choice-name { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.choice-mult-tag, .choice-info small { font-size: 0.74rem; color: var(--ink-3); }
.choice-active-mark { position: absolute; top: 8px; right: 8px; font-size: 0.74rem; font-weight: 700; color: var(--poppy-ink); border: 2px solid var(--poppy); border-radius: 999px; padding: 1px 7px; transform: rotate(6deg); display: none; }
.color-choice-btn.active .choice-active-mark { display: inline-block; }

/* ---------- 凑 21 ---------- */
.twentyone-status-tag, .table-state-badge, .table-round-timer-badge, .rail-state-badge, .entries-count, .rail-pending-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill); font-size: 0.78rem; font-weight: 600; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.twentyone-arena { display: flex; flex-direction: column; gap: 12px; position: relative; }
.twentyone-area { padding: 12px 14px 14px; border-radius: var(--r-card); background: var(--paper-2); }
.player-area { background: var(--sky-tint); }
.area-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.role-title { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.rule-hint { font-size: 0.74rem; color: var(--ink-3); }
.player-meta { display: flex; align-items: center; gap: 10px; }
.score-tag { display: inline-grid; place-items: center; min-width: 40px; height: 32px; padding: 0 10px; border-radius: 999px; background: var(--ink); color: var(--white); font-family: var(--font-display); font-weight: 700; }
.cards-row { display: flex; gap: 8px; flex-wrap: wrap; min-height: 96px; align-items: center; }
.card-placeholder { font-size: 0.85rem; color: var(--ink-3); padding: 6px 2px; }

/* 扑克贴纸 */
.card-item {
  position: relative; width: 66px; height: 92px; border-radius: 10px; background: var(--white);
  box-shadow: var(--cut), 0 6px 10px -8px rgba(43, 45, 66, 0.5);
  display: flex; flex-direction: column; justify-content: space-between; padding: 6px 7px;
  font-family: var(--font-display); font-weight: 700; line-height: 1;
  transform-origin: 50% 100%;
}
.card-item .card-val { font-size: 1.3rem; }
.card-item .card-suit { font-size: 1.5rem; align-self: flex-end; }
.card-item.red-suit { color: var(--poppy-ink); }
.card-item.black-suit { color: var(--ink); }
.card-item.hole-card { background: repeating-linear-gradient(45deg, var(--sky) 0 6px, var(--sky-deep) 6px 12px); box-shadow: var(--cut), 0 6px 10px -8px rgba(43, 45, 66, 0.5); }
.card-item.hole-card::after { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--white); font-size: 1.6rem; text-shadow: 0 2px 0 var(--sky-ink); }
.card-item.dealt { animation: deal 420ms var(--ease-out) both; }
@keyframes deal { from { transform: translateY(-14px) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }

.twentyone-center-outcome { text-align: center; }
.twentyone-outcome-box { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 22px; border-radius: 16px; background: var(--sun-tint); border: 2px solid var(--sun-deep); transform: rotate(-1.5deg); }
.outcome-headline { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.outcome-subline { font-size: 0.85rem; color: var(--sun-ink); }

.twentyone-controls-bar, .table-my-controls { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding: 12px 0 0; border-top: 1.5px dashed var(--line-strong); }
.inplay-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-3); }
.inplay-badge { padding: 2px 10px; border-radius: 999px; background: var(--sun); color: var(--ink); font-weight: 600; font-size: 0.75rem; }
.inplay-prompt { color: var(--ink-2); }
.action-btns-group { display: flex; gap: 8px; flex-wrap: wrap; }
.stage-action-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; flex: 1 1 auto; justify-content: center;
  border-radius: 12px; font-weight: 600; border: 2px solid var(--ink); background: var(--white); color: var(--ink);
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast);
}
.stage-action-btn:hover { background: var(--sun-tint); transform: translateY(-1px); }
.stage-action-btn:active { transform: scale(0.97); }
.stage-action-btn.btn-hit { background: var(--mint-tint); border-color: var(--mint-ink); color: var(--mint-ink); }
.stage-action-btn.btn-stand { background: var(--poppy-tint); border-color: var(--poppy-ink); color: var(--poppy-ink); }
.stage-action-btn.btn-peek { border-style: dashed; }
.action-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; }
.action-icon .icon { width: 18px; height: 18px; vertical-align: 0; }

/* ---------- 群大转盘 ---------- */
.table-round-timer-badge { flex-direction: column; align-items: flex-end; gap: 0; padding: 6px 14px; border-radius: 14px; background: var(--sky-tint); color: var(--sky-ink); line-height: 1.15; }
.table-round-timer-badge strong { font-size: 1.15rem; color: var(--ink); }
.table-wheel-layout { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .table-wheel-layout { grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr); align-items: start; } }
.table-wheel-main { display: flex; flex-direction: column; gap: 14px; }
.table-wheel-picks { display: flex; flex-direction: column; gap: 10px; }
.table-wheel-status-bar { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-3); }
.table-wheel-status-bar strong { color: var(--ink); }
.my-entry-status-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--mint-tint); color: var(--mint-ink); font-weight: 600; border-radius: var(--r-card); }
.status-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--mint-ink); color: var(--white); }
.status-icon .icon { width: 16px; height: 16px; vertical-align: 0; }
.table-wheel-entries-panel { padding: 4px 0 0; }
.entries-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.entries-title { font-size: 1.05rem; }
.entries-list { display: flex; flex-direction: column; }
.entry-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1.5px dashed var(--line); }
.entry-row:last-child { border-bottom: 0; }
.entry-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
.entry-wager { color: var(--ink-3); font-size: 0.85rem; }
.empty-entry, .empty-state, .empty-tables, .rail-empty-state, .empty-td { padding: 14px 8px; text-align: center; color: var(--ink-3); font-size: 0.88rem; }
.choice-tag { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 4px 12px; border-radius: 10px; font-weight: 600; font-size: 0.82rem; color: var(--white); box-shadow: var(--cut), 0 4px 8px -6px rgba(43, 45, 66, 0.45); transition: transform var(--t-fast) var(--ease-out); }
.rq-actions .choice-tag:nth-child(odd) { transform: rotate(-2deg); }
.rq-actions .choice-tag:nth-child(even) { transform: rotate(2deg); }
.choice-tag:hover { transform: translateY(-2px); }
.choice-tag.tag-red { background: var(--stamp); }
.choice-tag.tag-blue { background: var(--sky-deep); }
.choice-tag.tag-gold { background: var(--gold); color: var(--ink); }

/* ---------- 凑 21 桌 ---------- */
.table-lobby-panel { padding: 4px 0 0; display: flex; flex-direction: column; gap: 14px; }
.lobby-actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.join-by-code-group { display: flex; gap: 6px; }
.join-by-code-group input { width: 110px; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--white); font-family: var(--font-display); font-weight: 600; letter-spacing: 0.15em; text-align: center; }
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.table-summary-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--paper-2); border-radius: var(--r-card); }
.tsc-header { display: flex; justify-content: space-between; align-items: center; }
.tsc-code { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.12em; color: var(--ink); }
.tsc-state { font-size: 0.75rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.tsc-state.playing { background: var(--mint-tint); color: var(--mint-ink); }
.tsc-host { font-size: 0.85rem; color: var(--ink-3); }
.tsc-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink-2); }
.table-active-arena { padding: 4px 0 0; display: flex; flex-direction: column; gap: 14px; }
.table-arena-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.table-code-badge, .table-host-badge { font-size: 0.88rem; color: var(--ink-2); }
.table-code-badge strong { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0.12em; color: var(--ink); }
.table-timer-bar-wrap { display: flex; align-items: center; gap: 8px; flex: 1 1 160px; font-size: 0.78rem; color: var(--ink-3); }
.timer-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--paper-2); overflow: hidden; border: 1.5px solid var(--line); }
.timer-fill { height: 100%; background: var(--stamp); border-radius: 999px; }
.table-top-actions { display: flex; gap: 8px; margin-left: auto; }
.table-seats-fan { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.table-seat-card { padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--paper-2); border-radius: var(--r-card); }
.table-seat-card.my-seat { background: var(--sky-tint); }
.seat-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.seat-header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--ink-3); }
.seat-footer span { font-weight: 600; color: var(--ink-2); }
.seat-footer span.won { color: var(--mint-ink); }
.seat-footer span.lost { color: var(--poppy-ink); }

/* ---------- 票根控制台 ---------- */
.park-console {
  position: relative; margin-top: 4px; padding: 22px 18px 18px;
  background: var(--sky-tint); border-radius: 0 0 var(--r-sticker) var(--r-sticker);
  border-top: 2px dashed var(--line-strong);
  box-shadow: var(--cut), var(--lift);
  container-type: inline-size;
}
.park-console::before, .park-console::after { content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); }
.park-console::before { left: -9px; }
.park-console::after { right: -9px; }
.console-body { display: flex; flex-direction: column; gap: 14px; }
.amount-select-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-label, .input-label { font-size: 0.78rem; font-weight: 600; color: var(--ink-3); }
.amount-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.val-btn, .mult-btn {
  min-height: 40px; min-width: 44px; padding: 6px 12px; border-radius: 10px;
  background: var(--white); box-shadow: var(--cut), 0 4px 8px -6px rgba(43, 45, 66, 0.45); font-family: var(--font-display); font-weight: 600; color: var(--ink-2);
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast), color var(--t-fast);
}
.amount-buttons .val-btn:nth-child(odd), .mult-buttons-group .mult-btn:nth-child(odd) { transform: rotate(-1.5deg); }
.amount-buttons .val-btn:nth-child(even), .mult-buttons-group .mult-btn:nth-child(even) { transform: rotate(1.5deg); }
.val-btn:hover, .mult-btn:hover { transform: translateY(-2px); color: var(--ink); }
.val-btn.active, .mult-btn.active { background: var(--ink); color: var(--white); transform: rotate(-2deg) scale(1.05); box-shadow: var(--cut), 0 6px 10px -6px rgba(43, 45, 66, 0.6); }
.val-btn.max-btn { background: var(--sun-tint); color: var(--sun-ink); }
.inputs-and-math-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
@container (min-width: 640px) { .inputs-and-math-row { grid-template-columns: auto auto 1fr; grid-template-areas: 'stake mult items' 'math math cta'; align-items: end; } .stake-input-col { grid-area: stake; } .mult-select-col { grid-area: mult; } .items-toggle-col { grid-area: items; } .math-summary-col { grid-area: math; } .action-cta-col { grid-area: cta; } }
.stake-input-col, .mult-select-col, .items-toggle-col { display: flex; flex-direction: column; gap: 6px; }
.input-spinner-group { display: inline-flex; align-items: stretch; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); overflow: hidden; }
.input-spinner-group input { width: 110px; min-height: 44px; border: 0; background: transparent; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.spin-btn { width: 44px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); background: var(--paper-2); }
.spin-btn:hover { background: var(--sun); }
.mult-buttons-group { display: flex; gap: 6px; flex-wrap: wrap; }
.item-toggles-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.item-toggle-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px 4px 8px; border-radius: 999px; background: var(--white); border: 1.5px solid transparent; box-shadow: var(--cut); cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); transition: background var(--t-fast), border-color var(--t-fast); }
.item-toggle-pill:has(input:checked) { background: var(--sun-tint); border-color: var(--sun-deep); color: var(--ink); }
.item-toggle-pill input { width: 18px; height: 18px; accent-color: var(--poppy); margin: 0; }
.pill-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--paper-2); font-family: var(--font-display); font-size: 0.75rem; color: var(--ink-2); }
.item-retry-btn { min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--sky-deep); color: var(--white); font-weight: 600; }
.math-summary-col { padding: 10px 4px 2px; border-top: 1.5px dashed var(--line-strong); }
.math-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.math-item { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.2; }
.m-label { font-size: 0.74rem; color: var(--ink-3); }
.m-val { font-size: 1rem; font-weight: 700; color: var(--ink); }
.action-cta-col { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.primary-play-btn { min-height: 64px; font-size: 1.3rem; border-radius: 22px; letter-spacing: 0.1em; }
.primary-play-btn::after { border-radius: 16px; inset: 5px; }
.primary-play-btn .icon { width: 22px; height: 22px; }
.validation-msg { font-size: 0.82rem; color: var(--poppy-ink); font-weight: 600; }
@media (max-width: 480px) { .math-grid { grid-template-columns: repeat(2, 1fr); } .input-spinner-group { width: 100%; } .input-spinner-group input { flex: 1; } }

/* 页脚声明 */
.park-footer { padding: 14px 6px 0; }
.declaration-text { font-size: 0.8rem; line-height: 1.6; color: var(--ink-3); text-align: center; padding: 10px 14px; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: rgba(255, 253, 248, 0.6); }

/* ---------- 右页：群里的动静 ---------- */
.park-social-rail { display: flex; flex-direction: column; gap: 14px; }
.park-social-rail > * { width: 100%; }
@media (min-width: 1180px) { .park-social-rail { grid-column: 3; display: flex; align-items: stretch; position: sticky; top: calc(var(--top-height) + 12px); align-self: start; max-height: calc(100vh - var(--top-height) - 24px); overflow: auto; padding: 4px; } }
.rail-header-card { position: relative; padding: 14px 16px; }
.rail-header-card::before { left: -8px; transform: rotate(-6deg); background: repeating-linear-gradient(-45deg, rgba(123, 211, 137, 0.7) 0 6px, rgba(123, 211, 137, 0.4) 6px 12px); }
.rail-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-title { font-size: 1.3rem; }
.rail-desc { margin-top: 4px; font-size: 0.82rem; color: var(--ink-3); }
.rail-refresh-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--paper-2); color: var(--ink); transition: transform var(--t-mid) var(--ease-out); }
.rail-refresh-btn:hover { transform: rotate(90deg); }
.rail-refresh-btn .icon { width: 20px; height: 20px; vertical-align: 0; }
.rail-section { position: relative; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.rail-stub { background: var(--sky-tint); border-radius: 6px 14px 14px 6px; padding-left: 20px; transform: rotate(0.8deg); }
.rail-stub::after { content: ''; position: absolute; left: 8px; top: 10px; bottom: 10px; border-left: 2px dashed var(--line-strong); }
.rail-slips { transform: rotate(-0.7deg); }
.rail-slips::before { right: 14px; transform: rotate(3deg); background: repeating-linear-gradient(-45deg, rgba(255, 209, 102, 0.75) 0 6px, rgba(255, 209, 102, 0.45) 6px 12px); }
.rail-slips .rail-cards-list > * { position: relative; padding: 10px 12px 10px 18px; background: var(--paper-2); border-radius: 4px 12px 12px 4px; }
.rail-slips .rail-cards-list > *::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; border-left: 2px dashed var(--line-strong); }
.rail-sheet { background: var(--paper-2); transform: rotate(0.6deg); }
.rail-sheet .titles-pills-list { align-items: flex-start; }
.rail-sheet .titles-pills-list::after { content: ''; display: block; width: 100%; height: 62px; margin-top: 6px; border-radius: 8px; background-image: radial-gradient(circle at center, transparent 23px, rgba(43, 45, 66, 0.18) 24px, rgba(43, 45, 66, 0.18) 25px, transparent 26px); background-size: 62px 62px; background-position: 0 0; background-repeat: repeat-x; }
.rail-sheet .empty-title-tip { width: 100%; }
.rail-note { background: var(--sun-tint); transform: rotate(-1.2deg); background-image: repeating-linear-gradient(transparent 0 25px, rgba(43, 45, 66, 0.12) 25px 26px); background-position: 0 44px; }
.rail-note::before { left: 30%; transform: rotate(-2deg); background: repeating-linear-gradient(-45deg, rgba(255, 107, 107, 0.45) 0 6px, rgba(255, 107, 107, 0.25) 6px 12px); }
.rail-section-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-section-title { font-size: 1rem; }
.rail-quick-wheel-card { padding: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.rq-info { font-size: 0.85rem; color: var(--ink-2); }
.rq-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.rail-cards-list { display: flex; flex-direction: column; gap: 8px; }
.rail-pending-badge { background: var(--poppy-tint); color: var(--poppy-ink); }
.guarantee-actions { display: flex; gap: 6px; margin-top: 6px; }
.titles-pills-list { display: flex; flex-wrap: wrap; gap: 8px; }
.title-pill {
  display: inline-grid; place-items: center; min-width: 58px; height: 58px; padding: 6px; border-radius: 50%;
  border: 3px solid var(--sun-deep); background: var(--sun-tint); color: var(--sun-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 0.75rem; line-height: 1.15; text-align: center;
  box-shadow: var(--cut); transform: rotate(-6deg);
}
.title-pill:nth-child(2n) { transform: rotate(5deg); border-color: var(--poppy); background: var(--poppy-tint); color: var(--poppy-ink); }
.title-pill:nth-child(3n) { border-color: var(--sky); background: var(--sky-tint); color: var(--sky-ink); }
.empty-title-tip { font-size: 0.85rem; color: var(--ink-3); }

/* ---------- 抽屉：手账内页 ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(43, 45, 66, 0.35); backdrop-filter: blur(2px); }
.park-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(520px, 100%);
  display: flex; flex-direction: column; background: var(--paper); border-left: 2px dashed var(--line-strong);
  box-shadow: -20px 0 40px -30px rgba(43, 45, 66, 0.5);
  transform: translateX(104%); transition: transform var(--t-mid) var(--ease-out); visibility: hidden;
}
.park-drawer.open { transform: none; visibility: visible; }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 10px; }
.drawer-title { font-size: 1.55rem; }
.drawer-sub { margin-top: 2px; font-size: 0.8rem; color: var(--ink-3); }
.drawer-close-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--white); border: 1.5px solid var(--line-strong); color: var(--ink); }
.drawer-close-btn .icon { width: 20px; height: 20px; vertical-align: 0; }
.drawer-tabs { display: flex; gap: 6px; padding: 4px 18px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 2px solid var(--line-strong); }
.drawer-tabs::-webkit-scrollbar { display: none; }
.drawer-tab { flex: none; padding: 10px 14px 8px; border-radius: 12px 12px 0 0; border: 1.5px solid var(--line-strong); border-bottom: 0; background: var(--paper-2); color: var(--ink-2); font-weight: 600; font-size: 0.88rem; margin-bottom: -2px; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.drawer-tab:hover { background: var(--sun-tint); }
.drawer-tab.active { background: var(--white); color: var(--ink); border-color: var(--ink); border-bottom: 2px solid var(--white); }
.drawer-body { flex: 1; overflow: auto; padding: 16px 18px 28px; display: flex; flex-direction: column; gap: 14px; }
.drawer-panel { display: none; flex-direction: column; gap: 14px; }
.drawer-panel.active { display: flex; }
.drawer-card { position: relative; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.drawer-card:nth-child(2n) { transform: rotate(-0.5deg); }
.drawer-card:nth-child(2n)::before { left: 20px; transform: rotate(-4deg); background: repeating-linear-gradient(-45deg, rgba(77, 150, 255, 0.45) 0 6px, rgba(77, 150, 255, 0.25) 6px 12px); }
.drawer-card:nth-child(3n) { background: var(--sun-tint); }
.card-header-with-icon { display: flex; gap: 12px; align-items: flex-start; }
.card-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 3px solid var(--stamp); color: var(--stamp); box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 3.5px var(--stamp); transform: rotate(-9deg); }
.card-icon .icon { width: 22px; height: 22px; vertical-align: 0; }
.card-title { font-size: 1.15rem; }
.card-desc { margin-top: 2px; font-size: 0.85rem; color: var(--ink-3); line-height: 1.55; }
.list-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.signin-action-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0 0; border-top: 1.5px dashed var(--sun-deep); }
.signin-meta-row { display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; color: var(--ink-2); }
.advance-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.adv-stat-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; border-top: 1.5px dashed var(--line); }
.stat-lbl { font-size: 0.74rem; color: var(--ink-3); }
.adv-stat-item .stat-val { font-size: 1.05rem; }
.advance-progress-box { display: flex; flex-direction: column; gap: 6px; }
.progress-labels { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; color: var(--ink-2); }
.debt-highlight { color: var(--sky-ink); }
.progress-bar-wrap { height: 12px; border-radius: 999px; background: var(--paper-2); border: 1.5px solid var(--line); overflow: hidden; }
.progress-fill { height: 100%; background: var(--sky-deep); border-radius: 999px; }
.weekly-close-tip { font-size: 0.78rem; color: var(--ink-3); }

/* 表单 */
.drawer-form, .advance-repay-form { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 0.78rem; color: var(--ink-3); }
.drawer-form input[type=number], .drawer-form select, .advance-repay-form input, .dialog-box input[type=number] {
  min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--white); width: 100%;
}
.drawer-form select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%232b2d42' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.input-with-quick-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.input-with-quick-btns input { flex: 1 1 140px; }
.form-actions { display: flex; gap: 8px; }
.form-error { padding: 8px 12px; border-radius: 10px; background: var(--poppy-tint); color: var(--poppy-ink); font-size: 0.85rem; font-weight: 600; }
.form-checkbox-row .checkbox-label { display: flex; gap: 8px; align-items: flex-start; font-size: 0.85rem; color: var(--ink-2); cursor: pointer; }
.checkbox-label input { width: 18px; height: 18px; accent-color: var(--poppy); margin-top: 2px; }
.loan-items-container { display: flex; flex-direction: column; gap: 0; }
.loan-card-item { padding: 12px 2px; gap: 6px; }
.loan-card-item p { font-size: 0.88rem; color: var(--ink-2); }
.loan-card-item small { color: var(--ink-3); }
.status-tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--white); border: 1.5px solid var(--line-strong); color: var(--ink-2); }
.status-tag.pending { border-style: dashed; }
.status-tag.active { background: var(--mint-tint); color: var(--mint-ink); border-color: var(--mint-ink); }
.status-tag.overdue { background: var(--poppy-tint); color: var(--poppy-ink); border-color: var(--poppy); }
.status-tag.repaid { text-decoration: line-through; }
.quick-repay-btn { align-self: flex-start; min-height: 40px; padding: 6px 14px; font-size: 0.9rem; }
.inventory-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.inventory-item { display: flex; gap: 12px; align-items: center; padding: 10px 2px; }
.item-icon, .shop-item-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--white); color: var(--ink); border: 1.5px solid var(--line); }
.item-icon .icon, .shop-item-icon .icon { width: 22px; height: 22px; vertical-align: 0; }
.item-details { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.item-desc { color: var(--ink-3); font-size: 0.78rem; }
.item-limits { font-size: 0.78rem; color: var(--ink-2); }
.item-limits b { color: var(--ink); }
.shop-grid { display: flex; flex-direction: column; gap: 0; }
.shop-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; flex-wrap: wrap; }
.shop-item-info { display: flex; gap: 12px; align-items: center; min-width: 0; }
.shop-item-info p { font-size: 0.78rem; color: var(--ink-3); }
.shop-item-buy { display: flex; gap: 6px; align-items: center; }
.shop-item-buy select { min-height: 40px; padding: 6px 28px 6px 10px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--white); appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%232b2d42' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
.buy-item-btn { min-height: 40px; padding: 6px 14px; }

/* 榜单与记录 */
.sub-tabs-row { display: flex; gap: 6px; flex-wrap: wrap; }
.sub-tab-btn { min-height: 36px; padding: 4px 12px; border-radius: 10px; background: var(--white); box-shadow: var(--cut), 0 4px 8px -6px rgba(43, 45, 66, 0.45); font-weight: 600; font-size: 0.85rem; color: var(--ink-2); }
.sub-tabs-row .sub-tab-btn:nth-child(odd) { transform: rotate(-1.5deg); }
.sub-tabs-row .sub-tab-btn:nth-child(even) { transform: rotate(1.5deg); }
.sub-tab-btn.active { background: var(--ink); color: var(--white); }
.leaderboard-meta { font-size: 0.78rem; color: var(--ink-3); }
.leaderboard-wrap, .table-wrap { overflow-x: auto; }
.park-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.park-table th { text-align: left; font-size: 0.74rem; font-weight: 600; color: var(--ink-3); padding: 6px 8px; border-bottom: 2px solid var(--line-strong); }
.park-table td { padding: 10px 8px; border-bottom: 1.5px dashed var(--line); color: var(--ink-2); vertical-align: middle; }
.park-table tr:last-child td { border-bottom: 0; }
.park-table .th-num, .park-table td.th-num { text-align: right; font-family: var(--font-display); font-weight: 600; color: var(--ink); white-space: nowrap; }
.park-table td.positive { color: var(--mint-ink); }
.park-table td.negative { color: var(--poppy-ink); }
.leaderboard-table tr.is-me td { background: var(--sun-tint); }
.leaderboard-table .rank-1 { font-family: var(--font-display); font-weight: 700; color: var(--poppy-ink); }
.leaderboard-table .title-pill { min-width: 0; height: auto; padding: 1px 8px; border-radius: 999px; border-width: 1.5px; transform: none; font-size: 0.74rem; margin-left: 4px; box-shadow: none; }
.my-rank-strip { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--sun-tint); border: 1.5px dashed var(--sun-deep); font-size: 0.88rem; color: var(--ink-2); }

.declaration-highlight-box { padding: 12px 14px; border-radius: 12px; background: var(--sun-tint); border: 2px solid var(--sun-deep); }
.declaration-highlight-box h4 { font-size: 0.9rem; margin-bottom: 4px; }
.declaration-highlight-box p { font-size: 0.88rem; color: var(--sun-ink); line-height: 1.6; }
.rule-content-block { display: flex; flex-direction: column; gap: 8px; font-size: 0.88rem; color: var(--ink-2); line-height: 1.65; }
.rule-content-block h4 { font-size: 0.95rem; margin-top: 6px; }

/* ---------- 破产贴纸 ---------- */
.broke-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(43, 45, 66, 0.45); backdrop-filter: blur(3px); }
.broke-card { position: relative; width: min(480px, 100%); max-height: 92vh; overflow: auto; padding: 26px 22px 22px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.broke-card::before { content: '今日破产'; position: absolute; top: 14px; right: 14px; padding: 4px 10px; border: 3px solid var(--poppy); border-radius: 8px; color: var(--poppy-ink); font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; transform: rotate(12deg); opacity: 0.85; }
.broke-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--poppy-tint); color: var(--poppy-ink); }
.broke-icon .icon { width: 36px; height: 36px; vertical-align: 0; }
.broke-title { font-size: 1.6rem; }
.broke-subtitle { font-size: 0.9rem; color: var(--ink-2); }
.broke-options-list { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; }
.broke-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 2px; border-top: 1.5px dashed var(--line); }
.broke-option p { font-size: 0.8rem; color: var(--ink-3); }
.opt-num { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--sky-deep); color: var(--white); font-family: var(--font-display); font-weight: 700; }
.broke-actions { width: 100%; display: flex; }
.broke-dismiss-btn { width: 100%; }

/* ---------- 对话框 ---------- */
.accessible-dialog { border: 0; padding: 0; background: transparent; max-width: min(460px, calc(100vw - 32px)); }
.accessible-dialog::backdrop { background: rgba(43, 45, 66, 0.45); backdrop-filter: blur(2px); }
.dialog-box { position: relative; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.dialog-title { font-size: 1.2rem; }
.dialog-desc { font-size: 0.9rem; color: var(--ink-2); }
.dialog-details, .dialog-loan-info { padding: 10px 2px; border-top: 1.5px dashed var(--line); font-size: 0.88rem; color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dialog-close-corner { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--paper-2); color: var(--ink); }
.dialog-close-corner .icon { width: 18px; height: 18px; vertical-align: 0; }
.dialog-notice { font-size: 0.8rem; color: var(--poppy-ink); }
.guide-steps { display: flex; flex-direction: column; gap: 10px; }
.guide-step { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--ink-2); }
.step-num { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--sun); color: var(--ink); font-family: var(--font-display); font-weight: 700; }
.code-copy { display: inline-block; margin-top: 4px; padding: 4px 10px; border-radius: 8px; background: var(--ink); color: var(--white); font-weight: 600; }

/* ---------- Toast：一张小贴纸 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px) rotate(-1.5deg); opacity: 0;
  max-width: min(420px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: var(--white); font-weight: 600; font-size: 0.9rem; text-align: center;
  box-shadow: var(--cut), var(--lift-lg); pointer-events: none;
  transition: transform var(--t-mid) var(--ease-out), opacity var(--t-mid);
}
.toast.show { transform: translate(-50%, 0) rotate(-1.5deg); opacity: 1; }

/* ---------- 小屏 ---------- */
@media (max-width: 600px) {
  .toast { top: 118px; bottom: auto; transform: translate(-50%, -10px) rotate(-1.5deg); }
  .toast.show { transform: translate(-50%, 0) rotate(-1.5deg); }
}
@media (max-width: 899px) {
  .park-header { flex-wrap: wrap; row-gap: 6px; }
  .brand { font-size: 1.1rem; }
  .group-tag { max-width: 40vw; }
  .top-actions { width: 100%; justify-content: space-between; }
  .stats-group { flex: 1; }
  .stat-pill { flex: 1; padding: 6px 10px; }
  .advance-pill .stat-val { font-size: 0.75rem; }
  .drawer-btn-text { display: none; }
  .drawer-btn { padding: 8px 10px; }
  .user-name { max-width: 90px; }
  .stamp-card { grid-template-columns: 1fr auto; grid-template-areas: 'head head' 'marks btn'; column-gap: 10px; padding: 12px 14px; }
  .stamp-marks { gap: 4px; }
  .stamp-marks li { width: 27px; height: 27px; font-size: 0.7rem; border-width: 1.5px; }
  .stamp-btn { width: 80px; height: 80px; font-size: 0.92rem; }
  .game-screen { padding: 16px 14px 18px; }
  .screen-title { font-size: 1.3rem; }
  .color-choices-area { grid-template-columns: 1fr; }
  .color-choice-btn { flex-direction: row; align-items: center; min-height: 52px; }
  .reel-frame { height: 120px; }
}
@media (max-width: 600px) {
  .park-layout { padding: 12px 12px 32px; gap: 12px; }
  .stats-group { gap: 6px; }
  .stat-label { font-size: 0.74rem; }
  .stat-val { font-size: 1rem; }
  .card-item { width: 56px; height: 78px; }
  .card-item .card-val { font-size: 1.1rem; }
  .card-item .card-suit { font-size: 1.25rem; }
  .table-seats-fan { grid-template-columns: 1fr 1fr; }
  .amount-buttons { gap: 5px; }
  .val-btn { min-width: 40px; padding: 6px 9px; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; scroll-behavior: auto !important; }
  .game-nav-tab.active, .val-btn, .mult-btn, .choice-tag, .sub-tab-btn, .color-choice-btn.active, .brand, .group-tag, .primary, .stamp-btn, .stamp-card, .rail-section, .drawer-card, .settlement-summary-card, .card-icon, .stamp-marks li { transform: none; animation: none; }
}

/* hidden 属性必须压过组件的 display 规则 */
[hidden] { display: none !important; }

/* ---------- 游客：只看得到入口指引 ---------- */
body.is-guest .park-layout, body.is-guest .stamp-card { display: none; }
.guest-guide { max-width: 640px; margin: 24px auto 40px; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.guest-card { position: relative; padding: 24px 22px; background: var(--white); border-radius: var(--r-sticker); box-shadow: var(--cut), var(--lift); transform: rotate(-0.6deg); }
.guest-card::before { content: ''; position: absolute; top: -13px; left: 26px; width: 98px; height: 24px; mix-blend-mode: multiply; opacity: 0.9; transform: rotate(-4deg); clip-path: polygon(0 14%, 3% 0, 96% 3%, 100% 16%, 98% 86%, 100% 100%, 4% 96%, 1% 82%); background: repeating-linear-gradient(-45deg, rgba(77, 150, 255, 0.5) 0 6px, rgba(77, 150, 255, 0.28) 6px 12px); }
.guest-title { font-size: 1.5rem; margin-bottom: 8px; }
.guest-desc { color: var(--ink-2); line-height: 1.65; }
.guest-steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.guest-steps li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); line-height: 1.6; padding-top: 10px; border-top: 1.5px dashed var(--line); }
.guest-note { margin-top: 14px; font-size: 0.85rem; color: var(--poppy-ink); }
