/* Wall, in the platform's theme (/theme.css): paper, ink and the teal
   signal, light and dark; the crew across the top. Thirstday's own names
   for them: */
:root {
  --cond: var(--mono);
  --bg: var(--well); --paper: var(--panel); --raise: var(--well-2); --line: var(--rule); --fg: var(--ink); --mut: var(--mute);
  --acc: var(--sig); --acc-fg: var(--on-sig); --ink-mut: var(--mute); --printer: var(--well-2);
  --slot-a: var(--rule-2); --slot-b: var(--well-2); --tint: var(--sig-bg); --good: var(--ok); --bad: var(--err);
  /* Empty seats: a dashed edge that shows on every palette (--rule is the
     background itself on some, Monokai dark). */
  --slot-edge: var(--mute); --slot-label: var(--ink-2);
  /* The loading screen (platform-theme's splash) in the bar's own colours. */
  --splash-bg: var(--bg); --splash-ink: var(--fg); --splash-accent: var(--acc);
}
body { background: var(--bg); }
.card { border: 1px solid var(--line); } .receipt { box-shadow: 0 6px 18px rgba(0,0,0,.08); } .step.now { color: var(--acc-fg); }
.stage-h h1, .brand { text-transform: none; }
.app { grid-template-rows: 56px auto minmax(0, 1fr); }
.wall { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.main { grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 480px); }
#bar { height: 100%; }

/* Special cards: the whole list of options, scrolling inside a fixed box. */
.card.special { grid-template-rows: 32px 16px auto auto minmax(0, 1fr) auto 30px; }
.card.special .opts { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; overflow-y: auto; min-height: 0; padding: 2px; }
.card.special .opts img { width: clamp(24px, 17cqi, 36px); height: clamp(24px, 17cqi, 36px); border-radius: 5px; }
.card.special .goal { font-family: var(--cond); font-weight: 800; font-size: clamp(16px, 12cqi, 24px); line-height: 1.15; color: var(--ink); align-self: center; }
.card-acts { display: flex; justify-content: space-between; gap: 6px; }

/* Bet tickets: text stays inside. With four or five, each ticket is two
   rows (the bet, then its history on one line) and the payout rides in the
   header line. */
