:root {
  --bg: #000000;
  --loader-bg: radial-gradient(110% 90% at 50% 10%, #162235 0%, #090d14 75%);
  --panel: rgba(19, 25, 38, 0.86);
  --panel-border: rgba(255, 255, 255, 0.11);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-light: #38bdf8;
  --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
  --accent-text: #04121f;
  --emerald: #34d399;
  --emerald-bg: rgba(52, 211, 153, 0.18);
  --warn: #f59e0b;
  --err: #f87171;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

/* ---- Stage & Canvas --------------------------------------------------- */
#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: #000;
  overflow: hidden;
}

#canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  outline: none;
  touch-action: none;
}

#stage.fixed-aspect {
  display: flex;
  align-items: center;
  justify-content: center;
}
#stage.fixed-aspect #canvas {
  flex: none;
  width: min(100vw, 100dvh * 16 / 9);
  height: min(100dvh, 100vw * 9 / 16);
}

/* Completely suppress any bottom touch layer or legacy toasts */
.touch, #start-screen-hint {
  display: none !important;
}

/* ---- Overlays & Modals ------------------------------------------------ */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  overflow-y: auto;
  background: var(--loader-bg);
}

.overlay::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 350px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.overlay-modal {
  z-index: 30;
  background: rgba(5, 8, 14, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.overlay-modal::before { display: none; }

#error { z-index: 40; }

/* ---- Startup Screen (2-Column Glass Card) ----------------------------- */
.startup-card {
  display: grid;
  grid-template-columns: minmax(250px, 0.92fr) minmax(0, 1.25fr);
  gap: 32px;
  width: 100%;
  max-width: 860px;
  padding: 36px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(14, 165, 233, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  animation: cardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 760px) {
  .startup-card {
    grid-template-columns: 1fr;
    max-width: 100%;
    padding: 20px;
    gap: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }
  .player-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .qr-img,
  .qr-spinner {
    width: min(180px, 55vw) !important;
    height: min(180px, 55vw) !important;
  }
}

/* Columns: Launch & Status */
.startup-col {
  min-width: 0;
}

.startup-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-header {
  margin-bottom: 20px;
}

.wii-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.wii-svg {
  color: #ffffff;
  display: block;
}

.sports-badge {
  background: var(--accent-gradient);
  color: #04121f;
  font-style: italic;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Progress / CTA Launch Area */
.launch-box {
  margin: 24px 0;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: inherit;
  transition: width 0.18s ease-out;
}

.bar.indeterminate .bar-fill {
  width: 35%;
  animation: barSlide 1.2s ease-in-out infinite;
}

@keyframes barSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

.status {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 1.3em;
}

.btn-play-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.btn-play-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.45);
}

.btn-play-cta:active {
  transform: translateY(1px);
}

.btn-play-cta:focus,
.btn-play-cta:focus-visible,
#btn-start:focus,
#btn-start:focus-visible {
  outline: none;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35), 0 0 0 2px rgba(56, 189, 248, 0.55);
}

.startup-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 500;
  user-select: none;
  white-space: nowrap;
}

.hint-chip svg {
  flex-shrink: 0;
  color: var(--accent-light);
}

/* Right Column: Scan to Join Card */
.startup-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(11, 15, 24, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.qr-title-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 8px;
}

.qr-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
  gap: 8px;
  min-width: 0;
}

.qr-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
}

.qr-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
  transition: background 0.2s, box-shadow 0.2s;
}

.status-dot.active,
.status-dot.online {
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}

.qr-frame-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.qr-frame {
  background: #ffffff;
  padding: 12px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-img {
  width: 180px;
  height: 180px;
  display: block;
  object-fit: contain;
}

.qr-spinner {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 500;
}

.qr-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.room-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.22);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.room-code-pill strong {
  color: var(--accent-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.qr-url-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 14px;
  min-width: 0;
}

.url-display {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  color: #7dd3fc;
  text-decoration: none;
  max-width: calc(100% - 38px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.15s ease;
}

.url-display:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.4);
  color: #bae6fd;
}

.btn-copy-url {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 7px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.08);
  color: #7dd3fc;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-copy-url:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.45);
  color: #ffffff;
}

.btn-copy-url.copied {
  background: var(--emerald-bg);
  border-color: rgba(52, 211, 153, 0.5);
  color: var(--emerald);
}

.btn-copy-url .copy-check {
  font-size: 0.85rem;
  font-weight: 700;
}

.player-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.player-slot {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.75rem;
  min-width: 0;
  overflow: hidden;
  transition: all 0.2s;
}

.player-slot strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
}

.player-slot.active strong,
.player-slot.is-local strong {
  color: var(--accent-light);
}

