/* 牌桌：玩家和观众共用 */

.play { height: 100dvh; display: grid; grid-template: auto minmax(0, 1fr) auto / minmax(0, 1fr) 316px; grid-template-areas: "head head" "stage side" "acts side"; background: var(--mint-2); }
.play.watching { grid-template-rows: auto minmax(0, 1fr) auto; }
.play.watching .acts { min-height: 72px; }
.play-head { grid-area: head; background: var(--ink); color: var(--mint-1); display: flex; align-items: center; gap: 16px; padding: 7px var(--gutter); min-height: 56px; }
.play-head .lid { width: 40px; height: 40px; }
.play-head .title { font: 400 25px/1 var(--display); color: var(--yolk); white-space: nowrap; }
.play-head .facts-line { display: flex; gap: 16px; white-space: nowrap; overflow: hidden; }
.play-head .facts-line span b { color: var(--paper); }
.play-head .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.play-head .btn { background: transparent; border-color: oklch(1 0 0 / 0.35); color: var(--mint-1); }
@media (hover: hover) { .play-head .btn:hover { background: oklch(1 0 0 / 0.12); } }
.play-head :focus-visible { outline-color: var(--yolk); }
.lat { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; white-space: nowrap; background: none; border: 0; color: inherit; cursor: pointer; padding: 6px 8px; border-radius: 8px; font-weight: 600; }
@media (hover: hover) { .lat:hover { background: oklch(1 0 0 / 0.1); } }
.lat.bad { color: var(--yolk); }

.stage { grid-area: stage; position: relative; container-type: size; overflow: hidden; min-height: 0; }
.stage > * { --card: clamp(36px, min(12.4cqw, 11cqh), 66px); --plate: clamp(94px, 27.5cqw, 150px); }
.stage.wide > * { --card: clamp(34px, min(7.2cqw, 13cqh), 104px); --plate: clamp(92px, 16.2cqw, 184px); }
.tray { position: absolute; inset: 9% 5.5% 10.5%; border-radius: clamp(26px, 8cqh, 58px); background: var(--jade); border: 3px solid var(--ink); }
.tray::before { content: ""; position: absolute; inset: 6px; border: 4px solid var(--yolk); border-radius: clamp(20px, calc(8cqh - 7px), 51px); }
.tray::after { content: ""; position: absolute; inset: 15px; border: 1.5px solid var(--ink); border-radius: clamp(14px, calc(8cqh - 16px), 42px); }
.watermark { position: absolute; left: 50%; top: 50%; width: min(78cqh, 58cqw); height: min(78cqh, 58cqw); transform: translate(-50%, -50%); stroke: var(--jade-deep); pointer-events: none; }
.landmark { position: absolute; left: 50%; top: 64%; width: clamp(48px, 15.5cqh, 112px); height: clamp(48px, 15.5cqh, 112px); transform: translate(-50%, -50%); stroke: var(--jade-deep); pointer-events: none; }
.play.opening .watermark { view-transition-name: lid; }
/* 罐身小字：印在台面下沿两角 */
.print { position: absolute; bottom: 24px; color: var(--paper); font-size: clamp(11.5px, 1.3cqw, 14px); line-height: 1.45; font-weight: 600; }
.print.l { left: 40px; } .print.r { right: 40px; text-align: right; }
.stage:not(.wide) .print { bottom: 18px; } .stage:not(.wide) .print.l { left: 30px; } .stage:not(.wide) .print.r { right: 30px; }

.center { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; width: max-content; }
.potline { display: flex; align-items: center; gap: 8px; color: var(--paper); font-weight: 600; min-height: 30px; }
.potline .n { font-size: clamp(19px, 3cqw, 27px); line-height: 1; font-weight: 800; }
.potline .chip { width: 22px; height: 22px; }
.streetname { font-weight: 800; color: var(--paper); margin-right: 4px; }
.board { display: flex; gap: clamp(4px, 0.8cqw, 9px); }
.slot { width: var(--card); aspect-ratio: 5 / 7; border: 1.5px dashed var(--mint-3); border-radius: calc(var(--card) * 0.13); opacity: 0.65; }
.said { min-height: 28px; display: grid; place-items: center; color: var(--paper); font-weight: 700; font-size: clamp(14px, 1.8cqw, 17px); text-align: center; max-width: 62cqw; }


