* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --border: #d9e1ec;
  --border-soft: #edf1f7;
  --text: #162230;
  --muted: #617287;
  --blue: #2f80ff;
  --blue-soft: #dfeaff;
  --blue-soft-strong: #d8e8ff;
  --blue-soft-alt: #eef5ff;
  --blue-soft-hover: #dfeeff;
  --blue-border: #c7dafd;
  --blue-border-strong: #bfd6ff;
  --blue-text: #1f5fd4;
  --green: #17a46b;
  --green-soft: #e9fbf3;
  --green-border: #c8efd9;
  --green-text: #0d8a59;
  --red: #dc5b60;
  --red-soft: #ffe8e9;
  --red-border: #f5c9cb;
  --shadow-strong: 0 20px 48px rgba(22, 34, 48, 0.16);
  --shadow: 0 10px 30px rgba(22, 34, 48, 0.08);
  --surface-contrast: #485664;
  --surface-contrast-text: #ffffff;
  --surface-subtle: #f7f9fc;
  --surface-subtle-alt: #f3f6fb;
  --surface-subtle-2: #f3f5f8;
  --surface-panel: rgba(255, 255, 255, 0.98);
  --surface-panel-strong: rgba(255, 255, 255, 0.99);
  --surface-dock: rgba(255, 255, 255, 0.94);
  --surface-overlay: rgba(22, 34, 48, 0.16);
  --surface-overlay-strong: rgba(22, 34, 48, 0.22);
  --surface-hover: #eef2f7;
  --surface-switch: #d8e0ea;
  --surface-info: #eef6ff;
  --surface-info-border: #cfe5ff;
  --surface-info-text: #3b5f86;
  --surface-neutral-border: #cfd9e5;
  --surface-neutral-text: #556575;
  --surface-card-disabled: #f0f3f7;
  --surface-card-disabled-border: #d7dee7;
  --surface-card-disabled-text: #98a5b3;
  --surface-danger-soft: #fff4f4;
  --surface-kick: rgba(255, 255, 255, 0.96);
  --surface-kick-hover: #fff4f4;
  --surface-gauge-track: #dfe6ef;
  --surface-tip: #eef6ff;
  --surface-tip-border: #cfe5ff;
  --surface-tip-title: #1f5fd4;
  --surface-tip-text: #3b5f86;
  --surface-tip-close: #5b82b3;
  --surface-tip-close-hover: rgba(255, 255, 255, 0.7);
  --surface-settings: #f7faff;
  --surface-settings-border: #e4edf9;
  --title-caret: #7d8da1;
  --label-soft: #8ca0b7;
  --player-muted: #5f6f81;
  --vote-muted: #9aa9ba;
  --spectator-border: #b9c4d0;
  --spectator-text: #7b8896;
  --focus-ring: 0 0 0 4px rgba(47, 128, 255, 0.12);
}

