/* Flat table drawn in HTML/CSS (dist/ui/flat-table.js): shared parts first, then the PC layout (scaled 1672×941 canvas) and the upright phone layout. */
.flat-table{display:none}
.flat-backdrop{position:absolute;inset:0;background:linear-gradient(180deg,#0b062033 0%,#0b062055 34%,#0b0620e6 64%,#0b0620 80%),url('/assets/tokyo-neon-city.png') 50% 64px/max(100%,1500px) auto no-repeat}
.flat-felt{position:absolute;inset:0;border-radius:50%;background:radial-gradient(ellipse at 50% 42%,#46247e 0%,#2a1356 48%,#170a33 78%,#10071f 100%);border:16px solid #1c0f36;box-shadow:0 14px 0 2px #120724,0 15px 0 4px #ff52d966,0 0 0 3px #ff52d9,0 0 26px 6px #ff3fd099,0 0 70px 10px #a23cff55,inset 0 0 0 3px #9a6bff,inset 0 0 50px #000b,0 40px 70px #000d}
.flat-felt:after{content:'';position:absolute;inset:22px;border-radius:50%;border:1px solid #ffffff1f}
.flat-mark{position:absolute;left:50%;top:66%;transform:translate(-50%,-50%);text-align:center;opacity:.16;pointer-events:none}
.flat-mark em{display:block;font:italic 900 clamp(34px,4.2vw,60px)/1 'Shippori Mincho B1',serif;color:#d9b8ff;letter-spacing:2px;transform:skewX(-8deg)}
.flat-mark span{display:block;margin-top:6px;font-size:11px;letter-spacing:6px;color:#e6d4ff}
.flat-center{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:12px}
.flat-pot{display:flex;align-items:flex-end;gap:12px;padding:6px 16px 8px;border-radius:999px;background:#0d0820d9;border:1px solid #ffffff22;color:#fff;font-size:15px;box-shadow:0 4px 14px #0008}
.flat-pot b{font-size:18px;font-variant-numeric:tabular-nums}
.flat-board{display:flex;gap:10px}
.flat-table .playing-card{transform:none;margin:0}
.flat-board .playing-card,.flat-slot{width:clamp(52px,4.4vw,72px);aspect-ratio:.71;height:auto;border-radius:7px}
.flat-board .playing-card{font-size:clamp(20px,1.7vw,28px);padding:5px 7px;background:#fffdf8;border:0;box-shadow:0 10px 22px #000a}
.flat-board .playing-card .suit{font-size:clamp(28px,2.4vw,42px)}
.flat-slot{display:block;border:1px dashed #ffffff2e;background:#ffffff08}
/* Chips: each coin is an ellipse (the table is seen from above at an angle) with a striped
   edge, a solid centre and a darker side band for thickness; coins stack upwards. */
.flat-stack{display:inline-flex;align-items:flex-end;gap:3px;padding-top:4px}
.flat-col{display:flex;flex-direction:column-reverse;align-items:center}
.flat-coin{--c:#2f6bff;--d:#183a96;--s:#eef3ff;display:block;width:38px;height:17px;border-radius:50%;margin-top:-12px;background:radial-gradient(ellipse at 50% 45%,var(--c) 0 46%,var(--s) 47% 50%,transparent 51%),repeating-conic-gradient(from 8deg,var(--c) 0 26deg,var(--s) 26deg 40deg);box-shadow:0 5px 0 var(--d),0 5px 0 1px #0000004d,0 8px 6px #000a,inset 0 -1px 2px #0004}
.flat-col .flat-coin:first-child{margin-top:0}
.coin-pink{--c:#e8417f;--d:#8e1d48;--s:#ffe6ef}.coin-gold{--c:#f2b41f;--d:#94640a;--s:#fff6d6}.coin-black{--c:#463d6e;--d:#1c1633;--s:#e9e3ff}
.flat-pot .flat-coin{width:44px;height:20px;margin-top:-14px}.flat-pot .flat-col .flat-coin:first-child{margin-top:0}
.flat-bet>span:last-child{padding:1px 8px;border-radius:999px;background:#0b0718cc}
.flat-seat,.flat-bet,.flat-dealer{left:var(--x);top:var(--y)}
.flat-bet{position:absolute;transform:translate(-50%,-70%);display:flex;flex-direction:column;align-items:center;gap:3px;padding:0;background:none;color:#ffe8a3;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.flat-dealer{position:absolute;z-index:4;transform:translate(-50%,-50%);width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#f4f1ff;color:#1b1233;font:800 13px/1 sans-serif;box-shadow:0 0 0 3px #0005,0 3px 8px #000a}
.flat-seat{position:absolute;transform:translate(-50%,-62%);display:flex;flex-direction:column;align-items:center;gap:0;width:170px;z-index:2;transition:opacity .2s}
.flat-portrait{position:relative;width:clamp(76px,6.4vw,104px);aspect-ratio:1;border-radius:50%;background:#1a1033;border:3px solid #b9a5ff66;box-shadow:0 0 0 2px #0008,0 8px 22px #000b;margin-bottom:-12px;z-index:1}
.flat-portrait>.avatar,.flat-portrait>svg,.flat-portrait>.flat-portrait-empty{width:100%;height:100%;border:0;border-radius:50%;box-shadow:none;display:block}
.flat-portrait-empty{display:grid!important;place-items:center;font-size:36px;color:#b9a5ffaa;background:radial-gradient(#2b1a55,#140a2a)}
.flat-badge{position:absolute;right:-6px;bottom:6px;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font:800 11px/1 sans-serif;color:#fff;background:#2f73ff;border:2px solid #fff;box-shadow:0 2px 6px #000a}
.flat-badge.badge-bb{background:#e8a51a}
.flat-plate{position:relative;z-index:2;display:flex;align-items:center;gap:10px;min-width:150px;padding:6px 14px 6px 6px;border-radius:8px;background:linear-gradient(#1d1640f2,#0e0a24f2);border:1px solid #8a76e080;box-shadow:0 6px 18px #000b;color:#fff}
.flat-suit{width:34px;height:34px;display:grid;place-items:center;border-radius:5px;border:1px solid #8f86ff88;background:#251c55;color:#9a8cff;font-size:18px}
.flat-plate strong{display:block;font-size:13px;font-weight:600;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.flat-plate b{display:block;font-size:17px;font-variant-numeric:tabular-nums;letter-spacing:.3px}
.flat-state{margin-top:5px;padding:2px 9px;border-radius:999px;background:#0b0718cc;color:#d8c9ff;font-size:11px;font-style:normal;white-space:nowrap}
.flat-seat.flat-now .flat-portrait{border-color:#ff5bd8;box-shadow:0 0 0 3px #ff5bd855,0 0 26px #ff4fd8aa}
.flat-seat.flat-now .flat-plate{border-color:#ff5bd8;box-shadow:0 0 18px #ff4fd866}
.flat-seat.flat-out{opacity:.45}.flat-seat.flat-out .flat-portrait{filter:grayscale(1)}
.flat-seat.flat-win .flat-plate{border-color:#ffd56a;box-shadow:0 0 20px #ffd56a77}.flat-seat.flat-win .flat-state{background:#ffd56a;color:#2a1b00;font-weight:800}
/* Shown cards sit beside the portrait, on the side facing the middle of the table. */
.flat-reveal{position:absolute;top:4px;left:calc(50% + 56px);display:grid;grid-template-columns:auto auto;gap:3px;justify-items:center;z-index:3}
.flat-right .flat-reveal{left:auto;right:calc(50% + 56px)}
.flat-reveal small{grid-column:1/-1;padding:1px 7px;border-radius:999px;background:#0b0718d9;font-size:11px;color:#ffe9a8;white-space:nowrap}
.flat-small .flat-portrait{width:84px}.flat-small .flat-plate{min-width:128px;padding:5px 10px 5px 5px;gap:7px}.flat-small .flat-suit{width:28px;height:28px;font-size:15px}.flat-small .flat-plate b{font-size:15px}.flat-small .flat-reveal{left:calc(50% + 46px)}.flat-small.flat-right .flat-reveal{right:calc(50% + 46px)}
.flat-seat.flat-me{transform:translate(-50%,-48%);width:300px;z-index:3}
.flat-seat.flat-me .flat-portrait{width:clamp(96px,7.6vw,124px);border-color:#ff7ae2;box-shadow:0 0 0 3px #ff52d955,0 0 30px #ff3fd0aa;margin-bottom:-14px}
.flat-hole{position:absolute;left:calc(50% + 6px);top:-6px;display:flex;z-index:2}
.flat-hole .playing-card{width:clamp(54px,4.3vw,70px);aspect-ratio:.71;height:auto;font-size:clamp(20px,1.7vw,27px);padding:5px 7px;border:0;border-radius:7px;background:#fffdf8;box-shadow:0 10px 22px #000b}
.flat-hole .playing-card .suit{font-size:clamp(28px,2.4vw,40px)}
.flat-hole .playing-card:first-child{transform:rotate(-8deg)}.flat-hole .playing-card:last-child{transform:rotate(9deg) translate(-14px,4px)}
.flat-seat.flat-me .flat-plate{flex-direction:column;align-items:center;gap:1px;min-width:190px;padding:8px 18px;border:1px solid #6fd3ff;box-shadow:0 0 0 1px #ff52d955,0 0 22px #3fb6ff66,0 8px 20px #000b}
.flat-seat.flat-me .flat-plate b{font-size:21px;color:#ffd96e}
.flat-seat.flat-me .flat-plate small{font-size:11px;color:#cfe9ff}
.flat-turn small{display:block;font-size:11px;color:#bcb1e6;letter-spacing:1px}
.flat-turn strong{font-size:17px}
.flat-turn.flat-now{border-color:#ff5bd8;box-shadow:0 0 18px #ff4fd855}
.flat-fly{position:absolute;z-index:6;pointer-events:none}
.flat-fly-card{width:26px;height:36px;border-radius:4px;background:repeating-linear-gradient(45deg,#3b2470 0 4px,#2a1856 4px 8px);border:2px solid #f2e9ff;box-shadow:0 4px 8px #0009}
.flat-board{perspective:600px}
@media(min-width:901px){
 /* One fixed design size (the reference layout), scaled uniformly to the window. */
 body:not(.tutorial-table) .arena-screen.night-table{position:fixed;left:50%;top:50%;width:1672px;height:941px;min-height:0;transform:translate(-50%,-50%) scale(var(--table-scale,1));transform-origin:50% 50%}
 body.immersive:not(.tutorial-table){background:#07040f}
 .night-table .arena-scene,.night-table .arena-vignette,.night-table .night-phase-track,.night-table .arena-pot,.night-table .hand-plinth,.night-table .arena-announcement{display:none!important}
 .flat-table{display:block;position:absolute;inset:0;z-index:0;overflow:hidden;background:#0b0620}
 /* The table fills the space between the info card (left) and the hand history (right). */
 .night-table{--flat-l:210px;--flat-r:294px}
 .flat-stage{position:absolute;left:calc((var(--flat-l) + 100% - var(--flat-r))/2 - 20px);top:47%;width:min(calc(100% - var(--flat-l) - var(--flat-r) - 170px),calc((941px - 330px)*2.05),1080px);aspect-ratio:2.05;transform:translate(-50%,-50%)}
 .flat-turn{position:absolute;left:calc((var(--flat-l) + 100% - var(--flat-r))/2 - 20px);bottom:18px;transform:translateX(-50%);min-width:250px;padding:10px 22px;border-radius:10px;background:#0d0820e6;border:1px solid #ffffff1f;color:#fff;text-align:left;z-index:4}
 .night-table .night-header,.night-table .night-table-info,.night-table .night-inspector,.night-table .arena-dock,.night-table .night-phase-track,.night-table .night-caption{z-index:5}
 /* The AI assist moves to the bottom left (the action panel keeps only the controls); the turn
    line inside the panel is shown by the box under the table instead. */
 body:not(.tutorial-table) .night-table .arena-controls .assist-panel{position:fixed;left:16px;bottom:16px;width:420px;z-index:6;margin:0}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .turn-status{display:none!important}
 .night-table .night-caption{display:none}
}
@media(min-width:901px) and (max-width:1200px){.night-table{--flat-l:200px;--flat-r:252px}}
/* Phones: the same table, standing upright between the table info and the action panel. */
@media(max-width:900px){
 body:not(.tutorial-table) .night-table .arena-scene,body:not(.tutorial-table) .night-table .arena-vignette,body:not(.tutorial-table) .night-table .mobile-table-seats,body:not(.tutorial-table) .night-table .arena-pot,body:not(.tutorial-table) .night-table .mobile-board,body:not(.tutorial-table) .night-table .mobile-felt-mark,body:not(.tutorial-table) .night-table .hand-plinth,body:not(.tutorial-table) .night-table .arena-announcement{display:none!important}
 body:not(.tutorial-table) .night-table .flat-table{display:block;position:absolute;left:0;right:0;top:0;bottom:0;z-index:1;overflow:hidden;background:#0b0620}
 .night-table .flat-backdrop{position:absolute;inset:0;background:linear-gradient(180deg,#0b062022 0%,#0b062066 30%,#0b0620e0 55%,#0b0620 70%),url('/assets/tokyo-neon-city.png') 50% 52px/auto 360px no-repeat}
 .night-table .flat-seat,.night-table .flat-bet,.night-table .flat-dealer{left:var(--mx);top:var(--my)}
 .night-table .flat-stage{position:absolute;left:5%;right:5%;top:calc(var(--table-stage-top,164px) + 34px);bottom:calc(var(--flat-floor,330px) + 100px);transform:none}
 .night-table .flat-felt{border-width:9px;box-shadow:0 8px 0 1px #120724,0 9px 0 3px #ff52d966,0 0 0 2px #ff52d9,0 0 16px 4px #ff3fd099,inset 0 0 0 2px #9a6bff,inset 0 0 30px #000b}
 .night-table .flat-felt:after{inset:12px}
 .night-table .flat-mark{top:76%}.night-table .flat-mark em{font-size:22px}.night-table .flat-mark span{font-size:7px;letter-spacing:3px}
 .night-table .flat-center{top:52%;gap:7px}
 .night-table .flat-pot{gap:7px;padding:3px 10px 4px;font-size:11px}.night-table .flat-pot b{font-size:13px}
 .night-table .flat-board{gap:4px}
 .night-table .flat-board .playing-card,.night-table .flat-slot{width:min(36px,9vw);aspect-ratio:.71;height:auto;border-radius:4px}
 .night-table .flat-board .playing-card{font-size:13px;padding:2px 3px;background:#fffdf8;border:0;box-shadow:0 5px 10px #000a}
 .night-table .flat-board .playing-card .suit{font-size:18px}.night-table .flat-board .playing-card small{display:none}
 .night-table .flat-table .playing-card{transform:none;margin:0}
 .night-table .flat-coin{width:24px;height:11px;margin-top:-8px}.night-table .flat-pot .flat-coin{width:26px;height:12px;margin-top:-9px}
 .night-table .flat-bet{font-size:10px}
 .night-table .flat-dealer{width:18px;height:18px;font-size:9px;z-index:4}
 .night-table .flat-seat{width:96px;transform:translate(-50%,-58%)}
 .night-table .flat-portrait{width:44px;border-width:2px;margin-bottom:-7px}
 .night-table .flat-badge{width:18px;height:18px;font-size:7px;right:-5px;bottom:2px;border-width:1px}
 .night-table .flat-plate{min-width:0;gap:0;padding:3px 7px;border-radius:6px}
 .night-table .flat-suit{display:none}
 .night-table .flat-plate strong{font-size:9px;max-width:80px}.night-table .flat-plate b{font-size:12px}
 .night-table .flat-state{margin-top:2px;padding:1px 6px;font-size:8px}
 .night-table .flat-reveal,.night-table .flat-right .flat-reveal{position:static;display:flex;flex-wrap:wrap;justify-content:center;gap:2px;margin-top:2px}
 .night-table .flat-reveal .playing-card{width:22px;height:30px;font-size:9px;padding:1px 2px}
 .night-table .flat-reveal small{font-size:8px}
 .night-table .flat-seat.flat-me{width:220px;transform:translate(-50%,-36%)}
 .night-table .flat-seat.flat-me .flat-portrait{width:58px;margin-bottom:-8px}
 .night-table .flat-hole{left:calc(50% + 4px);top:-10px}
 .night-table .flat-hole .playing-card{width:44px;aspect-ratio:.71;height:auto;font-size:17px;padding:3px 4px;border:0;border-radius:5px;background:#fffdf8;box-shadow:0 6px 14px #000b}
 .night-table .flat-hole .playing-card .suit{font-size:24px}
 .night-table .flat-hole .playing-card:first-child{transform:rotate(-8deg)}.night-table .flat-hole .playing-card:last-child{transform:rotate(9deg) translate(-10px,3px)}
 .night-table .flat-seat.flat-me .flat-plate{flex-direction:column;align-items:center;min-width:120px;padding:4px 12px;border:1px solid #6fd3ff;box-shadow:0 0 14px #3fb6ff66}
 .night-table .flat-seat.flat-me .flat-plate strong{font-size:10px}.night-table .flat-seat.flat-me .flat-plate b{font-size:15px;color:#ffd96e}.night-table .flat-seat.flat-me .flat-plate small{font-size:9px;color:#cfe9ff}
 .night-table .flat-seat.flat-now .flat-portrait{border-color:#ff5bd8;box-shadow:0 0 0 2px #ff5bd855,0 0 16px #ff4fd8aa}
 .night-table .flat-turn{display:none}
 .night-table .flat-fly-card{width:16px;height:22px;border-width:1px}
 .night-table .flat-small .flat-portrait{width:38px}
 /* Seven or more players: each seat already shows its action and amount, so no chip piles. */
 .night-table .flat-many .flat-bet{display:none}.night-table .flat-small .flat-plate strong{font-size:8px;max-width:64px}.night-table .flat-small .flat-plate b{font-size:11px}
}
/* Phones, portrait: compact controls and header so the table gets the height (Safari's bars take a lot). */
@media(max-width:900px) and (orientation:portrait){
 body:not(.tutorial-table) .arena-screen.night-table{--table-stage-top:96px}
 body:not(.tutorial-table) .arena-screen.night-table .night-phase-track{display:none}
 body:not(.tutorial-table) .arena-screen.night-table .mobile-table-meta{top:62px}
 body:not(.tutorial-table) .arena-screen.night-table .mobile-table-meta p{display:none}
 body:not(.tutorial-table) .arena-screen.night-table .mobile-table-meta h2{font-size:13px}
 body:not(.tutorial-table) .arena-screen.night-table .mobile-history-peek{top:58px;padding:5px 9px;min-height:0}
 body:not(.tutorial-table) .arena-screen.night-table .mobile-history-peek>span,body:not(.tutorial-table) .arena-screen.night-table .mobile-history-peek>small{display:none}
 body:not(.tutorial-table) .arena-screen.night-table .mobile-history-peek b{font-size:11px}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .turn-status{display:none!important}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls #raise-range{display:block;flex:1;min-width:0;height:34px;margin:0 2px;accent-color:#ff5fc8}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .raise-controls{justify-content:center;margin:2px 0 4px;padding:3px 6px}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .raise-controls .mobile-raise-step{width:34px;height:34px;min-height:0}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls #raise-input{height:34px;min-height:0;max-width:86px}
 body:not(.tutorial-table) .arena-screen.night-table .raise-presets button{min-height:0;height:30px;padding:0 4px;font-size:11px}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .controls-actions .btn{min-height:0;height:56px;padding:4px 2px}
 /* AI assist: one line with the recommendation only. */
 body:not(.tutorial-table) .arena-screen.night-table .assist-panel{display:flex;align-items:center;gap:8px;padding:5px 8px;margin-bottom:4px;min-height:0}
 body:not(.tutorial-table) .arena-screen.night-table .assist-panel .assist-stats,body:not(.tutorial-table) .arena-screen.night-table .assist-panel .assist-advice span,body:not(.tutorial-table) .arena-screen.night-table .assist-panel>small{display:none}
 body:not(.tutorial-table) .arena-screen.night-table .assist-panel .assist-advice,body:not(.tutorial-table) .arena-screen.night-table .assist-panel .assist-line{margin:0;font-size:11px}
 body:not(.tutorial-table) .arena-screen.night-table .assist-panel .assist-toggle{padding:3px 8px;font-size:11px}
}
/* Phones, landscape: the table spans the full width (wide oval, PC seat points) and the actions
   sit in one strip along the bottom. Seats put the face beside the name to save height. */
@media(max-width:900px) and (orientation:landscape){
 body:not(.tutorial-table) .arena-screen.night-table{--strip:54px;height:100dvh;min-height:0!important;overflow:hidden}
 body:not(.tutorial-table) .arena-screen.night-table .night-phase-track,body:not(.tutorial-table) .arena-screen.night-table .mobile-table-meta,body:not(.tutorial-table) .arena-screen.night-table .night-brand,body:not(.tutorial-table) .arena-screen.night-table .arena-controls .turn-status,body:not(.tutorial-table) .arena-screen.night-table .arena-controls #raise-range{display:none!important}
 body:not(.tutorial-table) .arena-screen.night-table .night-header{height:auto;padding:max(4px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) 0 max(6px,env(safe-area-inset-left));background:none;pointer-events:none}
 body:not(.tutorial-table) .arena-screen.night-table .night-header>*{pointer-events:auto}
 body:not(.tutorial-table) .arena-screen.night-table .night-header .btn,body:not(.tutorial-table) .arena-screen.night-table .night-header .bgm-toggle{width:30px;height:30px;min-height:0;padding:0}
 body:not(.tutorial-table) .arena-screen.night-table .mobile-history-peek{top:max(4px,env(safe-area-inset-top));left:calc(max(6px,env(safe-area-inset-left)) + 36px);right:auto;width:auto;height:28px;padding:0 10px;min-height:0;display:flex;align-items:center}
 body:not(.tutorial-table) .arena-screen.night-table .mobile-history-peek>span,body:not(.tutorial-table) .arena-screen.night-table .mobile-history-peek>small{display:none}
 body:not(.tutorial-table) .arena-screen.night-table .mobile-history-peek b{font-size:10px}
 .night-table .flat-backdrop{background:linear-gradient(180deg,#0b062066 0%,#0b0620b0 60%,#0b0620 100%),url('/assets/tokyo-neon-city.png') 50% 0/cover no-repeat}
 .night-table .flat-stage{left:max(10%,calc(env(safe-area-inset-left) + 52px));right:max(10%,calc(env(safe-area-inset-right) + 52px));top:24px;bottom:calc(var(--flat-floor,64px) + 34px)}
 .night-table .flat-seat,.night-table .flat-bet,.night-table .flat-dealer{left:var(--x);top:var(--y)}
 .night-table .flat-felt{border-width:7px}
 .night-table .flat-mark{top:72%}.night-table .flat-mark em{font-size:18px}
 .night-table .flat-center{top:46%;gap:4px}
 .night-table .flat-board .playing-card,.night-table .flat-slot{width:32px}
 .night-table .flat-board .playing-card{font-size:12px}.night-table .flat-board .playing-card .suit{font-size:16px}
 .night-table .flat-coin{width:20px;height:9px;margin-top:-7px}.night-table .flat-pot .flat-coin{width:22px;height:10px;margin-top:-7px}
 .night-table .flat-bet{font-size:9px;gap:1px}
 /* Other seats: face on the left, name and points on the right, the last action underneath. */
 .night-table .flat-seat{display:grid;grid-template-columns:auto auto;align-items:center;width:max-content;transform:translate(-50%,-50%)}
 .night-table .flat-seat .flat-portrait,.night-table .flat-small .flat-portrait{grid-row:1/3;width:38px;margin:0 -6px 0 0}
 .night-table .flat-seat .flat-plate{padding:2px 7px 2px 10px;white-space:nowrap}
 .night-table .flat-seat .flat-state{grid-column:2;justify-self:start;margin:1px 0 0 6px;font-size:8px;padding:0 5px}
 .night-table .flat-badge{width:15px;height:15px;font-size:6px;right:-3px;bottom:0}
 .night-table .flat-reveal{grid-column:1/-1}
 /* The viewer: face, cards and points side by side, just above the action strip. */
 .night-table .flat-seat.flat-me{display:flex;flex-direction:row;align-items:center;gap:4px;width:max-content;transform:translate(-50%,-62%)}
 .night-table .flat-seat.flat-me .flat-portrait{width:44px;margin:0}
 .night-table .flat-hole{position:static;display:flex}
 .night-table .flat-hole .playing-card{width:34px;font-size:14px;padding:2px 3px}.night-table .flat-hole .playing-card .suit{font-size:18px}
 .night-table .flat-hole .playing-card:last-child{transform:rotate(8deg) translate(-6px,2px)}
 .night-table .flat-seat.flat-me .flat-plate{min-width:0;padding:3px 10px}
 .night-table .flat-seat.flat-me .flat-plate b{font-size:14px}
 /* Actions: one strip along the bottom — buttons on the left, amount and presets on the right. */
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls{left:0;right:0;top:auto;bottom:0;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,32%);grid-template-areas:"actions raise" "actions presets";column-gap:6px;row-gap:3px;padding:3px max(8px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));border-radius:0;border-top:1px solid #714395}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls>*{margin:0}
 /* The AI assist floats at the bottom left of the table, out of the strip. */
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .assist-panel{position:fixed;left:max(8px,env(safe-area-inset-left));bottom:calc(var(--flat-floor,64px) + 6px);max-width:calc(50% - 140px);overflow:hidden;z-index:6;flex-wrap:nowrap;white-space:nowrap}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .controls-actions{grid-area:actions;display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:5px}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .controls-actions .btn{width:auto;min-height:0;height:var(--strip);padding:2px;font-size:12px;line-height:1.15}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .controls-actions .btn small{display:none}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .raise-controls{grid-area:raise;justify-content:center;gap:5px;padding:2px 4px}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .raise-controls .mobile-raise-step{width:24px;height:24px;min-height:0;font-size:18px}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls #raise-input{flex:1;height:24px;min-height:0;font-size:13px}
 /* After a hand: the result line on the right, the buttons on the left. */
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .payout{grid-area:raise;align-self:end;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .payout-detail{grid-area:presets;align-self:start;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .controls-actions .hint{margin:0;font-size:11px;align-self:center}
 body:not(.tutorial-table) .arena-screen.night-table .raise-presets{grid-area:presets;display:grid;grid-template-columns:repeat(4,1fr);gap:3px}
 body:not(.tutorial-table) .arena-screen.night-table .raise-presets button{min-height:0;height:22px;padding:0 1px;font-size:9px}
 body:not(.tutorial-table) .arena-screen.night-table .assist-panel{display:flex;align-items:center;gap:6px;padding:2px 6px;min-height:0}
 body:not(.tutorial-table) .arena-screen.night-table .assist-panel .assist-stats,body:not(.tutorial-table) .arena-screen.night-table .assist-panel .assist-advice span,body:not(.tutorial-table) .arena-screen.night-table .assist-panel>small{display:none}
 body:not(.tutorial-table) .arena-screen.night-table .assist-panel .assist-advice,body:not(.tutorial-table) .arena-screen.night-table .assist-panel .assist-line{margin:0;font-size:10px}
 body:not(.tutorial-table) .arena-screen.night-table .assist-panel .assist-toggle{padding:1px 6px;font-size:10px}
}
/* Hint to turn the phone sideways: portrait phones only, until closed once. */
.rotate-hint{display:none}
@media(max-width:900px) and (orientation:portrait){
 body:not(.tutorial-table) .arena-screen.night-table .rotate-hint{display:flex;align-items:center;gap:6px;position:absolute;left:10px;top:56px;z-index:8;width:max-content;max-width:calc(100% - 170px);padding:4px 4px 4px 10px;font-size:11px!important;line-height:1.35;border:1px solid #ff5bd8aa;border-radius:999px;background:#140a2ef0;box-shadow:0 0 16px #ff4fd855;color:#f4ecff;font-size:12px}
 .rotate-hint>span{font-size:16px;color:#ff8be3}
 .rotate-hint p{margin:0}
 .rotate-hint button{width:28px;height:28px;border:0;border-radius:50%;background:#ffffff1a;color:#fff;font-size:16px;line-height:1;cursor:pointer}
}
/* Table talk (AI rival matches): a speech bubble by the speaker's seat. */
.flat-bubble{position:absolute;left:var(--x);top:var(--y);z-index:7;transform:translate(-50%,calc(-100% - 70px));width:max-content;max-width:280px;padding:9px 14px 10px;border-radius:14px;background:#fffdf8;color:#1b1233;font-size:15px;font-weight:600;line-height:1.45;box-shadow:0 8px 22px #000a,0 0 0 2px #ff5bd8aa;pointer-events:none;animation:bubble-in .22s ease-out}
.flat-bubble b{display:block;font-size:11px;font-weight:700;color:#b02a8c;margin-bottom:1px}
.flat-bubble:after{content:'';position:absolute;left:50%;bottom:-8px;width:16px;height:16px;background:#fffdf8;transform:translateX(-50%) rotate(45deg);box-shadow:3px 3px 0 0 #ff5bd855}
.flat-bubble.flat-bubble-below-pc{transform:translate(-50%,64px)}
.flat-bubble.flat-bubble-below-pc:after{bottom:auto;top:-8px}
.flat-bubble.flat-bubble-me{background:#e9f6ff;box-shadow:0 8px 22px #000a,0 0 0 2px #6fd3ffaa}
.flat-bubble.flat-bubble-me:after{background:#e9f6ff}
.flat-bubble.flat-bubble-me b{color:#1f6fb0}
@keyframes bubble-in{from{opacity:0;margin-top:8px}to{opacity:1;margin-top:0}}
@media(prefers-reduced-motion:reduce){.flat-bubble{animation:none}}
@media(max-width:900px){
 .night-table .flat-bubble{left:var(--mx);top:var(--my);max-width:min(220px,60vw);padding:6px 10px 7px;font-size:12px;border-radius:11px;transform:translate(-50%,calc(-100% - 40px))}
 .night-table .flat-bubble b{font-size:9px}
 .night-table .flat-bubble:after{width:11px;height:11px;bottom:-5px}
 .night-table .flat-bubble.flat-bubble-below,.night-table .flat-bubble.flat-bubble-below-pc{transform:translate(-50%,calc(-100% - 40px))}
 .night-table .flat-bubble.flat-bubble-below{transform:translate(-50%,40px)}
 .night-table .flat-bubble.flat-bubble-below:after{bottom:auto;top:-5px}
 .night-table .flat-bubble.flat-bubble-below-pc:not(.flat-bubble-below):after{top:auto;bottom:-5px}
}
@media(max-width:900px) and (orientation:landscape){
 .night-table .flat-bubble{left:var(--x);top:var(--y)}
 .night-table .flat-bubble.flat-bubble-below{transform:translate(-50%,calc(-100% - 40px))}
 .night-table .flat-bubble.flat-bubble-below:after{top:auto;bottom:-5px}
 .night-table .flat-bubble.flat-bubble-below-pc{transform:translate(-50%,30px)}
 .night-table .flat-bubble.flat-bubble-below-pc:after{bottom:auto;top:-5px}
}
/* The player's own line sits to the left of their seat, clear of the board and their cards. */
.flat-bubble.flat-bubble-me,.night-table .flat-bubble.flat-bubble-me{transform:translate(calc(-100% - 70px),-70%)}
.flat-bubble.flat-bubble-me:after{left:auto;right:-8px;bottom:50%;top:auto;transform:translateY(50%) rotate(45deg);box-shadow:3px -3px 0 0 #6fd3ff55}
@media(max-width:900px){.night-table .flat-bubble.flat-bubble-me{transform:translate(calc(-100% - 34px),-60%);max-width:min(170px,42vw)}.night-table .flat-bubble.flat-bubble-me:after{right:-5px}}
@media(max-width:900px) and (orientation:landscape){
 .night-table .flat-bubble.flat-bubble-me{transform:translate(calc(-100% - 30px),-70%)}
 body:not(.tutorial-table) .arena-screen.night-table .arena-controls .rival-table-status,body:not(.tutorial-table) .arena-screen.night-table .arena-controls .online-table-status{display:none}
}
/* All-in: banner, flash and rings (animated from flat-table.js), and a glow while the player is all in. */
.flat-allin-banner{position:absolute;left:50%;top:44%;z-index:30;pointer-events:none;display:flex;align-items:baseline;gap:10px;white-space:nowrap}
.flat-allin-banner b{font:italic 900 clamp(46px,7vw,96px)/1 'Shippori Mincho B1',serif;letter-spacing:4px;color:#fff6d8;-webkit-text-stroke:2px #ff3fc8;text-shadow:0 0 18px #ff4fd8,0 0 42px #ff2fb4,0 0 80px #ffb02e99,4px 4px 0 #3a0d4a}
.flat-allin-banner small{font:800 clamp(18px,2.4vw,30px)/1 sans-serif;color:#ffd96e;text-shadow:0 0 12px #ff9f2e}
.flat-allin-flash{position:absolute;inset:-10%;z-index:25;pointer-events:none;border-radius:50%;background:radial-gradient(circle,#ffe7a8cc 0%,#ff4fd855 35%,transparent 70%)}
.flat-allin-ring{position:absolute;z-index:25;width:150px;height:150px;border-radius:50%;pointer-events:none;border:4px solid #ffd96e;box-shadow:0 0 22px #ffb02e,inset 0 0 18px #ff4fd8aa}
.flat-seat.flat-allin .flat-portrait{border-color:#ffd56a;animation:allin-glow 1.6s ease-in-out infinite}
.flat-seat.flat-allin .flat-plate{border-color:#ffd56a}
@keyframes allin-glow{0%,100%{box-shadow:0 0 0 2px #ffd56a66,0 0 14px #ffb02e88}50%{box-shadow:0 0 0 4px #ffd56aaa,0 0 30px #ffb02e,0 0 50px #ff4fd866}}
@media(prefers-reduced-motion:reduce){.flat-seat.flat-allin .flat-portrait{animation:none;box-shadow:0 0 0 3px #ffd56a99,0 0 20px #ffb02eaa}}
@media(max-width:900px){.flat-allin-ring{width:90px;height:90px;border-width:3px}.flat-allin-banner b{font-size:clamp(40px,13vw,64px);-webkit-text-stroke:1.5px #ff3fc8}}
