:root {
  /* After-hours card club: smoked glass, brass, oxblood and felt. */
  --bg: #0b0806; --panel: rgba(22, 15, 11, 0.93); --line: rgba(232, 200, 140, 0.18);
  --text: #f3ead8; --dim: #b3a389; --pink: #c8452f; --teal: #d9b26a; --gold: #e8c06a; --red: #e0574c; --green: #3f9a62;
  --brass: #c9a24a; --felt: #1d4f37; --ink: #0d0907;
  --display: Impact, Haettenschweiler, 'Arial Narrow Bold', 'Franklin Gothic Condensed', sans-serif;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font: 15px/1.35 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overscroll-behavior: none; touch-action: manipulation; }
[hidden] { display: none !important; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#overlay { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.screen { position: fixed; inset: 0; pointer-events: none; }
.screen > * { pointer-events: auto; }

button, input, select { font: inherit; color: inherit; }
button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 10px 14px; cursor: pointer; font-weight: 600; }
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.4; }
button.primary { background: linear-gradient(180deg, #d4553a, #9c2f22); border: 1px solid #e9a26a; color: #fff6e6; box-shadow: 0 6px 18px rgba(200, 69, 47, 0.35), inset 0 1px 0 rgba(255, 220, 180, 0.35); }
button.round { width: 42px; height: 42px; border-radius: 50%; padding: 0; font-size: 22px; flex: none; }
button.icon { width: 40px; height: 40px; padding: 0; border-radius: 12px; font-size: 18px; position: relative; flex: none; }
button.danger { background: rgba(229, 72, 77, 0.2); border-color: rgba(229, 72, 77, 0.5); }
button.small { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
input, select { width: 100%; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 16px; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dim); font-weight: 600; margin-bottom: 10px; }
.row { display: flex; gap: 8px; align-items: center; }
.sp { flex: 1; }
.hint { color: var(--dim); font-size: 12px; margin: 0 0 10px; }
.err { color: #ff8f93; min-height: 18px; margin: 8px 0 0; font-size: 13px; }

/* ---------- lobby ---------- */
.brand { position: absolute; top: calc(var(--sat) + 14px); left: 0; right: 0; text-align: center; pointer-events: none; }
.brand h1 { margin: 0; font: italic 700 clamp(24px, 8.6vw, 38px) Georgia, serif; white-space: nowrap; color: #ffe2b8; text-shadow: 0 0 18px #ff9a3c, 0 0 40px rgba(255, 140, 60, 0.5); }
.brand p { margin: 2px 0 0; color: var(--teal); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 62%; overflow-y: auto; padding: 14px 16px calc(var(--sab) + 16px);
  background: var(--panel); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; backdrop-filter: blur(10px); }
.char-pick { display: flex; align-items: center; gap: 10px; }
.char-id { flex: 1; text-align: center; display: flex; flex-direction: column; }
.char-id strong { font-size: 20px; }
.char-id span { color: var(--dim); font-size: 12px; }
.char-try { display: flex; gap: 6px; justify-content: center; margin: 8px 0 12px; }
.char-try button { padding: 5px 10px; font-size: 12px; border-radius: 999px; }
.tabs, .presets { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button, .presets button { flex: 1; padding: 9px 6px; }
.tabs button.on, .presets button.on { background: rgba(201, 162, 74, 0.2); border-color: var(--brass); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
input.code { text-transform: uppercase; letter-spacing: 0.3em; text-align: center; font-weight: 700; font-size: 22px; }
#joinBtn, #hostBtn { width: 100%; padding: 14px; font-size: 17px; margin-top: 4px; }
.pen-head { display: flex; flex-direction: column; margin: 6px 0 8px; }
.pen-head .hint { margin: 0; }
.pen-row { display: grid; grid-template-columns: 1fr 112px 36px; gap: 6px; margin-bottom: 6px; }
.pen-row input, .pen-row select { padding: 8px; font-size: 14px; }
.pen-row button { padding: 0; }
#tab-host .row { margin-bottom: 12px; }
#tab-host .row button { flex: 1; font-size: 13px; }

@media (min-width: 760px) {
  .sheet { left: auto; right: 24px; bottom: 24px; top: 24px; width: 400px; max-height: none; border-radius: 22px; border: 1px solid var(--line); }
  .brand { right: 424px; }
}

/* ---------- game chrome ---------- */
#topbar { position: absolute; top: calc(var(--sat) + 8px); left: 10px; right: 10px; display: flex; gap: 8px; align-items: center; }
.pill { border-radius: 999px; padding: 8px 14px; font-weight: 800; letter-spacing: 0.14em; background: rgba(0, 0, 0, 0.5); }
#blindsLbl { font-size: 12px; color: var(--dim); text-shadow: 0 1px 3px #000; }
#chatDot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); }
#banner { position: absolute; top: calc(var(--sat) + 60px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.banner { background: rgba(0, 0, 0, 0.72); border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; font-weight: 700; max-width: 92%; text-align: center;
  animation: bannerIn 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
.banner.big { font-size: 26px; padding: 10px 26px; color: var(--gold); border-color: var(--gold); text-shadow: 0 0 14px rgba(255, 215, 106, 0.7); }
.banner.red { color: #fff; background: rgba(229, 72, 77, 0.85); border-color: #ff9a9d; }
.banner.out { opacity: 0; transition: opacity 0.4s; }
@keyframes bannerIn { from { transform: scale(0.5); opacity: 0; } }

/* The low banner: smoked glass with a brass edge; your cards rise over it like a held hand. */
#hud { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 10px calc(var(--sab) + 10px); display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s; }
#hud::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; top: 34px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 13, 9, 0.88), rgba(10, 7, 5, 0.97)); border-top: 1px solid rgba(201, 162, 74, 0.7);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6), 0 -18px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 225, 160, 0.12); }
#hud::after { content: ''; position: absolute; left: 12%; right: 12%; top: 34px; height: 2px; z-index: -1; background: linear-gradient(90deg, transparent, rgba(232, 192, 106, 0.9), transparent); }
#hud > * { pointer-events: auto; }
#status { text-align: center; color: var(--dim); font-size: 13px; min-height: 18px; text-shadow: 0 1px 3px #000; pointer-events: none; }
#mine { display: flex; align-items: flex-end; gap: 12px; }
#myCards { display: flex; gap: 0; min-width: 104px; min-height: 76px; padding-left: 4px; }
#myCards .card { width: 54px; height: 76px; font-size: 25px; margin-right: -8px; }
#myCards .card:nth-child(1) { transform: rotate(-7deg) translateY(2px); }
#myCards .card:nth-child(2) { transform: rotate(6deg); }
.card { width: 44px; height: 62px; border-radius: 7px; background: linear-gradient(160deg, #fffdf6, #efe7d4); color: #17120e; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font: 700 21px/1 Georgia, serif; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(120, 90, 40, 0.25); }
.card.red { color: #d3243b; }
.card span { font-size: 19px; }
.card.folded { opacity: 0.4; }
.card.back { background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(0, 0, 0, 0.25) 31%, transparent 33%), repeating-linear-gradient(45deg, #6e1a22 0 5px, #561219 5px 10px); border: 3px solid #efe4cc; }
#myInfo { flex: 1; display: flex; flex-direction: column; min-width: 0; padding-bottom: 4px; }
#myHand { color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 400 20px/1.1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
#myChips { color: var(--dim); font-size: 13px; }
#myChips::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px;
  background: radial-gradient(circle, #e8c06a 0 35%, #8a2a22 36% 60%, #e8c06a 61%); }
#actions { display: flex; gap: 8px; }
#actions button { flex: 1; padding: 14px 6px; font: 400 19px/1.1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; border-radius: 10px; min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.18), 0 3px 0 rgba(0, 0, 0, 0.5); }
#actions .fold { background: linear-gradient(180deg, rgba(150, 40, 34, 0.55), rgba(90, 22, 20, 0.7)); border-color: rgba(224, 87, 76, 0.6); }
#actions .call { background: linear-gradient(180deg, rgba(40, 110, 72, 0.6), rgba(22, 64, 42, 0.75)); border-color: rgba(90, 180, 120, 0.6); }
#actions .raise { background: linear-gradient(180deg, rgba(201, 162, 74, 0.45), rgba(120, 90, 34, 0.6)); border-color: rgba(232, 192, 106, 0.8); }
#actions small { font-family: system-ui, sans-serif; text-transform: none; letter-spacing: 0; }
#actions small { display: block; font-weight: 500; font-size: 12px; opacity: 0.85; }
#turnBar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; visibility: hidden; }
#turnBar.on { visibility: visible; }
#turnBar i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; }
#raiseBox { background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
#raiseBox .presets { margin: 0; }
#raiseBox .presets button { padding: 7px 2px; font-size: 13px; }
#raiseRange { flex: 1; padding: 0; height: 36px; accent-color: var(--gold); border: 0; background: none; }
#emotes { display: flex; gap: 6px; justify-content: flex-end; }
#emotes button { width: 44px; height: 44px; padding: 0; font-size: 22px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); }

@media (min-width: 760px) {
  #hud { left: 50%; right: auto; width: 520px; transform: translateX(-50%); background: none; }
}

/* ---------- things pinned to the 3D scene ---------- */
.plate { position: absolute; transform: translate(-50%, -100%); background: linear-gradient(180deg, rgba(24, 16, 11, 0.9), rgba(12, 8, 6, 0.9)); border: 1px solid rgba(201, 162, 74, 0.35); border-radius: 6px; padding: 3px 8px 5px;
  text-align: center; min-width: 74px; max-width: 124px; font-size: 12px; line-height: 1.25; transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s; }
.plate b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate .chips { color: var(--gold); font-weight: 700; }
.plate .tag { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal); min-height: 12px; }
.plate.acting { border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 215, 106, 0.6); }
.plate.folded { opacity: 0.5; }
.plate.out .chips { color: var(--red); }
.plate.allin .tag { color: #ff8f93; font-weight: 800; }
.plate.winner { border-color: var(--teal); box-shadow: 0 0 16px rgba(56, 214, 196, 0.7); }
.plate .bar { height: 3px; border-radius: 3px; background: var(--gold); margin-top: 3px; transform-origin: left; }
.plate .badges { position: absolute; top: -9px; right: -6px; display: flex; gap: 2px; }
.plate .badges i { font-style: normal; font-size: 9px; font-weight: 800; background: #f4f4f0; color: #15151d; border-radius: 999px; padding: 1px 5px; }
.plate .badges i.host { background: var(--pink); color: #fff; }
.betlbl, .potlbl { position: absolute; transform: translate(-50%, -50%); font-weight: 800; font-size: 12px; background: rgba(0, 0, 0, 0.7); border-radius: 999px; padding: 2px 8px; color: var(--gold); white-space: nowrap; }
.potlbl { font-size: 15px; padding: 4px 12px; border: 1px solid rgba(255, 215, 106, 0.5); }
.bubble { position: absolute; transform: translate(-50%, -100%); margin-top: -62px; z-index: 2; background: #fff; color: #15151d; border-radius: 14px; padding: 6px 10px; font-size: 12px; font-weight: 600;
  max-width: 190px; text-align: center; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); animation: bubbleIn 0.25s cubic-bezier(0.2, 1.5, 0.4, 1); }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bubble.emoji { background: none; box-shadow: none; font-size: 40px; padding: 0; animation: emojiUp 1.8s ease-out forwards; }
.bubble.emoji::after { display: none; }
.bubble.chat { background: #d9fffb; }
.bubble.chat::after { border-top-color: #d9fffb; }
@keyframes bubbleIn { from { transform: translate(-50%, -100%) scale(0.3); opacity: 0; } }
@keyframes emojiUp { from { transform: translate(-50%, -60%) scale(0.3); opacity: 0; } 20% { transform: translate(-50%, -100%) scale(1.2); opacity: 1; } to { transform: translate(-50%, -190%) scale(1); opacity: 0; } }

/* ---------- panels ---------- */
.panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100%); background: var(--panel); border-left: 1px solid var(--line); backdrop-filter: blur(12px);
  padding: calc(var(--sat) + 12px) 14px calc(var(--sab) + 14px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; z-index: 5; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-head strong { font-size: 18px; }
.panel h3 { margin: 8px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--teal); }
.panel table { width: 100%; border-collapse: collapse; font-size: 13px; }
.panel td, .panel th { padding: 5px 4px; text-align: right; border-bottom: 1px solid var(--line); }
.panel td:first-child, .panel th:first-child { text-align: left; }
.panel th { color: var(--dim); font-weight: 600; font-size: 11px; }
.pos { color: #6fe39a; } .neg { color: #ff8f93; }
.rules { color: var(--dim); font-size: 13px; margin: 0; }
.plist { display: flex; flex-direction: column; gap: 6px; }
.plist > div { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 6px 8px; }
.plist span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.penlog { margin: 0; padding-left: 18px; font-size: 13px; color: var(--dim); }
.penlog b { color: var(--text); }
.stack { display: flex; flex-direction: column; gap: 8px; }
#chatLog { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
#chatLog b { color: var(--teal); }
#chatForm { display: flex; gap: 6px; }
#chatForm button { padding: 10px 14px; }

/* ---------- penalty wheel ---------- */
#wheel { position: fixed; inset: 0; background: rgba(5, 3, 12, 0.82); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
.wheel-card { text-align: center; width: min(380px, 100%); }
#wheelWho { font-size: 20px; font-weight: 800; margin: 0 0 10px; color: var(--pink); text-shadow: 0 0 14px rgba(255, 61, 129, 0.7); }
.wheel-wrap { position: relative; width: 100%; aspect-ratio: 1; }
#wheelCanvas { width: 100%; height: 100%; display: block; }
.wheel-pin { position: absolute; top: -4px; left: 50%; margin-left: -12px; border: 12px solid transparent; border-top: 22px solid #fff; filter: drop-shadow(0 2px 4px #000); }
#wheelText { font-size: 22px; font-weight: 800; min-height: 60px; margin: 12px 0; color: var(--gold); }
#wheelOk { padding: 12px 30px; }

#toasts { position: fixed; left: 0; right: 0; top: calc(var(--sat) + 56px); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 30; }
.toast { background: rgba(20, 16, 34, 0.96); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 13px; max-width: 90%; animation: bannerIn 0.25s; }
.toast.bad { border-color: var(--red); color: #ffc2c4; }

/* ---------- character select ---------- */
button.wide { width: 100%; margin-top: 8px; padding: 8px; font-size: 13px; }
#picker { position: fixed; inset: 0; z-index: 15; background: rgba(5, 3, 12, 0.9); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center;
  padding: calc(var(--sat) + 12px) 12px calc(var(--sab) + 12px); }
.picker-card { width: min(560px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; }
#pickGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; overflow-y: auto; }
@media (min-width: 560px) { #pickGrid { grid-template-columns: repeat(4, 1fr); } }
.pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 10px; background: rgba(255, 255, 255, 0.06); }
.pick img { width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: contain; }
.pick strong { font-size: 14px; }
.pick span { font-size: 11px; color: var(--dim); font-weight: 500; line-height: 1.2; }
.pick.on { border-color: var(--teal); background: rgba(56, 214, 196, 0.16); }
.pick.taken { opacity: 0.4; }
.pick-group { grid-column: 1 / -1; margin: 10px 2px 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); position: sticky; top: 0; z-index: 1; padding: 6px 4px; background: rgba(11, 10, 20, 0.92); border-radius: 8px; }
.pick-group:first-child { margin-top: 0; }
.pick .noimg { width: 100%; max-width: 120px; aspect-ratio: 1; display: grid; place-items: center; font-size: 40px; color: var(--dim); }
.pick { min-width: 0; }
.pick { position: relative; }
.pick-badge { position: absolute; top: 6px; right: 6px; z-index: 1; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 700; background: rgba(56, 214, 196, 0.9); color: #08121a; pointer-events: none; }
.pick-subhead { grid-column: 1 / -1; position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 4px; background: rgba(11, 10, 20, 0.95); border-radius: 10px; animation: pickIn 0.18s ease-out; }
.pick-subhead strong { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-back { min-height: 44px; padding: 0 16px; font-size: 15px; flex: none; }
.pick-subhead ~ .pick { animation: pickIn 0.18s ease-out; }
@keyframes pickIn { from { opacity: 0; transform: translateX(24px); } }
.pick strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#raiseNum { width: 92px; flex: none; text-align: center; font-weight: 700; padding: 8px 4px; }

/* ---------- cutscenes ---------- */
body.cine #hud { opacity: 0; transform: translateY(14px); pointer-events: none; }
body.cine #hud > * { pointer-events: none; }
body.cine #overlay .plate, body.cine #overlay .betlbl, body.cine #overlay .potlbl, body.cine #topbar, body.cine #banner { opacity: 0; transition: opacity 0.25s; }
#cine { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#cine .lb { position: absolute; left: 0; right: 0; height: 8vh; background: #000; transform: scaleY(0); transition: transform 0.45s cubic-bezier(0.3, 0.8, 0.3, 1); }
#cine .lb.top { top: 0; transform-origin: top; }
#cine .lb.bot { bottom: 0; transform-origin: bottom; }
#cine.on .lb { transform: scaleY(1); }
/* Same low banner as your HUD, now about them. */
#cine .cine-bar { position: absolute; left: 0; right: 0; bottom: calc(8vh - 1px); padding: 10px 16px calc(var(--sab) + 12px); display: flex; align-items: flex-end; gap: 14px;
  background: linear-gradient(180deg, rgba(20, 13, 9, 0.9), rgba(10, 7, 5, 0.97)); border-top: 1px solid rgba(201, 162, 74, 0.7);
  transform: translateY(110%); transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) 0.1s; }
#cine.on .cine-bar { transform: none; }
#cine .cine-tag { flex: 1; min-width: 0; position: relative; padding-left: 14px; }
#cine .cine-tag::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; background: var(--slash, var(--brass)); transform: skewX(-12deg); }
#cine .cine-kind { font: 400 15px/1 var(--display); letter-spacing: 0.22em; color: var(--slash, var(--gold)); text-transform: uppercase; }
#cine .cine-name { font: 400 clamp(30px, 9vw, 54px)/0.95 var(--display); text-transform: uppercase; letter-spacing: 0.02em; color: #fff6e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6); transform: skewX(-6deg) translateX(-30px); opacity: 0; transition: transform 0.5s cubic-bezier(0.2, 1.2, 0.3, 1) 0.2s, opacity 0.3s 0.2s; }
#cine.on .cine-name { transform: skewX(-6deg); opacity: 1; }
#cine .cine-sub { font-size: 12px; color: var(--dim); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px; }
#cine .cine-cards { display: flex; flex: none; }
#cine .cine-cards .card { width: 50px; height: 70px; font-size: 23px; margin-left: -6px; opacity: 0; transform: translateY(20px) rotate(-6deg); transition: transform 0.4s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.3s; }
#cine.on .cine-cards .card { opacity: 1; transform: rotate(-4deg); }
#cine.on .cine-cards .card + .card { transform: rotate(5deg); transition-delay: 0.12s; }
#cine .cine-hand { position: absolute; right: 16px; top: -26px; font: 400 18px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); text-shadow: 0 2px 6px #000; }
#cine.lose .cine-cards .card, #cine.bust .cine-cards .card { filter: grayscale(0.6) brightness(0.8); }
#cine .cine-skip { position: absolute; right: 12px; top: calc(8vh + 56px); font-size: 11px; color: rgba(255, 240, 220, 0.5); letter-spacing: 0.1em; text-transform: uppercase; }
/* GLaDOS-style short circuits */
body.glitch #scene { animation: glitch 0.16s steps(2) 1; }
@keyframes glitch {
  0% { filter: hue-rotate(40deg) contrast(1.6) saturate(1.6); transform: translate(4px, -2px) skewX(2deg); }
  50% { filter: hue-rotate(-60deg) contrast(1.3) brightness(1.4); transform: translate(-5px, 1px); clip-path: inset(10% 0 30% 0); }
  100% { filter: none; transform: none; clip-path: none; }
}
#cine .cine-cards .vs { width: 14px; }
#cine.duel .cine-name { font-size: clamp(24px, 6.5vw, 42px); }
#cine.duel .cine-cards .card { width: 40px; height: 56px; font-size: 18px; margin-left: -4px; }

/* The showdown panel: big enough to read on a phone who is winning. */
#cine .duel-panel { display: none; position: absolute; left: 50%; bottom: calc(8vh + 96px + var(--sab)); transform: translate(-50%, 12px); opacity: 0; width: min(560px, 96vw);
  padding: 10px 12px 12px; border-radius: 14px; background: linear-gradient(180deg, rgba(22, 15, 11, 0.86), rgba(10, 7, 5, 0.9)); border: 1px solid rgba(201, 162, 74, 0.6);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); transition: opacity 0.35s, transform 0.35s; }
#cine.duel .duel-panel { display: block; }
#cine.duel.on .duel-panel { opacity: 1; transform: translate(-50%, 0); }
#cine.duel .cine-cards { display: none; }
.dp-board { display: flex; justify-content: center; gap: 5px; min-height: 58px; margin-bottom: 10px; }
.dp-board .card { width: 40px; height: 56px; font-size: 18px; }
.dp-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dp-side { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; padding: 6px 4px; border-radius: 10px; transition: background 0.4s, opacity 0.4s, box-shadow 0.4s; }
.dp-name { font: 400 20px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-cards { display: flex; gap: 6px; min-height: 92px; }
.dp-cards .card { width: 64px; height: 90px; font-size: 30px; }
.dp-cards .card span { font-size: 26px; }
.dp-hand { font: 400 16px/1.1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); min-height: 18px; text-align: center; }
.dp-vs { font: 400 22px/1 var(--display); color: rgba(243, 234, 216, 0.6); flex: none; }
.dp-side.won { background: rgba(232, 192, 106, 0.16); box-shadow: inset 0 0 0 1px rgba(232, 192, 106, 0.7), 0 0 24px rgba(232, 192, 106, 0.35); }
.dp-side.lost { opacity: 0.55; }
.card.flip { animation: cardFlip 0.45s cubic-bezier(0.2, 1.3, 0.4, 1); }
@keyframes cardFlip { 0% { transform: rotateY(90deg) scale(1.25); } 100% { transform: none; } }

/* The verdict slams in over the panel. */
#cine .dp-result { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(2.2) rotate(-4deg); opacity: 0; pointer-events: none; text-align: center; white-space: nowrap;
  padding: 10px 26px 12px; border-radius: 10px; background: rgba(10, 7, 5, 0.92); border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(10, 7, 5, 0.8), 0 0 50px rgba(232, 192, 106, 0.5);
  transition: transform 0.45s cubic-bezier(0.2, 1.5, 0.35, 1), opacity 0.2s; }
#cine .dp-result.on { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-4deg); }
#cine .dp-result strong { display: block; font: 400 clamp(38px, 12vw, 68px)/1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; color: var(--gold);
  text-shadow: 3px 3px 0 #000, 0 0 24px rgba(232, 192, 106, 0.6); }
#cine .dp-result span { display: block; margin-top: 4px; font: 400 clamp(18px, 5vw, 26px)/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: #f3ead8; }

/* Board peek: the community cards, big, floating over the felt. */
#boardPeek { position: fixed; left: 50%; top: 30%; z-index: 4; pointer-events: auto; transform: translate(-50%, -40%) scale(0.92); opacity: 0;
  padding: 14px 16px 12px; border-radius: 16px; background: linear-gradient(180deg, rgba(24, 16, 11, 0.82), rgba(10, 7, 5, 0.9)); border: 1px solid rgba(201, 162, 74, 0.6);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 225, 160, 0.15); backdrop-filter: blur(6px);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.2, 1.3, 0.4, 1); }
#boardPeek.on { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: peekFloat 3s ease-in-out 0.3s infinite; }
@keyframes peekFloat { 50% { transform: translate(-50%, calc(-50% - 5px)) scale(1); } }
#boardPeek .bp-cards { display: flex; gap: 8px; justify-content: center; }
#boardPeek .card { width: clamp(52px, 15vw, 76px); height: clamp(73px, 21vw, 106px); font-size: clamp(24px, 7vw, 34px); animation: peekCard 0.3s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
#boardPeek .card span { font-size: clamp(20px, 6vw, 30px); }
@keyframes peekCard { from { transform: translateY(14px) scale(0.85); opacity: 0; } }
#boardPeek .bp-hand { text-align: center; margin-top: 8px; font: 400 18px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); min-height: 0; }
#boardPeek .bp-hand:empty { display: none; }
body.cine #boardPeek { display: none; }
/* The wall shows the board big; the panel keeps a small copy for reference. */
.dp-board { min-height: 44px; margin-bottom: 8px; }
.dp-board .card { width: 30px; height: 42px; font-size: 14px; }
.dp-board .card span { font-size: 12px; }

.panel .row button.on { background: rgba(201, 162, 74, 0.25); border-color: var(--brass); }
.plate.dealer { border-color: rgba(232, 192, 106, 0.8); }
.plate.dealer b { color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }
#raiseBox.chipsOnly .row:not(.presets) { display: none; }
#raiseBox.chipsOnly .presets button.on { background: rgba(201, 162, 74, 0.3); border-color: var(--brass); }
/* Bullshit: your hand as a scrolling strip of tappable cards, claims as speech bubbles */
#bsHand { display: flex; overflow-x: auto; overflow-y: visible; padding: 16px 10px 4px 22px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#bsHand::-webkit-scrollbar { display: none; }
#bsHand .bs-group { flex: none; position: relative; margin-right: 6px; padding-bottom: 12px; }
#bsHand .bs-group .card { width: 42px; height: 60px; font-size: 20px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35); }
#bsHand .bs-group.stack .card { box-shadow: 3px -3px 0 -1px #f4efe2, 3px -3px 0 0 rgba(0, 0, 0, 0.3), 6px -6px 0 -1px #f4efe2, 6px -6px 0 0 rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.35); }
#bsHand .bs-count { position: absolute; top: -9px; right: -10px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--gold, #ffd23f); color: #2a1a00; font: 700 13px/22px var(--display, sans-serif); text-align: center; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
#bsHand .bs-suits { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; line-height: 1; text-align: center; color: rgba(255, 255, 255, 0.75); letter-spacing: -1px; white-space: nowrap; }
#bsHand.choosing .bs-group { cursor: pointer; }
#bsHand.choosing .bs-group.due .card { outline: 2px solid rgba(255, 210, 63, 0.85); outline-offset: 1px; }
#bsPick { position: fixed; inset: 0; z-index: 16; background: rgba(5, 3, 12, 0.78); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; }
#bsPick[hidden] { display: none; }
#bsPick .bsp-card { width: min(520px, 100%); max-height: 92vh; overflow-y: auto; background: #1b1410; border: 1px solid rgba(201, 162, 74, 0.4); border-radius: 18px 18px 0 0; padding: 12px 14px calc(var(--sab, 0px) + 14px); }
#bsPick .bsp-hint { margin: 2px 0 10px; font-size: 13px; opacity: 0.75; }
#bsPick .bsp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
#bsPick .bsp-tile { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 6px 4px; text-align: center; }
#bsPick .bsp-tile.none { opacity: 0.35; }
#bsPick .bsp-tile.on { background: rgba(201, 162, 74, 0.22); border-color: var(--brass, #c9a24a); }
#bsPick .bsp-tile.due { box-shadow: inset 0 0 0 2px rgba(255, 210, 63, 0.8); }
#bsPick .bsp-rank { font: 400 28px/1.1 var(--display, serif); cursor: pointer; }
#bsPick .bsp-have { font-size: 11px; opacity: 0.7; }
#bsPick .bsp-step { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
#bsPick .bsp-step button { width: 32px; height: 32px; border-radius: 50%; padding: 0; font-size: 18px; }
#bsPick .bsp-step strong { font-size: 16px; }
#bsPick .bsp-foot { display: flex; gap: 8px; margin-top: 12px; }
#bsPick .bsp-foot .primary { flex: 1; }
#bsPick .bsp-foot .primary small { display: block; font-size: 11px; opacity: 0.8; }
#bsPick .bsp-foot .primary.bluff { background: linear-gradient(180deg, #ef5a5f, #b8262b); }
.bubble.claim { background: #fff3d6; font: 400 15px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.bubble.claim.call { background: #e5484d; color: #fff; font-size: 18px; animation: callPop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
.bubble.claim.call::after { border-top-color: #e5484d; }
@keyframes callPop { from { transform: translate(-50%, -100%) scale(0.4); } to { transform: translate(-50%, -100%) scale(1); } }
#actions button.bs-call { background: linear-gradient(180deg, #ef5a5f, #b8262b); color: #fff; font-size: 24px; animation: callPulse 1s ease-in-out infinite; }
@keyframes callPulse { 50% { filter: brightness(1.18); } }
/* Time stop: invert, then a cold grey with the stand's rush on top */
body.timestop #scene { animation: tsScene 2.9s linear forwards; }
@keyframes tsScene {
  0% { filter: none; } 6% { filter: invert(1) hue-rotate(180deg) saturate(2); } 14% { filter: invert(1) hue-rotate(180deg); }
  20% { filter: grayscale(1) sepia(0.25) hue-rotate(185deg) contrast(1.2) brightness(0.9); }
  88% { filter: grayscale(1) sepia(0.25) hue-rotate(185deg) contrast(1.2) brightness(0.9); } 100% { filter: none; }
}
#timestop { position: fixed; inset: 0; z-index: 30; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 24vh; overflow: hidden; }
#timestop[hidden] { display: none; }
#timestop .ts-ring { position: absolute; left: 50%; top: 45%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 30px rgba(170, 120, 255, 0.9), inset 0 0 30px rgba(170, 120, 255, 0.7); backdrop-filter: invert(1); -webkit-backdrop-filter: invert(1); animation: tsRing 0.75s ease-out forwards; }
@keyframes tsRing { from { transform: scale(0.2); opacity: 1; } 70% { opacity: 1; } to { transform: scale(40); opacity: 0; } }
#timestop .ts-line { font: italic 400 clamp(30px, 9vw, 64px)/1 var(--display); letter-spacing: 0.04em; color: #ffe26a; -webkit-text-stroke: 2px #2a0d45;
  text-shadow: 4px 4px 0 #6b2bb5, 0 0 24px rgba(160, 90, 255, 0.8); transform: skewX(-8deg); animation: tsLine 2.8s ease-out forwards; text-align: center; padding: 0 12px; }
#timestop .ts-sub { margin-top: 8px; font: 400 14px/1 var(--display); letter-spacing: 0.4em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); animation: tsLine 2.8s ease-out 0.15s both; }
@keyframes tsLine { 0% { opacity: 0; transform: skewX(-8deg) scale(2.2); } 10% { opacity: 1; transform: skewX(-8deg) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: skewX(-8deg) scale(0.96); } }
#rush { position: fixed; inset: 0; z-index: 29; pointer-events: none; overflow: hidden; }
.rush-word { position: absolute; font: italic 400 40px/1 var(--display); color: #f5d74a; -webkit-text-stroke: 2px #3b0f5c; text-shadow: 3px 3px 0 #7d2fd0;
  transform: translate(-50%, -50%) rotate(var(--r)) scale(0.3); animation: rushPop 0.8s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; }
.rush-word.ora { color: #8fe3ff; -webkit-text-stroke-color: #0b2a4a; text-shadow: 3px 3px 0 #2a6fd6; }
@keyframes rushPop { 0% { transform: translate(-50%, -50%) rotate(var(--r)) scale(0.3); opacity: 0; } 15% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1.15); opacity: 1; }
  70% { opacity: 1; } 100% { transform: translate(-50%, -80%) rotate(var(--r)) scale(1); opacity: 0; } }
/* Radio (Alastor): an old broadcast with static, scanlines and a red pulse */
body.radio #scene { animation: rfScene 3.3s steps(30) forwards; }
@keyframes rfScene {
  0% { filter: none; transform: none; } 3% { filter: sepia(1) contrast(2) brightness(1.5); transform: skewX(4deg); }
  9%, 86% { filter: sepia(0.8) saturate(2) hue-rotate(-25deg) contrast(1.4) brightness(0.7); transform: none; }
  30% { transform: translateX(-3px); } 31% { transform: none; } 47% { filter: sepia(0.8) saturate(2) hue-rotate(-25deg) contrast(1.4) brightness(0.25); } 48% { filter: sepia(0.8) saturate(2) hue-rotate(-25deg) contrast(1.4) brightness(0.7); }
  55% { transform: translateY(2px) skewX(-2deg); } 56% { transform: none; }
  100% { filter: none; transform: none; }
}
#radiofx { position: fixed; inset: 0; z-index: 30; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 22vh; overflow: hidden;
  animation: rfFade 3.3s ease-out forwards; }
#radiofx .rf-dark { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 55% at 50% 52%, transparent 0%, rgba(20, 0, 4, 0.55) 55%, rgba(0, 0, 0, 0.94) 100%);
  animation: rfClose 3.3s ease-in-out forwards, rfPulse 0.64s ease-in-out infinite; }
@keyframes rfClose { 0% { opacity: 0; transform: scale(1.6); } 15% { opacity: 1; transform: scale(1); } 80% { transform: scale(0.85); } 100% { transform: scale(0.85); } }
#radiofx .rf-eyes { position: absolute; display: flex; gap: calc(14px * var(--s)); opacity: 0; transform: scale(var(--s)); animation: rfEyes 1.6s ease-in-out both; }
#radiofx .rf-eyes i { width: 16px; height: 9px; border-radius: 50%; background: #ff2236; box-shadow: 0 0 10px 3px rgba(255, 20, 40, 0.8); display: block; }
@keyframes rfEyes { 0% { opacity: 0; } 20% { opacity: 1; } 35% { opacity: 1; transform: scale(var(--s)) scaleY(1); } 40% { transform: scale(var(--s)) scaleY(0.1); } 45% { transform: scale(var(--s)) scaleY(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
#radiofx[hidden] { display: none; }
#radiofx .rf-static { position: absolute; inset: -50%; opacity: 0.1; mix-blend-mode: screen;
  background: repeating-radial-gradient(circle at 17% 32%, #fff 0 1px, transparent 1px 3px), repeating-radial-gradient(circle at 71% 64%, #fff 0 1px, transparent 1px 4px);
  animation: rfNoise 0.18s steps(3) infinite; }
#radiofx .rf-lines { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.32) 0 2px, transparent 2px 4px); }
#radiofx .rf-line { position: relative; font: italic 400 clamp(26px, 7.5vw, 58px)/1.05 Georgia, 'Times New Roman', serif; letter-spacing: 0.02em; color: #ffe9c2;
  text-shadow: 3px 3px 0 #8a0f1a, 0 0 22px rgba(255, 40, 60, 0.85); animation: rfLine 2.9s ease-out forwards; text-align: center; padding: 0 12px; }
#radiofx .rf-sub { position: relative; margin-top: 10px; font: 400 13px/1 var(--display); letter-spacing: 0.45em; text-transform: uppercase; color: #ffb3b8; animation: rfLine 2.9s ease-out 0.12s both; }
@keyframes rfNoise { 0% { transform: translate(0, 0); } 33% { transform: translate(-7%, 4%); } 66% { transform: translate(5%, -6%); } 100% { transform: translate(-3%, 7%); } }
@keyframes rfPulse { 50% { box-shadow: inset 0 0 140px rgba(200, 10, 30, 0.6); } }
@keyframes rfFade { 0%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rfLine { 0% { opacity: 0; transform: scaleY(0.05); } 8% { opacity: 1; transform: scaleY(1.2); } 12% { transform: scaleY(1); } 40% { opacity: 1; } 42% { opacity: 0.3; } 44%, 78% { opacity: 1; } 100% { opacity: 0; } }
/* K.O. banner */
#ko { position: fixed; inset: 0; z-index: 28; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
#ko[hidden] { display: none; }
#ko .ko-flash { position: absolute; inset: 0; background: #fff; animation: koFlash 0.35s ease-out forwards; }
#ko .ko-slash { position: absolute; left: -10%; right: -10%; top: 50%; height: 110px; margin-top: -62px; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.75) 15%, rgba(0, 0, 0, 0.75) 85%, transparent);
  border-top: 3px solid var(--ko); border-bottom: 3px solid var(--ko); transform: skewY(-4deg); animation: koSlash 1.9s cubic-bezier(0.2, 0.9, 0.3, 1) forwards; }
#ko .ko-word { position: relative; font: italic 400 clamp(56px, 18vw, 120px)/1 var(--display); color: #fff; letter-spacing: 0.02em; -webkit-text-stroke: 3px #000;
  text-shadow: -4px 0 0 var(--ko), 4px 0 0 rgba(0, 220, 255, 0.6), 0 0 30px var(--ko); transform: skewX(-10deg); animation: koWord 1.9s cubic-bezier(0.2, 1.5, 0.4, 1) forwards; white-space: nowrap; }
#ko .ko-sub { position: relative; margin-top: 6px; font: 400 16px/1 var(--display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--ko); text-shadow: 0 2px 0 #000; animation: koSub 1.9s ease-out forwards; }
#ko.ko-machine .ko-word { font-family: ui-monospace, Menlo, monospace; font-style: normal; letter-spacing: 0.08em; font-size: clamp(36px, 11vw, 80px); animation: koWord 1.9s steps(1) forwards, koGlitch 0.12s steps(2) 6; }
#ko.ko-soft .ko-word { font-style: normal; transform: none; -webkit-text-stroke: 2px #6b3fa0; text-shadow: 0 6px 0 #6b3fa0, 0 0 30px #fff; font-size: clamp(44px, 13vw, 96px); }
#ko.ko-hell .ko-word { font-size: clamp(40px, 12vw, 90px); text-shadow: 0 0 18px #ff2a3a, 0 0 40px #ff7a1a, -3px 0 0 #600; }
#ko.ko-bone .ko-word { color: #e8f6ff; text-shadow: 0 0 24px var(--ko), 0 0 6px #fff; }
@keyframes koFlash { from { opacity: 0.85; } to { opacity: 0; } }
@keyframes koSlash { 0% { transform: skewY(-4deg) scaleX(0); } 15% { transform: skewY(-4deg) scaleX(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: skewY(-4deg) scaleX(1) translateX(30%); } }
@keyframes koWord { 0% { opacity: 0; transform: skewX(-10deg) scale(3.5); } 12% { opacity: 1; transform: skewX(-10deg) scale(0.92); } 18% { transform: skewX(-10deg) scale(1.05); } 24%, 82% { opacity: 1; transform: skewX(-10deg) scale(1); } 100% { opacity: 0; transform: skewX(-10deg) scale(1) translateX(40%); } }
@keyframes koSub { 0%, 15% { opacity: 0; transform: translateY(10px); } 25%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes koGlitch { 50% { transform: translateX(6px); clip-path: inset(30% 0 40% 0); } }
/* Voice lines: the transcript of what the character just said */
.bubble.voice { background: #fff8e6; font-style: italic; max-width: 220px; white-space: normal; line-height: 1.25; padding-left: 26px; animation: voiceIn 0.25s cubic-bezier(0.2, 1.4, 0.4, 1); }
.bubble.voice::before { content: '🔊'; position: absolute; left: 7px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; }
.bubble.voice::after { border-top-color: #fff8e6; }
@keyframes voiceIn { from { transform: translate(-50%, -100%) scale(0.6); opacity: 0; } to { transform: translate(-50%, -100%) scale(1); opacity: 1; } }

/* Pai Gow: seven cards in the hand area; the two picked for the low hand lift up. */
#myCards.pg .card { width: 42px; height: 60px; font-size: 19px; margin-right: -6px; transform: none; }
#myCards.pg .card span { font-size: 15px; }
#myCards.pg .pg-pick { cursor: pointer; transition: transform 0.15s; }
#myCards.pg .pg-pick.low { transform: translateY(-14px); box-shadow: 0 0 0 2px #ffd23f, 0 6px 12px rgba(0,0,0,0.4); }
#myCards.pg .pg-gap { display: inline-block; width: 14px; }
.card.joker { color: #7a1730; font-weight: 700; }
.card.joker span { font-size: 10px; letter-spacing: 1px; }

/* Scripted takedown screen effects (takedowns/kit.js) */
#tdfx { position: fixed; inset: 0; pointer-events: none; z-index: 46; overflow: hidden; }
.td-tint { position: absolute; inset: 0; opacity: 0; animation: tdTint 1s ease both; }
@keyframes tdTint { 0% { opacity: 0; } 15%, 75% { opacity: var(--o); } 100% { opacity: 0; } }
.td-cap { position: absolute; left: 0; right: 0; text-align: center; padding: 0 16px; color: #fff; font-weight: 800; text-shadow: 0 3px 0 rgba(0,0,0,0.6), 0 0 18px rgba(0,0,0,0.7); animation: tdCap 2s ease both; }
.td-top { top: 14%; } .td-mid { top: 38%; } .td-low { bottom: 28%; }
.td-big { font: 900 34px/1.1 Impact, 'Arial Black', sans-serif; letter-spacing: 1px; text-transform: uppercase; }
.td-title { font: italic 700 30px/1.15 Georgia, serif; }
.td-typed, .td-terminal { font: 700 22px/1.3 'Courier New', monospace; text-transform: uppercase; }
.td-terminal { color: #ffb000; text-shadow: 0 0 8px rgba(255,176,0,0.7); }
@keyframes tdCap { 0% { opacity: 0; transform: scale(1.15); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.td-notice { position: absolute; top: 72px; left: 12px; display: flex; gap: 8px; align-items: center; padding: 8px 14px; background: rgba(0,0,0,0.72); color: #fff; font: 600 15px/1.2 system-ui, sans-serif; border-radius: 4px; animation: tdNotice 2.5s ease both; }
.td-notice i { font-style: normal; color: #8fd0ff; font-size: 18px; }
@keyframes tdNotice { 0% { opacity: 0; transform: translateX(-20px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.td-pop { position: absolute; transform: translate(-50%, -50%) rotate(var(--r)); font: 900 64px/1 Impact, 'Arial Black', sans-serif; color: #ffd23f; -webkit-text-stroke: 3px #111; text-shadow: 4px 4px 0 #111; animation: tdPop 1.1s cubic-bezier(0.2, 1.6, 0.4, 1) both; white-space: nowrap; }
@keyframes tdPop { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r)) scale(2.4); } 15% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r)) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) rotate(var(--r)) scale(0.9); } }
.td-ov { position: absolute; inset: 0; animation: tdTint 1s ease both; --o: 1; }
.td-ov-static { background: repeating-radial-gradient(circle at 30% 40%, rgba(255,255,255,0.12) 0 1px, transparent 1px 3px), repeating-linear-gradient(0deg, rgba(0,0,0,0.25) 0 2px, transparent 2px 4px); --o: 0.6; }
.td-ov-scan { background: repeating-linear-gradient(0deg, rgba(0,0,0,0.35) 0 2px, transparent 2px 5px); --o: 0.8; }
.td-ov-vignette { background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.85) 100%); }
.td-ov-invert { backdrop-filter: invert(1) hue-rotate(180deg); -webkit-backdrop-filter: invert(1) hue-rotate(180deg); }
.td-ov-blur { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
/* End-of-night awards in the table menu */
.awards { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.awards li { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; background: rgba(255,255,255,.06); border-radius: 8px; padding: 6px 8px; font-size: 14px; }
.awards .aw-icon { font-size: 18px; }
.awards b { color: #ffd76a; }
