:root {
  color-scheme: dark;
  --bg: #07080a;
  --surface: #101217;
  --surface-2: #171a20;
  --line: rgba(235, 195, 111, .24);
  --line-strong: rgba(235, 195, 111, .55);
  --gold: #e7bd6a;
  --gold-light: #fff0bd;
  --ivory: #f8f1df;
  --muted: #969ba5;
  --danger: #e27c73;
  --success: #81d5a0;
  --shadow: 0 20px 60px rgba(0, 0, 0, .48);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.player-color-1 { --player-color: #f0c65f; --player-glow: rgba(240,198,95,.34); --die-highlight: #b18422; --die-mid: #5b3d08; --die-low: #120b01; }
.player-color-2 { --player-color: #ff6679; --player-glow: rgba(255,102,121,.34); --die-highlight: #d84d61; --die-mid: #751526; --die-low: #190208; }
.player-color-3 { --player-color: #68b5ff; --player-glow: rgba(104,181,255,.34); --die-highlight: #438ed1; --die-mid: #174877; --die-low: #020c1c; }
.player-color-4 { --player-color: #65dca1; --player-glow: rgba(101,220,161,.32); --die-highlight: #36aa73; --die-mid: #145b3a; --die-low: #02170d; }
.player-color-5 { --player-color: #c89cff; --player-glow: rgba(200,156,255,.34); --die-highlight: #9566cf; --die-mid: #4a2675; --die-low: #10051d; }
.player-color-6 { --player-color: #e1e7ef; --player-glow: rgba(225,231,239,.28); --die-highlight: #aeb7c3; --die-mid: #59616d; --die-low: #0c0e12; }

* { box-sizing: border-box; }
html { background: #030405; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--ivory);
  background:
    radial-gradient(circle at 12% -10%, rgba(184, 123, 35, .17), transparent 34%),
    radial-gradient(circle at 92% 16%, rgba(99, 108, 140, .12), transparent 26%),
    var(--bg);
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.app-shell {
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 16px calc(92px + env(safe-area-inset-bottom));
  position: relative;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-button { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.brand-mark {
  width: 38px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 12px 12px 16px 16px;
  color: var(--gold-light); font: 700 21px/1 Georgia, serif;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(231,189,106,.04));
  box-shadow: inset 0 0 18px rgba(231,189,106,.08);
}
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font: 600 19px/1 Georgia, serif; letter-spacing: .12em; color: var(--gold-light); }
.brand-copy small { color: var(--muted); font-size: 12px; }

.language-switch { display: flex; padding: 3px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.04); }
.lang { width: 39px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 750; font-size: 13px; cursor: pointer; }
.lang.active { background: var(--ivory); color: #121316; }

.view { display: none; animation: appear .24s ease both; }
.view.active { display: block; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }

.hero-card {
  position: relative; overflow: hidden; border-radius: 26px;
  border: 1px solid var(--line); background: #111; box-shadow: var(--shadow);
}
.hero-card::after { content: none; }
.hero-card img { display: block; width: 100%; height: auto; margin: 0 auto; }
.hero-overlay { position: relative; padding: 20px 18px; text-align: center; background: linear-gradient(180deg, #11100d, #090a0c); }
.hero-overlay .primary-action { width: 100%; justify-content: center; }
.eyebrow { margin: 0 0 7px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 18px; font: 600 clamp(28px, 8vw, 38px)/1.05 Georgia, serif; letter-spacing: -.02em; }
h2 { margin: 2px 0 0; font: 600 26px/1.1 Georgia, serif; }

.primary-action {
  min-height: 54px; border: 1px solid rgba(255,241,189,.68); border-radius: 16px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer;
  color: #16130d; background: linear-gradient(135deg, #fff1c1, #d8a84d 68%, #f7d98d);
  box-shadow: 0 10px 28px rgba(217, 165, 73, .22), inset 0 1px rgba(255,255,255,.8);
  font-weight: 820; text-decoration: none;
}
.primary-action:active { transform: translateY(1px); }
.primary-action:disabled { opacity: .36; cursor: not-allowed; filter: saturate(.35); }
.primary-action.full { width: 100%; margin-top: 14px; }

.secondary-action {
  min-height: 52px; border: 1px solid var(--line-strong); border-radius: 16px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer;
  color: var(--gold-light); background: rgba(231,189,106,.065); font-weight: 800;
}
.secondary-action:active { transform: translateY(1px); }
.secondary-action:disabled { opacity: .4; cursor: wait; }
.secondary-action.full { width: 100%; margin-top: 14px; }

.solo-game-action {
  position: relative; min-height: 74px; padding: 10px 17px 10px 11px;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; overflow: hidden;
  text-align: left; isolation: isolate;
  box-shadow: 0 14px 34px rgba(217,165,73,.26), inset 0 1px rgba(255,255,255,.84);
}
.solo-game-action::before {
  content: ""; position: absolute; z-index: -1; inset: -75% 40% -75% -20%;
  transform: rotate(18deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.48), transparent);
  animation: solo-button-shimmer 4.2s ease-in-out infinite;
}
.solo-game-action > span:last-child { font-size: 28px; line-height: 1; }
.solo-action-icon {
  width: 44px; height: 48px; display: grid; place-items: center;
  border: 1px solid rgba(40,29,7,.25); border-radius: 14px 14px 18px 18px;
  color: #fff4c9; background: radial-gradient(circle at 35% 25%, #856c34, #19160f 72%);
  box-shadow: inset 0 1px rgba(255,255,255,.25), 0 6px 14px rgba(67,44,8,.22); font-size: 21px;
}
.solo-action-copy { min-width: 0; display: grid; gap: 3px; }
.solo-action-copy strong { font-size: 16px; line-height: 1.15; }
.solo-action-copy small { color: rgba(34,27,15,.72); font-size: 11px; font-weight: 760; line-height: 1.25; }
.create-friends-action { margin-top: 8px !important; }

@keyframes solo-button-shimmer {
  0%, 56%, 100% { transform: translateX(-110%) rotate(18deg); opacity: 0; }
  68% { opacity: .55; }
  82% { transform: translateX(260%) rotate(18deg); opacity: 0; }
}

.online-launch-card {
  width: 100%; min-height: 92px; margin-top: 12px; padding: 14px 15px; display: grid;
  grid-template-columns: 48px 1fr auto; align-items: center; gap: 13px; text-align: left; cursor: pointer;
  border: 1px solid rgba(231,189,106,.5); border-radius: 21px; color: var(--ivory);
  background:
    radial-gradient(circle at 92% 0, rgba(231,189,106,.18), transparent 42%),
    linear-gradient(135deg, rgba(231,189,106,.1), rgba(255,255,255,.025));
  box-shadow: 0 14px 35px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.04);
}
.online-launch-card:active { transform: translateY(1px); }
.online-launch-icon {
  width: 48px; height: 52px; display: grid; place-items: center; border: 1px solid var(--line-strong);
  border-radius: 15px 15px 19px 19px; color: var(--gold-light); background: rgba(231,189,106,.075);
  font: 600 27px/1 Georgia, serif; box-shadow: inset 0 0 18px rgba(231,189,106,.08);
}
.online-launch-copy { min-width: 0; display: grid; gap: 3px; }
.online-launch-copy strong { font-size: 18px; }
.online-launch-copy small { color: #b8bcc5; font-size: 12px; line-height: 1.35; }
.online-launch-label { color: var(--gold); font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.online-launch-arrow { color: var(--gold-light); font-size: 28px; }

.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.action-card {
  min-height: 128px; padding: 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 20px;
  display: flex; flex-direction: column; align-items: flex-start; text-align: left; cursor: pointer;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
}
.action-card strong { margin-top: auto; font-size: 16px; }
.action-card small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.action-index { color: var(--gold); font: 600 24px/1 Georgia, serif; }

.resume-card, .offline-card {
  margin-top: 12px; padding: 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid rgba(129,213,160,.22); border-radius: 18px; background: rgba(129,213,160,.055);
}
.resume-card > div, .offline-card > div { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; }
.resume-card small, .offline-card small { grid-column: 2; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px rgba(129,213,160,.65); }
.text-button { border: 0; padding: 8px; background: transparent; color: var(--gold-light); font-weight: 750; cursor: pointer; }
.version-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 2px 8px; }
.section-heading h1 { margin-bottom: 8px; }
.icon-button, .close-button { border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); border-radius: 50%; cursor: pointer; }
.icon-button { width: 42px; height: 42px; }

.panel { border: 1px solid rgba(255,255,255,.1); border-radius: 22px; padding: 17px; background: linear-gradient(150deg, rgba(255,255,255,.052), rgba(255,255,255,.018)); box-shadow: 0 18px 45px rgba(0,0,0,.2); }
.setup-row { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.setup-row > div:first-child { display: grid; gap: 3px; }
.setup-row small { color: var(--muted); }
.stepper { display: grid; grid-template-columns: 40px 46px 40px; align-items: center; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.stepper button { height: 39px; border: 0; background: rgba(231,189,106,.08); color: var(--gold-light); font-size: 22px; cursor: pointer; }
.stepper output { text-align: center; font-weight: 800; }
.player-name-hint { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.name-list { display: grid; gap: 9px; margin: 9px 0 16px; }
.name-field { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 9px; }
.name-field span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--gold); font: 600 13px/1 Georgia, serif; }
.name-field input, .select-field {
  width: 100%; min-height: 46px; border: 1px solid rgba(255,255,255,.11); border-radius: 12px; padding: 0 12px;
  color: var(--ivory); background: #15171c; outline: none;
}
.name-field input:focus, .select-field:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(231,189,106,.09); }
.field-label { display: block; margin: 15px 0 7px; font-size: 13px; color: var(--muted); }
.privacy-note, .helper-text { margin: 12px 4px 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.45; }

.online-heading { align-items: center; }
.online-heading h1 { max-width: 390px; }
.connection-badge {
  flex: 0 0 auto; min-width: 54px; padding: 7px 9px; border: 1px solid rgba(129,213,160,.25);
  border-radius: 999px; color: var(--success); background: rgba(129,213,160,.06);
  font-size: 10px; font-weight: 850; text-align: center; letter-spacing: .04em;
}
.connection-badge.loading { border-color: var(--line); color: var(--gold-light); background: rgba(231,189,106,.06); }
.connection-badge.error { border-color: rgba(226,124,115,.3); color: var(--danger); background: rgba(226,124,115,.055); }
.online-entry { display: grid; gap: 12px; }
.online-panel { padding: 16px; }
.online-panel-heading { display: grid; grid-template-columns: 38px 1fr; gap: 11px; align-items: center; }
.online-panel-heading > div { display: grid; gap: 3px; }
.online-panel-heading strong { font-size: 17px; }
.online-panel-heading small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.online-step {
  width: 37px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: 12px 12px 15px 15px; color: var(--gold); font: 600 15px/1 Georgia, serif;
  background: rgba(231,189,106,.05);
}
.online-input {
  width: 100%; min-height: 48px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  padding: 0 13px; color: var(--ivory); background: #15171c; outline: none; font-size: 16px;
}
.online-input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(231,189,106,.09); }
.room-code-input { text-transform: uppercase; letter-spacing: .22em; font-weight: 850; }
.online-divider { height: 1px; display: grid; place-items: center; background: rgba(255,255,255,.08); margin: 4px 18px; }
.online-divider span { padding: 0 11px; color: var(--muted); background: var(--bg); font-size: 11px; text-transform: uppercase; }

.room-hero {
  min-height: 100px; margin-bottom: 12px; padding: 15px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 14px; border: 1px solid rgba(231,189,106,.48); border-radius: 21px;
  background:
    radial-gradient(circle at 0 100%, rgba(231,189,106,.15), transparent 42%),
    linear-gradient(145deg, rgba(231,189,106,.09), rgba(255,255,255,.022));
}
.room-hero > div { display: grid; gap: 5px; }
.room-hero small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.room-hero output { color: var(--gold-light); font: 600 34px/1 Georgia, serif; letter-spacing: .12em; }
.copy-room-button { min-height: 42px; max-width: 130px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--gold-light); background: rgba(231,189,106,.055); font-size: 11px; font-weight: 800; cursor: pointer; }
.room-panel { padding: 16px; }
.room-panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid rgba(255,255,255,.08); }
.room-panel-title > div { display: grid; gap: 3px; }
.room-panel-title small { color: var(--muted); font-size: 11px; }
.live-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(129,213,160,.08), 0 0 14px rgba(129,213,160,.45); }
.online-player-list { display: grid; gap: 8px; margin-top: 13px; }
.online-player {
  min-height: 52px; padding: 9px 11px; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,.085); border-radius: 14px; background: rgba(255,255,255,.025);
}
.online-player.you { border-color: rgba(231,189,106,.34); background: rgba(231,189,106,.045); }
.online-player.computer-player { border-color: rgba(127,174,213,.3); background: linear-gradient(135deg, rgba(92,142,183,.08), rgba(231,189,106,.035)); }
.online-player.computer-player .online-player-avatar { color: #dceeff; border: 1px solid rgba(135,192,235,.28); background: rgba(87,148,198,.12); }
.online-player-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: var(--gold); background: rgba(231,189,106,.08); font: 600 13px/1 Georgia, serif; }
.online-player[class*="player-color-"] { box-shadow: inset 3px 0 0 var(--player-color); }
.online-player[class*="player-color-"] .online-player-avatar { color: var(--player-color); border: 1px solid var(--player-color); background: rgba(5,7,9,.72); box-shadow: 0 0 12px var(--player-glow); }
.online-player-copy { min-width: 0; display: grid; gap: 2px; }
.online-player-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.online-player-copy small { color: var(--muted); font-size: 10px; }
.online-player-seat { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.player-die-mini {
  width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #f7d98d; border-radius: 5px;
  color: #ffeab0; background: radial-gradient(circle at 27% 20%, var(--die-highlight), var(--die-mid) 58%, var(--die-low));
  box-shadow: inset 0 1px rgba(255,255,255,.28), 0 0 8px var(--player-glow); font: 800 8px/1 Georgia, serif;
}
.host-setup { margin-top: 15px; padding-top: 2px; border-top: 1px solid rgba(255,255,255,.08); }
.guest-waiting { margin-top: 15px; padding: 14px; display: grid; grid-template-columns: 26px 1fr; align-items: start; gap: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.02); }
.guest-waiting p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.guest-waiting-copy { display: grid; gap: 10px; }
.host-reclaim-button { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid rgba(231,189,106,.38); border-radius: 12px; color: var(--cream); background: rgba(231,189,106,.08); font: 700 12px/1.2 Arial, sans-serif; }
.host-reclaim-button:disabled { color: var(--muted); border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.025); }
.reclaim-host-hint { color: var(--muted); font-size: 10px; line-height: 1.4; }
.waiting-connected { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid rgba(120,229,165,.5); border-radius: 50%; background: rgba(120,229,165,.12); color: var(--green); font-size: 13px; font-weight: 900; }
.online-live { margin-top: 16px; }
.online-round-card { min-height: 94px; padding: 13px 14px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; border: 1px solid var(--line); border-radius: 16px; background: rgba(231,189,106,.045); }
.online-round-card > span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.online-round-card strong { grid-row: span 2; color: var(--gold-light); font: 600 29px/1 Georgia, serif; }
.online-round-card strong span { color: var(--muted); font-size: 15px; }
.online-round-card small { color: var(--muted); font-size: 11px; }
.online-standings { display: grid; gap: 7px; margin-top: 10px; }
.online-standing { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; min-height: 48px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; }
.online-standing:first-child { border-color: rgba(231,189,106,.38); background: rgba(231,189,106,.035); }
.online-standing-place { color: var(--gold); font: 600 17px/1 Georgia, serif; }
.online-standing strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.online-standing output { font-weight: 800; }
.online-leave { margin-top: 9px; }

.online-game-bar {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1fr); gap: 7px;
  margin-bottom: 10px;
}
.online-game-bar > div {
  min-height: 61px; padding: 9px 10px; display: grid; align-content: center; gap: 4px;
  border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.025);
}
.online-game-bar small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.online-game-bar strong { overflow: hidden; color: var(--gold-light); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.online-game-bar > div:first-child strong { font: 600 24px/1 Georgia, serif; }
.online-game-bar strong span { color: var(--muted); font-size: 12px; }

.trump-reveal {
  min-height: 82px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid rgba(231,189,106,.2); border-radius: 15px;
  background: linear-gradient(135deg, rgba(231,189,106,.065), rgba(255,255,255,.02));
}
.trump-reveal > div { display: flex; gap: 5px; overflow-x: auto; }
.trump-reveal p { flex: 0 0 auto; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: right; }
.trump-reveal p strong { color: var(--gold-light); }
.trump-reveal p span { color: var(--danger); font-weight: 800; }

.online-action-card {
  margin-top: 11px; padding: 16px; border: 1px solid rgba(231,189,106,.29); border-radius: 18px;
  background: radial-gradient(circle at 100% 0, rgba(231,189,106,.09), transparent 35%), rgba(255,255,255,.025);
}
.online-action-card h3 { margin: 3px 0 12px; font: 600 22px/1.15 Georgia, serif; }
.online-action-card > p:not(.online-action-kicker):not(.helper-text) { color: #c7cad0; font-size: 13px; line-height: 1.45; }
.online-action-kicker { margin: 0 0 5px; color: var(--gold); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.online-phase-card {
  margin-top: 11px; padding: 14px; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,.09); border-radius: 15px; background: rgba(255,255,255,.025);
}
.online-phase-card > div { display: grid; gap: 3px; }
.online-phase-card small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.online-phase-card.success-card { border-color: rgba(129,213,160,.25); }
.phase-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--gold-light); background: rgba(231,189,106,.06); }
.success-card .phase-icon { border-color: rgba(129,213,160,.36); color: var(--success); background: rgba(129,213,160,.06); }