:root[data-theme='dark'] {
  --bg: #0e1620;
  --surface: #162230;
  --surface-soft: #1b2b3e;
  --border: #2a3a4d;
  --border-soft: #223244;
  --text: #edf4ff;
  --muted: #9ab0c8;
  --blue: #64a6ff;
  --blue-soft: #1d3350;
  --blue-soft-strong: #23406a;
  --blue-soft-alt: #203554;
  --blue-soft-hover: #2a4771;
  --blue-border: #355784;
  --blue-border-strong: #446b9f;
  --blue-text: #9fc5ff;
  --green: #38c58a;
  --green-soft: #13372a;
  --green-border: #255943;
  --green-text: #8ce5be;
  --red: #ff7f8b;
  --red-soft: #41202a;
  --red-border: #6b3440;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  --shadow-strong: 0 24px 56px rgba(0, 0, 0, 0.42);
  --surface-contrast: #223244;
  --surface-contrast-text: #edf4ff;
  --surface-subtle: #1a2838;
  --surface-subtle-alt: #1f3042;
  --surface-subtle-2: #1b2b3c;
  --surface-panel: rgba(22, 34, 48, 0.98);
  --surface-panel-strong: rgba(22, 34, 48, 0.99);
  --surface-dock: rgba(14, 22, 32, 0.92);
  --surface-overlay: rgba(4, 8, 12, 0.48);
  --surface-overlay-strong: rgba(4, 8, 12, 0.62);
  --surface-hover: #243446;
  --surface-switch: #394d63;
  --surface-info: #19314d;
  --surface-info-border: #2e4f77;
  --surface-info-text: #b8d4ff;
  --surface-neutral-border: #405368;
  --surface-neutral-text: #c0d0df;
  --surface-card-disabled: #1a2532;
  --surface-card-disabled-border: #314154;
  --surface-card-disabled-text: #74899d;
  --surface-danger-soft: #47232d;
  --surface-kick: rgba(22, 34, 48, 0.96);
  --surface-kick-hover: #54252d;
  --surface-gauge-track: #314256;
  --surface-tip: #19314d;
  --surface-tip-border: #2e4f77;
  --surface-tip-title: #9fc5ff;
  --surface-tip-text: #c9dcf6;
  --surface-tip-close: #9fc5ff;
  --surface-tip-close-hover: rgba(255, 255, 255, 0.1);
  --surface-settings: #1b2b3e;
  --surface-settings-border: #304459;
  --title-caret: #90a8c2;
  --label-soft: #89a2bc;
  --player-muted: #b5c8db;
  --vote-muted: #86a0ba;
  --spectator-border: #405368;
  --spectator-text: #b6c9dc;
  --focus-ring: 0 0 0 4px rgba(100, 166, 255, 0.18);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100%;
}


body.home-seo-visible {
  display: flex;
  flex-direction: column;
}

body.home-seo-visible #app {
  order: 2;
  width: 100%;
}

body.home-seo-visible .seo-home-copy {
  order: 1;
  width: min(100%, 760px);
  margin: 0 auto 24px;
}

.marketing-page {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--blue-soft) 88%, transparent) 0, transparent 36%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-subtle) 76%, transparent), var(--bg));
}

.marketing-page-shell {
  padding-bottom: 64px;
}

.marketing-container {
  display: grid;
  gap: 22px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.marketing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-top: 8px;
  flex-wrap: wrap;
}

.marketing-header h1 {
  margin: 6px 0 0;
  max-width: 900px;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.1;
}

.marketing-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.marketing-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.marketing-hero {
  display: grid;
  gap: 20px;
  padding: 28px;
}

.marketing-copy h2,
.marketing-card h2,
.marketing-section h2 {
  margin: 10px 0 0;
  font-size: clamp(20px, 2.35vw, 28px);
  line-height: 1.16;
}

.marketing-copy p,
.marketing-card p,
.marketing-section p,
.marketing-footer p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}

.marketing-copy p + p,
.marketing-card p + p,
.marketing-section p + p {
  margin-top: 12px;
}

.marketing-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.marketing-highlight {
  display: grid;
}

.marketing-stat {
  padding: 22px;
  background: var(--surface-panel);
}

.marketing-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.marketing-list li + li {
  margin-top: 4px;
}

.marketing-grid {
  display: grid;
  gap: 22px;
}

.marketing-showcase {
  display: grid;
  gap: 22px;
}

.marketing-card,
.marketing-section {
  padding: 24px 26px;
}

.showcase-card {
  display: grid;
  gap: 20px;
  padding: 24px 26px;
}

.showcase-copy h2 {
  margin: 10px 0 0;
  font-size: clamp(20px, 2.35vw, 28px);
  line-height: 1.16;
}

.showcase-copy p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}

.showcase-visual {
  display: grid;
  place-items: center;
  min-height: 260px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-subtle) 84%, transparent), var(--surface)),
    var(--surface);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.phone-preview {
  padding: 18px;
}

.phone-pair {
  width: 100%;
  display: grid;
  gap: 14px;
}

.phone-frame {
  width: min(100%, 290px);
  border-radius: 34px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px 16px 16px;
  position: relative;
}