/* ---- 牌 ---- */
.card { width: var(--w, var(--card)); aspect-ratio: 5 / 7; border-radius: calc(var(--w, var(--card)) * 0.13); background: var(--paper); border: 1.5px solid var(--ink); position: relative; color: var(--ink); flex: none; font-size: var(--w, var(--card)); line-height: 1; overflow: hidden; }
.card.red { color: var(--red); }
.card .rk { position: absolute; left: 0.09em; top: 0.07em; font-size: 0.44em; font-weight: 800; letter-spacing: -0.02em; }
.card .sm { position: absolute; left: 0.11em; top: 0.55em; width: 0.24em; height: 0.24em; }
.card .lg { position: absolute; right: 0.08em; bottom: 0.09em; width: 0.56em; height: 0.56em; }
.card.back { background: var(--jade-deep); }
.card.back svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.card.deal { animation: deal 0.42s var(--ease) backwards; animation-delay: var(--d, 0s); }
.card.flip { animation: flip 0.45s var(--ease) backwards; animation-delay: var(--d, 0s); }
.card.dim { filter: saturate(0.4) brightness(0.86); }
.seat.folded.mine:not(.shown) .card.dim { filter: saturate(0.2) brightness(0.72); }
.card.hit { outline: 3px solid var(--yolk); outline-offset: 1px; }
@keyframes deal { from { opacity: 0; transform: translate(var(--fx, 0), var(--fy, -60px)) rotate(-14deg) scale(0.8); } }
@keyframes flip { from { transform: rotateY(88deg); } }

