/* Flip 7 — warm paper table with muted pastel cards. */
:root{
  --ink:#463d32;
  --muted:#756c60;
  --border:#d6c6ad;
  --surface:#fff9ec;
  --surface-soft:#f0e5d3;
  --action:#d9a85a;
  --action-ink:#382c22;
  --paper:#f5eddf;
  --table:#ede1cd;
  --cream:#fffbf1;
  --mint:#c5ded2;
  --coral:#efd1c1;
  --sun:#f2dfa8;
  --lavender:#d9cce5;
  --sage:#638270;
  --session-background:#fff9ed;
  --session-border:#ddcdb5;
  --session-chip:#f1e4d2;
  --session-control-bg:#f5e9d7;
  --session-control-border:#d5bfa1;
  --session-control-hover:#ecddc5;
  --session-accent:#785334;
  --session-text:#493e32;
  --session-muted:#76685c;
  --session-small-font-size:12px;
  --solo-panel:#f4eadb;
  --solo-border:#d3bea2;
  --solo-muted:#776a5d;
  --solo-seat:#fff8e9;
  --solo-fg:#443a2f;
  --solo-active:#dcae67;
  --solo-active-fg:#33281f;
  background:var(--paper);
  color:var(--ink);
  color-scheme:light;
}
html{background:#f5eddf}
body{
  color:var(--ink);
  background:
    radial-gradient(ellipse 110% 45% at 50% -16%,#fffdf5 0%,transparent 72%),
    repeating-linear-gradient(90deg,transparent 0 120px,#b99e7b09 120px 121px),
    var(--paper);
}
.notice{background:#f9e1dc;border:1px solid #c9877b;color:#7b3129}
#shell{max-width:1580px;padding-top:14px}
.app-root{gap:12px}

.table-header{align-items:center;justify-content:space-between;gap:12px;padding:4px 3px 8px}
.round-meta{align-items:center;gap:12px}
.round-badge{background:#e8bf7f;color:#4c3521;border:1px solid #dcb170;font-size:13px;font-weight:850;letter-spacing:.035em;padding:8px 13px}
.deck-badge,.goal-badge{border:0;background:transparent;color:#716356;font-size:13px;font-weight:700}
.goal-badge{letter-spacing:.09em;font-size:11px}

.decision-bar{
  align-items:center;justify-content:space-between;gap:10px 22px;
  min-height:83px;padding:14px 19px;
  background:#fffaf0;border:1px solid #dac8ab;border-left:4px solid #dbaa68;
  border-radius:8px;
  box-shadow:0 3px 12px #6c4c2910;
}
.turn-label{gap:3px;min-width:0}
.turn-message{color:#493b30;font-size:clamp(20px,2.2vw,27px);font-weight:820;letter-spacing:-.035em;line-height:1.15}
.last-event{color:#807264;font-size:12px;line-height:1.45}
.turn-hint{color:#826046;font-size:13px;font-weight:700}
.action-controls{align-items:center;justify-content:flex-end;gap:9px}
.ui-button,.secondary,.primary{border:1px solid #c7b69e;background:#f3e8d6;color:#45382d;font-size:15px;line-height:1.25;min-height:43px;padding:11px 17px;font-weight:760;transition:background .14s,border-color .14s}
.ui-button:hover:not(:disabled),.secondary:hover{background:#e7d7c0;border-color:#aa8f6c}
.ui-button.primary,.primary{background:#d7aa67;border-color:#bb8d4e;color:#33271b;font-size:18px;font-weight:880}
.ui-button.primary:hover:not(:disabled),.primary:hover{background:#e7bd7e;border-color:#b98b50}
.ui-button:focus-visible{outline:3px solid #577e6d;outline-offset:2px}
.hit-button{min-width:125px;min-height:51px}
.stay-button{min-height:51px}
.next-button{min-height:48px}

.tableau{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
.tableau[class*="roster-"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.tableau:is(.roster-5,.roster-6,.roster-7,.roster-8,.roster-9,.roster-10,.roster-11,.roster-12){
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.tableau:is(.roster-13,.roster-14,.roster-15,.roster-16,.roster-17,.roster-18){
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.table-seat{
  min-width:0;position:relative;display:flex;flex-direction:column;gap:13px;
  padding:16px 18px 17px;
  background:var(--cream);border:1px solid #d8c8ae;border-radius:9px;
  box-shadow:0 2px 0 #c5b29439;
}
.table-seat.acting{background:#fffdf5;border-color:#bd9663;box-shadow:inset 0 0 0 2px #e5bf85,0 2px 0 #c5a67944}
.table-seat.acting::before{content:"";position:absolute;top:0;left:0;bottom:0;width:4px;background:#d4a45f;border-radius:7px 0 0 7px}
.table-seat.mine:not(.acting){border-color:#a4bca9}
.table-seat.banked{background:#f4f0e7}
.table-seat.busted{background:#f4eae5;border-color:#dfb9af}
.table-seat.targetable{border:2px dashed #a77c45;padding:15px 17px 16px;cursor:pointer;background:#fff8e8}
.table-seat.targetable:hover{background:#fbeccf;border-color:#94622d;box-shadow:0 0 0 2px #dfb97c44}
.table-seat.targetable:focus-within{outline:3px solid #508577;outline-offset:2px}
.table-seat .ui-button.seat-target{
  position:absolute;inset:0;z-index:2;display:block;width:100%;height:100%;
  margin:0;padding:0;background:transparent;border:0;border-radius:7px;
  color:transparent;font-size:0;line-height:0;box-shadow:none;cursor:pointer;
}
.table-seat .ui-button.seat-target:focus-visible{outline:3px solid #508577;outline-offset:2px}

.player-head{align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:nowrap}
.player-identity{min-width:0;gap:5px}
.seat-name{font-size:clamp(17px,1.4vw,21px);font-weight:820;color:#46392e;letter-spacing:-.02em;line-height:1.15;overflow-wrap:anywhere}
.seat-status{font-size:12px;color:#63816d;font-weight:820;letter-spacing:.075em}
.acting .seat-status{color:#a66b2e}
.banked .seat-status{color:#6e806c}
.busted .seat-status{color:#a55e54}
.score-strip{margin-left:auto;align-items:start;gap:18px;flex-wrap:nowrap;white-space:nowrap}
.score-block{gap:2px;align-items:flex-end}
.score-label{font-size:11px;letter-spacing:.09em;color:#86796a;font-weight:800}
.round-points{font-size:27px;font-weight:860;line-height:1.05;color:#5b755d;font-variant-numeric:tabular-nums}
.total-points{font-size:23px;font-weight:800;line-height:1.1;color:#5e5142;font-variant-numeric:tabular-nums}
.busted .round-points{color:#aa6157}
.number-line{align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:nowrap}
.numbers-row{display:flex;align-items:flex-start;gap:7px;flex-wrap:wrap;min-width:0;flex:1;min-height:125px;justify-content:center}
.flip-progress{margin-top:2px;flex-shrink:0;background:#f0e4cd;border:1px solid #e0cfb4;color:#645645;padding:6px 8px;border-radius:5px;font-size:13px;font-weight:850;font-variant-numeric:tabular-nums}
.ui-card-wrap{gap:5px}
.playing-card{
  display:grid;place-items:center;
  width:86px;height:120px;aspect-ratio:5/7;
  background:#dbd6cb;border:1px solid #c4bcae;
  border-radius:8px;box-shadow:1px 3px 0 #7d62432d;
  color:#3c3b33;font:850 49px/1 Inter,system-ui,sans-serif;
  letter-spacing:-.055em;
}
.playing-card:disabled{opacity:1;cursor:default}
.playing-card::before{height:8px;background:#9ca59a}
.number-0 .playing-card{background:#e1ddd5;border-color:#b7b0a4}
.number-1 .playing-card,.number-2 .playing-card,.number-3 .playing-card{background:#e0e9da;border-color:#b8cdb9}
.number-4 .playing-card,.number-5 .playing-card,.number-6 .playing-card{background:#d6e5de;border-color:#a9c8bc}
.number-7 .playing-card,.number-8 .playing-card,.number-9 .playing-card{background:#f5e4be;border-color:#dcc690}
.number-10 .playing-card,.number-11 .playing-card,.number-12 .playing-card{background:#f1d6c9;border-color:#e0b3a2}
.number-1 .playing-card::before,.number-2 .playing-card::before,.number-3 .playing-card::before{background:#9ebfa5}
.number-4 .playing-card::before,.number-5 .playing-card::before,.number-6 .playing-card::before{background:#8fbbab}
.number-7 .playing-card::before,.number-8 .playing-card::before,.number-9 .playing-card::before{background:#dbb86f}
.number-10 .playing-card::before,.number-11 .playing-card::before,.number-12 .playing-card::before{background:#dba997}
.modifiers-row{align-items:flex-start;gap:8px;padding-top:11px;border-top:1px solid #e8dcc9}
.modifiers-row .playing-card{width:55px;height:77px;font-size:29px;border-color:#d7b977;background:#fae1a9;color:#6a4b27}
.modifiers-row .playing-card::before{background:#c6a15a}
.modifiers-row .action-card .playing-card{background:#d1e7e2;border-color:#a7cbc1;color:#3e695f}
.modifiers-row .action-card .playing-card::before{background:#8bb6ac}
.modifiers-row .freeze-card .playing-card{background:#d8e7f1;color:#52778c;border-color:#b2cfdd}
.modifiers-row .flip-card .playing-card{background:#f3d2c6;color:#9c5748;border-color:#e7b3a7}
.modifiers-row .chance-card .playing-card{background:#e4d9ed;color:#73558b;border-color:#ceb5de}
.card-caption{font-size:10px;font-weight:760;letter-spacing:.025em;color:#817362;max-width:80px}
.number-card .card-caption{display:none}

.lobby-panel{background:#fff9ef;border-color:#d7c4a9}
.games-lobby-shell{padding-top:clamp(32px,6vw,68px)}
.games-lobby-header h1{font-family:Georgia,serif;font-weight:700;color:#49392e;letter-spacing:-.045em}
.games-lobby-eyebrow{color:#94602c}
.games-lobby-dialog{background:#fff9ee;color:var(--ink)}
.games-lobby-dialog::backdrop{background:#51453785}
.games-lobby-primary:hover{background:#e7b979;filter:none}
.games-lobby-room:hover{border-color:#bc9768}
.games-room-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:8px 2px;color:#7e7266;font-size:12px}
.games-room-controls button{border:1px solid #d0bca2;background:#fbf2e4;border-radius:5px;color:#554435;padding:7px 11px}
.games-room-controls button:hover{background:#eee0cc}

#confirm,.confirm-popover{background:#fff8ec;border:1px solid #ccba9f;color:#4b4034}
#confirm{padding:22px}
.confirm-eyebrow,.eyebrow{color:#89602d}
#rules-dialog{width:min(560px,calc(100vw - 24px));max-height:90vh;overflow:auto;padding:27px;background:#fff9ee;border:1px solid #cfbba0;border-radius:10px;color:#463a30;box-shadow:0 24px 55px #594a3440}
#rules-dialog::backdrop{background:#4a403577}
#rules-dialog .rules-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}
#rules-dialog h2{font:750 27px/1.2 system-ui;margin:0}
#rules-dialog p{font-size:15px;line-height:1.65;color:#625448}
#rules-dialog strong{color:#82572e}

@media(max-width:1360px){
  .tableau:is(.roster-10,.roster-11,.roster-12,.roster-13,.roster-14,.roster-15,.roster-16,.roster-17,.roster-18){grid-template-columns:repeat(3,minmax(0,1fr))}
  .playing-card{width:68px;height:95px;font-size:42px}
  .numbers-row{min-height:99px}
}
@media(max-width:960px){
  .tableau:is(.roster-5,.roster-6,.roster-7,.roster-8,.roster-9,.roster-10,.roster-11,.roster-12,.roster-13,.roster-14,.roster-15,.roster-16,.roster-17,.roster-18){grid-template-columns:repeat(2,minmax(0,1fr))}
  .table-seat{padding:13px}
  .table-seat.targetable{padding:12px}
}
@media(max-width:610px){
  .tableau[class*="roster-"]{grid-template-columns:1fr}
  .table-header{flex-wrap:wrap}
  .decision-bar{padding:11px 12px;flex-wrap:wrap}
  .turn-message{font-size:21px}
  .action-controls{justify-content:flex-start}
  .table-seat{padding:12px}
  .table-seat.targetable{padding:11px}
  .score-strip{gap:12px}
  .playing-card{width:59px;height:83px;font-size:37px}
  .modifiers-row .playing-card{width:48px;height:68px;font-size:26px}
  .numbers-row{min-height:86px;gap:5px}
}
@media(prefers-reduced-motion:reduce){
  .ui-button{transition:none}
}

/* Secondary room history lives in a compact dialog, not on the table. */
#history-dialog{width:min(540px,calc(100vw - 24px));max-height:85vh;overflow:auto;padding:27px;background:#fff9ee;border:1px solid #cfbba0;border-radius:10px;color:#463a30;box-shadow:0 24px 55px #594a3440}
#history-dialog::backdrop{background:#4a403577}
#history-dialog .rules-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}
#history-dialog h2{font:750 27px/1.2 system-ui;margin:0}
.history-items{padding:0;margin:20px 0 0;list-style:none;display:grid;gap:0}
.history-items li{padding:11px 2px;border-bottom:1px solid #e4d6c1;color:#635546;font-size:14px;line-height:1.45}
.history-items li:first-child{color:#43372c;font-weight:700}
.history-items li:last-child{border-bottom:0}
