/* 大胆掼蛋 · 蓝印花布桌面 + 蛋黄 */
:root {
  --indigo: #1f3a6e;
  --indigo-deep: #16294c;
  --indigo-dark: #0d1a33;
  --calico: #eef1f5;
  --mist: #a9b8d3;
  --yolk: #f4a91f;
  --yolk-deep: #c98309;
  --cinnabar: #c9352b;
  --ink: #1f1a17;
  --face: #fbfaf6;
  --ally: #f4a91f;
  --foe: #8fb3ea;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.2, .8, .3, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans); color: var(--calico); overflow: hidden;
  background: radial-gradient(130% 90% at 50% 30%, var(--indigo) 0%, var(--indigo-deep) 55%, var(--indigo-dark) 100%);
  background-color: var(--indigo-deep);
  -webkit-font-smoothing: antialiased;
}
.calico-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.screen { position: relative; z-index: 1; height: 100dvh; display: flex; flex-direction: column; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--yolk); outline-offset: 2px; }
input { font: inherit; }

.btn {
  border: 1px solid rgba(238, 241, 245, .28); background: rgba(13, 26, 51, .55); color: var(--calico);
  border-radius: 999px; padding: 9px 18px; font-weight: 600; font-size: 15px; letter-spacing: .02em;
  transition: transform .12s var(--ease), background .15s;
}
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .38; }
.btn.yolk { background: var(--yolk); border-color: var(--yolk); color: var(--ink); box-shadow: 0 3px 0 var(--yolk-deep); }
.btn.yolk:active:not(:disabled) { box-shadow: 0 1px 0 var(--yolk-deep); transform: translateY(2px); }
.btn.ghost { background: transparent; }
.btn.red { background: var(--cinnabar); border-color: var(--cinnabar); }
.btn.big { padding: 14px 22px; font-size: 17px; width: 100%; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.link { background: none; border: 0; color: var(--mist); text-decoration: underline; text-underline-offset: 3px; padding: 8px; font-size: 14px; }
.icon { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(238, 241, 245, .2); background: rgba(13, 26, 51, .4); font-size: 17px; display: grid; place-items: center; padding: 0; }
.icon.on { background: var(--yolk); color: var(--ink); border-color: var(--yolk); }
.muted { color: var(--mist); font-size: 13px; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; }

/* ---------- 大厅 ---------- */
#lobby { overflow-y: auto; }
.lobby-wrap { width: 100%; max-width: 420px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px 24px; display: flex; flex-direction: column; gap: 22px; }
.hero { text-align: center; padding-top: 4px; }
.egg-stage { width: 190px; height: 146px; margin: 0 auto -6px; cursor: pointer; }
.hero-egg { width: 100%; height: 100%; overflow: visible; }
.egg-drop { animation: drop .7s cubic-bezier(.5, 0, .9, .4) both; transform-origin: 110px 153px; }
.egg-body { animation: squash .5s .7s var(--ease) both; transform-origin: 110px 153px; }
.crack { stroke-dasharray: 120; stroke-dashoffset: 120; animation: crack .25s .72s ease-out forwards; }
.egg-spark path { opacity: 0; animation: spark .5s .7s ease-out forwards; }
.egg-shadow { animation: shadow .7s cubic-bezier(.5, 0, .9, .4) both; transform-origin: 110px 158px; }
.egg-face { animation: squash .5s .7s var(--ease) both; transform-origin: 110px 153px; }
@keyframes drop { from { transform: translateY(-150px) rotate(-14deg); } to { transform: none; } }
@keyframes squash { 0% { transform: scale(1.18, .8); } 45% { transform: scale(.94, 1.06); } 100% { transform: none; } }
@keyframes crack { to { stroke-dashoffset: 0; } }
@keyframes spark { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes shadow { from { transform: scale(.3); opacity: .2; } to { transform: none; opacity: 1; } }
.brand {
  font-family: var(--serif); font-weight: 900; margin: 0; line-height: 1; font-size: clamp(52px, 17vw, 76px);
  display: flex; justify-content: center; gap: .02em; letter-spacing: -.02em;
}
.brand span:first-child { color: var(--yolk); transform: rotate(-4deg) translateY(2px); display: inline-block; }
.brand span:last-child { color: var(--calico); }
.tagline { margin: 12px 0 0; color: var(--mist); font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mist); }
.field input, .join input {
  background: rgba(238, 241, 245, .08); border: 1px solid rgba(238, 241, 245, .25); color: var(--calico);
  border-radius: 12px; padding: 12px 14px; font-size: 17px; outline: none; width: 100%;
}
.field input:focus, .join input:focus { border-color: var(--yolk); }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 12px; }
.ava-btn { aspect-ratio: 1; border-radius: 14px; border: 2px solid transparent; background: rgba(13, 26, 51, .35); padding: 3px; }
.ava-btn.on { border-color: var(--yolk); background: rgba(244, 169, 31, .15); }
.ava { width: 100%; height: 100%; display: block; }
.go { display: flex; flex-direction: column; gap: 10px; }
.join { display: flex; gap: 8px; }
.join input { flex: 1; letter-spacing: .2em; text-align: center; }
.err { color: #ffb4a8; min-height: 1.2em; margin: 0; font-size: 14px; text-align: center; }
.open-rooms h2 { font-family: var(--serif); font-size: 16px; margin: 0 0 8px; color: var(--mist); font-weight: 600; }
.open-rooms ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.room-row { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: left; background: rgba(13, 26, 51, .45); border: 1px solid rgba(238, 241, 245, .12); border-radius: 12px; padding: 10px 12px; }
.rid { font-weight: 700; color: var(--yolk); font-variant-numeric: tabular-nums; }
.rnames { font-size: 13px; color: var(--mist); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rlv { font-size: 13px; }
.lobby-foot { text-align: center; }

/* ---------- 牌桌 ---------- */
.topbar { display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 10px 4px; }
.tools { display: flex; gap: 6px; }
.levels { flex: 1; display: flex; justify-content: center; align-items: stretch; gap: 6px; }
.lvl, .now { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; padding: 2px 10px; min-width: 52px; line-height: 1.15; }
.lvl .who { font-size: 11px; color: var(--mist); }
.lvl b { font-family: var(--serif); font-size: 19px; font-weight: 900; }
.lvl em { font-style: normal; font-size: 10px; color: #ffb4a8; }
.lvl.mine b { color: var(--ally); }
.lvl.theirs b { color: var(--foe); }
.lvl.playing { background: rgba(238, 241, 245, .1); }
.now { background: var(--calico); color: var(--ink); padding: 3px 12px; }
.now span { font-size: 11px; }
.now b { font-family: var(--serif); font-size: 22px; font-weight: 900; color: var(--cinnabar); }
.ticker { text-align: center; font-size: 13px; color: var(--mist); min-height: 20px; padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker.flash { animation: tick .45s var(--ease); color: var(--calico); }
@keyframes tick { from { opacity: 0; transform: translateY(-4px); } }

.felt { position: relative; flex: 1; min-height: 220px; }
.felt.shake { animation: shake .45s; }
@keyframes shake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }
.seat { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 78px; text-align: center; z-index: 3; }
.seat.top { top: 2px; left: 50%; transform: translateX(-50%); }
.seat.left { left: 4px; top: 36%; }
.seat.right { right: 4px; top: 36%; }
.ava-wrap { position: relative; width: 50px; height: 50px; border-radius: 50%; background: rgba(13, 26, 51, .55); padding: 4px; border: 2px solid rgba(238, 241, 245, .14); }
.seat.ally .ava-wrap { border-color: rgba(244, 169, 31, .55); }
.seat.foe .ava-wrap { border-color: rgba(143, 179, 234, .5); }
.seat.turn .ava-wrap { box-shadow: 0 0 0 3px var(--yolk), 0 0 18px rgba(244, 169, 31, .6); }
.seat.off .ava-wrap, .seat.done .ava-wrap { opacity: .55; }
.ring { position: absolute; inset: -4px; width: 54px; height: 54px; transform: rotate(-90deg); pointer-events: none; }
.ring circle { fill: none; stroke: var(--calico); stroke-width: 3; stroke-dasharray: 157; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear; }
.meta { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; max-width: 100%; }
.nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tag { font-style: normal; font-size: 10px; padding: 0 4px; border-radius: 4px; background: rgba(238, 241, 245, .16); font-weight: 500; vertical-align: 1px; }
.tag.warn { background: var(--cinnabar); }
.tag.mic { background: none; }
.cnt { font-size: 12px; color: var(--mist); font-variant-numeric: tabular-nums; }
.cnt.low { color: var(--ink); background: var(--yolk); border-radius: 6px; padding: 0 6px; font-weight: 700; }
.stamp { position: absolute; top: 10px; left: 50%; transform: translateX(-50%) rotate(-12deg); font-family: var(--serif); font-weight: 900; font-size: 15px; padding: 1px 6px; border: 2px solid currentColor; border-radius: 6px; background: rgba(13, 26, 51, .7); animation: stamp .35s var(--ease) both; white-space: nowrap; }
.stamp.p0 { color: var(--yolk); } .stamp.p1 { color: var(--calico); } .stamp.p2 { color: var(--mist); } .stamp.p3 { color: #ff9a8c; }
@keyframes stamp { from { transform: translateX(-50%) rotate(-12deg) scale(2.4); opacity: 0; } }
.empty-seat { width: 50px; height: 50px; border-radius: 50%; border: 2px dashed rgba(238, 241, 245, .35); background: none; font-size: 11px; color: var(--mist); }
.empty-seat:not(:disabled):hover { border-color: var(--yolk); color: var(--yolk); }
.kick { position: absolute; top: -4px; right: 8px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(13, 26, 51, .9); font-size: 13px; line-height: 1; padding: 0; color: var(--mist); }
.bubble { position: absolute; z-index: 20; top: -6px; left: 50%; transform: translate(-50%, -100%); background: var(--calico); color: var(--ink); padding: 5px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; white-space: nowrap; animation: pop .25s var(--ease) both; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.bubble.warn { background: var(--yolk); }
.seat.top .bubble { top: auto; bottom: -8px; transform: translate(-50%, 100%); }
.seat.left .bubble { left: 0; transform: translate(0, -100%); }
.seat.right .bubble { left: auto; right: 0; transform: translate(0, -100%); }
@keyframes pop { from { opacity: 0; scale: .7; } }

.played { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 2; pointer-events: none; }
.played.top { top: 104px; left: 50%; transform: translateX(-50%); }
.played.left { left: 86px; top: 44%; align-items: flex-start; }
.played.right { right: 86px; top: 44%; align-items: flex-end; }
.played.bottom { bottom: 4px; left: 50%; transform: translateX(-50%); }
.mini-cards { display: flex; }
.mini-cards .card + .card { margin-left: -19px; }
.played.left .mini-cards .card + .card, .played.right .mini-cards .card + .card { margin-left: -23px; }
.mini-cards.old { opacity: .55; filter: saturate(.6); }
.mini-cards.fly { animation: fly .32s var(--ease) both; }
.played.top .mini-cards.fly { --fy: -40px; } .played.bottom .mini-cards.fly { --fy: 50px; }
.played.left .mini-cards.fly { --fx: -40px; } .played.right .mini-cards.fly { --fx: 40px; }
@keyframes fly { from { transform: translate(var(--fx, 0), var(--fy, 0)) scale(.8); opacity: 0; } }
.combo-name { font-size: 11px; color: var(--mist); }
.pass-word { font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--mist); padding: 10px 6px; }
.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; text-align: center; max-width: calc(100% - 180px); }
.waiting { background: rgba(13, 26, 51, .72); border: 1px solid rgba(238, 241, 245, .15); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; min-width: 190px; }
.room-code { margin: 0; color: var(--mist); font-size: 14px; }
.room-code b { font-family: var(--serif); font-size: 30px; color: var(--yolk); letter-spacing: .12em; display: block; line-height: 1.1; }
.hint-line { margin: 0; font-size: 13px; color: var(--mist); }
.tribute, .flip { background: rgba(13, 26, 51, .72); border-radius: 14px; padding: 10px 14px; font-size: 13px; }
.tribute h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 15px; color: var(--yolk); }
.tribute ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.tribute li { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.flip { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--serif); font-size: 17px; font-weight: 900; color: var(--yolk); }
.flip span { font-family: var(--sans); font-size: 13px; color: var(--calico); font-weight: 500; }
.boom { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); font-family: var(--serif); font-weight: 900; font-size: 64px; color: var(--yolk); text-shadow: 0 0 24px rgba(201, 53, 43, .9), 0 4px 0 var(--cinnabar); z-index: 30; pointer-events: none; animation: boom 1.1s var(--ease) forwards; white-space: nowrap; }
@keyframes boom { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -60%) scale(1); opacity: 0; } }