/* ---- 座位 ---- */
.seat { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, var(--ty, -50%)); width: var(--plate); transition: opacity 0.25s; }
/* 牌悬在名牌外面，不占位置：发牌、亮牌、弃牌都不会让名牌挪动 */
.seat-cards { position: absolute; left: 0; right: 0; bottom: calc(100% - 12px); display: flex; gap: 3px; align-items: flex-end; justify-content: center; --w: calc(var(--card) * 0.62); }
.seat.top .seat-cards { bottom: auto; top: calc(100% - 12px); align-items: flex-start; }
.seat.open .seat-cards { --w: calc(var(--card) * 0.8); z-index: 2; bottom: calc(100% - 5px); }
.seat.open.top .seat-cards { bottom: auto; top: calc(100% - 5px); }
.seat.mine .seat-cards { --w: calc(var(--card) * 1.18); gap: 6px; bottom: calc(100% - 10px); }
.seat.mine .seat-cards .card { transition: transform 0.2s var(--ease); }
.seat.mine .plate { z-index: 3; }
.plate { position: relative; z-index: 1; width: 100%; background: var(--paper); border: 2px solid var(--ink); border-radius: 11px; padding: 4px 9px 6px; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; align-items: center; line-height: 1.3; grid-template-rows: 21px 23px; }
.plate .name { grid-column: 1 / -1; font-weight: 700; white-space: nowrap; font-size: clamp(12px, 1.6cqw, 16px); display: flex; gap: 4px; align-items: center; min-width: 0; min-height: 21px; }
.plate .name > span:not(.mark) { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.plate .name .icon { width: 15px; height: 15px; }
.plate .money { font-weight: 800; font-size: clamp(14px, 1.8cqw, 18px); text-align: right; grid-column: 2; grid-row: 2; min-height: 1.35em; }
.print.hid { visibility: hidden; }
.plate .note { grid-column: 1; grid-row: 2; font-size: clamp(11.5px, 1.4cqw, 13.5px); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.plate .note.raise { color: var(--ink); }
.plate .note.allin { color: var(--red-2); font-weight: 800; }
.plate .note.win { color: var(--jade-deep); font-weight: 800; }
.plate .note.show { color: var(--ink); font-weight: 800; }
.plate .time { position: absolute; left: 8px; right: 8px; bottom: 2px; height: 3px; border-radius: 2px; overflow: hidden; opacity: 0; background: oklch(0.31 0.055 168 / 0.25); }
.plate .time i { display: block; height: 100%; background: var(--ink); transform-origin: left; }
.seat.acting .plate { background: var(--yolk); }
.seat.acting .plate .note { color: var(--ink); }
.seat.acting .plate .time { opacity: 1; }
.seat.acting.late .plate .time i { background: var(--red); }
.stage.has-actor .seat:not(.acting) .plate { background: var(--mint-3); }
.stage.has-actor .seat:not(.acting) .plate .note { color: var(--ink); }
.stage.has-actor .seat:not(.acting) .plate .note.allin { color: var(--red-2); }
.seat.folded .plate, .stage.has-actor .seat.folded:not(.acting) .plate { background: var(--mint-2); color: var(--ink-2); border-color: var(--ink-2); }
.seat.out .plate, .stage.has-actor .seat.out .plate { background: var(--mint-2); color: var(--ink-2); border-color: var(--ink-2); border-style: dashed; }
.seat.out .plate .name, .seat.out .plate .note { color: var(--ink-2); }
.seat.folded .seat-cards { opacity: 0; }
.seat.folded.mine .seat-cards, .seat.folded.open .seat-cards { opacity: 1; }   /* 弃了的牌自己还看得到（压暗），打完才好决定亮不亮 */
.seat.allin .plate { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.seat.winner .plate, .stage.has-actor .seat.winner:not(.acting) .plate { background: var(--paper); border-color: var(--jade-deep); box-shadow: inset 0 0 0 2px var(--jade-deep); }
.marks { display: flex; gap: 3px; margin-left: auto; flex: none; }
.mark { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); font: 800 11px/1 var(--text); color: var(--ink); }
.mark.dealer { background: var(--ink); color: var(--mint-0); }
.plate .off { flex: none; display: grid; place-items: center; color: var(--red-2); }
.bet { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: inline-flex; gap: 5px; align-items: center; background: var(--ink); color: var(--paper); border-radius: 99px; padding: 2px 11px 2px 3px; font-weight: 800; font-size: clamp(13px, 1.7cqw, 16px); white-space: nowrap; z-index: 2; }
.bet .chip { width: 21px; height: 21px; }
.bet.in { animation: bet-in 0.3s var(--ease); }
.bet.collect { transition: left 0.38s var(--ease), top 0.38s var(--ease), opacity 0.3s 0.1s; left: 50%; top: 36%; opacity: 0; }
@keyframes bet-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } }
.handname { position: absolute; left: 50%; bottom: calc(100% + var(--card) * 1.12 + 1px); transform: translate(-50%, 0); background: var(--ink); color: var(--yolk); font-weight: 700; font-size: 13px; padding: 1px 9px; border-radius: 99px; white-space: nowrap; z-index: 5; }
.seat.mine .handname { bottom: calc(100% + var(--card) * 1.66 - 2px); }
.seat.top .handname { bottom: auto; top: calc(100% + var(--card) * 1.12 + 1px); }

/* 弹幕 */
.danmaku { position: absolute; inset: 0 0 auto; height: 34%; overflow: hidden; pointer-events: none; z-index: 6; }
.danmaku p { position: absolute; left: 100%; white-space: nowrap; font-weight: 700; font-size: 17px; background: oklch(0.31 0.055 168 / 0.86); color: var(--paper); border-radius: 99px; padding: 3px 14px; animation: fly var(--t, 9s) linear forwards; }
.danmaku p.me { background: var(--yolk); color: var(--ink); border: 2px solid var(--ink); }
@keyframes fly { to { transform: translateX(calc(-100cqw - 110%)); } }

