/* 捏捏牌局 · 视觉：玩具牌桌。
   深绿绒布、奶油色纸牌、扭蛋壳、会弹的青柠色按钮；对话框和名牌学动森：圆滚滚的白气泡 + 斜贴的名字小标签。 */

:root {
  --felt-0: #041a14;
  --felt-1: #08291f;
  --felt-2: #0f3d2e;
  --felt-3: #1a5a42;
  --lime: #caff60;
  --lime-2: #9fd83a;
  --lime-3: #6f9a1f;
  --lime-ink: #1d3606;
  --cream: #fbf7ea;
  --paper: #f7f0dc;
  --paper-2: #eadfc0;
  --paper-3: #d6c697;
  --gold: #f5df98;
  --gold-2: #d9b85a;
  --gold-3: #a8832c;
  --coral: #ff6b4a;
  --coral-2: #d9442a;
  --coral-3: #a02c17;
  --sky: #8fd3ff;
  --sky-2: #4aa8e0;
  --sky-3: #2a6f9c;
  --lav: #c9b3ff;
  --lav-2: #9a86f0;
  --lav-3: #6a55c4;
  --pink: #ff9cc2;
  --ink: #10201a;
  --ink-2: #33443c;
  --ink-3: #5b6b62;
  --muted: rgba(251, 247, 234, 0.66);
  --line: rgba(251, 247, 234, 0.13);
  --glass: rgba(4, 26, 20, 0.58);
  --btc: #e2841a;
  --eth: #5667d8;
  --sol: #8a5cd8;
  --meme: #4a9420;
  --num: 'Poppins', 'Rund', 'PingFang SC', system-ui, sans-serif;
  --display: 'Poppins', 'TangYuan', 'Rund', 'PingFang SC', sans-serif;
  --body: 'Poppins', 'Rund', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  /* 日系游戏标题那种粗描边：8 个方向的影子拼出一圈描边，再往下压一层厚度 */
  --ol: #0b2a1f;
  --outline: 0 3px 0 var(--ol), 3px 0 0 var(--ol), -3px 0 0 var(--ol), 0 -3px 0 var(--ol), 2px 2px 0 var(--ol), -2px 2px 0 var(--ol), 2px -2px 0 var(--ol), -2px -2px 0 var(--ol);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.3, 1.4, 0.5, 1);
  --jw: clamp(66px, min(7vw, 12vh), 112px);
  --pop: 0 5px 0 rgba(0, 0, 0, 0.22), 0 14px 28px rgba(0, 0, 0, 0.3);
  --paper-bg: radial-gradient(rgba(16, 32, 26, 0.05) 1px, transparent 1.3px) 0 0 / 12px 12px, linear-gradient(175deg, #fffcf0, var(--paper) 65%, #efe4c4);
  color-scheme: dark;
}