.phone-frame.dark {
  background: #121c28;
  border-color: #223448;
  color: #edf4ff;
}

.phone-frame.dark .phone-header,
.phone-frame.dark .phone-topic {
  background: #203347;
  border-color: #30455d;
}

.phone-frame.dark .phone-kicker,
.phone-frame.dark .phone-player small,
.phone-frame.dark .phone-footer-meta small,
.phone-frame.dark .phone-status-card small {
  color: #9ab0c8;
}

.phone-frame.dark .phone-title,
.phone-frame.dark .phone-status-card strong {
  color: #edf4ff;
}

.phone-kicker {
  margin-top: 4px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--label-soft);
  text-align: center;
}

.phone-title {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.phone-scrollbar {
  position: absolute;
  right: 10px;
  top: 42px;
  bottom: 18px;
  width: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 58%, transparent);
  opacity: 0.8;
}

.phone-scrollbar .thumb {
  position: absolute;
  left: 0;
  right: 0;
  height: 42px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue) 62%, white);
}

.phone-scrollbar .thumb.top {
  top: 18px;
}

.phone-scrollbar .thumb.mid {
  top: 50%;
  transform: translateY(-50%);
}

.phone-topic {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 11px;
  color: var(--muted);
}

.phone-player-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}

.phone-player-row.solo {
  margin-top: 10px;
}

.phone-player {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 44px;
}

.phone-player span {
  width: 28px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(180deg, #87b9ff, #4f8dff);
  border: 1px solid #6ea4ff;
}

.phone-player span.manager {
  background: linear-gradient(180deg, #78acff, #377dff);
}

.phone-player small {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.phone-center-panel {
  margin-top: 14px;
  border-radius: 22px;
  background: #243d62;
  padding: 18px 14px;
  display: grid;
  place-items: center;
}

.phone-center-button {
  border-radius: 14px;
  background: #31465e;
  color: #fff;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 800;
}

.phone-status-card {
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid #26384b;
  background: #192738;
  padding: 14px 12px;
  text-align: center;
}

.phone-status-card strong {
  display: block;
  font-size: 13px;
}

.phone-status-card small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
}

.phone-footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.phone-footer-meta small {
  font-size: 10px;
  color: var(--muted);
}

.phone-header {
  width: 34%;
  height: 8px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--border);
}

.phone-card {
  border-radius: 24px;
  background: var(--surface-panel);
  border: 1px solid var(--border-soft);
  padding: 16px 14px;
}

.phone-votes {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
}

.phone-vote-column {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 48px;
}

.phone-vote-column small,
.phone-stat small {
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
}

.phone-bar {
  width: 8px;
  height: 54px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
}

.phone-bar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  border-radius: 999px;
  background: var(--blue);
}

.phone-bar.active::after {
  height: 30px;
}

.phone-card-value {
  width: 38px;
  height: 48px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
}

.phone-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  margin-bottom: 16px;
}

.phone-stat-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.phone-stat-value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.phone-gauge {
  width: 44px;
  height: 44px;
  margin-top: 8px;
  border-radius: 999px;
  border: 5px solid var(--green);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
}

.phone-gauge.blue {
  border-color: var(--blue);
}

.phone-accept-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.phone-pill {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
}

.phone-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.phone-deck {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.phone-deck.full {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.phone-deck span {
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.phone-frame.dark .phone-deck span {
  background: #1b2b3e;
  border-color: #304459;
  color: #edf4ff;
}

.phone-deck span.selected {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
  color: var(--blue);
}

.settings-preview {
  padding: 20px;
}

.settings-sheet {
  width: min(100%, 360px);
  border-radius: 28px;
  border: 1px solid var(--surface-settings-border);
  background: var(--surface-panel-strong);
  box-shadow: var(--shadow);
  padding: 18px 16px;
}

.settings-sheet.compact {
  width: 100%;
}

.settings-sheet-header {
  margin-bottom: 18px;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--text);
}

.settings-sheet-kicker {
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--label-soft);
}

.settings-sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 14px;
  border-radius: 18px;
  background: var(--surface-settings);
  border: 1px solid var(--surface-settings-border);
}