/* ---- 操作区 ---- */
.acts { grid-area: acts; container-type: inline-size; position: relative; background: var(--mint-1); border-top: 2px solid var(--ink); padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); min-height: 108px; display: grid; align-items: center; }
.acts.on { background: var(--yolk); }
.acts .clock { position: absolute; left: 0; right: 0; top: 0; height: 6px; background: oklch(0.31 0.055 168 / 0.2); }
.acts .clock i { display: block; height: 100%; background: var(--ink); transform-origin: left; }
.acts.late .clock i { background: var(--red); }
.acts .idle { display: flex; align-items: center; justify-content: center; gap: 14px; font-weight: 600; text-align: center; flex-wrap: wrap; }
.acts .idle .hand { font-weight: 800; }
.turnbox { display: grid; grid-template: "info raise btns" auto / minmax(150px, auto) minmax(0, 1fr) auto; gap: 10px 24px; align-items: center; }
.turninfo { grid-area: info; }
.raisebox { grid-area: raise; }
.actbtns { grid-area: btns; }
.turninfo { line-height: 1.35; }
.turninfo b { font: 400 25px/1.1 var(--display); display: flex; gap: 8px; align-items: baseline; }
.turninfo .sec { font: 800 25px/1 var(--text); min-width: 1.3em; }
.acts.late .sec { color: var(--red-2); }
.raisebox { display: grid; gap: 8px; max-width: 540px; justify-self: center; width: 100%; }
.presets { display: flex; gap: 6px; }
.presets .btn { flex: 1; min-width: 0; min-height: 32px; padding: 3px 4px; font-size: 14px; border-radius: 9px; background: transparent; }
@media (hover: hover) { .presets .btn:hover { background: oklch(1 0 0 / 0.4); } }
.sliderow { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; align-items: center; }
@container (max-width: 920px) {
  .turnbox { grid-template: "info btns" auto "raise raise" auto / minmax(0, 1fr) auto; }
  .raisebox { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 14px; }
}
@container (max-width: 620px) {
  .turnbox { grid-template: "info" auto "raise" auto "btns" auto / minmax(0, 1fr); gap: 8px; }
  .raisebox { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .actbtns .btn { flex: 1.2; min-width: 0; min-height: 52px; padding-inline: 6px; font-size: 16px; }
  .actbtns .btn.fold { flex: 0.8; min-width: 0; }
  .turninfo { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .turninfo b, .turninfo .sec { font-size: 21px; }
  .presets .btn { padding: 3px 4px; min-height: 36px; }
}
.sliderow .input { min-height: 38px; text-align: right; font-weight: 800; padding: 4px 10px; appearance: textfield; -moz-appearance: textfield; }
.sliderow .input::-webkit-inner-spin-button, .sliderow .input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: var(--paper); border: 2px solid var(--ink); }
input[type="range"]::-moz-range-track { height: 5px; border-radius: 4px; background: var(--paper); border: 2px solid var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: var(--paper); border: 6px solid var(--ink); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 6px solid var(--ink); }
.actbtns { display: flex; gap: 10px; }
.actbtns .btn { min-height: 56px; min-width: 116px; font-size: 17px; display: grid; gap: 0; place-content: center; }
.actbtns .btn small { font-weight: 800; font-size: 15px; }
.actbtns .btn.fold { background: transparent; min-width: 92px; }
@media (hover: hover) { .actbtns .btn.fold:hover { background: oklch(1 0 0 / 0.35); } }
.actbtns .btn.call { background: var(--ink); color: var(--yolk); }
@media (hover: hover) { .actbtns .btn.call:hover { background: var(--jade-deep); color: var(--paper); } }
.actbtns .btn.go.allin { background: var(--red); color: var(--paper); }
@media (hover: hover) { .actbtns .btn.go.allin:hover { background: var(--red-2); } }
.acts kbd { display: none; }
/* 一手打完，选亮不亮：不用蛋黄底，那是“轮到你”的颜色 */
.showbox { display: flex; gap: 10px 28px; align-items: center; justify-content: center; flex-wrap: wrap; }
.showask { display: grid; gap: 2px; }
.showask b { font-size: 18px; line-height: 1.3; }
.showask .sec { font-weight: 800; color: var(--ink); display: inline-block; min-width: 1.1em; text-align: center; }
.showbox .actbtns .btn > span, .outbox .btn.show > span { display: inline-flex; align-items: center; gap: 8px; }
.showbox .actbtns .btn { min-height: 52px; min-width: 124px; }
.outbox { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.outbox b { font: 400 24px/1.1 var(--display); }

/* ---- 右侧：记录 / 聊天 ---- */
.play-side { grid-area: side; border-left: 2px solid var(--ink); background: var(--paper); display: flex; flex-direction: column; min-height: 0; }
.sidetabs { display: flex; border-bottom: 2px solid var(--ink); }
.sidetabs button { flex: 1; border: 0; background: var(--mint-1); min-height: 44px; font-weight: 700; cursor: pointer; border-left: 2px solid var(--ink); color: var(--ink-2); }
.sidetabs button:first-child { border-left: 0; }
.sidetabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.sidetabs button:focus-visible { outline-offset: -4px; }
.sidepane { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; overscroll-behavior: contain; }
.loglist p { padding: 2px 0; line-height: 1.4; font-size: 14px; }
.loglist .rs, .hands .rs { color: var(--red); }
.loglist .hand { font: 800 15px/1.3 var(--text); margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.loglist .hand:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.loglist .board { font-weight: 700; display: block; }
.loglist .allin, .loglist .out { color: var(--red-2); font-weight: 700; }
.loglist .win { color: var(--jade-deep); font-weight: 700; }
.loglist .net { color: var(--ink-2); font-style: normal; }
.sidechat { padding: 0 14px 12px; }
.sidechat .chatform { margin-top: 0; }
.unread { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--ink); color: var(--mint-0); font-size: 12px; padding: 0 6px; margin-left: 6px; }

/* ---- 抓包 ---- */
.pk { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--paper); border-left: 2px solid var(--ink); display: flex; flex-direction: column; min-height: 0; box-shadow: -10px 0 40px oklch(0.31 0.055 168 / 0.25); animation: pk-in 0.3s var(--ease); }
@keyframes pk-in { from { transform: translateX(40px); opacity: 0; } }
/* 牌桌页：停靠进右栏，台面重排，绝不盖住出牌按钮 */
.play.with-pk { grid-template-columns: minmax(0, 1fr) 420px; }
.play.with-pk > .play-side { display: none; }
.play > .pk { grid-area: side; position: relative; width: auto; box-shadow: none; z-index: 20; }
.pk-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--ink); color: var(--paper); flex: none; }
.pk-head h2 { font: 400 24px/1 var(--display); color: var(--yolk); margin-right: auto; }
.pk-head .btn { background: transparent; color: inherit; border-color: oklch(1 0 0 / 0.35); }
.pk-head :focus-visible { outline-color: var(--yolk); }
.pk-bar { padding: 10px 14px; border-bottom: 1px solid var(--line); flex: none; display: grid; gap: 8px; }
.pk-tabs { border: 0; border-radius: 0; border-bottom: 2px solid var(--ink); background: none; }
.pk-tabs span { border: 0; border-radius: 8px 8px 0 0; color: var(--ink-2); }
.pk-tabs input:checked + span { background: none; color: var(--ink); box-shadow: inset 0 -4px 0 var(--ink); }
.pk-facts { padding: 14px 18px 20px; overflow-y: auto; }
/* 一帧就是一件包裹，包裹上贴的标签 */
.parcel { flex: none; margin: 12px 14px; border: 2px solid var(--ink); background: var(--paper); padding: 10px 12px 12px; max-height: 52%; overflow-y: auto; }
.parcel h3 { font-size: 17px; display: flex; gap: 8px; align-items: baseline; border-bottom: 6px solid var(--ink); padding-bottom: 5px; }
.parcel h3 code { font: 600 13px/1.2 var(--mono); color: var(--ink-2); }
.parcel h3 .t { margin-left: auto; }
.hdrcells { display: grid; grid-template-columns: auto auto auto auto minmax(0, 1fr); border-bottom: 4px solid var(--ink); }
.hdrcells div { padding: 5px 6px 4px; border-left: 1px solid var(--ink); min-width: 0; }
.hdrcells div:first-child { border-left: 0; padding-left: 0; }
.hdrcells small { display: block; color: var(--ink-2); font-size: 12px; line-height: 1.3; }
.hdrcells b { font-weight: 800; display: block; }
.hdrcells code { font: 600 11px/1.5 var(--mono); display: inline-block; white-space: nowrap; padding: 0 2px; }
.hdrcells .m code { background: var(--ink); color: var(--mint-0); padding: 0 3px; } .hdrcells .h code { background: var(--mint-3); }
.parcel dl { display: grid; grid-template-columns: auto minmax(0, 1fr); font-size: 14px; }
.parcel dt, .parcel dd { padding: 3px 0; border-top: 1px solid var(--line); }
.parcel dt { color: var(--ink-2); padding-right: 14px; } .parcel dd { font-weight: 600; text-align: right; }
.parcel dt:first-of-type, .parcel dd:first-of-type { border-top: 0; }
.parcel .note { font-size: 13px; color: var(--ink-2); padding: 6px 0; }
.parcel dl { border-top: 1px solid var(--ink); }
.parcel details { margin-top: 8px; font-size: 14px; } .parcel summary { cursor: pointer; font-weight: 700; }
.pk-list { flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior: contain; border-top: 2px solid var(--ink); }
.pk-list button { display: grid; grid-template-columns: 76px 44px minmax(0, 1fr) auto 16px; gap: 9px; align-items: center; width: 100%; min-height: 34px; padding: 4px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; font-size: 14px; }
@media (hover: hover) { .pk-list button:hover { background: var(--mint-0); } }
.pk-list button[aria-pressed="true"] { background: var(--mint-2); }
.pk-list button:focus-visible { outline-offset: -3px; }
.pk-list button .icon { width: 14px; height: 14px; transform: rotate(-90deg); color: var(--ink-2); }
.pk-list button[aria-pressed="true"] .icon { transform: none; }
.pk-list time { color: var(--ink-2); font-size: 12.5px; }
.t { font-weight: 800; font-size: 12px; text-align: center; border: 1.5px solid var(--ink); border-radius: 5px; line-height: 1.5; padding: 0 5px; }
.t.udp { background: var(--ink); color: var(--mint-0); } .t.gw { border-style: dashed; color: var(--ink-2); }
.pk-list .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-list .nm i { font-style: normal; color: var(--ink-2); margin-right: 6px; } .pk-list .nm.out i { color: var(--ink); font-weight: 800; }
.pk-list .sz { color: var(--ink-2); }
.hex { font: 500 12px/1.7 var(--mono); white-space: pre; overflow-x: auto; margin-top: 6px; }
.hex .m { background: var(--ink); color: var(--mint-0); } .hex .h { background: var(--mint-3); }
.pk-empty { padding: 26px 20px; text-align: center; color: var(--ink-2); }

