/* 保皇 · 墨绿呢桌布 + 琉璃黄 + 报纸帽 */
:root {
  --wall: #2a5a3e;
  --wall-deep: #1b3b2a;
  --wall-dark: #10241a;
  --tile: #e9b54a;
  --tile-deep: #b9862a;
  --paper: #fbf5e6;
  --ink: #231a14;
  --cinnabar: #c8321e;
  --jade: #4fa78c;
  --news: #ded7c4;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --cw: 42px;  /* 手牌宽 */
  --t-in: .22s; --t-out: .16s; --ease-out: cubic-bezier(.2,.8,.3,1); --ease-pop: cubic-bezier(.2,.8,.3,1.4);
  --ch: 60px;
  --overlap: -17px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans); color: var(--paper); overflow: hidden;
  background: radial-gradient(120% 80% at 50% 35%, var(--wall) 0%, var(--wall-deep) 60%, var(--wall-dark) 100%);
  background-color: var(--wall-deep);
  -webkit-font-smoothing: antialiased;
}
/* 呢子桌布的细纹 + 四角压暗 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.025) 0 1px, transparent 1px 3px),
    radial-gradient(90% 70% at 50% 40%, transparent 55%, rgba(0,0,0,.35) 100%);
}
.screen { position: relative; z-index: 1; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--tile); outline-offset: 2px; }
::selection { background: rgba(233,181,74,.45); }
.hidden { display: none !important; }
.screen { height: 100dvh; display: flex; flex-direction: column; }
#game { flex-direction: row; }
#game .main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100dvh; }
.side { display: none; width: 300px; flex: none; height: 100dvh; overflow: auto; position: relative; transition: width .28s var(--ease-out); background: linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.36)); border-left: 1px solid rgba(233,181,74,.16); box-shadow: inset 1px 0 0 rgba(255,255,255,.03); }
.side-inner { padding: 14px 14px max(14px, env(safe-area-inset-bottom)); }
.ticker { font-size: 12px; color: var(--news); padding: 3px 14px 0; min-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.ticker:not(:empty)::before { content: "◆"; color: var(--tile); font-size: 8px; margin-right: 6px; vertical-align: 1px; }
.ticker.flash-in { animation: tick .4s cubic-bezier(.2,.8,.3,1); }
@keyframes tick { from { opacity: 0; transform: translateY(-5px); } }

/* 近况面板内容（桌面右栏和手机弹层共用） */
.sv h3 { font-family: var(--serif); font-weight: 900; font-size: 13px; margin: 14px 0 6px; color: var(--tile); letter-spacing: .12em; display: flex; align-items: center; gap: 8px; }
.sv h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(233,181,74,.35), transparent); }
.sv h3:first-child { margin-top: 0; }
.sv .stage, .sv .kv, .sv .trick-list, .sv .places, .sv .feed { background: rgba(0,0,0,.16); border-radius: 10px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.04); }
.sv .stage { font-size: 15px; font-weight: 700; }
.sv .stage + .kv { margin-top: 6px; }
.sv .kv { font-size: 13px; line-height: 1.7; }
.sv .kv b { color: var(--tile); font-weight: 700; }
.sv .trick-list { font-size: 13px; line-height: 1.8; }
.sv .trick-list .me { color: var(--tile); }
.sv .trick-list .pass { opacity: .6; }
.sv .trick-list + .muted { display: block; margin-top: 6px; padding: 0 2px; }
.sv .feed { font-size: 12.5px; line-height: 1.7; }
.sv .feed div { padding: 3px 0; border-bottom: 1px dashed rgba(251,245,230,.12); }
.sv .feed div:last-child { border-bottom: 0; }
.sv .feed div:first-child { color: var(--paper); font-weight: 600; }
.sv .feed div:not(:first-child) { opacity: .8; }
.sv .muted { opacity: .6; font-size: 12px; }
.sv .places { font-size: 13px; line-height: 1.7; }
.sv .places .pl { display: inline-block; width: 38px; color: var(--tile); font-family: var(--serif); font-weight: 900; }
.sheet .sv { color: var(--ink); }
.sheet .sv h3 { color: var(--tile-deep); }
.sheet .sv h3::after { background: linear-gradient(90deg, rgba(185,134,42,.4), transparent); }
.sheet .sv .stage, .sheet .sv .kv, .sheet .sv .trick-list, .sheet .sv .places, .sheet .sv .feed { background: rgba(35,26,20,.05); border-color: rgba(35,26,20,.06); }
.sheet .sv .kv b, .sheet .sv .trick-list .me, .sheet .sv .places .pl { color: var(--cinnabar); }
.sheet .sv .feed div { border-color: rgba(35,26,20,.12); }
.sheet .sv .feed div:first-child { color: var(--ink); }