/* 按语言换字体：英文全用 Poppins；日文用 M PLUS Rounded 1c（圆体，按需加载），中文字符再回退到圆体 */
html[data-lang='en'] { --display: 'Poppins', 'TangYuan', 'Rund', sans-serif; --body: 'Poppins', 'Rund', 'PingFang SC', system-ui, sans-serif; }
html[data-lang='ja'] { --display: 'Poppins', 'M PLUS Rounded 1c', 'TangYuan', 'Rund', sans-serif; --body: 'Poppins', 'M PLUS Rounded 1c', 'Rund', 'Hiragino Sans', system-ui, sans-serif; }
html[data-lang='en'] .title { font-size: clamp(64px, 8.6vw, 128px); line-height: 0.92; letter-spacing: -0.01em; }
html[data-lang='ja'] .title { font-size: clamp(64px, 9vw, 136px); }
html[data-lang='en'] .title .t2, html[data-lang='ja'] .title .t2 { margin-left: 0.35em; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--felt-0); color: var(--cream); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, .title, .hand-name, .offer-title, .joker-title, .tip-head strong, .sec-head h3 { font-feature-settings: 'palt' 1; }
body.no-webgl { background: radial-gradient(120% 90% at 30% 20%, #0f4632, #041a14 70%); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
img { display: block; }

#bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -2; }
#grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.45;
  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 baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#stage { position: relative; z-index: 1; min-height: 100vh; }
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 900; }
#floaters { position: fixed; inset: 0; pointer-events: none; z-index: 950; }

/* ---------------- 通用装饰 ---------------- */

/* 角色身后的软光 + 三颗闪闪的小星星 */
.halo { position: absolute; inset: -8%; pointer-events: none; z-index: 0; --halo: var(--lime); }
.halo::before { content: ''; position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, var(--halo) 42%, transparent), color-mix(in oklab, var(--halo) 10%, transparent) 45%, transparent 70%); animation: glow 4.2s ease-in-out infinite; }
.halo i { position: absolute; width: 20px; height: 20px; background: #fff6c8; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: twinkle 2.6s ease-in-out infinite; }
.halo i:nth-child(1) { left: 10%; top: 16%; }
.halo i:nth-child(2) { right: 8%; top: 30%; width: 14px; height: 14px; animation-delay: -0.9s; }
.halo i:nth-child(3) { left: 20%; bottom: 18%; width: 11px; height: 11px; animation-delay: -1.7s; }
@keyframes glow { 50% { transform: scale(1.07); opacity: 0.8; } }
@keyframes twinkle { 0%, 100% { transform: scale(0.35) rotate(0deg); opacity: 0.25; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
[data-mood='ch1boss'] .halo, [data-mood='boss'] .halo { --halo: var(--pink); }
[data-mood='ch2'] .halo { --halo: #9ef0c6; }
[data-mood='ch2boss'] .halo, [data-mood='final'] .halo { --halo: #ffb86b; }
[data-mood='ch3'] .halo { --halo: var(--lav); }
[data-mood='shop'] .halo { --halo: var(--gold); }

/* 标题下面那条波浪线 */
.squiggle { height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 7q7-8 14 0t14 0' fill='none' stroke='%23caff60' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 28px 14px; opacity: 0.85; }

/* ---------------- 按钮 ---------------- */

.primary, .danger, .ghost {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 16px; padding: 11px 20px; font-weight: 800; letter-spacing: 0.02em;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), filter 0.15s, background 0.15s;
  user-select: none; -webkit-user-select: none; white-space: nowrap;
}
.primary, .danger { font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: 0.04em; }
.primary { color: var(--lime-ink); background: linear-gradient(180deg, #e2ff9c, var(--lime) 55%, #b9ef4a); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.65), inset 0 -3px 0 rgba(111, 154, 31, 0.3), 0 5px 0 var(--lime-3), 0 10px 18px rgba(0, 0, 0, 0.3); }
.danger { color: #fff8f2; text-shadow: 0 1px 0 rgba(160, 44, 23, 0.5); background: linear-gradient(180deg, #ff967a, var(--coral) 55%, #f2553a); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(160, 44, 23, 0.3), 0 5px 0 var(--coral-3), 0 10px 18px rgba(0, 0, 0, 0.3); }
.primary:hover:not(:disabled), .danger:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); }
.primary:active:not(:disabled) { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 1px 0 var(--lime-3), 0 3px 8px rgba(0, 0, 0, 0.3); }
.danger:active:not(:disabled) { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 1px 0 var(--coral-3), 0 3px 8px rgba(0, 0, 0, 0.3); }
.primary:disabled, .danger:disabled { filter: saturate(0.2) brightness(0.78); opacity: 0.6; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); }
.primary.blocked { filter: saturate(0.45); }
.ghost { color: var(--cream); background: rgba(4, 26, 20, 0.42); box-shadow: inset 0 0 0 1.5px rgba(251, 247, 234, 0.3); }
.ghost:hover:not(:disabled) { background: rgba(251, 247, 234, 0.1); box-shadow: inset 0 0 0 1.5px rgba(251, 247, 234, 0.55); }
.ghost:active:not(:disabled) { transform: translateY(2px); }
.ghost:disabled { opacity: 0.45; }
.small { padding: 7px 12px; font-size: 13px; border-radius: 11px; }
.big { padding: 13px 24px; font-size: 18px; border-radius: 17px; }
.primary.big, .danger.big { font-size: 20px; }
.huge { flex-direction: column; gap: 0; padding: 15px 34px 13px; font-size: 26px; border-radius: 22px; }
.huge small { font-family: var(--body); font-size: 12px; font-weight: 700; opacity: 0.72; letter-spacing: 0.04em; }
.link { color: var(--lime); font-weight: 800; padding: 0; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.muted { color: var(--muted); }
.fine { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.eyebrow, .intro-eyebrow, .kicker { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; }

.coin { display: inline-block; flex: none; width: 1em; height: 1em; border-radius: 50%; vertical-align: -0.12em; position: relative; background: radial-gradient(circle at 35% 30%, #fff6c9, #f5df98 35%, #d9b85a 70%, #a8832c); box-shadow: inset 0 0 0 0.09em rgba(120, 88, 20, 0.55), 0 0.08em 0 rgba(0, 0, 0, 0.25); }
.coin::after { content: ''; position: absolute; inset: 28%; border-radius: 50%; border: 0.07em solid rgba(120, 88, 20, 0.6); }
.coin.big { width: 1.35em; height: 1.35em; }
.coin-line { display: inline-flex; align-items: center; gap: 5px; }

.suit-icon { display: block; width: 1em; height: 1em; overflow: visible; }
.faction-glyph { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--cream); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.faction-glyph .suit-icon { width: 15px; height: 15px; }
.faction-glyph.f-btc { color: var(--btc); } .faction-glyph.f-eth { color: var(--eth); } .faction-glyph.f-sol { color: var(--sol); } .faction-glyph.f-meme { color: var(--meme); }
b.f-btc { color: #ffb95c; } b.f-eth { color: #aab4ff; } b.f-sol { color: #cdb0ff; } b.f-meme { color: #a6e27a; }

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; z-index: 1000; max-width: calc(100vw - 32px); text-align: center;
  background: var(--cream); color: var(--ink); font-weight: 800; padding: 11px 18px; border-radius: 16px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25), 0 16px 30px rgba(0, 0, 0, 0.35); transition: all 0.3s var(--spring); pointer-events: none;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 飘字：彩色胶囊 */
.floater { position: fixed; font-family: var(--num); font-weight: 900; font-size: 22px; line-height: 1; padding: 5px 10px 4px; border-radius: 10px; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.3); }
.floater.chips { background: var(--lime); color: var(--lime-ink); }
.floater.mult { background: var(--coral); color: #fff; }
.floater.xmult { background: var(--cream); color: var(--coral-2); font-size: 27px; box-shadow: 0 0 0 3px var(--coral), 0 5px 0 var(--coral-3), 0 10px 24px rgba(255, 107, 74, 0.5); }
.floater.debuff { background: #3b1414; color: #ffb3a1; font-family: var(--body); font-size: 15px; }
.floater.upgrade { background: var(--gold); color: var(--ink); font-family: var(--body); font-size: 15px; }

/* ---------------- 提示框 ---------------- */

.tip { position: fixed; z-index: 800; width: 256px; background: var(--cream); color: var(--ink); border-radius: 18px; padding: 12px 14px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2), 0 18px 40px rgba(0, 0, 0, 0.45); opacity: 0; transform: translateY(6px) scale(0.98); pointer-events: none; transition: opacity 0.15s, transform 0.2s var(--ease); }
.tip.show { opacity: 1; transform: none; pointer-events: auto; }
.tip-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tip-head strong { font-family: var(--display); font-weight: 800; font-size: 18px; }
.tip-rarity { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--paper-2); white-space: nowrap; }
.tip-rarity.rarity-uncommon { background: #dff5b8; }
.tip-rarity.rarity-rare { background: linear-gradient(90deg, #ffd8a8, #f5df98, #c6f5e4); }
.tip-effect { margin: 8px 0 6px; font-weight: 800; font-size: 14px; color: var(--ink); background: #fff; border-radius: 12px; padding: 7px 10px; box-shadow: inset 0 0 0 1.5px var(--paper-2); }
.tip-now { margin: -2px 0 8px; font-size: 13px; font-weight: 800; color: var(--lime-3); }
.tip-line { margin: 0 0 6px; color: var(--ink-2); font-family: var(--display); font-weight: 800; font-size: 15px; }
.tip-owner { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.sell-btn { margin-top: 8px; width: 100%; background: var(--coral); color: #fff; font-family: var(--display); font-weight: 800; font-size: 16px; border-radius: 12px; padding: 8px; box-shadow: 0 3px 0 var(--coral-3); display: flex; align-items: center; justify-content: center; gap: 5px; }
.sell-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--coral-3); }

/* ---------------- 角色形象 ---------------- */

.portrait { position: relative; display: grid; grid-template: 100% / 100%; place-items: center; flex: none; }
.portrait.s { width: 46px; height: 46px; }
.portrait.m { width: 98px; height: 98px; }
.portrait.l { width: 152px; height: 152px; }
.portrait.xl { width: min(300px, 62vw); height: min(300px, 62vw); }
/* Slack 头像原图只有 256px，大图位别放太大，免得糊 */
.portrait.xl.capsule-portrait { width: min(250px, 58vw); height: min(250px, 58vw); }
.squishy-portrait img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.42)); user-select: none; -webkit-user-drag: none; }
.portrait.s.squishy-portrait img { filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.35)); }
.squishy-portrait[data-kind='item'] img { transform: rotate(-8deg) scale(0.86); filter: drop-shadow(0 0 22px rgba(202, 255, 96, 0.35)) drop-shadow(0 14px 16px rgba(0, 0, 0, 0.45)); }
/* 同事：装在扭蛋里的贴纸头像 */
.capsule-portrait .capsule-shell {
  position: relative; z-index: 1; width: 90%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #2a7a5a, var(--felt-2) 75%);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75), 0 0 0 6px rgba(255, 255, 255, 0.14), 0 14px 22px rgba(0, 0, 0, 0.42);
}
.portrait.s.capsule-portrait .capsule-shell { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.75), 0 3px 6px rgba(0, 0, 0, 0.35); }
.capsule-portrait[data-faction='btc'] .capsule-shell { background: radial-gradient(circle at 50% 35%, #f2b35c, #b8650e 78%); }
.capsule-portrait[data-faction='eth'] .capsule-shell { background: radial-gradient(circle at 50% 35%, #8f9cf5, #3a47b0 78%); }
.capsule-portrait[data-faction='sol'] .capsule-shell { background: radial-gradient(circle at 50% 35%, #b894f0, #5e3aa8 78%); }
.capsule-portrait[data-faction='meme'] .capsule-shell { background: radial-gradient(circle at 50% 35%, #9fdc6a, #3f7f1c 78%); }
.capsule-portrait .capsule-shell img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.capsule-portrait .capsule-shine { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: radial-gradient(60% 40% at 30% 18%, rgba(255, 255, 255, 0.55), transparent 60%), radial-gradient(30% 20% at 78% 80%, rgba(255, 255, 255, 0.2), transparent 70%); }
.capsule-portrait .capsule-base {
  position: absolute; z-index: 2; left: 5%; right: 5%; bottom: 5%; height: 28%; pointer-events: none;
  border-radius: 0 0 999px 999px; background: linear-gradient(180deg, rgba(202, 255, 96, 0.3), rgba(159, 216, 58, 0.72));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.5);
}
.capsule-portrait[data-faction='btc'] .capsule-base { background: linear-gradient(180deg, rgba(242, 169, 59, 0.3), rgba(226, 132, 26, 0.75)); }
.capsule-portrait[data-faction='eth'] .capsule-base { background: linear-gradient(180deg, rgba(132, 148, 240, 0.3), rgba(86, 103, 216, 0.75)); }
.capsule-portrait[data-faction='sol'] .capsule-base { background: linear-gradient(180deg, rgba(184, 148, 240, 0.3), rgba(138, 92, 216, 0.75)); }
.portrait.s.capsule-portrait .capsule-base { height: 30%; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5); }
.capsule-portrait.sealed .capsule-base { height: 50%; background: linear-gradient(180deg, rgba(202, 255, 96, 0.92), rgba(111, 154, 31, 0.98)); }
.capsule-portrait.sealed .capsule-shell img, .capsule-portrait.sealed .letter { filter: blur(1.5px) saturate(0.7); }
.letter { font-family: var(--display); font-weight: 800; color: var(--cream); font-size: 150%; line-height: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.22); }
.portrait.m .letter { font-size: 44px; } .portrait.l .letter { font-size: 70px; } .portrait.xl .letter { font-size: 120px; } .portrait.s .letter { font-size: 20px; }
.bob { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 45%, 55% { transform: translateY(-8px) scale(0.985, 1.015); } 92% { transform: translateY(1px) scale(1.03, 0.97); } }
.deflated { transform: scale(1.1, 0.72) translateY(18%); filter: saturate(0.4) brightness(0.8); transition: transform 1.2s var(--ease), filter 1.2s; }
.avatar-dot { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; flex: none; background: var(--felt-2); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4); font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--cream); }
.avatar-dot img { width: 100%; height: 100%; object-fit: cover; }
.avatar-dot.squishy img, .avatar-dot.visitor img, .avatar-dot.item img { object-fit: contain; transform: scale(1.35) translateY(8%); }
.avatar-dot.squishy, .avatar-dot.visitor { background: #1f5a42; }
.avatar-dot.anon[data-faction='btc'] { background: #9a5a14; } .avatar-dot.anon[data-faction='eth'] { background: #3a47a0; }
.avatar-dot.anon[data-faction='sol'] { background: #5e3aa8; } .avatar-dot.anon[data-faction='meme'] { background: #3a6f18; }

/* ---------------- 顶栏 ---------------- */

.topbar { display: flex; align-items: center; gap: 18px; padding: 12px clamp(16px, 3vw, 36px); position: sticky; top: 0; z-index: 20; background: linear-gradient(180deg, rgba(4, 26, 20, 0.94), rgba(4, 26, 20, 0.6) 70%, transparent); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--cream); white-space: nowrap; }
.brand > span:nth-child(2) { font-family: var(--display); font-weight: 800; font-size: 25px; line-height: 1; }
.brand small { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; position: relative; flex: none; background: radial-gradient(circle at 35% 30%, #efffc4, var(--lime) 45%, var(--lime-2)); box-shadow: 0 3px 0 var(--lime-3); transition: transform 0.3s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.08); }
.brand-mark::before { content: ''; position: absolute; left: 8px; top: 11px; width: 4px; height: 5px; border-radius: 50%; background: var(--ink); box-shadow: 10px 0 0 var(--ink); }
.brand-mark::after { content: ''; position: absolute; left: 9px; top: 16px; width: 12px; height: 6px; border-bottom: 2.5px solid var(--ink); border-radius: 0 0 10px 10px; }
.demo { display: flex; align-items: center; gap: 12px; margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.demo-tag { font-size: 10px; font-weight: 900; letter-spacing: 0.16em; padding: 3px 8px; border-radius: 7px; background: var(--gold); color: var(--ink); }
.demo label { display: flex; align-items: center; gap: 6px; }
.demo select {
  appearance: none; -webkit-appearance: none; color: var(--cream); border-radius: 11px; padding: 6px 28px 6px 10px; font-weight: 700; max-width: 230px;
  background: linear-gradient(45deg, transparent 50%, var(--cream) 50%) calc(100% - 15px) 55% / 5px 5px no-repeat, linear-gradient(135deg, var(--cream) 50%, transparent 50%) calc(100% - 10px) 55% / 5px 5px no-repeat, rgba(251, 247, 234, 0.08);
  border: 1px solid var(--line);
}
.demo select option, .demo select optgroup { background: var(--felt-1); color: var(--cream); }
.nav { display: flex; gap: 8px; align-items: center; }
.lang-switch { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); box-shadow: inset 0 0 0 1px var(--line); }
.lang-switch .seg { padding: 5px 9px; font-size: 12px; border-radius: 9px; white-space: nowrap; }
.splash-lang { position: fixed; top: 14px; right: 16px; z-index: 30; }
.icon-toggle { width: 34px; height: 34px; border-radius: 11px; font-size: 16px; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); opacity: 0.6; }
.icon-toggle.on { opacity: 1; color: var(--lime); box-shadow: inset 0 0 0 1.5px var(--lime); }

/* ---------------- 大厅 ---------------- */

.lobby, .board-screen, .challenge { min-height: 100vh; padding-bottom: 40px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 60px); align-items: center; padding: clamp(6px, 2vh, 30px) clamp(16px, 5vw, 80px) 10px; max-width: 1320px; margin: 0 auto; }
.kicker { color: var(--lime); display: flex; align-items: center; gap: 8px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(202, 255, 96, 0.6); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(202, 255, 96, 0); } 100% { box-shadow: 0 0 0 0 rgba(202, 255, 96, 0); } }
.title { margin: 14px 0 6px; font-family: var(--display); font-weight: 800; line-height: 0.95; font-size: clamp(86px, 12.5vw, 180px); letter-spacing: 0.02em; }
.title span { display: block; }
.title .t1 { color: var(--cream); text-shadow: 0 4px 0 var(--ol), 4px 0 0 var(--ol), -4px 0 0 var(--ol), 0 -4px 0 var(--ol), 3px 3px 0 var(--ol), -3px 3px 0 var(--ol), 3px -3px 0 var(--ol), -3px -3px 0 var(--ol), 0 10px 0 var(--ol), 0 16px 20px rgba(0, 0, 0, 0.35); }
.title .t2 { color: var(--lime); margin-left: 0.55em; transform: rotate(-4deg); transform-origin: left; --ol: #1d3606; text-shadow: 0 4px 0 var(--ol), 4px 0 0 var(--ol), -4px 0 0 var(--ol), 0 -4px 0 var(--ol), 3px 3px 0 var(--ol), -3px 3px 0 var(--ol), 3px -3px 0 var(--ol), -3px -3px 0 var(--ol), 0 10px 0 var(--ol), 0 16px 20px rgba(0, 0, 0, 0.35); }
.title .ch { display: inline-block; font-style: normal; cursor: default; }
.title-rule { width: min(420px, 80%); margin: 14px 0 0; }
.tagline { font-size: clamp(16px, 1.5vw, 20px); max-width: 30ch; color: var(--cream); opacity: 0.9; margin: 16px 0 22px; }
.cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats span { font-size: 12px; color: var(--muted); font-weight: 700; }
.hero-stats b { font-family: var(--num); font-size: 22px; font-weight: 900; }
.hero-stage { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 10px; }
.me-stage { position: relative; touch-action: none; }
.me-stage .portrait { z-index: 1; transition: transform 0.15s var(--spring); }
.me-stage.pressed .portrait { transform: scale(1.18, 0.78) translateY(10%); transition: transform 0.12s; }
.me-stage::after { content: ''; display: block; width: 56%; height: 22px; margin: -18px auto 0; border-radius: 50%; background: rgba(0, 0, 0, 0.35); filter: blur(8px); }
/* 动森式名牌：奶油色小圆牌，歪一点贴上去 */
.nameplate { position: relative; z-index: 2; margin-top: -4px; display: flex; flex-direction: column; align-items: center; padding: 5px 24px 7px; color: var(--ink); background: var(--cream); border-radius: 999px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25), 0 10px 20px rgba(0, 0, 0, 0.25); transform: rotate(-2deg); }
.nameplate b { font-family: var(--display); font-weight: 800; font-size: 23px; line-height: 1.15; }
.nameplate small { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.me-id { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.me-line { color: var(--cream); max-width: 34ch; margin: 4px 0 16px; opacity: 0.9; font-family: var(--display); font-weight: 800; font-size: 17px; }
.me-jokers { display: flex; justify-content: center; }
.me-jokers .joker { --jw: clamp(88px, 8vw, 114px); margin: 0 -5px; cursor: pointer; }
.me-jokers .joker:nth-child(1) { transform: rotate(-7deg) translateY(10px); }
.me-jokers .joker:nth-child(3) { transform: rotate(7deg) translateY(10px); }
.me-jokers .joker:hover { transform: translateY(-14px) scale(1.06); z-index: 3; }
.capsule-cloud { position: absolute; inset: -2% -10% 40%; pointer-events: none; z-index: 0; }
.cloud-capsule { position: absolute; left: var(--x); top: var(--y); pointer-events: auto; transform: translate(-50%, -50%) scale(var(--s)); transition: transform 0.4s var(--spring), opacity 0.4s; animation: drift var(--t) ease-in-out infinite; animation-delay: var(--d); }
.cloud-capsule .capsule-shell { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 6px 10px rgba(0, 0, 0, 0.35) !important; }
.cloud-capsule:hover { transform: translate(-50%, -50%) scale(calc(var(--s) * 1.25)); }
.cloud-capsule.popped { transform: translate(-50%, -50%) scale(0); opacity: 0; }
@keyframes drift { 0%, 100% { translate: 0 0; } 33% { translate: 6px -10px; } 66% { translate: -5px -4px; } }

.today, .lobby-grid { max-width: 1320px; margin: 30px auto 0; padding: 0 clamp(16px, 5vw, 80px); }
.sec-head { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
.sec-head h3 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 27px; }
.boss-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.boss-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line); }
.boss-card.final { background: linear-gradient(135deg, rgba(110, 50, 16, 0.72), rgba(4, 26, 20, 0.58)); border-color: rgba(255, 170, 90, 0.35); }
.boss-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.boss-info .eyebrow { color: #ff9a80; font-size: 11px; }
.boss-card.final .eyebrow { color: #ffb070; }
.boss-info b { font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1.15; }
.boss-info q { font-size: 14px; color: var(--muted); font-family: var(--display); font-weight: 800; quotes: '“' '”'; }
.rule-chip { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; align-self: flex-start; font-size: 12px; font-weight: 700; line-height: 1.35; padding: 4px 10px; border-radius: 10px; background: rgba(255, 107, 74, 0.15); color: #ffc7b8; border: 1px solid rgba(255, 107, 74, 0.35); }
.rule-chip b { color: #ff9a80; font-weight: 900; white-space: nowrap; }
.rule-chip.immune { background: rgba(202, 255, 96, 0.13); color: #e3ffb0; border-color: rgba(202, 255, 96, 0.35); }
.rule-chip.immune b { color: var(--lime); }
.rule-chip.big { font-size: 15px; padding: 8px 14px; border-radius: 14px; background: #ffe4da; color: var(--coral-3); border: 0; align-self: center; }
.rule-chip.big b { color: var(--coral-2); }
.rule-chip.big.immune { background: #e6ffc0; color: var(--lime-ink); }
.rule-chip.big.immune b { color: var(--lime-3); }

.lobby-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.friends, .board-mini { padding: 16px 18px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line); }
.friends .sec-head h3, .board-mini .sec-head h3 { font-size: 23px; }
.friend-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.friend { display: grid; grid-template-columns: 190px 1fr; gap: 10px; align-items: center; }
.friend-who { display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; align-items: center; }
.friend-who .avatar-dot { grid-row: span 2; }
.friend-who b { font-size: 14px; }
.friend-who small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.friend-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 13px; font-weight: 700; transition: transform 0.15s var(--spring); }
.friend-tag:hover { box-shadow: inset 0 0 0 1.5px rgba(251, 247, 234, 0.45); transform: translateY(-1px); }
.friend-tag.on { background: var(--lime); color: var(--lime-ink); box-shadow: 0 3px 0 var(--lime-3); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.cat-FEATS { background: var(--lime); } .dot.cat-TITLE { background: var(--coral); } .dot.cat-SURVIVAL { background: var(--sky); } .dot.cat-ITEM { background: var(--gold); }
.mini-rows { display: flex; flex-direction: column; gap: 4px; }
.loading { color: var(--muted); font-size: 13px; padding: 10px 0; }
.loading::after { content: '…'; animation: dots 1s steps(3) infinite; }
.loading.big { font-size: 16px; padding: 40px 0; text-align: center; }
@keyframes dots { 0% { content: ''; } 33% { content: '.'; } 66% { content: '..'; } }
.foot { max-width: 1320px; margin: 28px auto 0; padding: 0 clamp(16px, 5vw, 80px); font-size: 12px; color: var(--muted); }

/* ---------------- 排行榜 ---------------- */

.board-row { display: grid; grid-template-columns: 34px 30px minmax(0, 1fr) 26px 58px 104px; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 14px; background: rgba(251, 247, 234, 0.045); }
.mini-rows .board-row { grid-template-columns: 26px 30px minmax(0, 1fr) 26px 92px; padding: 6px 8px; }
.board-row .rank { font-family: var(--num); font-weight: 900; font-size: 16px; color: var(--muted); text-align: center; }
.board-row.top1 .rank { color: var(--gold); } .board-row.top2 .rank { color: #d7e2dc; } .board-row.top3 .rank { color: #e6a771; }
.board-row .who { display: flex; flex-direction: column; min-width: 0; }
.board-row .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-row .who small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-row .reach { font-size: 12px; color: var(--muted); text-align: center; }
.board-row .score { font-family: var(--num); font-weight: 900; font-size: 17px; text-align: right; }
.board-row.me { background: rgba(202, 255, 96, 0.14); box-shadow: inset 0 0 0 1.5px rgba(202, 255, 96, 0.5); }
.board-head, .board-body { max-width: 920px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.board-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 16px auto 18px; }
.page-title { font-family: var(--display); font-weight: 800; font-size: clamp(48px, 7vw, 84px); margin: 6px 0 0; line-height: 1; text-shadow: var(--outline), 0 8px 0 var(--ol); }
.tabs { display: flex; gap: 4px; background: rgba(4, 26, 20, 0.6); padding: 4px; border-radius: 16px; border: 1px solid var(--line); }
.tab { padding: 8px 14px; border-radius: 12px; font-weight: 800; color: var(--muted); }
.tab.on { background: var(--cream); color: var(--ink); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); }
.board-list { display: flex; flex-direction: column; gap: 5px; }
.my-rank { display: flex; gap: 12px; align-items: baseline; margin-bottom: 14px; padding: 14px 16px; border-radius: 18px; background: rgba(202, 255, 96, 0.1); }
.my-rank b { font-family: var(--num); font-size: 28px; font-weight: 900; color: var(--lime); }
.faction-board { display: flex; flex-direction: column; gap: 12px; }
.faction-row { display: grid; grid-template-columns: 170px 1fr 110px; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); }
.faction-row.lead { border-color: rgba(245, 223, 152, 0.5); box-shadow: 0 0 0 1px rgba(245, 223, 152, 0.25); }
.f-name { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.f-name small { grid-column: 2; color: var(--muted); font-size: 11px; }
.f-bar { position: relative; height: 34px; border-radius: 12px; background: rgba(251, 247, 234, 0.07); overflow: hidden; }
.f-fill { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 12px; animation: grow 1s var(--ease) both; }
.f-btc .f-fill { background: linear-gradient(90deg, #7a4410, var(--btc)); } .f-eth .f-fill { background: linear-gradient(90deg, #2e3a86, var(--eth)); }
.f-sol .f-fill { background: linear-gradient(90deg, #45287a, var(--sol)); } .f-meme .f-fill { background: linear-gradient(90deg, #2f5a14, #7cc243); }
@keyframes grow { from { width: 0; } }
.f-bar span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-family: var(--num); font-weight: 900; }
.f-top { display: flex; padding-left: 6px; }
.f-top .avatar-dot { margin-left: -6px; }

/* ---------------- 牌桌 ---------------- */

.table-root { height: 100dvh; }
.table-screen { display: grid; grid-template-columns: clamp(252px, 22vw, 312px) minmax(0, 1fr); gap: 14px; height: 100dvh; padding: 14px; }
.side { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 26px; min-height: 0; overflow: auto; background: rgba(3, 18, 14, 0.64); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.blind-panel { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 18px; background: rgba(251, 247, 234, 0.06); }
.blind-kind { display: flex; gap: 10px; align-items: center; }
.blind-kind b { display: block; font-family: var(--display); font-weight: 800; font-size: 17px; line-height: 1.2; }
.blind-kind small { color: var(--muted); font-size: 12px; }
.blind-chip {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; position: relative; isolation: isolate;
  font-family: var(--display); font-weight: 800; font-size: 17px; color: var(--ink);
  background: repeating-conic-gradient(from 0deg, var(--cream) 0 22.5deg, var(--lime) 22.5deg 45deg); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}
.blind-chip::before { content: ''; position: absolute; inset: 5px; z-index: -1; border-radius: 50%; background: var(--cream); }
.blind-chip.k-big { background: repeating-conic-gradient(var(--cream) 0 22.5deg, var(--sky) 22.5deg 45deg); }
.blind-chip.k-boss, .blind-chip.k-final { background: repeating-conic-gradient(var(--cream) 0 22.5deg, var(--coral) 22.5deg 45deg); }
.seat-row { display: flex; flex-direction: column; gap: 8px; }
.seat-wrap { position: relative; display: flex; justify-content: center; }
.seat-wrap .halo { inset: -6% 8% 8%; }
.squishy-seat { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; touch-action: none; padding-top: 4px; }
.squishy-seat .portrait { width: clamp(116px, 12.5vw, 160px); height: clamp(116px, 12.5vw, 160px); transition: transform 0.15s var(--spring); animation: breathe 3.4s ease-in-out infinite; }
.squishy-seat.pressed .portrait { transform: scale(1.2, 0.76) translateY(12%); }
.squishy-seat.deflate .portrait { animation: none; transform: scale(1.18, 0.62) translateY(28%); filter: saturate(0.3) brightness(0.75); transition: transform 1.4s var(--ease), filter 1.4s; }
@keyframes breathe { 0%, 100% { scale: 1 1; } 50% { scale: 1.02 0.98; } }
.seat-name { font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--cream); margin-top: -2px; padding: 1px 12px 2px; border-radius: 999px; background: rgba(4, 26, 20, 0.6); }
.score-panel { display: flex; flex-direction: column; gap: 8px; }
.round-score { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.round-score .label { font-size: 12px; color: var(--muted); font-weight: 700; width: 100%; }
.round-score-num { font-family: var(--num); font-weight: 900; font-size: 34px; line-height: 1; }
.round-score .of { color: var(--muted); font-family: var(--num); font-weight: 800; }
.progress { height: 11px; border-radius: 999px; background: rgba(251, 247, 234, 0.1); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--lime-2), var(--lime)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45); transform-origin: left; transform: scaleX(0); transition: transform 0.6s var(--ease); }
.hand-name { display: flex; align-items: baseline; justify-content: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.1; min-height: 34px; color: var(--cream); }
.hand-name.idle { color: var(--muted); font-size: 20px; }
.hand-name small { font-family: var(--num); font-size: 13px; font-weight: 900; color: var(--gold); }
.calc { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: 8px; border-radius: 20px; background: rgba(0, 0, 0, 0.3); }
.chips-box, .mult-box { border-radius: 14px; padding: 6px 6px 7px; text-align: center; font-family: var(--num); font-weight: 900; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips-box > span, .mult-box > span { display: block; }
.chips-box { background: var(--lime); color: var(--lime-ink); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 4px 0 var(--lime-3); }
.mult-box { background: var(--coral); color: #fff; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 4px 0 var(--coral-3); }
.calc-cap { display: block; font-family: var(--body); font-size: 10px; font-weight: 800; letter-spacing: 0.24em; line-height: 1; margin-bottom: 3px; opacity: 0.7; }
.times { font-family: var(--num); font-weight: 900; font-size: 22px; color: var(--muted); }
.calc.hot { animation: hot 0.5s ease-in-out infinite alternate; }
.calc.hot::before { content: ''; position: absolute; inset: -6px; border-radius: 24px; z-index: -1; background: conic-gradient(from var(--a, 0deg), #caff60, #f5df98, #ff6b4a, #ff9cc2, #caff60); filter: blur(10px); opacity: 0.8; animation: spin 1.2s linear infinite; }
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --a: 360deg; } }
@keyframes hot { from { box-shadow: 0 0 0 2px rgba(245, 223, 152, 0.6); } to { box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.9), 0 0 30px rgba(255, 107, 74, 0.4); } }
.total-pop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; font-family: var(--num); font-weight: 900; font-size: 44px; color: var(--cream); padding: 4px 14px; border-radius: 16px; background: var(--ink); box-shadow: 0 0 0 3px var(--gold), 0 8px 0 rgba(0, 0, 0, 0.4); animation: pop 0.45s var(--spring) both; white-space: nowrap; }
.total-pop.big { background: linear-gradient(180deg, #243b12, var(--ink)); box-shadow: 0 0 0 3px var(--lime), 0 0 40px rgba(202, 255, 96, 0.5), 0 8px 0 rgba(0, 0, 0, 0.4); font-size: 50px; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(0.2) rotate(-10deg); opacity: 0; } }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stat { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 14px; background: rgba(251, 247, 234, 0.06); }
.stat span { font-size: 11px; color: var(--muted); font-weight: 700; }
.stat b { font-family: var(--num); font-weight: 900; font-size: 22px; line-height: 1.1; }
.stat.hands b { color: var(--lime); } .stat.discards b { color: #ff9a80; } .stat.coins b { color: var(--gold); }
.ante-track { display: flex; gap: 5px; justify-content: center; align-items: center; padding: 6px 0; }
.ante-track .pip { width: 10px; height: 10px; border-radius: 50%; background: rgba(251, 247, 234, 0.18); }
.ante-track .pip.k-boss, .ante-track .pip.k-final { width: 14px; height: 14px; background: rgba(255, 107, 74, 0.35); }
.ante-track .pip.k-small:nth-child(3n + 1) { margin-left: 7px; }
.ante-track .pip.done { background: var(--lime); }
.ante-track .pip.cur { background: var(--cream); box-shadow: 0 0 0 3px rgba(202, 255, 96, 0.4); animation: pulse 1.6s infinite; }
.side-tools { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

/* 牌桌：深绿绒布，边上一圈缝线 */
.felt {
  --cw: clamp(60px, min(8.2vw, 13.2vh), 128px);
  --t1: rgba(26, 90, 66, 0.55); --t2: rgba(4, 26, 20, 0.2); --t3: rgba(6, 36, 27, 0.72); --stitch: rgba(245, 223, 152, 0.14);
  position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; min-height: 0; overflow: hidden; border-radius: 30px; padding: 14px 18px 16px;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, var(--t1), var(--t2) 70%), radial-gradient(rgba(245, 223, 152, 0.05) 1px, transparent 1.4px) 0 0 / 14px 14px, var(--t3);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.05), 0 20px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(251, 247, 234, 0.08); transition: background 0.8s;
}
.felt::before { content: ''; position: absolute; inset: 9px; border-radius: 23px; border: 2px dashed var(--stitch); pointer-events: none; }
[data-mood='ch1boss'] .felt, [data-mood='boss'] .felt { --t1: rgba(110, 30, 60, 0.42); --t2: rgba(20, 6, 12, 0.3); --t3: rgba(30, 10, 22, 0.74); --stitch: rgba(255, 180, 200, 0.16); }
[data-mood='ch2'] .felt { --t1: rgba(20, 96, 96, 0.5); --t2: rgba(2, 24, 24, 0.25); --t3: rgba(4, 34, 34, 0.74); }
[data-mood='ch2boss'] .felt, [data-mood='final'] .felt { --t1: rgba(130, 64, 20, 0.42); --t2: rgba(24, 12, 4, 0.3); --t3: rgba(32, 18, 8, 0.74); --stitch: rgba(255, 200, 140, 0.16); }
[data-mood='ch3'] .felt { --t1: rgba(50, 60, 140, 0.45); --t2: rgba(6, 8, 30, 0.3); --t3: rgba(10, 14, 40, 0.74); --stitch: rgba(200, 210, 255, 0.16); }
[data-mood='shop'] .felt { --t1: rgba(110, 80, 30, 0.38); --t2: rgba(20, 14, 6, 0.3); --t3: rgba(28, 20, 8, 0.74); }
[data-mood='over'] .felt { --t1: rgba(60, 70, 66, 0.4); --t2: rgba(8, 12, 10, 0.3); --t3: rgba(14, 20, 18, 0.76); }
.felt-imprint { position: absolute; left: 50%; top: 46%; width: min(46vh, 420px); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; opacity: 0.07; color: var(--cream); }
.felt-imprint svg { width: 100%; height: 100%; animation: sway 14s ease-in-out infinite; }
@keyframes sway { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }
.joker-bar { display: flex; align-items: flex-end; gap: 10px; position: relative; z-index: 5; padding-top: 4px; }
.joker-row { display: flex; gap: 12px; min-height: calc(var(--jw) * 1.36); }
.joker-count { font-family: var(--num); font-weight: 900; color: var(--muted); font-size: 13px; }
.joker-slot { width: var(--jw); height: calc(var(--jw) * 1.36); border-radius: 16px; border: 2px dashed rgba(251, 247, 234, 0.14); }
.boss-banner { position: absolute; z-index: 4; left: 50%; top: calc(var(--jw) * 1.36 + 30px); transform: translateX(-50%); white-space: nowrap; display: none; align-items: center; gap: 10px; padding: 5px 16px 5px 6px; font-size: 13px; color: #ffd6cc; background: rgba(60, 14, 20, 0.72); border: 1.5px solid rgba(255, 107, 74, 0.45); border-radius: 999px; }
.boss-banner.show { display: flex; }
.boss-banner .portrait.s { width: 34px; height: 34px; }
.boss-banner b { color: var(--cream); }
.boss-banner .rule-name { color: #ff9a80; font-weight: 900; }
.play-zone { min-height: calc(var(--cw) * 1.5); }
.hand-zone { height: calc(var(--cw) * 1.4 + 62px); margin: 0 calc(var(--cw) * 0.95) 0 0; }
.action-bar { display: flex; justify-content: center; align-items: center; gap: 14px; position: relative; z-index: 150; padding: 4px 0 8px; }
.action-bar .primary, .action-bar .danger { min-width: 128px; padding: 13px 24px; font-size: 20px; }
.sort { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); font-size: 12px; color: var(--muted); }
.sort > span { padding: 0 6px; }
.seg { padding: 6px 10px; border-radius: 10px; font-weight: 800; font-size: 13px; color: var(--muted); }
.seg.on { background: var(--cream); color: var(--ink); }
.deck-pile { position: absolute; right: 22px; bottom: 26px; width: calc(var(--cw) * 0.8); height: calc(var(--cw) * 1.12); z-index: 4; transition: transform 0.2s var(--spring); }
.deck-pile:hover { transform: translateY(-4px) rotate(-3deg); }
.deck-stack, .deck-stack::before, .deck-stack::after { position: absolute; inset: 0; border-radius: 10px; border: 2.5px solid var(--paper); background: radial-gradient(rgba(6, 35, 27, 0.28) 1.1px, transparent 1.4px) 0 0 / 8px 8px, linear-gradient(160deg, #d6ff85, var(--lime-2)); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); }
.deck-stack::before { content: ''; inset: -2.5px; transform: translate(-3px, -3px); }
.deck-stack::after { content: ''; inset: -2.5px; transform: translate(-6px, -6px); }
.deck-count { position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%); font-family: var(--num); font-weight: 900; font-size: 12px; color: var(--muted); }
.card-layer { position: absolute; inset: 0; pointer-events: none; z-index: 100; }
.select-hint { display: none; }
/* 角色说话：动森式圆气泡 */
.bubble { position: fixed; z-index: 420; max-width: 240px; padding: 9px 15px 10px; font-family: var(--display); font-weight: 800; font-size: 17px; line-height: 1.3; color: var(--ink); background: #fffdf4; border-radius: 20px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2), 0 10px 22px rgba(0, 0, 0, 0.3); transform-origin: 0 50%; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.bubble::before { content: ''; position: absolute; left: -7px; top: 50%; width: 16px; height: 16px; background: #fffdf4; border-radius: 3px; transform: translateY(-50%) rotate(45deg); }
.bubble.show { opacity: 1; }
.bubble.hype { background: var(--lime); color: var(--lime-ink); }
.bubble.hype::before { background: var(--lime); }
.bubble.worry { background: #ffe4da; color: var(--coral-3); }
.bubble.worry::before { background: #ffe4da; }

/* ---------------- 扑克牌：奶油色纸牌 ---------------- */

.card { position: absolute; left: 0; top: 0; width: var(--cw); height: calc(var(--cw) * 1.4); pointer-events: auto; cursor: pointer; touch-action: none; transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.25, 1.08); will-change: transform; perspective: 700px; user-select: none; -webkit-user-select: none; }
.card.dragging { cursor: grabbing; }
.card-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.35s var(--ease), scale 0.2s var(--spring); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); animation: idle 3.4s ease-in-out infinite; }
.card:nth-child(2n) .card-inner { animation-delay: -1.2s; } .card:nth-child(3n) .card-inner { animation-delay: -2.1s; }
@keyframes idle { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2.5px; } }
.card.hover .card-inner { scale: 1.07; }
.card.flipped .card-inner, .card.face-down .card-inner { transform: rotateY(180deg); }
.card-front, .card-back { position: absolute; inset: 0; border-radius: calc(var(--cw) * 0.13); backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.card-front { color: var(--suit); background: linear-gradient(170deg, #fffdf4, var(--paper) 60%, #efe4c6); box-shadow: inset 0 0 0 1.5px rgba(16, 32, 26, 0.08), inset 0 -3px 0 rgba(0, 0, 0, 0.05), 0 4px 0 rgba(0, 0, 0, 0.22), 0 10px 18px rgba(0, 0, 0, 0.35); }
.card.selected .card-front { box-shadow: 0 0 0 3px var(--lime), 0 0 22px rgba(202, 255, 96, 0.55), 0 12px 22px rgba(0, 0, 0, 0.4); }
.card.dragging .card-front { box-shadow: 0 0 0 2px var(--gold), 0 24px 30px rgba(0, 0, 0, 0.5); }
.suit-btc { --suit: var(--btc); } .suit-eth { --suit: var(--eth); } .suit-sol { --suit: var(--sol); } .suit-meme { --suit: var(--meme); }
.corner { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center; line-height: 0.9; }
.corner.tl { top: 6%; left: 8%; }
.corner.br { bottom: 6%; right: 8%; transform: rotate(180deg); }
.corner b { font-family: var(--num); font-size: calc(var(--cw) * 0.27); font-weight: 900; letter-spacing: -0.04em; color: var(--suit); }
.corner .corner-icon { width: calc(var(--cw) * 0.16); height: calc(var(--cw) * 0.16); margin-top: 3px; }
.pip-art { position: absolute; inset: 19% 21% 19% 23%; display: grid; place-items: center; grid-template-columns: repeat(2, 1fr); opacity: 0.94; }
.pip-art .pip { width: calc(var(--cw) * 0.15); height: calc(var(--cw) * 0.15); }
.pip-art[data-n='2'], .pip-art[data-n='3'] { grid-template-columns: 1fr; }
.pip-art[data-n='2'] .pip, .pip-art[data-n='3'] .pip { width: calc(var(--cw) * 0.2); height: calc(var(--cw) * 0.2); }
.pip-art[data-n='9'], .pip-art[data-n='10'] { grid-template-columns: repeat(3, 1fr); }
.pip-art[data-n='9'] .pip, .pip-art[data-n='10'] .pip { width: calc(var(--cw) * 0.13); height: calc(var(--cw) * 0.13); }
.ace-art { position: absolute; inset: 0; display: grid; place-items: center; }
.ace-coin { width: 58%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, color-mix(in oklab, var(--suit) 20%, #fff) 62%); box-shadow: inset 0 0 0 2.5px color-mix(in oklab, var(--suit) 45%, transparent), 0 3px 0 color-mix(in oklab, var(--suit) 28%, transparent); }
.ace-coin .suit-icon { width: 56%; height: 56%; color: var(--suit); }
.face-art { position: absolute; inset: 17% 13% 15%; border-radius: 42% 42% 10% 10%; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #fff, color-mix(in oklab, var(--suit) 30%, var(--paper))); box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--suit) 55%, transparent); }
.face-art img { width: 100%; height: 100%; object-fit: cover; }
.face-art.squishy img, .face-art.visitor img { object-fit: contain; transform: scale(1.35) translateY(10%); }
.face-art .letter { font-size: calc(var(--cw) * 0.36); color: var(--suit); text-shadow: none; }
.face-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 3px 3px; text-align: center; font-size: calc(var(--cw) * 0.1); font-weight: 900; color: #fff; background: color-mix(in oklab, var(--suit) 85%, black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-shine { position: absolute; inset: 0; background: radial-gradient(circle at var(--sx, 50%) var(--sy, 0%), rgba(255, 255, 255, 0.7), transparent 50%); opacity: 0; transition: opacity 0.2s; mix-blend-mode: soft-light; pointer-events: none; }
.card.hover .card-shine { opacity: 1; }
.card.debuffed .card-front > :not(.debuff-mark) { filter: grayscale(1) opacity(0.45); }
.debuff-mark { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--cw) * 0.7); font-weight: 900; color: rgba(217, 68, 42, 0.8); }
.card-back { transform: rotateY(180deg); border: 3px solid var(--paper); background: radial-gradient(rgba(6, 35, 27, 0.26) 1.1px, transparent 1.4px) 0 0 / 9px 9px, linear-gradient(160deg, #deff9a, var(--lime-2)); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.22), 0 10px 18px rgba(0, 0, 0, 0.35); }
.back-logo { position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: var(--felt-1); box-shadow: 0 0 0 3px var(--paper); }
.back-logo::before { content: ''; position: absolute; left: 27%; top: 38%; width: 12%; height: 12%; border-radius: 50%; background: var(--lime); box-shadow: calc(var(--cw) * 0.15) 0 0 var(--lime); }
.back-logo::after { content: ''; position: absolute; left: 30%; top: 55%; width: 40%; height: 18%; border-bottom: 3px solid var(--lime); border-radius: 0 0 50% 50%; }

/* ---------------- 捏捏牌 ---------------- */

.joker { position: relative; width: var(--jw); height: calc(var(--jw) * 1.36); flex: none; cursor: grab; touch-action: none; transition: transform 0.25s var(--ease); user-select: none; -webkit-user-select: none; }
.joker.dragging { z-index: 20; cursor: grabbing; transition: none; }
.cat-FEATS { --catc: var(--lime); --catc-2: var(--lime-3); --cat-ink: var(--lime-ink); }
.cat-TITLE { --catc: var(--coral); --catc-2: var(--coral-3); --cat-ink: #fff; }
.cat-SURVIVAL { --catc: var(--sky); --catc-2: var(--sky-3); --cat-ink: #0b2f45; }
.cat-ITEM { --catc: var(--gold); --catc-2: var(--gold-3); --cat-ink: var(--ink); }
.joker-inner {
  position: absolute; inset: 0; border-radius: calc(var(--jw) * 0.16); overflow: hidden; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; padding: 0 6% 6%;
  background: linear-gradient(172deg, #fffcef, #f1e6c6);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7), 0 4px 0 rgba(0, 0, 0, 0.28), 0 10px 20px rgba(0, 0, 0, 0.35);
  animation: jidle 4.2s ease-in-out infinite;
}
.joker:nth-child(2) .joker-inner { animation-delay: -1s; } .joker:nth-child(3) .joker-inner { animation-delay: -2.1s; } .joker:nth-child(4) .joker-inner { animation-delay: -3s; } .joker:nth-child(5) .joker-inner { animation-delay: -1.6s; }
@keyframes jidle { 0%, 100% { translate: 0 0; rotate: -0.6deg; } 50% { translate: 0 -3px; rotate: 0.6deg; } }
.joker:hover .joker-inner { scale: 1.05; }
.joker-top { width: 112%; margin: 0 -6%; padding: 3px 0 2px; text-align: center; font-size: calc(var(--jw) * 0.11); font-weight: 900; letter-spacing: 0.1em; background: var(--catc); color: var(--cat-ink); }
.cat-ITEM .joker-top { background: linear-gradient(90deg, #ffb36b, var(--gold), #c8f5e5); }
.joker-art {
  position: relative; flex: none; width: 80%; aspect-ratio: 1; margin-top: 7%; border-radius: 28%; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, #fff, rgba(255, 255, 255, 0.4) 40%, transparent 70%), color-mix(in oklab, var(--catc, #caff60) 30%, #fff);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9), inset 0 -6px 12px rgba(0, 0, 0, 0.08), 0 2px 0 rgba(0, 0, 0, 0.06);
}
.joker-art img { width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.25)); }
.photo-art img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.photo-art::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(60% 40% at 30% 20%, rgba(255, 255, 255, 0.5), transparent 60%); }
.photo-art .letter { font-size: calc(var(--jw) * 0.34); color: var(--catc-2, var(--ink)); text-shadow: none; }
.item-art img { width: 108%; height: 108%; transform: rotate(-10deg); }
.joker-art.emoji span { font-size: calc(var(--jw) * 0.38); line-height: 1; font-family: var(--num); font-weight: 900; }
.joker-title { margin-top: 5%; font-family: var(--display); font-weight: 800; font-size: calc(var(--jw) * 0.14); line-height: 1.12; text-align: center; max-height: 2.3em; overflow: hidden; }
.joker-owner { font-size: calc(var(--jw) * 0.095); color: var(--ink-2); opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.joker-counter { position: absolute; right: 6%; bottom: 5%; font-family: var(--num); font-weight: 900; font-size: calc(var(--jw) * 0.12); background: var(--ink); color: var(--lime); padding: 1px 6px; border-radius: 7px; }
.joker-sheen { position: absolute; inset: -40%; pointer-events: none; background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.55) 48%, transparent 54%); animation: sheen 5.5s ease-in-out infinite; }
.joker:nth-child(2) .joker-sheen { animation-delay: 1.1s; } .joker:nth-child(3) .joker-sheen { animation-delay: 2.2s; } .joker:nth-child(4) .joker-sheen { animation-delay: 3.3s; }
@keyframes sheen { 0%, 70% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
.rarity-uncommon .joker-inner { box-shadow: inset 0 0 0 2.5px var(--lime-2), 0 4px 0 rgba(0, 0, 0, 0.28), 0 10px 20px rgba(0, 0, 0, 0.35); }
.rarity-rare .joker-inner { box-shadow: inset 0 0 0 2.5px var(--gold-2), 0 4px 0 rgba(0, 0, 0, 0.28), 0 0 22px rgba(245, 223, 152, 0.45), 0 10px 20px rgba(0, 0, 0, 0.35); }
.rarity-rare .joker-inner::after { content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0.32; background: linear-gradient(125deg, #ff9a8b, #f5df98, #caff60, #7fd6c2, #a8b3ff, #ff9a8b); background-size: 300% 300%; animation: holo 4s linear infinite; }
@keyframes holo { to { background-position: 300% 0; } }
.joker.disabled .joker-inner { filter: grayscale(0.9) brightness(0.7); }
.joker-off { position: absolute; inset: 0; display: grid; place-items: center; }
.joker-off span { transform: rotate(-14deg); font-family: var(--display); font-weight: 800; font-size: calc(var(--jw) * 0.17); padding: 3px 9px; border: 2.5px solid var(--coral-2); color: var(--coral-2); border-radius: 10px; background: rgba(255, 245, 240, 0.92); }
.joker.compact { --jw: clamp(70px, 6.5vw, 92px); cursor: default; }
.joker.unknown { cursor: default; }
.joker.unknown .joker-inner { filter: grayscale(1) brightness(0.55); animation: none; }
.joker.unknown .joker-art .letter { color: var(--ink-2); text-shadow: none; }
.price-tag { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; padding: 2px 9px; border-radius: 999px; background: var(--ink); color: var(--gold); font-family: var(--num); font-weight: 900; font-size: 13px; }

/* ---------------- 覆盖层与面板 ---------------- */

.overlay { position: absolute; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(2, 14, 10, 0.5); }
.overlay.show { display: flex; }
.overlay.shop { top: calc(var(--jw) * 1.36 + 26px); align-items: flex-start; padding-top: 8px; background: linear-gradient(180deg, rgba(10, 7, 2, 0.15), rgba(10, 7, 2, 0.45)); }
.overlay.shop ~ .card-layer { display: none; }
.panel {
  position: relative; width: min(480px, 100%); max-height: 100%; overflow: auto; color: var(--ink); text-align: center;
  padding: 26px 26px 26px; border-radius: 30px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--paper-bg); outline: 2px dashed rgba(16, 32, 26, 0.09); outline-offset: -10px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.25), 0 30px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}
.panel h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.12; }
.panel .muted, .panel .fine { color: var(--ink-2); opacity: 0.85; }
.panel .ghost, .sheet-card .ghost { color: var(--ink); background: rgba(255, 255, 255, 0.6); box-shadow: inset 0 0 0 1.5px rgba(16, 32, 26, 0.22); }
.panel .ghost:hover:not(:disabled), .sheet-card .ghost:hover:not(:disabled) { background: #fff; box-shadow: inset 0 0 0 1.5px rgba(16, 32, 26, 0.4); }
.intro-eyebrow { color: var(--ink-2); opacity: 0.75; }
.intro-title { font-size: 46px !important; }
.chapter-sigil { --sig: var(--lime-3); position: relative; width: 176px; height: 176px; display: grid; place-items: center; margin: 4px 0; border-radius: 50%; background: radial-gradient(circle, #fff, #fbf3dc 70%); box-shadow: inset 0 0 0 5px color-mix(in oklab, var(--sig) 22%, transparent), 0 6px 0 rgba(16, 32, 26, 0.08); }
[data-mood='ch2'] .chapter-sigil { --sig: #2f9a86; }
[data-mood='ch3'] .chapter-sigil { --sig: var(--lav-3); }
.chapter-sigil svg { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); color: var(--sig); opacity: 0.4; animation: spinslow 40s linear infinite; }
@keyframes spinslow { to { rotate: 360deg; } }
.chapter-sigil .sigil-core { position: relative; display: flex; flex-direction: column; align-items: center; }
.chapter-sigil .sigil-core b { font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1.1; color: var(--ink); }
.chapter-sigil .sigil-core small { font-size: 10px; font-weight: 800; letter-spacing: 0.18em; color: var(--sig); }
.intro-stats { display: flex; gap: 28px; justify-content: center; margin: 2px 0 6px; }
.intro-stats div { display: flex; flex-direction: column; align-items: center; }
.intro-stats span { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.intro-stats b { font-family: var(--num); font-size: 28px; font-weight: 900; display: flex; align-items: center; gap: 4px; }
.target-big { color: var(--coral-2); }
.coach { display: flex; gap: 10px; list-style: none; padding: 0; margin: 2px 0; counter-reset: c; }
.coach li { counter-increment: c; flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 9px 10px 10px; border-radius: 16px; background: #fff; box-shadow: 0 3px 0 rgba(16, 32, 26, 0.08); font-size: 12px; color: var(--ink-2); text-align: left; }
.coach li b { font-family: var(--display); font-weight: 800; color: var(--ink); font-size: 16px; }
.coach li b::before { content: counter(c); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; font-family: var(--num); font-size: 12px; font-weight: 900; color: var(--lime-ink); background: var(--lime); vertical-align: 2px; }

/* Boss 登场：动森式对话——大立绘、白气泡、斜贴的名字小标签，字一个一个蹦出来 */
.boss-intro { width: min(860px, 100%); display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: center; text-align: left; gap: 10px 26px; padding: 30px 32px 30px; }
.boss-intro .boss-hero { position: relative; display: grid; place-items: center; min-height: 300px; }
.boss-intro .boss-hero .halo { inset: 2%; }
.boss-intro .boss-hero .portrait.xl { width: 280px; height: 280px; }
.boss-intro .boss-hero .portrait.xl.capsule-portrait { width: 240px; height: 240px; }
.boss-portrait { animation: bossin 0.7s var(--spring) both, bob 3s 0.7s ease-in-out infinite; }
@keyframes bossin { from { transform: translateY(-80px) scale(0.6) rotate(-10deg); opacity: 0; } }
.boss-text { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.boss-nameplate { display: flex; flex-direction: column; }
.boss-nameplate h2 { font-size: clamp(38px, 4.6vw, 56px) !important; line-height: 1 !important; color: var(--ink); }
.boss-nameplate small { margin-top: 6px; color: var(--ink-2); font-size: 14px; font-weight: 700; }
.dialogue { position: relative; width: 100%; min-height: 84px; margin-top: 10px; padding: 22px 20px 14px; border-radius: 28px; background: #fff; box-shadow: 0 4px 0 rgba(16, 32, 26, 0.08), inset 0 0 0 2px rgba(16, 32, 26, 0.05); font-family: var(--display); font-weight: 800; font-size: 21px; color: var(--ink); line-height: 1.45; }
.dialogue::before { content: attr(data-speaker); position: absolute; left: 16px; top: -15px; padding: 3px 14px 4px; border-radius: 999px; font-family: var(--display); font-weight: 800; font-size: 16px; color: #fff; background: var(--coral); box-shadow: 0 3px 0 var(--coral-3); transform: rotate(-3deg); white-space: nowrap; }
.k-final .dialogue::before { background: #ff9a3d; box-shadow: 0 3px 0 #b85f14; }
.dialogue .caret { display: inline-block; width: 0; height: 0; margin-left: 8px; vertical-align: middle; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 10px solid var(--coral); animation: nudge 0.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
.boss-intro .intro-stats { justify-content: flex-start; }
.boss-intro .primary { align-self: flex-start; }

.clear-title { font-size: 60px !important; color: var(--lime); --ol: #1d3606; text-shadow: var(--outline), 0 7px 0 var(--ol); }
.clear-score { display: flex; flex-direction: column; align-items: center; }
.clear-score span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.clear-score b { font-family: var(--num); font-size: 38px; font-weight: 900; line-height: 1.1; }
.clear-score small { color: var(--ink-2); }
.cash-rows { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.cash-row { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 14px; background: rgba(16, 32, 26, 0.06); opacity: 0; transform: translateX(-12px); transition: all 0.3s var(--spring); }
.cash-row.in { opacity: 1; transform: none; }
.cash-row b { font-family: var(--num); font-weight: 900; display: flex; align-items: center; gap: 4px; }
.cash-sum { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.cash-sum .big { font-family: var(--num); font-size: 34px; font-weight: 900; }

/* 扭蛋机：每个货位是一颗扭蛋，上半透明、下半是稀有度颜色 */
.shop-panel { width: min(860px, 100%); text-align: left; align-items: stretch; background: radial-gradient(rgba(16, 32, 26, 0.05) 1px, transparent 1.3px) 0 0 / 12px 12px, linear-gradient(175deg, #fff8e6, #f5e8c4 65%, #ead8a8); }
.shop-head { display: flex; align-items: center; gap: 14px; }
.shop-head > div:first-of-type { flex: 1; min-width: 0; }
.shop-head h2 { font-size: 30px; }
.shop-machine { width: 70px; height: auto; flex: none; margin: -6px 0 -10px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.22)); transform-origin: 50% 90%; }
.shop-coins { display: flex; align-items: center; gap: 8px; font-family: var(--num); font-size: 32px; font-weight: 900; padding: 6px 16px; border-radius: 18px; background: var(--ink); color: var(--gold); }
.offer-list { display: flex; flex-direction: column; gap: 10px; }
.offer { --cup: var(--lime-2); --ring: rgba(16, 32, 26, 0.1); position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 10px 16px 10px 10px; border-radius: 24px; text-align: left; background: #fffdf5; box-shadow: inset 0 0 0 2px var(--ring), 0 4px 0 rgba(16, 32, 26, 0.08); transition: transform 0.18s var(--spring), box-shadow 0.2s; }
.offer.rarity-uncommon { --cup: #36b596; --ring: rgba(54, 181, 150, 0.45); }
.offer.rarity-rare { --cup: #ff7a45; --ring: rgba(217, 184, 90, 0.8); box-shadow: inset 0 0 0 2px var(--ring), 0 4px 0 rgba(16, 32, 26, 0.08), 0 0 22px rgba(245, 190, 90, 0.35); }
.offer.rarity-level { --cup: var(--lav-2); --ring: rgba(154, 134, 240, 0.45); }
.offer:not(.sold):hover { transform: translateY(-2px) rotate(-0.3deg); }
.offer.sold { opacity: 0.4; filter: grayscale(0.8); }
.offer-medal { position: relative; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #ffffff 0 50%, var(--cup) 50% 100%); box-shadow: inset 0 0 0 2.5px rgba(16, 32, 26, 0.1), inset 0 -6px 0 rgba(0, 0, 0, 0.08), 0 4px 0 rgba(16, 32, 26, 0.12); }
.offer-medal::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(38% 28% at 30% 20%, rgba(255, 255, 255, 0.95), transparent 70%); pointer-events: none; }
.offer-medal .joker-art { width: 70%; margin: 0; border-radius: 50%; }
.offer:not(.sold):hover .offer-medal { animation: jiggle 0.5s var(--spring); }
@keyframes jiggle { 30% { transform: scale(1.08, 0.92); } 60% { transform: scale(0.96, 1.04); } }
.offer-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.offer-tags { display: flex; gap: 8px; align-items: center; font-size: 11px; font-weight: 800; }
.offer-tags .cat { padding: 1px 8px; border-radius: 999px; background: var(--catc, var(--paper-2)); color: var(--cat-ink, var(--ink)); }
.offer-tags .cat.lvl { background: var(--lav-2); color: #fff; }
.offer-tags .rar { color: var(--ink-3); }
.offer.rarity-uncommon .rar { color: #1f8a70; } .offer.rarity-rare .rar { color: #d0631f; }
.offer-title { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.2; color: var(--ink); }
.offer-desc { font-size: 14px; font-weight: 800; color: var(--ink); }
.offer-line { font-size: 14px; color: var(--ink-2); font-family: var(--display); font-weight: 800; }
.offer-owner { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.offer-owner .avatar-dot { width: 20px; height: 20px; font-size: 10px; }
.offer-buy { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.offer-buy .price { display: flex; align-items: center; gap: 5px; font-family: var(--num); font-size: 22px; font-weight: 900; color: var(--ink); }
.price.free { font-family: var(--display) !important; font-weight: 400 !important; font-size: 20px !important; color: var(--lime-3) !important; }
.buy-btn { padding: 8px 16px; font-size: 16px; }
.buy-btn.cant { filter: grayscale(0.85) brightness(0.9); opacity: 0.8; }
.sold-label { font-weight: 800; color: var(--ink-2); opacity: 0.65; padding: 9px; }
.level-medal { width: 72%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #efe9ff, var(--lav) 60%, var(--lav-2)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8); }
.level-medal b { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--lav-3); }
.shop-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; padding-top: 12px; border-top: 1.5px dashed rgba(16, 32, 26, 0.15); }
.shop-hint { margin: 0; font-size: 12px; color: var(--ink-2); flex: 1 1 220px; }
.next-preview { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.next-preview .blind-chip { width: 30px; height: 30px; font-size: 14px; }
.loot-panel { box-shadow: 0 10px 0 rgba(0, 0, 0, 0.25), 0 30px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 3px var(--gold), 0 0 50px rgba(245, 223, 152, 0.35) !important; }
.loot-panel .shop-head .intro-eyebrow { color: var(--coral-2); opacity: 1; }

.result-panel { width: min(560px, 100%); }
.result-panel.lost { box-shadow: 0 10px 0 rgba(0, 0, 0, 0.25), 0 30px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 3px rgba(255, 107, 74, 0.35); }
.result-title { font-size: 62px !important; }
.result-panel.won .result-title { color: var(--lime); --ol: #1d3606; text-shadow: var(--outline), 0 7px 0 var(--ol); }
.result-panel.lost .result-title { color: var(--coral); --ol: #5a1508; text-shadow: var(--outline), 0 7px 0 var(--ol); }
.result-sub { margin: -6px 0 2px; color: var(--ink-2); font-family: var(--display); font-weight: 800; font-size: 18px; }
.result-hero { display: flex; align-items: center; gap: 18px; text-align: left; }
.result-numbers { display: flex; flex-direction: column; gap: 2px; }
.result-numbers .label { font-size: 12px; font-weight: 800; color: var(--ink-2); }
.result-total { font-family: var(--num); font-size: 56px; font-weight: 900; line-height: 1; }
.result-label { font-weight: 800; color: var(--ink-2); }
.result-ranks { display: flex; flex-direction: column; font-size: 13px; font-weight: 700; color: var(--lime-3); margin-top: 6px; }
.best-hand { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: rgba(16, 32, 26, 0.06); }
.best-hand .label { font-size: 12px; font-weight: 800; color: var(--ink-2); writing-mode: vertical-rl; }
.mini-cards { --cw: 40px; display: flex; gap: 3px; }
.mini-cards .card, .deck-grid .card { position: relative; transform: none !important; pointer-events: none; }
.mini-cards .card-inner, .deck-grid .card-inner { animation: none; }
.best-meta { display: flex; flex-direction: column; margin-left: auto; text-align: right; }
.best-meta b { font-family: var(--display); font-weight: 800; font-size: 20px; }
.best-meta span { font-family: var(--num); font-weight: 900; }
.versus { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px; border-radius: 18px; background: rgba(16, 32, 26, 0.06); }
.versus.win { background: rgba(159, 216, 58, 0.2); }
.vs-side { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vs-side b { font-family: var(--num); font-weight: 900; font-size: 22px; }
.vs-side small { color: var(--ink-2); }
.vs { font-family: var(--display); font-weight: 800; font-size: 30px; color: var(--coral-2); }
.versus p { grid-column: 1 / -1; margin: 0; font-weight: 700; font-size: 13px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.small-panel .row { justify-content: center; }
.table-panel { width: min(520px, 100%); }
.hand-table { width: 100%; border-collapse: collapse; font-weight: 700; }
.hand-table td { padding: 6px 8px; border-bottom: 1px solid rgba(16, 32, 26, 0.08); text-align: left; }
.hand-table .lv { font-family: var(--num); color: var(--ink-2); }
.hand-table .c { color: var(--lime-3); font-family: var(--num); font-weight: 900; text-align: right; }
.hand-table .m { color: var(--coral-2); font-family: var(--num); font-weight: 900; }
.hand-table .x { color: var(--ink-2); text-align: center; }
.hand-table .n { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.deck-panel { width: min(900px, 100%); }
.deck-grid { display: flex; flex-direction: column; gap: 6px; --cw: clamp(30px, 4.2vw, 50px); }
.deck-row { display: flex; gap: 3px; justify-content: center; }
.deck-grid .card.gone { opacity: 0.18; filter: grayscale(1); }
.deck-grid .card.in-hand .card-front { box-shadow: 0 0 0 2.5px var(--lime-2), 0 3px 0 rgba(0, 0, 0, 0.15); }

/* ---------------- 弹层（分享 / 玩法 / 图鉴） ---------------- */

.sheet { position: fixed; inset: 0; z-index: 700; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(2, 14, 10, 0.6); animation: fadein 0.2s; }
.sheet.out { animation: fadeout 0.25s forwards; }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
.sheet-card { position: relative; width: min(720px, 100%); max-height: calc(100dvh - 40px); overflow: auto; color: var(--ink); padding: 26px 28px; border-radius: 30px; background: var(--paper-bg); outline: 2px dashed rgba(16, 32, 26, 0.08); outline-offset: -10px; box-shadow: 0 10px 0 rgba(0, 0, 0, 0.25), 0 30px 60px rgba(0, 0, 0, 0.5); animation: sheetin 0.4s var(--spring); }
@keyframes sheetin { from { transform: translateY(40px) scale(0.97); opacity: 0; } }
.sheet-card h2 { font-family: var(--display); font-weight: 800; font-size: 31px; margin: 4px 0 6px; }
.sheet-card .muted, .sheet-card .fine { color: var(--ink-2); }
.sheet-close { position: absolute; right: 14px; top: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; color: var(--ink); background: rgba(16, 32, 26, 0.08); }
.sheet-close:hover { background: rgba(16, 32, 26, 0.15); }
.pick-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.pick { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgba(16, 32, 26, 0.06); font-weight: 700; font-size: 13px; transition: transform 0.15s var(--spring); }
.pick:hover { transform: translateY(-1px); }
.pick .avatar-dot { width: 26px; height: 26px; font-size: 12px; }
.pick.on { background: var(--lime); box-shadow: 0 3px 0 var(--lime-3); }
.share-canvas canvas { width: 100%; height: auto; border-radius: 18px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.share-text { width: 100%; margin: 12px 0; padding: 12px; border-radius: 16px; border: 1.5px solid rgba(16, 32, 26, 0.15); background: #fff; color: var(--ink); resize: vertical; font-size: 14px; }
.rules-list { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.rules-list b { color: var(--lime-3); }
.sheet-card.wide { width: min(1000px, 100%); }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 10px; margin-top: 14px; --jw: 92px; }
.collection-grid .joker { cursor: default; }
.ach-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 12px; }
.ach-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: rgba(16, 32, 26, 0.06); opacity: 0.55; }
.ach-row.got { opacity: 1; background: #fff; box-shadow: 0 3px 0 rgba(16, 32, 26, 0.08); }
.ach-row b { display: block; font-family: var(--display); font-weight: 800; font-size: 17px; }
.ach-row span { font-size: 12px; color: var(--ink-2); }
.ach-medal { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f3ffd0, var(--lime) 55%, var(--lime-2)); box-shadow: 0 3px 0 var(--lime-3); color: var(--lime-ink); font-weight: 900; font-size: 20px; }
.ach-row:not(.got) .ach-medal { background: var(--paper-2); box-shadow: 0 3px 0 var(--paper-3); color: var(--ink-3); }

/* ---------------- 挑战帖落地页 ---------------- */

.ch-hero { max-width: 1100px; margin: 10px auto 0; padding: 0 clamp(16px, 5vw, 60px); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.ch-from { display: flex; gap: 16px; align-items: center; }
.ch-title { margin: 8px 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4vw, 44px); }
.ch-score { font-family: var(--num); font-weight: 800; font-size: clamp(56px, 9vw, 110px); line-height: 0.95; color: var(--lime); --ol: #1d3606; text-shadow: var(--outline), 0 9px 0 var(--ol), 0 18px 24px rgba(0, 0, 0, 0.3); }
.ch-targets .row { margin-top: 8px; }
.ch-target { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.ch-target.me small { color: var(--lime); font-weight: 800; }
.ch-body { max-width: 1100px; margin: 20px auto 0; padding: 0 clamp(16px, 5vw, 60px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.ch-cta { display: flex; flex-direction: column; align-items: flex-start; }
.big-capsule-box { display: flex; justify-content: center; }
.big-capsule { position: relative; width: 260px; height: 330px; display: grid; place-items: center; touch-action: manipulation; }
.big-capsule .bc-top { position: absolute; top: 0; left: 0; right: 0; height: 62%; border-radius: 999px 999px 26px 26px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(70% 60% at 30% 20%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08) 60%); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7); }
.big-capsule .bc-top .portrait { filter: blur(0.6px); }
.big-capsule .bc-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 44%; border-radius: 26px 26px 999px 999px / 26px 26px 80% 80%; background: linear-gradient(180deg, #dfff9e, #7fb52a); box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.45), 0 12px 0 rgba(0, 0, 0, 0.25); overflow: hidden; }
.big-capsule .bc-bottom::before { content: ''; position: absolute; left: -4px; right: -4px; top: 18px; height: 22px; background: repeating-linear-gradient(45deg, var(--gold) 0 12px, var(--ink) 12px 24px); opacity: 0.85; }
.big-capsule .bc-hint { position: absolute; bottom: 36px; z-index: 2; font-family: var(--display); font-weight: 800; color: var(--lime-ink); font-size: 18px; background: var(--cream); padding: 6px 14px; border-radius: 999px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); }
.big-capsule:hover { animation: jiggle 0.6s var(--spring); }
.revealed { display: flex; flex-direction: column; align-items: center; text-align: center; }
.revealed h3 { font-family: var(--display); font-weight: 800; font-size: 30px; margin: 6px 0 0; }
.reveal-jokers { display: flex; gap: 10px; perspective: 800px; --jw: clamp(86px, 9vw, 110px); }
.ch-not-tagged h3 { font-family: var(--display); font-weight: 800; font-size: 28px; margin: 0 0 6px; }

/* ---------------- 开屏：一百万美元 ---------------- */

.splash { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.splash.leaving { opacity: 0; transform: scale(1.06); filter: blur(2px); }
.splash-inner { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 960px; }
.splash-inner > * { animation: rise 0.8s var(--spring) both; }
.splash-inner > :nth-child(2) { animation-delay: 0.15s; } .splash-inner > :nth-child(3) { animation-delay: 0.3s; } .splash-inner > :nth-child(4) { animation-delay: 0.45s; }
.splash-inner > :nth-child(5) { animation-delay: 0.6s; } .splash-inner > :nth-child(6) { animation-delay: 0.8s; } .splash-inner > :nth-child(7) { animation-delay: 1s; } .splash-inner > :nth-child(8) { animation-delay: 1.1s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.96); } }
.splash-lead { margin-top: 18px; font-family: var(--display); font-weight: 800; font-size: clamp(24px, 2.8vw, 36px); color: var(--cream); }
.splash-prize { display: flex; align-items: flex-start; line-height: 0.9; margin-top: 8px; }
.splash-cur { font-family: var(--num); font-weight: 800; font-size: clamp(48px, 6vw, 84px); color: var(--gold); margin-top: 0.14em; --ol: #5a3d0c; text-shadow: var(--outline), 0 7px 0 var(--ol); }
.splash-num { font-family: var(--num); font-weight: 800; font-size: clamp(76px, 12.5vw, 188px); letter-spacing: 0; color: #fff3c4; font-variant-numeric: tabular-nums; --ol: #5a3d0c; text-shadow: var(--outline), 0 9px 0 var(--gold-2), 0 13px 0 var(--ol), 0 26px 30px rgba(0, 0, 0, 0.35); }
.splash-num.landed { animation: landed 0.6s var(--spring); }
@keyframes landed { 30% { transform: scale(1.08) rotate(-1.5deg); } }
.splash-unit { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 2.4vw, 32px); letter-spacing: 0.2em; color: var(--cream); margin-top: 6px; }
.splash-hw { display: flex; align-items: center; gap: clamp(20px, 4vw, 56px); margin: 26px 0 10px; }
.splash-device { position: relative; width: clamp(150px, 15vw, 210px); height: clamp(190px, 21vw, 290px); display: grid; place-items: center; }
.splash-device img { position: relative; z-index: 1; height: clamp(180px, 19vw, 270px); width: auto; max-width: none; transform: rotate(-10deg); filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.45)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -10px; rotate: 3deg; } }
.splash-counts { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.splash-counts div { display: flex; align-items: baseline; gap: 10px; }
.splash-counts b { font-family: var(--num); font-weight: 900; font-size: clamp(34px, 4vw, 54px); color: var(--cream); text-shadow: 0 4px 0 var(--felt-3); }
.splash-counts span { font-weight: 800; font-size: 17px; color: var(--gold); }
.splash-ways { list-style: none; padding: 0; margin: 12px 0 26px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.splash-ways li { display: flex; flex-direction: column; gap: 2px; padding: 10px 18px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); min-width: 180px; }
.splash-ways b { font-family: var(--display); font-weight: 800; color: var(--lime); font-size: 19px; }
.splash-ways span { color: var(--cream); font-size: 13px; opacity: 0.85; }
.splash-enter { font-size: 28px; padding: 18px 46px 15px; }

/* 大厅奖池横幅 */
.prize-ribbon {
  position: relative; z-index: 10; max-width: 1320px; margin: 0 auto 4px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  width: calc(100% - clamp(32px, 10vw, 160px)); padding: 8px 18px; border-radius: 20px;
  background: linear-gradient(90deg, rgba(202, 255, 96, 0.16), rgba(4, 26, 20, 0.62) 32%, rgba(4, 26, 20, 0.62) 68%, rgba(245, 223, 152, 0.18));
  border: 1.5px solid rgba(245, 223, 152, 0.3);
}
.prize-ribbon span { font-size: 12px; font-weight: 700; color: var(--muted); }
.prize-ribbon b { font-family: var(--num); font-weight: 900; color: var(--cream); }
.rb-pool { display: flex; align-items: baseline; gap: 8px; }
.rb-pool span { color: var(--lime); }
.rb-pool b { font-size: 26px; color: var(--gold); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); }
.rb-hw { display: flex; align-items: center; gap: 8px; }
.rb-hw img { width: 30px; transform: rotate(-12deg); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.35)); }
.rb-hw span { color: var(--cream); font-size: 13px; }
.rb-draw, .rb-tickets { display: flex; align-items: baseline; gap: 8px; }
.rb-draw { margin-left: auto; }
.rb-draw b { font-size: 18px; font-variant-numeric: tabular-nums; min-width: 9ch; }
.rb-tickets b { font-size: 18px; color: var(--lime); }
.rb-tickets.locked b { font-family: var(--body); font-size: 13px; color: var(--muted); }

/* ---------------- 钩子：追人、战利品、成就、图鉴、打卡 ---------------- */

.rival { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: 16px; background: rgba(255, 107, 74, 0.1); border: 1px solid rgba(255, 107, 74, 0.28); }
.rival > div { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--muted); }
.rv-rank b { font-family: var(--num); font-weight: 900; font-size: 20px; color: var(--cream); }
.rv-rank small { font-family: var(--num); color: var(--muted); }
.rv-next b { font-family: var(--num); font-weight: 900; font-size: 15px; color: #ff9a80; }
.rv-next span:last-child { color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-next.top b { color: var(--lime); font-family: var(--display); font-weight: 800; }
.rv-pb b { font-family: var(--num); font-weight: 900; color: var(--gold); }
.rv-pb.beat span { color: var(--lime); font-weight: 900; }

.achievement {
  position: fixed; left: 50%; top: 18px; z-index: 1100; transform: translate(-50%, -150%); display: flex; align-items: center; gap: 12px; padding: 10px 22px 10px 12px;
  background: var(--cream); color: var(--ink); border-radius: 22px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25), 0 18px 40px rgba(0, 0, 0, 0.35);
  animation: achin 0.5s var(--spring) forwards;
}
.achievement.out { animation: achout 0.4s var(--ease) forwards; }
@keyframes achin { to { transform: translate(-50%, 0); } }
@keyframes achout { from { transform: translate(-50%, 0); } to { transform: translate(-50%, -150%); opacity: 0; } }
.achievement small { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.16em; color: var(--lime-3); }
.achievement b { display: block; font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.2; }
.achievement span { font-size: 12px; color: var(--ink-2); }

.new-best { display: inline-flex; align-items: baseline; gap: 10px; padding: 4px 16px 5px; font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--lime-ink); background: var(--lime); border-radius: 999px; box-shadow: 0 4px 0 var(--lime-3), 0 0 24px rgba(202, 255, 96, 0.55); animation: landed 0.8s var(--spring); }
.new-best small { font-family: var(--body); font-size: 12px; font-weight: 800; }
.near-miss { font-weight: 800; font-size: 17px; color: var(--ink); }
.near-miss b { font-family: var(--num); font-size: 26px; color: var(--coral-2); }
.ticket-line { width: 100%; display: flex; align-items: baseline; gap: 10px; justify-content: center; padding: 8px 12px; border-radius: 16px; background: rgba(202, 255, 96, 0.22); }
.ticket-line span { font-size: 13px; color: var(--ink-2); }
.ticket-line b { font-family: var(--num); font-size: 20px; color: var(--lime-ink); }
.ticket-line em { font-style: normal; font-family: var(--num); font-weight: 900; font-size: 15px; color: var(--lime-ink); background: var(--lime); padding: 0 9px; border-radius: 999px; box-shadow: 0 2px 0 var(--lime-3); animation: landed 0.8s 0.6s var(--spring) both; }

.extras { max-width: 1320px; margin: 26px auto 0; padding: 0 clamp(16px, 5vw, 80px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.extra-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; text-align: left; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); transition: transform 0.18s var(--spring), border-color 0.2s; }
button.extra-card:hover { transform: translateY(-3px); border-color: rgba(251, 247, 234, 0.3); }
.extra-card small { display: block; font-size: 11px; color: var(--lime); letter-spacing: 0.08em; font-weight: 800; }
.extra-card b { display: block; font-family: var(--display); font-weight: 800; font-size: 18px; line-height: 1.25; }
.extra-card span { display: block; font-size: 12px; color: var(--muted); }
.extra-num { flex: none; min-width: 64px; display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.extra-num b { font-family: var(--num); font-weight: 900; font-size: 34px; color: var(--gold); }
.extra-num small { font-family: var(--num); font-size: 13px; color: var(--muted); letter-spacing: 0; }
.streak .extra-num b { color: #ffa066; }
.teaser-shadow .portrait img, .teaser-shadow .capsule-shell { filter: brightness(0) drop-shadow(0 0 6px rgba(202, 255, 96, 0.7)) !important; }
.teaser-shadow .capsule-base { display: none; }
.teaser-shadow .portrait.m { width: 64px; height: 64px; }
.teaser b { letter-spacing: 0.14em; color: var(--lime) !important; }

/* 最后一手：牌桌边缘泛红脉动 */
.felt.tense { animation: tense 1.1s ease-in-out infinite; }
@keyframes tense { 50% { box-shadow: inset 0 0 0 2px rgba(255, 107, 74, 0.7), inset 0 0 130px rgba(255, 107, 74, 0.28), 0 20px 40px rgba(0, 0, 0, 0.25); } }

/* ---------------- 顺滑：换页、合成层 ---------------- */

::view-transition-old(root) { animation: vt-out 0.28s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(1.03); filter: blur(3px); } }
@keyframes vt-in { from { opacity: 0; transform: scale(0.98); filter: blur(3px); } }
.card, .joker-inner, .squishy-seat .portrait, .me-stage .portrait, .bob, .cloud-capsule, .halo i { will-change: transform; }
#bg { will-change: contents; }
.chips-box, .mult-box, .round-score-num { font-variant-numeric: tabular-nums; }

/* ---------------- 窄屏 ---------------- */

@media (max-width: 1100px) {
  .boss-cards { grid-template-columns: 1fr; }
  .lobby-grid { grid-template-columns: 1fr; }
  .ch-body { grid-template-columns: 1fr; }
  .extras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boss-intro { grid-template-columns: 1fr; text-align: center; }
  .boss-text { align-items: center; }
  .boss-intro .intro-stats { justify-content: center; }
  .boss-intro .primary { align-self: center; }
  .dialogue { text-align: left; }
}

@media (max-width: 860px) {
  .demo { display: none; }
  .topbar { gap: 10px; }
  .nav { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .hero-stage { order: -1; }
  .portrait.xl { width: 210px; height: 210px; }
  .title { font-size: 88px; }
  .friend { grid-template-columns: 1fr; }
  .board-row { grid-template-columns: 28px 30px minmax(0, 1fr) 24px 86px; }
  .board-row .reach { display: none; }
  .faction-row { grid-template-columns: 1fr; }
  .boss-intro { padding: 24px 20px; }
  .boss-intro .boss-hero { min-height: 190px; }
  .boss-intro .boss-hero .portrait.xl { width: 180px; height: 180px; }
  .prize-ribbon { gap: 10px 16px; }
  .rb-hw { display: none; }
  .rb-draw { margin-left: 0; }
  .splash-hw { flex-direction: column; gap: 6px; }
  .splash-counts { text-align: center; }
  .splash-counts div { justify-content: center; }

  .table-screen { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); padding: 8px; gap: 8px; }
  .side { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; padding: 8px 10px; border-radius: 20px; overflow: visible; }
  .side .blind-panel { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; padding: 6px 8px; }
  .side .blind-panel .rule-chip { font-size: 11px; }
  .seat-row { display: contents; }
  .seat-wrap { grid-row: span 2; }
  .seat-wrap .halo { display: none; }
  .squishy-seat .portrait { width: 76px; height: 76px; }
  .seat-name { display: none; }
  .score-panel { gap: 4px; }
  .round-score-num { font-size: 26px; }
  .round-score .label { display: none; }
  .hand-name { font-size: 20px; min-height: 24px; }
  .chips-box, .mult-box { font-size: 20px; padding: 4px 5px 5px; }
  .calc-cap { display: none; }
  .stats { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .stat { padding: 5px 8px; }
  .stat b { font-size: 17px; }
  .rival { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 2px 14px; padding: 6px 10px; }
  .ante-track, .side-tools { display: none; }
  .felt { --cw: clamp(46px, 13.2vw, 76px); --jw: clamp(52px, 15vw, 70px); padding: 10px; border-radius: 22px; }
  .felt::before { inset: 6px; border-radius: 17px; }
  .joker-row { gap: 5px; }
  .action-bar { gap: 8px; }
  .action-bar .primary, .action-bar .danger { min-width: 0; padding: 11px 16px; font-size: 17px; }
  .sort > span { display: none; }
  .hand-zone { margin-right: 0; }
  .deck-pile { display: none; }
  .felt-imprint { width: 60vw; }
  .shop-machine { display: none; }
  .offer { grid-template-columns: auto 1fr; }
  .offer-buy { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
  .offer-medal { width: 60px; height: 60px; }
  .result-hero { flex-direction: column; text-align: center; }
  .result-total { font-size: 46px; }
  .result-title { font-size: 52px !important; }
}

@media (max-width: 560px) {
  .splash { padding: 22px 14px; }
  .splash .kicker { font-size: 10px; letter-spacing: 0.12em; flex-wrap: wrap; justify-content: center; text-align: center; }
  .splash-lead { font-size: 21px; margin-top: 12px; }
  .splash-cur { font-size: 7.5vw; }
  .splash-num { font-size: 15.5vw; }
  .splash-unit { font-size: 18px; letter-spacing: 0.14em; }
  .splash-hw { margin: 16px 0 6px; }
  .splash-device { height: 190px; width: 150px; }
  .splash-device img { height: 180px; }
  .splash-counts b { font-size: 32px; }
  .splash-counts span { font-size: 14px; }
  .splash-ways { flex-direction: column; align-items: stretch; width: 100%; margin: 10px 0 20px; }
  .splash-ways li { min-width: 0; padding: 8px 14px; flex-direction: row; justify-content: space-between; align-items: baseline; }
  .splash-enter { width: 100%; }
  .kicker { font-size: 10px; letter-spacing: 0.12em; }
  .title { font-size: 80px; }
  .prize-ribbon { width: calc(100% - 20px); padding: 8px 12px; }
  .rb-pool b { font-size: 22px; }
  .extras { grid-template-columns: 1fr; gap: 10px; }
  .boss-card { padding: 12px; }
  .coach { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