/* 竖着的台面（手机竖屏） */
.stage:not(.wide) .tray { inset: 6% 2.5% 8%; border-radius: clamp(26px, 11cqw, 48px); }
.stage:not(.wide) .tray::before { border-radius: clamp(20px, calc(11cqw - 7px), 41px); border-width: 3px; }
.stage:not(.wide) .tray::after { border-radius: clamp(15px, calc(11cqw - 12px), 36px); inset: 12px; }
.stage:not(.wide) .watermark { width: min(84cqw, 62cqh); height: min(84cqw, 62cqh); }
.stage:not(.wide) .landmark { top: 62%; }
.stage:not(.wide) .center { top: 44%; gap: 6px; }
.stage:not(.wide) .said { max-width: 70cqw; font-size: 14px; min-height: 24px; }

/* ---- 窄屏 ---- */
@media (max-width: 1020px) {
  .lobby, .room, .helpgrid { grid-template-columns: minmax(0, 1fr); }
  .play { grid-template-columns: minmax(0, 1fr) 250px; }
  .play-head .facts-line span:nth-child(n + 3) { display: none; }
}
@media (max-width: 1260px) { .acts { min-height: 136px; } .watching .acts { min-height: 72px; } }
@media (max-width: 860px) {
  .rows li { grid-template-columns: 52px minmax(0, 1fr) 88px; gap: 3px 12px; padding: 11px 16px; }
  .rows .lid { width: 52px; height: 52px; grid-row: 1 / span 2; }
  .rows .disp { font-size: 23px; }
  .rows .meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; font-size: 14px; }
  .rows .c-state small { display: none; }
  .rows .btn { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .nav { display: none; }
  .hide-s { display: none; }
  .brand { font-size: 23px; }
  .bar > div { gap: 10px; }
  .play-head .btn { padding-inline: 10px; }
  .tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: sticky; bottom: 0; z-index: 15; background: var(--ink); padding-bottom: env(safe-area-inset-bottom); }
  .tabs a { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 7px; text-decoration: none; color: var(--mint-2); font-size: 12px; font-weight: 600; }
  .tabs a[aria-current] { color: var(--ink); background: var(--mint-2); }
  .ticker { position: static; }
  .page { padding-top: 18px; }
  .play { grid-template: auto minmax(0, 1fr) auto / minmax(0, 1fr); grid-template-areas: "head" "stage" "acts"; }
  .play.with-pk { grid-template-columns: minmax(0, 1fr); }
  .play > .pk { grid-area: stage; border-left: 0; }          /* 手机：只盖台面，操作区还在 */
  .parcel { margin: 8px 10px; max-height: 60%; }
  .play-side { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: min(62dvh, 460px); border: 2px solid var(--ink); border-bottom: 0; border-radius: 18px 18px 0 0; overflow: hidden; box-shadow: 0 -10px 40px oklch(0.31 0.055 168 / 0.3); animation: sheet 0.3s var(--ease); }
  .play:not(.side-open) .play-side { display: none; }
  .play-head { gap: 8px; padding: 5px 10px; min-height: 50px; }
  .play-head .lid { width: 34px; height: 34px; }
  .play-head .title { font-size: 21px; }
  .play-head .facts-line { gap: 10px; font-size: 13px; }
  .play-head .facts-line span:nth-child(n + 2) { display: none; }
  .play-head .tools { gap: 4px; }
  .play-head .iconbtn { width: 38px; min-height: 38px; }
  .play-head .lat { display: none; }
  .acts { padding: 12px 12px calc(10px + env(safe-area-inset-bottom)); min-height: calc(208px + env(safe-area-inset-bottom)); }
  .watching .acts { min-height: 66px; }
  .seats6 { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 9px; }
  .room-foot .grow { flex-basis: 100%; order: -1; }
  .room-foot .btn.main { flex: 1; }
  .room-top { padding: 18px 16px; gap: 16px; }
  .room-top .lid { width: 92px; height: 92px; }
  .room-top h1 { font-size: 38px; }
  .roomcode { margin-left: 0; flex: 1 1 100%; grid-template-columns: 1fr auto; padding: 10px 12px 10px 14px; }
  .roomcode .roomno { font-size: 30px; }
  .roomjoin { margin-left: 0; flex: 1 1 100%; grid-template-columns: auto minmax(0, 1fr) auto; }
  .room-foot { padding: 0 16px 18px; }
  .table th, .table td { padding-inline: 14px; }
  .tin > .in { padding: 14px 13px 15px; }
  .who b { display: none; }
  .toasts { top: 64px; }
}
@media (max-width: 700px) {
  .login { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .login-art { border-right: 0; border-bottom: 2px solid var(--ink); padding: 22px 20px; place-content: center start; }
  .login-hero .brandmark { width: 88px; }
  .login-art h1 { font-size: 46px; }
  .login-side { justify-content: flex-start; max-width: none; padding-top: 24px; }
}
@media (max-height: 560px) and (min-width: 701px) { .login-art h1 { font-size: 50px; } .login-hero .brandmark { width: 104px; } .login-side { padding-block: 18px; justify-content: flex-start; } }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
@media (max-width: 420px) {
  .table .opt { display: none; }
  .dots { gap: 3px; }
  .dots i { width: 11px; height: 11px; }
}
@media (max-height: 560px) and (min-width: 600px) {
  .play { grid-template: auto minmax(0, 1fr) / minmax(0, 1fr) 272px; grid-template-areas: "head head" "stage acts"; }
  .play.with-pk { grid-template-columns: minmax(0, 1fr) 272px; }
  .play > .pk { grid-area: stage; border-left: 0; }
  .play-side { position: fixed; z-index: 30; right: 0; top: 0; bottom: 0; left: auto; width: 300px; height: auto; border-radius: 0; border: 0; border-left: 3px solid var(--ink); }
  .play:not(.side-open) .play-side { display: none; }
  .play-head { min-height: 44px; padding-block: 2px; }
  .acts, .watching .acts { border-top: 0; border-left: 2px solid var(--ink); align-content: center; overflow-y: auto; min-height: 0; }
  .actbtns { flex-wrap: wrap; }
  .actbtns .btn { min-height: 44px; }
  .watching .chatform { flex-direction: column; }
}
@media (hover: hover) and (min-width: 1100px) {
  .acts kbd { display: inline-block; font-size: 11px; padding: 1px 5px; margin-left: 6px; background: transparent; border-color: currentColor; border-bottom-width: 1.5px; vertical-align: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .danmaku { display: none; }
}
::view-transition-group(lid) { animation-duration: 0.45s; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

.handline { font-weight: 700; }
.watch-empty { grid-area: stage; }
.side-btn { display: none; position: relative; }
.side-btn .unread { position: absolute; right: -6px; top: -6px; margin: 0; }
@media (max-width: 860px), (max-height: 560px) and (min-width: 600px) { .side-btn { display: inline-flex; } }
@media (max-width: 1020px) {
  .lobby > .stack, .lobby > .side { display: contents; }
  .lobby { gap: 18px; }
  .lobby > .stack > :first-child { order: 1; }
  .lobby > .side > :first-child { order: 2; }
  .lobby > .stack > :last-child { order: 3; }
  .lobby > .side > :last-child { order: 4; }
}
.sidepane .handrank li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.sidepane .chatlog { max-height: none; overflow: visible; padding: 0; }
.acts > .chatform { margin: 0; max-width: 640px; width: 100%; justify-self: center; }

.recent { display: none; }
@media (max-width: 860px) {
  .acts .idle { flex-direction: column; gap: 8px; }
  .recent { display: grid; gap: 2px; color: var(--ink-2); font-weight: 500; font-size: 14px; }
}
.play.watching .plate .time { display: none; }
::view-transition { pointer-events: none; }
@container (max-width: 620px) { .bet .chip { display: none; } .bet { padding: 2px 10px; } }
.iconbtn .slash { display: none; }
.iconbtn[aria-pressed="false"] { opacity: 0.7; }
.pk-frames { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.botmark { flex: none; display: grid; place-items: center; }
