:root {
  color-scheme: dark;
  --bg: #10131f;
  --bg-2: #171b2d;
  --panel: rgba(26, 31, 52, 0.72);
  --panel-strong: rgba(28, 35, 60, 0.92);
  --text: #f4f6ff;
  --muted: #aab0c6;
  --line: rgba(255,255,255,0.12);
  --gold: #f3c46b;
  --gold-2: #ffdf93;
  --green: #39d49a;
  --blue: #75a7ff;
  --red: #ff6b7b;
  --felt: #145c4c;
  --felt-dark: #0c332d;
  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --tap: 48px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; width: 100%; overflow: hidden; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 5%, rgba(93, 130, 255, .24), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(255, 197, 108, .16), transparent 32%),
    linear-gradient(135deg, var(--bg), #0a0c14 70%);
  color: var(--text);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}

button, input { font: inherit; }
button { min-height: var(--tap); cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(117,167,255,.8); outline-offset: 3px; }

.app-shell { height: 100%; display: flex; flex-direction: column; position: relative; }
.glass-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.boot-screen {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: linear-gradient(145deg, #0f1322, #0a0b12);
  transition: opacity .35s ease, visibility .35s ease;
}
.boot-screen.hidden { opacity: 0; visibility: hidden; }
.boot-card { text-align: center; padding: 34px; border-radius: 28px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.logo-mark, .brand-emblem {
  width: 54px; height: 54px; display: inline-grid; place-items: center; border-radius: 18px;
  background: linear-gradient(145deg, var(--gold), #f2874e); color: #251300; font-weight: 900; box-shadow: 0 12px 28px rgba(243,196,107,.25);
}

.topbar {
  height: 74px; margin: 12px 12px 0; border-radius: 24px; padding: 10px 14px;
  display: flex; align-items: center; gap: 14px; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: var(--text); padding: 0 8px; }
.brand-emblem { width: 44px; height: 44px; border-radius: 14px; }
.brand-text { font-weight: 900; letter-spacing: .2px; white-space: nowrap; }
.env-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.env-badge.ok {
  color: #bfffe7;
  border-color: rgba(57,212,154,.3);
  background: rgba(57,212,154,.12);
}
.env-badge.warn {
  color: #fff0b8;
  border-color: rgba(243,196,107,.28);
  background: rgba(243,196,107,.12);
}
.topbar-status { margin-left: auto; color: var(--muted); font-size: 14px; }
.topbar-auth { min-width: 132px; }
.topbar-nav { display: flex; gap: 6px; }
.topbar-nav button, .bottom-nav button, .secondary, .primary, .icon-button {
  border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: rgba(255,255,255,.07); padding: 0 14px;
}
.primary { background: linear-gradient(145deg, #f4c76f, #ef8655); color: #211308; border: 0; font-weight: 900; }
.secondary { background: rgba(255,255,255,.08); }
button:disabled {
  opacity: .62;
  cursor: default;
  filter: grayscale(.12);
}
.wide { width: 100%; }
.icon-button { width: var(--tap); padding: 0; border-radius: 16px; font-weight: 900; }

.main-stage { position: relative; flex: 1; overflow: hidden; padding: 12px 12px 86px; }
.screen { display: none; height: 100%; overflow: auto; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.screen.active { display: block; animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.hero { min-height: 330px; border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 46px); display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; overflow: hidden; position: relative; }
.hero-copy h2 { font-size: clamp(34px, 5vw, 68px); line-height: .95; margin: 8px 0 18px; max-width: 820px; }
.hero-copy p { color: var(--muted); max-width: 780px; font-size: 18px; line-height: 1.55; }
.eyebrow { color: var(--gold-2)!important; text-transform: uppercase; font-size: 12px!important; letter-spacing: .22em; font-weight: 900; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(11,15,28,.52);
}
.hero-auth-copy strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
}
.hero-auth-copy p {
  margin: 6px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.hero-entry-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-table-preview { position: relative; min-height: 250px; }
.home-entry-panel {
  margin-top: 14px;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 18px;
  align-items: center;
}
.home-entry-panel h3 {
  margin: 10px 0 8px;
  font-size: clamp(24px, 3vw, 34px);
}
.home-entry-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.home-entry-actions {
  display: grid;
  gap: 10px;
  min-width: 260px;
}
.startup-notice {
  margin-top: 14px;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border-color: rgba(255,107,123,.26);
  background: rgba(80,19,29,.32);
}
.startup-notice strong {
  display: block;
  margin-bottom: 8px;
  color: #ffd6dc;
}
.startup-notice p {
  margin: 0;
  color: #ffd6dc;
  line-height: 1.5;
}
.preview-card { position: absolute; width: 105px; height: 150px; border-radius: 18px; background: #f8f3e6; color: #17121a; display: grid; place-items: center; font-size: 34px; font-weight: 900; box-shadow: 0 18px 55px rgba(0,0,0,.4); }
.preview-card.p1 { right: 190px; top: 42px; transform: rotate(-14deg); }
.preview-card.p2 { right: 95px; top: 18px; transform: rotate(7deg); color: #111; }
.preview-card.p3 { right: 28px; top: 75px; transform: rotate(22deg); color: #c52235; }
.preview-glow { position: absolute; width: 280px; height: 280px; right: 40px; top: 30px; border-radius: 50%; background: radial-gradient(circle, rgba(57,212,154,.35), transparent 65%); filter: blur(10px); }

.mode-grid, .rooms-grid, .shop-grid, .profile-layout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.profile-auth-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border-radius: var(--radius-lg);
  margin-top: 14px;
}
.profile-auth-hero h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}
.profile-auth-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.profile-auth-hero-hint {
  margin-top: 10px !important;
  color: var(--gold-2) !important;
}
.profile-auth-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.env-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.profile-auth-hero-actions button {
  min-width: 220px;
}
.live-layout { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.live-panel { border-radius: 24px; padding: 18px; }
.live-panel h3 { margin: 0 0 12px; }
.live-form { display: grid; gap: 12px; }
.live-form label { display: grid; gap: 6px; }
.live-form span { color: var(--muted); font-size: 13px; font-weight: 700; }
.live-form input, .live-form select {
  min-height: 46px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.2); color: var(--text); padding: 0 12px;
}
.live-form-hint, .live-queue-summary {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  padding: 12px 14px;
}
.live-form-hint {
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}
.live-queue-summary {
  display: grid;
  gap: 6px;
}
.live-queue-summary strong {
  color: var(--gold-2);
  font-size: 14px;
}
.live-queue-summary span {
  color: var(--muted);
  line-height: 1.4;
  font-size: 13px;
}
.live-check { display: flex !important; align-items: center; gap: 10px; }
.live-check input { min-height: 18px; min-width: 18px; }
.room-card-actions button:disabled,
.live-room-actions button:disabled,
.live-form button:disabled {
  opacity: .55;
  cursor: default;
  filter: grayscale(.12);
}
.room-card-actions, .live-room-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.room-card-meta, .live-room-meta { display: grid; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.live-room-empty { color: var(--muted); line-height: 1.5; }
.live-pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.room-card.active-room { border-color: rgba(117,167,255,.45); box-shadow: 0 0 0 1px rgba(117,167,255,.22) inset; }
.mode-card, .room-card, .shop-card, .profile-card, .section-header { border-radius: var(--radius-lg); padding: 22px; }
.mode-card h3, .section-header h2 { margin: 0 0 10px; font-size: 26px; }
.mode-card p, .section-header p { color: var(--muted); line-height: 1.5; }
.mode-card.accent { background: linear-gradient(145deg, rgba(31,42,72,.9), rgba(80,52,42,.76)); }
dl { display: grid; gap: 8px; }
dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
dt { color: var(--muted); } dd { margin: 0; font-weight: 900; }

.table-screen { overflow: hidden; }
.table-toolbar { height: 66px; border-radius: 22px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.table-toolbar strong { display: block; }
.table-toolbar span { color: var(--muted); font-size: 13px; }
.match-status { min-width: 190px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: var(--muted); font-size: 13px; text-align: center; }
.match-status.alert { color: #fff0b8; border-color: rgba(243,196,107,.35); background: rgba(243,196,107,.12); }
.match-status.danger { color: #ffd6dc; border-color: rgba(255,107,123,.35); background: rgba(255,107,123,.12); }
.toolbar-actions { display: flex; gap: 8px; }
.game-layout { height: calc(100% - 76px); display: grid; grid-template-columns: 230px minmax(0, 1fr) 260px; gap: 10px; }
.scoreboard, .event-log { border-radius: 24px; padding: 14px; overflow: auto; }
.player-score { display: grid; grid-template-columns: 46px minmax(0, 1fr) 68px; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; border: 1px solid var(--line); margin-bottom: 8px; background: rgba(255,255,255,.05); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; overflow: hidden; border: 2px solid rgba(255,255,255,.18); background: linear-gradient(145deg, #5066ff, #ec8d56); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.score-text { min-width: 0; overflow: hidden; }
.score-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-meta { color: var(--muted); font-size: 12px; }
.score-value { min-width: 68px; font-size: 24px; font-weight: 900; color: var(--gold-2); white-space: nowrap; padding-left: 6px; text-align: right; justify-self: end; }

.felt-table { position: relative; min-height: 100%; border-radius: 34px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); background:
  radial-gradient(circle at 50% 36%, rgba(61, 226, 170, .16), transparent 26%),
  radial-gradient(circle at 50% 65%, rgba(255,255,255,.08), transparent 30%),
  linear-gradient(145deg, var(--felt), var(--felt-dark)); box-shadow: inset 0 0 110px rgba(0,0,0,.42), var(--shadow); touch-action: none; }
.table-aura { position: absolute; inset: 9%; border-radius: 45%; border: 1px solid rgba(255,255,255,.1); box-shadow: inset 0 0 60px rgba(255,255,255,.04); }
.opponent-row { position: absolute; top: 18px; left: 18px; right: 18px; display: flex; justify-content: center; gap: 18px; z-index: 2; }
.opponent-seat { min-width: 135px; display: grid; gap: 6px; justify-items: center; padding: 10px; border-radius: 20px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.1); }
.opponent-name { max-width: 122px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.opponent-cards { display: flex; margin-top: 3px; }
.card-back-mini { width: 22px; height: 32px; border-radius: 5px; margin-left: -6px; background: repeating-linear-gradient(45deg, #23396d 0 5px, #2f57ac 5px 10px); border: 1px solid rgba(255,255,255,.22); }
.center-zone { position: absolute; left: 50%; top: 43%; width: min(560px, 86%); min-height: 230px; transform: translate(-50%, -50%); border-radius: 30px; border: 1px dashed rgba(255,255,255,.28); display: grid; place-items: center; padding: 22px; z-index: 2; }
.center-zone.drop-hot { background: rgba(255,255,255,.08); box-shadow: 0 0 0 6px rgba(243,196,107,.18); }
.trump-pill { position: absolute; top: 12px; left: 12px; padding: 8px 12px; border-radius: 999px; background: rgba(0,0,0,.26); border: 1px solid rgba(255,255,255,.12); font-weight: 800; }
.trick-cards { display: flex; align-items: center; justify-content: center; min-height: 145px; gap: 12px; flex-wrap: wrap; }
.open-card { position: absolute; right: 18px; bottom: 16px; }
.action-bar { position: absolute; left: 18px; right: 18px; bottom: 155px; min-height: 64px; border-radius: 22px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; z-index: 5; flex-wrap: wrap; }
.hand-zone { position: absolute; left: 0; right: 0; bottom: 0; height: 154px; z-index: 10; }
.hand-label { position: absolute; left: 22px; top: 0; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .16em; }
.player-hand { position: absolute; left: 50%; bottom: 12px; width: min(720px, 94%); height: 135px; transform: translateX(-50%); }

.playing-card { width: 82px; height: 118px; border: 0; border-radius: 14px; background: #fffaf0; color: #12131b; position: absolute; display: grid; place-items: center; box-shadow: 0 12px 28px rgba(0,0,0,.36); transform-origin: 50% 112%; transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; touch-action: none; cursor: grab; padding: 0; }
.playing-card .rank { position: absolute; top: 9px; left: 10px; font-size: 22px; font-weight: 1000; }
.playing-card .suit { font-size: 42px; }
.playing-card .corner { position: absolute; right: 10px; bottom: 8px; transform: rotate(180deg); font-size: 22px; font-weight: 1000; }
.playing-card.red { color: #be2038; }
.playing-card.back { background: repeating-linear-gradient(45deg, #1d2d5b 0 8px, #315bb3 8px 16px); color: transparent; }
.playing-card.in-hand { left: calc(50% - 41px); transform: translateX(var(--x)) translateY(var(--y)) rotate(var(--rot)); }
.playing-card.in-hand:hover, .playing-card.in-hand:focus-visible { transform: translateX(var(--x)) translateY(calc(var(--y) - 18px)) rotate(var(--rot)) scale(1.04); z-index: 100!important; }
.playing-card.valid { box-shadow: 0 12px 30px rgba(0,0,0,.35), 0 0 0 3px rgba(57,212,154,.65); }
.playing-card.invalid { filter: grayscale(.6) brightness(.82); }
.playing-card.dragging { position: fixed!important; z-index: 999; transform: translate(-50%, -50%) scale(1.08)!important; cursor: grabbing; transition: none; }
.playing-card.table-card { position: relative; width: 76px; height: 110px; transform: rotate(var(--rot, 0deg)); animation: dealIn .22s ease both; }
@keyframes dealIn { from { opacity: 0; transform: translateY(16px) scale(.9) rotate(var(--rot,0deg)); } to { opacity: 1; transform: translateY(0) scale(1) rotate(var(--rot,0deg)); } }

.log-list { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.log-item { padding: 9px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.section-header { margin-bottom: 14px; }
.room-card, .shop-card { border-radius: 24px; padding: 18px; background: var(--panel); border: 1px solid var(--line); }
.room-card header, .shop-card header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(57,212,154,.14); color: #bfffe7; font-size: 12px; font-weight: 900; }
.rating-table { border-radius: 24px; padding: 16px; overflow: auto; }
.rating-row { display: grid; grid-template-columns: 58px 1fr 90px 90px 110px; gap: 8px; padding: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.rating-row:first-child { color: var(--gold-2); font-weight: 900; }
.shop-preview { height: 120px; border-radius: 20px; margin: 12px 0; display: grid; place-items: center; font-size: 42px; background: radial-gradient(circle, rgba(255,255,255,.17), transparent 60%), linear-gradient(145deg, rgba(117,167,255,.28), rgba(243,196,107,.18)); }
.profile-layout { grid-template-columns: 1.1fr 1fr 1fr; }
.profile-card h3 { margin-top: 0; }
.profile-auth-box {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
}
.profile-auth-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.stat-box { padding: 14px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.stat-box strong { display: block; font-size: 26px; color: var(--gold-2); }
.achievements { display: grid; gap: 8px; }
.achievement { padding: 10px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.setting-row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border-bottom: 1px solid var(--line); gap: 12px; }

.bottom-nav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom)); height: 62px; border-radius: 22px; display: none; grid-template-columns: repeat(5,1fr); gap: 4px; padding: 6px; z-index: 60; }
.drawer { position: fixed; right: 12px; top: 90px; bottom: calc(12px + var(--safe-bottom)); width: min(420px, calc(100vw - 24px)); border-radius: 26px; z-index: 120; transform: translateX(calc(100% + 24px)); transition: transform .25s ease; display: flex; flex-direction: column; overflow: hidden; }
.drawer.open { transform: translateX(0); }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-messages { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-message { padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.chat-message strong { display: block; color: var(--gold-2); margin-bottom: 4px; }
.chat-flagged { border-color: rgba(255,107,123,.35); background: rgba(255,107,123,.08); }
.chat-report { margin-top: 8px; min-height: 34px; border-radius: 10px; padding: 0 10px; font-size: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); color: var(--muted); }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { min-height: 48px; border-radius: 16px; border: 1px solid var(--line); background: rgba(0,0,0,.22); color: var(--text); padding: 0 14px; user-select: text; -webkit-user-select: text; }
.modal-card { width: min(720px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: 26px; background: var(--panel-strong); color: var(--text); box-shadow: var(--shadow); padding: 24px; }
.modal-card::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(7px); }
.modal-close { float: right; }
.rules-content { color: var(--muted); line-height: 1.58; max-height: 62vh; overflow: auto; user-select: text; -webkit-user-select: text; }

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

@media (max-width: 980px) {
  .home-entry-panel {
    grid-template-columns: 1fr;
  }
  .hero-auth-panel {
    grid-template-columns: 1fr;
  }
  .hero-entry-actions {
    display: grid;
  }
  .home-entry-actions {
    min-width: 0;
  }
  .profile-auth-hero {
    grid-template-columns: 1fr;
  }
  .profile-auth-hero-actions {
    justify-content: stretch;
  }
  .profile-auth-hero-actions button {
    width: 100%;
  }
}

@media (max-width: 1180px) {
  .game-layout { grid-template-columns: 190px minmax(0,1fr); }
  .event-log { display: none; }
  .mode-grid, .rooms-grid, .shop-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .live-layout { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .topbar { height: 62px; margin: 8px 8px 0; border-radius: 20px; }
  .brand-text, .topbar-nav, .topbar-status, .topbar-auth { display: none; }
  .env-badge { margin-left: auto; }
  .main-stage { padding: 8px 8px 84px; }
  .bottom-nav { display: grid; }
  .hero { grid-template-columns: 1fr; min-height: unset; }
  .hero-table-preview { display: none; }
  .hero-copy h2 { font-size: 38px; }
  .mode-grid, .rooms-grid, .shop-grid, .profile-layout { grid-template-columns: 1fr; }
  .table-toolbar { height: auto; align-items: stretch; }
  .match-status { min-width: 0; }
  .game-layout { grid-template-columns: 1fr; height: calc(100% - 72px); }
  .scoreboard { position: absolute; left: 16px; right: 16px; top: 84px; height: 72px; z-index: 4; display: flex; gap: 8px; padding: 8px; overflow-x: auto; }
  .player-score { min-width: 172px; grid-template-columns: 42px minmax(0, 1fr) 58px; gap: 8px; margin: 0; }
  .score-name { font-size: 14px; }
  .score-value { min-width: 58px; font-size: 22px; }
  .felt-table { min-height: 100%; border-radius: 24px; }
  .opponent-row { top: 100px; transform: scale(.88); transform-origin: top center; }
  .center-zone { top: 48%; min-height: 190px; }
  .action-bar { bottom: 172px; left: 10px; right: 10px; }
  .hand-zone { height: 170px; }
  .player-hand { height: 155px; bottom: 8px; }
  .playing-card { width: 76px; height: 112px; }
  body.large-cards .playing-card { width: 86px; height: 126px; }
  .rating-row { grid-template-columns: 44px 1fr 70px; }
  .rating-row span:nth-child(4), .rating-row span:nth-child(5) { display: none; }
}