.trump-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trump-choice { min-height: 48px; border: 1px solid rgba(255,255,255,.2); border-radius: 13px; color: white; font-weight: 850; cursor: pointer; }
.trump-choice.color-red { background: linear-gradient(135deg, #8f2631, #d34d57); }
.trump-choice.color-blue { background: linear-gradient(135deg, #204e83, #4384c5); }
.trump-choice.color-green { background: linear-gradient(135deg, #1f6448, #45a276); }
.trump-choice.color-gold { color: #1a150a; background: linear-gradient(135deg, #b78228, #f1cf77); }

.prediction-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.prediction-choice { aspect-ratio: 1; min-width: 0; border: 1px solid rgba(255,255,255,.13); border-radius: 11px; color: var(--ivory); background: #181b21; font-weight: 850; cursor: pointer; }
.prediction-choice.selected { border-color: var(--gold); color: #17130c; background: var(--gold); box-shadow: 0 0 0 3px rgba(231,189,106,.1); }

.turn-banner {
  margin-top: 11px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.025);
}
.turn-banner strong { font-size: 12px; }
.turn-banner small { color: var(--muted); font-size: 10px; text-align: right; }
.turn-banner.your-turn { border-color: rgba(231,189,106,.55); background: rgba(231,189,106,.085); box-shadow: 0 0 22px rgba(231,189,106,.07); }
.turn-banner.your-turn strong { color: var(--gold-light); }

.online-table { margin-top: 9px; min-height: 140px; padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; background: radial-gradient(circle, rgba(54,85,66,.2), rgba(7,8,10,.25) 70%); }
.online-table-empty { min-height: 114px; display: grid; place-items: center; color: var(--muted); font: 600 15px/1 Georgia, serif; }
.online-trick-head { min-height: 28px; display: flex; justify-content: space-between; align-items: start; gap: 9px; }
.online-trick-head > strong { color: var(--gold-light); font-size: 12px; }
.online-trick-head small { color: var(--muted); font-size: 10px; }
.online-table-cards { display: flex; align-items: end; justify-content: center; gap: 6px; overflow-x: auto; padding: 4px 0 1px; }
.table-play { flex: 0 0 auto; display: grid; justify-items: center; gap: 4px; }
.table-play > small { max-width: 60px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.online-hand-section { margin-top: 12px; }
.online-hand-title { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 8px; }
.online-hand-title > div { display: grid; gap: 2px; }
.online-hand-title strong { font-size: 14px; }
.online-hand-title small { color: var(--muted); font-size: 10px; }
.online-hand-title > span { min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 9px; color: var(--gold-light); background: rgba(231,189,106,.08); font-size: 11px; font-weight: 850; }
.online-hand { display: flex; gap: 8px; overflow-x: auto; padding: 3px 3px 12px; scroll-snap-type: x proximity; scrollbar-width: thin; }

.duelora-card {
  position: relative; flex: 0 0 80px; width: 80px; height: 120px; padding: 0; overflow: hidden;
  border: 1px solid rgba(255,238,187,.58); border-radius: 10px; display: grid; place-items: center;
  color: white; background: #090a0c; box-shadow: 0 10px 24px rgba(0,0,0,.48), 0 1px 0 rgba(255,255,255,.2) inset;
  scroll-snap-align: center; cursor: default; isolation: isolate;
}
button.duelora-card { -webkit-tap-highlight-color: transparent; }
.duelora-card::after { content: ""; position: absolute; z-index: 3; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 -12px 22px rgba(0,0,0,.16); }
.duelora-card-art { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; }
.card-glass { position: absolute; z-index: 2; inset: -35% 28% 45% -38%; pointer-events: none; opacity: .18; background: linear-gradient(120deg, transparent 18%, rgba(255,255,255,.7) 48%, transparent 72%); transform: rotate(-10deg); }
.duelora-card.playable { border-color: #ffe6a0; box-shadow: 0 0 0 2px rgba(231,189,106,.28), 0 13px 28px rgba(0,0,0,.58), 0 0 28px rgba(239,190,84,.24); cursor: pointer; transform: translateY(-3px); }
.duelora-card.playable:active { transform: translateY(1px) scale(.98); }
.duelora-card:disabled:not(.blocked) { opacity: 1; }
.duelora-card.blocked { opacity: .35; filter: saturate(.42) brightness(.7); }
.duelora-card.compact { flex-basis: 58px; width: 58px; height: 87px; border-radius: 7px; }

.online-scoreboard { margin-top: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 15px; overflow: hidden; background: rgba(255,255,255,.018); }
.online-scoreboard summary { min-height: 48px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; list-style: none; color: var(--gold-light); font-weight: 800; cursor: pointer; }
.online-scoreboard summary::-webkit-details-marker { display: none; }
.online-scoreboard[open] summary span { transform: rotate(90deg); }
.online-scoreboard .online-standings { margin: 0; padding: 0 9px 9px; }
.online-standing.you { border-color: rgba(231,189,106,.38); }
.standing-player { min-width: 0; display: grid; gap: 2px; }
.standing-player strong, .standing-player small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standing-player small { color: var(--muted); font-size: 9px; }

.duel-action-card { border-color: rgba(231,189,106,.48); }
.duel-rolls { display: grid; gap: 7px; }
.duel-roll-row { min-height: 43px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; }
.duel-roll-row span { color: var(--muted); font-size: 12px; }
.duel-roll-row b { color: var(--gold-light); font-size: 15px; }
.round-score-list { display: grid; gap: 7px; }
.round-score-row { min-height: 51px; padding: 8px 10px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; }
.round-score-row.you { border-color: rgba(231,189,106,.4); background: rgba(231,189,106,.04); }
.round-score-row[class*="player-color-"] { border-left: 3px solid var(--player-color); }
.round-score-row > span { display: grid; gap: 3px; }
.round-score-row small { color: var(--muted); font-size: 9px; }
.round-score-row output { font-size: 17px; font-weight: 850; }
.score-reveal .round-score-row { animation: round-score-reveal .72s cubic-bezier(.18,.82,.22,1.08) calc(var(--score-index) * 75ms) both; }
.score-reveal .round-score-row output { animation: round-score-number .7s ease-out calc(var(--score-index) * 75ms) both; }

.online-finale { position: relative; padding: 32px 10px 8px; overflow: hidden; text-align: center; isolation: isolate; }
.online-finale > :not(.finale-rays):not(.online-particles) { position: relative; z-index: 2; }
.finale-rays { position: absolute; z-index: 0; top: 78px; left: 50%; width: 330px; height: 330px; transform: translate(-50%,-50%); border-radius: 50%; opacity: .58; background: repeating-conic-gradient(from -8deg, rgba(255,228,151,.14) 0 4deg, transparent 4deg 16deg); -webkit-mask-image: radial-gradient(circle, #000, transparent 68%); mask-image: radial-gradient(circle, #000, transparent 68%); pointer-events: none; }
.winner-crown { width: 62px; height: 68px; margin: 4px auto 12px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 17px 17px 23px 23px; color: var(--gold-light); background: radial-gradient(circle, rgba(231,189,106,.18), rgba(231,189,106,.035)); box-shadow: 0 0 40px rgba(231,189,106,.13); font: 700 31px/1 Georgia, serif; }
.online-finale .winner-crown { animation: winner-crown-float 1.1s ease-in-out infinite alternate; }
.online-finale h2 { margin: 0; color: var(--gold-light); font-size: 31px; }
.online-finale > p:not(.online-action-kicker) { color: var(--muted); }
.final-online-list { display: grid; gap: 7px; margin-top: 18px; text-align: left; }
.final-online-list > div { min-height: 48px; padding: 9px 11px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; }
.final-online-list > div:first-child { border-color: var(--line-strong); background: rgba(231,189,106,.05); }
.final-online-list span { color: var(--gold); font: 600 17px/1 Georgia, serif; }
.final-online-list output { font-weight: 850; }
.finale-entrance .winner-crown { animation: finale-crown-entrance 1.02s cubic-bezier(.16,.82,.2,1.12) both; }
.finale-entrance h2 { animation: finale-title-entrance .85s ease-out .12s both; }
.finale-entrance .final-online-list > div { animation: finale-rank-entrance .72s cubic-bezier(.18,.82,.22,1.08) calc(.18s + var(--rank-index) * 80ms) both; }
.finale-entrance .particles-finale i { animation: finale-particle 1.05s ease-out calc(var(--particle-index) * 28ms) both; }

/* Cinematic online table */
body.online-game-mode .app-shell { width: min(100%, 760px); }
#onlineView.game-active .online-heading { min-height: 34px; margin-bottom: 7px; align-items: center; }
#onlineView.game-active .online-heading h1 { display: none; }
#onlineView.game-active .online-heading .eyebrow { margin: 0; }
#onlineView.game-active > .intro-copy { display: none; }
#onlineRoomPanel.game-active .room-hero {
  min-height: 55px; margin-bottom: 8px; padding: 7px 11px; border-radius: 15px;
  background: linear-gradient(135deg, rgba(231,189,106,.08), rgba(255,255,255,.018));
}
#onlineRoomPanel.game-active .room-hero small { font-size: 12px; }
#onlineRoomPanel.game-active .room-hero output { font-size: 21px; letter-spacing: .11em; }
#onlineRoomPanel.game-active .copy-room-button { min-height: 38px; max-width: none; font-size: 12px; }
#onlineRoomPanel.game-active .room-panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
#onlineRoomPanel.game-active .room-panel-title,
#onlineRoomPanel.game-active > .room-panel > .online-player-list { display: none; }
#onlineRoomPanel.game-active .online-live { margin-top: 0; }
#onlineRoomPanel.game-active .online-leave { margin-top: 5px; }
#onlineRoomPanel.game-complete > .online-leave { display: none; }

.online-command-banner {
  position: relative; min-height: 88px; margin: 0 4px 8px; padding: 14px 15px 14px 53px;
  display: grid; align-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 18px;
  background: radial-gradient(circle at 100% 0, rgba(231,189,106,.12), transparent 42%), linear-gradient(135deg, rgba(255,255,255,.055), rgba(7,8,10,.86));
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}
.online-command-banner::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 1px rgba(255,255,255,.06); }
.online-command-banner::before { content: ""; position: absolute; z-index: 0; inset: -30% -60%; pointer-events: none; opacity: 0; background: linear-gradient(105deg, transparent 41%, rgba(255,239,190,.08) 46%, rgba(255,255,255,.34) 50%, rgba(255,222,133,.08) 54%, transparent 59%); transform: translateX(-55%); }
.online-command-banner > div { position: relative; z-index: 1; min-width: 0; display: grid; gap: 3px; }
.online-command-banner small { color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.online-command-banner strong { overflow: hidden; color: var(--cream); font: 700 20px/1.08 Georgia, serif; text-overflow: ellipsis; }
.online-command-banner p { margin: 1px 0 0; color: #bdc1c8; font-size: 11px; line-height: 1.35; }
.command-pulse { position: absolute; z-index: 1; left: 17px; width: 22px; height: 22px; border: 2px solid rgba(231,189,106,.5); border-radius: 50%; background: rgba(231,189,106,.08); box-shadow: 0 0 0 7px rgba(231,189,106,.035); }
.online-command-banner.your-turn { border-color: rgba(255,226,143,.78); background: radial-gradient(circle at 100% 0, rgba(255,210,96,.22), transparent 46%), linear-gradient(135deg, rgba(126,87,24,.35), rgba(9,9,10,.92)); box-shadow: 0 12px 34px rgba(0,0,0,.3), 0 0 28px rgba(231,189,106,.13); }
.online-command-banner.your-turn .command-pulse { border-color: #ffe399; background: var(--gold); box-shadow: 0 0 0 0 rgba(255,220,130,.34); animation: command-pulse 1.7s ease-out infinite; }
.online-command-banner.active-player .command-pulse { border-color: rgba(129,213,160,.75); background: rgba(129,213,160,.34); box-shadow: 0 0 15px rgba(129,213,160,.16); }
.online-command-banner.complete .command-pulse { border-radius: 7px 7px 10px 10px; color: var(--gold); background: rgba(231,189,106,.2); }
.online-command-banner.turn-sweep { animation: turn-banner-arrive .72s cubic-bezier(.18,.84,.22,1) both; }
.online-command-banner.turn-sweep::before { animation: turn-banner-sweep .85s ease-out both; }

.viewer-game-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 4px 8px; }
.viewer-game-status > div { min-width: 0; min-height: 67px; padding: 9px 10px; display: grid; align-content: center; gap: 1px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.027); }
.viewer-game-status > div.viewer-status-primary { border-color: rgba(231,189,106,.48); background: linear-gradient(145deg, rgba(231,189,106,.13), rgba(231,189,106,.025)); }
.viewer-game-status small { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .055em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.viewer-game-status strong { color: var(--gold-light); font: 700 23px/1 Georgia, serif; }
.viewer-game-status span { color: #aeb2ba; font-size: 9px; }

.trump-status-banner { position: relative; min-height: 73px; margin: 0 4px 8px; padding: 10px 47px 10px 55px; display: grid; align-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 17px; background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(7,8,10,.9)); }
.trump-status-banner::before { content: ""; position: absolute; inset: 0; opacity: .2; background: radial-gradient(circle at 0 50%, currentColor, transparent 48%); pointer-events: none; }
.trump-status-banner > div { position: relative; min-width: 0; display: grid; gap: 2px; }
.trump-status-banner small { color: #c4c8ce; font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.trump-status-banner strong { overflow: hidden; color: white; font-size: 18px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.trump-status-banner p { margin: 0; overflow: hidden; color: #d2d5da; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.trump-status-banner > b { position: absolute; right: 11px; min-width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #fff0bd; border-radius: 10px; color: #1b1205; background: var(--gold-light); box-shadow: 0 0 18px rgba(231,189,106,.23); font-size: 12px; }
.trump-status-gem { position: absolute; left: 19px; width: 23px; height: 23px; border: 2px solid rgba(255,255,255,.72); transform: rotate(45deg); background: currentColor; box-shadow: 0 0 17px currentColor, inset 0 0 0 4px rgba(0,0,0,.28); }
.trump-status-banner.color-red { color: #e54f5c; border-color: rgba(229,79,92,.58); }
.trump-status-banner.color-blue { color: #4d9bea; border-color: rgba(77,155,234,.58); }
.trump-status-banner.color-green { color: #4bb77e; border-color: rgba(75,183,126,.58); }
.trump-status-banner.color-gold { color: #edc45e; border-color: rgba(237,196,94,.64); }
.trump-status-banner.no-trump { color: #9da3ad; }
.trump-status-banner.trump-celebrate { animation: trump-banner-reveal .9s cubic-bezier(.18,.82,.22,1.08) both; }
.trump-status-banner.trump-celebrate .trump-status-gem { animation: trump-gem-burst .9s ease-out both; }

.live-score-ribbon { margin: 0 4px 9px; padding: 10px; border: 1px solid rgba(255,255,255,.095); border-radius: 17px; background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(6,7,9,.62)); }
.live-score-heading { min-height: 22px; padding: 0 2px 7px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-score-heading strong { color: var(--gold-light); font-size: 10px; letter-spacing: .12em; }
.live-score-heading small { color: var(--muted); font-size: 8px; }
.live-score-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.live-score-grid.players-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.live-score-player { min-width: 0; min-height: 49px; padding: 6px 7px; display: grid; grid-template-columns: 19px minmax(0, 1fr) auto; align-items: center; gap: 5px; border: 1px solid rgba(255,255,255,.075); border-radius: 11px; background: rgba(255,255,255,.025); }
.live-score-player.you { border-color: rgba(231,189,106,.5); background: rgba(231,189,106,.075); }
.live-score-player.computer-score { border-color: rgba(117,174,216,.28); background: linear-gradient(135deg, rgba(75,135,181,.07), rgba(255,255,255,.018)); }
.live-score-player[class*="player-color-"] { border-left: 3px solid var(--player-color); }
.live-score-player.active-turn { box-shadow: inset 0 0 0 1px rgba(129,213,160,.3); }
.live-score-player > span { color: var(--player-color, var(--gold)); font: 650 14px/1 Georgia, serif; text-align: center; text-shadow: 0 0 9px var(--player-glow, transparent); }
.live-score-player > div { min-width: 0; display: grid; gap: 1px; }
.live-score-player strong, .live-score-player small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-score-player strong { font-size: 11px; }
.live-score-player small { color: var(--muted); font-size: 8px; }
.live-score-player output { color: var(--cream); font-size: 13px; font-weight: 900; }
.score-celebrate .live-score-player { animation: score-tile-rise .75s cubic-bezier(.18,.82,.22,1.08) calc(var(--score-index) * 75ms) both; }
.score-celebrate .live-score-player output { animation: score-number-pop .72s ease-out calc(var(--score-index) * 75ms) both; }

.final-room-action { width: 100%; min-height: 50px; margin-top: 15px; padding: 10px 14px; border: 1px solid rgba(226,124,115,.48); border-radius: 14px; color: #f1a39b; background: rgba(123,39,33,.09); font-size: 13px; font-weight: 850; cursor: pointer; }
.final-room-action.confirming, .online-leave.confirming { border-color: #f0a39b; color: #180907; background: #e98b81; }

.duelora-game-stage { position: relative; }
.table-hud {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr); gap: 6px;
  margin: 0 4px 8px;
}
.table-hud > div {
  min-height: 51px; padding: 7px 9px; display: grid; align-content: center; gap: 2px;
  border: 1px solid rgba(231,189,106,.18); border-radius: 13px;
  background: linear-gradient(150deg, rgba(255,255,255,.035), rgba(231,189,106,.025));
}
.table-hud small { color: var(--muted); font-size: 12px; font-weight: 760; }
.table-hud strong { overflow: hidden; color: var(--gold-light); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.table-hud > div:first-child strong { font: 650 23px/1 Georgia, serif; }
.table-hud strong span { color: var(--muted); font-size: 13px; }

.duelora-table-shell {
  position: relative; padding: 8px; overflow: hidden; border: 1px solid rgba(255,236,177,.82); border-radius: 52px 52px 112px 112px;
  background:
    linear-gradient(112deg, transparent 0 12%, rgba(255,239,190,.54) 21%, transparent 29% 65%, rgba(255,223,139,.28) 76%, transparent 86%),
    repeating-linear-gradient(96deg, rgba(255,255,255,.035) 0 1px, transparent 1px 8px),
    linear-gradient(145deg, #32200f 0%, #8c5a20 12%, #e2b65a 19%, #2a190b 28%, #17100a 72%, #b77a28 88%, #f0cb74 100%);
  box-shadow: 0 34px 75px rgba(0,0,0,.66), 0 0 0 2px #090805, 0 0 0 5px rgba(28,17,8,.88), 0 0 45px rgba(218,164,71,.15);
}
.duelora-table-shell::before {
  content: ""; position: absolute; inset: 3px; z-index: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(7,5,3,.92), inset 0 0 0 5px rgba(255,218,123,.11), inset 0 0 22px rgba(0,0,0,.92);
}
.duelora-table-shell.viewer-turn { box-shadow: 0 34px 75px rgba(0,0,0,.66), 0 0 0 2px #090805, 0 0 0 5px rgba(91,62,21,.9), 0 0 42px rgba(255,217,125,.32); }
.duelora-table-shell::after {
  content: ""; position: absolute; z-index: 7; inset: -80% -35%; pointer-events: none;
  background: linear-gradient(108deg, transparent 42%, rgba(255,242,198,.14) 48%, rgba(255,255,255,.38) 50%, rgba(255,226,154,.12) 53%, transparent 59%);
  transform: translateX(-65%) rotate(-7deg);
  animation: table-rim-sweep 8s ease-in-out infinite;
}
.duelora-table-felt {
  position: relative; z-index: 1; height: 478px; overflow: hidden; border: 1px solid rgba(255,236,180,.12); border-radius: 45px 45px 103px 103px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(55,134,91,.42), transparent 48%),
    radial-gradient(circle at 16% 10%, rgba(255,255,255,.055), transparent 24%),
    radial-gradient(circle at 88% 70%, rgba(0,0,0,.26), transparent 34%),
    linear-gradient(145deg, #14382a, #0a241a 48%, #05140e 78%, #030b08);
  box-shadow: inset 0 0 78px rgba(0,0,0,.76), inset 0 0 0 2px rgba(255,255,255,.018), inset 0 18px 24px rgba(255,255,255,.025);
}
.duelora-table-felt::before {
  content: ""; position: absolute; z-index: 1; inset: 13px; border: 1px solid rgba(238,201,112,.24); border-radius: 34px 34px 90px 90px; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.38), 0 0 18px rgba(0,0,0,.2);
}
.duelora-table-felt::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .32;
  background:
    repeating-linear-gradient(116deg, transparent 0 5px, rgba(255,255,255,.014) 6px, transparent 7px 13px),
    repeating-linear-gradient(28deg, transparent 0 11px, rgba(0,0,0,.035) 12px, transparent 13px 22px);
  mix-blend-mode: soft-light;
}
.table-light { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 41%, rgba(255,230,171,.14), transparent 36%), linear-gradient(90deg, rgba(0,0,0,.28), transparent 17% 83%, rgba(0,0,0,.28)); }
.table-crest { position: absolute; z-index: 1; top: 51%; left: 50%; width: 176px; height: 228px; transform: translate(-50%,-50%); opacity: .15; filter: sepia(.35) saturate(.75) brightness(1.32); mix-blend-mode: screen; pointer-events: none; -webkit-mask-image: radial-gradient(ellipse, #000 42%, rgba(0,0,0,.78) 67%, transparent 82%); mask-image: radial-gradient(ellipse, #000 42%, rgba(0,0,0,.78) 67%, transparent 82%); }
.table-crest img { width: 100%; height: 100%; display: block; object-fit: cover; }
.table-elements { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.table-elements i { position: absolute; width: 14px; height: 14px; opacity: .56; border: 1px solid currentColor; transform: rotate(45deg); background: radial-gradient(circle at 35% 30%, #fff, currentColor 25%, #070b09 72%); box-shadow: 0 0 12px currentColor, inset 0 0 0 2px rgba(0,0,0,.55); }
.table-elements .force-red { top: 31%; left: 24px; color: #d74150; }
.table-elements .force-blue { top: 31%; right: 24px; color: #3c91eb; }
.table-elements .force-green { right: 28px; bottom: 24%; color: #43b67a; }
.table-elements .force-gold { bottom: 24%; left: 28px; color: #e7b94e; }
.table-signature { position: absolute; z-index: 1; right: 82px; bottom: 82px; left: 82px; display: flex; align-items: center; justify-content: center; gap: 7px; opacity: .45; color: #d9bd75; font: 700 7px/1 Georgia, serif; letter-spacing: .18em; pointer-events: none; }
.table-signature::before, .table-signature::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.table-signature::after { background: linear-gradient(90deg, currentColor, transparent); }
.table-signature i { font-size: 6px; font-style: normal; }
.table-ambience { position: absolute; z-index: 6; inset: 0; overflow: hidden; pointer-events: none; }
.table-ambience i { position: absolute; width: 4px; height: 4px; opacity: 0; border-radius: 50%; background: #ffe8a8; box-shadow: 0 0 8px #e9b84d, 0 0 18px rgba(255,219,127,.55); }
.table-ambience i:nth-child(1) { top: 35%; left: 31%; }
.table-ambience i:nth-child(2) { top: 48%; right: 29%; }
.table-ambience i:nth-child(3) { top: 24%; right: 38%; }
.table-ambience i:nth-child(4) { top: 61%; left: 42%; }
.motion-deal .table-ambience i, .motion-trump .table-ambience i, .motion-card .table-ambience i, .motion-dice .table-ambience i { animation: table-spark 1.35s ease-out calc(var(--spark-delay, 0ms)) both; }
.table-ambience i:nth-child(2) { --spark-delay: 120ms; }
.table-ambience i:nth-child(3) { --spark-delay: 240ms; }
.table-ambience i:nth-child(4) { --spark-delay: 360ms; }

.table-moment {
  position: absolute; z-index: 12; top: 49%; left: 50%; width: min(74%, 270px); min-height: 116px; padding: 15px 18px;
  transform: translate(-50%,-50%); display: grid; place-items: center; align-content: center; gap: 2px; overflow: hidden;
  border: 1px solid rgba(255,239,190,.65); border-radius: 25px; color: var(--gold-light);
  background: radial-gradient(circle at 50% 20%, rgba(255,229,161,.2), transparent 48%), rgba(2,8,5,.9);
  box-shadow: 0 18px 48px rgba(0,0,0,.55), 0 0 40px rgba(231,189,106,.2), inset 0 0 24px rgba(231,189,106,.07);
  text-align: center; pointer-events: none; backdrop-filter: blur(8px);
}
.table-moment::before { content: ""; position: absolute; inset: -80% -40%; background: conic-gradient(from 0deg, transparent, rgba(255,234,171,.18), transparent 18%, transparent 45%, rgba(255,255,255,.12), transparent 63%); animation: table-moment-rays 1.05s ease-out both; }
.table-moment > * { position: relative; z-index: 1; }
.table-moment small { font-size: 9px; font-weight: 900; letter-spacing: .22em; }
.table-moment strong { font: 700 39px/1 Georgia, serif; text-shadow: 0 0 22px currentColor; }
.table-moment span { color: #e5e0d2; font-size: 11px; font-weight: 750; }
.round-opening-flash { animation: table-moment-in 1.08s cubic-bezier(.18,.82,.24,1) both; }
.trump-table-flash { animation: trump-table-moment 1.08s cubic-bezier(.18,.82,.24,1) both; }
.trump-table-flash.color-red { color: #ff7680; border-color: rgba(255,118,128,.7); box-shadow: 0 18px 48px rgba(0,0,0,.55), 0 0 42px rgba(229,79,92,.27); }
.trump-table-flash.color-blue { color: #75b8ff; border-color: rgba(117,184,255,.7); box-shadow: 0 18px 48px rgba(0,0,0,.55), 0 0 42px rgba(77,155,234,.27); }
.trump-table-flash.color-green { color: #74d7a5; border-color: rgba(116,215,165,.7); box-shadow: 0 18px 48px rgba(0,0,0,.55), 0 0 42px rgba(75,183,126,.27); }
.trump-table-flash.color-gold { color: #ffe18b; border-color: rgba(255,225,139,.8); box-shadow: 0 18px 48px rgba(0,0,0,.55), 0 0 46px rgba(237,196,94,.34); }

.table-opponents {
  position: absolute; z-index: 5; top: 15px; right: 13px; left: 13px;
  display: grid; grid-template-columns: repeat(var(--opponent-count, 5), minmax(0, 1fr)); align-items: start; justify-content: center; gap: 4px;
}
.table-opponents.opponents-1 { grid-template-columns: minmax(100px, 155px); }
.table-opponents.opponents-2 { grid-template-columns: repeat(2, minmax(95px, 145px)); }
.table-opponents.opponents-3 { grid-template-columns: repeat(3, minmax(0, 125px)); }
.table-opponents.opponents-4 { grid-template-columns: repeat(4, minmax(0, 105px)); }
.table-opponents.opponents-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.table-seat { min-width: 0; display: grid; justify-items: center; gap: 2px; opacity: .82; }
.table-seat.active-turn { opacity: 1; }
.opponent-card-fan { position: relative; width: 52px; height: 48px; }
.opponent-card-fan > span { position: absolute; left: calc(var(--stack-index) * 10px); bottom: 0; transform: rotate(calc((var(--stack-index) - 1) * 7deg)); transform-origin: 50% 90%; }
.opponent-card-fan .duelora-card-back.compact { width: 30px; height: 44px; border-radius: 5px; }
.opponent-card-fan .duelora-card-back.compact strong { font-size: 12px; }
.opponent-card-fan .duelora-card-back.compact small { display: none; }
.opponent-card-fan > b { position: absolute; right: -3px; bottom: 2px; z-index: 3; min-width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid rgba(255,231,164,.45); border-radius: 50%; color: #191207; background: var(--gold-light); font-size: 10px; }
.table-seat-badge { max-width: 100%; min-height: 31px; padding: 3px 7px 3px 4px; display: flex; align-items: center; gap: 5px; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: rgba(2,7,5,.72); backdrop-filter: blur(5px); }
.table-seat.active-turn .table-seat-badge { border-color: rgba(255,225,149,.72); box-shadow: 0 0 15px rgba(231,189,106,.2); }
.table-seat.computer-seat .table-seat-badge { border-color: rgba(128,185,226,.36); background: linear-gradient(135deg, rgba(18,45,63,.84), rgba(2,7,5,.76)); }
.table-seat.computer-seat .table-seat-badge > span { color: #dceeff; border-color: rgba(128,185,226,.44); background: rgba(90,151,197,.15); }
.table-seat.computer-seat.active-turn .table-seat-badge { border-color: rgba(255,225,149,.75); box-shadow: 0 0 18px rgba(118,180,224,.17), 0 0 14px rgba(231,189,106,.15); }
.table-seat.active-turn .table-seat-badge, .viewer-table-seat.active-turn { animation: active-seat-breathe 1.05s ease-in-out infinite alternate; }
.motion-turn .table-seat.active-turn .table-seat-badge, .motion-turn .viewer-table-seat.active-turn { animation: active-seat-arrive .8s cubic-bezier(.18,.82,.22,1.08) both; }
.table-seat.brewer-seat .table-seat-badge::after { content: "D"; width: 15px; height: 17px; display: grid; place-items: center; border-radius: 5px 5px 7px 7px; color: #1b1408; background: var(--gold); font: 700 8px/1 Georgia, serif; }
.table-seat-badge > span { flex: 0 0 auto; width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid rgba(231,189,106,.35); border-radius: 50%; color: var(--gold-light); background: rgba(231,189,106,.08); font: 650 10px/1 Georgia, serif; }
.table-seat[class*="player-color-"] .table-seat-badge > span { color: var(--player-color); border-color: var(--player-color); background: rgba(2,7,5,.78); box-shadow: 0 0 10px var(--player-glow); }
.table-seat-badge > div { min-width: 0; display: grid; gap: 1px; }
.table-seat-badge strong, .table-seat-badge small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-seat-badge strong { font-size: 12px; }
.table-seat-badge small { color: #aeb7b0; font-size: 10px; }

.table-turn-indicator {
  position: absolute; z-index: 4; top: 119px; left: 50%; min-width: 170px; max-width: 62%; min-height: 38px; padding: 6px 13px; transform: translateX(-50%);
  display: grid; place-items: center; gap: 1px; border: 1px solid rgba(231,189,106,.29); border-radius: 18px;
  background: rgba(2,8,5,.68); box-shadow: 0 7px 20px rgba(0,0,0,.26); text-align: center; backdrop-filter: blur(6px);
}
.viewer-turn .table-turn-indicator { border-color: rgba(255,231,164,.78); background: rgba(93,68,23,.48); box-shadow: 0 0 20px rgba(231,189,106,.2); }
.table-turn-indicator strong { overflow: hidden; max-width: 100%; color: var(--gold-light); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.table-turn-indicator small { color: #c2c9c4; font-size: 10px; }

.table-deck-zone, .table-trump-zone { position: absolute; z-index: 3; top: 171px; display: grid; justify-items: center; gap: 4px; }
.table-deck-zone { left: 20px; }
.table-trump-zone { right: 16px; width: 76px; }
.table-deck-zone > span:last-child, .table-trump-zone > span:first-child { color: rgba(242,225,183,.72); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.table-trump-zone > strong { width: 72px; overflow: hidden; color: var(--gold-light); font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.table-trump-zone > small { position: absolute; top: 55px; right: -1px; z-index: 5; min-width: 27px; min-height: 21px; display: grid; place-items: center; border: 1px solid #fff0b9; border-radius: 9px; color: #1d1407; background: var(--gold-light); font-size: 10px; font-weight: 900; }
.table-trump-cards { position: relative; width: 62px; height: 91px; }
.table-trump-cards > span { position: absolute; inset: 0; transform: translateX(calc((var(--trump-index) - 1) * -4px)) rotate(calc((var(--trump-index) - 1) * -4deg)); }
.table-trump-cards .duelora-card.compact { width: 58px; height: 87px; }

.table-center-zone { position: absolute; z-index: 2; top: 164px; right: 94px; left: 94px; height: 224px; display: grid; place-items: center; }
.table-empty-mark { display: grid; justify-items: center; gap: 7px; opacity: .34; }
.table-empty-mark > span { width: 69px; height: 77px; display: grid; place-items: center; border: 1px solid rgba(231,189,106,.5); border-radius: 21px 21px 29px 29px; color: var(--gold-light); background: rgba(231,189,106,.045); font: 650 34px/1 Georgia, serif; box-shadow: inset 0 0 26px rgba(231,189,106,.07); }
.table-empty-mark small { color: #dae0db; font-size: 12px; }
.table-trick-zone { width: 100%; display: grid; justify-items: center; gap: 5px; }
.trick-winner { position: relative; z-index: 4; min-height: 34px; padding: 5px 14px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid rgba(255,229,152,.35); border-radius: 18px; color: #d7ddd8; background: rgba(2,8,5,.73); box-shadow: 0 7px 18px rgba(0,0,0,.26); backdrop-filter: blur(5px); }
.trick-winner small { color: #d7ddd8; font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.trick-winner strong { color: var(--gold-light); font-size: 12px; }
.trick-winner.trick-celebration { border-color: rgba(255,230,151,.82); animation: trick-winner-pop .98s cubic-bezier(.16,.82,.2,1.08) both; box-shadow: 0 7px 18px rgba(0,0,0,.3), 0 0 32px rgba(231,189,106,.28); }
.table-played-cards { min-height: 98px; display: flex; align-items: center; justify-content: center; padding-left: 14px; }
.table-play { position: relative; display: grid; justify-items: center; gap: 3px; margin-left: -15px; transform: translateY(calc((var(--play-index) % 2) * 5px)) rotate(calc((var(--play-index) - 2.5) * 4deg)); }
.table-play:first-child { margin-left: 0; }
.table-play > small { position: absolute; z-index: 2; top: -15px; max-width: 58px; overflow: hidden; color: #d6ddd8; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.table-play .duelora-card.kind-ora { box-shadow: 0 10px 24px rgba(0,0,0,.48), 0 0 21px rgba(105,201,255,.36); }
.table-play .duelora-card.kind-gold_ora { box-shadow: 0 10px 24px rgba(0,0,0,.48), 0 0 25px rgba(255,211,91,.5); }
.table-play .duelora-card.kind-lightning { box-shadow: 0 10px 24px rgba(0,0,0,.48), 0 0 24px rgba(164,116,255,.42); }
.table-play .duelora-card.kind-meteor { box-shadow: 0 10px 24px rgba(0,0,0,.48), 0 0 24px rgba(255,91,73,.43); }
.table-play .duelora-card.kind-protection { box-shadow: 0 10px 24px rgba(0,0,0,.48), 0 0 22px rgba(101,214,158,.4); }

.viewer-table-seat { position: absolute; z-index: 5; right: 18px; bottom: 18px; left: 18px; min-height: 52px; padding: 7px 12px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 28px; background: rgba(2,7,5,.82); box-shadow: 0 10px 25px rgba(0,0,0,.26); backdrop-filter: blur(8px); }
.viewer-table-seat.active-turn { border-color: rgba(255,231,164,.82); background: linear-gradient(90deg, rgba(113,78,23,.72), rgba(2,7,5,.86)); box-shadow: 0 0 24px rgba(231,189,106,.18); }
.viewer-table-seat > span { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(231,189,106,.5); border-radius: 50%; color: var(--gold-light); background: rgba(231,189,106,.11); font: 650 15px/1 Georgia, serif; }
.viewer-table-seat[class*="player-color-"] { border-left: 3px solid var(--player-color); }
.viewer-table-seat[class*="player-color-"] > span { color: var(--player-color); border-color: var(--player-color); background: rgba(2,7,5,.82); box-shadow: 0 0 13px var(--player-glow); }
.viewer-table-seat > div { min-width: 0; display: grid; gap: 2px; }
.viewer-table-seat strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.viewer-table-seat small { color: #b7c0ba; font-size: 11px; }
.viewer-table-seat > b { color: var(--danger); font-size: 13px; }

.duelora-card-back { position: relative; width: 64px; height: 96px; overflow: hidden; display: block; border: 1px solid rgba(255,237,186,.65); border-radius: 9px; background: #07090c; box-shadow: 0 9px 18px rgba(0,0,0,.48), 0 1px rgba(255,255,255,.18) inset; }
.duelora-card-back::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), inset 0 -10px 18px rgba(0,0,0,.18); pointer-events: none; }
.duelora-card-back img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; }
.duelora-card-back.compact { width: 48px; height: 72px; }

.online-hand-section { position: relative; z-index: 8; margin: -78px 9px 0; padding: 86px 8px 3px; border-radius: 0 0 23px 23px; background: linear-gradient(180deg, transparent, rgba(7,8,10,.9) 51%); }
.online-hand-section.active-hand { background: linear-gradient(180deg, transparent, rgba(64,45,15,.4) 52%, rgba(7,8,10,.97)); }
.online-hand-title { padding: 0 3px 7px; }
.online-hand-title strong { font-size: 16px; }
.online-hand-title small { font-size: 12px; }
.online-hand {
  width: 100%; min-height: 0; margin: 0 auto; padding: 4px 22px 15px 4px;
  display: grid; grid-template-columns: repeat(var(--hand-count), minmax(0, 1fr)); align-items: end;
  gap: 0; overflow: visible; scroll-snap-type: none;
}
.online-hand.hand-count-1 { max-width: 114px; }
.online-hand.hand-count-2 { max-width: 206px; }
.online-hand.hand-count-3 { max-width: 298px; }
.online-hand.hand-count-4 { max-width: 390px; }
.online-hand.hand-count-5 { max-width: 482px; }
.online-hand.hand-count-6 { max-width: 574px; }
.online-hand.hand-count-7 { max-width: 666px; }
.hand-card-slot { min-width: 0; width: 100%; display: flex; justify-content: flex-start; transform: translateY(var(--fan-lift)) rotate(var(--fan-angle)); transform-origin: 50% 100%; }
.hand-card-slot:last-child { justify-content: flex-end; }
.online-hand .hand-card-slot .duelora-card { flex: 0 0 auto; width: min(92px, calc(100% + 18px)); height: auto; aspect-ratio: 2 / 3; transition: transform .2s ease, filter .2s ease, box-shadow .2s ease; }
.hand-card-slot .duelora-card.playable { transform: translateY(-7px); }
.hand-card-slot .duelora-card.playable:hover, .hand-card-slot .duelora-card.playable:focus-visible { transform: translateY(-15px) scale(1.035); filter: brightness(1.08); }
.active-hand .duelora-card.playable { animation: playable-breathe 2.4s ease-in-out infinite; }

.dice-table-scene { position: relative; width: 100%; height: 100%; padding: 24px 0 31px; display: grid; place-items: center; }
.dice-attempt-chip { position: absolute; z-index: 4; top: 0; left: 50%; min-width: 76px; min-height: 21px; padding: 3px 9px; transform: translateX(-50%); border: 1px solid rgba(237,203,122,.32); border-radius: 12px; color: rgba(255,235,184,.84); background: rgba(3,12,8,.6); font-size: 8px; font-weight: 900; letter-spacing: .16em; text-align: center; backdrop-filter: blur(5px); }
.table-dice-field { width: 100%; display: grid; align-items: center; justify-content: center; gap: 5px 8px; }
.table-dice-field.rollers-1 { grid-template-columns: minmax(92px, 132px); }
.table-dice-field.rollers-2, .table-dice-field.rollers-4 { grid-template-columns: repeat(2, minmax(76px, 1fr)); }
.table-dice-field.rollers-3, .table-dice-field.rollers-5, .table-dice-field.rollers-6 { grid-template-columns: repeat(3, minmax(58px, 1fr)); }
.table-dice-player { min-width: 0; min-height: 71px; display: grid; justify-items: center; align-content: center; gap: 1px; perspective: 520px; }
.table-dice-player > small { max-width: 100%; min-height: 17px; padding: 2px 7px; overflow: hidden; display: flex; align-items: center; gap: 4px; color: #eef2ec; border: 1px solid var(--player-color, rgba(255,255,255,.09)); border-radius: 10px; background: rgba(1,8,5,.68); font-size: 9px; font-weight: 760; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 4px 10px rgba(0,0,0,.22), 0 0 10px var(--player-glow, transparent); }
.table-dice-player > small i, .dice-ready-player small i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--player-color); box-shadow: 0 0 7px var(--player-color); }
.dice-on-felt { min-height: 43px; display: flex; align-items: center; justify-content: center; padding: 1px 4px; }
.dice-on-felt .duelora-die + .duelora-die { margin-left: -7px; }
.table-dice-player > strong { min-width: 25px; min-height: 18px; padding: 2px 6px; display: grid; place-items: center; color: #161006; border: 1px solid rgba(255,242,202,.72); border-radius: 9px; background: linear-gradient(135deg, #fff0b8, #d8a746); box-shadow: 0 4px 10px rgba(0,0,0,.32); font-size: 10px; font-weight: 950; }
.duelora-die { position: relative; z-index: 2; width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; overflow: hidden; border: 1px solid #f4d17f; border-radius: 11px; color: #ffe7a3; background:
  radial-gradient(circle at 24% 16%, rgba(255,255,255,.48), transparent 15%),
  linear-gradient(118deg, transparent 0 34%, rgba(255,221,139,.24) 35% 37%, transparent 38% 66%, rgba(255,255,255,.17) 67% 68%, transparent 69%),
  radial-gradient(circle at 38% 32%, var(--die-highlight, #8b6920) 0, var(--die-mid, #3b2909) 53%, var(--die-low, #090601) 100%);
  box-shadow: 0 10px 14px rgba(0,0,0,.56), 0 2px 3px rgba(0,0,0,.78), 0 0 15px var(--player-glow, rgba(231,189,106,.26)), inset 0 0 0 2px rgba(255,255,255,.08), inset 0 -9px 13px rgba(0,0,0,.48); transform: rotate(var(--die-rotation, 0deg)); font: 850 18px/1 Georgia, serif; }
.duelora-die::before { content: ""; position: absolute; inset: 3px; border: 1px solid #ffe5a0; border-radius: 8px; opacity: .48; box-shadow: inset 0 0 7px rgba(255,215,115,.24), 0 0 7px rgba(255,215,115,.2); }
.duelora-die::after { content: ""; position: absolute; top: -16%; left: -28%; width: 92%; height: 62%; transform: rotate(-28deg); background: linear-gradient(180deg, rgba(255,255,255,.18), transparent); pointer-events: none; }
.duelora-die > span { position: relative; z-index: 2; text-shadow: 0 0 8px rgba(255,224,142,.72), 0 2px 2px #000; }
.duelora-die.die-6 > span { width: 23px; height: 25px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 7px 7px 10px 10px; font-size: 14px; }
.dice-winner-banner { position: absolute; z-index: 5; right: 50%; bottom: 0; min-height: 26px; padding: 4px 10px; transform: translateX(50%); display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; color: #201507; border: 1px solid #fff0b4; border-radius: 14px; background: linear-gradient(135deg, #fff1bd, #d7a43d); box-shadow: 0 7px 18px rgba(0,0,0,.38), 0 0 21px rgba(233,186,76,.21); font-size: 9px; }
.dice-winner-banner > span { width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid #ffe5a0; border-radius: 6px; color: #ffe9ad; background: radial-gradient(circle at 27% 20%, var(--die-highlight), var(--die-mid) 58%, var(--die-low)); box-shadow: 0 0 10px var(--player-glow); font: 800 9px/1 Georgia, serif; }
.dice-winner-banner strong { font-weight: 950; }
.motion-dice .dice-winner-banner { animation: dice-winner-pop .9s cubic-bezier(.18,.82,.22,1.08) .16s both; }
.dice-ready { display: grid; justify-items: center; gap: 8px; color: var(--gold-light); }
.dice-ready-rack { max-width: 232px; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 7px 9px; }
.dice-ready-player { display: grid; justify-items: center; gap: 3px; }
.dice-ready-player small { max-width: 58px; display: flex; align-items: center; gap: 3px; overflow: hidden; color: #e8ece8; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dice-ready strong { font: 600 14px/1 Georgia, serif; }
.dice-action-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #ffebb2; border-radius: 8px; color: #ffe9ad; background: radial-gradient(circle at 27% 20%, var(--die-highlight), var(--die-mid) 58%, var(--die-low)); box-shadow: inset 0 1px rgba(255,255,255,.32), 0 0 10px var(--player-glow); font: 850 12px/1 Georgia, serif; }

.deal-card { animation: deal-card .72s cubic-bezier(.2,.82,.22,1.14) calc(var(--deal-index) * 80ms) backwards; }
.deal-back { animation: deal-back .62s cubic-bezier(.2,.82,.22,1.1) calc((var(--seat-index) * 90ms) + (var(--stack-index) * 55ms)) both; }
.trump-flip { transform-origin: 50% 50%; animation: trump-flip .84s cubic-bezier(.18,.86,.28,1.06) calc(var(--trump-index) * 110ms) both; }
.card-arrive { animation: card-arrive .55s cubic-bezier(.15,.82,.22,1.08) both; }
.dice-drop { animation: dice-drop 1.18s cubic-bezier(.15,.73,.2,1.08) calc(var(--die-index) * 72ms) both; }
.deck-pulse { animation: deck-pulse 1.1s ease both; }
.online-particles { position: absolute; z-index: 0; top: 50%; left: 50%; width: 1px; height: 1px; pointer-events: none; }
.online-particles i { position: absolute; top: 0; left: 0; width: 5px; height: 5px; border-radius: 50%; background: #ffe49b; box-shadow: 0 0 9px rgba(255,213,99,.85); opacity: 0; }
.trick-celebration .particles-trick i { animation: particle-burst .92s ease-out calc(var(--particle-index) * 24ms) both; transform: rotate(calc(var(--particle-index) * 36deg)) translateY(0); }
@keyframes deal-card { 0% { opacity: 0; transform: translate(52px,-255px) rotate(150deg) scale(.35); } 68% { opacity: 1; transform: translate(-2px,5px) rotate(-4deg) scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes deal-back { 0% { opacity: 0; transform: translate(-30px,150px) rotate(120deg) scale(.4); } 72% { opacity: 1; transform: translateY(-3px) rotate(-3deg) scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes trump-flip { 0% { opacity: 0; transform: translateX(-90px) rotateY(100deg) rotate(16deg) scale(.55); } 55% { opacity: 1; transform: translateX(4px) rotateY(-15deg) rotate(-2deg) scale(1.05); } 100% { opacity: 1; transform: none; } }
@keyframes card-arrive { 0% { opacity: 0; transform: translateY(115px) rotate(28deg) scale(.7); } 75% { opacity: 1; transform: translateY(-5px) rotate(-3deg) scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes dice-drop {
  0% { opacity: 0; filter: blur(2px); transform: translate3d(var(--die-drift),-255px,0) rotate(0deg) scale(.42); }
  48% { opacity: 1; filter: blur(0); transform: translate3d(0,10px,0) rotate(var(--die-spin)) scale(1.1); }
  63% { transform: translate3d(-7px,-21px,0) rotate(calc(var(--die-spin) + 78deg)) scale(.98); }
  77% { transform: translate3d(5px,5px,0) rotate(calc(var(--die-spin) + 143deg)) scale(1.035); }
  88% { transform: translate3d(-2px,-6px,0) rotate(calc(var(--die-spin) + 176deg)) scale(1); }
  100% { opacity: 1; filter: blur(0); transform: rotate(var(--die-rotation, 0deg)); }
}
@keyframes deck-pulse { 0%, 100% { transform: none; } 45% { transform: translateY(-6px) rotate(-3deg); filter: drop-shadow(0 0 12px rgba(231,189,106,.38)); } }
@keyframes table-rim-sweep { 0%, 72% { transform: translateX(-65%) rotate(-7deg); opacity: 0; } 77% { opacity: .68; } 90%, 100% { transform: translateX(65%) rotate(-7deg); opacity: 0; } }
@keyframes table-spark { 0% { opacity: 0; transform: translateY(18px) scale(.25); } 28% { opacity: 1; } 100% { opacity: 0; transform: translateY(-42px) scale(1.3); } }
@keyframes playable-breathe { 0%, 100% { box-shadow: 0 9px 20px rgba(0,0,0,.45), 0 0 0 1px rgba(255,232,168,.42); } 50% { box-shadow: 0 13px 28px rgba(0,0,0,.56), 0 0 0 2px rgba(255,232,168,.78), 0 0 22px rgba(231,189,106,.24); } }
@keyframes command-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,220,130,.34); } 72%, 100% { box-shadow: 0 0 0 14px rgba(255,220,130,0); } }
@keyframes turn-banner-arrive { 0% { opacity: .5; transform: translateY(-8px) scale(.985); } 55% { opacity: 1; transform: translateY(2px) scale(1.006); } 100% { opacity: 1; transform: none; } }
@keyframes turn-banner-sweep { 0% { opacity: 0; transform: translateX(-55%); } 24% { opacity: 1; } 100% { opacity: 0; transform: translateX(55%); } }
@keyframes trump-banner-reveal { 0% { opacity: .45; transform: scale(.97); filter: brightness(.7); } 58% { opacity: 1; transform: scale(1.012); filter: brightness(1.2); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes trump-gem-burst { 0% { opacity: 0; transform: rotate(45deg) scale(.35); } 52% { opacity: 1; transform: rotate(225deg) scale(1.42); } 100% { opacity: 1; transform: rotate(405deg) scale(1); } }
@keyframes score-tile-rise { 0% { opacity: .25; transform: translateY(13px) scale(.96); } 70% { opacity: 1; transform: translateY(-2px) scale(1.015); } 100% { opacity: 1; transform: none; } }
@keyframes score-number-pop { 0% { opacity: 0; transform: scale(.4); color: var(--gold-light); } 62% { opacity: 1; transform: scale(1.28); color: var(--gold-light); text-shadow: 0 0 16px var(--gold); } 100% { transform: none; color: var(--cream); text-shadow: none; } }
@keyframes table-moment-in { 0% { opacity: 0; transform: translate(-50%,-44%) scale(.72); filter: blur(6px); } 24%, 70% { opacity: 1; transform: translate(-50%,-50%) scale(1); filter: blur(0); } 100% { opacity: 0; transform: translate(-50%,-53%) scale(1.04); } }
@keyframes trump-table-moment { 0% { opacity: 0; transform: translate(-50%,-50%) rotateY(90deg) scale(.7); } 25%, 72% { opacity: 1; transform: translate(-50%,-50%) rotateY(0) scale(1); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.06); } }
@keyframes table-moment-rays { 0% { opacity: 0; transform: rotate(-35deg) scale(.55); } 35% { opacity: 1; } 100% { opacity: 0; transform: rotate(42deg) scale(1.15); } }
@keyframes active-seat-breathe { 0% { box-shadow: 0 0 12px rgba(231,189,106,.14); filter: brightness(.96); } 100% { box-shadow: 0 0 26px rgba(255,222,135,.34); filter: brightness(1.09); } }
@keyframes active-seat-arrive { 0% { opacity: .4; transform: scale(.82); box-shadow: 0 0 0 rgba(231,189,106,0); } 58% { opacity: 1; transform: scale(1.055); box-shadow: 0 0 34px rgba(255,224,145,.46); } 100% { opacity: 1; transform: none; } }
@keyframes trick-winner-pop { 0% { opacity: 0; transform: scale(.55) translateY(10px); } 58% { opacity: 1; transform: scale(1.08) translateY(-2px); } 100% { opacity: 1; transform: none; } }
@keyframes dice-winner-pop { 0% { opacity: 0; transform: translateX(50%) scale(.5) translateY(9px); } 60% { opacity: 1; transform: translateX(50%) scale(1.08) translateY(-2px); } 100% { opacity: 1; transform: translateX(50%); } }
@keyframes particle-burst { 0% { opacity: 0; transform: rotate(calc(var(--particle-index) * 36deg)) translateY(0) scale(.2); } 24% { opacity: 1; } 100% { opacity: 0; transform: rotate(calc(var(--particle-index) * 36deg)) translateY(-58px) scale(1); } }
@keyframes round-score-reveal { 0% { opacity: 0; transform: translateX(-15px) scale(.97); } 70% { opacity: 1; transform: translateX(2px) scale(1.01); } 100% { opacity: 1; transform: none; } }
@keyframes round-score-number { 0% { opacity: 0; transform: scale(.4); } 62% { opacity: 1; transform: scale(1.3); color: var(--gold-light); text-shadow: 0 0 17px var(--gold); } 100% { opacity: 1; transform: none; text-shadow: none; } }
@keyframes winner-crown-float { 0% { transform: translateY(2px) rotate(-1deg); box-shadow: 0 0 26px rgba(231,189,106,.12); } 100% { transform: translateY(-4px) rotate(1deg); box-shadow: 0 0 46px rgba(231,189,106,.27); } }
@keyframes finale-crown-entrance { 0% { opacity: 0; transform: translateY(28px) rotate(-18deg) scale(.3); filter: blur(5px); } 62% { opacity: 1; transform: translateY(-6px) rotate(3deg) scale(1.12); filter: blur(0); } 100% { opacity: 1; transform: none; } }
@keyframes finale-title-entrance { 0% { opacity: 0; transform: translateY(12px); letter-spacing: .18em; } 100% { opacity: 1; transform: none; letter-spacing: normal; } }
@keyframes finale-rank-entrance { 0% { opacity: 0; transform: translateX(20px) scale(.96); } 68% { opacity: 1; transform: translateX(-2px) scale(1.01); } 100% { opacity: 1; transform: none; } }
@keyframes finale-particle { 0% { opacity: 0; transform: rotate(calc(var(--particle-index) * 22.5deg)) translateY(0) scale(.2); } 22% { opacity: 1; } 100% { opacity: 0; transform: rotate(calc(var(--particle-index) * 22.5deg)) translateY(-145px) scale(1.15); } }

body.online-game-mode .bottom-nav { opacity: 0; transform: translate(-50%, calc(100% + 38px)); pointer-events: none; }
body.online-game-mode .app-main { padding-bottom: 28px; }
body.online-game-mode .brand-subtitle { opacity: .62; }

.round-strip {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; margin-bottom: 13px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 17px; background: rgba(231,189,106,.045);
}
.round-strip > div { display: grid; gap: 2px; }
.round-strip small { color: var(--muted); font-size: 11px; }
.round-strip strong { font-size: 17px; }
.round-strip > div:first-child strong { color: var(--gold-light); font-size: 23px; }
.muted { color: var(--muted); font-weight: 500; }
.round-brewer { min-width: 0; }
.round-brewer strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-button { border: 0; background: transparent; padding: 10px 0 10px 10px; color: var(--gold); font-size: 12px; font-weight: 800; cursor: pointer; }

.entry-head, .score-row { display: grid; grid-template-columns: minmax(68px, 1fr) 46px 46px 52px 52px 48px; gap: 3px; align-items: center; }
.entry-head { padding: 0 11px 6px; color: var(--muted); font-size: 10px; text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.entry-head span:first-child { text-align: left; }
.score-rows { display: grid; gap: 7px; }
.score-row {
  min-height: 58px; padding: 7px 8px 7px 11px; border: 1px solid rgba(255,255,255,.09); border-radius: 15px;
  background: rgba(255,255,255,.03); transition: border-color .2s, background .2s;
}
.score-row.exact { border-color: rgba(231,189,106,.45); background: rgba(231,189,106,.055); }
.player-cell { min-width: 0; display: flex; align-items: center; gap: 7px; cursor: pointer; }
.player-cell > span:first-child { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 760; font-size: 14px; }
.detail-badge { flex: 0 0 auto; min-width: 22px; height: 22px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; display: grid; place-items: center; color: var(--gold); font-size: 14px; }
.detail-badge.active { border-color: rgba(231,189,106,.5); background: rgba(231,189,106,.1); }
.compact-select { width: 100%; height: 40px; padding: 0 5px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; color: var(--ivory); background: #111318; text-align: center; font-weight: 800; }
.point-preview { text-align: center; font-weight: 850; font-size: 14px; }
.point-preview.positive { color: var(--success); }
.point-preview.negative { color: var(--danger); }
.point-preview.empty { color: var(--muted); }
.bonus-preview { min-height: 40px; padding: 0 3px; border: 1px solid rgba(231,189,106,.28); border-radius: 10px; background: rgba(231,189,106,.05); cursor: pointer; }
.penalty-preview { min-height: 40px; padding: 0 3px; border: 1px solid rgba(226,124,115,.25); border-radius: 10px; background: rgba(226,124,115,.045); cursor: pointer; }
.bonus-preview:focus-visible, .penalty-preview:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.round-option { width: 100%; margin-top: 11px; padding: 12px; display: flex; gap: 11px; align-items: center; text-align: left; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.025); cursor: pointer; }
.round-option > span:last-child { display: grid; gap: 2px; }
.round-option small { color: var(--muted); font-size: 11px; }
.toggle-box { width: 22px; height: 22px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.3); border-radius: 7px; }
.round-option[aria-pressed="true"] { border-color: var(--line-strong); background: rgba(231,189,106,.055); }
.round-option[aria-pressed="true"] .toggle-box { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 5px #17130b; }
.duel-panel { margin-top: 10px; padding: 0 12px 12px; border: 1px solid rgba(231,189,106,.26); border-radius: 14px; background: rgba(231,189,106,.04); }
.round-total { margin-top: 12px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.round-total strong { color: var(--ivory); }

.final-panel { padding-top: 26px; text-align: center; }
.final-ranking { display: grid; gap: 9px; text-align: left; margin: 22px 0; }
.final-player { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; padding: 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 16px; background: rgba(255,255,255,.03); }
.final-player:first-child { border-color: var(--line-strong); background: rgba(231,189,106,.07); }
.final-place { color: var(--gold); font: 600 22px/1 Georgia, serif; }

.rules-heading { align-items: center; }
.audio-all-button { min-height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(231,189,106,.06); color: var(--gold-light); display: flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 800; cursor: pointer; }
.intro-copy { margin: 0 2px 16px; color: var(--muted); line-height: 1.5; }
.quick-help {
  margin: 0 0 18px; padding: 17px; border: 1px solid rgba(231,189,106,.34); border-radius: 22px;
  background: radial-gradient(circle at 100% 0, rgba(231,189,106,.14), transparent 38%), rgba(255,255,255,.028);
  box-shadow: 0 18px 45px rgba(0,0,0,.2);
}
.quick-help-heading { display: grid; grid-template-columns: 45px 1fr; gap: 12px; align-items: center; }
.quick-help-emblem {
  width: 44px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%;
  color: #17130c; background: linear-gradient(145deg, #fff1c1, #d8a84d); box-shadow: 0 8px 22px rgba(217,165,73,.18); font: 700 23px/1 Georgia, serif;
}
.quick-help h2 { margin: 0; font-size: 23px; }
.quick-help-intro { margin: 13px 0 14px; color: #c8cbd1; font-size: 14px; line-height: 1.48; }
.quick-rule-cards { display: grid; gap: 8px; }
.quick-rule-card { overflow: hidden; border: 1px solid rgba(255,255,255,.105); border-radius: 15px; background: rgba(5,6,8,.46); }
.quick-rule-card[open] { border-color: rgba(231,189,106,.55); background: rgba(231,189,106,.055); }
.quick-rule-card summary {
  min-height: 58px; padding: 11px 12px; display: grid; grid-template-columns: 28px minmax(0,1fr) 22px; align-items: center; gap: 9px;
  list-style: none; cursor: pointer; font-size: 14px; font-weight: 780; line-height: 1.28;
}
.quick-rule-card summary::-webkit-details-marker { display: none; }
.quick-rule-index { color: var(--gold); font: 600 16px/1 Georgia, serif; }
.quick-rule-arrow { color: var(--gold-light); font-size: 18px; text-align: center; transition: transform .18s ease; }
.quick-rule-card[open] .quick-rule-arrow { transform: rotate(45deg); }
.quick-rule-answer { padding: 0 13px 14px 49px; color: #d5d7dc; font-size: 14px; line-height: 1.52; }
.quick-rule-answer p { margin: 0 0 10px; }
.quick-rule-answer ol { margin: 7px 0 13px; padding-left: 19px; }
.quick-rule-answer li + li { margin-top: 5px; }
.listen-quick-rule { min-height: 38px; border: 1px solid var(--line); border-radius: 11px; padding: 0 11px; background: transparent; color: var(--gold-light); font-size: 12px; font-weight: 750; cursor: pointer; }
.voice-lab {
  position: relative; overflow: hidden; margin: 0 0 18px; padding: 17px;
  border: 1px solid rgba(231,189,106,.31); border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(231,189,106,.12), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(231,189,106,.025));
  box-shadow: 0 18px 45px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.035);
}
.voice-lab-heading { display: grid; grid-template-columns: 45px 1fr; gap: 12px; align-items: center; }
.voice-emblem {
  width: 44px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 13px 13px 17px 17px;
  color: var(--gold-light); background: rgba(231,189,106,.07); box-shadow: inset 0 0 18px rgba(231,189,106,.08); font: 600 25px/1 Georgia, serif;
}
.voice-kicker { margin: 0 0 4px; color: var(--gold); font-size: 10px; font-weight: 850; letter-spacing: .15em; }
.voice-lab h2 { margin: 0; font-size: 23px; }
.voice-intro { margin: 13px 0 15px; color: #c8cbd1; font-size: 14px; line-height: 1.48; }
.voice-groups { display: grid; gap: 14px; }
.voice-group-title { margin: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.voice-option-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.voice-option {
  position: relative; min-height: 104px; padding: 11px 31px 11px 11px; border: 1px solid rgba(255,255,255,.105); border-radius: 15px; display: grid; grid-template-columns: 29px 1fr; gap: 8px;
  align-items: start; color: var(--ivory); background: rgba(5,6,8,.42); text-align: left; cursor: pointer; transition: border-color .18s, background .18s, transform .18s;
}
.voice-option:active { transform: translateY(1px); }
.voice-option:hover, .voice-option:focus-visible, .voice-option.playing { border-color: var(--line-strong); background: rgba(231,189,106,.075); outline: none; }
.voice-option.selected { border-color: rgba(231,189,106,.64); background: rgba(231,189,106,.09); box-shadow: inset 0 0 0 1px rgba(231,189,106,.08); }
.voice-option:disabled { opacity: .48; cursor: wait; }
.voice-play { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--gold-light); font-size: 9px; }
.voice-option.playing .voice-play { color: #151109; background: var(--gold); box-shadow: 0 0 16px rgba(231,189,106,.35); }
.voice-option-copy { min-width: 0; display: grid; gap: 3px; }
.voice-option-copy strong { font-size: 14px; }
.voice-option-copy small { color: #c1c4ca; font-size: 11px; line-height: 1.28; }
.voice-option-copy em { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; font-style: normal; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.voice-choice-check { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; color: transparent; font-size: 10px; }
.voice-option.selected .voice-choice-check { border-color: var(--gold); color: #17130c; background: var(--gold); }
.voice-note, .voice-loading { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.voice-note.complete { color: var(--gold-light); }
.rule-steps { display: grid; gap: 9px; }
.rule-card { border: 1px solid rgba(255,255,255,.09); border-radius: 17px; background: rgba(255,255,255,.025); overflow: hidden; }
.rule-card[open] { border-color: rgba(231,189,106,.34); }
.rule-card summary { min-height: 62px; padding: 12px 14px; display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 10px; list-style: none; cursor: pointer; }
.rule-card summary::-webkit-details-marker { display: none; }
.rule-number { color: var(--gold); font: 600 20px/1 Georgia, serif; }
.rule-title { font-weight: 780; }
.rule-time { color: var(--muted); font-size: 11px; }
.rule-content { padding: 0 14px 15px 55px; color: #d5d7dc; font-size: 15px; line-height: 1.55; }
.rule-content p { margin-bottom: 10px; }
.rule-content ul { margin: 7px 0 13px; padding-left: 18px; }
.rule-content li + li { margin-top: 5px; }
.listen-step { min-height: 38px; border: 1px solid var(--line); border-radius: 11px; padding: 0 11px; background: transparent; color: var(--gold-light); font-size: 12px; font-weight: 750; cursor: pointer; }

.document-list { display: grid; gap: 9px; }
.document-card { width: 100%; min-height: 76px; padding: 11px 14px; display: grid; grid-template-columns: 45px 1fr auto; align-items: center; gap: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 17px; background: rgba(255,255,255,.03); color: var(--ivory); text-align: left; text-decoration: none; cursor: pointer; }
.document-card > span:nth-child(2) { display: grid; gap: 4px; }
.document-card small { color: var(--muted); }
.doc-icon { width: 43px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--gold); font: 600 13px/1 Georgia, serif; background: rgba(231,189,106,.05); }
.offline-card { justify-content: flex-start; margin-top: 14px; }

.bottom-nav {
  position: fixed; z-index: 20; left: 50%; bottom: 0; width: min(100%, 560px); transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,.09); background: rgba(8,9,11,.91); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: opacity .28s ease, transform .28s ease;
}
.nav-item { min-height: 55px; border: 0; border-radius: 13px; display: grid; place-items: center; align-content: center; gap: 3px; background: transparent; color: var(--muted); cursor: pointer; }
.nav-item > span { font-size: 21px; line-height: 1; }
.nav-item small { font-size: 10px; font-weight: 750; }
.nav-item.active { color: var(--gold-light); background: rgba(231,189,106,.07); }

.detail-dialog { width: min(calc(100% - 20px), 520px); margin: auto auto 0; padding: 0; border: 1px solid var(--line); border-radius: 24px 24px 0 0; color: var(--ivory); background: #111318; box-shadow: 0 -20px 60px rgba(0,0,0,.5); }
.detail-dialog::backdrop { background: rgba(0,0,0,.66); backdrop-filter: blur(3px); }
.detail-dialog form { padding: 9px 17px calc(18px + env(safe-area-inset-bottom)); }
.dialog-handle { width: 42px; height: 4px; margin: 2px auto 15px; border-radius: 5px; background: rgba(255,255,255,.18); }
.dialog-title-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.dialog-title-row small { color: var(--gold); font-size: 10px; letter-spacing: .14em; }
.close-button { width: 38px; height: 38px; font-size: 24px; }
.dialog-name-field { display: grid; gap: 7px; padding: 0 0 15px; }
.dialog-name-field span { color: var(--muted); font-size: 14px; }
.dialog-name-field input { width: 100%; min-height: 48px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; padding: 0 12px; color: var(--ivory); background: #191c22; outline: none; font-size: 16px; }
.dialog-name-field input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(231,189,106,.09); }
.invite-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.invite-methods.single { grid-template-columns: 1fr; }
.invite-methods .full { margin-top: 0; }
.messenger-action { border-color: rgba(128,103,255,.48); color: #ded8ff; background: rgba(104,78,255,.12); }
.dialog-field { min-height: 72px; display: grid; grid-template-columns: 1fr 76px; align-items: center; gap: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.dialog-field > span { display: grid; gap: 3px; }
.dialog-field small { color: var(--muted); font-size: 11px; }
.dialog-field select { height: 40px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: #191c22; color: var(--ivory); text-align: center; font-weight: 800; }
.ranking-list { display: grid; gap: 7px; }
.ranking-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; padding: 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; }
.ranking-row:first-child { border-color: rgba(231,189,106,.4); }
.danger-link { width: 100%; margin-top: 15px; padding: 12px; border: 0; background: transparent; color: var(--danger); cursor: pointer; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 15px); width: max-content; max-width: calc(100% - 36px); padding: 11px 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: #22252c; color: var(--ivory); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s ease; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.online-unavailable-view { padding-top: min(17vh, 130px); }
.online-unavailable-card { text-align: center; }
.online-unavailable-card h1 { margin-bottom: 14px; }
.online-unavailable-card p:not(.eyebrow) { color: #c8cbd1; line-height: 1.55; }
.online-unavailable-card p[lang="en"] { color: var(--muted); font-size: 14px; }

@media (min-width: 720px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100dvh - 48px); border: 1px solid rgba(255,255,255,.08); border-radius: 30px; box-shadow: 0 30px 90px rgba(0,0,0,.55); overflow: hidden; }
  .bottom-nav { bottom: 24px; border: 1px solid rgba(255,255,255,.09); border-radius: 0 0 30px 30px; }
  .detail-dialog { border-radius: 24px; margin: auto; }
  .duelora-table-felt { height: 560px; }
  .table-center-zone { top: 184px; right: 116px; left: 116px; height: 284px; }
  .table-deck-zone, .table-trump-zone { top: 193px; }
  .table-turn-indicator { top: 132px; }
  .opponent-card-fan .duelora-card-back.compact { width: 38px; height: 57px; }
  .opponent-card-fan { width: 66px; height: 61px; }
  .opponent-card-fan > span { left: calc(var(--stack-index) * 13px); }
  .table-seat-badge strong { font-size: 13px; }
}

@media (max-width: 390px) {
  .app-shell { padding-left: 11px; padding-right: 11px; }
  .brand-copy small { display: none; }
  .entry-head, .score-row { grid-template-columns: minmax(55px, 1fr) 40px 40px 44px 46px 44px; gap: 2px; }
  .entry-head { padding-left: 6px; padding-right: 6px; font-size: 8px; letter-spacing: .02em; }
  .score-row { padding-left: 7px; padding-right: 6px; }
  .player-cell { gap: 3px; }
  .player-cell > span:first-child { font-size: 12px; }
  .detail-badge { min-width: 18px; width: 18px; height: 20px; font-size: 12px; }
  .compact-select, .point-preview { font-size: 12px; }

  .solo-game-action { min-height: 72px; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 9px; padding-right: 13px; padding-left: 9px; }
  .solo-action-icon { width: 40px; height: 44px; }
  .solo-action-copy strong { font-size: 14px; }
  .solo-action-copy small { font-size: 10px; }
  .voice-option-list { grid-template-columns: 1fr; }
  .voice-option { min-height: 88px; }
  .online-game-bar { grid-template-columns: 55px minmax(0, 1fr) minmax(0, 1fr); gap: 5px; }
  .online-game-bar > div { padding: 8px 7px; }
  .online-game-bar strong { font-size: 11px; }
  .duelora-card { flex-basis: 74px; width: 74px; height: 111px; }
  .duelora-card.compact { flex-basis: 52px; width: 52px; height: 78px; }
  .prediction-grid { gap: 5px; }
  .turn-banner { align-items: flex-start; flex-direction: column; }
  .turn-banner small { text-align: left; }
  .online-command-banner { min-height: 83px; margin-right: 1px; margin-left: 1px; padding-right: 11px; padding-left: 48px; }
  .online-command-banner strong { font-size: 17px; }
  .online-command-banner p { font-size: 10px; }
  .command-pulse { left: 14px; }
  .viewer-game-status { margin-right: 1px; margin-left: 1px; gap: 4px; }
  .viewer-game-status > div { min-height: 63px; padding-right: 7px; padding-left: 7px; }
  .viewer-game-status small { font-size: 8px; letter-spacing: .02em; }
  .viewer-game-status strong { font-size: 21px; }
  .trump-status-banner { margin-right: 1px; margin-left: 1px; padding-left: 50px; }
  .trump-status-banner strong { font-size: 16px; }
  .trump-status-banner p { font-size: 9px; }
  .trump-status-gem { left: 17px; width: 21px; height: 21px; }
  .live-score-ribbon { margin-right: 1px; margin-left: 1px; padding: 8px; }
  .live-score-player { grid-template-columns: 16px minmax(0, 1fr) auto; padding-right: 5px; padding-left: 5px; gap: 3px; }
  .live-score-player > span { font-size: 12px; }
  .live-score-player strong { font-size: 10px; }
  .live-score-player output { font-size: 11px; }
  #onlineRoomPanel.game-active .room-hero { padding-right: 8px; padding-left: 9px; }
  .table-hud { grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1fr); margin-right: 1px; margin-left: 1px; }
  .table-hud > div { padding-right: 6px; padding-left: 6px; }
  .table-hud small { font-size: 10px; }
  .table-hud strong { font-size: 12px; }
  .duelora-table-felt { height: 470px; }
  .duelora-table-shell { padding: 6px; border-radius: 39px 39px 84px 84px; }
  .duelora-table-felt { border-radius: 33px 33px 78px 78px; }
  .duelora-table-felt::before { inset: 10px; border-radius: 27px 27px 68px 68px; }
  .table-opponents { top: 12px; right: 8px; left: 8px; gap: 2px; }
  .opponent-card-fan { width: 43px; height: 43px; }
  .opponent-card-fan > span { left: calc(var(--stack-index) * 8px); }
  .opponent-card-fan .duelora-card-back.compact { width: 29px; height: 44px; }
  .table-seat-badge { min-height: 27px; padding: 2px 5px; gap: 3px; }
  .table-seat-badge > span { display: none; }
  .table-seat-badge strong { font-size: 10px; }
  .table-seat-badge small { font-size: 8px; }
  .table-seat.brewer-seat .table-seat-badge::after { width: 13px; height: 15px; }
  .table-turn-indicator { top: 108px; min-width: 145px; max-width: 64%; }
  .table-deck-zone, .table-trump-zone { top: 154px; }
  .table-deck-zone { left: 11px; }
  .table-trump-zone { right: 7px; }
  .table-trump-cards { width: 54px; height: 79px; }
  .table-trump-cards .duelora-card.compact { width: 50px; height: 75px; }
  .table-center-zone { top: 151px; right: 72px; left: 72px; height: 232px; }
  .viewer-table-seat { right: 12px; bottom: 14px; left: 12px; }
  .online-hand-section { margin-right: 2px; margin-left: 2px; }
  .online-hand { min-height: 0; padding-right: 19px; padding-left: 1px; }
  .table-dice-field { gap: 2px 3px; }
  .table-dice-player { min-height: 64px; }
  .table-dice-player > small { padding-right: 5px; padding-left: 5px; font-size: 8px; }
  .duelora-die { width: 34px; height: 34px; flex-basis: 34px; border-radius: 9px; font-size: 15px; }
  .dice-on-felt .duelora-die + .duelora-die { margin-left: -9px; }
  .dice-winner-banner { max-width: 210px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .topbar, .bottom-nav, .audio-all-button, .listen-step, .listen-quick-rule, .quick-help, .voice-lab { display: none !important; }
  body { background: white; color: black; }
  .app-shell { width: 100%; padding: 0; }
  .view { display: none !important; }
  #rulesView { display: block !important; }
  .rule-card { break-inside: avoid; border-color: #bbb; background: white; }
  .rule-card[open] .rule-content { display: block; }
  .rule-card summary { color: black; }
  .rule-content { color: black; }
}

/* Keep the offline explanation readable on narrow screens. */
.offline-card > div { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: 4px; }
.offline-card strong { line-height: 1.35; }
.offline-card small { margin-top: 0; }

/* Companion-only recorded narration */
.recorded-narration { padding:16px; margin:16px 0; border:1px solid rgba(215,178,98,.48); border-radius:16px; background:rgba(24,24,22,.82); }
.recorded-narration strong { color:#ead29f; display:block; font-size:15px; }
.recorded-narration p { margin:8px 0; font-size:13px; color:#c9c4bc; }
.recorded-narration audio { display:block; width:100%; min-height:44px; }