.settings-sheet-row + .settings-sheet-row {
  margin-top: 10px;
}

.settings-sheet-row span {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
}

.settings-sheet-row i {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-switch);
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
}

.settings-sheet-row i::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
}

.settings-sheet-row i.active {
  background: var(--blue);
}

.settings-sheet-row i.active::after {
  left: 23px;
}

.settings-phone,
.ui-phone {
  width: min(100%, 290px);
}

.settings-phone {
  width: min(100%, 334px);
  padding: 14px 12px 14px;
}

.settings-phone .phone-scrollbar {
  top: 40px;
  bottom: 16px;
}

.settings-sheet.compact {
  padding: 14px 12px;
}

.settings-sheet.compact .settings-sheet-header {
  margin-bottom: 14px;
}

.settings-sheet.compact .settings-sheet-row {
  padding: 11px 12px;
}

.settings-sheet.compact .settings-sheet-row span {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
}

.phone-top-controls,
.phone-ui-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.phone-top-controls {
  justify-content: flex-end;
}

.phone-chip,
.phone-ui-btn {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}

.phone-ui-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.phone-mini-brand {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
}

.phone-ui-title {
  font-size: 16px;
  font-weight: 800;
}

.phone-ui-badge {
  border-radius: 999px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: var(--blue-text);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}

.phone-ui-actions {
  margin-top: 14px;
}

.phone-ui-actions.secondary {
  margin-top: 10px;
  justify-content: flex-end;
}

.phone-icon-dot {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue-text);
  display: grid;
  place-items: center;
  font-size: 14px;
}

.phone-ui-note {
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: var(--surface-panel);
  padding: 14px 12px;
}

.phone-ui-note strong {
  display: block;
  font-size: 13px;
}

.phone-ui-note small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.marketing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 2px 0;
  flex-wrap: wrap;
}

.marketing-site-footer {
  margin-top: 6px;
  padding-bottom: 6px;
}

.legal-static-shell {
  padding-bottom: 48px;
}

.legal-static-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.legal-static-header h1 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.1;
}

.legal-static-article {
  padding: 28px;
}

.legal-static-article > p:first-child {
  margin-top: 0;
  color: var(--muted);
  line-height: 1.7;
}

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: var(--focus-ring);
}

.page {
  min-height: 100vh;
  padding: 16px 16px 140px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
}

.home-link-icon {
  text-decoration: none;
}

.title-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 34px;
  font-weight: 700;
  padding: 0;
}

.title-caret {
  font-size: 22px;
  color: var(--title-caret);
  transition: transform 0.16s ease;
}

.title-caret.open {
  transform: rotate(180deg);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-actions > .btn,
.toolbar-actions > .icon-btn,
.toolbar-actions > .locale-switcher {
  height: 38px;
}

.view-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.locale-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-width: 112px;
  padding: 0 14px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.locale-switcher::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}

.locale-switcher:focus-within {
  border-color: var(--blue);
  box-shadow: var(--focus-ring);
}

.locale-select {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0 18px 0 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  outline: none;
  cursor: pointer;
  border-radius: 999px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.badge.blue {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue-text);
}

.badge.green {
  background: var(--green-soft);
  border-color: var(--green-border);
  color: var(--green-text);
}

.badge.red {
  background: var(--red-soft);
  border-color: var(--red-border);
  color: var(--red);
}

.badge-button {
  height: 34px;
  padding: 0 12px;
  cursor: pointer;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  gap: 4px;
}

.segmented button {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  height: 30px;
  padding: 0 14px;
  border-radius: 14px;
}

.segmented button + button::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: color-mix(in srgb, var(--border) 82%, transparent);
}

.segmented button.active {
  background: var(--blue);
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--surface);
  color: var(--text);
  border-radius: 18px;
  padding: 0 16px;
  min-height: 38px;
  font-weight: 700;
  border: 1px solid var(--border);
  text-decoration: none;
  white-space: nowrap;
}