/* ---------- 按钮 ---------- */
.btn { border: 0; border-radius: 12px; padding: 11px 20px; font-weight: 700; letter-spacing: .05em; position: relative; transition: transform .14s cubic-bezier(.2,.8,.3,1.4), opacity .2s, box-shadow .2s, filter .2s; }
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .35; pointer-events: none; filter: saturate(.5); }
.btn-gold {
  background: linear-gradient(170deg, #ffe08f 0%, #f3c862 38%, var(--tile-deep) 100%); color: var(--ink);
  box-shadow: 0 2px 0 #7d5814, 0 6px 16px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.55);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.btn-ghost { background: rgba(251,245,230,.1); border: 1px solid rgba(251,245,230,.22); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.btn-red { background: linear-gradient(170deg, #e04a35, var(--cinnabar)); color: var(--paper); box-shadow: 0 2px 0 #7a1a0e, 0 6px 16px rgba(0,0,0,.25); }
@media (hover: hover) {
  .btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
  .btn-gold:hover:not(:disabled) { box-shadow: 0 3px 0 #7d5814, 0 10px 24px rgba(233,181,74,.3), inset 0 1px 0 rgba(255,255,255,.55); }
  .btn:active:not(:disabled) { transform: scale(.96); }
  .icon:hover, .chip:hover { background: rgba(0,0,0,.32); border-color: rgba(233,181,74,.6); }
  .link:hover { color: #f6d57d; }
}
.link { background: none; border: 0; color: var(--tile); text-decoration: underline; text-underline-offset: 3px; padding: 8px; transition: color .2s; }
.icon.off { opacity: .4; }
/* 顶栏工具：一条玉牌似的横条，里面是统一的线条图标 */
.tools { display: flex; align-items: center; height: 34px; padding: 0 2px; border-radius: 17px; border: 1px solid rgba(233,181,74,.28); background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.42)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 6px rgba(0,0,0,.25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tools .icon { width: 32px; height: 30px; border: 0; border-radius: 15px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--tile); }
.tools .icon + .icon { margin-left: -1px; }
.tools .icon.off { opacity: .35; }
.tools .icon:active { transform: scale(.88); background: rgba(233,181,74,.14); }
.icon { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(251,245,230,.22); background: rgba(0,0,0,.2); font-size: 15px; display: grid; place-items: center; padding: 0; transition: background .2s, border-color .2s, transform .12s, opacity .2s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.icon:active { transform: scale(.9); }
svg.ic { width: 19px; height: 19px; display: block; filter: drop-shadow(0 1px 0 rgba(0,0,0,.35)); }
.emote-fab svg.ic { width: 20px; height: 20px; color: var(--tile); }
.mic-btn svg.ic { width: 17px; height: 17px; color: var(--paper); }
.mic-btn.on svg.ic { color: #d9f5ea; }
.chip { border: 1px dashed rgba(233,181,74,.6); background: rgba(0,0,0,.22); border-radius: 999px; padding: 6px 12px; font-size: 13px; transition: background .2s, border-color .2s; }
.chip b { color: var(--tile); letter-spacing: .1em; }

/* ---------- 大厅 ---------- */
#login { overflow: auto; padding: 16px 24px; }
.lobby-inner { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
#login::before, #hall::before { /* 花色暗纹 */
  content: ""; position: fixed; inset: -20%; z-index: -1; opacity: .07; pointer-events: none;
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23fbf5e6' font-size='22' font-family='serif' text-anchor='middle'%3E%3Ctext x='30' y='36'%3E%E2%99%A0%3C/text%3E%3Ctext x='90' y='36'%3E%E2%99%A5%3C/text%3E%3Ctext x='30' y='96'%3E%E2%99%A3%3C/text%3E%3Ctext x='90' y='96'%3E%E2%99%A6%3C/text%3E%3C/g%3E%3C/svg%3E") 0 0 / 120px 120px;
  transform: rotate(-12deg);
}
.lobby-hat, .title, .subtitle, .login-card, #login .link { animation: rise .7s cubic-bezier(.2,.8,.3,1) both; }
.title { animation-delay: .05s; } .subtitle { animation-delay: .12s; } .login-card { animation-delay: .2s; } #login .link { animation-delay: .3s; }
/* 登录页底部：同系列游戏一行小字 */
.series { margin: 18px 0 4px; font-size: 12px; color: rgba(251,245,230,.5); text-align: center; animation: rise .7s cubic-bezier(.2,.8,.3,1) .4s both; }
.series a { color: rgba(251,245,230,.72); text-decoration: none; border-bottom: 1px solid rgba(251,245,230,.25); padding-bottom: 1px; }
.series a:hover, .series a:active { color: var(--tile); border-color: var(--tile); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.title {
  font-family: var(--serif); font-weight: 900; font-size: clamp(44px, 14vw, 76px); line-height: 1; margin: 0; white-space: nowrap;
  color: var(--tile); letter-spacing: .08em;
  text-shadow: 0 3px 0 var(--wall-dark), 0 0 30px rgba(233,181,74,.25);
}
.subtitle { margin: 2px 0 16px; opacity: .7; font-size: 13px; letter-spacing: .1em; }
.lobby-hat { width: 120px; height: 80px; margin-bottom: -8px; background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Cpath d='M4 30 L30 3 L56 30 Z' fill='%23ded7c4' stroke='%23231a14' stroke-width='1.5'/%3E%3Cpath d='M2 30 H58 V37 H2 Z' fill='%23cfc7b1' stroke='%23231a14' stroke-width='1.5'/%3E%3Cpath d='M17 18 H43 M13 22 H47 M21 14 H39 M24 10 H36' stroke='%23231a14' stroke-width='.8' opacity='.45'/%3E%3Ctext x='30' y='35.5' font-size='5' text-anchor='middle' fill='%23c8321e' font-weight='900'%3E大落%3C/text%3E%3C/svg%3E") center/contain no-repeat; transform: rotate(-8deg); filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
/* 登录卡片：一行「大头像 + 昵称」，底下一条可横滑的头像 */
.login-card {
  width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: 20px; border: 1px solid rgba(233,181,74,.22);
  background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(0,0,0,.28));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.3);
}
.lc-row { display: flex; align-items: center; gap: 10px; }
.lc-row input { flex: 1; min-width: 0; }
.lc-ava {
  width: 52px; height: 52px; flex: none; padding: 0; border-radius: 50%; overflow: hidden;
  background: var(--paper); border: 2px solid var(--tile); box-shadow: 0 0 0 3px rgba(233,181,74,.18), 0 4px 10px rgba(0,0,0,.35);
  display: grid; place-items: center; transition: transform .15s var(--ease-pop);
}
.lc-ava svg { width: 100%; height: 100%; display: block; }
.lc-ava:active { transform: scale(.92); }
.lc-ava.spin { animation: avaSpin .45s cubic-bezier(.2,.8,.3,1.3); }
@keyframes avaSpin { from { transform: rotate(-180deg) scale(.6); } }
.ava-strip {
  display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding: 6px;
  border-radius: 14px; background: rgba(0,0,0,.22); border: 1px solid rgba(251,245,230,.1);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.ava-strip::-webkit-scrollbar { display: none; }
/* 两头淡出，一眼看出来还能往右滑 */
.ava-strip { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); }
.ava-strip .ava-opt { width: 40px; scroll-snap-align: center; padding: 2px; border-radius: 50%; }
.ava-strip .ava-opt .ava-face { width: 36px; height: 36px; }
.login-card input, .prof-row input { font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(251,245,230,.22); background: rgba(0,0,0,.3); color: var(--paper); transition: border-color .2s, box-shadow .2s, background .2s; }
.login-card input:focus { outline: none; border-color: var(--tile); box-shadow: 0 0 0 3px rgba(233,181,74,.22); background: rgba(0,0,0,.38); }
.login-card input::placeholder { color: rgba(251,245,230,.4); }
.login-card .btn { margin-top: 2px; font-size: 17px; padding: 13px; letter-spacing: .1em; }
/* 选头像 */
.ava-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 8px; border-radius: 12px; background: rgba(0,0,0,.22); border: 1px solid rgba(251,245,230,.12); }
.ava-opt { position: relative; width: 34px; flex: none; border: 2px solid transparent; background: none; padding: 2px 1px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .14s cubic-bezier(.2,.8,.3,1.4), border-color .15s, background .15s; }
.ava-opt .ava-face { width: 30px; height: 30px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--paper); box-shadow: 0 2px 5px rgba(0,0,0,.3); }
.ava-opt .ava-face .ava { width: 100%; height: 100%; display: block; }
.ava-opt .ava-dice { font-size: 18px; }
.ava-opt .ava-name { font-size: 9.5px; opacity: .75; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ava-opt.on { border-color: var(--tile); background: rgba(233,181,74,.14); }
.ava-opt.on .ava-face { box-shadow: 0 0 0 2px var(--tile), 0 0 12px rgba(233,181,74,.6); }
.ava-opt.on .ava-name { opacity: 1; color: var(--tile); font-weight: 700; }
.ava-opt:active { transform: scale(.92); }
@media (hover: hover) { .ava-opt:hover { transform: translateY(-2px); background: rgba(251,245,230,.06); } }
.ava-opt.taken .ava-face { opacity: .55; }
.ava-opt.taken::after { content: "在用"; position: absolute; top: -2px; right: -2px; font-size: 9px; background: var(--ink); color: var(--paper); border-radius: 6px; padding: 1px 4px; opacity: .85; }
.sheet .ava-pick { gap: 10px 14px; background: rgba(35,26,20,.05); border-color: rgba(35,26,20,.08); margin: 6px 0 4px; }
.sheet .ava-opt { width: 62px; }
.sheet .ava-opt .ava-face { width: 54px; height: 54px; }
.sheet .ava-opt .ava-name { font-size: 12px; max-width: 100%; color: var(--ink); opacity: .8; }
.sheet .ava-opt.on { background: rgba(233,181,74,.22); }
.sheet .ava-opt.on .ava-name { color: var(--cinnabar); }
.sheet .ava-opt.taken::after { background: var(--cinnabar); }
.avatar.clickable { cursor: pointer; }

/* ---------- 顶栏 ---------- */
.bar { display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 12px 4px; }
.round { font-size: 12px; opacity: .65; letter-spacing: .04em; white-space: nowrap; }
#roomChip { white-space: nowrap; flex: none; padding: 5px 11px; }
#roomChip b { letter-spacing: .04em; }
.spacer { flex: 1; }

/* ---------- 牌桌 ---------- */
.table { position: relative; flex: 1; min-height: 240px; margin: 4px 10px 0; }
.table::before { /* 桌面描边：一圈琉璃瓦色，里面再压一圈暗影 */
  content: ""; position: absolute; inset: 34px 8px 8px; border-radius: 48% / 40%;
  border: 2px solid rgba(233,181,74,.18); background: radial-gradient(rgba(0,0,0,.12), transparent 70%);
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.06), inset 0 0 70px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.15);
}
.center { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: 62%; text-align: center; z-index: 2; }
.center-who { font-size: 12.5px; opacity: .95; min-height: 16px; letter-spacing: .02em; }
.pile { display: flex; justify-content: center; flex-wrap: wrap; min-height: 64px; padding: 4px 10px 0 24px; }
.center-msg { font-size: 14px; margin-top: 6px; color: var(--news); min-height: 20px; opacity: .95; }
.center-who.swap, .center-msg.swap { animation: msgIn .35s cubic-bezier(.2,.8,.3,1); }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } }
.center-actions { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.room-code { font-family: var(--serif); font-weight: 900; font-size: 40px; letter-spacing: .2em; color: var(--tile); line-height: 1.1; text-shadow: 0 2px 0 var(--wall-dark), 0 0 24px rgba(233,181,74,.3); }

/* 座位 */
.seat { position: absolute; width: 86px; text-align: center; z-index: 3; transition: opacity .3s; }
.seat[data-rel="1"] { right: 0; top: 54%; }
.seat[data-rel="2"] { right: 10%; top: 16px; }
.seat[data-rel="3"] { left: 10%; top: 16px; }
.seat[data-rel="4"] { left: 0; top: 54%; }
.seat.done { opacity: .75; }
.avatar-wrap { position: relative; width: 56px; height: 56px; margin: 18px auto 0; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 900; font-size: 24px; color: var(--ink);
  background: var(--paper); border: 3px solid var(--wall-dark); position: relative; z-index: 1;
  box-shadow: 0 4px 10px rgba(0,0,0,.35); transition: box-shadow .3s, filter .3s;
}
.seat.empty .avatar { background: transparent; border: 2px dashed rgba(251,245,230,.3); color: rgba(251,245,230,.35); font-size: 20px; box-shadow: none; transition: border-color .2s, color .2s; }
@media (hover: hover) { .seat.empty:hover .avatar { border-color: var(--tile); color: var(--tile); } .seat:not(.empty):hover .avatar { filter: brightness(1.06); } }
.seat.offline .avatar { filter: grayscale(1) brightness(.7); }
.seat.emperor .avatar { border-color: var(--tile); box-shadow: 0 0 0 2px var(--wall-dark), 0 0 16px rgba(233,181,74,.55), 0 4px 10px rgba(0,0,0,.35); }
/* 轮到谁，谁的头像就轻轻呼吸 */
.seat.turn .avatar, .avatar-wrap.turn .avatar { animation: breathe 1.8s ease-in-out infinite; }
.seat.emperor.turn .avatar { animation-name: breatheGold; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 2px rgba(251,245,230,.3), 0 0 8px rgba(251,245,230,.2), 0 4px 10px rgba(0,0,0,.35); }
  50% { box-shadow: 0 0 0 4px rgba(251,245,230,.5), 0 0 26px rgba(251,245,230,.45), 0 4px 10px rgba(0,0,0,.35); }
}
@keyframes breatheGold {
  0%, 100% { box-shadow: 0 0 0 2px var(--wall-dark), 0 0 12px rgba(233,181,74,.5), 0 4px 10px rgba(0,0,0,.35); }
  50% { box-shadow: 0 0 0 4px rgba(233,181,74,.6), 0 0 30px rgba(233,181,74,.8), 0 4px 10px rgba(0,0,0,.35); }
}
.ring { position: absolute; inset: -5px; z-index: 2; pointer-events: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--paper); stroke-width: 4; stroke-linecap: round; opacity: .9; transition: stroke .4s; }
.ring circle.trk { stroke: rgba(251,245,230,.18); opacity: 1; }
.ring.low circle.pg { stroke: var(--cinnabar); }
.seat-name { font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.count {
  position: absolute; right: -10px; bottom: -4px; z-index: 3; min-width: 26px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: linear-gradient(180deg, #3a2d24, var(--ink)); color: var(--paper); font-size: 12px; font-weight: 700; line-height: 22px;
  border: 1px solid rgba(251,245,230,.3); box-shadow: 0 2px 6px rgba(0,0,0,.35); font-variant-numeric: tabular-nums;
}
.count.warn { background: linear-gradient(180deg, #e04a35, var(--cinnabar)); animation: pulse 1s infinite; }
.badges { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; min-height: 18px; margin-top: 2px; }
.badge { font-size: 11px; padding: 1px 6px; border-radius: 5px; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.25); animation: fade .25s; }
.b-emp { background: linear-gradient(180deg, #f6d57d, var(--tile)); color: var(--ink); }
.b-bao { background: linear-gradient(180deg, #e04a35, var(--cinnabar)); }
.b-host { background: rgba(0,0,0,.3); }
.b-sus { background: rgba(251,245,230,.85); color: var(--ink); }
.b-good { background: #a7dcc0; color: var(--ink); }
.b-auto { background: rgba(0,0,0,.4); }
.place-seal {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%) rotate(-12deg); z-index: 4;
  font-family: var(--serif); font-weight: 900; font-size: 15px; color: var(--cinnabar);
  border: 2px solid var(--cinnabar); border-radius: 4px; padding: 0 4px; background: rgba(251,245,230,.88);
  box-shadow: 0 2px 6px rgba(0,0,0,.3); animation: sealIn .45s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes sealIn { from { transform: translateX(-50%) rotate(-12deg) scale(2.2); opacity: 0; } 60% { transform: translateX(-50%) rotate(-12deg) scale(.94); opacity: 1; } }
/* 座位旁的出牌/不要 */
.act { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 5; }
.seat[data-rel="1"] .act { left: auto; right: 100%; top: 26px; transform: none; margin-right: 4px; }
.seat[data-rel="4"] .act { left: 100%; top: 26px; transform: none; margin-left: 4px; }
/* 「不要」：深色说话气泡，尾巴指向说话的人。表情永远在头顶，不要永远在名字下面/朝桌心，两个不打架，也不盖名字 */
.pass-bubble { position: relative; display: inline-block; background: #2b1f17; color: #efe6d0; font-weight: 700; font-size: 13px; line-height: 1.3; padding: 4px 11px; border-radius: 12px; border: 1px solid rgba(251,245,230,.18); box-shadow: 0 4px 10px rgba(0,0,0,.35); animation: bubbleIn .3s cubic-bezier(.2,.8,.3,1.3); }
.pass-bubble::after { content: ""; position: absolute; width: 9px; height: 9px; background: #2b1f17; transform: rotate(45deg); left: 50%; top: -5px; margin-left: -5px; border-left: 1px solid rgba(251,245,230,.18); border-top: 1px solid rgba(251,245,230,.18); }
/* 每个座位都放在头像旁边、朝桌心那一侧，和头像中间对齐：头顶留给表情，下面留给名字 */
.seat .act-pass { top: 32px; transform: none; }
.seat[data-rel="1"] .act-pass, .seat[data-rel="2"] .act-pass { left: auto; right: 100%; margin-right: 8px; }
.seat[data-rel="3"] .act-pass, .seat[data-rel="4"] .act-pass { left: 100%; margin-left: 8px; }
.seat[data-rel="3"] .pass-bubble::after, .seat[data-rel="4"] .pass-bubble::after, .me-pass::after { left: -5px; top: 50%; margin: -5px 0 0; border-top: 0; border-bottom: 1px solid rgba(251,245,230,.18); }
.seat[data-rel="1"] .pass-bubble::after, .seat[data-rel="2"] .pass-bubble::after { left: auto; right: -5px; top: 50%; margin: -5px 0 0; border-left: 0; border-right: 1px solid rgba(251,245,230,.18); }
.me-pass { margin-left: 4px; flex: none; padding: 2px 9px; font-size: 12px; }
@keyframes bubbleIn { from { opacity: 0; scale: .7; } }
.mini-fan { display: flex; padding-left: 12px; animation: bubbleIn .3s cubic-bezier(.2,.8,.3,1.2); }

/* 皇冠：歪戴在皇帝头像的右上角 */
.crown { position: absolute; width: 34px; height: 26px; right: -12px; top: -14px; z-index: 5; transform: rotate(18deg); filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); animation: crownIn .5s cubic-bezier(.2,.9,.3,1.4); pointer-events: none; }
.me-strip .crown { width: 22px; height: 17px; right: -9px; top: -10px; }
@keyframes crownIn { from { transform: translateY(-18px) rotate(40deg) scale(.5); opacity: 0; } }

/* 买3 / 卖3 举牌 */
.sign {
  position: absolute; left: 100%; top: 4px; margin-left: 2px; z-index: 6; white-space: nowrap;
  font-family: var(--serif); font-weight: 900; font-size: 13px; line-height: 1; padding: 5px 6px 4px;
  background: var(--paper); color: var(--cinnabar); border: 2px solid var(--ink); border-radius: 3px;
  box-shadow: 2px 2px 0 rgba(0,0,0,.35); transform: rotate(6deg); transform-origin: bottom left;
  animation: raise .35s cubic-bezier(.2,.9,.3,1.3);
}
.sign::before { content: ""; position: absolute; left: 6px; top: 100%; width: 3px; height: 12px; background: var(--ink); }
.sign.sell { color: var(--ink); background: var(--tile); transform: rotate(-6deg); }
.seat[data-rel="1"] .sign { left: auto; right: 100%; margin: 0 2px 0 0; transform: rotate(-6deg); transform-origin: bottom right; }
.seat[data-rel="1"] .sign.sell { transform: rotate(6deg); }
.seat[data-rel="1"] .sign::before { left: auto; right: 6px; }
.me-strip .sign { position: static; font-size: 12px; margin-left: 2px; transform: rotate(-4deg); }
.me-strip .sign::before { display: none; }
.seat.can-sell { cursor: pointer; }
.seat.can-sell .avatar { box-shadow: 0 0 0 3px var(--tile), 0 0 18px rgba(233,181,74,.7); animation: pulse 1.2s infinite; }
@keyframes raise { from { transform: translateY(14px) rotate(20deg); opacity: 0; } }
.sheet .pay-cards { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.sheet .pay-cards .card { margin: 0; --cw: 50px; --ch: 70px; cursor: pointer; border-width: 2px; }
.sheet .pay-cards .card .r { font-size: 20px; } .sheet .pay-cards .card .s { font-size: 16px; top: 26px; }
.sheet .pay-cards .card.sel { border-color: var(--cinnabar); background: #fff3c4; transform: translateY(-6px); }
.fly-card { position: fixed; z-index: 44; pointer-events: none; }
.fly-card .card { margin: 0; }
.card.back { background: repeating-linear-gradient(45deg, var(--wall) 0 4px, var(--wall-deep) 4px 8px); border-color: var(--tile-deep); }
.card.back::after { content: "皇"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 900; color: var(--tile); font-size: 14px; opacity: .8; }

/* 纸帽子 */
.hats { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column-reverse; align-items: center; pointer-events: none; }
.hat { width: 40px; height: 22px; margin-top: -15px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.hat:nth-child(even) { transform: rotate(6deg); }
.hat:nth-child(odd) { transform: rotate(-5deg); }
.hat-more { font-size: 11px; font-weight: 700; color: var(--paper); background: var(--ink); border-radius: 8px; padding: 0 5px; margin-bottom: 2px; }

/* 表情气泡 */
.emote-bubble {
  position: absolute; left: 50%; top: 21px; transform: translate(-50%, -100%); z-index: 8;
  background: var(--paper); color: var(--ink); font-weight: 700; font-size: 13px; white-space: nowrap;
  border-radius: 12px; padding: 5px 10px; box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 1px rgba(35,26,20,.06);
  animation: pop .3s cubic-bezier(.2,.9,.3,1.3);
}
.emote-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--paper); }
.emote-bubble { white-space: normal; width: max-content; max-width: 44vw; text-align: center; line-height: 1.3; }
.emote-bubble.mine { top: auto; bottom: calc(100% + 8px); max-width: 64vw; transform: translateX(-50%); }
/* 长句往上长，不会掉下来压住旁边的「不要」 */
.seat[data-rel="1"] .emote-bubble { left: auto; right: 0; transform: translateY(-100%); }
.seat[data-rel="1"] .emote-bubble::after { left: auto; right: 22px; }
.seat[data-rel="4"] .emote-bubble { left: 0; transform: translateY(-100%); }
.seat[data-rel="4"] .emote-bubble::after { left: 28px; }
/* 点头像弹出的小菜单 */
.seat-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; gap: 4px; background: var(--paper); padding: 6px; border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.45), 0 0 0 1px rgba(35,26,20,.08); animation: menuIn .2s cubic-bezier(.2,.9,.3,1.2); transform-origin: top center; min-width: 108px; }
@keyframes menuIn { from { opacity: 0; scale: .9; translate: 0 -6px; } }
.seat-menu button { border: 0; background: rgba(35,26,20,.06); color: var(--ink); border-radius: 9px; padding: 8px 10px; font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; transition: background .15s; }
.seat-menu button:active { background: var(--tile); }
@media (hover: hover) { .seat-menu button:hover, .emote-panel button:hover { background: rgba(233,181,74,.35); } }
.still { animation: none !important; }
/* 动作菜单：两列图标 */
.seat-menu.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; min-width: 170px; }
.seat-menu.grid button { display: flex; align-items: center; gap: 6px; padding: 7px 9px; font-size: 12.5px; }
.seat-menu.grid button i { font-style: normal; font-size: 16px; width: 20px; text-align: center; }
.seat-menu.grid button.wide { grid-column: 1 / -1; }
.seat-menu.grid button:disabled { opacity: .4; }
.seat-menu.me { top: auto; bottom: calc(100% + 8px); transform-origin: bottom center; z-index: 31; }
.seat-menu.me::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--paper); }

/* 对人的动作：落地效果 */
.avatar-wrap.hit-soft .avatar { animation: hitSoft .5s; }
@keyframes hitSoft { 30% { transform: translateY(3px) scale(.96); } 60% { transform: translateY(-2px); } }
.avatar-wrap.bow .avatar { animation: bow 1.2s ease-in-out; transform-origin: bottom center; }
@keyframes bow { 25%, 55% { transform: rotate(22deg) translateY(2px); } 80% { transform: rotate(-4deg); } }
.avatar-wrap.blush .avatar { box-shadow: 0 0 0 3px rgba(240,106,138,.6), 0 0 22px rgba(240,106,138,.7), 0 4px 10px rgba(0,0,0,.35); filter: saturate(1.2) brightness(1.05); }
.bloom { position: fixed; z-index: 44; pointer-events: none; font-size: 18px; transform: translate(-50%, -50%); animation: bloom 2s cubic-bezier(.2,.8,.3,1.3) both; }
@keyframes bloom { 0% { opacity: 0; scale: .2; } 20% { opacity: 1; scale: 1.2; } 35% { scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; translate: 0 -14px; } }
.avatar-wrap.bonk .avatar { animation: bonk .6s cubic-bezier(.2,.8,.3,1.4); transform-origin: bottom center; }
@keyframes bonk { 25% { transform: scaleY(.72) scaleX(1.18); } 55% { transform: scaleY(1.08) scaleX(.96); } }
.avatar-wrap .bump { position: absolute; width: 18px; height: 18px; left: 50%; top: -10px; margin-left: -4px; z-index: 6; animation: bumpUp 1.6s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes bumpUp { 0% { scale: 0; translate: 0 10px; } 30% { scale: 1.3; } 45% { scale: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.coin { position: fixed; width: 20px; height: 20px; z-index: 44; pointer-events: none; }
.coin svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }

/* 自己的动作 */
.avatar-wrap.cover .avatar::after { content: "🙈"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.3em; background: rgba(251,245,230,.85); border-radius: 50%; animation: fade .2s; }
.avatar-wrap.flex .avatar { animation: flexUp 1.4s cubic-bezier(.2,.8,.3,1.3); }
@keyframes flexUp { 20%, 70% { transform: scale(1.32); box-shadow: 0 0 0 3px var(--tile), 0 0 28px rgba(233,181,74,.9), 0 6px 14px rgba(0,0,0,.4); } }
.firecracker { position: fixed; z-index: 44; pointer-events: none; font-size: 32px; animation: swing .3s ease-in-out infinite alternate; transform-origin: top center; }
@keyframes swing { from { rotate: -14deg; } to { rotate: 14deg; } }
.confetti { position: fixed; z-index: 43; pointer-events: none; border-radius: 2px; }

/* 谁是保子：聚光灯 */
@property --x { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --y { syntax: '<length>'; inherits: false; initial-value: 0px; }
.spot { position: fixed; inset: 0; z-index: 42; pointer-events: none; background: radial-gradient(circle at var(--x) var(--y), transparent 34px, rgba(255,236,170,.08) 44px, rgba(0,0,0,.74) 92px); transition: --x .32s cubic-bezier(.3,.7,.3,1), --y .32s cubic-bezier(.3,.7,.3,1), opacity .5s; animation: fade .3s; }
.spot.out { opacity: 0; }
.avatar-wrap.lit .avatar { box-shadow: 0 0 0 3px rgba(255,236,170,.9), 0 0 30px rgba(255,236,170,.9), 0 4px 10px rgba(0,0,0,.35); filter: brightness(1.15); animation: litPulse .4s; }
@keyframes litPulse { 40% { transform: scale(1.12); } }

/* 自动触发：剩一张冒汗、连被压三次发冷 */
.seat.sweat .avatar-wrap::before, .avatar-wrap.sweat::before { content: "💧"; position: absolute; right: -6px; top: -4px; z-index: 6; font-size: 13px; animation: sweat 1.1s ease-in infinite; pointer-events: none; }
.seat.sweat .avatar-wrap::after, .avatar-wrap.sweat::after { content: "💧"; position: absolute; left: -4px; top: 6px; z-index: 6; font-size: 10px; animation: sweat 1.4s .5s ease-in infinite; pointer-events: none; }
@keyframes sweat { 0% { opacity: 0; translate: 0 0; } 20% { opacity: 1; } 100% { opacity: 0; translate: 0 16px; } }
.avatar-wrap.cold .avatar { filter: saturate(.4) brightness(1.15) hue-rotate(160deg); box-shadow: 0 0 0 3px rgba(124,196,255,.7), 0 0 24px rgba(124,196,255,.8), 0 4px 10px rgba(0,0,0,.35); animation: shiver .12s linear infinite; }
@keyframes shiver { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-1.5px, 1px); } 75% { transform: translate(1.5px, -1px); } }
.seat[data-rel="1"] .seat-menu { left: auto; right: 0; transform: none; transform-origin: top right; }
.seat[data-rel="4"] .seat-menu, .seat[data-rel="3"] .seat-menu { left: 0; transform: none; transform-origin: top left; }
.seat[data-rel="2"] .seat-menu { left: auto; right: 0; transform: none; transform-origin: top right; }
/* 番茄、点赞 */
.fly-thing { position: fixed; width: 40px; height: 40px; z-index: 44; pointer-events: none; }
.fly-thing svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 3px rgba(0,0,0,.4)); }
.splat { position: fixed; width: 80px; height: 80px; z-index: 43; pointer-events: none; animation: splatIn 2.6s ease-out forwards; }
.splat .drip { stroke-dasharray: 20; stroke-dashoffset: 20; animation: drip 1.2s .2s ease-out forwards; }
@keyframes splatIn { 0% { transform: scale(.2); opacity: 0; } 12% { transform: scale(1.15); opacity: 1; } 20% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes drip { to { stroke-dashoffset: 0; } }
.avatar-wrap.hit .avatar { animation: hit .5s; }
@keyframes hit { 20% { transform: translate(-4px, 2px) rotate(-8deg); } 40% { transform: translate(4px, -2px) rotate(6deg); } 60% { transform: translate(-3px, 1px) rotate(-4deg); } 80% { transform: translate(2px, 0) rotate(2deg); } }
.like-burst { position: fixed; width: 56px; height: 56px; z-index: 44; pointer-events: none; animation: likeIn 1.6s cubic-bezier(.2,.9,.3,1.3) forwards; }
.like-burst svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0,0,0,.4)); }
.like-burst span { position: absolute; right: -14px; top: -6px; font-weight: 900; color: var(--tile); font-size: 18px; text-shadow: 0 1px 0 var(--ink); }
@keyframes likeIn { 0% { transform: scale(.3) translateY(10px); opacity: 0; } 20% { transform: scale(1.2) translateY(-6px); opacity: 1; } 35% { transform: scale(1) translateY(0); } 75% { opacity: 1; transform: translateY(-10px); } 100% { opacity: 0; transform: translateY(-30px); } }
.float-up { position: fixed; z-index: 44; pointer-events: none; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.petal { position: fixed; width: 10px; height: 7px; border-radius: 50% 50% 50% 0; z-index: 43; pointer-events: none; }
.tear { position: fixed; width: 6px; height: 9px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; background: #7cc4ff; z-index: 43; pointer-events: none; }
.me-strip .avatar-wrap { overflow: visible; }
.emote-panel .say { grid-column: 1 / -1; display: flex; gap: 6px; margin-top: 2px; }
.emote-panel .say input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(35,26,20,.25); background: #fff; color: var(--ink); }
.emote-panel .say button { background: var(--tile); color: var(--ink); font-weight: 700; padding: 8px 14px; }

/* ---------- 我 ---------- */
.me-strip { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 30px; font-size: 13px; padding: 0 12px; position: relative; }
.me-strip .avatar-wrap { width: 30px; height: 30px; margin: 0; }
.me-strip .avatar { width: 30px; height: 30px; font-size: 14px; border-width: 2px; }
.me-strip .ring { inset: -4px; }
.me-strip .ring circle { stroke-width: 3; }
.me-strip .hats { bottom: 20px; }
.me-strip .hat { width: 26px; height: 15px; margin-top: -8px; }
.me-name { font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.role-line { opacity: .9; }
.role-line b { color: var(--tile); }

/* ---------- 手牌 ---------- */
.hand-area { position: relative; padding: 2px 8px max(10px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(0,0,0,.16)); }
.controls { display: flex; gap: 10px; justify-content: center; min-height: 44px; }
.controls .btn { min-width: 84px; }
.controls.turn-in .btn { animation: turnIn .45s cubic-bezier(.2,.8,.3,1.4) both; }
.controls.turn-in .btn:nth-child(2) { animation-delay: .05s; } .controls.turn-in .btn:nth-child(3) { animation-delay: .1s; }
@keyframes turnIn { from { opacity: .4; translate: 0 8px; scale: .94; } }
.play-tip { text-align: center; font-size: 12.5px; color: var(--news); min-height: 22px; margin: 4px 0 2px; padding: 0 10px; }
.play-tip span { display: inline-block; padding: 3px 11px; border-radius: 999px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.05); line-height: 1.4; max-width: 100%; animation: tipIn .25s cubic-bezier(.2,.8,.3,1); }
.play-tip.ok span { background: rgba(79,167,140,.24); border-color: rgba(79,167,140,.35); color: #d6f2e6; }
.play-tip.bad span { background: rgba(200,50,30,.26); border-color: rgba(200,50,30,.4); color: #ffdcd5; }
.play-tip.go span { background: rgba(233,181,74,.2); border-color: rgba(233,181,74,.4); color: #ffe6a8; }
@keyframes tipIn { from { opacity: 0; transform: translateY(3px); } }
.hand { display: flex; flex-wrap: wrap; justify-content: center; padding: 14px 4px 4px calc(4px - var(--overlap)); touch-action: none; user-select: none; -webkit-user-select: none; max-height: 36dvh; overflow-y: auto; }
.hand .group { display: flex; margin-right: 6px; margin-bottom: 4px; }

/* ---------- 牌 ---------- */
.card {
  width: var(--cw); height: var(--ch); margin-left: var(--overlap); flex: none;
  background: linear-gradient(165deg, var(--card-a, #fffdf6) 0%, var(--card-b, var(--paper)) 50%, var(--card-c, #f2e9d3) 100%); color: var(--ink); border-radius: 6px; border: 1px solid var(--card-edge, #cdc3aa);
  position: relative; box-shadow: -2px 0 3px rgba(0,0,0,.16), 0 1px 2px rgba(0,0,0,.1);
  font-weight: 800; line-height: 1; transition: transform .16s cubic-bezier(.2,.8,.3,1.3), background .15s, box-shadow .15s, border-color .15s;
}
.card .r { position: absolute; left: 4px; top: 4px; font-size: 16px; letter-spacing: -1px; }
.card .s { position: absolute; left: 5px; top: 22px; font-size: 13px; }
.card svg.suit { width: 1em; height: 1em; display: block; fill: currentColor; }
.card .s svg.suit { width: .95em; height: .95em; }
.card.dealing > * { visibility: hidden; }
.card.dealing { background: repeating-linear-gradient(45deg, var(--wall) 0 4px, var(--wall-deep) 4px 8px) !important; border-color: var(--tile-deep) !important; box-shadow: -2px 0 3px rgba(0,0,0,.25) !important; }
.card.dealing::after { content: "皇"; position: absolute; inset: 0; right: auto; bottom: auto; display: grid; place-items: center; font-family: var(--serif); font-weight: 900; color: var(--tile); font-size: 14px; opacity: .8; visibility: visible; background: none; padding: 0; }
.card.dealing::before { display: none; }
.card.red { color: var(--cinnabar); }
.card.joker .r { font-family: var(--serif); font-size: 10px; writing-mode: horizontal-tb; letter-spacing: 0; top: 3px; left: 4px; white-space: nowrap; }
.card .jester, .card .court { position: absolute; left: 50%; bottom: 1px; width: 64%; height: auto; transform: translateX(-46%); }
.card .bs { position: absolute; right: 3px; bottom: 2px; font-size: 20px; line-height: 1; opacity: .16; }
.card.red .bs { opacity: .22; }
.card.joker.big { color: var(--cinnabar); }
.card.joker.big { background: linear-gradient(160deg, #fff6d8, var(--paper) 55%); }
.card.emp::after {
  content: "皇"; position: absolute; right: 3px; bottom: 3px; font-family: var(--serif); font-weight: 900;
  font-size: 11px; color: var(--ink); background: var(--tile); border-radius: 3px; padding: 1px 2px; writing-mode: horizontal-tb;
}
.hand .card { cursor: pointer; }
@media (hover: hover) { .hand .card:hover:not(.sel) { transform: translateY(-5px); } }
.hand .card.sel { transform: translateY(-14px); background: linear-gradient(165deg, #fffbe6, #fff0bd); border-color: var(--tile); box-shadow: 0 0 0 2px rgba(233,181,74,.7), 0 8px 18px rgba(0,0,0,.35); }
.pile .card { --cw: 46px; --ch: 66px; --overlap: -22px; box-shadow: -3px 2px 6px rgba(0,0,0,.3); }
.pile .card .jester, .pile .card .court { width: 68%; }
.avatar .robot { width: 84%; height: 84%; display: block; }
.avatar .ava { width: 100%; height: 100%; display: block; border-radius: 50%; }
.card.sm { --cw: 24px; --ch: 34px; --overlap: -13px; border-radius: 4px; box-shadow: -1px 0 2px rgba(0,0,0,.2); }
.card.sm .r { font-size: 11px; left: 2px; top: 2px; }
.card.sm .s { font-size: 9px; left: 3px; top: 14px; }
.card.sm.joker .r { font-size: 9px; }
.card.sm.emp::after { display: none; }
.more { font-size: 11px; align-self: center; margin-left: 3px; opacity: .8; }

.card.trump::after {
  content: "保"; position: absolute; right: 3px; bottom: 3px; font-family: var(--serif); font-weight: 900;
  font-size: 11px; color: var(--paper); background: var(--cinnabar); border-radius: 3px; padding: 1px 2px;
}
.card.sm.trump::after { display: none; }

/* ---------- 快捷语 ---------- */
.emote-fab { position: absolute; right: 8px; top: 4px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(251,245,230,.22); background: rgba(0,0,0,.3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: 17px; z-index: 20; box-shadow: 0 3px 8px rgba(0,0,0,.3); transition: transform .14s cubic-bezier(.2,.8,.3,1.4), background .2s; }
.emote-fab:active { transform: scale(.9); }
@media (hover: hover) { .emote-fab:hover { background: rgba(0,0,0,.42); transform: translateY(-1px); } }
.emote-panel { position: absolute; right: 8px; bottom: calc(100% + 6px); z-index: 21; display: grid; grid-template-columns: repeat(2, auto); gap: 6px; background: var(--paper); color: var(--ink); padding: 10px; border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(35,26,20,.08); animation: panelUp .22s cubic-bezier(.2,.9,.3,1.2); transform-origin: bottom right; max-height: calc(100dvh - 140px); max-width: calc(100vw - 16px); overflow: auto; }
@keyframes panelUp { from { opacity: 0; scale: .92; translate: 0 8px; } }
.emote-panel .voice-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; opacity: .85; padding-bottom: 8px; margin-bottom: 2px; border-bottom: 1px dashed rgba(35,26,20,.18); }
.emote-panel .voice-row b { font-weight: 700; color: var(--tile-deep); max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.emote-panel .voice-row button { padding: 3px 8px; font-size: 12px; background: rgba(233,181,74,.3); border-radius: 999px; }
.emote-panel .voice-row small { flex-basis: 100%; font-size: 11px; opacity: .7; line-height: 1.4; }
.emote-panel .say-label { grid-column: 1 / -1; font-size: 11px; opacity: .55; margin: 6px 2px -2px; padding-top: 8px; border-top: 1px dashed rgba(35,26,20,.18); }
.emote-panel button { border: 0; background: rgba(35,26,20,.06); border-radius: 9px; padding: 8px 10px; font-size: 14px; font-weight: 600; text-align: left; transition: background .15s, transform .1s; }
.emote-panel button:active { background: var(--tile); transform: scale(.97); }

/* ---------- 底部弹层 ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(20,6,3,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 30; animation: fade .25s; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 520px; z-index: 31;
  background: linear-gradient(180deg, #fffcf2, var(--paper) 80px); color: var(--ink); border-radius: 20px 20px 0 0; padding: 14px 18px max(20px, env(safe-area-inset-bottom));
  max-height: 85dvh; overflow: auto; animation: slideUp .32s cubic-bezier(.2,.9,.3,1.05); box-shadow: 0 -12px 40px rgba(0,0,0,.35);
}
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: rgba(35,26,20,.16); margin: 0 auto 14px; }
.sheet h2 { font-family: var(--serif); font-weight: 900; font-size: 26px; margin: 0 0 4px; letter-spacing: .02em; }
.sheet p { margin: 4px 0 12px; font-size: 14px; color: #5b4c3f; line-height: 1.6; }
.sheet .opts { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.sheet .call-card { border: 2px solid transparent; background: none; padding: 0; border-radius: 8px; }
.sheet .call-card .card { margin: 0; --cw: 50px; --ch: 70px; }
.sheet .call-card .card .r { font-size: 20px; }
.sheet .call-card .card .s { font-size: 16px; top: 26px; }
.sheet .row { display: flex; gap: 10px; margin-top: 12px; }
.sheet .row .btn { flex: 1; }
.sheet .btn-ghost { background: rgba(35,26,20,.07); border-color: rgba(35,26,20,.15); color: var(--ink); }
.sheet .rules h3 { font-family: var(--serif); font-size: 16px; margin: 14px 0 4px; }
.sheet .rules p, .sheet .rules li { font-size: 14px; line-height: 1.7; color: #4a3d32; }
.sheet .rules ul { padding-left: 18px; margin: 4px 0; }
.log-list { font-size: 13px; line-height: 1.8; color: #4a3d32; }
.sheet .result-title { font-family: var(--serif); font-weight: 900; font-size: 46px; text-align: center; color: var(--cinnabar); margin: 0; letter-spacing: .04em; animation: verdictIn .5s var(--ease-pop) both; }
.report.lose .result-title { color: #6b5a4e; } .report.draw .result-title { color: var(--tile-deep); }
@keyframes verdictIn { from { opacity: 0; transform: scale(.6) rotate(-4deg); } }
.result-sub { text-align: center; margin: 2px 0 10px; opacity: .7; font-size: 13px; }
/* 头科：居中一个大头像 + 皇冠 */
.champ { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0 8px; animation: champIn .5s .1s var(--ease-pop) both; }
@keyframes champIn { from { opacity: 0; transform: translateY(14px) scale(.9); } }
.champ-face { position: relative; width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff, #f2e9d3); border: 3px solid var(--tile); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc, #f6d57d) 45%, transparent), 0 10px 24px rgba(0,0,0,.25); display: grid; place-items: center; overflow: visible; }
.champ-face .ava, .champ-face .robot { width: 92%; height: 92%; border-radius: 50%; }
.champ-face svg.ic { position: absolute; top: -20px; left: 50%; transform: translateX(-50%) rotate(-8deg); width: 30px; height: 30px; color: var(--tile-deep); filter: drop-shadow(0 1px 0 #fff); }
.champ-nm { font-family: var(--serif); font-weight: 900; font-size: 22px; color: var(--ink); margin-top: 6px; }
.champ-nm small, .rank-list .nm small { font-size: 11px; opacity: .55; margin-left: 2px; font-weight: 600; }
.champ-pl { font-size: 12px; color: var(--tile-deep); font-weight: 700; letter-spacing: .1em; }
.rank-list { list-style: none; padding: 0; margin: 6px 0 4px; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 10px; font-size: 15px; animation: rowIn .4s var(--d, 0ms) var(--ease-out) both; }
.rank-list li:nth-child(even) { background: rgba(35,26,20,.04); }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } }
.rank-list .pl { font-family: var(--serif); font-weight: 900; width: 38px; color: var(--tile-deep); font-size: 14px; }
.rank-list .face { width: 30px; height: 30px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--pc, #ded7c4) 70%, #fff); background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.rank-list .face .ava, .rank-list .face .robot { width: 100%; height: 100%; }
.rank-list .nm { flex: 1; font-weight: 700; display: flex; align-items: baseline; gap: 6px; }
.rank-list .nm em { font-style: normal; font-size: 11px; font-weight: 600; opacity: .55; }
.rank-list .hat-add { color: var(--cinnabar); font-weight: 800; display: inline-flex; align-items: center; gap: 2px; animation: hatPop .4s .5s var(--ease-pop) both; }
@keyframes hatPop { from { opacity: 0; transform: scale(.4); } }
.icon-row { gap: 6px; }
.icon-row .btn { flex: 1; padding: 9px 4px; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; min-width: 0; }
.ic-s { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; vertical-align: -.2em; font-style: normal; }
.ic-s svg.ic { width: 100%; height: 100%; filter: none; }
.ic-s.gold { color: #c9962e; } .ic-s.silver { color: #8f9aa6; } .ic-s.bronze { color: #b5713d; }
.stats th .ic-s { width: 1.1em; height: 1.1em; }

.sheet .solo-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.sheet .solo-row .solo-card .card { margin: 0; --cw: 44px; --ch: 62px; }
.sheet .solo-row .btn { flex: 1; padding: 10px 6px; font-size: 14px; }
.sheet .owed { background: rgba(35,26,20,.06); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.6; margin: 4px 0 10px; }
.sheet .owed b { display: block; margin-bottom: 2px; }
.sheet .owed small { display: block; opacity: .65; margin-top: 4px; }

/* ---------- 动画层 ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.fly { position: fixed; z-index: 41; }
.stamp {
  position: fixed; left: 50%; top: 42%; z-index: 42; font-family: var(--serif); font-weight: 900; letter-spacing: .06em;
  color: var(--cinnabar); border: 6px solid var(--cinnabar); border-radius: 12px; padding: 4px 18px;
  background: rgba(251,245,230,.93); white-space: nowrap; box-shadow: 0 14px 44px rgba(0,0,0,.45), inset 0 0 0 2px rgba(251,245,230,.9), inset 0 0 0 3px rgba(200,50,30,.35);
  animation: stamp 1.4s cubic-bezier(.2,.8,.2,1) forwards;
}
.stamp.gold { color: var(--ink); border-color: var(--tile-deep); background: linear-gradient(#f6d57d, var(--tile)); box-shadow: 0 14px 44px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,240,190,.9), inset 0 0 0 3px rgba(185,134,42,.45); }
.stamp.minor { border-width: 4px; padding: 2px 12px; top: 40%; box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 0 0 2px rgba(251,245,230,.9); animation-duration: 1s; }
.stamp.minor small { font-size: 12px; }
.table.gold-wash::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(60% 50% at 50% 45%, rgba(246,213,125,.5), rgba(233,181,74,0) 70%); animation: goldWash 1.2s ease-out forwards; pointer-events: none; z-index: 5; }
@keyframes goldWash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn-gold:active:not(:disabled) { box-shadow: 0 0 0 #7d5814, 0 2px 6px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.4); }
.stamp small { display: block; font-family: var(--sans); font-size: 14px; font-weight: 600; text-align: center; color: var(--ink); margin-top: -2px; letter-spacing: 0; }
.banner {
  position: fixed; left: 50%; top: 36%; transform: translateX(-50%); z-index: 42; text-align: center;
  background: linear-gradient(180deg, rgba(44,30,20,.92), rgba(28,20,14,.9)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(233,181,74,.42); border-radius: 16px; padding: 12px 22px 11px; font-size: 15px;
  box-shadow: 0 14px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.07);
  animation: banner 2.2s cubic-bezier(.2,.8,.3,1) forwards; width: max-content; max-width: 88vw; line-height: 1.5;
}
.banner::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--tile), transparent); }
.banner b { color: var(--tile); font-family: var(--serif); font-size: 20px; display: block; margin-bottom: 2px; letter-spacing: .04em; }
.spark { position: fixed; width: 8px; height: 8px; border-radius: 2px; z-index: 41; }
.falling-hat { position: fixed; width: 44px; height: 26px; z-index: 43; }
.shake { animation: shake .5s; }
.flash { position: fixed; inset: 0; z-index: 39; background: radial-gradient(circle, rgba(255,235,170,.65), transparent 70%); animation: fade-out .6s forwards; }
.toast-stack { position: fixed; left: 50%; top: calc(max(8px, env(safe-area-inset-top)) + 44px); transform: translateX(-50%); z-index: 45; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: 92vw; }
.toast {
  display: flex; align-items: center; gap: 7px; max-width: 100%;
  background: rgba(28,20,14,.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(251,245,230,.14);
  color: var(--paper); border-radius: 999px; padding: 8px 16px; font-size: 13px; line-height: 1.4; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); animation: toast 3.6s cubic-bezier(.2,.8,.3,1) forwards;
}
.toast .ic { font-size: 13px; line-height: 1; flex: none; color: var(--tile); }
.toast.err { background: rgba(200,50,30,.86); border-color: rgba(255,200,190,.3); }
.toast.err .ic { color: var(--paper); }
.toast.bump { animation: toast 3.6s cubic-bezier(.2,.8,.3,1) forwards, bump .3s; }
@keyframes bump { 50% { scale: 1.06; } }

@keyframes pop { from { scale: .6; translate: 0 6px; opacity: 0; } }
.emote-bubble { transform-origin: bottom center; }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes slideUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes pulse { 50% { transform: scale(1.12); } }
@keyframes stamp {
  0% { transform: translate(-50%, -50%) scale(3) rotate(-14deg); opacity: 0; }
  18% { transform: translate(-50%, -50%) scale(.95) rotate(-8deg); opacity: 1; }
  24% { transform: translate(-50%, -50%) scale(1) rotate(-8deg); }
  80% { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(-8deg); opacity: 0; }
}
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.94); } 10%, 86% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -6px) scale(.98); } }
@keyframes toast { 0% { opacity: 0; transform: translateY(-10px) scale(.96); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes dialogIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes shake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-6px, 3px); } 40%, 60% { transform: translate(6px, -3px); } }

@media (min-width: 700px) and (min-height: 700px) {
  :root { --cw: 52px; --ch: 74px; --overlap: -20px; }
  .card .r { font-size: 19px; } .card .s { font-size: 15px; top: 26px; }
  .seat { width: 110px; }
  .avatar-wrap { width: 64px; height: 64px; } .avatar { width: 64px; height: 64px; }
  .seat .act { top: 104px; } .seat[data-rel="1"] .act, .seat[data-rel="4"] .act { top: 30px; }
  .seat .act-pass { top: 36px; }
  .hats { bottom: 50px; }
  /* 大屏上弹层居中成对话框 */
  .sheet { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 20px; max-height: 82dvh; padding: 22px 24px 24px; animation: dialogIn .28s cubic-bezier(.2,.9,.3,1.1); box-shadow: 0 24px 70px rgba(0,0,0,.5); }
  .sheet::before { display: none; }
  .play-tip { font-size: 13px; }
}
@media (min-width: 960px) {
  .side { display: block; }
  #logBtn { display: none; }
  .ticker { display: none; }
  .table { max-width: 900px; margin: 4px auto 0; width: 100%; }
}
/* 矮屏手机：整体缩小一号，保证手牌和牌桌都在一屏里 */
@media (max-height: 700px) {
  :root { --cw: 36px; --ch: 50px; --overlap: -15px; }
  .card .r { font-size: 14px; } .card .s { font-size: 11px; top: 19px; }
  .card .jester, .card .court { width: 60%; }
  .pile .card { --cw: 40px; --ch: 56px; --overlap: -18px; }
  .avatar-wrap { width: 46px; height: 46px; margin-top: 8px; }
  .avatar { width: 46px; height: 46px; font-size: 20px; }
  .seat { width: 76px; } .seat .act { top: 76px; }
  .seat[data-rel="1"] .act, .seat[data-rel="4"] .act { top: 20px; }
  .seat .emote-bubble { top: 11px; }
  .seat .act-pass { top: 19px; }
  .count { min-width: 22px; height: 19px; line-height: 19px; font-size: 11px; }
  .hats { bottom: 36px; } .hat { width: 32px; height: 18px; margin-top: -12px; }
  .crown { width: 28px; height: 21px; right: -10px; top: -12px; }
  .table { min-height: 200px; }
  .center { width: 66%; } .pile { min-height: 56px; }
  .hand { max-height: 30dvh; padding-top: 10px; }
  .controls { min-height: 40px; } .controls .btn { padding: 8px 14px; min-width: 72px; }
  .me-strip { min-height: 26px; }
  .bar { padding-top: max(4px, env(safe-area-inset-top)); }
  .lobby-hat { width: 90px; height: 60px; } .title { font-size: clamp(48px, 14vw, 72px); } .subtitle { margin-bottom: 14px; }
}
/* 横屏手机：牌桌在左，手牌在右 */
@media (orientation: landscape) and (max-height: 520px) {
  #game .main { display: grid; grid-template-columns: 1fr 46%; grid-template-rows: auto auto 1fr auto; grid-template-areas: "bar bar" "ticker ticker" "table hand" "me hand"; }
  .bar { grid-area: bar; } .ticker { grid-area: ticker; }
  .table { grid-area: table; min-height: 0; margin: 0 6px; }
  .me-strip { grid-area: me; }
  .hand-area { grid-area: hand; overflow: auto; padding: 4px 8px 8px; }
  .emote-panel { bottom: auto; top: 46px; max-height: calc(100dvh - 70px); animation-name: menuIn; transform-origin: top right; grid-template-columns: repeat(3, auto); }
  .hand { max-height: none; }
  .seat[data-rel="2"], .seat[data-rel="3"] { top: 4px; }
  .seat[data-rel="2"] { right: 6%; } .seat[data-rel="3"] { left: 6%; }
  .center { top: 56%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 头科出完：头像裹一层金光 */
.avatar-wrap.champ .avatar { animation: champGlow 2.6s ease-out; }
@keyframes champGlow {
  0% { box-shadow: 0 0 0 0 rgba(246,213,125,1), 0 4px 10px rgba(0,0,0,.35); filter: brightness(1.5); }
  25% { box-shadow: 0 0 0 6px rgba(246,213,125,.85), 0 0 46px rgba(233,181,74,1), 0 4px 10px rgba(0,0,0,.35); filter: brightness(1.2); }
  100% { box-shadow: 0 0 0 2px rgba(246,213,125,.3), 0 0 14px rgba(233,181,74,.4), 0 4px 10px rgba(0,0,0,.35); filter: none; }
}

/* 磕头：深深一躬 */
.avatar-wrap.kowtow .avatar { animation: kowtow 1.6s cubic-bezier(.3,.7,.3,1); transform-origin: bottom center; }
@keyframes kowtow { 20%, 55% { transform: rotate(46deg) translateY(6px) scaleY(.9); } 75% { transform: rotate(-6deg); } }

/* ---------- 玩家名字：一人一个固定颜色，牌桌/近况/动态里都一样 ---------- */
.p0 { --pc: #f6d57d; }   /* 金 */
.p1 { --pc: #8fd0ff; }   /* 天蓝 */
.p2 { --pc: #ff9ab0; }   /* 粉 */
.p3 { --pc: #8ee6b8; }   /* 薄荷 */
.p4 { --pc: #ffb36b; }   /* 橙 */
.pname {
  color: var(--pc); font-weight: 700; white-space: nowrap;
  border-bottom: 2px solid color-mix(in srgb, var(--pc) 55%, transparent);
  padding-bottom: 1px;
}
.pname.me::after { content: "·你"; font-size: .82em; opacity: .7; margin-left: 1px; font-weight: 600; }
.seat-name .pname, .me-name .pname {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom;
  border-bottom: 0; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--pc) 18%, rgba(0,0,0,.42));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc) 45%, transparent);
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.me-name .pname { font-size: 13px; }
/* 头像外圈也用本人的颜色，和名字对得上 */
.seat .avatar, .me-strip .avatar { border-color: color-mix(in srgb, var(--pc, #ded7c4) 60%, var(--wall-dark)); }
.seat.empty .avatar { border-color: rgba(251,245,230,.3); }
/* 弹层（浅底）里的名字要压暗一点才看得清 */
.sheet .pname, .sv .pname { border-bottom-color: color-mix(in srgb, var(--pc) 70%, transparent); }
.sheet .pname { color: color-mix(in srgb, var(--pc) 60%, #4a3d32); }

/* ---------- 被憋住 ---------- */
.b-bie { background: linear-gradient(180deg, #5b2b22, #3a1a14); color: #ffb3a7; box-shadow: inset 0 0 0 1px rgba(255,154,138,.5); animation: biePulse 1.6s ease-in-out infinite; }
@keyframes biePulse { 50% { box-shadow: inset 0 0 0 1px rgba(255,154,138,.9), 0 0 10px rgba(200,50,30,.7); } }
.bie-tag { color: #ff9a8a !important; }
.avatar-wrap.choke-hit .avatar { animation: chokeHit 1.8s cubic-bezier(.3,.7,.3,1); }
@keyframes chokeHit {
  0% { box-shadow: 0 0 0 0 rgba(200,50,30,1), 0 4px 10px rgba(0,0,0,.35); filter: brightness(1.4) saturate(1.4); }
  20% { transform: translate(-3px, 2px) rotate(-5deg); box-shadow: 0 0 0 5px rgba(200,50,30,.9), 0 0 32px rgba(200,50,30,.9), 0 4px 10px rgba(0,0,0,.35); }
  40% { transform: translate(3px, -1px) rotate(4deg); }
  60% { transform: none; }
  100% { box-shadow: 0 0 0 2px rgba(200,50,30,.45), 0 0 12px rgba(200,50,30,.35), 0 4px 10px rgba(0,0,0,.35); filter: saturate(.85); }
}

/* ---------- 大厅开场：皇帝扭一段大秧歌，纸帽子砸下来，演一遍就定住 ----------
   节奏：0~5.5s 扭五个来回（1.1s 一个），帽子分别在 3.25 / 4.35 / 5.45 秒砸到头上，
   之后全部停在最后一帧——他顶着三顶纸帽子站那儿不动。点一下可以重演。 */
.opening { position: relative; width: clamp(118px, 32vw, 158px); height: clamp(130px, 36vw, 174px); margin-bottom: -4px; cursor: pointer; }
.opening .emp { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.opening .shadow { fill: rgba(0,0,0,.28); animation: shadowBeat 1.1s ease-in-out 5 both; }
@keyframes shadowBeat { 0%, 100% { rx: 26px; opacity: 1; } 50% { rx: 22px; opacity: .7; } }
/* 整个人上下颠、左右扭，停下来时是正的 */
.opening .dancer { transform-box: fill-box; transform-origin: 50% 100%; animation: yangge 1.1s ease-in-out 5 both; }
@keyframes yangge {
  0%, 50%, 100% { transform: translateY(0) rotate(0deg); }
  22% { transform: translateY(-7px) rotate(-5deg); }
  72% { transform: translateY(-7px) rotate(5deg); }
}
/* 胳膊一上一下甩，手绢转圈 */
.opening .arm { transform-box: fill-box; transform-origin: 90% 50%; }
.opening .a-r { transform-origin: 10% 50%; }
.opening .a-l { animation: armL 1.1s ease-in-out 5 both; }
.opening .a-r { animation: armR 1.1s ease-in-out 5 both; }
@keyframes armL { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-38deg); } 75% { transform: rotate(22deg); } }
@keyframes armR { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(38deg); } 75% { transform: rotate(-22deg); } }
.opening .kerchief { transform-box: fill-box; transform-origin: 50% 50%; animation: twirl 1.1s linear 5 both; }
@keyframes twirl { to { transform: rotate(360deg); } }
/* 两条腿交替踢 */
.opening .leg { transform-box: fill-box; transform-origin: 50% 0; }
.opening .leg.l { animation: legA 1.1s ease-in-out 5 both; }
.opening .leg.r { animation: legB 1.1s ease-in-out 5 both; }
@keyframes legA { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes legB { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(12deg); } 75% { transform: rotate(-12deg); } }
/* 冕旒的珠串跟着晃 */
.opening .liu { transform-box: fill-box; transform-origin: 50% 0; animation: liuSwing 1.1s ease-in-out 5 both; }
@keyframes liuSwing { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(5deg); } 75% { transform: rotate(-5deg); } }
/* 每被砸一下，脑袋缩一缩（整条时间线 7s，砸中在 46% / 62% / 78%） */
.opening .head { transform-box: fill-box; transform-origin: 50% 100%; animation: bonkHead 7s linear 1 both; }
@keyframes bonkHead {
  0%, 45% { transform: none; }
  47% { transform: scaleY(.84) scaleX(1.1) translateY(3px); }
  51%, 61% { transform: none; }
  63% { transform: scaleY(.86) scaleX(1.08) translateY(3px); }
  67%, 77% { transform: none; }
  79% { transform: scaleY(.88) scaleX(1.06) translateY(2px); }
  83%, 100% { transform: none; }
}
/* 三顶纸帽子，一顶顶砸下来摞在头上，砸完就一直戴着 */
.opening .fallhat {
  position: absolute; left: 50%; top: 0; width: 38%; height: 22%; margin-left: -19%;
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Cpath d='M4 30 L30 3 L56 30 Z' fill='%23ded7c4' stroke='%23231a14' stroke-width='1.5'/%3E%3Cpath d='M2 30 H58 V37 H2 Z' fill='%23cfc7b1' stroke='%23231a14' stroke-width='1.5'/%3E%3Cpath d='M17 18 H43 M13 22 H47 M21 14 H39 M24 10 H36' stroke='%23231a14' stroke-width='.8' opacity='.45'/%3E%3Ctext x='30' y='35.5' font-size='5' text-anchor='middle' fill='%23c8321e' font-weight='900'%3E大落%3C/text%3E%3C/svg%3E") center/contain no-repeat;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.4));
  animation: hatDrop 1.1s cubic-bezier(.5,0,.75,1) 1 both;
}
.opening .h1 { animation-delay: 2.65s; --ry: 3%; --rr: -4deg; }
.opening .h2 { animation-delay: 3.75s; --ry: -13%; --rr: 5deg; }
.opening .h3 { animation-delay: 4.85s; --ry: -28%; --rr: -7deg; }
@keyframes hatDrop {
  0% { transform: translate(-6px, -190%) rotate(-24deg); opacity: 0; }
  12% { opacity: 1; }
  55% { transform: translate(0, calc(var(--ry) + 3%)) rotate(0deg); opacity: 1; }      /* 砸到脑袋，往下压一点 */
  72% { transform: translate(0, calc(var(--ry) - 5%)) rotate(calc(var(--rr) * -.6)); }
  100% { transform: translate(0, var(--ry)) rotate(var(--rr)); opacity: 1; }           /* 从此戴着不动 */
}
/* 第一下砸中时冒一句 */
.opening .oops {
  position: absolute; left: 68%; top: 18%; font-family: var(--serif); font-weight: 900; font-size: 15px;
  color: var(--paper); text-shadow: 0 2px 3px rgba(0,0,0,.6); opacity: 0;
  animation: oops 7s ease-out 1 both;
}
@keyframes oops {
  0%, 45% { opacity: 0; transform: scale(.5) translateY(6px); }
  48% { opacity: 1; transform: scale(1.15) translateY(0); }
  52% { transform: scale(1); }
  62% { opacity: 1; }
  72%, 100% { opacity: 0; transform: translateY(-10px); }
}
@media (max-height: 700px) { .opening { width: 130px; height: 145px; } .opening .oops { font-size: 13px; } }

/* 等人时提示局域网地址，方便别人用手机进来 */
.room-box { display: flex; flex-direction: column; align-items: center; width: 100%; }
.room-sub { font-size: 11px; letter-spacing: .35em; color: var(--news); opacity: .55; text-align: center; margin-bottom: -2px; padding-left: .35em; }
.center-actions .btn.wide { flex-basis: 100%; max-width: 260px; order: -1; }
.opt-chip { flex-basis: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: none; border: 0; color: var(--news); opacity: .75; font-size: 12.5px; padding: 4px; }
.opt-chip i { width: 28px; height: 16px; border-radius: 8px; background: rgba(255,255,255,.18); position: relative; transition: background .2s; }
.opt-chip i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .2s; }
.opt-chip.on { opacity: .95; } .opt-chip.on i { background: var(--jade); } .opt-chip.on i::after { left: 14px; }

/* ---------- 今晚战绩 ---------- */
.stats-wrap { overflow-x: auto; margin: 6px -4px 2px; -webkit-overflow-scrolling: touch; }
table.stats { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.stats th, table.stats td { padding: 7px 4px; text-align: center; white-space: nowrap; }
table.stats th { font-size: 11px; color: var(--tile-deep); font-weight: 700; border-bottom: 2px solid rgba(35,26,20,.12); }
table.stats td { border-bottom: 1px solid rgba(35,26,20,.08); color: #4a3d32; }
table.stats .nm { text-align: left; font-weight: 700; color: var(--ink); padding-left: 2px; }
table.stats .nm small { font-weight: 500; opacity: .5; }
table.stats tr.me td { background: rgba(233,181,74,.18); }
table.stats tr.me .nm { color: var(--cinnabar); }
.fun-h { font-family: var(--serif); font-size: 16px; margin: 14px 0 4px; }
.fun-list { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.9; color: #4a3d32; }
.fun-list b { color: var(--cinnabar); }
.next-row .btn { flex: 1; }

/* 被憋住了：手牌锁住，点不动 */
.hand.locked { opacity: .5; filter: grayscale(.45); pointer-events: none; }
.brain-line { font-size: 12px; color: #6b5a4a; margin: 10px 2px 0; line-height: 1.5; }

/* ---------- 手牌上的暗记：炸弹、保子牌（不抢眼，自己看得明白就行） ---------- */
.hand .card.bomb { box-shadow: inset 0 -3px 0 rgba(255,138,90,.85), -2px 0 3px rgba(0,0,0,.16), 0 1px 2px rgba(0,0,0,.1); }
.hand .card.bomb-first::before { content: "炸"; position: absolute; left: -3px; top: -7px; z-index: 2; font-family: var(--serif); font-weight: 900; font-size: 9px; line-height: 1; color: #fff; background: #e04a35; border-radius: 6px; padding: 2px 4px; box-shadow: 0 1px 2px rgba(0,0,0,.35); }
.hand .card.trump { box-shadow: 0 0 0 1.5px rgba(200,50,30,.55), 0 0 8px rgba(200,50,30,.35), -2px 0 3px rgba(0,0,0,.16); }
.hand .card.sel.bomb { box-shadow: inset 0 -3px 0 rgba(255,138,90,.85), 0 0 0 2px rgba(233,181,74,.7), 0 8px 18px rgba(0,0,0,.35); }

/* ===== 换肤：桌布（只影响本机） ===== */
html[data-skin="red"] { --wall: #7a2626; --wall-deep: #4e1616; --wall-dark: #2a0b0b; }
html[data-skin="blue"] { --wall: #26405f; --wall-deep: #172a42; --wall-dark: #0b1522; }
html[data-skin="wood"] { --wall: #6b4522; --wall-deep: #452a12; --wall-dark: #241406; }
html[data-skin="night"] { --wall: #2a2a32; --wall-deep: #17171c; --wall-dark: #09090b; }
html[data-skin="tea"] { --wall: #5a4630; --wall-deep: #3a2c1c; --wall-dark: #1e160d; }
html[data-skin="wood"] body::before {
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 7px),
    radial-gradient(90% 70% at 50% 40%, transparent 55%, rgba(0,0,0,.4) 100%);
}
html[data-skin="night"] body::before { background: radial-gradient(90% 70% at 50% 40%, transparent 50%, rgba(0,0,0,.5) 100%); }
/* 牌面 */
html[data-cards="white"] .card:not(.back), .card[data-cards="white"] { --card-a: #ffffff; --card-b: #fdfdfd; --card-c: #efefef; --card-edge: #c9c9c9; }
html[data-cards="kraft"] .card:not(.back), .card[data-cards="kraft"] { --card-a: #f1dfb8; --card-b: #e6cf9f; --card-c: #d6ba84; --card-edge: #a98c5a; }
html[data-cards="jade"] .card:not(.back), .card[data-cards="jade"] { --card-a: #f3fbf5; --card-b: #e4f3e8; --card-c: #cfe6d6; --card-edge: #93b8a0; }
.skin-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.skin-opt { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 72px; padding: 8px 4px 6px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.18); font-size: 12px; color: var(--news); }
.skin-opt i { display: block; width: 44px; height: 30px; border-radius: 7px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.12), 0 2px 4px rgba(0,0,0,.4); }
.skin-opt.on { border-color: var(--tile); color: var(--tile); background: rgba(233,181,74,.12); }
.skin-opt .card.sm { margin-left: 0; pointer-events: none; }

/* ===== 托管 ===== */
.b-auto { background: linear-gradient(180deg, #3b4a66, #26324a); color: #cfe0ff; box-shadow: inset 0 0 0 1px rgba(170,200,255,.45); }
.auto-tag { margin-left: 6px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(170,200,255,.6); background: rgba(40,60,100,.6); color: #dfeaff; font-size: 11px; font-weight: 700; animation: biePulse 1.6s ease-in-out infinite; }
.auto-tag:active { transform: scale(.96); }

/* ===== 弹层里的页签（战绩 / 复盘） ===== */
.tabs { display: flex; gap: 6px; margin: 6px 0 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.tabs button { background: none; border: 0; padding: 8px 12px; font-size: 14px; font-weight: 700; color: var(--news); opacity: .6; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { opacity: 1; color: var(--tile); border-bottom-color: var(--tile); }
.sheet .muted { opacity: .65; font-size: 13px; }

/* ===== 生涯存档 ===== */
.career-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0; }
.career-tiles div { background: rgba(0,0,0,.18); border-radius: 10px; padding: 8px 4px; text-align: center; border: 1px solid rgba(255,255,255,.05); }
.career-tiles b { display: block; font-family: var(--serif); font-size: 20px; color: var(--tile); line-height: 1.1; }
.career-tiles span { font-size: 11px; opacity: .7; }
.stats td.nm small { opacity: .6; font-size: 10px; margin-left: 3px; }

/* ===== 复盘 ===== */
.rp-head { font-size: 13px; opacity: .85; margin: 2px 0 6px; }
.rp-places { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; margin-bottom: 4px; }
.rp-place b { color: var(--tile); margin-right: 4px; font-family: var(--serif); }
.rp-key { list-style: none; padding: 0; margin: 0; font-size: 13px; line-height: 1.6; }
.rp-key li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.07); }
.rp-key li i { font-style: normal; width: 22px; text-align: center; flex: none; }
.rp-cards { display: inline-flex; margin-left: 14px; vertical-align: middle; }
.rp-cards .card.sm { --overlap: -11px; }
.rp-cards .card.sm.trump { box-shadow: 0 0 0 1.5px rgba(200,50,30,.7), -1px 0 2px rgba(0,0,0,.2); }
.rp-tricks { max-height: 52vh; overflow: auto; -webkit-overflow-scrolling: touch; }
.rp-trick { background: rgba(0,0,0,.16); border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; border: 1px solid rgba(255,255,255,.04); }
.rp-th { font-family: var(--serif); font-size: 12px; color: var(--tile); letter-spacing: .1em; margin-bottom: 2px; }
.rp-step { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; font-size: 13px; padding: 4px 0; }
.rp-step b { font-size: 10px; opacity: .45; width: 18px; font-weight: 400; }
.rp-step small { font-size: 10px; opacity: .55; }
.rp-step em { font-style: normal; font-size: 11px; color: var(--tile); margin-left: 4px; }
.rp-step.pass { opacity: .55; padding: 1px 0 1px 24px; }
.rp-step.bomb { color: #ffb08a; }
.rp-won { font-size: 12px; color: var(--jade); padding: 2px 0 2px 24px; }
.rp-won.bad { color: #ff9a8a; }

/* ===== 实时语音 ===== */
/* 自己头像左边的麦克风：只有自己这一个，别人头像旁没有 */
.mic-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(251,245,230,.25); background: rgba(0,0,0,.25); padding: 0; line-height: 1; transition: background .2s, border-color .2s, transform .12s; flex: none; }
.mic-btn .mic-ic { display: block; line-height: 0; }
.mic-btn .mic-lbl { font-size: 8px; opacity: .75; margin-top: 1px; }
.mic-btn:active { transform: scale(.92); }
.mic-btn.off { opacity: .85; }
.mic-btn.on { background: rgba(79,167,140,.4); border-color: var(--jade); animation: livePulse 2s ease-out infinite; }
.mic-btn.on .mic-lbl { opacity: 1; color: #d9f5ea; }
.mic-btn.denied, .mic-btn.unsupported { background: rgba(200,50,30,.22); border-color: rgba(255,154,138,.5); opacity: .8; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(79,167,140,.55); } 70% { box-shadow: 0 0 0 9px rgba(79,167,140,0); } 100% { box-shadow: 0 0 0 0 rgba(79,167,140,0); } }
.avatar-wrap.talking .avatar { box-shadow: 0 0 0 3px rgba(79,167,140,.85), 0 0 18px rgba(79,167,140,.7), 0 4px 10px rgba(0,0,0,.35); }
/* 语音设置弹层 */
.aud-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 14px; }
.aud-row input[type=range] { flex: 1; max-width: 60%; accent-color: var(--tile); }
.switch { width: 46px; height: 26px; border-radius: 13px; border: 0; background: rgba(255,255,255,.18); position: relative; padding: 0; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.switch.on { background: var(--jade); } .switch.on i { left: 23px; }
.aud-list { list-style: none; padding: 0; margin: 0; }
.aud-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,.07); font-size: 14px; }
.aud-list .nm { flex: 1; } .aud-list .st { font-size: 12px; opacity: .6; } .aud-list .st.ok { color: var(--jade); opacity: 1; }
.aud-list .blk { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 4px; }
.aud-list input[type=checkbox] { accent-color: var(--cinnabar); }
.sheet ol.how { padding-left: 20px; line-height: 1.8; font-size: 14px; }
.sheet code { background: rgba(0,0,0,.25); padding: 1px 6px; border-radius: 5px; font-size: 13px; }

/* 藏牌数：「?」牌 */
.count.hid { background: linear-gradient(180deg, #3b2b1f, #241810); color: var(--tile); border-color: var(--tile-deep); font-family: var(--serif); font-weight: 900; animation: hidFlip .5s var(--ease-pop), hidGlow 2.4s 1s ease-in-out infinite; }
.count.hid.still { animation: hidGlow 2.4s ease-in-out infinite; }
@keyframes hidFlip { 0% { transform: rotateY(90deg) scale(.6); } 60% { transform: rotateY(0) scale(1.15); } }
@keyframes hidGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(233,181,74,.35); } 50% { box-shadow: 0 0 10px 2px rgba(233,181,74,.55); } }

/* ===== 大墨鱼 ===== */
.squid { position: fixed; left: 0; width: 240px; height: 150px; z-index: 44; transform: translate(-110%, -50%); animation: squidIn 2.4s cubic-bezier(.3,.7,.3,1) forwards; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); }
.squid svg { width: 100%; height: 100%; overflow: visible; }
.squid .tent { animation: tentWave .5s ease-in-out infinite alternate; transform-origin: 118px 58px; }
.squid .body { animation: squidPuff 2.4s ease-in-out forwards; transform-origin: 60px 50px; }
@keyframes squidIn { 0% { transform: translate(-110%, -50%); } 30% { transform: translate(6%, -50%); } 45% { transform: translate(2%, -50%) scaleX(1.08); } 75% { transform: translate(4%, -50%); } 100% { transform: translate(-120%, -50%); } }
@keyframes squidPuff { 0%, 30% { transform: none; } 38% { transform: scale(1.18, 1.1); } 44% { transform: scale(.9, 1.02); } 55%, 100% { transform: none; } }
@keyframes tentWave { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.ink-blob { position: fixed; width: 28px; height: 28px; border-radius: 50% 45% 55% 50%; background: radial-gradient(circle at 35% 35%, #3a4a56, #0f171d 70%); z-index: 45; }
.ink-splat { position: fixed; width: 52px; height: 52px; z-index: 45; background: radial-gradient(circle, #121b22 0 40%, rgba(18,27,34,.95) 55%, transparent 72%); border-radius: 48% 55% 42% 58%; animation: inkSplat 2.6s ease-out forwards; }
@keyframes inkSplat { 0% { transform: scale(.3); opacity: 1; } 12% { transform: scale(1.15); } 70% { transform: scale(1); opacity: .95; } 100% { transform: scale(.85); opacity: 0; } }
.ink-drop { position: fixed; border-radius: 50%; background: #121b22; z-index: 43; animation: inkDrop 2.4s ease-out forwards; }
@keyframes inkDrop { 0% { transform: scale(.2); opacity: .9; } 20% { transform: scale(1); } 100% { opacity: 0; } }
.ink-dim { position: fixed; inset: 0; background: radial-gradient(80% 60% at 50% 45%, rgba(10,16,20,.45), rgba(10,16,20,.15)); z-index: 42; animation: inkDim 2.6s ease-out forwards; }
@keyframes inkDim { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.count.inked { color: transparent !important; background: #121b22 !important; border-color: #0b1115 !important; box-shadow: 0 0 0 3px rgba(18,27,34,.5), 0 2px 6px rgba(0,0,0,.5) !important; animation: none !important; }

/* 桌面右栏：可以收起来，让牌桌铺满 */
.side-tab { display: none; position: absolute; left: 0; top: 50%; transform: translate(-100%, -50%); width: 24px; height: 84px; border-radius: 10px 0 0 10px; border: 1px solid rgba(233,181,74,.3); border-right: 0; background: rgba(0,0,0,.42); color: var(--tile); padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 2px; opacity: .75; transition: opacity .2s, background .2s; z-index: 3; }
.side.collapsed .side-tab { display: flex; }
.side-fold { width: 24px; height: 24px; border-radius: 7px; border: 1px solid rgba(233,181,74,.3); background: rgba(0,0,0,.25); color: var(--tile); padding: 0; display: grid; place-items: center; margin-right: 2px; flex: none; }
.side-fold svg.ic { width: 15px; height: 15px; }
.side-fold:hover { background: rgba(233,181,74,.18); }
.side-tab:hover { opacity: 1; background: rgba(0,0,0,.6); }
.side-tab-ic { font-size: 18px; line-height: 1; font-weight: 700; }
.side-tab-lbl { writing-mode: vertical-rl; font-size: 10px; letter-spacing: .15em; opacity: .8; }
.side.collapsed { width: 0; overflow: visible; border-left: 0; }
.side.collapsed .side-inner { display: none; }
.side.collapsed .side-tab:hover { opacity: 1; }
@media (min-width: 960px) {
  body.side-off .ticker { display: block; }     /* 右栏收起时，顶上那行动态补上 */
  body.side-off .table { max-width: 1040px; }
}

/* ===== 全桌动作：炸弹 / 泼水 ===== */
.big-bomb { position: fixed; width: 52px; height: 52px; z-index: 45; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.big-bomb svg { width: 100%; height: 100%; overflow: visible; }
.big-bomb .spark { opacity: 0; }
.big-bomb.fizz .spark { opacity: 1; animation: fizz .14s infinite alternate; }
.big-bomb.fizz { animation: bombShake .12s infinite; }
@keyframes fizz { from { r: 2; opacity: .6; } to { r: 5; opacity: 1; } }
@keyframes bombShake { from { transform: translate(-1px, 0) rotate(-3deg); } to { transform: translate(1px, 0) rotate(3deg); } }
.boom { position: fixed; width: 20px; height: 20px; border-radius: 50%; z-index: 45; transform: translate(-50%, -50%); background: radial-gradient(circle, #fff 0%, #ffd27a 18%, #ff7a3a 40%, #c8321e 60%, rgba(40,20,10,.9) 75%, transparent 85%); animation: boom 1.5s cubic-bezier(.1,.8,.2,1) forwards; }
@keyframes boom { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 1; } 35% { transform: translate(-50%, -50%) scale(18); opacity: 1; } 100% { transform: translate(-50%, -60%) scale(22); opacity: 0; } }
.soot { position: fixed; border-radius: 45% 55% 50% 50%; background: #1a1a1f; opacity: .7; z-index: 43; animation: sootFade 5s ease-out forwards; }
@keyframes sootFade { 0% { transform: scale(.3); } 10% { transform: scale(1); opacity: .75; } 100% { opacity: 0; } }
/* 被炸之后：黑脸 + 炸毛 + 冒烟，几秒才缓过来 */
.avatar-wrap.scorched .avatar { filter: brightness(.35) contrast(1.3) sepia(.4); animation: scorchJolt .5s; transition: filter .3s; }
.avatar-wrap.scorched .avatar::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: radial-gradient(circle, transparent 55%, rgba(20,20,25,.7) 70%, transparent 85%); pointer-events: none; }
.avatar-wrap.scorched::before { content: ""; position: absolute; left: 50%; top: -14px; width: 70%; height: 22px; transform: translateX(-50%); background: repeating-linear-gradient(90deg, transparent 0 4px, #1a1a1f 4px 7px); clip-path: polygon(0 100%, 12% 20%, 22% 90%, 35% 0, 47% 85%, 58% 10%, 70% 90%, 82% 25%, 92% 95%, 100% 40%, 100% 100%); z-index: 3; }
@keyframes scorchJolt { 20% { transform: translate(-5px, 3px) rotate(-10deg); } 50% { transform: translate(5px, -3px) rotate(8deg); } 80% { transform: translate(-2px, 1px) rotate(-3deg); } }
.smoke { position: absolute; top: -4px; width: 14px; height: 14px; border-radius: 50%; background: rgba(120,120,130,.75); z-index: 4; animation: smokeUp 1.6s ease-out infinite; pointer-events: none; }
@keyframes smokeUp { 0% { transform: translateY(0) scale(.5); opacity: .8; } 100% { transform: translateY(-42px) translateX(6px) scale(1.8); opacity: 0; } }
.wave { position: fixed; width: 20px; height: 20px; border-radius: 50%; z-index: 44; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(216,240,255,.9) 0%, rgba(143,208,255,.7) 40%, rgba(79,167,255,.3) 65%, transparent 75%); animation: wave 1.4s cubic-bezier(.1,.8,.2,1) forwards; }
@keyframes wave { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(22); opacity: 0; } }
.avatar-wrap.wet .avatar { filter: saturate(1.3) brightness(1.08); box-shadow: 0 0 0 3px rgba(143,208,255,.55), 0 0 16px rgba(79,167,255,.6), 0 4px 10px rgba(0,0,0,.35); }
.avatar-wrap.wet .avatar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(180deg, rgba(216,240,255,.45), transparent 50%); pointer-events: none; }
.drip { position: absolute; bottom: -2px; width: 5px; height: 9px; border-radius: 50% 50% 60% 60%; background: #8fd0ff; z-index: 4; animation: drip 1.3s ease-in infinite; pointer-events: none; }
@keyframes drip { 0% { transform: translateY(0) scaleY(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(26px) scaleY(1.3); opacity: 0; } }

/* ===== 桌面小动物 ===== */
.critter { position: fixed; z-index: 44; width: 72px; height: 56px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.45)); pointer-events: none; }
.critter svg { width: 100%; height: 100%; overflow: visible; }
.critter.run svg .leg, .critter.run svg .arm { animation: legRun .18s infinite alternate; transform-origin: center top; }
.critter.run svg .tail { animation: tailWag .3s infinite alternate; transform-origin: left center; }
@keyframes legRun { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
@keyframes tailWag { from { transform: rotate(-10deg); } to { transform: rotate(14deg); } }
.critter.owl { width: 64px; height: 64px; }
.critter.owl.fly svg .wing { animation: flap .16s infinite alternate; transform-origin: center top; }
@keyframes flap { from { transform: scaleY(.6); } to { transform: scaleY(1.15); } }
.critter.rat { width: 64px; height: 36px; transform-origin: center bottom; }
/* 站立张望：竖起来，胡子一抖一抖 */
.critter.rat.stand svg { animation: ratStand .6s var(--ease-pop) forwards, ratLook 1.1s .5s ease-in-out infinite alternate; transform-origin: 20% 90%; }
@keyframes ratStand { to { transform: rotate(-70deg) translate(6px, 2px); } }
@keyframes ratLook { from { transform: rotate(-70deg) translate(6px, 2px); } to { transform: rotate(-58deg) translate(8px, 0); } }
.critter.rat.stand svg .leg { animation: none; }
/* 啃：脑袋一点一点，尾巴乱甩 */
.critter.rat.bite svg { animation: ratBite .18s infinite alternate; transform-origin: 80% 70%; }
@keyframes ratBite { from { transform: rotate(-6deg) translateX(2px); } to { transform: rotate(8deg) translateX(-1px); } }
.critter.rat.bite svg .tail { animation: tailWag .15s infinite alternate; }
.critter.turtle { width: 60px; height: 36px; }
.critter.bell { width: 96px; height: 108px; z-index: 46; }
.critter.mask-drop { width: 48px; height: 34px; }
.critter.packet { pointer-events: auto; cursor: pointer; width: 34px; height: 48px; background: none; border: 0; padding: 0; z-index: 46; animation: packetSway 1.2s ease-in-out infinite alternate; }
@keyframes packetSway { from { margin-left: -8px; } to { margin-left: 8px; } }
.fly-count { position: fixed; z-index: 46; pointer-events: none; }
/* 趴在座位上的东西 */
.sfx { position: absolute; z-index: 5; pointer-events: none; display: block; }
.sfx svg { width: 100%; height: 100%; overflow: visible; }
.turtled { right: -30px; bottom: -6px; width: 38px; height: 24px; animation: turtleBreath 2s ease-in-out infinite; }
@keyframes turtleBreath { 50% { transform: scaleY(.94); } }
.masked { left: 50%; top: 10px; width: 46px; height: 32px; transform: translateX(-50%); z-index: 6; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.me-strip .turtled { width: 26px; height: 16px; right: -22px; }
.me-strip .masked { width: 26px; height: 18px; top: 4px; }
/* 老鼠啃过的牌数牌 / 区间 */
.count.bitten { clip-path: polygon(0 0, 70% 0, 80% 20%, 100% 15%, 100% 100%, 30% 100%, 20% 80%, 0 90%); }
.count.rng { font-size: 9.5px; letter-spacing: -.02em; padding: 0 4px; min-width: 30px; background: linear-gradient(180deg, #6b6b6b, #444); border-color: #333; clip-path: polygon(0 0, 70% 0, 80% 20%, 100% 15%, 100% 100%, 30% 100%, 20% 80%, 0 90%); }

/* 喷墨：先把整个屏幕糊黑，很快化开散去 */
.ink-full { position: fixed; inset: 0; z-index: 46; pointer-events: none; animation: inkFullFade 2.1s ease-in forwards; }
.ink-full i { position: absolute; width: 60vmax; height: 60vmax; margin: -30vmax 0 0 -30vmax; border-radius: 48% 55% 42% 58%; background: radial-gradient(circle, #0c1216 0 55%, rgba(12,18,22,.9) 70%, transparent 82%); animation: inkFullBlob 1.9s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes inkFullBlob { 0% { transform: scale(.1); } 30% { transform: scale(1.1); } 100% { transform: scale(1.3) rotate(8deg); } }
@keyframes inkFullFade { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }

/* 猴子：挠头 / 抱着的牌 */
.critter.monkey { width: 72px; height: 64px; }
.critter.monkey.scratch svg .arm { animation: scratch .25s infinite alternate; transform-origin: 46px 34px; }
@keyframes scratch { from { transform: rotate(-20deg) translateY(-4px); } to { transform: rotate(-40deg) translateY(-8px); } }
.critter.monkey .carried { position: absolute; right: -6px; top: 18px; visibility: visible !important; transform: rotate(12deg); }
/* 猫头鹰：张望 / 咕 */
.critter.owl.look svg { animation: owlLook 1.4s ease-in-out; transform-origin: center 70%; }
@keyframes owlLook { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-16deg); } 65% { transform: rotate(16deg); } }
.critter.owl.hoot svg { animation: owlHoot .5s ease-in-out 2; transform-origin: center bottom; }
@keyframes owlHoot { 50% { transform: scale(1.12, .9); } }
/* 乌龟：慢爬时脑袋一点一点，到了缩一下 */
.critter.turtle.crawl svg .head { animation: turtleHead .8s ease-in-out infinite alternate; transform-origin: 56px 28px; }
@keyframes turtleHead { from { transform: translateX(0); } to { transform: translateX(-4px) rotate(-6deg); } }
.critter.turtle.crawl svg .leg { animation: legRun .5s infinite alternate; }
.critter.turtle.shy svg .head { animation: turtleShy .9s ease-in-out; transform-origin: 56px 28px; }
@keyframes turtleShy { 30%, 60% { transform: translateX(-12px) scale(.6); } }
/* 大钟：音波 */
.bell-ring { position: fixed; width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(246,213,125,.8); z-index: 45; transform: translate(-50%, -50%); animation: bellRing 1.3s ease-out forwards; pointer-events: none; }
@keyframes bellRing { 0% { transform: translate(-50%, -50%) scale(.5); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(9); opacity: 0; } }

/* ===== 体验细节 ===== */
/* 轮到我：手牌区描一圈金边轻轻呼吸，出牌按钮跟着亮 */
body.my-turn .hand-area { box-shadow: inset 0 0 0 1px rgba(233,181,74,.35), inset 0 10px 30px -20px rgba(233,181,74,.5); animation: turnGlow 2s ease-in-out infinite; }
@keyframes turnGlow { 50% { box-shadow: inset 0 0 0 1px rgba(233,181,74,.7), inset 0 10px 40px -16px rgba(233,181,74,.8); } }
body.my-turn #playBtn:not(:disabled) { animation: playPulse 1.4s ease-in-out infinite; }
@keyframes playPulse { 50% { box-shadow: 0 2px 0 #7d5814, 0 0 0 6px rgba(233,181,74,.18), 0 6px 16px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.55); } }
.ring-num { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); font-family: var(--serif); font-weight: 900; font-size: 13px; color: #ffb3a7; text-shadow: 0 1px 2px rgba(0,0,0,.6); z-index: 4; animation: fade .2s; }
/* 回到上次的房间 */
.recent-rooms { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 2px 0 6px; font-size: 12px; color: var(--news); opacity: .9; }
.recent-rooms .chip { padding: 4px 10px; font-size: 13px; }
/* 新手引导 */
.guide { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .3s; }
.guide.out { opacity: 0; transition: opacity .3s; }
.guide-card { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 18px 20px 14px; max-width: 360px; box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: guideIn .35s var(--ease-pop); }
@keyframes guideIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.guide-card h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 8px; }
.guide-card ol { padding-left: 20px; margin: 0; line-height: 1.8; font-size: 14.5px; }
.guide-card b { color: var(--cinnabar); }
.guide-card small { display: block; margin-top: 10px; opacity: .6; text-align: center; }
/* 动画减弱：系统开了「减弱动态效果」就不抖不闪 */
@media (prefers-reduced-motion: reduce) {
  .shake { animation: none !important; }
  .flash, .ink-full, .ink-dim { display: none !important; }
  .critter, .squid, .big-bomb { animation-duration: .4s !important; }
}

/* ===== 大厅：梅兰竹菊 + 特色桌 + 玩家开的房（网格，房多了整页往下滚） ===== */
#hall { display: flex; flex-direction: column; padding: max(10px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom)); gap: 10px; }
#hall > * { flex-shrink: 0; }
.hall-bar { display: flex; align-items: center; gap: 10px; }
.hall-title { flex: 1; text-align: center; font-family: var(--serif); font-weight: 900; font-size: 17px; letter-spacing: .4em; color: var(--tile); padding-left: .4em; }
.hall-me { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid rgba(233,181,74,.3); background: rgba(0,0,0,.25); color: var(--news); font-size: 13px; max-width: 46%; }
.hall-me .hm-face { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--paper); flex: none; display: grid; place-items: center; }
.hall-me .hm-face svg { width: 100%; height: 100%; }
.hall-me .hm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall-rooms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 1180px; margin: 0 auto; }
.hall-room {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 14px 10px 12px; border-radius: 18px; border: 1px solid rgba(233,181,74,.26); color: var(--news);
  background: linear-gradient(165deg, rgba(255,255,255,.07), rgba(0,0,0,.3));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.3);
  transition: transform .15s var(--ease-pop), border-color .2s, box-shadow .2s;
}
.hall-room:active:not(:disabled) { transform: scale(.97); }
@media (hover: hover) { .hall-room:hover:not(:disabled) { border-color: var(--tile); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 10px 26px rgba(0,0,0,.4); transform: translateY(-2px); } }
.hall-room .hr-art { position: absolute; right: -14px; bottom: -14px; width: 108px; height: 108px; color: var(--tile); opacity: .16; pointer-events: none; }
.hall-room .hr-art svg { width: 100%; height: 100%; }
.hall-room .hr-name { font-family: var(--serif); font-weight: 900; font-size: 40px; line-height: 1.1; color: var(--tile); text-shadow: 0 2px 0 var(--wall-dark), 0 0 20px rgba(233,181,74,.25); }
.hall-room .hr-sub { font-size: 11px; letter-spacing: .3em; opacity: .55; padding-left: .3em; }
.hall-room .hr-dots { display: flex; gap: 4px; margin: 8px 0 4px; }
.hr-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px dashed rgba(251,245,230,.3); overflow: hidden; display: grid; place-items: center; }
.hr-dot.on, .hr-dot.bot { border: 1px solid rgba(251,245,230,.5); background: var(--paper); }
.hr-dot.bot { opacity: .6; }
.hr-dot svg { width: 100%; height: 100%; }
.hall-room .hr-status { font-size: 12px; opacity: .8; }
.hall-room .hr-tag { margin-top: 4px; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: rgba(233,181,74,.16); color: var(--tile); }
.hall-room.mine { border-color: rgba(79,167,140,.7); }
.hall-room.mine .hr-tag { background: rgba(79,167,140,.2); color: #cfeee2; }
.hall-room.full { opacity: .5; }
.hall-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.prof-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.prof-row input { flex: 1; }
.prof-label { font-size: 13px; opacity: .7; }

.hall-bar, .hall-rooms .hall-room, .hall-foot { animation: rise .5s cubic-bezier(.2,.8,.3,1) both; }
.hall-rooms .hall-room:nth-child(1) { animation-delay: .04s; } .hall-rooms .hall-room:nth-child(2) { animation-delay: .1s; }
.hall-rooms .hall-room:nth-child(3) { animation-delay: .16s; } .hall-rooms .hall-room:nth-child(4) { animation-delay: .22s; }
.hall-foot { animation-delay: .3s; }
.room-box.hall .room-code { font-size: 64px; letter-spacing: 0; }
.room-box.hall .room-sub { margin-top: 2px; letter-spacing: .25em; }

/* ===== 四间房各自的景致 ===== */
/* 梅 · 傲雪：墨紫底，雪点暗纹，桌边一枝红梅 */
html[data-skin="mei"] { --wall: #5a2f44; --wall-deep: #381c2c; --wall-dark: #1c0d16; }
html[data-skin="mei"] body::before {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.1) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.08) 0 1.5px, transparent 2px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 1px, transparent 1px 4px),
    radial-gradient(90% 70% at 50% 40%, transparent 55%, rgba(0,0,0,.38) 100%);
  background-size: 90px 90px, 140px 140px, auto, auto;
}
/* 兰 · 幽谷：墨青底，雾气横纹 */
html[data-skin="lan"] { --wall: #27535c; --wall-deep: #163440; --wall-dark: #0a1a21; }
html[data-skin="lan"] body::before {
  background:
    repeating-linear-gradient(0deg, rgba(190,230,255,.035) 0 2px, transparent 2px 9px),
    radial-gradient(60% 40% at 30% 70%, rgba(190,230,255,.07), transparent 70%),
    radial-gradient(90% 70% at 50% 40%, transparent 55%, rgba(0,0,0,.4) 100%);
}
/* 竹 · 虚心：竹青底，竖条像竹席 */
html[data-skin="zhu"] { --wall: #3c6b35; --wall-deep: #244420; --wall-dark: #101f0e; }
html[data-skin="zhu"] body::before {
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 14px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 7px),
    radial-gradient(90% 70% at 50% 40%, transparent 55%, rgba(0,0,0,.36) 100%);
}
/* 菊 · 东篱：秋赭底，篱笆斜纹 */
html[data-skin="ju"] { --wall: #7a5420; --wall-deep: #4c3312; --wall-dark: #241706; }
html[data-skin="ju"] body::before {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,.05) 0 3px, transparent 3px 16px),
    repeating-linear-gradient(-45deg, rgba(255,214,140,.035) 0 2px, transparent 2px 18px),
    radial-gradient(90% 70% at 50% 40%, transparent 55%, rgba(0,0,0,.4) 100%);
}
/* 桌边一圈跟着房间换颜色 */
html[data-room="MEI"] .table::before { border-color: rgba(240,144,127,.3); }
html[data-room="LAN"] .table::before { border-color: rgba(143,208,255,.26); }
html[data-room="ZHU"] .table::before { border-color: rgba(142,230,184,.26); }
html[data-room="JU"] .table::before { border-color: rgba(255,179,107,.3); }

/* 房间的景：角落暗纹 + 空中飘的东西 */
#game .main { position: relative; z-index: 1; }
.room-deco { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.room-deco::before, .room-deco::after {
  content: ""; position: absolute; width: 46vmin; height: 46vmin; opacity: .13; pointer-events: none;
  background-repeat: no-repeat; background-size: contain; background-position: center;
}
.room-deco::before { left: -6vmin; top: -4vmin; }
.room-deco::after { right: -6vmin; bottom: -4vmin; transform: scaleX(-1); }
/* 梅枝 */
html[data-room="MEI"] .room-deco::before, html[data-room="MEI"] .room-deco::after {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg stroke='%23ffd2cb' fill='none' stroke-linecap='round'%3E%3Cpath d='M4 96 Q34 66 52 36 Q62 20 78 8' stroke-width='4'/%3E%3Cpath d='M36 52 Q22 44 10 46 M56 30 Q66 18 80 14 M46 40 Q42 26 32 18' stroke-width='2.6'/%3E%3C/g%3E%3Cg fill='%23ff9a8a'%3E%3Ccircle cx='78' cy='8' r='5'/%3E%3Ccircle cx='86' cy='14' r='4.5'/%3E%3Ccircle cx='80' cy='20' r='4.5'/%3E%3Ccircle cx='70' cy='14' r='4'/%3E%3Ccircle cx='32' cy='18' r='4.5'/%3E%3Ccircle cx='24' cy='14' r='3.6'/%3E%3Ccircle cx='10' cy='46' r='4.2'/%3E%3Ccircle cx='4' cy='40' r='3.4'/%3E%3C/g%3E%3C/svg%3E");
}
/* 兰草 */
html[data-room="LAN"] .room-deco::before, html[data-room="LAN"] .room-deco::after {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg stroke='%23c9ecff' fill='none' stroke-linecap='round' stroke-width='3'%3E%3Cpath d='M50 98 Q22 70 10 20'/%3E%3Cpath d='M50 98 Q40 60 50 14'/%3E%3Cpath d='M50 98 Q74 68 92 34'/%3E%3Cpath d='M50 98 Q64 62 58 24' stroke-width='2.2'/%3E%3Cpath d='M50 98 Q28 80 8 72' stroke-width='2.2'/%3E%3C/g%3E%3Cg fill='%23c9ecff'%3E%3Cpath d='M50 56 q8 -9 16 -5 q-6 9 -16 5 Z'/%3E%3Cpath d='M50 56 q-9 -8 -17 -3 q7 8 17 3 Z'/%3E%3C/g%3E%3C/svg%3E");
}
/* 竹影 */
html[data-room="ZHU"] .room-deco::before, html[data-room="ZHU"] .room-deco::after {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg stroke='%23c6f0d8' fill='none' stroke-linecap='round'%3E%3Cpath d='M26 100 V4' stroke-width='5'/%3E%3Cpath d='M54 100 V22' stroke-width='4'/%3E%3Cpath d='M18 78 h16 M18 54 h16 M18 30 h16 M47 76 h14 M47 50 h14' stroke-width='2.4'/%3E%3Cpath d='M26 40 Q8 32 2 16 M26 62 Q10 62 2 52 M54 38 Q72 28 80 12 M54 60 Q74 58 86 44' stroke-width='2.6'/%3E%3C/g%3E%3C/svg%3E");
}
/* 篱笆与菊 */
html[data-room="JU"] .room-deco::before, html[data-room="JU"] .room-deco::after {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg stroke='%23ffdfae' fill='none' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 100 V58 M32 100 V50 M52 100 V56 M72 100 V48'/%3E%3Cpath d='M2 70 H92 M2 86 H92'/%3E%3C/g%3E%3Cg stroke='%23ffcf84' stroke-width='2.4' fill='none' stroke-linecap='round'%3E%3Cpath d='M68 40 V20 M68 30 L54 22 M68 30 L82 22 M68 24 L58 12 M68 24 L78 12'/%3E%3C/g%3E%3Ccircle cx='68' cy='22' r='5' fill='%23ffcf84'/%3E%3C/svg%3E");
}
.room-mark { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); font-family: var(--serif); font-weight: 900; font-size: 44vmin; line-height: 1; color: #fff; opacity: .045; user-select: none; }
.sheet .prof-row label { min-width: 54px; font-size: 13px; opacity: .75; }
.recent-rooms .chip .ic-s { width: .95em; height: .95em; margin-right: 3px; vertical-align: -.1em; }
.sheet h2 .ic-s { width: .8em; height: .8em; vertical-align: -.05em; opacity: .8; }
.sheet .prof-row input { background: rgba(35,26,20,.07); border-color: rgba(35,26,20,.15); color: var(--ink); }
.sheet .prof-row input::placeholder { color: rgba(35,26,20,.35); }
.sheet .prof-row input:focus { border-color: var(--tile-deep); box-shadow: 0 0 0 3px rgba(233,181,74,.25); background: rgba(35,26,20,.04); }

/* ===== 谁在出牌：放大 + 金光 + 「出牌中」 ===== */
.seat.turn { z-index: 4; }
.seat.turn .avatar-wrap { transform: scale(1.22); transition: transform .25s var(--ease-pop); }
.seat.turn .avatar { box-shadow: 0 0 0 3px var(--tile), 0 0 22px rgba(233,181,74,.75); animation: turnBeat 1.3s ease-in-out infinite; }
@keyframes turnBeat { 50% { box-shadow: 0 0 0 4px var(--tile), 0 0 34px rgba(233,181,74,.95); } }
.seat.turn .seat-name { color: var(--tile); font-weight: 800; }
/* 「出牌中」就是一枚徽章，和皇帝/保子排在同一行，谁也不盖谁 */
.badge.b-turn { background: linear-gradient(180deg, #f6d57d, var(--tile)); color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.35); animation: tagPop .3s var(--ease-pop); }
.badge.b-turn.still { animation: none; }
@keyframes tagPop { from { opacity: 0; transform: translateY(5px) scale(.8); } }
.seat.idle { opacity: .62; filter: saturate(.75); transition: opacity .3s, filter .3s; }
.seat.idle .avatar-wrap { transform: scale(.94); transition: transform .25s; }
.me-strip .avatar-wrap.turn { transform: scale(1.18); }
.me-strip .avatar-wrap.turn .avatar { box-shadow: 0 0 0 3px var(--tile), 0 0 20px rgba(233,181,74,.8); animation: turnBeat 1.3s ease-in-out infinite; }

/* ===== 出牌倒计时：挂在提示条左边，手机上也看得清 ===== */
.tip-clock {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; margin-right: 6px;
  border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid rgba(233,181,74,.5); color: var(--tile);
  font-family: var(--serif); font-weight: 900; font-size: 15px; vertical-align: middle; font-variant-numeric: tabular-nums;
}
.tip-clock.hot { background: rgba(200,50,30,.28); border-color: rgba(255,154,138,.75); color: #ffd9d2; }
.tip-clock.last { animation: clockTick 1s steps(1) infinite; }
@keyframes clockTick { 50% { background: rgba(200,50,30,.6); color: #fff; } }
.play-tip { display: flex; align-items: center; justify-content: center; gap: 2px; }

/* 大厅卡片只在第一次进来时做入场动画 */
.hall-rooms.no-anim .hall-room { animation: none; }

/* 皇帝的披风：衬在头像后面，宫墙红 + 金边 */
.cape { position: absolute; left: 50%; top: 1%; width: 232%; height: 97%; transform: translateX(-50%); z-index: -1; pointer-events: none; filter: drop-shadow(0 5px 7px rgba(0,0,0,.5)); animation: capeIn .45s var(--ease-pop) both; }
@keyframes capeIn { from { opacity: 0; transform: translateX(-50%) scale(.75); } }
.seat.turn .cape { filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)) brightness(1.08); }
.me-strip .cape { top: 1%; width: 250%; height: 97%; }
.hall-links { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; }
.hall-links .link { padding: 6px 2px; font-size: 13px; }

/* ===== 徽章与称号 ===== */
.pin-badge { position: absolute; left: -9px; bottom: -4px; z-index: 3; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; line-height: 1;
  background: radial-gradient(circle at 35% 30%, #fff7dc, #e2b65a 70%); border: 1px solid rgba(120,80,20,.5); box-shadow: 0 2px 6px rgba(0,0,0,.35); animation: pinIn .5s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes pinIn { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }
.title-tag { display: inline-block; font-size: 11px; line-height: 1; padding: 4px 7px; border-radius: 6px; font-weight: 800; letter-spacing: .04em; color: #fff; vertical-align: middle; font-family: var(--serif);
  background: linear-gradient(180deg, #8a7a66, #5c4f42); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 3px rgba(0,0,0,.3); }
.title-tag.sm { font-size: 9px; padding: 2px 4px; margin-right: 3px; border-radius: 4px; transform: translateY(-1px); }
.title-tag.lv1 { background: linear-gradient(180deg, #7aa3c9, #3f6a93); }
.title-tag.lv2 { background: linear-gradient(180deg, #6fbf7a, #2e7d44); }
.title-tag.lv3 { background: linear-gradient(180deg, #c48ae0, #7a3fa3); }
.title-tag.lv4 { background: linear-gradient(180deg, #ffd56b, #c9892a); color: #3a2200; text-shadow: 0 1px 0 rgba(255,255,255,.4); box-shadow: 0 0 10px rgba(255,200,80,.6), inset 0 1px 0 rgba(255,255,255,.5); }
/* 座位下的称号单独占一行，放在名字上面，名字不再被挤成「…」 */
.seat-name { display: flex; flex-direction: column; align-items: center; gap: 2px; overflow: visible; }
.seat-name .title-tag { display: block; max-width: 84px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: none; }
.seat-name .pname { max-width: 84px; }
.title-box { background: rgba(0,0,0,.18); border-radius: 12px; padding: 10px 12px; margin: 4px 0 8px; border: 1px solid rgba(255,255,255,.05); }
.title-box .title-tag { font-size: 14px; padding: 5px 10px; }
.title-bar { height: 8px; border-radius: 4px; background: rgba(0,0,0,.25); margin: 8px 0 6px; overflow: hidden; }
.title-bar i { display: block; height: 100%; background: linear-gradient(90deg, #d9a441, #f6d27a); border-radius: 4px; transition: width .6s; }
.title-box small { font-size: 11px; opacity: .72; line-height: 1.5; display: block; }
.fun-h small { font-weight: 400; font-size: 11px; opacity: .65; margin-left: 6px; }
.badge-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 10px; }
.badge-cell { background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 8px 4px 6px; text-align: center; color: inherit; font: inherit; cursor: default; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 86px; }
.badge-cell .bc-ic { font-size: 24px; line-height: 1.1; filter: grayscale(1) opacity(.35); }
.badge-cell b { font-size: 11px; opacity: .55; }
.badge-cell small { font-size: 9.5px; opacity: .5; line-height: 1.3; }
.badge-cell.on { background: linear-gradient(180deg, rgba(255,230,160,.22), rgba(0,0,0,.18)); border-color: rgba(255,215,120,.45); cursor: pointer; }
.badge-cell.on .bc-ic { filter: none; text-shadow: 0 2px 6px rgba(0,0,0,.3); }
.badge-cell.on b { opacity: 1; color: var(--tile); }
.badge-cell.on small { opacity: .75; }
.badge-cell.pinned { outline: 2px solid var(--tile); outline-offset: -1px; box-shadow: 0 0 12px rgba(255,215,120,.45); }
.badge-cell.on:active { transform: scale(.96); }
.badge-pop { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 60; width: min(86vw, 340px); pointer-events: auto; cursor: pointer;
  background: linear-gradient(180deg, #fff8e1, #f3dfa6); color: #3a2a12; border: 2px solid #c9952e; border-radius: 16px; padding: 12px 16px 10px; text-align: center;
  box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 0 6px rgba(255,220,130,.25); animation: popIn .55s cubic-bezier(.2,.9,.3,1.25) both; }
.badge-pop.out { animation: fadeOut .5s forwards; }
.badge-pop > small { display: block; font-size: 11px; letter-spacing: .3em; opacity: .7; margin-bottom: 4px; }
.badge-pop .bp-row { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 6px 0; }
.badge-pop .bp-ic { grid-row: 1 / 3; font-size: 36px; line-height: 1; animation: pinIn .7s .15s cubic-bezier(.2,.9,.3,1.4) both; }
.badge-pop b { font-family: var(--serif); font-size: 18px; }
.badge-pop em { font-style: normal; font-size: 12px; opacity: .75; }
.badge-pop .bp-tip { display: block; font-size: 10.5px; opacity: .6; margin-top: 4px; }
@keyframes popIn { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(-50%) translateY(-12px); } }

/* ===== 算命先生 ===== */
.critter.seer { width: 76px; height: 80px; }
.critter.seer.run svg { animation: seerWalk .5s ease-in-out infinite alternate; transform-origin: center bottom; }
.critter.seer.run svg .flag { animation: seerSway .5s ease-in-out infinite alternate; transform-origin: 66px 82px; }
.critter.seer.pinch svg .arm { animation: seerPinch .14s infinite alternate; transform-origin: 48px 54px; }
.critter.seer.pinch svg .beard { animation: seerBeard .3s infinite alternate; transform-origin: 34px 38px; }
.critter.seer.slap svg { animation: seerSlap .45s cubic-bezier(.2,.9,.3,1.4); transform-origin: center bottom; }
@keyframes seerWalk { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(3deg) translateY(-3px); } }
@keyframes seerSway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes seerPinch { from { transform: rotate(-10deg); } to { transform: rotate(8deg); } }
@keyframes seerBeard { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes seerSlap { 0% { transform: scale(1); } 40% { transform: scale(1.12) translateY(-6px); } 100% { transform: scale(1); } }
.seer-say { position: fixed; z-index: 47; width: 220px; padding: 9px 12px; border-radius: 12px; pointer-events: none;
  background: linear-gradient(180deg, #fff8e1, #f1dda4); color: #3a2a12; border: 2px solid #b0281a; font-family: var(--serif); font-weight: 800; font-size: 15px; line-height: 1.45; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: seerIn .4s cubic-bezier(.2,.9,.3,1.3) both; }
.seer-say::after { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #b0281a; }
.seer-say.out { animation: fade .45s reverse forwards; }
@keyframes seerIn { from { transform: scale(.5) translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.critter.seer.flip svg { scale: -1 1; }
.critter.seer.flip svg text { transform: scaleX(-1); transform-box: fill-box; transform-origin: center; }

/* ===== 抗贡亮牌 ===== */
.kang-card { position: fixed; z-index: 46; pointer-events: none; animation: kangUp 3.2s cubic-bezier(.2,.9,.3,1.2) both; box-shadow: 0 0 14px rgba(255,210,110,.8), 0 6px 14px rgba(0,0,0,.4); }
@keyframes kangUp { 0% { transform: translateY(40px) scale(.4) rotate(-10deg); opacity: 0; } 18% { transform: translateY(0) scale(1.15) rotate(0); opacity: 1; } 28% { transform: scale(1); } 85% { opacity: 1; } 100% { transform: translateY(-20px); opacity: 0; } }

/* ===== 保子牌：标识、闪电、二次确认、碎玻璃 ===== */
.hand .card.trump::after { content: "保子"; right: auto; bottom: auto; left: 50%; top: -9px; transform: translateX(-50%); z-index: 2; font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 6px;
  background: linear-gradient(180deg, #e04a35, var(--cinnabar)); box-shadow: 0 0 0 1px rgba(255,220,150,.7), 0 2px 5px rgba(0,0,0,.35); letter-spacing: .08em; }
.hand .card.trump.sel { box-shadow: 0 0 0 2px #ffd34d, 0 0 18px rgba(255,211,77,.85), 0 8px 18px rgba(0,0,0,.35); }
.hand .card.zapped { animation: zapped .6s ease-out; }
@keyframes zapped { 0%, 30%, 60% { filter: brightness(2.2) saturate(.3); } 15%, 45% { filter: brightness(1); } 100% { filter: none; } }
.zap { position: fixed; z-index: 47; width: 60px; height: 100px; pointer-events: none; filter: drop-shadow(0 0 8px #ffe680) drop-shadow(0 0 18px rgba(255,220,90,.8)); animation: zapBolt .6s steps(1) forwards; }
.zap svg { width: 100%; height: 100%; }
@keyframes zapBolt { 0% { opacity: 1; } 18% { opacity: 0; } 30% { opacity: 1; } 50% { opacity: .2; } 62% { opacity: 1; } 100% { opacity: 0; } }
#playBtn.arm { background: linear-gradient(180deg, #e04a35, #9e2214); color: #fff; border-color: #ffd34d; box-shadow: 0 0 0 2px rgba(255,211,77,.6), 0 0 18px rgba(224,74,53,.7); animation: armPulse .5s ease-in-out infinite alternate; font-size: 13px; }
@keyframes armPulse { from { transform: scale(1); } to { transform: scale(1.05); } }
.shatter { position: fixed; z-index: 43; pointer-events: none; }
.shatter svg path { fill: none; stroke: rgba(255,255,255,.9); stroke-width: 1.6; stroke-linejoin: bevel; filter: drop-shadow(0 0 2px rgba(180,220,255,.9));
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: crackRun .35s cubic-bezier(.1,.8,.3,1) forwards; }
.shatter svg path.ring { stroke-width: 1.1; stroke: rgba(255,255,255,.7); }
@keyframes crackRun { to { stroke-dashoffset: 0; } }
.shatter::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 46%, rgba(255,255,255,.35), transparent 60%); animation: fade .3s reverse forwards; }
.shatter .shard { position: absolute; background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(190,225,255,.18) 60%, rgba(255,255,255,.4)); border: 1px solid rgba(255,255,255,.6);
  animation: shardFall 1.4s cubic-bezier(.5,0,.9,.6) both; }
@keyframes shardFall { 0% { transform: none; opacity: 1; } 100% { transform: translate(var(--dx), 70vh) rotate(var(--rot)); opacity: 0; } }
.shatter.out svg { animation: fade .6s reverse forwards; }
/* 一局结束：没出完的牌摊开 */
.mini-fan.left-fan { flex-wrap: wrap; max-width: 150px; justify-content: center; row-gap: 2px; }
.mini-fan.left-fan .card { box-shadow: 0 0 0 1px rgba(224,74,53,.55), 0 2px 4px rgba(0,0,0,.3); }
.left-lbl { align-self: center; margin-right: 4px; font-size: 10px; font-weight: 800; color: #fff; background: rgba(160,40,25,.85); border-radius: 4px; padding: 2px 4px; font-family: var(--serif); }
.left-cards { display: block; font-style: normal; font-size: 11px; color: #9e2214; margin-top: 3px; }
.left-cards .rp-cards { display: inline-flex; vertical-align: middle; margin-left: 15px; }

/* ===== 手机分享：长按图片 / 复制链接 / 微信里指右上角 ===== */
.poster-img { display: block; max-width: 100%; max-height: 58dvh; margin: 6px auto 10px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.3);
  -webkit-touch-callout: default; user-select: auto; -webkit-user-select: auto; pointer-events: auto; }
.poster-tip b, .link-box b { color: var(--cinnabar); }
.link-box { background: rgba(0,0,0,.05); border: 1px dashed rgba(35,26,20,.25); border-radius: 10px; padding: 10px 12px; margin: 6px 0 12px; font-size: 13px; line-height: 1.6; word-break: break-all;
  user-select: all; -webkit-user-select: all; -webkit-touch-callout: default; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.wx-pointer { position: fixed; inset: 0; z-index: 80; background: rgba(10,6,4,.78); color: #fbf5e6; text-align: right; padding: 0 22px; animation: fade .25s; }
.wx-pointer svg { width: 120px; height: 120px; margin: 8px 6px 0 auto; display: block; }
.wx-pointer p { font-family: var(--serif); font-size: 22px; font-weight: 800; line-height: 1.6; margin: 4px 0 10px; }
.wx-pointer b { display: inline-block; background: #fbf5e6; color: #231a14; border-radius: 6px; padding: 0 8px; letter-spacing: 2px; }
.wx-pointer small { display: block; opacity: .7; font-size: 13px; margin-top: 6px; }

/* ===== 墨鱼喷墨（马里奥赛车式墨团） ===== */
.splat-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ink-splat { position: fixed; width: 68px; height: 68px; z-index: 46; pointer-events: none; background: none; border-radius: 0; animation: inkLand .35s cubic-bezier(.2,.9,.3,1.3) both, fade .5s 1.6s reverse forwards; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
@keyframes inkLand { 0% { transform: scale(.2) rotate(-20deg); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.ink-big { position: fixed; z-index: 44; pointer-events: none; transform: rotate(var(--rot)); filter: drop-shadow(0 4px 8px rgba(0,0,0,.35));
  animation: inkBigIn .32s cubic-bezier(.2,.9,.3,1.25) both, inkBigOut 1.1s 2.9s ease-in forwards; }
@keyframes inkBigIn { 0% { transform: rotate(var(--rot)) scale(.15); opacity: .6; } 75% { transform: rotate(var(--rot)) scale(1.08); opacity: 1; } 100% { transform: rotate(var(--rot)) scale(1); } }
@keyframes inkBigOut { to { transform: rotate(var(--rot)) translateY(18px) scaleY(1.08); opacity: 0; } }
/* 牌数牌上糊着的那团墨：比牌数牌大一圈，完全盖住 */
.count.inked { color: transparent !important; background: transparent !important; border-color: transparent !important; box-shadow: none !important; animation: none !important; overflow: visible; }
.count.inked .splat-svg { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }

/* ===== 巫师 ===== */
.critter.wizard { width: 96px; height: 120px; z-index: 47; }
.critter.wizard.run svg { animation: seerWalk .35s ease-in-out infinite alternate; transform-origin: center bottom; }
.critter.wizard .orb { filter: drop-shadow(0 0 6px #9fe8ff); }
.critter.wizard.chant svg .staff { animation: wizStaff .5s ease-in-out infinite alternate; transform-origin: 76px 114px; }
.critter.wizard.chant svg .beard { animation: seerBeard .25s infinite alternate; transform-origin: 44px 54px; }
.critter.wizard.chant .orb, .critter.wizard.cast .orb { animation: orbPulse .35s ease-in-out infinite alternate; }
@keyframes wizStaff { from { transform: rotate(-10deg); } to { transform: rotate(12deg); } }
@keyframes orbPulse { from { fill: #9fe8ff; filter: drop-shadow(0 0 6px #9fe8ff); } to { fill: #e4c2ff; filter: drop-shadow(0 0 16px #c79bff); } }
.critter.wizard.burnt svg { filter: brightness(.22) saturate(.2); }
.wiz-ring { position: absolute; left: 50%; bottom: -10px; width: 150px; height: 44px; margin-left: -75px; border-radius: 50%; z-index: -1;
  border: 2px solid rgba(199,155,255,.9); box-shadow: 0 0 14px rgba(199,155,255,.8), inset 0 0 12px rgba(159,232,255,.6);
  background: repeating-conic-gradient(from 0deg, rgba(199,155,255,.25) 0 6deg, transparent 6deg 18deg); animation: wizRing 1.2s linear infinite; }
@keyframes wizRing { to { transform: rotate(360deg); } }
.wiz-say { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); white-space: nowrap; margin-bottom: 4px; padding: 6px 12px; border-radius: 12px;
  background: linear-gradient(180deg, #2a1548, #1a0d2e); color: #e7d6ff; border: 1.5px solid #b98cff; font-family: var(--serif); font-weight: 800; font-size: 15px;
  box-shadow: 0 0 16px rgba(185,140,255,.6); animation: popX .35s cubic-bezier(.2,.9,.3,1.3) both; }
.wiz-beam { position: fixed; height: 6px; margin-top: -3px; transform-origin: 0 50%; z-index: 46; pointer-events: none; border-radius: 3px;
  background: linear-gradient(90deg, #fff, var(--c) 30%, var(--c)); box-shadow: 0 0 12px var(--c), 0 0 24px var(--c); animation: wizBeam .9s ease-out forwards; }
@keyframes wizBeam { 0% { clip-path: inset(0 100% 0 0); opacity: 1; } 35% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
.wiz-smoke { position: absolute; left: 50%; top: 10px; width: 80px; height: 80px; margin-left: -40px; border-radius: 50%;
  background: radial-gradient(circle, rgba(90,90,90,.85), rgba(60,60,60,.4) 55%, transparent 70%); animation: wizSmoke 1.4s ease-out forwards; pointer-events: none; }
@keyframes wizSmoke { from { transform: scale(.3); opacity: 1; } to { transform: scale(2.2) translateY(-30px); opacity: 0; } }
/* 神秘咒：每个人头上一圈紫色魔法 */
.hexed.sfx { position: absolute; inset: -8px; border-radius: 50%; pointer-events: none; z-index: 4; border: 2px solid rgba(199,155,255,.9);
  box-shadow: 0 0 16px rgba(199,155,255,.85), inset 0 0 14px rgba(159,232,255,.6); animation: hexed 1.3s ease-in-out infinite alternate; }
.hexed.sfx i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #c79bff; animation: hexSpark 1.1s linear infinite; }
.hexed.sfx i:nth-child(1) { left: 10%; top: 10%; } .hexed.sfx i:nth-child(2) { right: 4%; top: 40%; animation-delay: .35s; } .hexed.sfx i:nth-child(3) { left: 40%; bottom: -2px; animation-delay: .7s; }
@keyframes hexed { from { transform: scale(.94) rotate(0); } to { transform: scale(1.08) rotate(25deg); } }
@keyframes hexSpark { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.3); } }
/* 冰冻咒：头像冻在冰块里 */
.frozen.sfx { position: absolute; inset: -6px; border-radius: 12px; z-index: 4; pointer-events: none;
  background: linear-gradient(135deg, rgba(220,248,255,.75), rgba(140,210,255,.45) 50%, rgba(220,248,255,.7)); border: 2px solid rgba(230,250,255,.95);
  box-shadow: 0 0 14px rgba(159,232,255,.8), inset 0 0 10px rgba(255,255,255,.8); animation: freezeIn .45s cubic-bezier(.2,.9,.3,1.3) both; }
.frozen.sfx::after { content: "❄"; position: absolute; right: -6px; top: -10px; font-size: 18px; color: #e6faff; text-shadow: 0 0 6px #7fd4ff; }
@keyframes freezeIn { from { transform: scale(1.4); opacity: 0; } to { transform: none; opacity: 1; } }
/* 透视：亮牌面板 */
.peek-panel { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); z-index: 48; width: min(92vw, 460px); padding: 10px 12px 12px; border-radius: 14px; text-align: center;
  background: linear-gradient(180deg, rgba(42,21,72,.96), rgba(26,13,46,.96)); border: 1.5px solid #ffe08a; box-shadow: 0 0 24px rgba(255,224,138,.5), 0 12px 30px rgba(0,0,0,.5);
  color: #ffe9a8; font-family: var(--serif); animation: popX .35s cubic-bezier(.2,.9,.3,1.3) both; pointer-events: none; }
.peek-panel b { display: block; margin-bottom: 8px; font-size: 15px; }
.peek-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.peek-cards .card.sm { --overlap: -8px; }
.peek-panel.out { animation: popXOut .4s forwards; }
@keyframes popX { from { transform: translateX(-50%) scale(.5); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
@keyframes popXOut { to { transform: translateX(-50%) scale(.9); opacity: 0; } }

/* 抢红包摘帽子：帽子转着飞走 */
.hat-fly { position: fixed; width: 36px; height: 22px; z-index: 47; pointer-events: none; animation: hatFly 1.3s cubic-bezier(.3,.6,.4,1) forwards; }
.hat-fly svg { width: 100%; height: 100%; }
@keyframes hatFly { 0% { transform: none; opacity: 1; } 100% { transform: translate(60px, -120px) rotate(320deg) scale(.6); opacity: 0; } }

/* =====================================================================
   牌局之间的小游戏：翻牌配对 / 扫雷
   ===================================================================== */
.mini { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: center; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: radial-gradient(ellipse at 50% 30%, rgba(70,48,30,.97) 0%, rgba(36,24,15,.98) 55%, rgba(16,10,6,.99) 100%); animation: fade .35s; }
.mini.hidden { display: none; }
.mini::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .06;
  background-image: repeating-linear-gradient(45deg, #e9b54a 0 1px, transparent 1px 14px), repeating-linear-gradient(-45deg, #e9b54a 0 1px, transparent 1px 14px); }
.m-wrap { position: relative; width: 100%; max-width: 440px; box-sizing: border-box; padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; color: #fbf5e6; }
.m-wrap.mines { --felt: #1f3b2b; }
.mini:has(.m-wrap.mines) { background: radial-gradient(ellipse at 50% 30%, rgba(31,59,43,.97) 0%, rgba(20,42,30,.98) 55%, rgba(8,20,13,.99) 100%); }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.m-kicker { display: block; font-size: 12px; letter-spacing: .3em; color: #c9a86a; }
.m-title { margin: 2px 0 0; font-family: var(--serif); font-weight: 900; font-size: 44px; line-height: 1.1; color: #e9b54a; letter-spacing: .06em;
  text-shadow: 0 2px 0 #7d5814, 0 0 24px rgba(233,181,74,.35); }
.m-title.sm { font-size: 30px; }
.m-skip { align-self: center; margin-top: 4px; min-height: 40px; padding: 0 18px; border-radius: 20px; border: 1px solid rgba(233,181,74,.35); background: rgba(0,0,0,.28); color: #d9c8a8; font: inherit; font-size: 13px; cursor: pointer; }
.m-skip.on, .m-skip:disabled { opacity: .6; cursor: default; }

/* 开场 */
.m-intro { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 24px 6px; }
.m-intro .m-title { font-size: 56px; }
.m-rule { margin: 0; font-size: 15px; line-height: 1.75; color: #e8dcc6; max-width: 340px; }
.m-rule b { color: #f6d57d; }
.m-count { font-family: var(--serif); font-weight: 900; font-size: 84px; line-height: 1; color: #fbf5e6; min-height: 90px; text-shadow: 0 0 30px rgba(233,181,74,.6); }
.m-count.pop { animation: mCount .6s cubic-bezier(.2,.9,.3,1.3); }
@keyframes mCount { from { transform: scale(2.2); opacity: 0; } to { transform: none; opacity: 1; } }
.m-strip { display: flex; gap: 6px; justify-content: center; }
.m-strip-c { width: 54px; height: 70px; border-radius: 10px; background: linear-gradient(165deg, #fffdf6, #f2e9d3); display: flex; align-items: center; justify-content: center; padding: 6px; box-sizing: border-box;
  box-shadow: 0 6px 14px rgba(0,0,0,.45); animation: mStrip 2.4s ease-in-out infinite; }
.m-strip-c:nth-child(2) { animation-delay: .15s; } .m-strip-c:nth-child(3) { animation-delay: .3s; } .m-strip-c:nth-child(4) { animation-delay: .45s; } .m-strip-c:nth-child(5) { animation-delay: .6s; }
.m-strip-c svg { width: 100%; height: 100%; }
@keyframes mStrip { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.m-bomb-big { width: 110px; height: 110px; animation: mBombWobble 1.2s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
.m-bomb-big svg { width: 100%; height: 100%; }
@keyframes mBombWobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.04); } }

/* 倒计时圆环 */
.m-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.m-ring-bg { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 4; }
.m-ring-fg { fill: none; stroke: #e9b54a; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 119.4; transition: stroke-dashoffset .2s linear; }
.m-timer { position: relative; width: 64px; height: 64px; flex: none; }
.m-timer b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 900; font-size: 24px; }
.m-timer.hurry .m-ring-fg { stroke: #e04a35; } .m-timer.hurry b { color: #ff9a8a; animation: pulse .5s infinite; }

/* ---------- 翻牌 ---------- */
.m-mine-line { text-align: center; font-family: var(--serif); font-weight: 600; font-size: 15px; color: #d9c8a8; }
.m-mine-line b { color: #f6d57d; font-size: 18px; }
.m-board-wrap { position: relative; }
.m-board.flip { width: min(100%, 330px); margin: 0 auto; box-sizing: border-box; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px; border-radius: 20px;
  background: radial-gradient(ellipse at 50% 40%, #6b2e1d, #4a1d12 75%); border: 2px solid rgba(233,181,74,.55); box-shadow: inset 0 0 30px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.4); }
.mcard { aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; perspective: 600px; cursor: pointer; transition: transform .45s cubic-bezier(.4,0,.2,1); -webkit-tap-highlight-color: transparent; }
.mcard:disabled, .mcard.off { cursor: default; }
.m-board.flip .mcard { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.mc-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .38s cubic-bezier(.3,.7,.4,1.2); }
.mcard.up .mc-in { transform: rotateY(180deg); }
.mc-back, .mc-front { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; align-items: center; justify-content: center; }
.mc-back { border: 2px solid #e9b54a; box-shadow: 0 4px 10px rgba(0,0,0,.45);
  background: radial-gradient(circle at 50% 50%, rgba(233,181,74,.25) 0 18%, transparent 19%),
    repeating-linear-gradient(45deg, #8f1f16 0 6px, #a82a1d 6px 12px); }
.mc-back::after { content: ""; position: absolute; inset: 5px; border-radius: 6px; border: 1px solid rgba(246,213,125,.55); }
.mc-back i { font-style: normal; font-family: var(--serif); font-weight: 900; font-size: 22px; color: rgba(251,245,230,.9); text-shadow: 0 1px 0 #5a120c; }
.mcard:not(:disabled):not(.off):active .mc-back { transform: scale(.95); }
.mc-front { transform: rotateY(180deg); flex-direction: column; gap: 2px; padding: 6px 4px 5px; box-sizing: border-box;
  background: linear-gradient(165deg, #fffdf6, #f2e9d3); border: 1px solid #cdc3aa; box-shadow: 0 0 0 2px #f6d57d, 0 0 16px rgba(246,213,125,.55); }
.mc-art { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; }
.mc-art svg { max-width: 92%; max-height: 100%; }
.mc-name { font-size: 11px; font-weight: 800; color: #231a14; line-height: 1; white-space: nowrap; }
.mc-joker { font-family: var(--serif); font-weight: 900; font-size: 20px; writing-mode: vertical-rl; letter-spacing: 3px; color: #231a14; }
.mc-joker.big { color: #c8321e; }
.mcard.matched .mc-front { box-shadow: 0 0 0 2px #4fa78c, 0 0 14px rgba(79,167,140,.6); }
.mcard.matched .mc-front::after { content: ""; position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fbf5e6;
  background: #4fa78c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l4.5 4.5L19 7' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.mcard.pop .mc-in { animation: mPop .5s cubic-bezier(.2,.9,.3,1.4); }
@keyframes mPop { 0% { transform: rotateY(180deg) scale(1); } 40% { transform: rotateY(180deg) scale(1.16); } 100% { transform: rotateY(180deg) scale(1); } }
.mcard.shake .mc-in { animation: mShake .36s; }
@keyframes mShake { 0%, 100% { transform: rotateY(180deg) translateX(0); } 25% { transform: rotateY(180deg) translateX(-5px); } 75% { transform: rotateY(180deg) translateX(5px); } }
.mcard.moving { transition: transform 1.1s cubic-bezier(.5,0,.3,1); z-index: 2; position: relative; }
.m-board.flip.locked .mcard { pointer-events: none; }
.m-twist { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 18px; border-radius: 14px; background: #c8321e; color: #fff; font-family: var(--serif); font-weight: 900; font-size: 20px;
  box-shadow: 0 0 0 3px rgba(246,213,125,.8), 0 10px 30px rgba(0,0,0,.6), 0 0 30px rgba(200,50,30,.7); pointer-events: none; }
.m-twist.hidden { display: none; }
.m-twist.in { animation: mTwistIn .45s cubic-bezier(.2,.9,.3,1.4); }
.m-twist .mt-ic svg { width: 24px; height: 24px; display: block; }
@keyframes mTwistIn { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
.m-intro-card { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; color: #231a14;
  background: linear-gradient(180deg, #fff8e1, #f1dda4); border: 2px solid #c9952e; box-shadow: 0 8px 20px rgba(0,0,0,.45); }
.m-intro-card.hidden { display: none; }
.m-intro-card.in { animation: mSlideUp .4s cubic-bezier(.2,.9,.3,1.25); }
@keyframes mSlideUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.mic-art { width: 48px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; }
.mic-art svg { max-width: 100%; max-height: 100%; }
.mic-txt { display: flex; flex-direction: column; gap: 2px; }
.mic-txt b { font-family: var(--serif); font-size: 15px; color: #2e7d44; }
.mic-txt small { font-size: 12px; color: #5b4c3f; line-height: 1.45; }
.m-scores { display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid rgba(233,181,74,.22); }
.m-score { display: flex; align-items: center; gap: 10px; }
.m-score.me .m-sn { color: #f6d57d; font-weight: 800; }
.m-score b { width: 22px; text-align: right; font-family: var(--serif); font-weight: 900; color: #f6d57d; }
.m-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.m-bar i { display: block; height: 100%; border-radius: 4px; transition: width .4s cubic-bezier(.3,.7,.4,1.2); }
.m-ava { width: 30px; height: 30px; flex: none; border-radius: 50%; overflow: hidden; background: #fbf5e6; box-shadow: 0 0 0 2px var(--c); display: inline-flex; }
.m-ava svg { width: 100%; height: 100%; }
.m-ava.big { width: 52px; height: 52px; box-shadow: 0 0 0 3px var(--c), 0 4px 10px rgba(0,0,0,.4); }
.m-ava.burnt svg { filter: brightness(.25) saturate(.2); }
.m-sn { font-size: 14px; color: #fbf5e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.m-score .m-sn { width: 64px; }

/* ---------- 挑座位 ---------- */
.m-rank { display: flex; flex-direction: column; gap: 6px; }
.m-rk { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: rgba(0,0,0,.26); border: 1px solid rgba(233,181,74,.16); transition: background .3s; }
.m-rk.cur { background: rgba(246,213,125,.14); border-color: #f6d57d; box-shadow: 0 0 16px rgba(246,213,125,.25); }
.m-rk.done { opacity: .75; }
.m-rk-n { width: 36px; font-family: var(--serif); font-weight: 900; font-size: 14px; color: #c9a86a; }
.m-rk-n.gold { color: #f6d57d; }
.m-rk .m-sn { flex: 1; }
.m-rk-p { font-size: 12px; color: #d9c8a8; }
.m-rk-s { font-size: 12px; padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.08); color: #d9c8a8; white-space: nowrap; }
.m-rk.cur .m-rk-s { background: #c8321e; color: #fff; }
.m-pick-tip, .m-turn-tip { text-align: center; font-family: var(--serif); font-weight: 600; font-size: 16px; color: #e8dcc6; min-height: 24px; }
.m-pick-tip b, .m-turn-tip b { color: #f6d57d; }
.m-table { position: relative; height: 360px; margin: 26px 4px 0; }
.m-felt { position: absolute; left: 14%; right: 14%; top: 20%; bottom: 16%; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(ellipse at 50% 45%, #6b2e1d, #4a1d12 72%); border: 3px solid rgba(233,181,74,.55); box-shadow: inset 0 0 40px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.4);
  font-size: 12px; line-height: 1.7; color: rgba(251,245,230,.7); }
.m-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: default; min-width: 64px; }
.m-seat.can { cursor: pointer; }
.m-seat-free { width: 52px; height: 52px; border-radius: 50%; border: 2px dashed rgba(246,213,125,.5); color: rgba(246,213,125,.6); font-size: 24px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.2); }
.m-seat.can .m-seat-free { border-color: #f6d57d; color: #f6d57d; background: rgba(246,213,125,.12); animation: mSeatGlow 1s ease-in-out infinite alternate; }
@keyframes mSeatGlow { from { box-shadow: 0 0 6px rgba(246,213,125,.3); } to { box-shadow: 0 0 22px rgba(246,213,125,.8); transform: scale(1.06); } }
.m-seat.taken .m-ava { animation: mSit .45s cubic-bezier(.2,.9,.3,1.4); }
@keyframes mSit { from { transform: scale(.3) translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.m-seat-l { font-size: 12px; white-space: nowrap; padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,.45); color: #fbf5e6; }

/* ---------- 扫雷 ---------- */
.m-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; background: rgba(0,0,0,.3); border: 1px solid rgba(233,181,74,.3); font-size: 13px; white-space: nowrap; }
.m-pill svg { width: 18px; height: 18px; }
.m-turns { display: flex; justify-content: space-between; gap: 4px; padding-top: 10px; }
.m-turn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 64px; opacity: .6; transition: opacity .3s, transform .3s; }
.m-turn .m-ava { width: 40px; height: 40px; }
.m-turn.cur { opacity: 1; transform: scale(1.1); }
.m-turn .m-ring.turn { position: absolute; top: -6px; left: 50%; width: 52px; height: 52px; margin-left: -26px; transform: rotate(-90deg); }
.m-turn .m-ring.turn .m-ring-fg { stroke: #f6d57d; }
.m-turn .m-sn { font-size: 12px; max-width: 64px; }
.m-turn.cur .m-sn { color: #f6d57d; font-weight: 800; }
.m-turn.loser .m-ava svg { filter: brightness(.25); }
.m-board.mines { width: min(100%, 360px); margin: 0 auto; box-sizing: border-box; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; padding: 12px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.25)); border: 2px solid rgba(233,181,74,.45); box-shadow: inset 0 0 24px rgba(0,0,0,.45), 0 10px 30px rgba(0,0,0,.35); }
.mtile { position: relative; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 10px; cursor: default; font: inherit; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(155deg, #5fa47a 0%, #3c7d55 45%, #2a5d3e 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.28), inset 0 -3px 0 rgba(0,0,0,.25), 0 4px 0 #163322, 0 6px 10px rgba(0,0,0,.35); transition: transform .12s; }
.mtile::before { content: ""; position: absolute; left: 18%; top: 14%; width: 38%; height: 18%; border-radius: 50%; background: rgba(255,255,255,.22); filter: blur(1px); }
.mtile.can { cursor: pointer; animation: mTileBreath 1.6s ease-in-out infinite; }
.mtile.can:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.2), 0 1px 0 #163322; }
@keyframes mTileBreath { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.12); } }
.mtile.open { background: linear-gradient(160deg, #f4ead2, #e2d4b3); box-shadow: inset 0 2px 6px rgba(0,0,0,.25); cursor: default; animation: none; }
.mtile.open::before { display: none; }
.mtile.flipin { animation: mTileOpen .35s cubic-bezier(.3,.7,.4,1.3); }
@keyframes mTileOpen { from { transform: scale(.6) rotateX(70deg); } to { transform: none; } }
.mtile b { font-family: var(--serif); font-weight: 900; font-size: 24px; line-height: 1; }
.mtile b.n1 { color: #2f6eb5; } .mtile b.n2 { color: #2e7d44; } .mtile b.n3 { color: #c8321e; } .mtile b.n4 { color: #6b2e8a; } .mtile b.n5, .mtile b.n6 { color: #8f1f16; }
.mtile .by { position: absolute; right: 5px; bottom: 5px; width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(35,26,20,.35); }
.mtile.mine { background: linear-gradient(160deg, #f4ead2, #d8c6a0); display: flex; align-items: center; justify-content: center; }
.mtile.mine svg { width: 70%; height: 70%; }
.mtile.boom { background: radial-gradient(circle, #ffd56b, #e04a35 55%, #8f1f16); box-shadow: 0 0 24px rgba(255,120,60,.95); animation: mBoom .6s cubic-bezier(.2,.9,.3,1.4); z-index: 2; }
@keyframes mBoom { 0% { transform: scale(.5); } 50% { transform: scale(1.35); } 100% { transform: none; } }
.m-boom { position: absolute; left: 16px; right: 16px; top: 22%; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 16px 16px; border-radius: 20px;
  background: linear-gradient(180deg, #fff8e1, #f1dda4); color: #231a14; border: 3px solid #c8321e; box-shadow: 0 20px 50px rgba(0,0,0,.6), 0 0 0 6px rgba(200,50,30,.25); }
.m-boom.hidden { display: none; }
.m-boom.in { animation: mBoomIn .5s cubic-bezier(.2,.9,.3,1.3); }
@keyframes mBoomIn { from { transform: scale(.5) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.mb-ava { position: relative; }
.mb-ava .m-ava.big { width: 84px; height: 84px; box-shadow: 0 0 0 3px #231a14; }
.mb-smoke { position: absolute; inset: -22px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(90,90,90,.6), rgba(60,60,60,.2) 55%, transparent 72%); animation: mSmoke 2.4s ease-out infinite; }
@keyframes mSmoke { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.5) translateY(-16px); opacity: 0; } }
.mb-cough { position: absolute; right: -26px; top: -10px; padding: 3px 8px; border-radius: 8px; background: #c8321e; color: #fff; font-family: var(--serif); font-weight: 900; font-size: 13px; transform: rotate(10deg); }
.mb-title { font-family: var(--serif); font-weight: 900; font-size: 26px; color: #c8321e; }
.mb-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mb-tags span { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 10px; background: #231a14; color: #fbf5e6; font-size: 13px; }
.mb-tags svg { width: 18px; height: 11px; }
.mb-order { width: 100%; border-top: 1px dashed rgba(35,26,20,.3); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.mb-order small { font-size: 12px; color: #6b5a44; text-align: center; }
.mb-order > div { display: flex; justify-content: space-between; gap: 4px; }
.mb-o { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 60px; }
.mb-o .m-ava { width: 36px; height: 36px; }
.mb-o em { font-style: normal; font-size: 11px; white-space: nowrap; color: #231a14; }
.mb-o.loser em { color: #c8321e; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .mini *, .mini *::before, .mini *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.m-pill svg circle:first-child { fill: #fbf5e6; } .m-pill svg path:first-of-type { stroke: #fbf5e6; }
/* 翻牌战况：一排五个，省地方 */
.m-scores { flex-direction: row; justify-content: space-between; gap: 4px; padding: 10px 8px; }
.m-score { flex-direction: column; gap: 4px; width: 64px; }
.m-score .m-ava { width: 36px; height: 36px; }
.m-score .m-sn { width: auto; max-width: 64px; font-size: 12px; }
.m-score .m-bar { flex: none; width: 46px; height: 5px; }
.m-score b { position: absolute; margin: -6px 0 0 30px; width: 20px; height: 20px; border-radius: 50%; background: #231a14; border: 1.5px solid #e9b54a; font-size: 12px; display: flex; align-items: center; justify-content: center; text-align: center; }
.m-score { position: relative; }
.m-board.flip { width: min(100%, 300px); }
.m-board-wrap .m-intro-card { position: absolute; left: 6px; right: 6px; bottom: -14px; z-index: 6; }
.m-board-wrap .m-intro-card { pointer-events: none; opacity: .97; }
/* 共用盘子：配掉的牌描上主人的颜色、角上挂主人的头像；轮到你时扣着的牌轻轻发亮 */
.mcard.matched .mc-front { box-shadow: 0 0 0 2.5px var(--oc), 0 0 14px var(--oc); }
.mcard.matched .mc-front::after { display: none; }
.mc-owner { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; background: #fbf5e6; box-shadow: 0 0 0 2px var(--oc), 0 2px 4px rgba(0,0,0,.4); display: flex; }
.mc-owner svg { width: 100%; height: 100%; }
.mcard.can .mc-back { animation: mCanGlow 1.2s ease-in-out infinite alternate; }
@keyframes mCanGlow { from { box-shadow: 0 4px 10px rgba(0,0,0,.45); } to { box-shadow: 0 0 0 2px #f6d57d, 0 0 16px rgba(246,213,125,.65); } }
.m-score.cur { transform: scale(1.08); }
.m-score .m-ring.turn { position: absolute; top: -5px; left: 50%; width: 46px; height: 46px; margin-left: -23px; transform: rotate(-90deg); }
.m-score .m-ring.turn .m-ring-fg { stroke: #f6d57d; }
.m-score.cur .m-sn { color: #f6d57d; font-weight: 800; }
.m-wrap.flip .m-turn-tip { min-height: 26px; }

/* 机器人入座：弹进来 + 一团烟 */
.avatar.bot-in { animation: botIn .45s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes botIn { 0% { transform: scale(.2) translateY(-30px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.bot-puff { position: absolute; left: 50%; top: 50%; width: 120%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,248,225,.9) 0 30%, rgba(246,213,125,.5) 45%, transparent 70%);
  transform: translate(-50%, -50%) scale(.3); opacity: 0; animation: botPuff .6s ease-out both; }
.bot-puff.still { display: none; }
@keyframes botPuff { 0% { opacity: .95; transform: translate(-50%, -50%) scale(.3); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } }

/* =====================================================================
   中场小游戏：击鼓传炸弹 / 猜大小 / 翻牌比大 / 放礼花
   ===================================================================== */
.mini:has(.m-wrap.bomb) { background: radial-gradient(ellipse at 50% 42%, rgba(31,59,43,.97) 0%, rgba(20,42,30,.98) 60%, rgba(8,20,13,.99) 100%); }
.mini:has(.m-wrap.guess) { background: radial-gradient(ellipse at 50% 40%, rgba(90,26,26,.97) 0%, rgba(58,15,18,.98) 55%, rgba(26,6,8,.99) 100%); }
.mini:has(.m-wrap.cards) { background: radial-gradient(ellipse at 50% 38%, rgba(31,59,43,.97) 0%, rgba(20,42,30,.98) 62%, rgba(8,20,13,.99) 100%); }
.mini:has(.m-wrap.fire), .mini:has(.fw-play) { background: #0a0f24; }
.mini:has(.fw-play)::before { display: none; }
.m-rule.sm { font-size: 13px; line-height: 1.6; text-align: center; margin: 0 auto; color: #c9d6c0; }
.m-result { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; position: relative; }
.m-result .m-title { font-size: 40px; }
.m-title.boom-t { font-size: 56px; color: #fff6b0; text-shadow: 0 4px 0 #8f1f16; }
.m-res-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; border-radius: 20px; color: #231a14;
  background: linear-gradient(180deg, #fff8e1, #f1dda4); border: 3px solid #c8321e; box-shadow: 0 16px 40px rgba(0,0,0,.55); animation: mBoomIn .5s cubic-bezier(.2,.9,.3,1.3); }
.m-res-card.win { border-color: #c9952e; }
.m-res-card.win .mb-title { color: #2e7d44; }
.m-tag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; color: #fff; background: #2e7d44; white-space: nowrap; }
.m-tag.bad { background: #c8321e; }
.m-perk { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid rgba(246,213,125,.35); font-size: 13px; line-height: 1.5; }
.m-perk b { color: #f6d57d; margin-right: 2px; }
.m-perk small { color: #c9c2ea; }
.m-strip-c.back { background: repeating-linear-gradient(45deg, #8f1f16 0 6px, #a82a1d 6px 12px); border: 2px solid #e9b54a; }
.m-strip-c.back i { font-style: normal; font-family: var(--serif); font-weight: 900; font-size: 20px; color: rgba(251,245,230,.9); }

/* 击鼓传炸弹 */
.b-ring { position: relative; height: 380px; margin: 6px 0 4px; }
.b-oval { position: absolute; left: 12%; right: 12%; top: 12%; bottom: 20%; border-radius: 50%; background: #2a5a3c; border: 3px solid rgba(233,181,74,.5); box-shadow: inset 0 0 40px rgba(0,0,0,.35); }
.b-oval::after { content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 1.5px dashed rgba(233,181,74,.45); }
.b-seat { position: absolute; transform: translate(-50%, 0); display: flex; flex-direction: column; align-items: center; gap: 3px; width: 76px; transition: transform .3s; }
.b-seat b { font-family: var(--serif); font-weight: 900; color: #f6d57d; font-size: 15px; }
.b-seat b::after { content: " 分"; font-size: 11px; font-weight: 400; color: #c9d6c0; }
.b-seat.hold { transform: translate(-50%, 0) scale(1.08); }
.b-seat.hold .m-ava { box-shadow: 0 0 0 3px #ff6b35, 0 0 20px rgba(255,107,53,.8); }
.b-seat.boom .m-ava svg { filter: brightness(.25) saturate(.2); }
.b-bomb { position: absolute; left: 50%; top: 46%; width: 92px; height: 92px; transform: translate(-50%, -50%); transition: left .6s cubic-bezier(.4,0,.2,1), top .6s cubic-bezier(.4,0,.2,1); filter: drop-shadow(0 10px 14px rgba(0,0,0,.5)); z-index: 2; }
.b-bomb svg { animation: mBombWobble 1.2s ease-in-out infinite; }
.b-bomb.hot svg { animation-duration: .35s; }
.b-bomb.hot svg circle:first-child { fill: #4a1a12; }
.b-bomb.gone { opacity: 0; transform: translate(-50%, -50%) scale(2.4); transition: all .25s; }
.b-bomb svg { width: 100%; height: 100%; }
.b-held { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.45); font-size: 13px; white-space: nowrap; min-height: 18px; }
.b-held:empty { display: none; }
.b-held b { color: #f6d57d; }
.b-btn { height: 104px; border-radius: 22px; border: 3px solid rgba(246,213,125,.4); background: radial-gradient(circle at 50% 30%, #7a6a5a, #4a3f35 60%, #2a231d); color: rgba(255,255,255,.55);
  font-family: var(--serif); font-weight: 900; font-size: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 8px 0 #1a1510, 0 12px 24px rgba(0,0,0,.5);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .08s, box-shadow .08s; }
.b-btn small { font-family: var(--sans); font-weight: 600; font-size: 13px; opacity: .9; }
.b-btn.mine { border-color: #f6d57d; background: radial-gradient(circle at 50% 30%, #ff7a5c, #c8321e 60%, #7d1612); color: #fff; box-shadow: 0 8px 0 #5c0f0b, 0 12px 24px rgba(0,0,0,.5); animation: bGlow 1s infinite alternate; }
@keyframes bGlow { to { box-shadow: 0 8px 0 #5c0f0b, 0 0 30px rgba(255,107,53,.8); } }
.b-btn.down { transform: translateY(6px); box-shadow: 0 2px 0 #5c0f0b, 0 4px 10px rgba(0,0,0,.5); animation: none; }

/* 猜大小 */
.g-players { display: flex; gap: 6px; }
.g-p { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 12px; background: rgba(0,0,0,.25); border: 2px solid transparent; transition: opacity .3s; }
.g-p.me { background: rgba(246,213,125,.14); border-color: #f6d57d; }
.g-p.out { opacity: .38; }
.g-p.wrong { animation: gShake .4s; border-color: #e04a35; }
@keyframes gShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.g-p .m-sn { font-size: 11px; max-width: 100%; }
.g-p em { font-style: normal; font-size: 11px; font-weight: 800; color: #e8b0a8; }
.g-stage { display: flex; justify-content: center; padding: 14px 0 4px; perspective: 800px; }
.g-card { width: 132px; height: 186px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 16px 34px rgba(0,0,0,.6); }
.g-card.back { background: repeating-linear-gradient(45deg, #b8281c 0 8px, #9a1f16 8px 16px); border: 5px solid #fbf5e6; position: relative; }
.g-card.back::after { content: ""; position: absolute; inset: 18px; border-radius: 8px; border: 2px solid #f6d57d; }
.g-card.back i { font-style: normal; font-family: var(--serif); font-weight: 900; font-size: 40px; color: #f6d57d; }
.g-card.back.deal { animation: mSlideUp .4s cubic-bezier(.2,.9,.3,1.25); }
.g-card.face { background: linear-gradient(165deg, #fffdf6, #f2e9d3); border: 5px solid #fbf5e6; color: #231a14; }
.g-card.face.red { color: #c8321e; }
.g-card.face b { font-family: var(--serif); font-weight: 900; font-size: 54px; line-height: 1; }
.g-card.face span { font-size: 34px; }
.g-card.flipin { animation: gFlip .55s cubic-bezier(.3,.8,.3,1.2); }
@keyframes gFlip { 0% { transform: rotateY(90deg) scale(.9); } 100% { transform: none; } }
.g-tip { text-align: center; font-family: var(--serif); font-weight: 600; font-size: 15px; color: #f1d9d2; min-height: 22px; }
.g-tip b { color: #f6d57d; }
.g-btns { display: flex; gap: 12px; }
.g-btn { flex: 1; height: 112px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: inherit; cursor: pointer; transition: transform .12s; }
.g-btn b { font-family: var(--serif); font-weight: 900; font-size: 40px; line-height: 1; }
.g-btn small { font-size: 11px; font-weight: 600; padding: 0 6px; }
.g-btn.big { border: 3px solid #f6d57d; background: linear-gradient(180deg, #f6d57d, #c9952e); color: #231a14; box-shadow: 0 6px 0 #7a5410; }
.g-btn.small { border: 3px solid rgba(251,245,230,.55); background: rgba(0,0,0,.3); color: #fbf5e6; box-shadow: 0 6px 0 rgba(0,0,0,.4); }
.g-btn:active:not(:disabled) { transform: translateY(4px); }
.g-btn:disabled { opacity: .45; cursor: default; }
.g-btn.chosen { opacity: 1; outline: 3px solid #fff; outline-offset: 3px; }

/* 翻牌比大 */
.c-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 18px; background: rgba(0,0,0,.28); border: 2px solid rgba(233,181,74,.35); }
.c-card { position: relative; aspect-ratio: 5 / 7; padding: 0; border: 0; background: none; perspective: 600px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.c-card:disabled { cursor: default; }
.c-in { position: absolute; inset: 0; transition: transform .55s cubic-bezier(.4,0,.2,1); transform-style: preserve-3d; }
.c-card.up .c-in { transform: rotateY(180deg); }
.c-back, .c-front { position: absolute; inset: 0; border-radius: 8px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.c-back { border: 2px solid #e9b54a; background: repeating-linear-gradient(45deg, #8f1f16 0 5px, #a82a1d 5px 10px); box-shadow: 0 4px 10px rgba(0,0,0,.45); }
.c-back i { font-style: normal; font-family: var(--serif); font-weight: 900; font-size: 16px; color: rgba(251,245,230,.85); }
.c-front { transform: rotateY(180deg); background: #fbf5e6; border: 3px solid var(--oc); color: #231a14; box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.c-front b { font-family: var(--serif); font-weight: 900; font-size: 18px; line-height: 1.1; }
.c-front .red { color: #c8321e; }
.c-card.taken .c-back { box-shadow: 0 0 0 3px var(--oc), 0 4px 10px rgba(0,0,0,.45); }
.c-card.mine .c-back { animation: mCanGlow 1s ease-in-out infinite alternate; }
.c-card:not(:disabled):not(.taken):active .c-in { transform: scale(.94); }
.c-card.dim { opacity: .3; }
.c-card.best .c-front { box-shadow: 0 0 0 3px #f6d57d, 0 0 22px rgba(246,213,125,.8); }
.c-who { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; overflow: hidden; z-index: 3; }
.c-who:empty { display: none; }
.c-who svg { width: 100%; height: 100%; }
.c-rank:empty { display: none; }
.c-mini { font-family: var(--serif); font-weight: 900; font-size: 14px; color: #231a14; background: #fbf5e6; padding: 1px 6px; border-radius: 5px; }
.c-mini.red { color: #c8321e; }

/* 放礼花 */
.m-wrap.fire { position: relative; z-index: 0; }
.fw-sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 50% 0%, #2a2350 0%, #16122e 55%, #0b0a1a 100%); }
.fw-sky.night { background: linear-gradient(180deg, #07061a 0%, #16123a 60%, #2a2050 100%); }
.fw-sec { font-size: 13px; color: #b9b0e6; }
.fw-order { display: flex; gap: 6px; }
.fw-o { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border-radius: 12px; background: rgba(255,255,255,.05); border: 2px solid transparent; }
.fw-o.cur { background: rgba(246,213,125,.16); border-color: #f6d57d; }
.fw-o .m-sn { font-size: 11px; max-width: 100%; }
.fw-o em { font-style: normal; font-size: 11px; font-weight: 800; color: #8ee6b8; }
.fw-o.cur em { color: #f6d57d; }
.fw-card { border-radius: 18px; background: linear-gradient(180deg, #121a33, #0a0f22); border: 2px solid rgba(246,213,125,.35); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.fw-card-h { align-self: stretch; display: flex; justify-content: space-between; align-items: baseline; }
.fw-card-h b { font-family: var(--serif); font-weight: 900; font-size: 17px; }
.fw-card-h small { font-size: 12px; color: #b9b0e6; }
.fw-map { width: min(100%, 240px); height: auto; display: block; }
.fw-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.fw-chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(197,138,78,.18); border: 1px solid rgba(197,138,78,.5); }
.fw-chip.red { background: rgba(224,74,53,.15); border-color: rgba(224,74,53,.5); }
.fw-body, .fw-how { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.06); }
.fw-body > div, .fw-how > div { display: flex; flex-direction: column; gap: 3px; }
.fw-body b, .fw-how b { font-size: 15px; }
.fw-body small, .fw-how small { font-size: 12px; color: #c9c2ea; line-height: 1.5; }
.fw-go { height: 54px; font-family: var(--serif); font-size: 18px; }
.fw-timer { display: flex; flex-direction: column; align-items: flex-end; }
.fw-timer b { font-family: var(--serif); font-weight: 900; font-size: 30px; color: #f6d57d; line-height: 1; }
.fw-timer small { font-size: 11px; color: #b9b0e6; }
.fw-watch { position: relative; display: flex; justify-content: center; }
.fw-watch .fw-map { width: min(100%, 260px); }
.fw-fall { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); padding: 10px 18px; border-radius: 14px; background: #c8321e; color: #fff; font-family: var(--serif); font-weight: 900; font-size: 22px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 8px 20px rgba(200,50,30,.6); }
.fw-fall small { font-size: 13px; font-weight: 600; }
.fw-fall.hidden { display: none; }
.fw-fall.in { animation: mBoomIn .4s cubic-bezier(.2,.9,.3,1.3); }
.fw-cannon-scene { margin-top: 30px; }
.fw-cannon-scene svg { width: 100%; height: auto; display: block; }
.fw-shot { animation: fwShot 1.3s cubic-bezier(.3,.6,.4,1) .35s both; }
@keyframes fwShot { 0% { transform: translate(190px, 250px) scale(.6); opacity: 0; } 8% { opacity: 1; } 100% { transform: translate(300px, 30px) scale(1); opacity: 1; } }
.fw-dong { opacity: 0; animation: fwDong .6s cubic-bezier(.2,.9,.3,1.4) .35s both; transform-origin: 80px 180px; }
@keyframes fwDong { 0% { opacity: 0; transform: scale(.4) rotate(-10deg); } 100% { opacity: 1; transform: rotate(-10deg); } }
.fw-flash { opacity: 0; animation: fwFlash .7s ease-out .35s; }
@keyframes fwFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
.fw-cannon-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: rgba(7,10,23,.82); border: 1px solid rgba(246,213,125,.4); }
.fw-cannon-card > div { display: flex; flex-direction: column; gap: 2px; }
.fw-cannon-card b { font-family: var(--serif); font-weight: 900; font-size: 40px; color: #f6d57d; line-height: 1; }
.fw-cannon-card b i { font-style: normal; font-size: 16px; }
.fw-cannon-card small { font-size: 12px; color: #c9c2ea; }
.fw-intro-art { width: 160px; height: 110px; }
.m-perk.joker { background: linear-gradient(180deg, #fff8e1, #f1dda4); color: #231a14; border: 3px solid #c9952e; }
.m-perk.joker b { color: #231a14; }
.m-perk.joker small { color: #6b5a44; }
.fw-joker { width: 40px; height: 56px; flex: none; border-radius: 6px; background: #fbf5e6; border: 2px solid #c9952e; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #c8321e; font-family: var(--serif); }
.fw-joker b { color: #c8321e !important; margin: 0 !important; line-height: 1.1; }
.fw-rocket { position: fixed; bottom: 0; width: 5px; height: 16px; border-radius: 3px; z-index: 60; pointer-events: none; box-shadow: 0 0 10px currentColor; animation: fwRise .7s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes fwRise { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(calc(-1 * var(--y))); opacity: .9; } }
/* 走桥：全屏画布 + 抬头显示 */
.fw-play { position: fixed; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.fw-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fw-hud-top { position: absolute; left: 14px; right: 14px; top: max(14px, env(safe-area-inset-top)); display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.fw-pill { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(10,15,36,.5); border: 1px solid rgba(233,181,74,.35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.fw-pill > div { display: flex; flex-direction: column; line-height: 1.2; }
.fw-pill b { font-size: 13px; }
.fw-pill small { font-size: 11px; color: #c8d2f0; }
.fw-pill.time { flex-direction: column; align-items: flex-end; gap: 2px; padding: 6px 14px; border-radius: 14px; }
.fw-pill.time b { font-family: var(--serif); font-weight: 900; font-size: 30px; color: #f6d57d; line-height: 1; }
.fw-prog { position: absolute; left: 24px; right: 24px; top: calc(max(14px, env(safe-area-inset-top)) + 70px); height: 3px; border-radius: 2px; background: rgba(255,255,255,.18); pointer-events: none; }
.fw-prog i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: linear-gradient(90deg, #c9952e, #f6d57d); }
.fw-prog span { position: absolute; top: -4px; width: 2px; height: 11px; background: #e04a35; }
.fw-warn { position: absolute; left: 50%; top: calc(max(14px, env(safe-area-inset-top)) + 92px); transform: translateX(-50%); padding: 6px 16px; border-radius: 999px; background: rgba(10,15,36,.6); border: 1px solid rgba(207,225,255,.5); color: #e9f1ff; font-size: 14px; font-weight: 800; white-space: nowrap; pointer-events: none; }
.fw-warn.hidden, .fw-seal.hidden, .fw-falltxt.hidden, .fw-cp.hidden { display: none; }
.fw-seal { position: absolute; right: 26px; top: 46%; width: 60px; height: 60px; border: 3px solid #c8321e; border-radius: 6px; background: rgba(200,50,30,.14); color: #ff5a44; font-family: var(--serif); font-weight: 900; font-size: 22px; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(8deg); box-shadow: 0 0 18px rgba(255,59,42,.5); pointer-events: none; animation: fwSeal .6s infinite; }
@keyframes fwSeal { 50% { transform: rotate(8deg) scale(1.1); } }
.fw-falltxt { position: absolute; left: 50%; top: 34%; transform: translateX(-50%); font-family: var(--serif); font-weight: 900; font-size: 44px; color: #fbf5e6; text-shadow: 0 4px 16px rgba(0,0,0,.7); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.fw-falltxt small { font-size: 15px; font-weight: 600; color: #ff9a8a; }
.fw-cp { position: absolute; left: 50%; top: 28%; transform: translateX(-50%); padding: 8px 18px; border-radius: 12px; background: rgba(224,74,53,.85); color: #fff; font-family: var(--serif); font-weight: 900; font-size: 20px; pointer-events: none; }
.fw-cp.in { animation: mSlideUp .4s cubic-bezier(.2,.9,.3,1.25); }
.fw-level { position: absolute; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.fw-level svg { width: 230px; height: 66px; overflow: visible; }
.fw-level small { font-size: 12px; color: #c8d2f0; letter-spacing: .1em; }
.fw-touch { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 96px; display: flex; align-items: center; justify-content: center; font-size: 46px; color: rgba(255,255,255,.18); pointer-events: none; transition: color .1s; }
.fw-touch.l { left: 4px; } .fw-touch.r { right: 4px; }
.fw-play.tl .fw-touch.l, .fw-play.tr .fw-touch.r { color: rgba(246,213,125,.8); }

/* 小游戏厅 */
.hall-arcade { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; padding: 10px 14px 10px 10px; border-radius: 16px; border: 1px solid rgba(233,181,74,.45);
  background: linear-gradient(120deg, rgba(42,35,80,.85), rgba(22,18,46,.9)); color: var(--paper); text-align: left; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.35); transition: transform .12s; }
.hall-arcade:active { transform: scale(.98); }
.ha-art { width: 46px; height: 46px; flex: none; border-radius: 12px; background: rgba(246,213,125,.12); display: grid; place-items: center; }
.ha-art svg { width: 40px; height: 40px; }
.ha-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ha-txt b { font-family: var(--serif); font-weight: 900; font-size: 18px; color: #f6d57d; letter-spacing: .08em; }
.ha-txt small { font-size: 12px; color: #c9c2ea; }
.ha-go { font-size: 28px; color: #f6d57d; }
.arcade-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.arcade-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 16px; border: 1px solid rgba(233,181,74,.3); background: rgba(0,0,0,.28); color: #fbf5e6; cursor: pointer; text-align: center; transition: transform .12s, border-color .2s; }
.arcade-card:active { transform: scale(.96); border-color: #f6d57d; }
.ac-art { width: 56px; height: 56px; display: grid; place-items: center; }
.ac-art svg { width: 100%; height: 100%; }
.arcade-card b { font-family: var(--serif); font-weight: 900; font-size: 16px; color: #f6d57d; }
.arcade-card small { font-size: 11px; line-height: 1.45; color: #d9c8a8; }
.arcade-end { position: fixed; inset: 0; z-index: 38; display: flex; justify-content: center; overflow-y: auto; background: radial-gradient(ellipse at 50% 20%, rgba(42,35,80,.97), rgba(11,10,26,.99)); animation: fade .3s; }
.arcade-end.hidden { display: none; }
.ae-box { width: 100%; max-width: 440px; box-sizing: border-box; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; color: #fbf5e6; }
.ae-box h2 { margin: 0; font-family: var(--serif); font-weight: 900; font-size: 34px; color: #f6d57d; }
.ae-again { height: 52px; font-family: var(--serif); font-size: 17px; }
.ae-out { align-self: center; padding: 10px; font-size: 14px; }
.sheet-sub { margin: -4px 0 12px; font-size: 13px; line-height: 1.6; color: #d9c8a8; }
#sheet .sheet-sub { color: #6b5a44; }
#sheet .arcade-card { background: #fffaf0; border-color: rgba(201,149,46,.5); box-shadow: 0 3px 8px rgba(35,26,20,.12); }
#sheet .arcade-card b { color: #8f1f16; }
#sheet .arcade-card small { color: #6b5a44; }

/* 新手教学 */
.level-list { display: flex; flex-direction: column; gap: 10px; }
.level-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 2px solid rgba(201,149,46,.45); background: #fffaf0; color: #231a14; text-align: left; cursor: pointer; transition: transform .12s, border-color .2s; }
.level-card:active { transform: scale(.98); border-color: #c8321e; }
.lv-art { width: 54px; height: 54px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px #c9952e; }
.lv-art svg { width: 100%; height: 100%; display: block; }
.lv-txt { display: flex; flex-direction: column; gap: 3px; }
.lv-txt b { font-family: var(--serif); font-weight: 900; font-size: 20px; color: #8f1f16; }
.lv-txt small { font-size: 13px; line-height: 1.5; color: #6b5a44; }
.coach { position: fixed; left: 50%; top: calc(max(10px, env(safe-area-inset-top)) + 54px); transform: translateX(-50%); z-index: 70; width: min(420px, calc(100% - 20px)); box-sizing: border-box;
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 10px; border-radius: 18px; background: linear-gradient(180deg, #fff8e1, #f1dda4); color: #231a14; border: 2px solid #c9952e; box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.coach.hidden { display: none; }
.coach.in { animation: mSlideUp .35s cubic-bezier(.2,.9,.3,1.25); }
.co-ava { width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px #c9952e; }
.co-ava svg { width: 100%; height: 100%; display: block; }
.co-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.co-body small { font-size: 11px; letter-spacing: .2em; color: #8a6a3a; }
.co-body p { margin: 0; font-size: 14px; line-height: 1.65; }
.co-body p b { color: #c8321e; }
.co-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 2px; }
.co-btns .btn { padding: 8px 14px; font-size: 13px; }
.co-ok { border: 0; background: #231a14; color: #fbf5e6; border-radius: 10px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.co-btns .co-ok + .co-ok { background: rgba(35,26,20,.12); color: #231a14; }
.coach-target { position: relative; z-index: 5; animation: coachPulse 1s ease-in-out infinite alternate !important; }
@keyframes coachPulse { from { box-shadow: 0 0 0 0 rgba(246,213,125,.9); } to { box-shadow: 0 0 0 6px rgba(246,213,125,.0), 0 0 22px rgba(246,213,125,.9); } }

.ha-live { font-style: normal; font-family: var(--sans); font-size: 11px; font-weight: 800; letter-spacing: 0; padding: 2px 8px; border-radius: 999px; background: #c8321e; color: #fff; vertical-align: 3px; margin-left: 6px; }
.ha-live.hidden { display: none; }
.arc-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: rgba(35,26,20,.08); margin-bottom: 10px; }
.arc-tabs button { flex: 1; border: 0; border-radius: 10px; padding: 10px; font: inherit; font-weight: 800; font-size: 14px; background: transparent; color: #6b5a44; cursor: pointer; }
.arc-tabs button.on { background: #fffaf0; color: #8f1f16; box-shadow: 0 2px 6px rgba(35,26,20,.15); }
.arc-open { width: 100%; height: 50px; font-family: var(--serif); font-size: 17px; }
.arc-h { margin: 16px 0 8px; font-family: var(--serif); font-size: 16px; color: #231a14; }
.arc-list { display: flex; flex-direction: column; gap: 8px; }
.arc-room { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: #fffaf0; border: 1px solid rgba(201,149,46,.45); }
.ar-ava { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px #c9952e; }
.ar-ava svg { width: 100%; height: 100%; display: block; }
.ar-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ar-txt b { font-size: 14px; color: #231a14; }
.ar-txt small { font-size: 12px; color: #6b5a44; }
.arc-room .btn { padding: 8px 14px; font-size: 13px; }
.arc-empty { font-size: 13px; color: #6b5a44; text-align: center; padding: 14px 0; }
.ae-seats { display: flex; gap: 6px; }
.ae-seat { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 22px; color: rgba(255,255,255,.3); }
.ae-seat svg { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(246,213,125,.5); }
.ae-seat.host svg { box-shadow: 0 0 0 3px #f6d57d; }
.ae-seat.off svg { filter: grayscale(1) opacity(.5); }
.ae-seat.empty { width: 52px; justify-content: flex-start; }
.ae-seat.empty::before { content: ""; display: block; width: 52px; height: 52px; border-radius: 50%; border: 2px dashed rgba(246,213,125,.35); margin-bottom: -40px; }
.ae-seat em { font-style: normal; font-size: 11px; color: #d9c8a8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; margin-top: 14px; }
.ae-seat:not(.empty) em { margin-top: 0; }
.ae-invite { align-self: center; }
.ae-tip { margin: 0; text-align: center; font-size: 14px; color: #e8dcc6; }
.ae-tip b { color: #f6d57d; }
.ae-dim { opacity: .45; pointer-events: none; }
.fw-gyro { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); z-index: 5; padding: 12px 20px; border-radius: 14px; border: 2px solid #f6d57d; background: rgba(10,15,36,.85); color: #f6d57d; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }

.fw-burst { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.fw-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-wrap.finale .m-result { z-index: 1; }

/* =====================================================================
   五人同场：赛龙舟 / 木头人 / 打地鼠 / 叠牌塔
   ===================================================================== */
.mini:has(.sm-wrap.boat), .mini:has(.m-wrap.boat) { background: #0a1a2e; }
.mini:has(.sm-wrap.statue), .mini:has(.m-wrap.statue) { background: radial-gradient(ellipse at 50% 30%, #4a2e10 0%, #2a1a08 55%, #1a1208 100%); }
.mini:has(.sm-wrap.mole), .mini:has(.m-wrap.mole) { background: radial-gradient(ellipse at 50% 42%, rgba(31,59,43,.97) 0%, rgba(20,42,30,.98) 60%, rgba(8,20,13,.99) 100%); }
.mini:has(.sm-wrap.tower), .mini:has(.m-wrap.tower) { background: radial-gradient(ellipse at 50% 30%, #3a2a55 0%, #1d1840 55%, #0b0a1a 100%); }
.mini:has(.sm-wrap)::before { display: none; }
.sm-wrap { position: fixed; inset: 0; display: flex; flex-direction: column; color: #fbf5e6; touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.sm-wrap:not(.boat):not(.tower) { position: relative; width: 100%; max-width: 440px; box-sizing: border-box; padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); gap: 12px; }
.sm-wrap .m-skip { position: absolute; left: 50%; transform: translateX(-50%); bottom: max(8px, env(safe-area-inset-bottom)); z-index: 3; min-height: 32px; font-size: 12px; opacity: .8; }
.sm-wrap:not(.boat):not(.tower) .m-skip { position: static; transform: none; margin-top: auto; }
.sm-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sm-top { position: absolute; left: 14px; right: 14px; top: max(12px, env(safe-area-inset-top)); pointer-events: none; }
.sm-top .m-head { align-items: flex-start; }
.sm-top .m-title.sm { font-size: 24px; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.sm-side { position: absolute; left: 12px; top: calc(max(12px, env(safe-area-inset-top)) + 66px); display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.sm-r { display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: rgba(7,10,23,.55); border: 1px solid rgba(255,255,255,.12); font-size: 12px; }
.sm-r.me { border-color: #f6d57d; }
.sm-r i { font-style: normal; font-family: var(--serif); font-weight: 900; width: 12px; text-align: center; color: #c8d2f0; }
.sm-r .m-ava { width: 22px; height: 22px; }
.sm-r em { font-style: normal; font-weight: 800; font-size: 11px; color: #c8d2f0; }
.sm-r.me em { color: #f6d57d; }
.sm-rank { display: flex; gap: 6px; flex-wrap: wrap; }
.sm-combo { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.sm-dots { display: flex; gap: 3px; }
.sm-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.2); }
.sm-dots i.on { background: #5fd08a; }
.sm-combo.hot .sm-dots i.on { background: #f6d57d; box-shadow: 0 0 8px rgba(246,213,125,.8); }
.sm-combo small { font-size: 12px; font-weight: 800; color: #5fd08a; letter-spacing: .12em; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.sm-combo.hot small { color: #f6d57d; }
.sm-ink { position: absolute; left: 50%; top: 28%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; z-index: 2; }
.sm-ink svg { width: 110px; height: 70px; }
.sm-ink b { padding: 6px 16px; border-radius: 999px; background: #c8321e; color: #fff; font-family: var(--serif); font-size: 18px; }
.sm-ink.hidden, .sm-boost.hidden, .tw-msg.hidden { display: none; }
.sm-boost { position: absolute; left: 50%; top: 47%; transform: translateX(-50%); padding: 6px 16px; border-radius: 999px; background: rgba(255,179,71,.25); border: 2px solid #ffb347; color: #fff6b0; font-weight: 800; font-size: 15px; pointer-events: none; animation: pulse .5s infinite; }
.sm-tip { position: absolute; left: 0; right: 0; bottom: 168px; text-align: center; font-size: 12px; color: #c8d2f0; pointer-events: none; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.sm-paddles { position: absolute; left: 12px; right: 12px; bottom: max(44px, calc(env(safe-area-inset-bottom) + 36px)); height: 120px; display: flex; gap: 10px; }
.sm-pad { flex: 1; border-radius: 20px 20px 16px 16px; border: 2px solid rgba(246,213,125,.5); background: rgba(10,26,46,.45); color: #f6d57d; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: inherit; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform .08s; }
.sm-pad b { font-family: var(--serif); font-weight: 900; font-size: 38px; }
.sm-pad small { font-size: 12px; color: #c8d2f0; }
.sm-pad.next { background: rgba(246,213,125,.22); border-color: #f6d57d; box-shadow: 0 0 24px rgba(246,213,125,.4); color: #fff; }
.sm-pad.hit { animation: padHit .18s; }
@keyframes padHit { 50% { transform: scale(.94); } }
/* 木头人 */
.st-hall { position: relative; flex: 1; min-height: 0; border-radius: 20px; overflow: hidden; background: linear-gradient(180deg, #2a1a08, #4a2e10 50%, #1a1208); border: 2px solid rgba(246,213,125,.3); transition: background .2s; }
.st-hall.red { background: linear-gradient(180deg, #3a0c08, #5a1a10 50%, #1a0806); }
.st-hall::before { content: ""; position: absolute; left: 50%; top: 18%; bottom: 0; width: 26%; transform: translateX(-50%) perspective(300px) rotateX(40deg); transform-origin: top; background: linear-gradient(180deg, #6a1410, #b8281c); border-left: 2px solid rgba(246,213,125,.5); border-right: 2px solid rgba(246,213,125,.5); }
.st-emperor { position: absolute; left: 50%; top: 6px; width: 96px; height: 120px; transform: translateX(-50%); z-index: 2; filter: drop-shadow(0 0 24px rgba(246,213,125,.4)); transition: transform .3s; }
.st-emperor svg { width: 100%; height: 100%; }
.st-emperor .st-front { display: none; }
.st-emperor:not(.back) .st-front { display: block; } .st-emperor:not(.back) .st-back { display: none; }
.st-emperor.turning { transform: translateX(-50%) rotate(-10deg); }
.st-chant { position: absolute; left: 0; right: 0; top: 130px; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 2; pointer-events: none; }
.st-big { font-family: var(--serif); font-weight: 900; font-size: 36px; color: #fbf5e6; text-shadow: 0 4px 14px rgba(0,0,0,.6); letter-spacing: .1em; }
.st-hall.red .st-big { font-size: 48px; color: #fff6b0; text-shadow: 0 4px 0 #8f1f16, 0 10px 30px rgba(0,0,0,.6); animation: mBoomIn .3s cubic-bezier(.2,.9,.3,1.3); }
.st-big.warn { color: #ffd27a; }
.st-pill { padding: 4px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.st-pill.go { background: rgba(95,208,138,.2); border: 1px solid #5fd08a; color: #5fd08a; }
.st-pill.warn { background: rgba(255,210,122,.2); border: 1px solid #ffd27a; color: #ffd27a; }
.st-pill.red { background: #c8321e; color: #fff; box-shadow: 0 6px 18px rgba(200,50,30,.6); }
.st-carpet { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.st-run { position: absolute; bottom: 6%; width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; transform: translateX(-50%); transition: bottom .25s linear; }
.st-run .m-ava.big { width: 44px; height: 44px; }
.st-run em { font-style: normal; font-size: 11px; color: #fbf5e6; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.st-run.moving .m-ava { animation: stRun .3s infinite alternate; }
@keyframes stRun { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-4px) rotate(4deg); } }
.st-run.frozen .m-ava svg { filter: grayscale(1) brightness(.7); }
.st-run.done .m-ava { box-shadow: 0 0 0 3px #f6d57d, 0 0 18px rgba(246,213,125,.8); }
.st-run.caught { animation: stCaught .9s cubic-bezier(.3,.8,.3,1); }
@keyframes stCaught { 0% { filter: brightness(2); } 30% { transform: translateX(-50%) rotate(20deg); } 100% { transform: translateX(-50%); } }
.st-btn { height: 110px; border-radius: 22px; border: 3px solid #fff6b0; background: linear-gradient(180deg, #f6d57d, #c9952e); color: #231a14; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; box-shadow: 0 8px 0 #7a5410, 0 0 28px rgba(246,213,125,.5); touch-action: none; cursor: pointer; transition: transform .08s, box-shadow .08s; }
.st-btn b { font-family: var(--serif); font-weight: 900; font-size: 30px; }
.st-btn small { font-size: 13px; font-weight: 600; }
.st-btn.down { transform: translateY(6px); box-shadow: 0 2px 0 #7a5410; }
.st-btn:disabled { filter: grayscale(.6) brightness(.7); box-shadow: 0 4px 0 #3a3a3a; }
.st-hall.red ~ .st-btn, .sm-wrap.statue:has(.st-hall.red) .st-btn { background: rgba(0,0,0,.45); border-color: rgba(255,255,255,.2); color: #d9c8a8; box-shadow: none; }
/* 打地鼠 */
.mo-scores { display: flex; gap: 5px; }
.mo-scores .sm-r { flex: 1; min-width: 0; flex-direction: column; gap: 2px; padding: 6px 2px; border-radius: 12px; background: rgba(0,0,0,.25); }
.mo-scores .m-sn { font-size: 11px; max-width: 100%; }
.mo-scores em { font-size: 15px; font-family: var(--serif); font-weight: 900; color: #f6d57d; }
.mo-field { flex: 1; min-height: 0; border-radius: 22px; background: linear-gradient(180deg, #4a7a3a, #2f5a2a); border: 3px solid rgba(233,181,74,.4); box-shadow: inset 0 0 40px rgba(0,0,0,.35); padding: 14px; }
.mo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 8px; height: 100%; }
.mo-hole { position: relative; border: 0; background: none; padding: 0; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; overflow: hidden; }
.mo-pit { position: absolute; left: 12%; right: 12%; bottom: 6px; height: 26px; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #1a2a14, #0b140a 70%); box-shadow: inset 0 6px 10px rgba(0,0,0,.7), 0 3px 0 #2a4a22; }
.mo-crit { position: relative; width: 62px; height: 62px; margin-bottom: 12px; transform: translateY(70px); transition: transform .14s cubic-bezier(.2,.9,.3,1.3); }
.mo-crit svg { width: 100%; height: 100%; }
.mo-hole.up .mo-crit { transform: translateY(0); }
.mo-hole.up::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 2px; height: 3px; border-radius: 2px; background: #f6d57d; transform-origin: left; transform: scaleX(var(--life, 1)); opacity: .7; }
.mo-hole.bad .mo-crit { filter: drop-shadow(0 0 8px rgba(224,74,53,.9)); }
.mo-hole.hit .mo-crit { transform: translateY(26px) scale(.8); opacity: .5; }
.mo-hole.bonk { animation: moBonk .2s; }
@keyframes moBonk { 40% { transform: scale(.92); } }
.mo-tag { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); display: flex; align-items: center; gap: 3px; pointer-events: none; }
.mo-tag:empty { display: none; }
.mo-tag .m-ava { width: 20px; height: 20px; }
.mo-tag b { font-size: 13px; font-family: var(--serif); font-weight: 900; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.mo-legend { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 11px; color: #c9d6c0; }
.mo-legend span { padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.3); }
.mo-legend .bad { background: rgba(200,50,30,.25); border: 1px solid rgba(224,74,53,.5); }
/* 叠牌塔 */
.tw-btn { position: absolute; left: 16px; right: 16px; bottom: max(44px, calc(env(safe-area-inset-bottom) + 36px)); height: 90px; border-radius: 22px; border: 3px solid #fff6b0; background: linear-gradient(180deg, #f6d57d, #c9952e); color: #231a14; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: inherit; box-shadow: 0 8px 0 #7a5410; cursor: pointer; transition: transform .06s; }
.tw-btn b { font-family: var(--serif); font-weight: 900; font-size: 28px; }
.tw-btn small { font-size: 12px; font-weight: 600; }
.tw-btn:active { transform: translateY(5px); box-shadow: 0 3px 0 #7a5410; }
.tw-msg { position: absolute; left: 50%; top: 56%; transform: translateX(-50%); padding: 4px 12px; border-radius: 10px; background: rgba(224,74,53,.2); border: 1px solid #e04a35; color: #ff9a8a; font-size: 12px; white-space: nowrap; pointer-events: none; }

.hall-title { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.hall-online { font-family: var(--sans); font-weight: 400; font-size: 11px; letter-spacing: 0; color: rgba(251,245,230,.6); min-height: 13px; }
.arc-cat { margin: 12px 0 6px; font-size: 12px; letter-spacing: .2em; color: #8a6a3a; font-weight: 800; }
.arc-cat:first-of-type { margin-top: 4px; }

/* 排行榜 */
.hall-board { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; padding: 8px 12px 8px 10px; border-radius: 14px; border: 1px solid rgba(233,181,74,.22); background: rgba(0,0,0,.22); color: var(--news); text-align: left; cursor: pointer; min-height: 48px; }
.hb-lbl { font-family: var(--serif); font-weight: 900; font-size: 13px; letter-spacing: .2em; color: var(--tile); flex: none; }
.hb-list { flex: 1; display: flex; gap: 8px; min-width: 0; overflow: hidden; }
.hb-empty { font-size: 12px; opacity: .6; }
.hb-p { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 12px; }
.hb-p b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 64px; font-weight: 700; }
.hb-p small { opacity: .7; white-space: nowrap; }
.hb-ava { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.2); display: inline-flex; }
.hb-ava svg { width: 100%; height: 100%; }
.hb-p.gold .hb-ava { box-shadow: 0 0 0 2px #f6d57d; } .hb-p.silver .hb-ava { box-shadow: 0 0 0 2px #cfd8e8; } .hb-p.bronze .hb-ava { box-shadow: 0 0 0 2px #d9a066; }
.hb-go { font-size: 22px; color: var(--tile); opacity: .8; }
.bd-kinds { display: flex; gap: 8px; margin: 2px 0 10px; }
.bd-kind { flex: 1; border: 1px solid rgba(201,149,46,.45); background: transparent; color: #6b5a44; border-radius: 10px; padding: 8px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.bd-kind.on { background: #8f1f16; color: #fff; border-color: #8f1f16; }
.bd-list { display: flex; flex-direction: column; gap: 6px; }
.bd-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: #fffaf0; border: 1px solid rgba(201,149,46,.3); color: #231a14; }
.bd-row.me { border-color: #c8321e; box-shadow: 0 0 0 2px rgba(200,50,30,.15); }
.bd-row.faint { opacity: .75; border-style: dashed; }
.bd-n { width: 22px; text-align: center; font-family: var(--serif); font-weight: 900; font-size: 16px; color: #8a6a3a; }
.bd-row.gold .bd-n { color: #c9952e; } .bd-row.silver .bd-n { color: #8a93a8; } .bd-row.bronze .bd-n { color: #b5783f; }
.bd-ava { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 2px #c9952e; display: inline-flex; }
.bd-row.gold .bd-ava { box-shadow: 0 0 0 3px #f6d57d, 0 0 14px rgba(246,213,125,.6); }
.bd-ava svg { width: 100%; height: 100%; }
.bd-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bd-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-txt b small { font-size: 10px; color: #c8321e; font-weight: 800; }
.bd-txt small { font-size: 11px; color: #6b5a44; }
.bd-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 12px; white-space: nowrap; }
.bd-stat b { font-family: var(--serif); font-weight: 900; font-size: 18px; color: #8f1f16; }
.bd-stat i { font-style: normal; color: #6b5a44; font-size: 11px; }
.bd-stat small { font-size: 10.5px; color: #8a6a3a; }
.bd-foot { margin-top: 12px; text-align: center; font-size: 11px; }

/* =====================================================================
   质感：飘落的梅花瓣、金字流光、桌面暗角、按钮光泽
   ===================================================================== */
.petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.petals i { position: absolute; top: -20px; width: 12px; height: 12px; border-radius: 12px 0 12px 0; background: radial-gradient(circle at 30% 30%, #ffd1dc, #e8a0a0 70%); opacity: 0; animation: petalFall linear infinite; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.petals i:nth-child(1) { left: 8%; animation-duration: 13s; animation-delay: 0s; }
.petals i:nth-child(2) { left: 24%; animation-duration: 17s; animation-delay: 3s; width: 9px; height: 9px; }
.petals i:nth-child(3) { left: 42%; animation-duration: 15s; animation-delay: 6s; }
.petals i:nth-child(4) { left: 61%; animation-duration: 19s; animation-delay: 1.5s; width: 10px; height: 10px; }
.petals i:nth-child(5) { left: 78%; animation-duration: 14s; animation-delay: 8s; }
.petals i:nth-child(6) { left: 90%; animation-duration: 16s; animation-delay: 4.5s; width: 8px; height: 8px; }
.petals i:nth-child(7) { left: 33%; animation-duration: 21s; animation-delay: 10s; }
@keyframes petalFall { 0% { transform: translate(0, -20px) rotate(0deg); opacity: 0; } 8% { opacity: .75; } 50% { transform: translate(-28px, 50vh) rotate(200deg); } 92% { opacity: .6; } 100% { transform: translate(18px, 104vh) rotate(420deg); opacity: 0; } }
#login > *:not(.petals), #hall > *:not(.petals) { position: relative; z-index: 1; }
#login { overflow: hidden; }
#hall { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#login { overflow-y: auto; }
#login .title { background: linear-gradient(100deg, #c9952e 0%, #f6d57d 30%, #fff6c8 48%, #f6d57d 66%, #c9952e 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: goldSweep 6s ease-in-out infinite, rise .6s var(--ease-pop) both; text-shadow: none; filter: drop-shadow(0 3px 0 rgba(35,26,20,.5)) drop-shadow(0 0 24px rgba(233,181,74,.35)); }
@keyframes goldSweep { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
.hall-room::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,.08), transparent 40%); pointer-events: none; }
.hall-room:not(:disabled):hover { border-color: rgba(233,181,74,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 26px rgba(0,0,0,.4), 0 0 0 1px rgba(233,181,74,.15); }
.hall-room .hr-status { padding: 2px 9px; border-radius: 999px; background: rgba(0,0,0,.25); font-size: 11.5px; }
.hall-room.mine .hr-status { background: rgba(233,181,74,.2); color: var(--tile); }
#game .main { background-image: radial-gradient(ellipse at 50% 42%, transparent 50%, rgba(0,0,0,.3) 100%); }
.btn-gold { position: relative; overflow: hidden; }
.btn-gold::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); animation: sheen 5s ease-in-out infinite; pointer-events: none; }
@keyframes sheen { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.sheet h2 { padding-bottom: 8px; position: relative; }
.sheet h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, #c9952e, rgba(201,149,46,0)); }
.toast { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08); }
.seat.turn .avatar-wrap::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(246,213,125,.7); animation: turnRing 1.4s ease-out infinite; pointer-events: none; }
@keyframes turnRing { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
.hall-arcade::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 85% 30%, rgba(246,213,125,.18), transparent 50%); pointer-events: none; }
.hall-arcade { position: relative; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .petals, .btn-gold::after, .seat.turn .avatar-wrap::before { display: none; } #login .title { animation: none; } }

/* 四间房的景：梅落雪、兰起雾、竹飘叶、菊飞黄叶（很淡，不抢牌面） */
.room-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; display: none; }
html[data-room="MEI"] .room-fx, html[data-room="LAN"] .room-fx, html[data-room="ZHU"] .room-fx, html[data-room="JU"] .room-fx { display: block; }
.room-fx i { position: absolute; top: -30px; opacity: 0; animation: petalFall linear infinite; }
.room-fx i:nth-child(1) { left: 6%; animation-duration: 16s; animation-delay: 0s; }
.room-fx i:nth-child(2) { left: 18%; animation-duration: 21s; animation-delay: 4s; }
.room-fx i:nth-child(3) { left: 31%; animation-duration: 18s; animation-delay: 9s; }
.room-fx i:nth-child(4) { left: 47%; animation-duration: 24s; animation-delay: 2s; }
.room-fx i:nth-child(5) { left: 60%; animation-duration: 17s; animation-delay: 12s; }
.room-fx i:nth-child(6) { left: 73%; animation-duration: 22s; animation-delay: 6s; }
.room-fx i:nth-child(7) { left: 86%; animation-duration: 19s; animation-delay: 14s; }
.room-fx i:nth-child(8) { left: 94%; animation-duration: 26s; animation-delay: 8s; }
html[data-room="MEI"] .room-fx i { width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle, #fff, rgba(255,255,255,.4)); filter: blur(.5px); }
html[data-room="MEI"] .room-fx i:nth-child(odd) { width: 10px; height: 10px; border-radius: 10px 0 10px 0; background: radial-gradient(circle at 30% 30%, #ffd1dc, #e8a0a0 70%); }
html[data-room="ZHU"] .room-fx i { width: 5px; height: 22px; border-radius: 50% 50% 50% 50% / 20% 20% 80% 80%; background: linear-gradient(180deg, #a8e6b8, #4f9a6a); opacity: .7; }
html[data-room="JU"] .room-fx i { width: 11px; height: 11px; border-radius: 60% 0 60% 0; background: radial-gradient(circle at 30% 30%, #ffd27a, #e58a2a 70%); }
html[data-room="LAN"] .room-fx i { top: auto; width: 60vw; height: 18vh; border-radius: 50%; background: radial-gradient(ellipse, rgba(170,210,255,.14), rgba(170,210,255,0) 70%); filter: blur(14px); animation: mistDrift ease-in-out infinite alternate; opacity: 1; }
html[data-room="LAN"] .room-fx i:nth-child(1) { left: -20vw; bottom: 10vh; animation-duration: 28s; }
html[data-room="LAN"] .room-fx i:nth-child(2) { left: 30vw; bottom: 30vh; animation-duration: 34s; }
html[data-room="LAN"] .room-fx i:nth-child(3) { left: 10vw; bottom: 55vh; animation-duration: 40s; }
html[data-room="LAN"] .room-fx i:nth-child(n+4) { display: none; }
@keyframes mistDrift { from { transform: translateX(-10vw); } to { transform: translateX(16vw); } }
@media (prefers-reduced-motion: reduce) { .room-fx { display: none !important; } }

/* ============ 观战 ============ */
.watch-bar { display: flex; align-items: center; gap: 4px; padding: 2px 14px 0; font-size: 12px; color: var(--news); min-height: 20px; }
.watch-bar .wb-eye { font-size: 12px; margin-right: 2px; }
.watch-bar .wb-ava { width: 18px; height: 18px; border-radius: 50%; overflow: hidden; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.25); flex: none; margin-left: -4px; }
.watch-bar .wb-ava:first-of-type { margin-left: 0; }
.watch-bar .wb-ava svg { width: 100%; height: 100%; display: block; }
.watch-bar .wb-txt { margin-left: 4px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-strip.watch { opacity: .95; }
.me-strip.watch .avatar-wrap { width: 34px; height: 34px; }
.me-strip.watch .avatar { width: 34px; height: 34px; }
.me-strip.watch .count { position: absolute; right: -10px; bottom: -4px; }
.me-strip.watch .role-line { color: var(--news); }
.watch-pane { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 12px; padding: 10px 14px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px dashed rgba(255,255,255,.22); color: #fbf5e6; }
.watch-pane .wp-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.watch-pane .wp-l b { font-size: 15px; letter-spacing: .04em; }
.watch-pane .wp-l span { font-size: 13px; opacity: .9; }
.watch-pane .wp-l small { font-size: 11px; opacity: .6; }
.watch-pane .btn { flex: none; padding: 8px 18px; animation: wpPulse 1.8s ease-in-out infinite; }
@keyframes wpPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
body.watching .emote-fab::after { content: "👀"; position: absolute; right: -4px; top: -4px; font-size: 11px; }
body.watching .seat:not(.empty) { cursor: pointer; }
.hall-room.watchable { opacity: .85; }
.hall-room.watchable .hr-status { color: var(--gold, #f6d57d); }
.hr-eyes { position: absolute; right: 10px; top: 8px; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.35); color: #fbf5e6; }
@media (prefers-reduced-motion: reduce) { .watch-pane .btn { animation: none; } }
/* 观众在小游戏里只看不玩：把操作按钮换成一句提示 */
body.watching .m-skip, body.watching .sm-paddles, body.watching .st-btn, body.watching .tw-btn, body.watching .b-btn, body.watching .g-btns, body.watching .fw-go { display: none !important; }
body.watching .mo-grid, body.watching .c-grid, body.watching .m-wrap.flip .grid, body.watching .m-wrap.mines .grid, body.watching .m-wrap [data-pos], body.watching .m-wrap [data-cell] { pointer-events: none; }
body.watching .sm-wrap::after, body.watching .cr::after, body.watching .m-wrap:not(.finale)::after { content: "👀 观战中 · 只看不玩"; position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.5); color: #fbf5e6; font-size: 13px; white-space: nowrap; z-index: 5; pointer-events: none; }

/* ============ 抓螃蟹 ============ */
.mini:has(.cr) { background: #0e2a40; }
.mini:has(.cr)::before, .mini:has(.m-wrap.crab)::before { display: none; }
.mini:has(.m-wrap.crab) { background: radial-gradient(ellipse at 50% 20%, #1f4a6a 0%, #0e2a40 55%, #07182a 100%); }
.cr { position: fixed; inset: 0; color: #fbf5e6; touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.cr-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cr-head { position: absolute; left: 14px; right: 14px; top: max(12px, env(safe-area-inset-top)); align-items: flex-start; pointer-events: none; z-index: 2; }
.cr-head .m-kicker { color: #f4d6b0; }
.cr-head .m-title.sm { font-size: 26px; color: #f6d57d; text-shadow: 0 2px 8px rgba(0,0,0,.55); }
.cr-head .fw-timer b { color: #fff; }
.cr-head .fw-timer small { color: #f4d6b0; }
.cr-chips { position: absolute; left: 12px; top: calc(max(12px, env(safe-area-inset-top)) + 70px); display: flex; flex-direction: column; gap: 4px; pointer-events: none; z-index: 2; }
.cr-chip { display: flex; align-items: center; gap: 6px; padding: 2px 9px 2px 2px; border-radius: 999px; background: rgba(5,14,24,.55); border: 1px solid rgba(255,255,255,.12); font-size: 11.5px; width: max-content; }
.cr-chip .m-ava { width: 20px; height: 20px; }
.cr-chip.bad { background: rgba(200,50,30,.6); }
.cr[data-st="wait"] .cr-chips, .cr[data-st="measure"] .cr-chips { display: none; }
.cr[data-st="measure"] .cr-chips, .cr[data-st="done"] .cr-chips { top: auto; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 2px); left: 12px; right: 12px; flex-direction: row; flex-wrap: wrap; justify-content: center; }
.cr-banner { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 14px; background: rgba(5,14,24,.8); border: 1px solid rgba(143,208,255,.45); font-size: 14px; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: crIn .35s cubic-bezier(.2,.8,.3,1.3); pointer-events: none; }
.cr-banner small { display: block; font-size: 12px; opacity: .85; margin-top: 2px; }
.cr-banner.gold { border-color: #f6d57d; background: linear-gradient(180deg, rgba(74,90,58,.95), rgba(30,40,22,.95)); }
.cr-banner.bad { border-color: #e04a35; background: rgba(90,20,14,.9); }
.cr-banner svg { flex: none; }
@keyframes crIn { from { transform: translateX(-50%) scale(.7); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.cr-stage { position: absolute; inset: 0; z-index: 1; }
.cr-bottom { position: absolute; left: 16px; right: 16px; bottom: max(18px, env(safe-area-inset-bottom)); padding: 10px 14px; border-radius: 14px; background: rgba(0,0,0,.5); border: 1px solid rgba(246,213,125,.35); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; pointer-events: none; }
.cr-bottom b { font-family: var(--serif); font-weight: 900; font-size: 18px; color: #f6d57d; }
.cr-bottom small { font-size: 12px; color: #e8dcc0; }
/* 绑饵 */
.cr-bait .cr-pot { position: absolute; left: 50%; top: 56%; width: min(52vw, 210px); aspect-ratio: 60 / 48; transform: translate(-50%, -50%); filter: drop-shadow(0 8px 16px rgba(0,0,0,.4)); }
.cr-pot.sm { width: 92px; aspect-ratio: 60 / 48; }
.cr-fish { position: absolute; left: 70%; top: 76%; transform: translate(-50%, -50%) rotate(-12deg); touch-action: none; cursor: grab; padding: 10px; animation: crWiggle 1.4s ease-in-out infinite; z-index: 2; }
.cr-fish.drag { animation: none; cursor: grabbing; transform: translate(-50%, -50%) scale(1.15); }
.cr-fish.in { animation: none; transition: transform .2s; transform: translate(-50%, -50%) scale(.9); pointer-events: none; }
@keyframes crWiggle { 0%, 100% { transform: translate(-50%, -50%) rotate(-12deg); } 50% { transform: translate(-50%, -54%) rotate(4deg); } }
/* 抛笼 */
.cr-throw { position: absolute; inset: 0; cursor: grab; }
.cr-cage-hand { position: absolute; left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 84px); transform: translateX(-50%); transition: transform .5s cubic-bezier(.3,.6,.4,1), opacity .5s; pointer-events: none; }
.cr-cage-hand.gone { transform: translate(-50%, -260px) scale(.3); opacity: 0; }
.cr-aim { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: #f6d57d; color: #231a14; font-weight: 800; font-size: 15px; white-space: nowrap; pointer-events: none; }
.cr-aim .bad { color: #a01a10; }
.cr-swipe-hint { position: absolute; left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 190px); width: 30px; height: 90px; transform: translateX(-50%); pointer-events: none; }
.cr-swipe-hint i { position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-top: 3px solid rgba(246,213,125,.85); border-left: 3px solid rgba(246,213,125,.85); transform: rotate(45deg); animation: crUp 1.2s ease-in-out infinite; }
.cr-swipe-hint i:nth-child(2) { animation-delay: .15s; } .cr-swipe-hint i:nth-child(3) { animation-delay: .3s; }
@keyframes crUp { 0% { top: 80px; opacity: 0; } 30% { opacity: 1; } 100% { top: 0; opacity: 0; } }
.cr-throw:has(.cr-cage-hand.gone) .cr-swipe-hint { display: none; }
/* 等 */
.cr-wait .cr-info { position: absolute; right: 12px; top: calc(max(12px, env(safe-area-inset-top)) + 70px); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 58%; pointer-events: none; }
.cr-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.cr-tag { padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.45); font-size: 11px; }
.cr-tag.gold { background: rgba(246,213,125,.9); color: #231a14; font-weight: 800; }
.cr-tag.bad { background: rgba(200,50,30,.75); }
.cr-baitbar { position: relative; width: 150px; height: 20px; border-radius: 999px; background: rgba(0,0,0,.45); overflow: hidden; font-size: 11px; }
.cr-baitbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #c9952e, #f6d57d); opacity: .55; transition: width .3s; }
.cr-baitbar span { position: relative; z-index: 1; display: block; text-align: center; line-height: 20px; font-weight: 700; }
.cr-baitbar.low i { background: #e08a3a; }
.cr-baitbar.gone { background: rgba(200,50,30,.75); width: 190px; animation: crBlink 1s ease-in-out infinite; }
@keyframes crBlink { 50% { opacity: .65; } }
.cr-est { padding: 3px 10px; border-radius: 10px; background: rgba(0,0,0,.45); font-size: 12px; color: #cfe6ff; }
.cr-est b { color: #fff; }
.cr-btns { position: absolute; left: 16px; right: 16px; bottom: max(18px, env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.cr-btn { flex: 1; min-height: 66px; border-radius: 16px; border: 2px solid rgba(255,255,255,.3); background: rgba(0,0,0,.4); color: #fbf5e6; font-family: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; touch-action: manipulation; }
.cr-btn b { font-size: 17px; }
.cr-btn small { font-size: 11px; opacity: .8; }
.cr-btn.gold { flex: 1.4; border: 0; background: linear-gradient(180deg, #f6d57d, #c9952e); color: #231a14; box-shadow: 0 6px 0 #7a5410; }
.cr-btn.gold b { font-family: var(--serif); font-weight: 900; font-size: 22px; }
.cr-btn:active { transform: translateY(3px); box-shadow: none; }
.cr-btn:disabled { opacity: .4; }
/* 收线 */
.cr-heavy { position: absolute; right: 20px; top: 30%; padding: 6px 12px; border-radius: 10px; background: #c8321e; color: #fff; font-family: var(--serif); font-weight: 900; font-size: 20px; transform: rotate(8deg); box-shadow: 0 6px 16px rgba(200,50,30,.5); animation: crIn2 .4s cubic-bezier(.2,.8,.3,1.4); pointer-events: none; }
@keyframes crIn2 { from { transform: rotate(8deg) scale(.4); } }
.cr-ropebar { position: absolute; left: 24px; right: 24px; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 118px); height: 10px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; pointer-events: none; }
.cr-ropebar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c9952e, #f6d57d); transition: width .12s; }
.cr-tapbtn { position: absolute; left: 16px; right: 16px; bottom: max(18px, env(safe-area-inset-bottom)); height: 96px; border-radius: 22px; background: linear-gradient(180deg, #f6d57d, #c9952e); border: 3px solid #fff6b0; color: #231a14; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 8px 0 #7a5410; touch-action: manipulation; font-family: inherit; }
.cr-tapbtn b { font-family: var(--serif); font-weight: 900; font-size: 30px; }
.cr-tapbtn small { font-size: 12px; font-weight: 600; }
.cr-tapbtn.hit { animation: crHit .12s; }
@keyframes crHit { 50% { transform: translateY(5px); box-shadow: 0 3px 0 #7a5410; } }
/* 倒桶量尺 */
.cr-measure .cr-row { position: absolute; left: 0; right: 0; top: calc(max(12px, env(safe-area-inset-top)) + 72px); display: flex; gap: 8px; padding: 6px 14px; overflow-x: auto; scrollbar-width: none; }
.cr-row::-webkit-scrollbar { display: none; }
.cr-item { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 6px 4px; border-radius: 12px; background: rgba(0,0,0,.25); min-width: 64px; }
.cr-item.new { animation: crPop .35s cubic-bezier(.2,.8,.3,1.4); }
@keyframes crPop { from { transform: translateY(-20px) scale(.6); opacity: 0; } }
.cr-item em { font-style: normal; font-size: 10.5px; color: #f4e6c4; white-space: nowrap; }
.cr-item b { font-size: 12px; color: #f6d57d; }
.cr-item.rel { opacity: .55; } .cr-item.rel b { color: #9fd0ff; }
.cr-item.fined b { color: #ff8a7a; } .cr-item.fined { background: rgba(160,26,16,.4); }
.cr-item.pending { outline: 2px solid #f6d57d; }
.cr-empty { padding: 16px; opacity: .7; }
.cr-ruler { position: absolute; left: 20px; right: 20px; top: 38%; height: 150px; }
.cr-scale { position: absolute; left: 0; right: 0; top: 0; height: 64px; border-radius: 6px; background: #f2e2a8; border: 2px solid #8a6a2a; background-image: repeating-linear-gradient(90deg, #5a4418 0 1.5px, transparent 1.5px 7.14%); background-size: 100% 16px; background-repeat: no-repeat; }
.cr-scale span { position: absolute; top: 20px; transform: translateX(-50%); font-size: 10px; color: #5a4418; font-weight: 700; }
.cr-scale .legal { position: absolute; top: -12px; bottom: -40px; width: 3px; margin-left: -1.5px; background: #c8321e; }
.cr-scale .legal em { position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 800; color: #ffd0c4; white-space: nowrap; }
.cr-onruler { position: absolute; left: 0; top: 34px; display: flex; justify-content: flex-end; transition: width .5s cubic-bezier(.2,.8,.3,1); max-width: 100%; }
.cr-onruler svg { flex: none; filter: drop-shadow(0 6px 8px rgba(0,0,0,.4)); }
.cr-cm { position: absolute; left: 0; top: 118px; font-family: var(--serif); font-weight: 900; font-size: 20px; }
.cr-dec { position: absolute; left: 16px; right: 16px; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 140px); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(0,0,0,.5); border: 1px solid rgba(246,213,125,.35); }
.cr-dec b { display: block; font-size: 16px; }
.cr-dec span { font-size: 12px; color: #e8dcc0; }
.cr-ring { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 4px solid #f6d57d; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 900; font-size: 22px; }
.cr-measure .cr-btns { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 48px); }
.cr-donemsg { position: absolute; left: 16px; right: 16px; top: 44%; text-align: center; padding: 14px; border-radius: 16px; background: rgba(0,0,0,.4); font-size: 16px; }
.cr-donemsg b { color: #f6d57d; font-family: var(--serif); font-size: 22px; }
/* 结算 */
.cr-result .m-rk { display: grid; grid-template-columns: 24px 34px minmax(0, 1fr) auto; grid-template-areas: "n a s t" "n a p p"; column-gap: 10px; row-gap: 1px; align-items: center; }
.cr-result .m-rk-n { grid-area: n; width: auto; }
.cr-result .m-rk .m-ava { grid-area: a; }
.cr-result .m-rk .m-sn { grid-area: s; }
.cr-result .m-rk .m-tag { grid-area: t; }
.cr-result .m-rk-p { grid-area: p; white-space: normal; font-size: 11.5px; line-height: 1.35; }
.cr-sc { font-family: var(--serif); font-size: 15px; color: #fbf5e6; margin-right: 4px; }
.cr-special { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(246,213,125,.1); border: 1px solid rgba(246,213,125,.45); }
.cr-special.green { background: linear-gradient(90deg, rgba(142,230,184,.22), rgba(142,230,184,.05)); border-color: rgba(142,230,184,.6); }
.cr-special b, .cr-reward b { display: block; font-size: 14px; }
.cr-special span, .cr-reward span { font-size: 12px; color: #d8e4ec; }
.cr-special svg { flex: none; }
.cr-rewards { display: flex; flex-direction: column; gap: 8px; }
.cr-reward { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; }
.cr-reward svg { flex: none; width: 40px; height: 40px; }
.cr-reward.good { background: rgba(246,213,125,.14); border: 1px solid rgba(246,213,125,.55); }
.cr-reward.bad { background: rgba(200,50,30,.16); border: 1px solid rgba(224,74,53,.5); }
.cr-intro-art { display: flex; gap: 6px; justify-content: center; align-items: flex-end; flex-wrap: wrap; margin: 6px 0; }
body.watching .cr-fish, body.watching .cr-throw, body.watching .cr-btns, body.watching .cr-tapbtn { pointer-events: none; }
body.watching .cr-btns, body.watching .cr-tapbtn { opacity: .35; }
@media (prefers-reduced-motion: reduce) { .cr-fish, .cr-swipe-hint i, .cr-baitbar.gone { animation: none; } }
body.watching .cr-bottom, body.watching .cr-swipe-hint, body.watching .cr-cage-hand { display: none; }

/* ============ 翻牌配对 · 改版：大牌、大字、清爽牌背 ============ */
.mini:has(.m-wrap.flip) { background: #13261c; }
.mini:has(.m-wrap.flip)::before { display: none; }
.m-board.flip { width: min(100%, 420px, calc((100dvh - 250px) / 1.08)); padding: 10px; gap: 8px; background: #1b3326; border: 1px solid rgba(246,213,125,.25); box-shadow: none; }
.m-board.flip .mcard { aspect-ratio: 4 / 5; }
.mc-back { background: #a8281c; border: 2px solid #7a1a12; box-shadow: 0 3px 0 #5a120c; border-radius: 12px; }
.mc-back::after { inset: 5px; border-radius: 8px; border: 1.5px solid rgba(251,245,230,.5); }
.mc-back i { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(251,245,230,.55); display: flex; align-items: center; justify-content: center; font-size: 15px; text-shadow: none; }
.mc-front { background: #fbf5e6; border: 2px solid #d8c8a0; border-radius: 12px; box-shadow: 0 6px 14px rgba(0,0,0,.35); padding: 6px; }
.mc-num { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #231a14; line-height: 1; }
.mc-num b { font-family: var(--serif); font-weight: 900; font-size: clamp(28px, 10vw, 44px); letter-spacing: -.02em; }
.mc-num i { font-style: normal; font-size: clamp(22px, 7.5vw, 32px); }
.mc-num.red { color: #c8321e; }
.mc-bigj { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #c8321e; }
.mc-bigj svg { width: 70%; max-width: 44px; }
.mc-bigj b { font-family: var(--serif); font-weight: 900; font-size: clamp(16px, 5.5vw, 22px); }
.mc-art svg { max-width: 82%; max-height: 82%; }
.mcard.matched .mc-front { box-shadow: none; opacity: .45; }
.mcard.matched .mc-front::after { display: none; }
.mcard.up:not(.matched) .mc-front { border: 3px solid #f6d57d; }
.mcard.up.miss .mc-front { border: 3px solid #e04a35; box-shadow: 0 0 0 4px rgba(224,74,53,.25), 0 8px 16px rgba(0,0,0,.4); }
.mcard.lift { transform: translateY(-6px); }
.mcard.lift .mc-back { box-shadow: 0 0 0 3px #f6d57d, 0 10px 18px rgba(0,0,0,.45); }
.mcard.moving { transition: transform 1.5s cubic-bezier(.45,0,.35,1); }
.mcard.can .mc-back { animation: none; }
.m-wrap.flip .m-turn-tip { font-size: 15px; }
/* 小游戏厅：玩完回来的「再来一局？」和大厅里的小游戏厅弹窗一个样子（米白底） */
.arcade-end { background: var(--paper); color: var(--ink); height: 100lvh; bottom: auto; }
.arcade-end .ae-box { color: var(--ink); min-height: 100%; height: auto; }
.arcade-end .ae-box > * { flex-shrink: 0; }
.arcade-end .m-kicker { color: #8a6a3a; }
.arcade-end .ae-box h2 { color: #8f1f16; }
.arcade-end .ae-again { min-height: 52px; height: auto; padding: 12px 16px; }
.arcade-end .arcade-card { background: #fffaf0; border-color: rgba(201,149,46,.5); box-shadow: 0 3px 8px rgba(35,26,20,.12); color: var(--ink); }
.arcade-end .arcade-card b { color: #8f1f16; }
.arcade-end .arcade-card small { color: #6b5a44; }
.arcade-end .ae-tip { color: #6b5a44; }
.arcade-end .ae-tip b { color: #8f1f16; }
.arcade-end .ae-seat em { color: #6b5a44; }
.arcade-end .ae-seat.empty { color: rgba(143,31,22,.45); }
.arcade-end .ae-seat.empty::before { border-color: rgba(143,31,22,.3); }
.arcade-end .ae-top { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.arcade-end .ae-out { order: 0; margin: 0; padding: 7px 14px 7px 10px; min-height: 36px; border-radius: 999px; border: 1.5px solid rgba(143,31,22,.35); background: #fffaf0; color: #8f1f16; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.arcade-end .ae-top .m-kicker { margin: 0; }
.arcade-end .btn-ghost { color: var(--ink); border-color: rgba(143,31,22,.35); }
/* 翻牌配对：轮到谁一眼看清 */
.m-board.flip { border: 3px solid var(--tc, rgba(246,213,125,.25)); box-shadow: 0 0 22px color-mix(in srgb, var(--tc, #f6d57d) 45%, transparent); transition: border-color .3s, box-shadow .3s; }
.m-board.flip.mine { box-shadow: 0 0 0 3px rgba(246,213,125,.35), 0 0 30px rgba(246,213,125,.6); }
.m-turn-tip.big { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 6px 14px; border-radius: 14px; font-size: 15px; background: color-mix(in srgb, var(--tc, #f6d57d) 22%, rgba(0,0,0,.35)); border: 1.5px solid var(--tc, #f6d57d); color: #fbf5e6; }
.m-turn-tip.big .m-ava { width: 28px; height: 28px; flex: none; }
.m-turn-tip.big b { color: var(--tc, #f6d57d); }
.m-turn-tip.big.mine { background: #f6d57d; color: #231a14; border-color: #fff6b0; flex-direction: column; gap: 0; animation: mTurnPulse 1.4s ease-in-out infinite; }
.m-turn-tip.big.mine b { color: #231a14; font-family: var(--serif); font-weight: 900; font-size: 22px; line-height: 1.2; }
.m-turn-tip.big.mine small { font-size: 12px; font-weight: 600; }
@keyframes mTurnPulse { 50% { transform: scale(1.03); } }
.m-scores.has-cur .m-score:not(.cur) { opacity: .5; }
.m-between { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 20px; background: rgba(19,38,28,.88); animation: fade .3s; }
.m-between.hidden { display: none; }
.m-between b { font-family: var(--serif); font-weight: 900; font-size: 30px; color: #f6d57d; }
.m-between small { font-size: 14px; color: #d8e4dc; }
@media (prefers-reduced-motion: reduce) { .m-turn-tip.big.mine { animation: none; } }

/* 抓螃蟹结算：每人桶里的东西摆出来 */
.cr-haul { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 5px; }
.cr-haul.empty { font-size: 11.5px; opacity: .6; }
.cr-hi { display: inline-flex; flex-direction: column; align-items: center; min-width: 38px; padding: 3px 2px 2px; border-radius: 8px; background: rgba(255,255,255,.08); }
.cr-hi svg { display: block; height: 26px; width: auto; max-width: 40px; }
.cr-hi em { font-style: normal; font-size: 10.5px; font-weight: 700; line-height: 1.2; color: #f6d57d; }
.cr-hi.rel { opacity: .45; }
.cr-hi.rel em { color: #9fd0ff; }
.cr-hi.fined, .cr-hi.gone { opacity: .55; position: relative; }
.cr-hi.fined em, .cr-hi.gone em { color: #ff9a8a; }
.cr-hi.fined::after, .cr-hi.gone::after { content: ""; position: absolute; left: 6px; right: 6px; top: 14px; height: 2px; background: #e04a35; transform: rotate(-20deg); }
.cr-seen-bar { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 4px; }
.cr-seen { min-width: 180px; min-height: 46px; }
.cr-seen:disabled { opacity: .6; }

/* ===== 结算页统一「看完了」 ===== */
.m-seenbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; justify-content: center; padding: 14px 16px max(14px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 40%); pointer-events: none; }
.m-seenbar .btn { pointer-events: auto; min-width: 200px; min-height: 48px; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.m-seenbar .btn:disabled { opacity: .7; }
body.mini-seen .mini .m-wrap { padding-bottom: calc(max(18px, env(safe-area-inset-bottom)) + 84px); }
/* 墨汁脸 */
.ink-face { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 2;
  background: radial-gradient(circle at 30% 34%, rgba(10,10,18,.82) 0 15%, transparent 17%), radial-gradient(circle at 68% 58%, rgba(10,10,18,.78) 0 12%, transparent 14%), radial-gradient(circle at 44% 76%, rgba(10,10,18,.7) 0 9%, transparent 11%), radial-gradient(circle at 74% 26%, rgba(10,10,18,.6) 0 6%, transparent 8%); }
.ink-face::after { content: ""; position: absolute; left: 27%; top: 44%; width: 12%; height: 22%; border-radius: 40% 40% 60% 60%; background: rgba(10,10,18,.75); }
.me-strip .avatar-wrap { position: relative; }

/* ===== 钓鱿鱼 ===== */
.mini:has(.sq), .mini:has(.m-wrap .sq-result) { background: #050a18; }
.sq .cr-head .m-kicker { color: #cfd8f0; }
.sq-bag { position: absolute; right: 14px; top: calc(max(12px, env(safe-area-inset-top)) + 62px); z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 6px 10px; border-radius: 12px; background: rgba(5,14,24,.6); border: 1px solid rgba(246,213,125,.4); pointer-events: none; }
.sq-bag b { font-family: var(--serif); font-weight: 900; font-size: 18px; color: #f6d57d; }
.sq-bag span { display: flex; flex-wrap: wrap; gap: 2px; max-width: 150px; justify-content: flex-end; }
.sq-bag span.empty { font-size: 11px; color: #cfd8f0; }
.sq-bag i { display: inline-flex; width: 24px; height: 26px; align-items: center; justify-content: center; }
.sq-bag i svg { max-height: 24px; width: auto; }
.cr-chip.ink { background: rgba(10,10,18,.85); }
.sq-rod { position: absolute; left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 110px); transform: translateX(-50%) rotate(-30deg); pointer-events: none; }
.sq-jig { position: absolute; inset: 0; cursor: pointer; }
.sq-follow { position: absolute; left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 108px); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(240,184,192,.18); border: 1px solid rgba(240,184,192,.6); font-size: 12px; pointer-events: none; }
.sq-follow.hidden { display: none; }
.sq-follow em { font-style: normal; font-weight: 700; }
.sq-follow i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.2); }
.sq-follow i.on { background: #f6d57d; box-shadow: 0 0 6px #f6d57d; }
.sq-follow span svg { height: 26px; width: auto; display: block; }
.sq-rhythm { position: absolute; left: 50%; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 84px); transform: translateX(-50%); width: min(70%, 260px); height: 10px; border-radius: 999px; background: linear-gradient(90deg, rgba(224,74,53,.5) 0 20%, rgba(142,230,184,.45) 20% 100%); overflow: hidden; pointer-events: none; }
.sq-rhythm i { display: block; height: 100%; background: rgba(255,255,255,.85); }
.sq-rhythm.fast i { background: #ff6a5a; }
.sq-rhythm.slow i { background: #8fd0ff; }
.sq-rhythm.dim { opacity: .35; }
.sq-reel { position: absolute; inset: 0; pointer-events: none; }
.sq-tension { position: absolute; left: 16px; right: 16px; top: 44%; pointer-events: none; }
.sq-tbar { position: relative; height: 18px; border-radius: 999px; overflow: visible; display: flex; border: 2px solid rgba(255,255,255,.5); }
.sq-tbar .z-slack { flex: 0 0 16.7%; background: #3a6a9a; border-radius: 999px 0 0 999px; }
.sq-tbar .z-ok { flex: 0 0 54.2%; background: #3fa06a; }
.sq-tbar .z-hot { flex: 1; background: #c8321e; border-radius: 0 999px 999px 0; }
.sq-tbar b { position: absolute; top: -7px; width: 6px; height: 28px; margin-left: -3px; border-radius: 3px; background: #fff; box-shadow: 0 0 8px rgba(0,0,0,.7); transition: left .18s linear; }
.sq-tlbl { display: flex; justify-content: space-between; font-size: 11px; color: #cfd8f0; margin-top: 4px; }
.sq-tension.hot .sq-tbar { animation: crHit .12s infinite; border-color: #ff6a5a; }
.sq-tension.slack .sq-tbar { border-color: #8fd0ff; }
.sq-flags { position: absolute; left: 16px; right: 16px; top: calc(44% + 48px); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sq-flags span { padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.sq-flags .bad { background: rgba(200,50,30,.85); }
.sq-flags .warn { background: rgba(60,110,170,.85); }
.sq-dial { pointer-events: auto; position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(62vw, 240px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #3a3a44 0 30%, #24242c 31% 64%, #3a3a44 65%); border: 4px solid #c9952e; box-shadow: 0 8px 24px rgba(0,0,0,.6); touch-action: none; }
.sq-dial-in { position: absolute; inset: 8%; border-radius: 50%; }
.sq-knob { position: absolute; left: 50%; top: 2%; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6c0, #c9952e); box-shadow: 0 3px 6px rgba(0,0,0,.6); }
.sq-dial-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.sq-dial-txt b { font-family: var(--serif); font-weight: 900; font-size: 20px; color: #f6d57d; }
.sq-dial-txt small { font-size: 12px; color: #e8dcc0; }
.sq-ink { position: absolute; inset: 0; z-index: 7; touch-action: none; }
.sq-ink.hidden { display: none; }
.sq-hi-art { display: flex; height: 30px; align-items: center; }
.sq-hi-art svg { max-height: 30px; width: auto; }
.sq-inkface { position: relative; display: inline-flex; width: 40px; height: 40px; flex: none; }
.sq-inkface::after { content: ""; position: absolute; inset: 8% 6% 14% 10%; border-radius: 46% 54% 40% 60%; background: radial-gradient(circle at 40% 45%, #0a0a12 0 40%, transparent 70%); }
.sq-inkface svg { width: 40px; height: 40px; }

/* ===== 煎牛排 ===== */
.mini:has(.st), .mini:has(.m-wrap .st-result) { background: radial-gradient(ellipse at 50% 30%, #4a3020 0%, #2a1a10 60%, #140c06 100%); }
.st { position: relative; width: 100%; max-width: 440px; min-height: 100%; box-sizing: border-box; padding: max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; color: #fbf5e6; user-select: none; -webkit-user-select: none; }
.st > * { flex-shrink: 0; }
.st-head .m-title.sm { color: #f6d57d; }
.st-ticket { display: flex; align-items: center; gap: 10px; align-self: flex-start; padding: 4px 12px 4px 10px; border-radius: 10px; background: #fbf5e6; color: #231a14; box-shadow: 0 3px 0 #b8a888; transform: rotate(-1.5deg); }
.st-ticket span { font-size: 11px; color: #8a6a3a; }
.st-ticket b { font-family: var(--serif); font-weight: 900; font-size: 22px; color: #8f1f16; }
.st-others { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.st-o { flex: 1 0 0; min-width: 70px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 4px; border-radius: 10px; background: rgba(0,0,0,.28); font-size: 10.5px; text-align: center; position: relative; }
.st-o .m-ava { width: 20px; height: 20px; position: absolute; top: 4px; left: 4px; }
.st-o small { line-height: 1.3; color: #e8dcc0; }
.st-o-pan { position: relative; width: 40px; height: 30px; border-radius: 50%; background: #2a2a2a; display: flex; align-items: center; justify-content: center; }
.st-o-pan i { width: 22px; height: 15px; border-radius: 45%; }
.st-o.burnt { background: rgba(80,20,10,.5); }
.st-o-smoke { position: absolute; left: 30%; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: rgba(40,40,40,.8); filter: blur(3px); animation: stSmoke 1.2s ease-out infinite; }
.st-main { flex: 1; display: flex; flex-direction: column; }
.st-cook { position: relative; }
.st-prep, .st-cook, .st-rest, .st-done { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.st-board { position: relative; align-self: center; width: min(100%, 300px); aspect-ratio: 1.45; border-radius: 22px; background: repeating-linear-gradient(90deg, #b88a5a 0 18px, #a87a4a 18px 36px); border: 4px solid #6a4424; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.st-specks { position: absolute; inset: 0; pointer-events: none; }
.st-specks i { position: absolute; width: 3px; height: 3px; border-radius: 50%; }
.st-shakers { display: flex; justify-content: center; gap: 20px; }
.st-shaker { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 18px; border-radius: 16px; background: rgba(0,0,0,.3); border: 2px solid rgba(255,255,255,.2); color: #fbf5e6; font: inherit; font-size: 13px; touch-action: manipulation; }
.st-shaker.shake svg { animation: stShake .4s; }
.st-shaker.done { border-color: #8ee6b8; }
.st-drop { flex: none; margin-top: auto; }
.st-panwrap { position: relative; align-self: center; width: min(100%, 230px, calc(100dvh - 470px)); aspect-ratio: 1.15; touch-action: none; cursor: grab; }
.st-pan { position: absolute; inset: 0 10% 0 0; border-radius: 50%; background: radial-gradient(circle at 45% 40%, #4a4a4a, #1e1e1e 70%); border: 6px solid #111; box-shadow: 0 10px 24px rgba(0,0,0,.6), inset 0 0 0 4px #2a2a2a; display: flex; align-items: center; justify-content: center; }
.st-pan::after { content: ""; position: absolute; right: -32%; top: 44%; width: 34%; height: 13%; border-radius: 8px; background: linear-gradient(180deg, #4a3020, #2a1a10); border: 2px solid #111; }
.st-oil { position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(255,230,140,.25), transparent 60%); }
.st-steak { position: relative; z-index: 1; filter: drop-shadow(0 0 6px var(--edge, transparent)) drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.st-steak svg { width: min(46vw, 150px); height: auto; display: block; }
.st-steak.flipping { animation: stFlip .6s cubic-bezier(.3,.6,.4,1); }
.st-smoke { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.st-smoke i { position: absolute; bottom: 50%; width: 28px; height: 28px; border-radius: 50%; background: rgba(230,230,230,.35); filter: blur(6px); animation: stSmoke 1.6s ease-out infinite; }
.st-smoke i:nth-child(1) { left: 30%; } .st-smoke i:nth-child(2) { left: 48%; animation-delay: .5s; } .st-smoke i:nth-child(3) { left: 62%; animation-delay: 1s; }
.st-smoke.h0 i { opacity: .35; animation-duration: 2.4s; }
.st-smoke.h2 i { width: 40px; height: 40px; animation-duration: 1.1s; }
.st-smoke.black i { background: rgba(20,20,20,.75); }
.st-butter { position: absolute; left: 40%; top: 20%; width: 40px; height: 40px; z-index: 3; border-radius: 50%; background: radial-gradient(circle, #ffe9a0, rgba(255,220,120,0) 70%); pointer-events: none; }
.st-butter.pour { animation: stButter .6s ease-out forwards; }
.st-butter.hidden { display: none; }
.st-flipdemo { position: absolute; right: 0; top: 4px; font-size: 11px; color: #e8dcc0; background: rgba(0,0,0,.4); padding: 2px 8px; border-radius: 999px; pointer-events: none; }
.st-sides { display: flex; gap: 10px; }
.st-side { flex: 1; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.st-side span { color: #e8dcc0; }
.st-side.up { opacity: .75; }
.st-meter { position: relative; height: 12px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.st-meter i { display: block; height: 100%; border-radius: 999px; transition: width .2s linear; }
.st-meter b { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.6); }
.st-meter .mk1 { left: 44%; } .st-meter .mk2 { left: 73.5%; background: #ff6a5a; }
.st-side em { font-style: normal; font-weight: 800; color: #f6d57d; }
.st-probe { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); z-index: 4; box-shadow: 0 8px 20px rgba(0,0,0,.5); display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 14px; background: #fbf5e6; color: #231a14; }
.st-probe.hidden { display: none; }
.st-probe b { display: block; font-size: 16px; color: #8f1f16; }
.st-probe small { font-size: 11px; color: #6b5a44; }
.st-heat { display: flex; gap: 8px; }
.st-heat button { flex: 1; min-height: 46px; border-radius: 14px; border: 2px solid rgba(255,255,255,.2); background: rgba(0,0,0,.3); color: #fbf5e6; font: inherit; font-weight: 800; font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; touch-action: manipulation; }
.st-heat button.on { border-color: #f6d57d; background: rgba(246,213,125,.18); }
.st-flame { display: flex; gap: 2px; height: 16px; align-items: flex-end; }
.st-flame i { width: 7px; height: 14px; border-radius: 50% 50% 40% 40%; background: linear-gradient(0deg, #3a7aff, #ffb03a); }
.st-tools { display: flex; gap: 8px; }
.st-tools .cr-btn { min-height: 52px; }
.st-tools .cr-btn b { font-size: 15px; }
.st-serve { flex: none; min-height: 54px; }
.st-alert { position: fixed; left: 50%; top: 42%; transform: translateX(-50%); z-index: 9; min-width: 220px; padding: 14px 20px; border-radius: 18px; border: 3px solid #fff6b0; background: #c8321e; color: #fff; font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: mTurnPulse .5s ease-in-out infinite; touch-action: manipulation; }
.st-alert.hidden { display: none; }
.st-alert b { font-family: var(--serif); font-weight: 900; font-size: 24px; }
.st-onboard svg { width: 200px; height: auto; display: block; }
.st-dog { position: absolute; right: -6%; bottom: -10%; display: flex; flex-direction: column; align-items: center; cursor: pointer; animation: stDog .5s ease-out; touch-action: manipulation; }
.st-dog.hidden { display: none; }
.st-dog b { font-size: 13px; background: #c8321e; color: #fff; padding: 2px 10px; border-radius: 999px; }
.st-restring { position: relative; align-self: center; width: 120px; height: 120px; border-radius: 50%; background: conic-gradient(#f6d57d var(--p, 0%), rgba(255,255,255,.12) 0); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.st-restring i { position: absolute; inset: 8px; border-radius: 50%; background: #2a1a10; }
.st-restring b, .st-restring small { position: relative; }
.st-restring b { font-family: var(--serif); font-weight: 900; font-size: 30px; color: #f6d57d; }
.st-restring small { font-size: 10.5px; color: #e8dcc0; text-align: center; padding: 0 14px; }
.st-restring.ready b { color: #8ee6b8; }
.st-cut { flex: none; min-height: 64px; }
.st-reveal { align-self: center; animation: crIn .5s cubic-bezier(.2,.8,.3,1.3); }
.st-reveal svg { display: block; }
.st-verdict { display: flex; justify-content: center; gap: 16px; padding: 10px; border-radius: 14px; font-size: 15px; }
.st-verdict b { font-family: var(--serif); font-size: 20px; }
.st-verdict.ok { background: rgba(142,230,184,.18); border: 1px solid rgba(142,230,184,.6); }
.st-verdict.bad { background: rgba(200,50,30,.18); border: 1px solid rgba(224,74,53,.5); }
.st-pts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 13px; }
.st-pts li { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255,255,255,.15); padding: 3px 0; }
.st-pts li b { color: #8ee6b8; } .st-pts li b.neg { color: #ff9a8a; }
.st-total { text-align: center; margin-top: 8px; font-size: 15px; }
.st-total b { font-family: var(--serif); font-weight: 900; font-size: 30px; color: #f6d57d; }
.st-wait { text-align: center; font-size: 13px; color: #e8dcc0; margin-top: auto; }
.st-rrow { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.st-rrow svg { flex: none; }
.st-rrow small { color: #d8c8b0; }
@keyframes stFlip { 0% { transform: translateY(0) rotateX(0); } 50% { transform: translateY(-70px) rotateX(180deg) scale(1.1); } 100% { transform: translateY(0) rotateX(360deg); } }
@keyframes stSmoke { 0% { transform: translateY(0) scale(.6); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-80px) scale(1.6); opacity: 0; } }
@keyframes stShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-25deg); } 75% { transform: rotate(25deg); } }
@keyframes stButter { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(3) translateY(30px); opacity: 0; } }
@keyframes stDog { from { transform: translateX(80px); } to { transform: none; } }
body.watching .st-heat, body.watching .st-tools, body.watching .st-serve, body.watching .st-drop, body.watching .st-shakers, body.watching .st-cut { opacity: .35; pointer-events: none; }

/* ===== 幸运大转盘 ===== */
.mini:has(.wh) { overflow-x: hidden; }
.mini:has(.wh), .mini:has(.m-wrap .wh-result) { background: radial-gradient(ellipse at 50% 35%, #5a1a2a 0%, #2a0c16 60%, #12040a 100%); }
.wh { position: relative; width: 100%; max-width: 440px; box-sizing: border-box; padding: max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; color: #fbf5e6; user-select: none; -webkit-user-select: none; }
.wh .m-title.sm { color: #f6d57d; }
.wh-order { display: flex; gap: 4px; }
.wh-o { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border-radius: 10px; background: rgba(0,0,0,.28); font-size: 10.5px; text-align: center; }
.wh-o .m-ava { width: 26px; height: 26px; }
.wh-o small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-o em { font-style: normal; display: flex; flex-direction: column; gap: 1px; color: #d8c8b0; }
.wh-o em i { font-style: normal; font-weight: 800; padding: 0 4px; border-radius: 6px; color: #231a14; }
.wh-o.cur { background: rgba(246,213,125,.22); outline: 2px solid #f6d57d; }
.wh-o.done { opacity: .85; }
.wh-stage { position: relative; align-self: center; width: min(86vw, 320px); aspect-ratio: 1; }
.wh-wheel { position: absolute; inset: 0; touch-action: none; filter: drop-shadow(0 10px 24px rgba(0,0,0,.6)); }
.wh-wheel svg { width: 100%; height: 100%; display: block; }
.wh-pointer { position: absolute; left: 50%; top: -10px; z-index: 2; width: 0; height: 0; margin-left: -14px; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 30px solid #c8321e; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.wh-pointer::after { content: ""; position: absolute; left: -6px; top: -26px; width: 12px; height: 12px; border-radius: 50%; background: #fbf5e6; }
.wh-now { min-height: 54px; display: flex; flex-direction: column; gap: 6px; }
.wh-cmp { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; }
.wh-cmp span { padding: 4px 10px; border-radius: 10px; color: #231a14; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.wh-cmp span b { font-size: 16px; }
.wh-cmp i { font-style: normal; font-size: 20px; color: #f6d57d; }
.wh-cmp .gold, .wh-o em i.gold, .wh-res.gold, .wh-chip.gold { background: #f6d57d; }
.wh-cmp .good, .wh-o em i.good, .wh-res.good, .wh-chip.good { background: #8ee6b8; }
.wh-cmp .mid, .wh-o em i.mid, .wh-res.mid, .wh-chip.mid { background: #8fd0ff; }
.wh-cmp .plain, .wh-o em i.plain, .wh-res.plain, .wh-chip.plain { background: #fbf5e6; }
.wh-cmp .bad, .wh-o em i.bad, .wh-res.bad, .wh-chip.bad { background: #ff9a8a; }
.wh-push { position: relative; height: 14px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.wh-push i { display: block; height: 100%; background: linear-gradient(90deg, #8fd0ff, #ff9a8a); transition: width .15s; }
.wh-push em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 10.5px; font-weight: 700; }
.wh-res { align-self: center; padding: 10px 18px; border-radius: 16px; color: #231a14; text-align: center; animation: crIn .4s cubic-bezier(.2,.8,.3,1.3); }
.wh-res b { font-family: var(--serif); font-weight: 900; font-size: 22px; display: block; }
.wh-res small { font-size: 12px; font-weight: 700; }
.wh-act { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.wh-tip { text-align: center; }
.wh-tip b { display: block; font-size: 16px; color: #f6d57d; }
.wh-tip small { font-size: 12px; color: #e8dcc0; }
.wh-big { min-height: 96px; border-radius: 22px; border: 3px solid #fff6b0; font: inherit; color: #231a14; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 8px 0 rgba(0,0,0,.35); touch-action: manipulation; }
.wh-big b { font-family: var(--serif); font-weight: 900; font-size: 32px; }
.wh-big small { font-size: 12px; font-weight: 700; }
.wh-big.blow { background: linear-gradient(180deg, #bfe6ff, #6aaee0); }
.wh-big.brake { background: linear-gradient(180deg, #f6d57d, #c9952e); }
.wh-big.hit { animation: crHit .12s; }
.wh-pick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wh-pick button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px; min-width: 70px; border-radius: 14px; border: 2px solid rgba(255,255,255,.3); background: rgba(0,0,0,.3); color: #fbf5e6; font: inherit; font-size: 12px; }
.wh-pick .m-ava { width: 34px; height: 34px; }
.wh-intro-art { position: relative; align-self: center; margin: 14px auto 4px; width: 180px; }
.wh-intro-art .wh-pointer { top: -12px; }
.wh-rrow { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.wh-chip { font-style: normal; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 8px; color: #231a14; }
.wh-hit { display: block; margin-top: 3px; color: #ffb3a8; }
.wh-result .m-rk-n { width: 0; }
body.watching .wh-act { opacity: .5; pointer-events: none; }

.st-mine { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(246,213,125,.1); border: 1px solid rgba(246,213,125,.45); }
.st-mine svg { flex: none; }
.st-mine b { display: block; font-size: 15px; }
.st-mine span { font-size: 12.5px; color: #e8dcc0; }
.mini:has(.st-result) .m-wrap { background: none; }
.st .cr-btn.st-serve, .st .cr-btn.st-drop, .st .cr-btn.st-cut { flex: none; }
.cr-new { display: inline-block; font-style: normal; margin-right: 6px; padding: 0 8px; border-radius: 999px; background: #c8321e; color: #fff; font-size: 11px; vertical-align: 2px; animation: mTurnPulse .8s ease-in-out infinite; }

/* ===== 大升级：观感、流畅、放松 ===== */
body.has-toast .ticker { visibility: hidden; }
.hand { margin-left: auto; margin-right: auto; }
button, [role="button"], .card, .seat { touch-action: manipulation; }
[data-ring] circle { transition: stroke-dashoffset .1s linear; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

.sheet.closing { animation: sheetDown .22s cubic-bezier(.4,0,.8,.4) forwards; }
.sheet.swap { animation: sheetSwap .25s ease-out; }
.sheet-backdrop.closing { animation: fade-out .22s forwards; }
@keyframes sheetDown { to { transform: translate(-50%, 100%); } }
@keyframes sheetSwap { from { opacity: .4; } }
/* 换屏：淡入，别硬切 */
.screen:not(.hidden) { animation: screenIn .38s cubic-bezier(.2,.8,.3,1); }
@keyframes screenIn { from { opacity: 0; } }

.mode-chip { margin-left: 6px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(233,181,74,.55); background: rgba(233,181,74,.14); color: var(--tile); font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; opacity: 1; vertical-align: 1px; }
.mode-chip.ming, .mode-chip.soloMing { background: rgba(200,50,30,.25); border-color: rgba(255,154,138,.6); color: #ffb3a8; }
.ticker-row { display: flex; align-items: center; gap: 6px; padding-right: 12px; }
.ticker-row .ticker { flex: 1; min-width: 0; }
.ticker-row .mode-chip { flex: none; margin: 3px 0 0; }
.mode-chip.hidden { display: none; }
/* 弹层是浅底：换桌布的选项也用深色字，看得清 */
.sheet .skin-opt { background: rgba(35,26,20,.05); border-color: rgba(35,26,20,.12); color: #5b4c3f; }
.sheet .skin-opt.on { background: rgba(233,181,74,.18); border-color: #c9952e; color: #8f1f16; }
/* 开着弹层、聊天面板时，桌上的大横幅先别挡在上面（播报栏里照样有） */
body:has(#sheet:not(.hidden)) .banner, body:has(#emotePanel:not(.hidden)) .banner { display: none; }

/* 结算页右上角：本局是暗保还是明保 */
.report { position: relative; }
.result-mode { position: absolute; top: 2px; right: 0; padding: 4px 12px; border-radius: 999px; font-family: var(--serif); font-weight: 900; font-size: 14px; letter-spacing: .06em; color: #7a5410; background: rgba(233,181,74,.2); border: 1px solid rgba(201,149,46,.6); transform: rotate(4deg); }
.result-mode.ming, .result-mode.soloMing { color: #9e2214; background: rgba(200,50,30,.1); border-color: rgba(200,50,30,.45); }

.result-head { text-align: center; padding-top: 22px; }
.result-head .result-title { position: relative; display: inline-block; margin: 0; }
.rt-round { position: absolute; left: 2px; bottom: 100%; margin-bottom: 2px; font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .04em; color: #8a7a64; white-space: nowrap; }
.rank-list .nm { flex-wrap: wrap; min-width: 0; row-gap: 2px; white-space: nowrap; }
.rank-list .nm .left-cards { flex-basis: 100%; white-space: normal; }
.rank-list .nm .left-cards .rp-cards { flex-wrap: wrap; }
/* 放礼花准备页：内容多的时候别把按钮挤扁，「我准备好了」一直贴在底部能点到 */
.m-wrap.fire > * { flex-shrink: 0; }
.m-wrap.fire .fw-go { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5; min-height: 54px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
@media (max-height: 720px) { .m-wrap.fire .fw-card svg { max-height: 150px; width: auto; display: block; margin: 0 auto; } }

/* 木头人：大厅别顶到标题 */
.sm-wrap.statue .st-hall { margin-top: calc(max(12px, env(safe-area-inset-top)) + 66px); }
/* 很窄的手机：上面两个座位的「不要」收小一点，中间不会撞到一起 */
@media (max-width: 360px) {
  .seat .act-pass { margin-left: 3px !important; margin-right: 3px !important; }
  .seat .pass-bubble { padding: 3px 7px; font-size: 12px; }
}

/* ===== 大厅网格：一格一桌（大字招牌 · 小字名 · 玩法签 · 五个座位 · 状态） ===== */
.hall-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; max-width: 1180px; margin: 4px auto -2px; }
.hall-sec b { font-family: var(--serif); font-weight: 700; font-size: 16px; letter-spacing: 4px; color: #e9c46a; }
.hall-sec small { font-size: 11px; color: rgba(251,245,230,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hall-gap { flex: 1 1 0; min-height: 2px; }
.hall-room, .hall-new { min-height: 184px; border-radius: 16px; }
.hall-room { --rc: #e9b54a; padding: 26px 6px 12px; gap: 0; border: 1px solid rgba(233,196,106,.3); background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(10,22,15,.25)); box-shadow: 0 8px 18px rgba(0,0,0,.25); }
.hall-room.feat { border-color: color-mix(in srgb, var(--rc) 40%, transparent); }
.hall-room.custom { border-color: rgba(185,179,214,.45); }
.hall-room.k-live { border-color: rgba(127,217,168,.5); }
.hall-room.mine { border-color: rgba(79,167,140,.75); }
.hall-room .hr-art { color: var(--rc); }
.hall-room .hr-name { font-size: 38px; line-height: 1.15; color: var(--rc); text-shadow: 0 2px 0 rgba(0,0,0,.25); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hall-room .hr-name.long { font-size: 24px; line-height: 1.5; letter-spacing: .04em; }
.hall-room .hr-sub { font-size: 11px; letter-spacing: 4px; padding-left: 4px; opacity: 1; color: rgba(251,245,230,.6); }
.hr-feat { margin-top: 4px; max-width: 100%; font-size: 10px; line-height: 1.5; padding: 1px 7px; border-radius: 5px; border: 1px solid color-mix(in srgb, var(--rc) 53%, transparent); color: var(--rc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hall-room .hr-dots { gap: 4px; margin: 8px 0 0; }
.hall-room .hr-dot { width: 22px; height: 22px; border: 1.5px dashed rgba(251,245,230,.35); box-sizing: border-box; }
.hall-room .hr-dot.on, .hall-room .hr-dot.bot { border: 0; background: var(--paper); box-shadow: 0 0 0 1.5px rgba(251,245,230,.7); }
.hall-room .hr-dot.bot { opacity: .7; }
.hall-room .hr-status { margin-top: 8px; max-width: 100%; font-size: 11px; line-height: 1.4; padding: 2px 10px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 1; }
.hall-room.k-empty .hr-status { background: rgba(10,22,15,.4); color: rgba(251,245,230,.75); }
.hall-room.k-wait .hr-status { background: rgba(233,196,106,.18); color: #f1d590; }
.hall-room.k-live .hr-status { background: rgba(127,217,168,.18); color: #9fe6bf; }
.hall-room.k-priv .hr-status { background: rgba(185,179,214,.18); color: #d4cfee; }
.hall-room.watchable .hr-status { color: #9fe6bf; }
.hr-wide { display: none; }
/* 角上的小签：左边「座位留着」/ 擂主，右边围观人数 / 锁 + 房号 */
.hr-corner { position: absolute; top: 7px; z-index: 1; display: flex; flex-direction: column; gap: 3px; max-width: calc(50% - 10px); pointer-events: none; }
.hr-corner.l { left: 7px; align-items: flex-start; }
.hr-corner.r { right: 7px; align-items: flex-end; }
.hr-corner > span { position: static; display: inline-flex; align-items: center; gap: 3px; max-width: 100%; font-size: 10px; line-height: 1.5; padding: 1px 6px; border-radius: 999px; background: rgba(10,22,15,.45); color: rgba(251,245,230,.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-corner .hr-mine { background: rgba(79,167,140,.32); color: #d6f3e7; }
.hr-corner .hr-king { display: block; background: rgba(240,160,82,.22); color: #f8c992; }
.hr-code svg { width: 10px; height: 10px; flex: none; }
/* 开新房间：虚线格 */
.hall-new { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px 6px; border: 2px dashed rgba(233,196,106,.5); background: rgba(10,22,15,.18); color: #e9c46a; font: inherit; cursor: pointer; transition: transform .15s var(--ease-pop), background .2s, border-color .2s; animation: rise .5s cubic-bezier(.2,.8,.3,1) both; }
.hall-new:active { transform: scale(.97); }
@media (hover: hover) { .hall-new:hover { background: rgba(10,22,15,.3); border-color: rgba(233,196,106,.8); } }
.hall-rooms.no-anim .hall-new { animation: none; }
.hn-plus { width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(233,196,106,.7); display: grid; place-items: center; }
.hn-plus svg { width: 26px; height: 26px; }
.hall-new b { font-family: var(--serif); font-weight: 700; font-size: 16px; letter-spacing: 3px; padding-left: 3px; }
.hall-new small { font-size: 11px; color: rgba(251,245,230,.55); }
@media (min-width: 600px) {
  .hall-rooms { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .hall-room .hr-name.long { font-size: 30px; line-height: 1.3; }
}
@media (min-width: 900px) {
  #hall { padding-left: 24px; padding-right: 24px; gap: 14px; }
  .hall-rooms { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .hall-sec b { font-size: 18px; } .hall-sec small { font-size: 12px; }
  .hall-room, .hall-new { min-height: 226px; border-radius: 18px; }
  .hall-room { padding: 30px 10px 14px; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
  .hall-room .hr-name { font-size: 48px; line-height: 1.1; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
  .hall-room .hr-name.long { font-size: 36px; line-height: 1.3; }
  .hall-room .hr-sub { font-size: 12px; letter-spacing: 6px; padding-left: 6px; }
  .hr-feat { margin-top: 6px; font-size: 11px; padding: 2px 9px; border-radius: 6px; }
  .hall-room .hr-dots { gap: 6px; margin-top: 12px; }
  .hall-room .hr-dot { width: 28px; height: 28px; }
  .hall-room .hr-status { margin-top: 10px; font-size: 12px; padding: 3px 12px; }
  .hr-wide { display: inline; }
  .hr-corner { top: 10px; } .hr-corner.l { left: 10px; } .hr-corner.r { right: 10px; }
  .hr-corner > span { font-size: 11px; padding: 2px 8px; }
  .hn-plus { width: 64px; height: 64px; } .hn-plus svg { width: 30px; height: 30px; }
  .hall-new { gap: 10px; } .hall-new b { font-size: 18px; letter-spacing: 4px; } .hall-new small { font-size: 12px; }
}
/* 牌桌中间：特色桌的玩法、玩家开的房名 */
.room-feat { margin-top: 6px; font-size: 12px; padding: 2px 10px; border-radius: 6px; border: 1px solid rgba(233,181,74,.4); color: var(--tile); white-space: nowrap; }
.room-code.title { font-size: 34px; letter-spacing: .06em; }
.room-code.title + .room-sub { margin: 6px 0 0; }
/* 结算：帽子山翻倍 */
.hat-mult { display: flex; width: fit-content; align-items: center; gap: 4px; margin: 6px 0 0; padding: 2px 10px; border-radius: 999px; background: rgba(239,122,104,.15); color: #b8432f; font-size: 12px; font-weight: 700; }

/* ===== 开新房间 ===== */
.nr-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.nr-mark { flex: none; width: 64px; height: 64px; border-radius: 14px; background: #1f4a35; color: #b9b3d6; font-family: var(--serif); font-weight: 900; font-size: 34px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(233,196,106,.4); }
.sheet .nr-head h2 { font-size: 22px; margin: 0; padding: 0; }
.sheet .nr-head h2::after { display: none; }
.nr-head small { font-size: 12px; color: #6f5f50; }
.nr-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 13px; color: #6f5f50; }
.nr-field.hidden { display: none; }
.sheet .nr-field input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: #231a14; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(35,26,20,.18); background: #fff; }
.sheet .nr-field input:focus { outline: 2px solid rgba(201,149,46,.6); outline-offset: 1px; }
.nr-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 12px; background: rgba(35,26,20,.07); }
.nr-seg button { font: inherit; font-size: 14px; min-height: 40px; padding: 8px; border-radius: 9px; border: 0; background: transparent; color: #6f5f50; cursor: pointer; }
.nr-seg button.on { background: #fff; color: #231a14; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.nr-opts { display: flex; flex-direction: column; margin-bottom: 16px; border-radius: 14px; background: #fff; border: 1px solid rgba(35,26,20,.1); overflow: hidden; }
.nr-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 8px 14px; border: 0; border-bottom: 1px solid rgba(35,26,20,.07); background: none; font: inherit; font-size: 15px; color: #231a14; text-align: left; cursor: pointer; }
.nr-opt:last-child { border-bottom: 0; }
.nr-sw { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: rgba(35,26,20,.2); transition: background .2s; }
.nr-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
.nr-opt.on .nr-sw { background: #3f9a6f; }
.nr-opt.on .nr-sw::after { left: 21px; }
.nr-go { display: block; width: 100%; padding: 14px; border: 0; border-radius: 14px; background: linear-gradient(180deg, #f6d57d, #d9a441); color: #3b2410; font-family: var(--serif); font-weight: 900; font-size: 18px; letter-spacing: 8px; text-indent: 8px; box-shadow: 0 4px 0 #a8792a; cursor: pointer; margin-bottom: 4px; }
.nr-go:active { transform: translateY(3px); box-shadow: 0 1px 0 #a8792a; }
/* 矮屏（iPhone SE 这类）：收紧一点，「开房」不用滚就看得到 */
@media (max-height: 700px) {
  .sheet:has(.nr-head)::before { margin-bottom: 8px; }
  .nr-head { margin-bottom: 8px; gap: 12px; } .nr-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 24px; }
  .sheet .nr-head h2 { font-size: 20px; }
  .nr-field { margin-bottom: 8px; gap: 4px; } .sheet .nr-field input { padding: 9px 12px; }
  .nr-seg button { min-height: 36px; padding: 6px; }
  .nr-opt { min-height: 40px; padding: 4px 14px; } .nr-opts { margin-bottom: 10px; }
  .nr-go { padding: 12px; }
}
/* 起名页「已有账号？登录」：比「怎么玩」轻一点 */
#login #acctLogin { font-size: 14px; opacity: .85; margin-top: -4px; }

/* ---------- 账号：新玩家欢迎页 + 绑定邮箱弹窗（login.js 出结构，这里给颜色）---------- */
body { --acct-card: var(--paper); --acct-ink: var(--ink); --acct-accent: var(--cinnabar); --acct-accent-ink: var(--paper); --acct-line: rgba(35,26,20,.2); --acct-title: var(--serif); }
.acct-wel.bh-wel { color: var(--paper); font-family: var(--sans); background: radial-gradient(120% 80% at 50% 35%, var(--wall) 0%, var(--wall-deep) 60%, var(--wall-dark) 100%); }
.acct-wel.bh-wel::before { content: ""; position: fixed; inset: -20%; z-index: -1; opacity: .07; pointer-events: none; transform: rotate(-12deg);
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23fbf5e6' font-size='22' font-family='serif' text-anchor='middle'%3E%3Ctext x='30' y='36'%3E%E2%99%A0%3C/text%3E%3Ctext x='90' y='36'%3E%E2%99%A5%3C/text%3E%3Ctext x='30' y='96'%3E%E2%99%A3%3C/text%3E%3Ctext x='90' y='96'%3E%E2%99%A6%3C/text%3E%3C/g%3E%3C/svg%3E") 0 0 / 120px 120px; }
.acct-wel.bh-wel { isolation: isolate; }
.bh-wel .subtitle { font-size: 15px; opacity: .85; }
.bh-wel .btn-gold { height: 56px; font-family: var(--serif); font-weight: 900; font-size: 19px; letter-spacing: .1em; }
.bh-wel .acct-wel-art .opening { pointer-events: none; }

/* 西游头像（取经季）：没拿到的灰着 */
.ava-opt.xy.locked .ava-face { filter: grayscale(1); opacity: .45; }
.ava-opt.xy.locked::after { content: ''; position: absolute; right: 0; bottom: 2px; width: 12px; height: 12px; border-radius: 50%; background: #2b2620 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f4efe4' stroke-width='3'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/8px no-repeat; }

/* 取经季：资料页里的通关印进度、「齐天大圣」称号 */
.xy-seal { margin: 4px 0 8px; padding: 8px 10px; border-radius: 10px; background: rgba(168,50,30,.12); border: 1px solid rgba(201,149,46,.45); font-size: 13px; }
.xy-seal b { display: block; color: #a8321e; font-family: var(--serif); } .xy-seal small { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }
.title-tag.xy-dasheng { background: linear-gradient(180deg, #f6d57d, #c8321e); color: #fff6d0; text-shadow: 0 1px 0 #7a1a0c; }