.player-slot.is-phone {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.45);
}

.player-slot.is-phone strong {
  color: var(--emerald);
}

.player-slot.is-phone [data-player-state] {
  background: var(--emerald-bg);
  color: var(--emerald);
}

.player-slot.is-local {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.35);
}

.player-slot.is-local [data-player-state] {
  background: rgba(14, 165, 233, 0.2);
  color: var(--accent-light);
}

.player-slot.is-open [data-player-state] {
  background: rgba(255, 255, 255, 0.04);
  color: #64748b;
}

.player-state {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.state-kbm {
  background: rgba(14, 165, 233, 0.2);
  color: var(--accent-light);
}

.state-phone {
  background: var(--emerald-bg);
  color: var(--emerald);
}

.state-empty {
  background: rgba(255, 255, 255, 0.04);
  color: #64748b;
}

/* ---- In-Game Top-Right Toolbar (ONLY 2 Buttons) ----------------------- */
.toolbar {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 20;
  display: flex;
  gap: 10px;
  opacity: 1;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toolbar:hover, .toolbar:focus-within {
  opacity: 1;
  pointer-events: auto;
}

.toolbar.idle:not(:hover):not(:focus-within) {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(19, 25, 38, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  color: #f1f5f9;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toolbar-btn:hover {
  background: rgba(26, 36, 56, 0.92);
  border-color: rgba(14, 165, 233, 0.55);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.25);
}

.toolbar-btn.has-phones {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.25);
}

.toolbar-btn.has-phones svg {
  color: var(--emerald);
}

.toolbar-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--emerald);
  color: #022c22;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

/* ---- Modals: Unified Design ------------------------------------------ */
.panel,
.panel-modal {
  min-width: 0;
  width: 100%;
  padding: 26px;
  background: rgba(19, 25, 38, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(14, 165, 233, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: cardFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-wiimote {
  max-width: 440px;
}

.modal-settings {
  max-width: 480px;
}

.modal-error {
  max-width: 680px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-row h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.btn-icon-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.modal-qr-header {
  margin-bottom: 14px;
}

.modal-url-row {
  justify-content: center;
  margin-bottom: 16px;
}

.modal-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: left;
}

/* Settings Modal Specifics */
.settings-section {
  margin-bottom: 20px;
}

.settings-section-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.settings-grid-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-action-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  color: #f1f5f9;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-action-card:hover {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.45);
  color: var(--accent-light);
  transform: translateY(-1px);
}

.settings-action-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.controls-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.control-input kbd {
  display: inline-block;
  padding: 3px 8px;
  background: #0f172a;
  border: 1px solid #334155;
  border-bottom: 2px solid #475569;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.control-desc {
  color: var(--text-muted);
  font-weight: 500;
}

.advanced-details {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  margin-top: 16px;
}

.advanced-details summary {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.advanced-details summary:hover {
  color: #f1f5f9;
}

.advanced-content {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.advanced-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-room-rotate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.room-code-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--accent-light);
  background: rgba(14, 165, 233, 0.14);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.advanced-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hint {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0;
}

.qr-config-row {
  display: flex;
  gap: 8px;
}

.qr-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f172a;
  color: #ffffff;
  font: inherit;
  font-size: 0.82rem;
}

.qr-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Button & Chip helpers */
.chip {
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent-gradient);
  color: #04121f;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
  transition: filter 0.15s, box-shadow 0.15s;
}

.primary:hover {
  filter: brightness(1.08);
}

.primary:focus,
.primary:focus-visible {
  outline: none;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35), 0 0 0 2px rgba(56, 189, 248, 0.55);
}

/* Error overlay */
.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.notice-error {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

#error-summary {
  white-space: pre-line;
  max-height: 35vh;
  overflow-y: auto;
  margin: 10px 0;
}

.details {
  display: block;
  width: 100%;
  height: min(35vh, 280px);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: #090d14;
  color: #e2e8f0;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  resize: vertical;
  white-space: pre;
  overflow: auto;
  margin: 10px 0 16px;
}

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

/* Compatibility checklist */
.checks {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.checks li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.9rem;
}
.checks .mark {
  flex: none;
  width: 1.2em;
  text-align: center;
  font-weight: 700;
}
.checks .ok .mark { color: var(--emerald); }
.checks .fail .mark { color: var(--err); }
.checks .detail { color: var(--text-muted); font-size: 0.8rem; }

/* Optional product list */
.product-heading { font-size: 1rem; margin: 0 0 10px; color: var(--text-muted); font-weight: 600; }
.products { display: grid; gap: 8px; margin-bottom: 8px; }
.product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.product:hover { border-color: var(--accent); }