.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.btn.dark {
  background: var(--surface-contrast);
  border-color: var(--surface-contrast);
  color: var(--surface-contrast-text);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  padding: 0 12px;
  min-height: 32px;
  font-size: 13px;
  border-radius: 14px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue-text);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
}

.icon-btn:hover {
  background: var(--blue-soft-strong);
}

.icon-btn.primary-close {
  border-color: var(--blue-border-strong);
  background: var(--blue-soft-alt);
  color: var(--blue);
}

.icon-btn.primary-close:hover {
  background: var(--blue-soft-hover);
}

.theme-toggle {
  width: 38px;
  height: 38px;
}

.theme-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.layout-top {
  display: grid;
  gap: 16px;
}

.quick-note {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.subject {
  text-align: center;
  padding: 8px 0 0;
}

.subject-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  font-weight: 800;
  color: var(--label-soft);
}

.subject h1 {
  margin: 12px 0 10px;
  font-size: 40px;
  line-height: 1.15;
}

.subject p {
  margin: 0 auto;
  max-width: 760px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.subject .topic-input {
  max-width: 560px;
  margin: 18px auto 0;
}

.issue-strip {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 4px;
}

.pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.pill.done {
  background: var(--green-soft);
  border-color: var(--green-border);
  color: var(--green-text);
}

.board {
  max-width: 860px;
  margin: 34px auto 0;
}

.player-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 42px;
}

.player-row.bottom {
  gap: 88px;
}

.player-card {
  width: 120px;
  text-align: center;
  position: relative;
}

.player-card.spectator .player-name {
  color: var(--player-muted);
}

.vote-visual-wrap {
  position: relative;
  width: 58px;
  margin: 0 auto 10px;
}

.me-badge {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  left: -10px;
  top: -10px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.vote-visual {
  width: 58px;
  height: 82px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--surface-subtle-alt);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--vote-muted);
}

.vote-visual.voted-hidden {
  background-color: var(--blue);
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 6px);
  color: var(--blue);
  border-color: var(--blue);
}

.vote-visual.revealed {
  background: var(--surface);
  color: var(--blue);
  border-color: var(--blue);
}

.vote-visual.spectator {
  border-style: dashed;
  border-color: var(--spectator-border);
  background: var(--surface-subtle-2);
  color: var(--spectator-text);
}

.player-name {
  font-size: 20px;
  font-weight: 700;
}

.player-sub {
  margin-top: 6px;
  color: var(--label-soft);
  font-size: 12px;
  font-weight: 700;
}

.kick-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--surface-info-border);
  border-radius: 999px;
  background: var(--surface-kick);
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  z-index: 2;
}

.kick-btn:hover {
  background: var(--surface-kick-hover);
}

.center-panel {
  margin: 24px auto;
  max-width: 520px;
  padding: 30px 24px;
  border-radius: 32px;
  background: var(--blue-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.center-status {
  min-width: 280px;
  text-align: center;
  border-radius: 18px;
  padding: 14px 22px;
  background: var(--surface-contrast);
  color: var(--surface-contrast-text);
  font-size: 22px;
  font-weight: 800;
}

.results {
  max-width: 860px;
  margin: 34px auto 0;
  padding: 24px;
}

.results-grid {
  display: grid;
  gap: 24px;
}

.histogram {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.histogram-item {
  min-width: 64px;
  text-align: center;
}

.bar-wrap {
  height: 78px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.split-bar {
  width: 8px;
  height: 70px;
  border-radius: 999px;
  background: var(--surface-neutral-border);
  position: relative;
  overflow: hidden;
}

.split-bar-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--blue);
  border-radius: 999px;
}

.bar-card {
  margin-top: 10px;
  width: 54px;
  height: 60px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
}

.bar-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  min-width: 0;
}

.gauge-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.metric-note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.stat .label {
  color: var(--muted);
  font-size: 14px;
}

.stat .value {
  margin-top: 6px;
  font-size: 42px;
  font-weight: 800;
}

.gauge {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  position: relative;
}

.gauge-center {
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.accept-row {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history {
  max-width: 860px;
  margin: 18px auto 0;
  padding: 24px;
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.history-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-subtle);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  backdrop-filter: blur(2px);
  display: none;
}

.drawer-backdrop.open {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100vw, 420px);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.drawer-body {
  padding: 18px;
  overflow: auto;
}

.drawer-section {
  margin-bottom: 20px;
}

.drawer-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.helper-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.issue-list {
  display: grid;
  gap: 10px;
}

.issue-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  padding: 14px;
  text-align: left;
}

.issue-card.active {
  background: var(--blue-soft);
  border-color: var(--blue-border);
}

.issue-card.done {
  background: var(--green-soft);
  border-color: var(--green-border);
}

.kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--label-soft);
}