.tk-text { overflow-wrap: anywhere; }
.tk-no { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-pay-in { display: none; }
.ticket { min-height: 0; }
.tk-bet { overflow: hidden; min-height: 0; }
.tickets.many .ticket { grid-template-columns: clamp(92px, 11cqi, 130px) minmax(0, 1fr) clamp(108px, 13cqi, 150px); grid-template-rows: minmax(0, 1fr) auto; max-height: none; }
.tickets.many .tk-stub { grid-row: 1 / 3; padding: 6px; gap: 3px; min-height: 0; overflow: hidden; }
.tickets.many .tk-stub img { width: clamp(24px, 4.4vh, 44px); height: clamp(24px, 4.4vh, 44px); box-shadow: 0 0 0 2px var(--acc); flex: none; }
.tickets.many .tk-name { font-size: clamp(10px, 1.1vw, 16px); }
.tickets.many .tk-sub { font-size: 9px; }
.tickets.many .tk-bet { grid-column: 2; grid-row: 1; padding: 6px 14px 2px; grid-template-rows: auto minmax(0, 1fr); gap: 2px; align-content: center; }
.tickets.many .tk-pay { display: none; }
.tickets.many .tk-pay-in { display: inline; }
.tickets.many .tk-line { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; min-height: 0; }
.tickets.many .tk-line img { width: 30px; height: 30px; }
.tickets.many .tk-text { font-size: clamp(13px, 1.25vw, 20px); line-height: 1.08; }
.tickets.many .tk-sides { grid-column: 3; grid-row: 1 / 3; padding: 6px; gap: 4px; }
.tickets.many .ticket .form { grid-column: 2; grid-row: 2; padding: 3px 14px 5px; border-left: 0; border-top: 1px dashed rgba(0,0,0,.2); display: block; }
.tickets.many .ticket .form .cells { display: none; }
.tickets.many .ticket .form .lbl { display: flex; flex-direction: row; align-items: baseline; gap: 10px; white-space: nowrap; overflow: hidden; }
.tickets.many .ticket .form .lbl > span:first-child { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.tickets.many .ticket .form .lbl .inline { display: inline; flex: 1; min-width: 0; text-align: left; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.tickets.many .ticket .form .lbl b { flex: none; }

/* In game: the special's five options in one row, each a fifth of the box. */
.ig-icons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; min-width: 0; }
.ig-icons img { width: 100%; height: auto; aspect-ratio: 1; max-width: 40px; }

/* Open tab form and messages. */
.find select.input { height: 40px; }
.find-err { color: var(--bad); font-size: 12px; align-self: stretch; }
.loading-screen { height: 100vh; display: grid; place-items: center; font-family: var(--cond); font-size: 28px; color: var(--mut); }

/* Suggest a fix. */
.sheet-bg { position: fixed; inset: 0; background: rgba(28,24,19,.35); display: grid; place-items: center; z-index: 20; }
.sheet { background: var(--paper); color: var(--ink); width: min(720px, 92vw); max-height: 84vh; overflow: auto; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.sheet-h { display: flex; justify-content: space-between; align-items: center; font-family: var(--cond); font-size: 20px; }
.fx-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fx { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 12px; max-width: 220px; }
.fx img { width: 26px; height: 26px; border-radius: 50%; } .fx span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx.off { opacity: .45; text-decoration: line-through; } .fx.new { border-color: var(--good); }
.sheet-acts { display: flex; justify-content: flex-end; }
.ig-pics .ch { border-radius: 50%; }
.card-acts .redo { white-space: nowrap; font-size: 12px; padding: 0 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.find .input { height: 40px; }
.form .lbl .inline i.hit { display: inline; border: 0; border-radius: 0; padding: 0; }
.deal.many .card.special .t { font-size: clamp(15px, 1.45vw, 26px); }
.deal.many .card-acts { gap: 4px; }
.deal.many .card-acts .redo { font-size: 10px; letter-spacing: -.02em; padding: 0 3px; }
.card.special .t { overflow-wrap: normal; word-break: normal; }
.deal.many .card.special .t { font-size: clamp(13px, 1.15vw, 24px); }
/* A special's rule always reads in full. */
.card.special .r { height: auto; max-height: none; display: block; overflow: visible; -webkit-line-clamp: unset; text-overflow: clip; white-space: normal; }

/* Dealing: the card lands face down, then turns over where you can see it
   (the back gives way to the face at 90°, edge-on). */
.deal { perspective: 1200px; }
.card.dealt { animation: deal-turn 1.15s both; animation-delay: var(--d); transform-origin: 50% 50%; }
.card.dealt .back { opacity: 1; animation: back-off 1.15s both; animation-delay: var(--d); }
@keyframes deal-turn {
  0% { transform: translate(-60px, -260px) rotate(-25deg) rotateY(180deg) scale(.6); opacity: 0; animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
  /* One continuous turn; the easing is symmetric, so the card is edge-on
     (90°) at exactly 72.5%, moving at full speed, when the face shows. */
  45% { transform: rotateY(180deg); opacity: 1; animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  100% { transform: rotateY(0deg); opacity: 1; }
}
@keyframes back-off { 0%, 72.4% { opacity: 1; } 72.5%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .card.dealt, .card.dealt .back { animation-duration: .01s; } }

/* The app is exactly the window: columns never grow to fit their content. */
.app { grid-template-columns: minmax(0, 1fr); width: 100vw; max-width: 100vw; overflow: hidden; }
.top, .wall, .main, .stage, .printer, .wall > * { min-width: 0; }
.top > .steps { flex: 1 1 auto; }
.top > .brand, .top > .clock { flex: none; }
.steps { min-width: 0; overflow: hidden; }
.step { white-space: nowrap; }

/* Open tab: rows keep their size; only the game list gives way. */
.seat2 > * { flex-shrink: 0; }
.seat2 .games { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.seat2.open .find .input { flex: none; height: 40px; }
@media (max-height: 820px) {
  .seat2 { gap: 5px; padding: 12px 12px; }
  .seat2 .big { width: 60px; height: 60px; }
  .seat2 .gm { font-size: 12px; } .seat2 .gm img { width: 22px; height: 22px; }
  .seat2 .recent img { width: 34px; height: 34px; }
}
/* The steps scale with the window. */
.steps .step { font-size: clamp(10px, 1vw, 16px); padding-left: clamp(5px, .7vw, 12px); padding-right: clamp(5px, .7vw, 12px); }
@media (max-height: 760px) {
  .seat2 .games { gap: 2px; }
  .seat2 .gm { padding-top: 1px; padding-bottom: 1px; font-size: 11px; } .seat2 .gm img { width: 18px; height: 18px; }
  .seat2 .big { width: 52px; height: 52px; }
  .seat2 .recent img { width: 28px; height: 28px; }
}

/* Pull tabs: one piece of card stock over the whole ticket. Hover lifts
   the dog-eared corner; pulling tugs it, then rips it off the perforation. */
.ticket { position: relative; }
.tab { position: absolute; inset: -3px; z-index: 5; border: 0; margin: 0; padding: 0 0 0 clamp(22px, 2.4vw, 34px); cursor: grab; color: var(--paper); border-radius: inherit;
  display: grid; grid-template-columns: minmax(0, 1fr) auto clamp(40px, 5vw, 64px); align-items: center; gap: 16px; text-align: left;
  background:
    /* pull tabs: dotted stripes (owner's design). */
    radial-gradient(circle, rgba(255,255,255,.10) 1.5px, transparent 2px) 0 0 / 12px 12px, /* nosemgrep: minimal-gradients */
    repeating-linear-gradient(135deg, var(--acc) 0 12px, var(--sig-hover) 12px 24px); /* nosemgrep: minimal-gradients */
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(0,0,0,.18);
  transform-origin: 0% 50%; transition: transform .16s cubic-bezier(.3, .7, .4, 1), box-shadow .16s; will-change: transform; }
.tab::before { content: ""; position: absolute; left: 10px; top: 7px; bottom: 7px; width: 6px;
  /* the receipt's perforation. */
  background: radial-gradient(circle, var(--paper) 2px, transparent 2.6px) 0 0 / 6px 9px repeat-y; } /* nosemgrep: minimal-gradients */
.tab::after { content: ""; position: absolute; right: 0; top: 0; width: 22px; height: 22px; border-radius: 0 8px 0 0;
  /* the turned-down page corner. */
  background: linear-gradient(225deg, var(--bg) 50%, var(--well-2) 50%, var(--paper) 100%); box-shadow: -2px 2px 3px rgba(0,0,0,.18); transition: width .16s, height .16s; } /* nosemgrep: minimal-gradients */
.tab-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tab-who img { width: clamp(26px, 3.8vh, 42px); height: clamp(26px, 3.8vh, 42px); border-radius: 50%; box-shadow: 0 0 0 2px var(--paper); flex: none; }
.tab-who > span { display: flex; flex-direction: column; min-width: 0; }
.tab-who b { font-family: var(--cond); font-weight: 800; font-size: clamp(13px, 1.25vw, 19px); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab-who small { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; opacity: .8; }
.tab-pull { font-family: var(--cond); font-weight: 900; font-size: clamp(20px, 2.5vw, 40px); letter-spacing: .3em; line-height: 1; text-shadow: 2px 2px 0 rgba(0,0,0,.28); }
.tab-grip { align-self: stretch; display: grid; place-items: center; border-left: 2px dashed var(--paper); }
.tab-grip::before { content: "›››"; font-size: clamp(16px, 1.8vw, 26px); font-weight: 800; letter-spacing: -.05em; opacity: .9; transition: transform .16s; }
.tab:hover, .tab:focus-visible { outline: none; transform: perspective(900px) rotateY(-8deg); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(0,0,0,.18), 12px 0 20px rgba(0,0,0,.25); }
.tab:hover::after, .tab:focus-visible::after { width: 34px; height: 34px; }
.tab:hover .tab-grip::before { transform: translateX(4px); }
.tab:active { cursor: grabbing; }
.tab.peel { pointer-events: none; animation: rip .42s cubic-bezier(.6, 0, .25, 1) forwards; }
@keyframes rip {
  0% { transform: perspective(900px) rotateY(-8deg); }
  20% { transform: perspective(900px) rotateY(-12deg) translateX(14px) rotate(.8deg); }
  100% { transform: perspective(900px) translate(118%, -42%) rotate(17deg) rotateY(-28deg); opacity: 0; }
}
/* The bet underneath pops in. */
.ticket.revealed .tk-bet, .ticket.revealed .tk-sides, .ticket.revealed .form { animation: reveal .3s .1s cubic-bezier(.2, .8, .3, 1.2) both; }
.ticket.revealed::after { content: ""; position: absolute; inset: 0; background: var(--paper); pointer-events: none; animation: reveal-flash .35s .08s ease-out both; }
@keyframes reveal { from { transform: scale(.96); opacity: 0; } }
@keyframes reveal-flash { from { opacity: .85; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tab.peel, .ticket.revealed *, .ticket.revealed::after { animation-duration: .01s !important; } .tab:hover { transform: none; } }
.mute { flex: none; width: 36px; height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--mut); display: grid; place-items: center; cursor: pointer; }
.mute:hover, .mute:focus-visible { color: var(--fg); background: var(--raise); outline: none; }
.mute[aria-pressed="true"] { color: var(--bad); }
/* Dealing never makes the stage scroll: cards fly in from outside it. */
.stage { overflow: hidden; }
.deal { overflow: visible; }
.card.special .opts { overflow: hidden; }
/* Header actions line up on their middles (e.g. "Not on op.gg yet"). */
.stage-h .acts { align-items: center; }
.stage-h .acts .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }

/* The hover card: the theme's own surface, raised (never a bright card
   on a dark page). */
.tip { position: fixed; left: 0; top: 0; z-index: 60; max-width: 300px; padding: 10px 12px; border-radius: 8px; pointer-events: none;
  background: var(--paper); color: var(--ink); border: 1px solid var(--rule-2); box-shadow: 0 10px 28px rgba(0,0,0,.28); font-size: 12px; line-height: 1.4;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; visibility: hidden; }
.tip.on { opacity: 1; transform: none; visibility: visible; }
.tip-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tip-h b { font-family: var(--cond); font-weight: 800; font-size: 15px; letter-spacing: .01em; }
.tip-gold { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.tip-stats { list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px solid var(--rule-2); font-family: var(--mono); font-size: 11px; }
.tip-stats li::before { content: "+ "; color: var(--ink-2); }
.tip p { margin: 6px 0 0; color: var(--ink-2); }
.tip p b { display: block; color: var(--ink); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
/* A special's title always reads in full too. */
.card.special .t { height: auto; max-height: none; display: block; overflow: visible; -webkit-line-clamp: unset; text-overflow: clip; overflow-wrap: normal; }
/* "This name is cringe": top right of a special. */
.card.special .kind { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: visible; }
.card.special .kind > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cringe { flex: none; margin-left: auto; border: 1px solid var(--line); background: var(--panel); color: var(--mut); border-radius: 999px; padding: 1px 7px; line-height: 1.4;
  font: inherit; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.cringe:hover, .cringe:focus-visible { color: var(--bad); border-color: var(--bad); outline: none; }
.cringe.on { color: var(--bad); border-color: var(--bad); cursor: default; }
.card.special { grid-template-rows: 32px auto auto auto minmax(0, 1fr) auto 30px; }





/* --- Last call: the night's totals and its match history ------------------------------ */
.lastcall { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; min-height: 0; }
.board { width: 100%; border-collapse: collapse; font: 12px var(--mono); }
.board th, .board td { padding: 4px 6px; text-align: right; border-bottom: 1px dashed var(--line); }
.board th:first-child, .board tbody th { text-align: left; }
.h-list { display: flex; flex-direction: column; gap: 10px; }
.h-game { border-top: 1px solid var(--line); padding-top: 8px; }
.h-num { font-family: var(--cond); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.h-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 70px 54px auto auto; gap: 8px; align-items: center; font: 12px var(--mono); padding: 3px 0; }
.h-row img { width: 28px; height: 28px; border-radius: 6px; }
.h-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-row .result { font-weight: 800; font-size: 11px; letter-spacing: .06em; } .h-row .result.won { color: var(--good); } .h-row .result.lost { color: var(--bad); }
.chip { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.chip.yes { color: var(--good); border-color: var(--good); } .chip.no { color: var(--bad); border-color: var(--bad); } .chip.none { opacity: .4; }

/* --- The door: "Start drinking" -------------------------------------------------------- */
.splash { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--bg);
  /* ruled paper texture (owner's design). */
  background-image: repeating-linear-gradient(90deg, transparent 0 78px, rgba(28,24,19,.035) 78px 80px); } /* nosemgrep: minimal-gradients */
.door { width: min(440px, 92vw); background: var(--paper); color: var(--ink); padding: 26px 30px 22px; border-radius: 4px;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px rgba(28,24,19,.14); display: flex; flex-direction: column; gap: 16px; animation: door-in .6s cubic-bezier(.2, .8, .2, 1) both; }
.door-top { display: flex; justify-content: space-between; font: 11px var(--mono); letter-spacing: .14em; color: var(--ink-mut); }
.door-logo { display: flex; align-items: stretch; justify-content: center; gap: 0; margin: 6px 0 0; }
.door-logo b { background: var(--acc); color: var(--acc-fg); font-family: var(--cond); font-weight: 900; font-size: clamp(34px, 7vw, 52px); padding: 4px 12px; letter-spacing: .02em; }
.door-logo span { font-family: var(--cond); font-weight: 900; font-size: clamp(34px, 7vw, 52px); padding: 4px 10px; border: 3px solid var(--ink); border-left: 0; }
.door-sub { text-align: center; font: 12px var(--mono); color: var(--ink-mut); letter-spacing: .06em; }
.door-rule { border-top: 2px dashed var(--line); }
.door-fields { display: flex; flex-direction: column; gap: 10px; }
.door-field { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.door-field span { font: 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mut); }
.door-field b { font-family: var(--cond); font-size: 18px; }
.door-go { height: 54px; font-size: 18px; letter-spacing: .04em; }
.door-foot { text-align: center; font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mut); }
.splash.opening .door { animation: door-out .5s cubic-bezier(.6, 0, .4, 1) forwards; }
.splash.opening { animation: fade-out .5s .1s forwards; }
@keyframes door-in { from { transform: translateY(24px); opacity: 0; } }
@keyframes door-out { to { transform: translateY(-40px) scale(.96); opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .door, .splash.opening, .splash.opening .door { animation-duration: .01s; } }
/* Open seats sit in the middle of their space. */
.seat2.open { justify-content: center; align-items: center; }
.seat2.open .sec { border-top: 0; padding-top: 0; text-align: center; align-self: center; }
.empty-seat { display: grid; place-items: center; }

/* In game: the special's rule under its name (and its items, when it has some). */
.ig-rule { margin: 0; color: var(--ink-mut); font-size: clamp(11px, 1vw, 13px); line-height: 1.3; }
.igc .plus.big { margin-top: auto; }
/* In game: titles and bets read in full. */
.igc .ig-box { max-height: none; flex: 0 1 auto; }
.igc .ig-box b { display: block; -webkit-line-clamp: unset; overflow: visible; text-overflow: clip; font-size: clamp(12px, 1.05vw, 16px); line-height: 1.15; overflow-wrap: anywhere; }
/* The splash logo fits its card. */
.door { width: min(520px, 92vw); }
.door-logo b, .door-logo span { font-size: clamp(26px, 4.4vw, 44px); }
/* In game on short screens: a smaller picture, no rank, tighter boxes. */
@media (max-height: 820px) {
  .igc { gap: 6px; padding-top: 10px; padding-bottom: 10px; }
  .igc .ig-pics img, .igc .ig-pics .ch { width: clamp(44px, 8vh, 72px); height: clamp(44px, 8vh, 72px); }
  .igc .rk { display: none; }
  .igc .ig-box { padding: 6px 8px; gap: 2px; }
  .igc .ig-box b { font-size: clamp(11px, .95vw, 14px); }
  .igc .ig-rule { font-size: 11px; line-height: 1.25; }
  .igc .ig-icons img { width: clamp(20px, 3.4vh, 30px); height: clamp(20px, 3.4vh, 30px); }
  .igc .plus.big { height: 34px; }
}

/* In game: five option icons share the row. */
@media (max-height: 820px) { .igc .ig-icons img { width: 100%; height: auto; max-width: 30px; } }

/* In-app confirm (above everything). */
.confirm-bg { z-index: 70; }
.sheet.confirm { width: min(380px, 92vw); align-items: center; text-align: center; gap: 18px; padding: 24px; animation: pop-in .18s cubic-bezier(.2, .9, .3, 1.2) both; }
.confirm-t { font-family: var(--cond); font-size: 26px; }
.confirm-acts { display: flex; gap: 10px; justify-content: center; }
@keyframes pop-in { from { transform: scale(.94); opacity: 0; } }

/* Hovering the BAC chart. */
.spark { cursor: crosshair; overflow: visible; }
.spark-guide { stroke: var(--fg); stroke-width: 1; opacity: .35; vector-effect: non-scaling-stroke; }
.spark-dot { stroke: var(--fg); stroke-width: 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
/* Parked off the chart until the pointer is on it, then gone again. */
.spark-guide, .spark-dot { visibility: hidden; }
.spark[data-on]:hover .spark-guide, .spark[data-on]:hover .spark-dot, .spark[data-on]:active .spark-guide, .spark[data-on]:active .spark-dot { visibility: visible; }

/* Joining a friend's night by its code, under "Start drinking". */
.door-join { display: flex; gap: 8px; }
.door-join .input { flex: 1; min-width: 0; height: 44px; font: 700 18px var(--mono); letter-spacing: .4em; text-transform: uppercase; text-align: center; }
.door-join .input::placeholder { letter-spacing: .4em; color: var(--ink-mut); opacity: .5; }
.door-join .btn { height: 44px; }
.door-go[disabled] { opacity: .6; }
.door-err { margin-top: -8px; text-align: center; font: 12px var(--mono); color: var(--bad); }
/* The room's code in the top bar: a ticket stub, a tap copies the link. */
.room-code { flex: none; height: 32px; padding: 0 10px 0 12px; border: 1.5px dashed var(--ink); border-radius: 4px; background: var(--paper);
  font: 800 15px var(--mono); letter-spacing: .3em; color: var(--ink); cursor: pointer; }
.room-code:hover { background: var(--panel); }

/* A tab's match-history strip: the five games share the width (icons and
   numbers shrink with it), and the label wraps instead of clipping: the
   name on its own line, then "last 5 · K−D". */
.ticket .form { min-width: 0; overflow: hidden; container-type: inline-size; }
.form .lbl { flex-wrap: wrap; column-gap: 8px; row-gap: 0; min-width: 0; }
.form .lbl .who { flex: 1 0 100%; min-width: 0; color: var(--ink); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form .lbl span:not(.who) { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.form .cells { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(2px, 1.2cqi, 4px); min-width: 0; }
.form .cell { min-width: 0; padding: 2px 1px; }
.form .cell img { width: clamp(14px, 11cqi, 26px); height: auto; aspect-ratio: 1; max-width: 100%; }
.form .cell b { max-width: 100%; font-size: clamp(9px, 4.6cqi, 13px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tickets.many .ticket .form .lbl { flex-wrap: nowrap; }
.tickets.many .ticket .form .lbl .who { flex: 0 1 auto; max-width: 30%; }
.tickets.many .ticket .form .lbl > span:first-child { max-width: 30%; }
.tickets.many .ticket .form .lbl span:not(.who):not(.inline) { flex: none; white-space: nowrap; }

/* Someone else's pull tab: sealed over the whole ticket, torn or called
   shown on its face; a tab no device has yet is there to pull. */
.ticket.others { grid-template-columns: minmax(0, 1fr); min-height: 64px; }
.tab.held { cursor: default; }
.tab.held.torn { opacity: .75; }
.tab.held svg { flex: none; color: var(--paper); }
.tab.held:hover { transform: none; box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(0,0,0,.18); }
.tab.held:hover::after { width: 22px; height: 22px; }
.ticket.others.called { box-shadow: 0 0 0 3px var(--acc); }
.ig-box.sealed .lbl { display: inline-flex; align-items: center; gap: 6px; }

/* The platform's theme switch, in the top strip like the sound button (the
   floating box would cover the game, so never that, not even on the door).
   Its palette select has the platform's chevron, not a .pick's. */
body > .theme-switch:not(.inline) { display: none !important; }
.top .theme-open svg { width: 20px; height: 20px; }
.theme-pop .pick::after { content: none; }
/* Every select: no native arrow; a Lucide chevron-down 12px in from the
   right edge, centred, and room for it so the text never runs under it
   (like the platform's theme switch). The select sits in a .pick. */
.pick { position: relative; display: inline-flex; align-items: stretch; min-width: 0;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.pick select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; width: 100%; }
.pick::after { content: ""; position: absolute; right: 12px; top: 50%; width: 12px; height: 12px; margin-top: -6px; pointer-events: none;
  background: var(--mut); -webkit-mask: var(--chevron) center / contain no-repeat; mask: var(--chevron) center / contain no-repeat; }
.pick:hover::after, .pick:focus-within::after { background: var(--fg); }
.find .pick { flex: none; }

/* Players' details: an empty stomach. */
.fld.chk { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.fld.chk input { width: 16px; height: 16px; accent-color: var(--acc); margin: 0; }
/* The back covers everything on the card until it turns (the stakes and
   other positioned parts included). */
.card .back { z-index: 3; }
/* Christmas: red and green, half and half. Card backs and pull tabs are
   cranberry and pine stripes; in game, cards' top edges are red and their
   borders pine, the clock and the big plus are red, labels and picks pine.
   Other palettes keep their own colours. */
:root[data-palette="christmas"] { --deck: var(--punch); --deck-2: color-mix(in srgb, var(--punch) 72%, #000); --pine: color-mix(in srgb, var(--sig) 80%, #000); }
/* Christmas card backs: red and green stripes (owner, before the
   recolour-only rule of 2026-12-04; ask before keeping). */
[data-palette="christmas"] .card .back { background: repeating-linear-gradient(45deg, var(--deck) 0 6px, var(--pine) 6px 12px); } /* nosemgrep: minimal-gradients, palette-recolors-only */
[data-palette="christmas"] .tab { background: /* nosemgrep: palette-recolors-only */
    /* Christmas pull tabs: red and green stripes (owner). */
    radial-gradient(circle, rgba(255,255,255,.10) 1.5px, transparent 2px) 0 0 / 12px 12px, /* nosemgrep: minimal-gradients */
    repeating-linear-gradient(135deg, var(--deck) 0 12px, var(--pine) 12px 24px); } /* nosemgrep: minimal-gradients */
[data-palette="christmas"] .igc { border-color: color-mix(in srgb, var(--sig) 55%, var(--line)); border-top-color: var(--deck); background-color: color-mix(in srgb, var(--sig) 6%, var(--panel)); }
[data-palette="christmas"] .igc.open { background-color: transparent; }
[data-palette="christmas"] .ig-clock, [data-palette="christmas"] .bigclock { color: var(--deck); }
[data-palette="christmas"] .ig-box { border-color: color-mix(in srgb, var(--sig) 35%, var(--line)); }
[data-palette="christmas"] .ig-box .lbl { color: var(--sig); }
[data-palette="christmas"] .igc .plus.big { background-color: var(--deck); border-color: var(--deck); color: var(--on-punch); }
[data-palette="christmas"] .igc .plus.big:hover { background-color: var(--deck-2); border-color: var(--deck-2); }

/* The brand's pint, in the theme's colours. */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand .pint { flex: none; }
.pint .beer { fill: var(--warn); }
.pint .head { fill: var(--fg); }
.pint .glass { fill: none; stroke: var(--fg); stroke-width: 3.4; stroke-linejoin: round; stroke-linecap: round; }
/* The legal line, quietly under the door. */
.splash { grid-template-rows: 1fr auto; }
.splash .door { align-self: center; }
.splash .legal { margin: 0 auto 16px; }

/* A called bet: who bets on whom and which way, for everyone (what it is
   stays sealed until the receipts). Names truncate; the side never shrinks. */
.call { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; font-family: var(--cond); font-weight: 800; }
.call img { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.call b, .by-call b, .on-you .lbl b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.call .verb { flex: none; color: var(--mut); font-weight: 400; font-size: .85em; }
.call .chip, .by-call .chip { flex: none; font-style: normal; font: 800 11px var(--mono); letter-spacing: .06em; padding: 1px 6px; border: 1px solid; border-radius: 4px; }
.tab .call { max-width: min(22ch, 45cqi, 45vw); }
.tab .call .chip { background: var(--paper); }
.ig-box.called { gap: 6px; }
.call.two { flex-direction: column; align-items: stretch; gap: 4px; }
.call-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ig-box .call b { display: block; -webkit-line-clamp: unset; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font: inherit; font-weight: 800; text-transform: none; }
.on-you { display: flex; flex-direction: column; gap: 4px; align-self: stretch; min-width: 0; }
.on-you .lbl { display: flex; gap: 4px; min-width: 0; color: var(--mut); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.by-call { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
.by-call img { width: 16px; height: 16px; border-radius: 50%; flex: none; }
.by-call b { flex: 1 1 auto; }

/* --- Who are you: each device picks its player ------------------------------ */
.top-tools { flex: none; display: flex; align-items: center; gap: 2px; }
.who-me img { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 2px var(--acc); }
.mate.me { box-shadow: inset 3px 0 0 var(--acc); }
.mate .nm.you { border: 0; padding: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-align: left; cursor: pointer; min-width: 0; text-decoration: underline dotted var(--mut); text-underline-offset: 3px; }
.order2.theirs .seg, .order2.theirs .menu2, .order2.theirs .fld .input { opacity: .55; }
.who-bg { z-index: 60; }
.sheet.who { width: min(900px, 94vw); gap: 14px; }
.who-note { font-size: 12px; color: var(--bad); }
.who-seats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 700px) { .who-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.seat-pick { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 8px 10px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--fg); font: inherit; cursor: pointer; }
.seat-pick img { width: 48px; height: 48px; border-radius: 50%; }
.seat-pick:hover, .seat-pick:focus-visible { border-color: var(--acc); outline: none; }
.seat-pick.on { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.seat-pick.held { border-style: dashed; }
.seat-pick.loading { cursor: default; opacity: .6; }
.pick-nm { max-width: 100%; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-rk { font-size: 11px; color: var(--mut); white-space: nowrap; }
.pick-mark { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; font: 700 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--acc); font-style: normal; }
.seat-pick.held .pick-mark { color: var(--mut); }
.who-new { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--rule-2); }
.who-new-h { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.who-new .input { flex: 1; min-width: 0; }
.who-new select.input { flex: none; }
.who-foot { display: flex; justify-content: flex-end; }
.btn.ghost { display: inline-flex; align-items: center; gap: 6px; border-color: transparent; color: var(--mut); }
.btn.ghost:hover { color: var(--fg); border-color: var(--line); }

/* --- Extra hard: the inside inverted, a double gold rule, the drink up front - */
.card.special.xh { grid-template-rows: 32px minmax(0, 1fr) auto 30px; }
.xh-in { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 6px; min-height: 0; padding: 10px; border-radius: 6px; background: var(--ink); color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--gold-line), inset 0 0 0 4px var(--ink), inset 0 0 0 5px var(--gold-line); }
.xh-in .kind { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--gold-line); }
.xh-in .kind svg { flex: none; }
.xh-in .kind > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .08em; }
.card.xh .card-acts .cringe { flex: 1; margin: 0; border-radius: 6px; height: 30px; font-size: 12px; }
.card.special .xh-in .t { color: var(--paper); }
.card.special .xh-in .r { color: color-mix(in srgb, var(--paper) 70%, transparent); font-size: 12px; }
.card.special .xh-in .goal { color: var(--paper); }
.card.special .xh-in .opts img { box-shadow: 0 0 0 1px color-mix(in srgb, var(--paper) 30%, transparent); }
.card .xh-stakes div { border-style: solid; }
.card .xh-stakes .l { border-color: var(--bad); }
.card .xh-stakes b { white-space: nowrap; }
.card .xh-stakes .l b { font-size: clamp(18px, 1.7vw, 28px); }

/* --- The cards tab: the whole deck, on this device -------------------------- */
.dk { z-index: 65; }
.dk-h { gap: 10px; }
.dk-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--cond); font-size: 18px; }
.dk-count { flex: 1; font-size: 12px; color: var(--mut); }
.dk-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; flex: none; }
.dk-seg { display: flex; gap: 4px; flex-wrap: wrap; }
.dk-pill { height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--mut); font: 600 12px var(--font); cursor: pointer; white-space: nowrap; }
.dk-pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.dk-pill:hover { color: var(--fg); }
.dk-tier { display: inline-flex; align-items: center; padding: 0 8px; }
.dk-q { display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--mut); }
.dk-q .input { height: 32px; width: 200px; }
.dk-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; align-content: start; }
.dk-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); min-width: 0; content-visibility: auto; contain-intrinsic-size: auto 190px; }
.dk-card.xh { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold-line), inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--gold-line); }
.dk-card.off { opacity: .45; }
.dk-top { display: flex; align-items: center; gap: 6px; }
.dk-set { flex: 1; display: inline-flex; align-items: center; gap: 4px; min-width: 0; font: 600 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-card.xh .dk-set { color: var(--gold-line); }
.dk-pips { display: inline-flex; gap: 3px; flex: none; }
.dk-pips i { width: 10px; height: 4px; border-radius: 2px; background: var(--rule-2); }
.dk-pips i.on { background: var(--ink-2); }
.dk-pips.t5 i.on, .dk-card.xh .dk-pips i.on { background: var(--gold-line); }
.dk-pill[aria-pressed="true"] .dk-pips i.on { background: var(--paper); }
.dk-t { font-family: var(--cond); font-size: 17px; line-height: 1.1; text-transform: uppercase; }
.dk-for { font-size: 12px; color: var(--mut); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-card.xh .dk-for { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.dk-r { margin: 0; font-size: 12px; line-height: 1.35; color: var(--ink-2); }
.dk-card.xh .dk-r { color: color-mix(in srgb, var(--paper) 75%, transparent); }
.dk-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.dk-opts img { width: 28px; height: 28px; border-radius: 4px; }
.dk-more { font-size: 11px; color: var(--mut); }
.dk-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dk-stakes { display: inline-flex; gap: 8px; font: 800 14px var(--cond); }
.dk-stakes .w { color: var(--good); } .dk-stakes .l { color: var(--bad); }
.dk-grey { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--mut); font: 600 11px var(--font); cursor: pointer; }
.dk-card.xh .dk-grey { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 35%, transparent); }
.dk-grey[aria-pressed="true"] { color: var(--bad); border-color: var(--bad); }
.dk-none { color: var(--mut); }

/* A narrow header: the steps keep their numbers, the one now keeps its name. */
.steps { container-type: inline-size; }
@container (max-width: 620px) { .steps .step:not(.now) { padding-left: 7px; padding-right: 7px; } .step:not(.now) .lbl { display: none; } .step:not(.now) .n { opacity: 1; } }
