/* Official five-screen target: lounge, four seat table, bottom hand/actions. */
.big-two-lobby,.big-two-game {
  --gold:#edc775; --ivory:#fff0cb; --muted:#bacdce; --line:#426f70; --panel:#06232a;
  position:relative; isolation:isolate; width:100%; max-width:none; min-height:100dvh;
  margin:0; padding:22px clamp(12px,3vw,44px); border-radius:0; color:#eff8f5;
  background:linear-gradient(#00101833,#00121433),url('/images/big-two-lounge.png') center center/cover;
  font-family:Georgia,'Noto Serif TC','Times New Roman',serif;
}
body .shell:has(>.big-two-game:not(.hidden)),body .shell:has(>.big-two-lobby:not(.hidden)) { width:100%; max-width:none; padding:0; height:auto; overflow:visible; }
.big-two-lobby.lobby { min-height:100dvh; }
/* Shared reconnect notices must not cover or intercept the bottom card actions. */
body:has(#bigTwoGame:not(.hidden)) .toast,body:has(#bigTwoLobby:not(.hidden)) .toast { top:max(10px,env(safe-area-inset-top)); bottom:auto; pointer-events:none; }
.big-two-lobby button,.big-two-game button { font-family:inherit; }
.big-two-lobby .secondary,.big-two-game .secondary { background:linear-gradient(135deg,#123d41e8,#03191fee); border:1px solid #548787; color:#d9efeb; }
.big-two-lobby button:not(.secondary),#bigTwoStart,#bigTwoPlay,#bigTwoRematch {
  background:linear-gradient(135deg,#ffe5a1,#e4ad4d 70%,#f1cb7b); color:#19190c;
  border:1px solid #fff0b9; box-shadow:inset 0 0 0 3px #ba863847,0 3px 18px #0005; font-weight:700;
}
.big-two-lobby button:disabled,.big-two-game button:disabled { opacity:.55; }
.big-two-lobby .back-link { position:absolute; top:22px; left:24px; margin:0; z-index:2; }
.big-two-hero { display:grid; grid-template-columns:minmax(0,1fr); justify-content:stretch; justify-items:center; gap:22px; border:0; margin:0 auto; padding:0; text-align:center; }
.big-two-hero h1 { color:var(--ivory); font-size:clamp(32px,4vw,52px); letter-spacing:.12em; }
.big-two-hero h1 span { color:var(--gold); }
.big-two-hero p { font-size:18px; margin:8px 0; }
#bigTwoQuick { display:grid; width:min(620px,90%); min-height:136px; padding:20px 34px; border-radius:16px; }
.big-two-quick-title { display:flex; justify-content:center; align-items:center; gap:22px; font-size:clamp(26px,3.7vw,46px); }
.big-two-quick-title span:first-child { font-size:1.3em; }
.big-two-quick-title span:last-child { margin-left:auto; }
#bigTwoQuick small { font-size:18px; font-weight:400; }
.big-two-lobby-layout { max-width:900px; margin:24px auto 0; gap:20px; }
.big-two-entry { background:#06252cdf; border-color:#608d8b; }
.big-two-entry summary { display:flex; justify-content:center; align-items:center; gap:16px; font-size:24px; min-height:72px; list-style:none; }
.big-two-entry summary::-webkit-details-marker { display:none; }
.big-two-entry summary svg { color:#a7e2d8; }
.big-two-entry summary span { margin:0 0 0 auto; font-size:28px; }
.big-two-entry-form { font-family:system-ui,sans-serif; }
.big-two-public.room-browser { max-width:1040px; margin:24px auto 0; padding:20px 24px; background:#06262ce8; border:1px solid #528482; border-radius:16px; }
.big-two-public h2 { color:var(--ivory); font-size:26px; }
.big-two-public .public-rooms { display:grid; gap:10px; }
.big-two-public .room-row { padding:16px 20px; border-radius:12px; font-size:21px; }
.big-two-public .room-row > span:first-child { display:flex; flex:1; justify-content:space-between; align-items:center; gap:16px; }
.big-two-public .room-row small { font-size:16px; }
.big-two-public .room-row > span:last-child { background:linear-gradient(135deg,#f8d487,#bd873c); color:#19190c; padding:10px 24px; border-radius:8px; white-space:nowrap; }
.big-two-public .empty-state { font-family:system-ui,sans-serif; text-align:center; }
.big-two-top { display:grid; grid-template-columns:180px minmax(0,1fr) 180px; align-items:start; gap:12px; padding:0; border:0; }
.big-two-top > div { text-align:center; }
.big-two-top h1 { color:var(--ivory); font-size:clamp(26px,3.3vw,44px); }
.big-two-top h1::before { content:'♠ '; color:var(--gold); }
.big-two-top > button { justify-self:start; min-height:44px; display:flex; align-items:center; gap:8px; }
.big-two-top > button:last-child { justify-self:end; }
.big-two-room-meta { display:flex; justify-content:center; align-items:center; gap:14px; margin:8px 0 0; font-size:15px; }
.big-two-room-meta strong { letter-spacing:.13em; color:var(--ivory); }
#bigTwoInvite { padding:6px 10px; display:flex; align-items:center; gap:8px; min-height:32px; }
.big-two-game[data-view='playing'] .big-two-room-meta { visibility:hidden; height:0; margin:0; }
.big-two-game[data-view='result'] .big-two-top > div { display:none; }
.big-two-game[data-view='result'] .big-two-top > button:last-child { grid-column:3; }
.big-two-connection { background:#1b3035; position:relative; z-index:8; color:#ffe1a0; padding:8px; }
.big-two-waiting { position:relative; max-width:1260px; margin:0 auto; }
.big-two-waiting-heading { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.big-two-seats { position:relative; display:block; height:clamp(360px,56vh,540px); margin:0; }
.big-two-seat,.big-two-opponent { border:1px solid #5b8c88; border-radius:14px; background:linear-gradient(140deg,#103d3fe8,#02151ee8); box-shadow:0 5px 16px #0005; }
.big-two-seat { position:absolute; display:grid; grid-template-columns:66px minmax(0,1fr); grid-template-rows:auto auto; column-gap:12px; width:245px; min-height:82px; padding:10px 20px 10px 8px!important; text-align:left; align-content:center; }
.big-two-avatar { grid-row:1 / 3; display:grid; place-items:center; width:64px; height:64px; border-radius:50%; background:radial-gradient(circle at 35% 30%,#254955,#081923); border:2px solid #e8bb64; color:var(--gold); box-shadow:0 0 0 3px #021318,0 4px 14px #0006; font-size:36px; }
.big-two-seat strong,.big-two-opponent strong { align-self:end; font-size:22px; }
.big-two-seat small { font-family:system-ui,sans-serif; font-size:13px; }
.big-two-seat.is-ready small { color:#75f4a7; }
.big-two-seat.is-empty { border-style:solid; color:#b9cbd0; }
.big-two-seat.is-empty .big-two-avatar { border-color:#7f9b9b; }
.big-two-game [data-position='top'] { top:8%; left:50%; transform:translateX(-50%); }
.big-two-game [data-position='left'] { top:40%; left:5%; }
.big-two-game [data-position='right'] { top:40%; right:5%; }
.big-two-game [data-position='bottom'] { bottom:12%; left:50%; transform:translateX(-50%); }
.big-two-fan { display:flex; position:absolute; top:calc(100% - 2px); left:50%; transform:translateX(-50%); height:40px; width:154px; justify-content:center; pointer-events:none; }
.big-two-fan i { display:grid; place-items:center; font-style:normal; color:#c59d54; background:repeating-linear-gradient(45deg,#132b3b 0 3px,#203748 3px 4px); border:1px solid #d4ac65; border-radius:4px; width:32px; height:42px; flex:none; margin-left:-11px; transform-origin:bottom center; transform:rotate(calc((var(--fan-index) - (var(--fan-total) - 1)/2)*8deg)); box-shadow:0 2px 4px #0008; }
.big-two-felt-emblem { position:absolute; left:50%; top:32%; transform:translateX(-50%); display:grid; justify-items:center; color:#ccad6355; font-size:70px; line-height:1; pointer-events:none; }
.big-two-felt-emblem span { font-size:28px; margin-top:10px; letter-spacing:.15em; }
#bigTwoWaitingStatus,#bigTwoStartHint { text-align:center; font-size:14px; margin:5px 0; color:#d0e1db; }
.big-two-waiting-actions { justify-content:center; margin:16px auto 0; gap:10px; flex-wrap:wrap; max-width:560px; }
#bigTwoWaitingInvite { width:100%; max-width:350px; min-height:46px; display:flex; justify-content:center; align-items:center; gap:14px; font-size:21px; }
#bigTwoStart,#bigTwoReady { order:3; width:100%; max-width:420px; min-height:64px; font-size:30px; }
#bigTwoAddBot { order:2; }
.big-two-table { position:relative; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(220px,1fr) 76px auto 58px; grid-template-areas:'arena' 'status' 'hand' 'actions'; height:calc(100dvh - 100px); min-height:580px; padding:0; gap:2px; max-width:1420px; margin:0 auto; }
.big-two-arena { grid-area:arena; position:relative; display:block; min-height:0; padding:0; border:0; background:transparent; border-radius:0; box-shadow:none; }
.big-two-opponents { display:contents; }
.big-two-opponent { position:absolute; width:230px; display:grid; grid-template-columns:64px minmax(0,1fr); grid-template-rows:auto auto auto; text-align:left; justify-items:start; gap:2px 10px; padding:10px; min-height:98px; }
.big-two-opponent .big-two-avatar { grid-row:1 / 4; }
.big-two-opponent strong { max-width:100%; font-size:20px; }
.big-two-card-count { grid-column:2; justify-content:start; gap:6px; }
.big-two-card-count b { font-size:27px; }
.big-two-card-count small { font-size:15px; }
.big-two-player-state { grid-column:2; font-size:12px; }
.big-two-opponent[data-position='top'] { top:5%; }
.big-two-opponent[data-position='left'],.big-two-opponent[data-position='right'] { top:48%; }
.big-two-opponent.is-acting { border:2px solid var(--gold); box-shadow:0 0 20px #ecb84b40; }
.big-two-center { position:absolute; top:48%; left:50%; transform:translate(-50%,-20%); width:36%; display:grid; gap:8px; justify-items:center; align-content:center; min-height:160px; padding:12px; border:1px solid #4c82716b; border-radius:32px; background:#032b2b99; }
.big-two-current-play { min-height:92px; }
.big-two-current-play .big-two-card { width:66px; height:92px; }
.big-two-status { grid-area:status; display:grid; justify-content:center; justify-items:center; gap:4px; padding:0; background:transparent; min-height:0; }
.big-two-status strong { color:var(--gold); font-size:19px; text-shadow:0 2px 6px #000; }
#bigTwoTimer { display:grid; place-items:center; width:70px; height:50px; padding:0; border:2px solid var(--gold); border-radius:50%; font-size:23px; background:#031f26cc; box-shadow:0 0 20px #d8a73d30; }
#bigTwoResumeControl { position:absolute; right:8px; bottom:60px; z-index:7; font-size:14px; }
.big-two-own { grid-area:hand; background:transparent; border:0; border-radius:0; box-shadow:none!important; padding:0; }
.big-two-hand-heading { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.big-two-hand { display:flex; flex-wrap:nowrap; justify-content:center; align-items:end; overflow:visible; padding:14px 8px 4px; gap:0; min-height:120px; }
.big-two-hand .big-two-card { width:76px; height:108px; background:linear-gradient(135deg,#fffdf3,#e2d6c4); font-size:26px; padding:6px; box-shadow:0 5px 9px #0007; border-radius:7px; }
.big-two-hand .big-two-card + .big-two-card { margin-left:-20px; }
.big-two-hand .big-two-card { transform:rotate(var(--hand-angle,0deg)); }
.big-two-card .suit { font-size:36px; }
.big-two-hand .big-two-card.is-selected { transform:translateY(-14px) rotate(var(--hand-angle,0deg)); border:2px solid #ffdc85; }
#bigTwoSelectionStatus { font-family:system-ui,sans-serif; font-size:13px; color:#e8d398; margin:3px 0; }
.big-two-actions { grid-area:actions; display:grid; grid-template-columns:1fr 1fr 1.2fr; gap:20px; width:min(620px,75%); margin:0 auto; padding:0; position:static; background:transparent; }
.big-two-actions button { min-height:54px; font-size:27px; border-radius:12px; }
#bigTwoPlay { font-size:27px; }
.big-two-chat { position:fixed; right:20px; top:76px; z-index:12; width:min(360px,calc(100vw - 32px)); border:0; margin:0; padding:0; font-family:system-ui,sans-serif; }
.big-two-chat:not([open]) { width:0; height:0; overflow:hidden; }
.big-two-chat[open] { background:#05232af5; border:1px solid #518887; border-radius:14px; padding:14px; box-shadow:0 10px 35px #0008; max-height:min(360px,calc(100dvh - 260px)); overflow:auto; }
.big-two-chat-messages { max-height:160px; }
.big-two-result { position:relative; max-width:780px; margin:0 auto; padding:18px 32px 20px; background:repeating-linear-gradient(45deg,#04222a 0 5px,#05252d 5px 6px); border:2px solid var(--gold); border-radius:32px 32px 70px 70px; box-shadow:inset 0 0 0 5px #082c34,inset 0 0 0 6px #bd975b88,0 12px 55px #000a; text-align:center; }
.big-two-result-emblem { display:grid; justify-items:center; line-height:.85; font-size:50px; color:var(--gold); filter:drop-shadow(0 0 8px #f6c65788); }
.big-two-result-emblem > span { font-size:64px; }
.big-two-result.is-self-win .big-two-result-emblem { font-size:60px; }
.big-two-result h2 { font-size:clamp(32px,4.5vw,64px); letter-spacing:.1em; color:var(--ivory); text-shadow:0 3px 1px #7a5628,0 0 20px #f6c65750; margin:10px 0; }
.big-two-result p { font-size:23px; margin:12px 0; }
.big-two-result-duration { font-size:12px; color:var(--muted); }
.big-two-result-columns { display:flex; justify-content:space-between; padding:12px 24px 6px; color:#b9d2d2; font-size:16px; }
.big-two-result-players { margin:0 0 14px; }
.big-two-result-players li { display:grid; grid-template-columns:50px minmax(0,1fr) auto auto; gap:14px; min-height:66px; padding:8px 16px; border:1px solid #4b7d7d; border-radius:12px; margin:5px 0; background:#021a23a6; font-size:23px; }
.big-two-result-players .big-two-avatar { grid-row:auto; width:46px; height:46px; font-size:27px; }
.big-two-result-players li.is-winner { background:linear-gradient(110deg,#96703935,#e4b75c20); border:1px solid #ffd97e; box-shadow:inset 0 0 12px #edb64c25; }
.big-two-result-players small { font-size:11px; font-family:system-ui,sans-serif; }
.big-two-winner-badge { color:var(--gold); font-size:19px; }
.big-two-result-players strong { font-size:25px; }
#bigTwoRematchStatus { font-size:16px; color:#cce4df; }
.big-two-rematch-seats { font-family:system-ui,sans-serif; margin-bottom:10px; }
.big-two-result-actions { display:flex; flex-direction:column; align-items:center; gap:10px; }
#bigTwoRematch { width:min(430px,85%); font-size:31px; min-height:64px; border-radius:12px; }
#bigTwoResultLeave { border:0; background:transparent; min-height:30px; padding:4px 20px; font-size:18px; color:#c3dedb; }
@media(max-width:1000px) {
  .big-two-opponent { width:185px; grid-template-columns:46px minmax(0,1fr); gap:2px 8px; padding:8px; }
  .big-two-opponent .big-two-avatar { width:44px; height:44px; font-size:28px; }
  .big-two-opponent strong { font-size:16px; }
  .big-two-opponent[data-position='left'] { left:1%; }
  .big-two-opponent[data-position='right'] { right:1%; }
  .big-two-top { grid-template-columns:135px minmax(0,1fr) 60px; }
}
@media(max-width:700px) {
  .big-two-lobby,.big-two-game { padding:12px 10px 16px; background-position:center; }
  .big-two-lobby .back-link { position:static; width:max-content; margin-bottom:14px; }
  .big-two-hero { gap:14px; }
  #bigTwoQuick { width:94%; min-height:108px; padding:14px 20px; }
  #bigTwoQuick small { font-size:14px; }
  .big-two-quick-title { gap:12px; font-size:28px; }
  .big-two-lobby-layout { grid-template-columns:1fr 1fr; gap:8px; margin-top:18px; }
  .big-two-entry summary { font-size:16px; gap:7px; min-height:58px; padding:10px; }
  .big-two-entry summary svg { width:18px; }
  .big-two-entry summary span { font-size:20px; }
  .big-two-entry[open] { grid-column:1 / -1; }
  .big-two-public.room-browser { padding:14px 10px; margin-top:18px; }
  .big-two-public h2 { font-size:22px; }
  .big-two-public .room-row { padding:12px 8px; font-size:16px; gap:8px; }
  .big-two-public .room-row > span:first-child { display:grid; gap:5px; }
  .big-two-public .room-row small { font-size:12px; }
  .big-two-public .room-row > span:last-child { padding:8px 12px; font-size:14px; }
  .big-two-top { grid-template-columns:94px minmax(0,1fr) 42px; gap:5px; }
  .big-two-top > button { font-size:12px; padding:6px; min-height:34px; }
  .big-two-top > button svg { width:15px; }
  .big-two-top h1 { font-size:21px; }
  .big-two-room-meta { flex-wrap:wrap; gap:6px; font-size:12px; }
  .big-two-room-meta span:first-child { display:none; }
  #bigTwoInvite { padding:4px; font-size:11px; }
  .big-two-seats { height:420px; }
  .big-two-seat { width:145px; min-height:72px; grid-template-columns:40px minmax(0,1fr); gap:5px; padding:7px 5px!important; }
  .big-two-seat .big-two-avatar { width:38px; height:38px; font-size:24px; }
  .big-two-seat strong { font-size:15px; }
  .big-two-seat small { font-size:10px; }
  .big-two-seat[data-position='left'] { left:0; top:40%; }
  .big-two-seat[data-position='right'] { right:0; top:40%; }
  .big-two-seat[data-position='top'] { top:8%; }
  .big-two-seat[data-position='bottom'] { bottom:12%; }
  .big-two-seat .icon-button { right:0; top:-20px; min-height:25px; padding:4px; }
  .big-two-felt-emblem { top:34%; font-size:48px; }
  .big-two-felt-emblem span { font-size:21px; }
  .big-two-fan { width:105px; height:28px; }
  .big-two-fan i { width:24px; height:32px; margin-left:-9px; font-size:11px; }
  #bigTwoStart,#bigTwoReady { min-height:52px; font-size:24px; }
  .big-two-table { height:calc(100dvh - 75px); min-height:590px; grid-template-rows:minmax(235px,1fr) 70px 150px 52px; gap:3px; }
  .big-two-opponent { width:108px; min-height:82px; grid-template-columns:25px minmax(0,1fr); padding:6px 4px; gap:2px 4px; border-radius:10px; }
  .big-two-opponent .big-two-avatar { width:25px; height:25px; font-size:18px; }
  .big-two-opponent strong { font-size:12px; }
  .big-two-card-count { gap:3px; }
  .big-two-card-count b { font-size:24px; }
  .big-two-card-count small { font-size:11px; }
  .big-two-player-state { font-size:10px; }
  .big-two-opponent[data-position='top'] { top:3%; }
  .big-two-opponent[data-position='left'],.big-two-opponent[data-position='right'] { top:38%; }
  .big-two-opponent[data-position='left'] { left:0; }
  .big-two-opponent[data-position='right'] { right:0; }
  .big-two-center { top:72%; width:76%; min-height:105px; padding:7px; gap:3px; border-radius:22px; transform:translate(-50%,-20%); font-size:12px; }
  .big-two-current-play { min-height:59px; }
  .big-two-current-play .big-two-card { width:40px; height:58px; font-size:15px; }
  .big-two-card .suit { font-size:24px; }
  .big-two-status strong { font-size:15px; }
  #bigTwoTimer { width:64px; height:45px; font-size:21px; }
  .big-two-hand { display:flex; flex-wrap:wrap; overflow:visible; min-height:122px; max-width:350px; margin:auto; padding:12px 0 2px; gap:2px 0; }
  .big-two-hand .big-two-card { width:46px; height:62px; font-size:17px; padding:3px; }
  .big-two-hand .big-two-card + .big-two-card { margin-left:-5px; }
  .big-two-hand .big-two-card { transform:none; }
  .big-two-hand .big-two-card.is-selected { transform:translateY(-10px); }
  .big-two-hand .big-two-card .corner-suit { font-size:9px; }
  #bigTwoSelectionStatus { font-size:11px; margin:0; min-height:22px; }
  .big-two-actions { width:86%; gap:12px; padding:0; }
  .big-two-actions button,#bigTwoPlay { min-height:48px; font-size:22px; }
  .big-two-result { margin:8px auto; padding:16px 12px; border-radius:24px 24px 38px 38px; }
  .big-two-result-emblem { font-size:36px; }
  .big-two-result-emblem > span { font-size:45px; }
  .big-two-result.is-self-win .big-two-result-emblem { font-size:40px; }
  .big-two-result h2 { font-size:32px; margin:6px 0; }
  .big-two-result p { font-size:16px; }
  .big-two-result-columns { font-size:12px; padding:10px 10px 5px; }
  .big-two-result-players li { grid-template-columns:36px minmax(0,1fr) auto; min-height:56px; padding:6px; gap:5px 8px; font-size:17px; }
  .big-two-result-players .big-two-avatar { width:34px; height:34px; font-size:22px; }
  .big-two-winner-badge { grid-column:2; grid-row:auto; font-size:12px; }
  .big-two-winner-badge:empty { display:none; }
  .big-two-result-players li strong { grid-column:3; grid-row:1 / 3; font-size:20px; }
  .big-two-result-players li > .big-two-avatar { grid-row:1 / 3; }
  .big-two-result-players li > span:nth-child(2) { grid-column:2; }
  #bigTwoRematchStatus { font-size:13px; }
  #bigTwoRematch { min-height:54px; font-size:26px; }
  .big-two-result-duration { display:none; }
  .big-two-result-emblem > span { font-size:34px; }
  .big-two-result-emblem,.big-two-result.is-self-win .big-two-result-emblem { font-size:32px; }
}
@media(max-width:950px) and (max-height:500px) and (orientation:landscape) {
  .big-two-chat[open] { top:110px; left:50%; right:auto; transform:translateX(-50%); width:300px; max-height:120px; }
  .big-two-lobby,.big-two-game { padding:8px 16px; }
  .big-two-top { grid-template-columns:120px minmax(0,1fr) 60px; }
  .big-two-top h1 { font-size:23px; }
  .big-two-top > button { min-height:30px; font-size:12px; padding:5px 8px; }
  .big-two-table { height:calc(100dvh - 55px); min-height:315px; grid-template-columns:minmax(0,1fr); grid-template-rows:158px 42px 65px 40px; grid-template-areas:'arena' 'status' 'hand' 'actions'; gap:2px; }
  .big-two-arena,.big-two-own,.big-two-actions { grid-column:auto; grid-row:auto; }
  .big-two-opponent { width:150px; min-height:58px; padding:5px 8px; grid-template-columns:34px minmax(0,1fr); }
  .big-two-opponent .big-two-avatar { display:grid; width:30px; height:30px; font-size:21px; }
  .big-two-opponent strong { grid-column:2; font-size:13px; }
  .big-two-card-count b { font-size:20px; }
  .big-two-card-count small { font-size:12px; }
  .big-two-player-state { font-size:10px; }
  .big-two-opponent[data-position='top'] { top:0; }
  .big-two-opponent[data-position='left'],.big-two-opponent[data-position='right'] { top:46%; }
  .big-two-opponent .big-two-fan { height:20px; }
  .big-two-opponent .big-two-fan i { height:25px; width:21px; }
  .big-two-center { top:45%; width:35%; min-height:87px; padding:4px; gap:2px; font-size:11px; transform:translate(-50%,0); }
  .big-two-current-play { min-height:42px; }
  .big-two-current-play .big-two-card { width:32px; height:44px; font-size:13px; }
  .big-two-current-play .suit { font-size:19px; }
  .big-two-status { display:flex; justify-content:center; gap:14px; }
  .big-two-status strong { flex:none; font-size:14px; }
  #bigTwoTimer { width:62px; height:35px; font-size:19px; }
  .big-two-hand { display:flex; flex-wrap:nowrap; padding:5px 0 0; min-height:55px; max-width:none; }
  .big-two-hand .big-two-card { width:44px; height:54px; padding:3px; font-size:15px; }
  .big-two-hand .big-two-card + .big-two-card { margin-left:-7px; }
  .big-two-hand .suit { font-size:22px; }
  .big-two-hand .corner-suit { font-size:8px; }
  #bigTwoSelectionStatus { font-size:10px; min-height:12px; }
  .big-two-actions { width:350px; gap:14px; }
  .big-two-actions button,#bigTwoPlay { min-height:37px; font-size:19px; }
  .big-two-result { max-width:620px; padding:5px 20px; }
  .big-two-result-emblem { display:none; }
  .big-two-result h2 { font-size:28px; line-height:1.15; margin:2px; }
  .big-two-result p { font-size:14px; margin:5px; }
  .big-two-result-duration { display:none; }
  .big-two-result-columns { padding:3px 15px; font-size:12px; }
  .big-two-result-players { margin:0; }
  .big-two-result-players li { min-height:32px; grid-template-columns:30px minmax(0,1fr) auto auto; padding:2px 10px; margin:3px 0; font-size:16px; }
  .big-two-result-players .big-two-avatar { width:27px; height:27px; font-size:19px; grid-row:auto; }
  .big-two-result-players strong { font-size:17px; }
  .big-two-result-players small { display:none; }
  .big-two-winner-badge { font-size:13px; }
  #bigTwoRematchStatus { font-size:12px; margin:5px; }
  .big-two-rematch-seats { font-size:10px; margin-bottom:5px; }
  .big-two-result-actions { gap:2px; }
  #bigTwoRematch { min-height:34px; font-size:22px; line-height:1.1; padding:5px 14px; }
  #bigTwoResultLeave { min-height:20px; font-size:12px; line-height:1.1; padding:2px 10px; }
  .big-two-seats { height:190px; }
  .big-two-seat { width:180px; grid-template-columns:36px minmax(0,1fr); min-height:48px; padding:5px!important; }
  .big-two-seat .big-two-avatar { width:33px; height:33px; font-size:23px; }
  .big-two-seat strong { font-size:15px; }
  .big-two-seat small { font-size:10px; }
  .big-two-seat .big-two-fan { display:none; }
  .big-two-waiting-actions { margin:4px auto; max-width:700px; flex-wrap:nowrap; }
  #bigTwoWaitingInvite,#bigTwoReady,#bigTwoStart { width:auto; min-height:40px; font-size:18px; }
  .big-two-felt-emblem { font-size:35px; }
  .big-two-felt-emblem span { font-size:18px; }
}
@media(prefers-reduced-motion:reduce) { .big-two-game * { animation:none!important; transition:none!important; } }
@media(min-width:701px) and (min-height:501px) and (max-height:850px) {
  .big-two-result { padding:14px 28px; }
  .big-two-result-emblem,.big-two-result.is-self-win .big-two-result-emblem { font-size:32px; }
  .big-two-result-emblem > span { font-size:42px; }
  .big-two-result h2 { font-size:40px; margin:7px 0; }
  .big-two-result p { font-size:18px; margin:8px 0; }
  .big-two-result-players li { min-height:55px; padding:5px 16px; }
  .big-two-result-players .big-two-avatar { width:40px; height:40px; }
  #bigTwoRematch { min-height:54px; font-size:27px; }
}

/* Section 27: interaction layer, preserving the approved five-screen geometry. */
.big-two-top { grid-template-columns:170px minmax(0,1fr) 184px; }
.big-two-tools { display:flex; align-items:center; justify-content:end; gap:5px; }
.big-two-tools button { padding:8px; min-height:38px; width:42px; }
.big-two-tools svg { width:20px; }
.big-two-popover { position:fixed; right:20px; top:76px; z-index:14; background:#05232af8; border:1px solid #659b97; border-radius:12px; padding:10px; width:280px; font-family:system-ui,sans-serif; box-shadow:0 8px 24px #0008; }
.big-two-popover-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; font-size:14px; }
.big-two-popover-heading button { min-height:24px; padding:0 8px; font-size:18px; }
#bigTwoQuickPhrases { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
#bigTwoQuickPhrases button { min-height:30px; padding:5px 3px; font-size:12px; }
#bigTwoQuickStatus { display:block; font-size:10px; margin-top:5px; color:#cfddd9; }
.big-two-audio-menu { width:360px; display:grid; gap:4px; padding:8px; }
.big-two-audio-channel { display:grid; grid-template-columns:82px minmax(0,1fr); align-items:center; gap:8px; }
.big-two-audio-menu button { min-height:34px; padding:5px; font-size:12px; }
.big-two-volume { display:grid; grid-template-columns:70px minmax(0,1fr) 36px; align-items:center; gap:6px; color:#e2f3ee; font:12px system-ui,sans-serif; }
.big-two-volume input { min-width:0; width:100%; accent-color:#edc15c; }
.big-two-volume output { text-align:right; font-variant-numeric:tabular-nums; }
#bigTwoAudioStatus { min-height:1.25em; color:#bfe1d8; font:11px system-ui,sans-serif; }
.big-two-turn-progress { width:250px; height:12px; border-radius:8px; overflow:hidden; background:#00171b; border:1px solid #5ea994; box-shadow:0 0 12px #2d9d6b45; }
#bigTwoProgressFill { display:block; height:100%; width:100%; transform-origin:left; background:linear-gradient(90deg,#269e82,#7ff2c0); transition:transform .1s linear; }
.big-two-turn-progress[data-state='warning'] { border-color:#ffdd69; }
.big-two-turn-progress[data-state='warning'] #bigTwoProgressFill { background:#ffce55; }
.big-two-turn-progress[data-state='urgent'] { border-color:#ff8b7a; animation:big-two-urgency .7s ease-in-out infinite alternate; }
.big-two-turn-progress[data-state='urgent'] #bigTwoProgressFill { background:#ff685a; }
.big-two-game #bigTwoTimer { display:block; width:auto; height:auto; min-height:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; font:12px system-ui,sans-serif; color:#ddede6; }
.big-two-table.is-own-turn #bigTwoTurn { font-size:23px; color:#ffe294; text-shadow:0 0 14px #e6b64c88; }
.big-two-table.is-own-turn .big-two-own { filter:drop-shadow(0 0 8px #e6b64c30); }
.big-two-opponent.is-acting { box-shadow:0 0 24px #f7c96165,inset 0 0 14px #f7c96115; }
#bigTwoPlay:not(:disabled) { border:2px solid #fff3bd; box-shadow:0 0 16px #eab85075,inset 0 0 0 2px #ba863847; }
.big-two-hand .big-two-card.is-selected { transform:translateY(-20px) rotate(var(--hand-angle,0deg)); box-shadow:0 0 0 2px #ffdc8588,0 8px 18px #0008; }
.big-two-hand.is-dealing .big-two-card { animation:big-two-deal .4s ease-out both; }
.big-two-hand.is-dealing .big-two-card:nth-child(2n) { animation-delay:.04s; }
.big-two-callout { position:fixed; top:16%; left:50%; transform:translateX(-50%); z-index:16; pointer-events:none; width:max-content; max-width:90vw; padding:14px 26px; border:1px solid var(--gold); background:#03262aee; color:#ffe3a0; border-radius:16px; box-shadow:0 0 36px #ebbd4b55; font-size:36px; text-align:center; }
.big-two-callout[data-kind='win'] { top:10%; font-size:42px; background:linear-gradient(135deg,#624a1aee,#123d35ee); }
.big-two-result.is-celebrating { animation:big-two-victory .55s ease-out 2 alternate; }
.big-two-bubble-layer { position:absolute; inset:0; pointer-events:none; z-index:9; }
.big-two-bubble { position:absolute; width:max-content; max-width:156px; background:#eef8ec; color:#09312e; border:1px solid #94e1c2; border-radius:12px 12px 12px 2px; padding:7px 10px; font:14px/1.25 system-ui,sans-serif; box-shadow:0 4px 14px #0006; animation:big-two-bubble 2.6s ease-out both; }
.big-two-self-presence { position:absolute; left:1%; bottom:2%; display:grid; place-items:center; width:28px; height:28px; border:1px solid var(--gold); border-radius:50%; color:var(--gold); background:#03232d; font-size:18px; }
.big-two-pass-flash { position:absolute; bottom:100%; right:0; z-index:10; font:bold 17px system-ui,sans-serif; padding:4px 12px; color:#e1ffef; background:#124c43; border:1px solid #79cdb1; border-radius:8px; animation:big-two-pass 1s ease-out both; pointer-events:none; }
@keyframes big-two-urgency { to { box-shadow:0 0 16px #ff685a88; } }
@keyframes big-two-deal { from { opacity:.2; translate:0 -16px; } to { opacity:1; translate:0 0; } }
@keyframes big-two-pass { 0% { opacity:0; translate:0 5px; } 15%,75% { opacity:1; translate:0 0; } 100% { opacity:0; } }
@keyframes big-two-bubble { 0% { opacity:0; translate:0 4px; } 10%,85% { opacity:1; translate:0 0; } 100% { opacity:0; } }
@keyframes big-two-victory { from { box-shadow:0 0 20px #ecba4f55; } to { box-shadow:0 0 55px #ecba4faa,inset 0 0 16px #ecba4f33; } }
@media(max-width:700px) {
  .big-two-top { grid-template-columns:90px minmax(0,1fr) 108px; }
  .big-two-tools { gap:3px; }
  .big-two-tools button { width:33px; min-height:33px; padding:5px; }
  .big-two-tools svg { width:17px; }
  .big-two-top h1 { font-size:18px; }
  .big-two-popover { top:65px; right:10px; width:min(268px,calc(100vw - 20px)); padding:7px; }
  .big-two-quick-menu { top:172px; left:50%; right:auto; transform:translateX(-50%); width:min(180px,calc(100vw - 212px)); }
  .big-two-popover-heading { margin-bottom:3px; font-size:12px; }
  #bigTwoQuickPhrases { gap:3px; grid-template-columns:1fr; max-height:84px; overflow-y:auto; overscroll-behavior:contain; }
  #bigTwoQuickPhrases button { min-height:27px; padding:3px 2px; font-size:11px; }
  #bigTwoQuickStatus { font-size:9px; line-height:1.2; }
  .big-two-audio-menu { width:170px; left:8px; right:auto; }
  .big-two-audio-channel { grid-template-columns:58px minmax(0,1fr); gap:4px; }
  .big-two-volume { grid-template-columns:50px minmax(0,1fr) 29px; gap:3px; font-size:10px; }
  .big-two-turn-progress { width:200px; height:10px; }
  .big-two-table.is-own-turn #bigTwoTurn { font-size:18px; }
  .big-two-hand .big-two-card.is-selected { transform:translateY(-13px); }
  .big-two-bubble { max-width:124px; font-size:11px; padding:6px; }
  .big-two-self-presence { width:24px; height:24px; font-size:15px; }
  .big-two-callout,.big-two-callout[data-kind='win'] { font-size:27px; padding:10px 16px; }
}
@media(max-width:950px) and (max-height:500px) and (orientation:landscape) {
  .big-two-top { grid-template-columns:120px minmax(0,1fr) 150px; }
  .big-two-tools button { min-height:28px; width:34px; padding:4px; }
  .big-two-status { display:grid; grid-template-columns:auto 170px 42px; align-items:center; gap:10px; }
  .big-two-turn-progress { width:170px; height:10px; }
  .big-two-table.is-own-turn #bigTwoTurn { font-size:16px; }
  .big-two-quick-menu { top:4px; left:12px; right:auto; transform:none; width:min(340px,calc(50vw - 108px)); }
  #bigTwoQuickPhrases { grid-template-columns:repeat(4,118px); grid-template-rows:repeat(2,27px); grid-auto-flow:column; max-height:none; overflow-x:auto; overflow-y:hidden; gap:3px; }
  #bigTwoQuickPhrases button { min-height:26px; padding:2px; font-size:11px; line-height:1.25; white-space:nowrap; }
  .big-two-popover-heading { font-size:11px; margin-bottom:3px; }
  .big-two-popover-heading button { min-height:20px; font-size:16px; padding:0 6px; }
  #bigTwoQuickStatus { font-size:9px; margin-top:3px; }
  #bigTwoQuickStatus::after { content:' · 左右滑動'; }
  .big-two-popover { padding:6px; }
  .big-two-audio-menu { top:42px; right:8px; left:auto; width:176px; padding:5px; gap:3px; }
  .big-two-audio-channel { grid-template-columns:48px minmax(0,1fr); gap:2px; }
  .big-two-audio-menu button { min-height:25px; padding:3px 1px; font-size:10px; }
  .big-two-volume { grid-template-columns:43px minmax(0,1fr) 25px; gap:2px; font-size:9px; }
  #bigTwoAudioStatus { font-size:9px; line-height:1.1; }
  .big-two-bubble { max-width:140px; font-size:11px; padding:5px; }
  .big-two-callout,.big-two-callout[data-kind='win'] { top:5%; font-size:24px; padding:8px 18px; }
  .big-two-self-presence { bottom:0; width:22px; height:22px; }
}

/* PASS/Hint/Play actions and explicitly confirmed cards. */
.big-two-actions{grid-template-columns:1fr 1fr 1.2fr;gap:12px}
.big-two-hand .big-two-card.is-selected{transform:translateY(-20px);outline:2px solid #ffe0a0}
.big-two-tools{width:auto;display:flex;gap:4px}
.big-two-opponent.is-passed .big-two-avatar{filter:saturate(.45)}
.big-two-opponent.is-passed .big-two-player-state,.big-two-passed-badge{color:#b9d8d2;font-size:12px;border:1px solid #789c9580;border-radius:12px;padding:2px 7px}
.big-two-history{color:#fff5dc;background:#061f24;border:1px solid #b9924c;border-radius:16px;width:min(380px,90vw);max-height:70vh;padding:16px;margin:90px 16px auto auto;box-shadow:0 12px 45px #0009}
.big-two-history::backdrop{background:#0005}
.big-two-history header{display:flex;align-items:center;justify-content:space-between;gap:12px}.big-two-history h2{font-size:20px}
.big-two-history ol{padding:0;list-style:none;overflow:auto;max-height:53vh}
.big-two-history li{display:grid;grid-template-columns:55px 1fr auto;gap:8px;padding:10px 0;border-bottom:1px solid #71908955;font-size:14px}
.big-two-history li small{color:#a4c3bd}.big-two-history-cards{grid-column:2/4;display:flex;flex-wrap:wrap;gap:4px}
.big-two-history-cards span{background:#fff4df;color:#15212a;border-radius:3px;padding:4px}.big-two-history-cards .is-red{color:#a42523}
@media(max-width:600px){.big-two-actions{gap:8px;width:90%}.big-two-actions button{font-size:20px}.big-two-history{margin:auto auto 10px;max-height:55vh;width:calc(100vw - 20px)}.big-two-history ol{max-height:38vh}.big-two-tools .icon-button{width:28px;min-width:28px;padding:3px}.big-two-top{grid-template-columns:90px minmax(0,1fr) 124px}}

.big-two-self-presence .big-two-pass-flash{left:0;right:auto}
#bigTwoSelfPassed{position:absolute;top:100%;left:0;white-space:nowrap;background:#092d30}

/* Section 31: public history and held PASS surround the existing table. */
.big-two-actions button{white-space:nowrap;padding-inline:8px}
.big-two-opponent.is-passed .big-two-player-state{font:bold 16px/1.25 system-ui,sans-serif;color:#e4fff0;border:1px solid #9dd5bc;background:#12483fe8;padding:3px 8px}
#bigTwoSelfPassed{font:bold 15px/1.2 system-ui,sans-serif;padding:4px 7px;color:#e4fff0}
.big-two-one-card{position:absolute;top:-24px;right:0;white-space:nowrap;color:#ffe08b;font:bold 13px system-ui,sans-serif;background:#49391ae8;border-radius:7px;padding:3px 6px}
.big-two-near-win{display:block;color:#ffe199;text-align:center;font:bold 16px system-ui,sans-serif;margin:0 0 5px}
.big-two-own.is-near-win{filter:drop-shadow(0 0 9px #edbe5366)}
#bigTwoPlay.is-finishing:not(:disabled){box-shadow:0 0 24px #ffd067aa;border-color:#fff5c3}
.big-two-callout[data-kind='pair']{font-size:26px}
.big-two-callout[data-kind='straight']{font-size:30px;box-shadow:0 0 26px #9edcce66}
.big-two-callout[data-kind='full-house']{font-size:34px;box-shadow:0 0 32px #ffc96588}
.big-two-callout[data-kind='four-kind']{font-size:36px;border-width:3px;box-shadow:0 0 40px #efaa5588}
.big-two-callout[data-kind='straight-flush']{font-size:38px;border-width:3px;background:linear-gradient(120deg,#493817ee,#103d3cee);box-shadow:0 0 45px #f8dc8099}
.big-two-recent-history{position:relative;width:min(520px,94%);margin:0 auto;color:#dbeee4;background:#052529e8;border:1px solid #67968a66;border-radius:9px;padding:5px 8px;font:11px/1.3 system-ui,sans-serif;overflow:hidden}
.big-two-recent-history h2{font-size:11px;color:#eed4a0;margin:0 0 2px}
.big-two-recent-history ol{list-style:none;padding:0;margin:0;max-height:42px;overflow:auto;overscroll-behavior:contain}
.big-two-recent-history li{display:flex;gap:5px;align-items:center;min-height:19px;white-space:nowrap}
.big-two-recent-history li strong{max-width:80px;overflow:hidden;text-overflow:ellipsis}
.big-two-recent-history li small{color:#9bbdb1}
.big-two-recent-history .big-two-history-cards{display:flex;gap:3px}
.big-two-recent-history .big-two-history-cards span{padding:1px 3px}
@media(min-width:1100px) and (min-height:650px){
 .big-two-recent-history{position:absolute;right:0;bottom:90px;width:270px;height:200px;margin:0;padding:10px;z-index:2}
 .big-two-recent-history h2{font-size:14px;margin-bottom:5px}
 .big-two-recent-history ol{max-height:160px;overflow:auto}
 .big-two-recent-history li{white-space:normal;flex-wrap:wrap;padding:5px 0;border-bottom:1px solid #749d8955}
 .big-two-own{max-width:calc(100% - 570px);margin-inline:auto}
}
@media(max-width:700px){.big-two-opponent.is-passed .big-two-player-state{font-size:13px;padding:2px 5px}.big-two-one-card{font-size:11px;top:-19px}.big-two-near-win{font-size:13px;margin-bottom:2px}.big-two-callout[data-kind]{font-size:22px;max-width:90vw}}
@media(max-width:950px) and (max-height:500px) and (orientation:landscape){.big-two-recent-history{position:absolute;right:4px;bottom:55px;width:190px;max-height:62px;margin:0}.big-two-own{padding-right:194px}.big-two-near-win{font-size:11px}}
@media(prefers-reduced-motion:reduce){.big-two-own.is-near-win{filter:none}}

@media(min-width:951px) and (max-width:1099px){.big-two-table{grid-template-rows:minmax(200px,1fr) 60px 82px auto 58px;grid-template-areas:'arena' 'status' 'recent' 'hand' 'actions'}.big-two-recent-history{grid-area:recent}}
@media(max-width:700px){.big-two-table{grid-template-rows:minmax(215px,1fr) 45px 82px 158px 52px;grid-template-areas:'arena' 'status' 'recent' 'hand' 'actions'}.big-two-recent-history{grid-area:recent}}
@media(max-width:950px) and (min-width:701px) and (min-height:501px){.big-two-table{grid-template-rows:minmax(200px,1fr) 60px 82px auto 58px;grid-template-areas:'arena' 'status' 'recent' 'hand' 'actions'}.big-two-recent-history{grid-area:recent}}

@media(max-width:1099px) and (min-height:501px){
 .big-two-recent-history ol{max-height:62px;overflow:auto}
 .big-two-recent-history li{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:1px 4px;min-height:28px}
 .big-two-recent-history .big-two-history-cards{grid-column:2/4;flex-wrap:nowrap}
 .big-two-recent-history .big-two-history-cards span{font-size:10px;padding:0 3px}
}

.big-two-quick-menu.is-compact #bigTwoQuickPhrases{max-height:84px;overflow-y:auto;overscroll-behavior:contain}

/* Enlarge only the local authoritative last card; preserve selection transforms. */
.big-two-own.is-last-card .big-two-hand{padding-top:34px}
.big-two-own.is-last-card .big-two-hand .big-two-card{width:100px;height:140px;font-size:32px;border:2px solid #edc878;box-shadow:0 0 22px #eac15d66,0 6px 18px #0008}
.big-two-own.is-last-card .big-two-hand .suit{font-size:46px}
.big-two-own.is-last-card .big-two-near-win{color:#fff0b5;text-shadow:0 0 12px #e6b64c88;letter-spacing:.08em}
@media(max-width:700px){.big-two-own.is-last-card .big-two-hand{padding-top:14px}.big-two-own.is-last-card .big-two-hand .big-two-card{width:70px;height:94px;font-size:24px}.big-two-own.is-last-card .big-two-hand .suit{font-size:32px}}
@media(max-width:950px) and (max-height:500px) and (orientation:landscape){.big-two-own.is-last-card .big-two-hand{padding-top:0;min-height:55px}.big-two-own.is-last-card .big-two-hand .big-two-card{width:54px;height:64px;font-size:18px}.big-two-own.is-last-card .big-two-hand .suit{font-size:26px}.big-two-own.is-last-card .big-two-near-win{margin-bottom:0}}
@media(max-width:950px) and (max-height:500px) and (orientation:landscape){.big-two-table:has(.big-two-own.is-last-card){grid-template-rows:145px 42px 84px 40px}.big-two-own.is-last-card{position:relative}.big-two-own.is-last-card .big-two-hand{padding-top:20px;min-height:84px}.big-two-own.is-last-card .big-two-near-win,.big-two-own.is-last-card #bigTwoSelectionStatus{position:absolute;left:calc(50% - 250px);width:110px;text-align:center}.big-two-own.is-last-card .big-two-near-win{top:5px}.big-two-own.is-last-card #bigTwoSelectionStatus{top:27px;margin:0}}

/* Hint previews do not move or commit a card. Keep finishing-hand geometry. */
.big-two-hand .big-two-card.is-suggested:not(.is-selected){outline:3px solid #e8a853;outline-offset:-3px;box-shadow:0 0 0 2px #fff1c5,0 0 14px #e8a85399;}