.label-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.bottom-dock {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  background: var(--surface-dock);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 10;
}

.bottom-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px 18px;
}

.bottom-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.deck {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 14px 2px 6px;
}

.deck.disabled {
  opacity: 0.9;
}

.vote-btn {
  width: 60px;
  height: 88px;
  border-radius: 18px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  flex: 0 0 auto;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.vote-btn:hover {
  background: var(--blue-soft-alt);
  border-color: var(--blue-border-strong);
  transform: translateY(-4px);
}

.vote-btn.selected {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft-alt);
  box-shadow: 0 12px 22px rgba(47, 128, 255, 0.18);
  transform: translateY(-12px);
}

.vote-btn.selected:hover {
  transform: translateY(-14px);
}

.deck.disabled .vote-btn,
.vote-btn:disabled {
  background: var(--surface-card-disabled);
  border-color: var(--surface-card-disabled-border);
  color: var(--surface-card-disabled-text);
  box-shadow: none;
  transform: none;
}

.spectator-toggle-active {
  background: var(--surface-hover);
  border-color: var(--surface-neutral-border);
  color: var(--surface-neutral-text);
}

.spectator-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inline-eye {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
}

.settings-anchor {
  position: relative;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.help-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.settings-flyout {
  display: none;
  position: fixed;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-panel);
  box-shadow: var(--shadow);
  padding: 18px;
  z-index: 31;
  overflow: auto;
}

.settings-flyout.open {
  display: block;
}

.settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settings-body {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.setting-row, .setting-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--surface-settings);
  border: 1px solid var(--surface-settings-border);
  font-size: 14px;
  font-weight: 700;
}

.setting-row.disabled, .setting-detail.disabled {
  opacity: 0.65;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 28px;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.switch-slider {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-switch);
  position: relative;
  transition: background-color 0.16s ease;
}

.switch-slider::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  box-shadow: 0 2px 8px rgba(22, 34, 48, 0.18);
  transition: transform 0.16s ease;
}

.switch input:checked + .switch-slider {
  background: var(--blue);
}

.switch input:checked + .switch-slider::after {
  transform: translateX(20px);
}

.counter-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.counter-value {
  min-width: 28px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.countdown-wrap {
  display: grid;
  place-items: center;
  gap: 8px;
}

.countdown-bubble {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #76adff, var(--blue));
  color: white;
  font-size: 42px;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(47, 128, 255, 0.24);
  animation: countdown-pop 0.8s ease;
}

.countdown-caption {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes countdown-pop {
  0% { transform: scale(0.6); opacity: 0; }
  40% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.info-tip {
  margin: 18px auto 0;
  max-width: 760px;
  border: 1px solid var(--surface-tip-border);
  background: var(--surface-tip);
  border-radius: 18px;
  padding: 14px 14px 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.info-tip-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--surface-tip-title);
}

.info-tip-text {
  margin-top: 4px;
  color: var(--surface-tip-text);
  font-size: 14px;
  line-height: 1.55;
}

.info-tip-close {
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: transparent;
  color: var(--surface-tip-close);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.info-tip-close:hover {
  background: var(--surface-tip-close-hover);
}

.lobby {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.legal-page-shell {
  width: min(100%, 1040px);
  display: grid;
  gap: 18px;
}

.legal-page-shell.compact {
  width: min(100%, 560px);
}

.site-footer {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 2px;
}

.footer-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.82;
  text-decoration: none;
  cursor: pointer;
  transition: color 120ms ease, opacity 120ms ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--text);
  opacity: 1;
}

.legal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay-strong);
  backdrop-filter: blur(10px);
  z-index: 70;
}