.mebar { display: flex; align-items: center; gap: 8px; padding: 2px 10px; min-height: 52px; }
.seat.me { position: relative; flex-direction: row; width: auto; gap: 6px; flex: none; }
.seat.me .ava-wrap { width: 42px; height: 42px; padding: 3px; }
.seat.me .ring { width: 46px; height: 46px; }
.seat.me .meta { align-items: flex-start; }
.seat.me .nm { max-width: 80px; }
.seat.me .stamp { left: 22px; top: 6px; }
.seat.me .bubble { left: 0; transform: translate(0, -100%); }
.actions { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; min-width: 0; }
.actions .say { font-size: 13px; color: var(--mist); order: -1; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 60px; }
.actions .say.bad { color: #ffb4a8; }
.actions .timer { font-variant-numeric: tabular-nums; color: var(--yolk); font-weight: 700; min-width: 0; }
.actions .btn { padding: 9px 16px; }
.status { font-size: 14px; color: var(--mist); display: flex; gap: 8px; align-items: baseline; padding: 6px 0; white-space: nowrap; }
.status.bad { color: #ffb4a8; }
.status .timer { color: var(--yolk); font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .seat.me .meta { display: none; }
  .actions .btn { padding: 9px 14px; }
}

.hand { position: relative; flex: none; height: 200px; margin: 0 6px max(6px, env(safe-area-inset-bottom)); touch-action: none; user-select: none; -webkit-user-select: none; }
.hand-empty { text-align: center; color: var(--mist); padding-top: 40px; margin: 0; }

/* ---------- 牌面 ---------- */
.card {
  position: absolute; background: var(--face); color: var(--ink); border-radius: calc(var(--fs, 44px) * .12);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25), -2px 0 6px rgba(0, 0, 0, .18); border: 1px solid rgba(0, 0, 0, .14);
  transition: transform .12s var(--ease); cursor: pointer; overflow: hidden;
}
.card.red { color: var(--cinnabar); }
.card .cr { position: absolute; left: 7%; top: 3%; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.card .cr b { font-family: var(--serif); font-weight: 900; font-size: calc(var(--fs, 44px) * .4); letter-spacing: -.06em; }
.card .cr i { font-style: normal; font-size: calc(var(--fs, 44px) * .3); margin-top: 1px; }
.card .pip { position: absolute; right: 8%; bottom: 4%; font-size: calc(var(--fs, 44px) * .62); line-height: 1; opacity: .9; }
.card.lv { background: linear-gradient(180deg, #fff6df, var(--face) 60%); }
.card.lv .cr b { text-decoration: underline 2px var(--yolk); text-underline-offset: 2px; }
.card.wild { background: linear-gradient(160deg, #ffe7b0, #fff3d6 55%, var(--face)); box-shadow: inset 0 0 0 2px var(--yolk), 0 1px 0 rgba(0, 0, 0, .25), -2px 0 6px rgba(0, 0, 0, .18); }
.wildtag { position: absolute; left: 50%; bottom: 8%; transform: translateX(-60%); font-family: var(--serif); font-weight: 900; font-size: calc(var(--fs, 44px) * .28); color: var(--ink); background: var(--yolk); border-radius: 4px; padding: 0 3px; }
.card.joker { display: flex; flex-direction: column; }
.card.joker .jk { position: absolute; left: 8%; top: 4%; font-family: var(--serif); font-weight: 900; font-size: calc(var(--fs, 44px) * .3); line-height: 1.05; text-align: center; }
.card.joker.big { color: var(--cinnabar); }
.card.joker.small { color: #2b3f6b; }
.card.joker .jk-star { position: absolute; right: 8%; bottom: 6%; width: 48%; height: auto; }
.card.joker.big { background: linear-gradient(170deg, #fff1df, var(--face)); }
.card.sel { transform: translateY(-14px); box-shadow: 0 0 0 2px var(--yolk), 0 6px 14px rgba(0, 0, 0, .35); }
.card.sel::after { content: ""; position: absolute; inset: 0; background: rgba(244, 169, 31, .16); }
.card.dim { filter: brightness(.55); }
.card.deal { animation: deal .35s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes deal { from { transform: translateY(-60px) rotate(-8deg); opacity: 0; } }
/* 小牌（桌面上、结算里） */
.card.sm { position: relative; display: inline-block; width: 34px; height: 48px; --fs: 34px; flex: none; cursor: default; vertical-align: middle; }
.tribute .card.sm, .flip .card.sm { width: 28px; height: 40px; --fs: 28px; }

/* ---------- 弹层 ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(5, 11, 24, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet-card { width: 100%; max-width: 460px; max-height: 86dvh; overflow-y: auto; background: var(--indigo-deep); border: 1px solid rgba(238, 241, 245, .14); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 18px 18px max(18px, env(safe-area-inset-bottom)); animation: rise .28s var(--ease) both; text-align: center; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-card { border-radius: 22px; border-bottom: 1px solid rgba(238, 241, 245, .14); } }
.sheet-card h3 { font-family: var(--serif); margin: 0 0 12px; font-size: 19px; }
.sheet-card h4 { font-family: var(--serif); margin: 18px 0 6px; font-size: 15px; color: var(--yolk); }
.opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.emotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.emotes .btn { border-radius: 12px; }
.rules-card { text-align: left; }
.rules p { font-size: 14px; line-height: 1.75; margin: 0; color: #dfe5ef; }
.rules h3 { text-align: center; }
.stats { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; margin: 8px 0 14px; }
.stats th { color: var(--mist); font-weight: 500; text-align: right; padding: 4px; }
.stats td { text-align: right; padding: 5px 4px; border-top: 1px solid rgba(238, 241, 245, .1); }
.stats th:first-child, .stats td:first-child { text-align: left; }
.result h2 { font-family: var(--serif); font-weight: 900; font-size: 26px; margin: 2px 0 6px; }
.result.won h2 { color: var(--yolk); }
.result.match.won h2 { font-size: 30px; }
.result .sub { margin: 0 0 12px; color: var(--mist); font-size: 14px; line-height: 1.5; }
.order { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.order li { display: grid; grid-template-columns: 52px 34px 1fr auto; align-items: center; gap: 8px; text-align: left; background: rgba(13, 26, 51, .55); border-radius: 12px; padding: 6px 10px; border-left: 3px solid var(--foe); }
.order li.ally { border-left-color: var(--ally); }
.order .ava { width: 34px; height: 34px; }
.order .pl { font-family: var(--serif); font-weight: 900; font-size: 15px; }
.order .pl.p0 { color: var(--yolk); } .order .pl.p3 { color: #ff9a8c; }
.order .left { font-size: 12px; color: var(--mist); }
.score { display: flex; justify-content: center; gap: 20px; margin-bottom: 14px; font-size: 14px; color: var(--mist); }
.score b { font-family: var(--serif); font-size: 22px; color: var(--calico); margin-left: 4px; }
#nextIn { min-height: 1.2em; margin: 8px 0 0; }

.toast { position: fixed; left: 50%; top: 64px; transform: translate(-50%, -12px); z-index: 60; background: var(--calico); color: var(--ink); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); max-width: calc(100% - 32px); text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #ffd2c9; }

/* 宽屏：牌桌留出更多空间 */
@media (min-width: 900px) {
  .seat { width: 110px; }
  .seat.left { left: 6%; } .seat.right { right: 6%; }
  .played.left { left: calc(6% + 120px); } .played.right { right: calc(6% + 120px); }
  .played.top { top: 96px; }
  .card.sm { width: 46px; height: 64px; --fs: 46px; }
  .mini-cards .card + .card { margin-left: -24px; }
  .played.left .mini-cards .card + .card, .played.right .mini-cards .card + .card { margin-left: -26px; }
  .hand { max-width: 1100px; width: calc(100% - 12px); margin-left: auto; margin-right: auto; }
  .mebar { max-width: 1100px; width: 100%; margin: 0 auto; }
}
/* 记牌器 */
.tracker { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 2px 10px 0; font-size: 12px; flex-wrap: wrap; }
.tk-lbl { color: var(--mist); }
.tk { display: inline-flex; align-items: baseline; gap: 3px; background: rgba(13, 26, 51, .5); border: 1px solid rgba(238, 241, 245, .1); border-radius: 8px; padding: 1px 7px; }
.tk i { font-style: normal; color: var(--mist); }
.tk b { font-family: var(--serif); font-size: 14px; color: var(--calico); font-variant-numeric: tabular-nums; }
.tk.zero { opacity: .45; }
.tk.zero b { text-decoration: line-through; }
/* 理牌 */
.arrange { position: absolute; left: 8px; bottom: 6px; display: flex; gap: 6px; z-index: 5; }
.chip { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(244, 169, 31, .6); background: rgba(13, 26, 51, .7); color: var(--yolk); }
.chip.ghost { border-color: rgba(238, 241, 245, .25); color: var(--mist); }
/* 扔东西 */
.seat:not(.me) .ava-wrap[data-throw] { cursor: pointer; }
.throws { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.throws .btn { border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; }
.throws .ti { font-size: 28px; line-height: 1; }
.flying { position: fixed; z-index: 70; font-size: 30px; line-height: 1; margin: -15px 0 0 -15px; pointer-events: none; transition: transform .6s cubic-bezier(.3, .1, .5, 1); }
.hit { position: absolute; inset: -6px; z-index: 6; pointer-events: none; display: grid; place-items: center; animation: hit 1.8s ease-out forwards; }
.hit .splat { width: 100%; height: 100%; }
.hit span { font-size: 30px; animation: float-up 1.8s ease-out forwards; }
@keyframes hit { 0% { transform: scale(.3); opacity: 0; } 12% { transform: scale(1.1); opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(6px); } }
@keyframes float-up { to { transform: translateY(-30px); } }
.seat.hit-shake { animation: hshake .4s; }
.seat.top.hit-shake, .seat.left.hit-shake, .seat.right.hit-shake { animation-name: hshake-abs; }
@keyframes hshake { 30% { translate: -4px 0; } 60% { translate: 4px 0; } }
@keyframes hshake-abs { 30% { translate: -4px 0; } 60% { translate: 4px 0; } }
/* 蛋碎了 */
.smash { position: absolute; left: 50%; top: 50%; z-index: 8; pointer-events: none; }
.smash span { display: block; transform: translate(-50%, -50%); font-family: var(--serif); font-weight: 900; font-size: 22px; color: var(--yolk); white-space: nowrap; text-shadow: 0 2px 0 var(--cinnabar), 0 0 14px rgba(0, 0, 0, .6); animation: smash 2.2s var(--ease) forwards; }
@keyframes smash { 0% { transform: translate(-50%, -50%) scale(2.6); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -110%); opacity: 0; } }
/* 今晚之最 */
.honors { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.honors li { display: grid; grid-template-columns: 76px 1fr auto; gap: 8px; align-items: baseline; font-size: 13px; padding: 5px 10px; background: rgba(13, 26, 51, .45); border-radius: 10px; }
.honors b { font-family: var(--serif); color: var(--yolk); }
.honors span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.honors em { font-style: normal; color: var(--mist); font-variant-numeric: tabular-nums; }
.honors.compact { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ================= 账号 / 大厅 ================= */
.login-card { gap: 10px; }
.login-card .field + .field { margin-top: 2px; }
.switch { margin: 2px 0 0; text-align: center; font-size: 14px; color: var(--mist); }
.switch .link { padding: 4px 6px; color: var(--yolk); }
.me-bar { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.me-card { display: flex; align-items: center; gap: 10px; background: rgba(13, 26, 51, .45); border: 1px solid rgba(238, 241, 245, .14); border-radius: 999px; padding: 4px 16px 4px 4px; color: inherit; text-align: left; }
.me-card .ava-wrap { width: 46px; height: 46px; padding: 3px; }
.me-txt b { display: block; font-size: 16px; }
.me-txt small { font-size: 12px; color: var(--mist); }
.coins { display: flex; align-items: center; gap: 4px; background: rgba(244, 169, 31, .14); border: 1px solid rgba(244, 169, 31, .5); border-radius: 999px; padding: 6px 14px 6px 10px; color: var(--yolk); font-weight: 700; font-variant-numeric: tabular-nums; }
.coins i { font-style: normal; }
.daily-line { margin: -10px 0 0; min-height: 1.2em; font-size: 13px; color: var(--mist); text-align: center; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode { position: relative; text-align: left; border-radius: 18px; padding: 14px 14px 12px; min-height: 92px; border: 1px solid rgba(238, 241, 245, .14); color: var(--calico); display: flex; flex-direction: column; gap: 4px; justify-content: flex-end; overflow: hidden; transition: transform .12s var(--ease); }
.mode:active { transform: scale(.97); }
.mode b { font-family: var(--serif); font-size: 22px; font-weight: 900; }
.mode small { font-size: 12px; opacity: .85; line-height: 1.3; }
.mode .mi { position: absolute; right: 10px; top: 8px; font-size: 26px; font-style: normal; opacity: .9; }
.mode.rank { background: linear-gradient(135deg, #7a2d1f, #c9352b); }
.mode.casual { background: linear-gradient(135deg, #1f5a46, #2f8a68); }
.mode.blood { background: linear-gradient(135deg, #3a2255, #7a3a8f); }
.mode.daily { background: linear-gradient(135deg, #8a5a12, #d99a1f); }
.mode.daily.done { filter: saturate(.4); opacity: .75; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lobby-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.lobby-nav button { position: relative; background: rgba(13, 26, 51, .45); border: 1px solid rgba(238, 241, 245, .12); border-radius: 14px; padding: 8px 4px; color: var(--calico); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lobby-nav i { font-style: normal; font-size: 20px; }
.lobby-nav .dot { position: absolute; top: 6px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--cinnabar); }
.mode-tag { font-size: 11px; color: var(--mist); position: absolute; left: 52px; top: 50%; transform: translateY(-50%); background: rgba(13, 26, 51, .5); padding: 2px 7px; border-radius: 6px; }
.topbar { position: relative; }
.tag.tier { background: rgba(0, 0, 0, .3); font-weight: 700; }

/* 匹配中 */
.matching { position: fixed; inset: 0; z-index: 60; background: rgba(5, 11, 24, .7); display: grid; place-items: center; padding: 20px; }
.match-card { background: var(--indigo-deep); border: 1px solid rgba(238, 241, 245, .14); border-radius: 22px; padding: 26px 22px 20px; text-align: center; width: min(340px, 100%); }
.match-card h2 { font-family: var(--serif); margin: 10px 0 4px; font-size: 22px; }
.match-card p { margin: 0 0 14px; color: var(--mist); font-size: 14px; }
.match-spin { display: flex; justify-content: center; gap: 8px; }
.match-spin span { width: 12px; height: 12px; border-radius: 50%; background: var(--yolk); animation: bounce 1.2s infinite; }
.match-spin span:nth-child(2) { animation-delay: .15s; } .match-spin span:nth-child(3) { animation-delay: .3s; } .match-spin span:nth-child(4) { animation-delay: .45s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-10px); opacity: 1; } }
.match-seats { display: flex; justify-content: center; gap: 10px; margin-bottom: 18px; }
.ms { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed rgba(238, 241, 245, .3); color: var(--mist); font-weight: 700; }
.ms.on { border-style: solid; border-color: var(--yolk); background: rgba(244, 169, 31, .18); color: var(--yolk); }

/* 头像框 */
.ava-wrap.frame_bamboo { border: 3px solid #7a9a3a; box-shadow: inset 0 0 0 2px #c8b96a; }
.ava-wrap.frame_gold { border: 3px solid var(--yolk); box-shadow: 0 0 10px rgba(244, 169, 31, .55); }
.ava-wrap.frame_peony { border: 3px solid #e0569a; box-shadow: 0 0 0 2px #f8b6d2, 0 0 12px rgba(224, 86, 154, .5); }
.ava-wrap.frame_dragon { border: 3px solid #f4a91f; box-shadow: 0 0 0 2px #c9352b, 0 0 14px rgba(201, 53, 43, .7); background: radial-gradient(circle, #3a1d10, #16294c); }

/* 结算里的奖励 */
.rewards { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 14px; }
.rw { font-size: 13px; padding: 5px 10px; border-radius: 999px; background: rgba(13, 26, 51, .6); border: 1px solid rgba(238, 241, 245, .14); }
.rw i { font-style: normal; opacity: .8; }
.rw.coin { color: var(--yolk); border-color: rgba(244, 169, 31, .5); font-weight: 700; }
.rw.star.up { color: #5fe09a; } .rw.star.down { color: #ff9a8c; }
.rw.tierup { background: var(--yolk); color: var(--ink); font-weight: 700; }
.rw.chest { background: linear-gradient(135deg, #8a5a12, #d99a1f); color: #fff; font-weight: 700; border: 0; cursor: pointer; animation: pop .3s var(--ease); }
.chest-got { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 54px; margin: 6px 0 16px; }
.chest-got b { font-family: var(--serif); font-size: 24px; } .chest-got span { font-size: 13px; color: var(--mist); }
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 10px 0; }
.sd { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 10px; background: rgba(13, 26, 51, .5); border: 1px solid rgba(238, 241, 245, .1); font-size: 12px; }
.sd i { font-style: normal; color: var(--mist); } .sd b { color: var(--yolk); }
.sd.got { background: rgba(244, 169, 31, .18); } .sd.now { border-color: var(--yolk); }
.big-coin { font-family: var(--serif); font-size: 30px; font-weight: 900; color: var(--yolk); margin: 6px 0 14px; }

/* 任务 */
.tasks { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.tasks li { display: grid; grid-template-columns: 1fr auto auto 64px; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(13, 26, 51, .5); font-size: 14px; }
.tasks li.done { border: 1px solid rgba(244, 169, 31, .45); }
.tasks li.claimed { opacity: .5; }
.tasks .tp { font-variant-numeric: tabular-nums; color: var(--mist); } .tasks .tc { color: var(--yolk); font-size: 13px; }
.tasks i { font-style: normal; font-size: 12px; color: var(--mist); text-align: right; }
.chests { display: flex; gap: 14px; justify-content: center; margin: 8px 0 12px; }
.cb { display: flex; flex-direction: column; align-items: center; font-size: 34px; opacity: .4; }
.cb.ready { opacity: 1; animation: wiggle 1.4s infinite; } .cb.opened { opacity: .6; animation: none; filter: grayscale(1); }
.cb small { font-size: 12px; color: var(--mist); }
@keyframes wiggle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* 商店 */
.shop-head { display: flex; justify-content: space-between; align-items: baseline; }
.coins-inline { color: var(--yolk); font-weight: 700; }
.cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.cat { flex: none; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(238, 241, 245, .2); background: none; color: var(--mist); }
.cat.on { background: var(--yolk); color: var(--ink); border-color: var(--yolk); font-weight: 700; }
.goods { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.goods li { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(13, 26, 51, .5); border: 1px solid transparent; }
.goods li.on { border-color: rgba(244, 169, 31, .5); }
.goods .gi { font-size: 26px; text-align: center; }
.goods .gt b { display: block; font-size: 15px; } .goods .gt small { display: block; font-size: 12px; color: var(--mist); }
.goods .cash { display: block; font-style: normal; font-size: 11px; color: rgba(238, 241, 245, .45); }
.goods .gb { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.goods .using { font-style: normal; font-size: 12px; color: var(--yolk); }
.goods .have { font-size: 11px; color: var(--mist); }

/* 徽章 */
.badges, .treasures { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; text-align: left; }
.badges li, .treasures li { display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; gap: 0 8px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(13, 26, 51, .5); }
.badges li:not(.got) { opacity: .4; filter: grayscale(1); }
.badges .bi, .treasures .bi { grid-row: span 2; font-size: 24px; text-align: center; }
.badges b, .treasures b { font-size: 13px; } .badges small, .treasures small { font-size: 11px; color: var(--mist); }
.medals { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.medals li { padding: 4px 10px; border-radius: 999px; background: rgba(244, 169, 31, .18); font-size: 13px; }

/* 排行 / 资料 */
.board { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.board li { display: grid; grid-template-columns: 26px 36px 1fr auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 10px; background: rgba(13, 26, 51, .5); font-size: 14px; }
.board li.me { border: 1px solid rgba(244, 169, 31, .5); }
.board .rk { font-family: var(--serif); font-weight: 900; color: var(--mist); text-align: center; }
.board .ava-wrap { width: 36px; height: 36px; padding: 2px; }
.board .tl { font-size: 12px; }
.prof-head { display: flex; gap: 12px; align-items: center; text-align: left; margin-bottom: 8px; }
.prof-head .ava-wrap { width: 64px; height: 64px; }
.prof-head h3 { margin: 0; } .prof-head p { margin: 2px 0 0; font-size: 14px; }
.tier-bar { height: 8px; border-radius: 4px; background: rgba(238, 241, 245, .12); overflow: hidden; }
.tier-bar span { display: block; height: 100%; background: var(--yolk); border-radius: 4px; }
.kv2 { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kv2 li { background: rgba(13, 26, 51, .5); border-radius: 10px; padding: 8px 4px; }
.kv2 b { display: block; font-family: var(--serif); font-size: 20px; } .kv2 span { font-size: 12px; color: var(--mist); }
.ledger { list-style: none; padding: 0; margin: 0; text-align: left; }
.ledger li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid rgba(238, 241, 245, .08); font-size: 14px; }
.ledger b.up { color: #5fe09a; } .ledger b.down { color: #ff9a8c; } .ledger small { grid-column: span 2; font-size: 11px; color: var(--mist); }
.hit.gold .goldburst, .hit.fire .fireburst { font-size: 44px; animation: burst 1.6s ease-out forwards; }
@keyframes burst { 0% { transform: scale(.3); opacity: 0; } 20% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(1) translateY(-20px); opacity: 0; } }

/* ================= 桌布（商店里买的） ================= */
html[data-cloth="felt"] { --indigo: #2a5a3e; --indigo-deep: #1b3b2a; --indigo-dark: #10241a; --mist: #b9c9b0; --foe: #a9d0b8; }
html[data-cloth="lacquer"] { --indigo: #8a2a1e; --indigo-deep: #5e1b13; --indigo-dark: #3a100b; --mist: #e0b9ad; --foe: #f4c7a0; --calico: #fbefe2; }
html[data-cloth="ink"] { --indigo: #d9d2c0; --indigo-deep: #c9c0a8; --indigo-dark: #a8a08a; --calico: #2b2620; --mist: #6b6355; --foe: #4b6a8a; --ally: #a8431f; --yolk: #c98309; --ink: #fbf5e6; }
html[data-cloth="ink"] .calico-bg { display: none; }
html[data-cloth="ink"] body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(60% 30% at 20% 80%, rgba(43, 38, 32, .18), transparent 70%), radial-gradient(40% 20% at 75% 70%, rgba(43, 38, 32, .14), transparent 70%); }
html[data-cloth="ink"] .btn.yolk { color: #fbf5e6; }
html[data-cloth="ink"] .card { color: #1f1a17; } html[data-cloth="ink"] .card.red { color: #c9352b; }
html[data-cloth="ink"] .now { background: #2b2620; color: #fbf5e6; }
html[data-cloth="night"] { --indigo: #141a3a; --indigo-deep: #0b1026; --indigo-dark: #050814; }
html[data-cloth="night"] .calico-bg { opacity: .5; }
html[data-cloth="night"] body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 60% 20%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 80% 60%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 35% 75%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 50% 50%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 10% 90%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 90% 15%, #fff 50%, transparent 51%); animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .35; } }
html[data-cloth="ink"] .tk, html[data-cloth="ink"] .mode-tag, html[data-cloth="ink"] .icon, html[data-cloth="ink"] .chip, html[data-cloth="ink"] .ava-wrap, html[data-cloth="ink"] .waiting, html[data-cloth="ink"] .tribute, html[data-cloth="ink"] .flip, html[data-cloth="ink"] .btn:not(.yolk), html[data-cloth="ink"] .tag { background: rgba(43, 38, 32, .08); border-color: rgba(43, 38, 32, .25); color: var(--calico); }
html[data-cloth="ink"] .tk b { color: #2b2620; }
html[data-cloth="ink"] .tag.warn { background: var(--cinnabar); color: #fff; }
html[data-cloth="ink"] .status { color: #4b4338; }
html[data-cloth="ink"] .sheet-card, html[data-cloth="ink"] .match-card { background: #f3ecdc; color: #2b2620; border-color: rgba(43, 38, 32, .2); }
html[data-cloth="ink"] .sheet-card .btn:not(.yolk) { color: #2b2620; }
html[data-cloth="ink"] .toast { background: #2b2620; color: #fbf5e6; }

/* ================= 6 人桌：右下、右上、上、左上、左下 ================= */
.seats { display: contents; }
.felt.six .seat { width: 70px; }
.felt.six .ava-wrap { width: 44px; height: 44px; }
.felt.six .ring { width: 48px; height: 48px; }
.seat.rt { right: 4px; top: 16%; } .seat.rb { right: 4px; top: 54%; }
.seat.lt { left: 4px; top: 16%; }  .seat.lb { left: 4px; top: 54%; }
.seat.lt .bubble, .seat.lb .bubble { left: 0; transform: translate(0, -100%); }
.seat.rt .bubble, .seat.rb .bubble { left: auto; right: 0; transform: translate(0, -100%); }
.felt.six .played.top { top: 92px; }
.played.rt { right: 78px; top: 19%; align-items: flex-end; } .played.rb { right: 78px; top: 57%; align-items: flex-end; }
.played.lt { left: 78px; top: 19%; align-items: flex-start; } .played.lb { left: 78px; top: 57%; align-items: flex-start; }
.played.lt .mini-cards.fly, .played.lb .mini-cards.fly { --fx: -40px; }
.played.rt .mini-cards.fly, .played.rb .mini-cards.fly { --fx: 40px; }
/* 6 个人出的牌挤，牌面小一号、叠得更紧 */
.felt.six .mini-cards .card.sm { width: 28px; height: 40px; --fs: 28px; }
.felt.six .mini-cards .card + .card { margin-left: -17px; }
.felt.six .combo-name { font-size: 10px; }
.felt.six .pass-word { font-size: 14px; padding: 6px 4px; }
.seat.rt.hit-shake, .seat.rb.hit-shake, .seat.lt.hit-shake, .seat.lb.hit-shake { animation-name: hshake-abs; }
.felt.six .center { max-width: calc(100% - 170px); }
.felt.six .stamp { font-size: 13px; top: 8px; }
@media (min-width: 900px) {
  .felt.six .seat { width: 100px; }
  .felt.six .ava-wrap { width: 50px; height: 50px; }
  .seat.rt { right: 8%; top: 10%; } .seat.rb { right: 8%; top: 52%; }
  .seat.lt { left: 8%; top: 10%; }  .seat.lb { left: 8%; top: 52%; }
  .played.rt { right: calc(8% + 108px); top: 13%; } .played.rb { right: calc(8% + 108px); top: 55%; }
  .played.lt { left: calc(8% + 108px); top: 13%; }  .played.lb { left: calc(8% + 108px); top: 55%; }
  .felt.six .mini-cards .card.sm { width: 38px; height: 54px; --fs: 38px; }
  .felt.six .mini-cards .card + .card { margin-left: -22px; }
  .felt.six .played.top { top: 100px; }
}
/* 选人数 */
.players-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp { text-align: left; border-radius: 16px; padding: 16px 14px; border: 1px solid rgba(238, 241, 245, .2); background: rgba(13, 26, 51, .5); color: var(--calico); display: flex; flex-direction: column; gap: 4px; }
.pp b { font-family: var(--serif); font-size: 24px; font-weight: 900; color: var(--yolk); }
.pp small { font-size: 12px; color: var(--mist); line-height: 1.4; }
@media (max-width: 520px) {
  .mode-tag { left: 8px; top: auto; bottom: -16px; transform: none; font-size: 10px; padding: 1px 6px; z-index: 5; }
}
.felt.six .center { top: 56%; }
.felt.six .waiting { padding: 10px 12px; gap: 8px; min-width: 170px; }
.felt.six .room-code b { font-size: 26px; }

/* ================= 新手教程 ================= */
#tutorial { overflow-y: auto; }
.tut { width: 100%; max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: max(10px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)); gap: 12px; }
.tut-top { display: grid; grid-template-columns: 38px auto 1fr auto; align-items: center; gap: 10px; }
.tut-top b { font-family: var(--serif); font-size: 20px; }
.tut-step { font-size: 12px; color: var(--mist); font-variant-numeric: tabular-nums; }
.tut-lv { font-size: 12px; color: var(--mist); background: rgba(13, 26, 51, .5); padding: 3px 10px; border-radius: 8px; }
.tut-lv b { font-family: var(--serif); color: var(--cinnabar); font-size: 16px; }
.tut-felt { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; min-height: 260px; }
.tut-table { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 18px; border-radius: 16px; background: rgba(13, 26, 51, .45); border: 1px dashed rgba(238, 241, 245, .2); }
.tut-table.empty { color: var(--mist); font-size: 14px; }
.tut-table .who { font-size: 12px; color: var(--mist); }
.tut-table .card.sm { width: 40px; height: 56px; --fs: 40px; }
.tut-table .mini-cards .card + .card { margin-left: -20px; }
.tut-say { margin: 0; font-size: 16px; line-height: 1.7; max-width: 30em; }
.tut-say b { color: var(--yolk); }
.tut-say b.ok { color: #5fe09a; }
.tut-msg { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--mist); }
.tut-msg.bad { color: #ffb4a8; }
.tut-hand { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 14px 0 4px; }
.tut-hand .card { position: relative; width: 56px; height: 80px; flex: none; }
.tut-hand .card.gone { opacity: 0; transform: translateY(-40px) scale(.8); transition: all .35s var(--ease); }
.tut-actions { display: flex; justify-content: center; gap: 10px; }
.tut-actions .btn { min-width: 92px; padding: 11px 18px; }
.tut-page { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.tut-icon { font-size: 64px; }
.tut-page p { font-size: 17px; line-height: 1.8; max-width: 26em; margin: 0; }
.tut-page b { color: var(--yolk); }
.levels-pick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.lp { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; gap: 0 10px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(238, 241, 245, .18); background: rgba(13, 26, 51, .5); color: var(--calico); }
.lp span { grid-row: span 2; font-size: 30px; }
.lp b { font-family: var(--serif); font-size: 18px; }
.lp small { font-size: 12px; color: var(--mist); }
/* 对局小提示 */
.coach { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(clamp(170px, 30dvh, 300px) + 70px); z-index: 40; width: min(420px, calc(100% - 24px)); display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--calico); color: var(--ink); font-size: 14px; line-height: 1.5; box-shadow: 0 10px 26px rgba(0, 0, 0, .4); animation: pop .3s var(--ease); cursor: pointer; }
.coach::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: var(--calico); transform: translateX(-50%) rotate(45deg); }
.coach-i { flex: none; }
.coach-x { flex: none; margin-left: auto; border: 0; background: var(--yolk); color: var(--ink); font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
#table { position: relative; }

/* ---------- 牌局通行证：登录入口、大厅账号条 ---------- */
.pp-box { gap: 12px; }
.pp-small { margin: 0; text-align: center; font-size: 13px; color: var(--mist); line-height: 1.5; }
.pp-box .link { align-self: center; color: var(--yolk); }
/* 邮箱找回后设新密码 */
.pass-form { display: flex; flex-direction: column; gap: 10px; text-align: left; margin-top: 4px; }
.acct-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 0; }
.acct-row:empty, .acct-row:has(#acctSlot:empty):has(.acct-note:empty) { display: none; }
.acct-note { flex: 1; font-size: 13px; color: var(--mist); }
.acct-row .acct-chip { border-color: rgba(244, 169, 31, .55); background: rgba(244, 169, 31, .1); color: var(--yolk); }
.acct-row .acct-chip.in { border-color: rgba(120, 200, 150, .45); background: rgba(47, 138, 91, .14); color: var(--calico); }