.legal-modal {
  position: fixed;
  z-index: 71;
  left: 50%;
  top: 50%;
  width: min(100% - 32px, 760px);
  max-height: min(84vh, 880px);
  transform: translate(-50%, -50%);
  border-radius: 28px;
  border: 1px solid var(--surface-settings-border);
  background: var(--surface-panel-strong);
  box-shadow: var(--shadow-strong);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.legal-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.legal-modal-header h2 {
  margin: 4px 0 0;
  font-size: 28px;
}

.legal-modal-body {
  padding: 22px 24px 26px;
  overflow-y: auto;
}

.legal-modal-body > p:first-child {
  margin-top: 0;
}

.legal-section + .legal-section {
  margin-top: 20px;
}

.legal-section h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.legal-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.legal-section p + p {
  margin-top: 10px;
}

.help-footer {
  display: flex;
  justify-content: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.lobby-shell {
  width: min(100%, 1040px);
  padding: 28px;
}

.home-shell {
  width: 100%;
  padding: 26px;
}

.home-card-content {
  width: 100%;
}

.lobby-grid {
  display: grid;
  gap: 24px;
}

.preview-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.preview-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 14px;
}

.p2p-config-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--surface-settings-border);
  border-radius: 22px;
  background: var(--surface-settings);
  display: grid;
  gap: 14px;
}

.p2p-config-grid {
  display: grid;
  gap: 14px;
}

.p2p-config-span-2 {
  grid-column: 1 / -1;
}

.p2p-warning-notice {
  border: 1px solid #e7c76a;
  background: #fff4c7;
  border-radius: 18px;
  padding: 14px 16px;
}

.p2p-warning-title {
  font-size: 13px;
  font-weight: 800;
  color: #8a5b00;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.p2p-warning-text {
  margin-top: 6px;
  color: #6f4d00;
  line-height: 1.55;
  font-size: 14px;
}

.timer-pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 13px;
  background: var(--surface-hover);
  color: var(--muted);
}

.timer-pill.warning {
  background: var(--red-soft);
  color: var(--red);
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@media (min-width: 900px) {
  .marketing-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) fit-content(320px);
    align-items: start;
    column-gap: 24px;
    row-gap: 12px;
    flex-wrap: nowrap;
  }

  .marketing-header .brand {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .marketing-header h1 {
    max-width: none;
  }

  .marketing-header-actions {
    align-items: flex-end;
    justify-self: end;
    min-width: 0;
  }

  .marketing-actions {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
  }

  .layout-top {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .results-grid.revealed {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: end;
  }

  .lobby-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }

  .p2p-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-hero {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
    align-items: stretch;
  }

  .marketing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phone-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 1024px) {
  .toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .brand {
    width: 100%;
    min-width: 0;
    gap: 12px;
  }

  .settings-anchor {
    min-width: 0;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .toolbar-actions > .btn,
  .toolbar-actions > .icon-btn,
  .toolbar-actions > .locale-switcher,
  .toolbar-actions > .segmented,
  .toolbar-actions > .help-anchor {
    flex: 0 0 auto;
  }

  .toolbar-actions > .segmented {
    order: 1;
  }

  .toolbar-actions > [data-action="toggle-timer"],
  .toolbar-actions > .badge.red,
  .toolbar-actions > .badge {
    order: 2;
  }

  .toolbar-actions > [data-action="copy-invite"] {
    order: 3;
  }

  .toolbar-actions > [data-action="toggle-drawer"] {
    order: 4;
  }

  .toolbar-actions > .locale-switcher {
    order: 5;
  }

  .toolbar-actions > .theme-toggle {
    order: 6;
  }

  .toolbar-actions > .help-anchor {
    order: 7;
  }

  .title-button {
    font-size: 28px;
    min-width: 0;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 20px;
  }

  .badge,
  .badge-button {
    max-width: 100%;
  }

  .badge-button,
  .badge {
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  .page {
    padding-bottom: 260px;
  }

  .marketing-header-actions {
    width: 100%;
    align-items: flex-start;
  }

  .marketing-header h1 {
    font-size: 28px;
  }

  .marketing-hero,
  .marketing-card,
  .marketing-section,
  .showcase-card,
  .legal-static-article {
    padding: 22px 18px;
  }

  .phone-frame,
  .settings-phone,
  .ui-phone {
    width: 100%;
  }

  .legal-modal {
    width: min(100% - 20px, 760px);
    max-height: 88vh;
    border-radius: 24px;
  }

  .legal-modal-header,
  .legal-modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .subject h1 {
    font-size: 30px;
  }

  .subject p {
    font-size: 16px;
  }

  .player-row {
    gap: 16px;
  }

  .player-row.bottom {
    gap: 24px;
  }

  .player-card {
    width: 92px;
  }

  .vote-visual,
  .vote-visual-wrap {
    width: 48px;
  }

  .vote-visual {
    height: 72px;
  }

  .player-name {
    font-size: 16px;
  }

  .stat .value {
    font-size: 34px;
  }

  .bottom-inner {
    padding: 14px 12px 14px;
  }

  .bottom-meta {
    gap: 10px;
    font-size: 13px;
    margin-bottom: 10px;
  }

  .deck {
    gap: 8px;
    overflow-x: visible;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0 2px;
  }

  .vote-btn {
    width: 52px;
    height: 76px;
    border-radius: 16px;
    font-size: 24px;
  }
}

@media (max-width: 420px) {
  .page {
    padding-bottom: 292px;
  }

  .bottom-inner {
    padding-left: 10px;
    padding-right: 10px;
  }

  .deck {
    gap: 6px;
  }

  .vote-btn {
    width: 46px;
    height: 68px;
    border-radius: 14px;
    font-size: 21px;
  }
}


.floating-backdrop {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay-strong);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 24;
}

.floating-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.help-flyout {
  display: none;
  position: fixed;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-panel-strong);
  box-shadow: var(--shadow-strong);
  padding: 18px;
  z-index: 31;
}

.help-flyout.open {
  display: block;
}

.help-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.help-section + .help-section {
  margin-top: 16px;
}

.help-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.help-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.help-section p + p {
  margin-top: 10px;
}

.help-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.55;
}

.feedback-form {
  display: grid;
  gap: 12px;
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
}

.seo-home-copy {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.seo-article {
  position: relative;
  padding: 22px 22px 20px;
}

.seo-article h2 {
  margin: 10px 0 10px;
  font-size: 28px;
  line-height: 1.2;
}

.seo-article p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
  max-width: 920px;
}

.seo-article p + p {
  margin-top: 10px;
}

.seo-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--surface-info-border);
  background: var(--surface-info);
  color: var(--blue-text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.seo-close:hover {
  background: var(--blue-soft-hover);
}

.home-seo-visible .lobby {
  min-height: auto;
  padding-top: 0;
}

@media (max-width: 720px) {
  .help-flyout {
    width: min(calc(100vw - 24px), 620px);
    max-height: calc(100vh - 96px);
  }

  .settings-flyout {
    width: min(calc(100vw - 24px), 460px);
  }
}

body.home-seo-visible {
  display: block;
}

body.home-seo-visible #app {
  width: 100%;
}

body.home-seo-visible .seo-home-copy {
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.home-stack {
  width: min(100%, 760px);
  display: grid;
  gap: 16px;
}

.home-info-card {
  position: relative;
  width: 100%;
  padding: 22px 22px 20px;
}

.home-info-card h2 {
  margin: 10px 0 10px;
  font-size: 28px;
  line-height: 1.2;
}

.home-info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.home-info-card p + p {
  margin-top: 10px;
}
