:root {
  --bg: #07101d;
  --bg-soft: #0b1727;
  --panel: rgba(14, 27, 44, 0.92);
  --panel-strong: #111f32;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f7fb;
  --muted: #91a0b6;
  --accent: #ffb547;
  --accent-strong: #ff8e3c;
  --blue: #58a6ff;
  --green: #54d49a;
  --danger: #ff6b70;
  --light-square: #dbe6ef;
  --dark-square: #6d89a5;
  --light-square-alt: #cbd9e4;
  --dark-square-alt: #55728f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 4%, rgba(88, 166, 255, 0.13), transparent 30%),
    radial-gradient(circle at 18% 85%, rgba(255, 181, 71, 0.08), transparent 28%),
    var(--bg);
}
button, select { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible { outline: 3px solid rgba(88, 166, 255, 0.55); outline-offset: 2px; }
.hidden { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 30px 22px 24px;
  display: flex; flex-direction: column; border-right: 1px solid var(--line);
  background: rgba(5, 13, 24, 0.82); backdrop-filter: blur(18px); z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; margin-bottom: 38px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong)); color: #1a1208; font-size: 28px;
  box-shadow: 0 12px 30px rgba(255, 142, 60, 0.24);
}
.brand-copy { display: flex; align-items: baseline; letter-spacing: -0.4px; }
.brand-copy strong { font-size: 18px; }
.brand-copy small { color: var(--accent); font-size: 13px; font-weight: 800; }
.nav-list { display: grid; gap: 8px; }
.nav-item {
  width: 100%; min-height: 48px; border: 1px solid transparent; border-radius: 13px;
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px;
  padding: 0 13px; color: var(--muted); background: transparent; cursor: pointer; text-align: left;
}
.nav-item span { font-size: 19px; text-align: center; }
.nav-item b { font-size: 14px; }
.nav-item em { font-size: 9px; font-style: normal; text-transform: uppercase; letter-spacing: 0.8px; color: var(--blue); }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--text); border-color: rgba(255,181,71,0.18); background: linear-gradient(90deg, rgba(255,181,71,0.14), rgba(255,181,71,0.03)); }
.nav-item.active span { color: var(--accent); }
.sidebar-card {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 13px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 14px;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(84,212,154,0.1); }
.sidebar-card div { display: grid; gap: 3px; }
.sidebar-card strong { font-size: 12px; }
.sidebar-card small, .sidebar-footer { color: var(--muted); font-size: 10px; line-height: 1.5; }
.install-button { margin-top: 12px; padding: 11px; border-radius: 12px; border: 1px solid rgba(255,181,71,0.28); background: rgba(255,181,71,0.1); color: var(--accent); cursor: pointer; font-weight: 800; }
.sidebar-footer { margin-top: 16px; }

.main-content { min-width: 0; padding: 34px clamp(24px, 4vw, 64px) 48px; }
.topbar { max-width: 1340px; margin: 0 auto 30px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: 1.8px; }
h1 { margin: 0; font-size: clamp(27px, 3vw, 42px); line-height: 1.05; letter-spacing: -1.7px; }
h1 span { color: var(--muted); font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.icon-button {
  width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); cursor: pointer; color: var(--muted); font-weight: 800;
}
.profile-pill { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); padding: 6px 12px 6px 6px; border-radius: 15px; cursor: pointer; }
.profile-pill > span:first-child { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #3a74a4, #20466d); font-size: 11px; font-weight: 900; }
.profile-copy { display: grid; gap: 2px; text-align: left; }
.profile-copy strong { font-size: 12px; }
.profile-copy small { color: var(--muted); font-size: 9px; }

.game-layout { max-width: 1340px; margin: 0 auto; display: grid; grid-template-columns: minmax(520px, 760px) minmax(320px, 390px); gap: clamp(26px, 4vw, 56px); align-items: start; }
.arena-column { min-width: 0; }
.player-strip { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 9px 3px; }
.avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 14px; font-weight: 900; }
.bot-avatar { color: #0b1624; background: linear-gradient(145deg, #dbe7f2, #91aac2); }
.user-avatar { background: linear-gradient(145deg, #3a74a4, #20466d); }
.player-meta { display: grid; gap: 4px; }
.player-meta strong { font-size: 14px; }
.player-meta small { color: var(--muted); font-size: 11px; }
.clock { min-width: 92px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,0.04); text-align: center; font-size: 21px; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.clock.active { color: #17130d; background: linear-gradient(145deg, var(--accent), #ffd085); border-color: transparent; box-shadow: 0 8px 28px rgba(255,181,71,0.2); }
.clock.low { color: white; background: var(--danger); border-color: transparent; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.74; } }
.board-frame { position: relative; width: 100%; aspect-ratio: 1; border-radius: 20px; padding: 9px; background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.035)); box-shadow: var(--shadow); }
.chessboard { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); overflow: hidden; border-radius: 14px; touch-action: manipulation; user-select: none; }
.square { position: relative; display: grid; place-items: center; border: none; padding: 0; cursor: pointer; overflow: hidden; }
.square.light { background: var(--light-square); }
.square.dark { background: var(--dark-square); }
.square:hover::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,0.1); }
.square.selected::after { content: ""; position: absolute; inset: 0; background: rgba(255,181,71,0.46); box-shadow: inset 0 0 0 4px rgba(255,181,71,0.86); }
.square.last-move::after { content: ""; position: absolute; inset: 0; background: rgba(255,215,72,0.28); }
.square.in-check::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,45,67,0.76), rgba(255,45,67,0.18)); }
.square.legal::before { content: ""; position: absolute; z-index: 2; width: 24%; height: 24%; border-radius: 50%; background: rgba(18, 33, 49, 0.36); }
.square.capture::before { content: ""; position: absolute; z-index: 2; inset: 9%; border: 5px solid rgba(18,33,49,0.34); border-radius: 50%; }
.piece { position: relative; z-index: 4; font-family: "Arial Unicode MS", "Segoe UI Symbol", serif; font-size: clamp(34px, 5.5vw, 70px); line-height: 1; filter: drop-shadow(0 4px 2px rgba(0,0,0,0.2)); transition: transform 120ms ease; }
.square:hover .piece { transform: translateY(-1px); }
.piece.white { color: #f8fbff; -webkit-text-stroke: 1px rgba(14,30,47,0.75); text-shadow: 0 2px 0 rgba(0,0,0,0.18); }
.piece.black { color: #18293c; -webkit-text-stroke: 1px rgba(244,249,255,0.18); text-shadow: 0 2px 0 rgba(255,255,255,0.1); }
.coord { position: absolute; z-index: 5; font-size: clamp(8px, 0.9vw, 11px); font-weight: 900; opacity: 0.56; pointer-events: none; }
.coord.rank { top: 4px; left: 5px; }
.coord.file { right: 5px; bottom: 3px; }
.square.light .coord { color: var(--dark-square-alt); }
.square.dark .coord { color: #e7f0f7; }
.thinking-badge { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 999px; background: rgba(7,16,29,0.9); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,0.25); font-size: 11px; font-weight: 800; }
.thinking-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 0.75s infinite; }
.quick-stats { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; margin-top: 15px; }
.quick-stats div { padding: 14px 15px; background: rgba(255,255,255,0.035); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 4px; }
.quick-stats strong { font-size: 12px; }
.quick-stats small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px; }

.control-panel { position: sticky; top: 26px; min-height: 640px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.panel-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.panel-tab { min-height: 55px; border: none; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 800; }
.panel-tab.active { color: var(--text); border-bottom-color: var(--accent); background: rgba(255,255,255,0.025); }
.panel-content { display: none; padding: 27px; }
.panel-content.active { display: block; }
.section-heading { min-height: 50px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-heading p { margin: 0 0 5px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 1.3px; }
.section-heading h2 { margin: 0; font-size: 20px; letter-spacing: -0.5px; }
.segmented-control { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 22px; }
.mode-button { min-height: 66px; padding: 9px 6px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,0.025); color: var(--muted); cursor: pointer; display: grid; place-items: center; gap: 2px; font-size: 10px; font-weight: 800; }
.mode-button span { color: var(--blue); font-size: 17px; }
.mode-button em { color: var(--blue); font-size: 7px; font-style: normal; letter-spacing: 0.8px; text-transform: uppercase; }
.mode-button.active { border-color: rgba(255,181,71,0.5); background: rgba(255,181,71,0.09); color: var(--text); }
.mode-button.active span { color: var(--accent); }
.mode-button.locked { opacity: 0.6; }
.field-label { display: block; margin: 16px 0 7px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 1.15px; }
.select-field { width: 100%; min-height: 45px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: #102034; color: var(--text); cursor: pointer; font-size: 12px; }
.primary-button, .secondary-button { width: 100%; min-height: 49px; border-radius: 13px; font-weight: 900; cursor: pointer; }
.primary-button { margin-top: 21px; border: none; color: #17120a; background: linear-gradient(145deg, var(--accent), var(--accent-strong)); box-shadow: 0 12px 30px rgba(255,142,60,0.2); }
.primary-button span { margin-right: 8px; }
.secondary-button { margin-top: 9px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); }
.action-grid { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action-grid button { min-height: 42px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,0.03); color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 800; }
.action-grid button:hover { color: var(--text); border-color: rgba(255,255,255,0.18); }
.action-grid span { margin-right: 5px; color: var(--blue); }
.feature-card { display: flex; gap: 11px; margin-top: 18px; padding: 14px; border: 1px solid rgba(88,166,255,0.16); border-radius: 13px; background: rgba(88,166,255,0.055); }
.feature-icon { flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(88,166,255,0.14); color: var(--blue); font-size: 10px; font-weight: 900; }
.feature-card strong { font-size: 11px; }
.feature-card p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.text-button { border: none; background: transparent; color: var(--accent); cursor: pointer; font-size: 10px; font-weight: 900; }
.move-list { max-height: 510px; overflow: auto; padding-right: 4px; }
.empty-state { padding: 50px 16px; text-align: center; color: var(--muted); font-size: 12px; border: 1px dashed var(--line); border-radius: 14px; }
.move-row { display: grid; grid-template-columns: 34px 1fr 1fr; min-height: 40px; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.055); font-size: 12px; }
.move-number { color: var(--muted); font-size: 9px; }
.move-san { font-weight: 800; }
.coach-card { text-align: center; padding: 28px 20px; border: 1px solid rgba(255,181,71,0.18); border-radius: 18px; background: linear-gradient(145deg, rgba(255,181,71,0.09), rgba(255,255,255,0.02)); }
.coach-orb { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, var(--accent), var(--accent-strong)); color: #21170b; font-size: 21px; box-shadow: 0 10px 30px rgba(255,181,71,0.2); }
.coach-card h3 { margin: 0 0 9px; font-size: 16px; }
.coach-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.coach-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.coach-metrics div { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,0.03); display: grid; gap: 5px; }
.coach-metrics small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.coach-metrics strong { font-size: 18px; }
.roadmap-strip { max-width: 1340px; margin: 42px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.roadmap-strip div { position: relative; padding: 18px 15px 17px 48px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,0.025); display: grid; gap: 4px; }
.roadmap-strip span { position: absolute; left: 15px; top: 18px; color: var(--accent); font-size: 10px; font-weight: 900; }
.roadmap-strip strong { font-size: 11px; }
.roadmap-strip small { color: var(--muted); font-size: 9px; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(3,9,17,0.78); backdrop-filter: blur(10px); }
.modal-card { width: min(420px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-strong); box-shadow: var(--shadow); text-align: center; }
.modal-card h2 { margin: 0 0 20px; }
.promotion-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.promotion-choices button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,0.04); font-family: "Segoe UI Symbol", serif; font-size: 44px; cursor: pointer; }
.promotion-choices button:hover { border-color: var(--accent); background: rgba(255,181,71,0.08); }
.result-icon { width: 66px; height: 66px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 20px; background: linear-gradient(145deg, var(--accent), var(--accent-strong)); color: #20160b; font-size: 40px; }
.result-card p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.6; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 200; transform: translate(-50%, 120px); opacity: 0; padding: 12px 17px; border: 1px solid var(--line); border-radius: 999px; background: #122238; box-shadow: var(--shadow); color: var(--text); font-size: 11px; font-weight: 800; transition: 220ms ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 84px minmax(0, 1fr); }
  .sidebar { padding: 26px 14px; align-items: center; }
  .brand-copy, .nav-item b, .nav-item em, .sidebar-card div, .sidebar-footer, .install-button { display: none; }
  .brand { margin-bottom: 32px; }
  .nav-item { width: 50px; grid-template-columns: 1fr; padding: 0; }
  .nav-item span { font-size: 20px; }
  .sidebar-card { padding: 14px; }
  .game-layout { grid-template-columns: minmax(450px, 1fr) minmax(300px, 350px); gap: 28px; }
}

@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: auto 0 0 0; width: 100%; height: 68px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); flex-direction: row; justify-content: center; border-right: none; border-top: 1px solid var(--line); z-index: 60; }
  .brand, .sidebar-card, .sidebar-footer, .install-button { display: none; }
  .nav-list { width: min(560px, 100%); grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
  .nav-item { width: auto; min-width: 0; height: 48px; min-height: 48px; grid-template-columns: 1fr; place-items: center; border-radius: 12px; }
  .nav-item b, .nav-item em { display: none; }
  .main-content { padding: 24px 18px 100px; }
  .game-layout { display: block; }
  .control-panel { position: static; min-height: auto; margin-top: 26px; }
  .roadmap-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .topbar { align-items: flex-start; }
  .topbar-actions { gap: 7px; }
  .profile-copy { display: none; }
  .profile-pill { padding-right: 6px; }
  h1 { font-size: 28px; }
  .board-frame { border-radius: 15px; padding: 5px; }
  .chessboard { border-radius: 11px; }
  .piece { font-size: clamp(31px, 11vw, 50px); }
  .player-strip { grid-template-columns: 38px 1fr auto; gap: 9px; }
  .avatar { width: 36px; height: 36px; border-radius: 11px; }
  .clock { min-width: 76px; padding: 9px 10px; font-size: 18px; }
  .quick-stats { grid-template-columns: 1.2fr 1fr; }
  .quick-stats div:last-child { display: none; }
  .panel-content { padding: 22px 18px; }
  .roadmap-strip { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────
   ChessBreaker.ai Venture Prototype v2
   ───────────────────────────────────────────────────────────── */
.brand-button { border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; }
.view-shell { min-width: 0; }
.app-view { display: none; min-width: 0; padding: 34px clamp(24px, 4vw, 64px) 56px; }
.app-view.active { display: block; animation: viewIn 220ms ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.card-surface { background: linear-gradient(145deg, rgba(17,31,50,.96), rgba(10,23,39,.92)); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 18px 55px rgba(0,0,0,.22); }
.card-surface h2, .card-surface h3 { margin-top: 0; }
.compact-heading { margin-bottom: 18px; }
.time-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 62px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(255,181,71,.25); background: rgba(255,181,71,.08); color: var(--accent); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.momentum-card { margin-top: auto; }

/* Home */
.dashboard-grid { max-width: 1340px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 20px; }
.breakthrough-hero { grid-column: 1 / -1; min-height: 310px; padding: clamp(26px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 34px; align-items: center; position: relative; overflow: hidden; }
.breakthrough-hero::before { content: ""; position: absolute; inset: -40% auto auto 55%; width: 540px; height: 540px; border-radius: 50%; background: radial-gradient(circle, rgba(88,166,255,.18), transparent 68%); pointer-events: none; }
.breakthrough-hero::after { content: "♞"; position: absolute; right: 9%; top: -52px; font-size: 360px; line-height: 1; opacity: .028; transform: rotate(10deg); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; max-width: 730px; }
.hero-copy h2 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 56px); line-height: 1.02; letter-spacing: -2px; }
.hero-copy > p:not(.eyebrow) { max-width: 690px; margin: 0; color: #b1bfd1; font-size: 16px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.hero-actions .primary-button, .hero-actions .secondary-button { width: auto; min-width: 210px; }
.breakthrough-score { position: relative; z-index: 2; width: 210px; height: 210px; margin: auto; display: grid; place-items: center; }
.breakthrough-score svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.score-track, .score-arc { fill: none; stroke-width: 9; }
.score-track { stroke: rgba(255,255,255,.08); }
.score-arc { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: 100.5; filter: drop-shadow(0 0 9px rgba(255,181,71,.3)); transition: stroke-dashoffset 600ms ease; }
.breakthrough-score > div { display: grid; place-items: center; gap: 5px; }
.breakthrough-score strong { font-size: 52px; letter-spacing: -2px; }
.breakthrough-score small { max-width: 86px; text-align: center; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .8px; line-height: 1.4; }
.daily-plan, .diagnosis-card, .momentum-panel, .viral-card { padding: 25px; }
.plan-list { display: grid; gap: 9px; }
.plan-step { width: 100%; min-height: 72px; display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 12px 13px; border-radius: 15px; border: 1px solid var(--line); background: rgba(255,255,255,.025); text-align: left; cursor: pointer; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.plan-step:hover { border-color: rgba(255,181,71,.28); background: rgba(255,181,71,.055); transform: translateY(-1px); }
.plan-step.done { background: rgba(84,212,154,.07); border-color: rgba(84,212,154,.2); }
.step-index { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,181,71,.11); color: var(--accent); font-weight: 900; }
.plan-step.done .step-index { background: rgba(84,212,154,.14); color: var(--green); }
.plan-step > span:nth-child(2) { display: grid; gap: 5px; }
.plan-step strong { font-size: 13px; }
.plan-step small { color: var(--muted); font-size: 10px; }
.step-state { color: var(--accent); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.plan-step.done .step-state { color: var(--green); }
.diagnosis-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .82fr); gap: 24px; }
.dna-bars { display: grid; gap: 14px; }
.dna-bars > div { display: grid; grid-template-columns: 112px 1fr 26px; align-items: center; gap: 10px; }
.dna-bars span { color: #c4cfdb; font-size: 10px; }
.dna-bars b, .skill-grid b { height: 7px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.dna-bars i, .skill-grid i { display: block; width: var(--score); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--accent)); }
.dna-bars strong { font-size: 10px; color: var(--muted); text-align: right; }
.coach-diagnosis { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 16px; border-radius: 16px; background: rgba(88,166,255,.07); border: 1px solid rgba(88,166,255,.16); }
.coach-diagnosis > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: rgba(88,166,255,.15); color: #86c1ff; font-size: 10px; font-weight: 900; }
.coach-diagnosis p { margin: 0; color: #aebed0; font-size: 11px; line-height: 1.65; }
.coach-diagnosis strong { color: var(--text); }
.momentum-panel { min-height: 260px; }
.streak-number { color: var(--accent); font-size: 20px; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin: 18px 0 22px; }
.day-dot { min-width: 0; display: grid; gap: 7px; place-items: center; }
.day-dot span { width: 100%; aspect-ratio: 1; max-width: 39px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.045); border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 900; }
.day-dot.active span { background: linear-gradient(145deg, var(--accent), var(--accent-strong)); color: #1d1308; border-color: transparent; box-shadow: 0 8px 20px rgba(255,142,60,.15); }
.day-dot small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.micro-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.micro-stats div { display: grid; gap: 4px; padding: 12px; border-radius: 13px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.micro-stats strong { font-size: 18px; }
.micro-stats small { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .6px; }
.viral-card { grid-column: 1 / -1; display: grid; grid-template-columns: 58px 1fr auto; gap: 18px; align-items: center; }
.viral-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(145deg, rgba(255,181,71,.2), rgba(255,142,60,.08)); color: var(--accent); font-size: 24px; }
.viral-card h2 { margin: 0 0 6px; font-size: 20px; }
.viral-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 11px; }
.viral-card .secondary-button { width: auto; min-width: 168px; }

/* Training */
.training-layout { max-width: 1340px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.training-main { min-height: 650px; padding: clamp(24px, 4vw, 40px); }
.training-header { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; }
.training-header h2 { margin-bottom: 8px; font-size: clamp(25px, 3vw, 38px); }
.training-header > div > p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.6; }
.xp-pill { min-width: 82px; padding: 12px; border-radius: 15px; background: rgba(255,181,71,.08); border: 1px solid rgba(255,181,71,.2); display: grid; place-items: center; gap: 2px; }
.xp-pill strong { color: var(--accent); font-size: 24px; }
.xp-pill small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.scenario-card { margin-top: 28px; display: grid; grid-template-columns: minmax(260px, .82fr) minmax(300px, 1.18fr); gap: 30px; padding: 22px; border-radius: 20px; background: rgba(0,0,0,.14); border: 1px solid var(--line); }
.scenario-board { width: 100%; max-width: 380px; margin: auto; aspect-ratio: 1; border-radius: 17px; padding: 7px; background: rgba(255,255,255,.07); }
.mini-board { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(8,1fr); grid-template-rows: repeat(8,1fr); overflow: hidden; border-radius: 12px; }
.mini-square { display: grid; place-items: center; font-family: "Arial Unicode MS", "Segoe UI Symbol", serif; font-size: clamp(24px, 3.4vw, 46px); line-height: 1; }
.mini-square.light { background: var(--light-square); }
.mini-square.dark { background: var(--dark-square); }
.mini-square.white-piece { color: #f8fbff; -webkit-text-stroke: 1px rgba(14,30,47,.75); }
.mini-square.black-piece { color: #18293c; -webkit-text-stroke: 1px rgba(244,249,255,.18); }
.scenario-prompt { align-self: center; }
.scenario-label { color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: 1.2px; }
.scenario-prompt h3 { margin: 10px 0 18px; font-size: 22px; line-height: 1.35; }
.answer-grid { display: grid; gap: 9px; }
.answer-button { width: 100%; min-height: 47px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.035); text-align: left; color: #c6d1dd; cursor: pointer; }
.answer-button:hover { border-color: rgba(88,166,255,.28); background: rgba(88,166,255,.055); }
.answer-button.correct { border-color: rgba(84,212,154,.45); background: rgba(84,212,154,.1); color: #d6ffed; }
.answer-button.wrong { border-color: rgba(255,107,112,.4); background: rgba(255,107,112,.08); color: #ffdfe0; }
.answer-feedback { margin-top: 12px; padding: 12px 13px; border-radius: 12px; background: rgba(84,212,154,.08); border: 1px solid rgba(84,212,154,.18); color: #c4f6df; font-size: 11px; line-height: 1.55; }
.drill-progress { height: 7px; margin: 24px 0 16px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.06); }
.drill-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--blue),var(--accent)); transition: width 250ms ease; }
.training-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.training-actions .primary-button { width: auto; min-width: 150px; }
.training-actions .primary-button:disabled { opacity: .45; cursor: not-allowed; }
.training-sidebar { display: grid; gap: 16px; position: sticky; top: 24px; }
.compact-card { padding: 22px; }
.compact-card h3 { margin-bottom: 16px; }
.route-list { display: grid; gap: 8px; }
.route-step { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.route-step > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.05); font-size: 10px; font-weight: 900; }
.route-step > div { display: grid; gap: 3px; }
.route-step strong { font-size: 11px; color: #cbd5df; }
.route-step small { font-size: 9px; color: var(--muted); }
.route-step em { font-size: 8px; font-style: normal; text-transform: uppercase; letter-spacing: .6px; }
.route-step.active { border-color: rgba(255,181,71,.2); background: rgba(255,181,71,.07); }
.route-step.active > span { color: #1b1309; background: var(--accent); }
.route-step.done > span { color: #082016; background: var(--green); }
.coach-note-card { color: var(--muted); line-height: 1.65; }
.coach-note-card .coach-orb { margin-bottom: 12px; }
.coach-note-card p { margin: 6px 0 0; font-size: 11px; }
.coach-note-card strong { color: var(--text); }

/* Review */
.review-layout { max-width: 1340px; margin: 0 auto; display: grid; grid-template-columns: minmax(360px,.76fr) minmax(470px,1.24fr); gap: 20px; align-items: start; }
.review-import, .review-result, .recent-games { padding: clamp(22px, 3vw, 30px); }
.review-import h2 { margin: 0 0 8px; }
.review-import > div > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.review-import textarea { width: 100%; min-height: 250px; margin: 20px 0 13px; resize: vertical; border: 1px solid var(--line); border-radius: 15px; background: rgba(2,8,15,.48); color: #dce7f1; padding: 15px; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.import-actions { display: flex; gap: 9px; }
.import-actions .primary-button, .file-button { flex: 1; }
.file-button { display: grid; place-items: center; min-height: 49px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.035); color: #c9d4df; font-size: 11px; font-weight: 800; cursor: pointer; }
.file-button input { display: none; }
.privacy-note, .analysis-disclaimer { color: var(--muted); font-size: 9px; line-height: 1.5; }
.privacy-note { margin: 14px 0 0; }
.review-result { min-height: 526px; display: grid; }
.empty-review { place-self: center; max-width: 420px; display: grid; place-items: center; text-align: center; }
.empty-review > span { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 20px; background: rgba(88,166,255,.09); border: 1px solid rgba(88,166,255,.2); color: var(--blue); font-size: 28px; }
.empty-review h3 { margin: 18px 0 8px; font-size: 22px; }
.empty-review p { margin: 0 0 18px; color: var(--muted); line-height: 1.6; font-size: 12px; }
.analysis-result { display: block; }
.review-score-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.review-score-row h2 { margin: 0 0 5px; }
.review-score-row p:not(.eyebrow) { color: var(--muted); margin: 0; font-size: 10px; }
.accuracy-pill { min-width: 106px; min-height: 86px; padding: 12px; border-radius: 17px; display: grid; place-items: center; background: rgba(84,212,154,.08); border: 1px solid rgba(84,212,154,.2); }
.accuracy-pill strong { color: var(--green); font-size: 30px; }
.accuracy-pill small { color: var(--muted); font-size: 8px; text-transform: uppercase; text-align: center; }
.review-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 22px 0; }
.review-kpis div { padding: 13px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.review-kpis strong { font-size: 19px; }
.review-kpis small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.critical-moment { display: grid; grid-template-columns: 54px 1fr; gap: 14px; padding: 18px; margin-bottom: 16px; border-radius: 17px; background: rgba(255,107,112,.065); border: 1px solid rgba(255,107,112,.16); }
.moment-number { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; color: #ffd6d8; background: rgba(255,107,112,.14); font-size: 18px; font-weight: 900; }
.critical-moment h3 { margin: 0 0 6px; }
.critical-moment p:not(.eyebrow) { margin: 0; color: #adbac8; font-size: 11px; line-height: 1.55; }
.analysis-result > .primary-button { margin-top: 4px; }
.recent-games { grid-column: 1 / -1; }
.recent-games-list { display: grid; gap: 8px; }
.recent-game { display: grid; grid-template-columns: 1fr repeat(3,auto); gap: 16px; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.recent-game > div { display: grid; gap: 4px; }
.recent-game strong { font-size: 11px; }
.recent-game small { color: var(--muted); font-size: 9px; }
.recent-game > span { font-size: 10px; color: #b9c6d3; }
.recent-game .review-open { border: 0; background: transparent; color: var(--accent); cursor: pointer; font-size: 10px; font-weight: 900; }

/* Progress */
.progress-layout { max-width: 1340px; margin: 0 auto; display: grid; grid-template-columns: minmax(330px,.72fr) minmax(0,1.28fr); gap: 20px; }
.rating-card, .skill-map, .principles-card, .trust-card { padding: clamp(22px, 3vw, 31px); }
.rating-card h2 { margin: 0 0 8px; font-size: clamp(32px,4vw,52px); }
.rating-card > div > p:not(.eyebrow) { color: var(--muted); }
.mission-progress { height: 10px; margin: 28px 0 20px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.07); }
.mission-progress span { display: block; width: 4%; height: 100%; background: linear-gradient(90deg,var(--blue),var(--accent)); }
.mission-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.mission-stats div { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.mission-stats strong { font-size: 18px; }
.mission-stats small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.skill-map { grid-row: span 2; }
.skill-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.skill-grid article { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.skill-grid article > span { color: #c7d2de; font-size: 11px; font-weight: 800; }
.skill-grid article > strong { font-size: 20px; }
.skill-grid article > b { grid-column: 1/-1; }
.skill-grid article > small { grid-column: 1/-1; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .5px; }
.principles-card { grid-column: 1 / -1; }
.principles-card h2 { margin: 0 0 18px; }
.loop-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.loop-grid > div { display: grid; gap: 7px; padding: 16px; border-radius: 15px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.loop-grid span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,181,71,.1); color: var(--accent); font-size: 10px; font-weight: 900; }
.loop-grid strong { font-size: 12px; }
.loop-grid small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.trust-card { grid-column: 1/-1; display: grid; grid-template-columns: 58px 1fr; gap: 18px; align-items: center; }
.trust-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; background: rgba(84,212,154,.08); border: 1px solid rgba(84,212,154,.18); color: var(--green); font-size: 22px; }
.trust-card h2 { margin: 0 0 8px; }
.trust-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

/* Game additions */
.coach-warning { margin-top: 15px; padding: 13px; border-radius: 13px; background: rgba(84,212,154,.055); border: 1px solid rgba(84,212,154,.14); }
.coach-warning span { color: var(--green); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.coach-warning p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.move-san .move-label, .move-row .move-label { margin-left: 4px; font-size: 7px; text-transform: uppercase; font-weight: 900; }
.move-label.best, .move-label.good { color: var(--green); }
.move-label.inaccuracy { color: var(--accent); }
.move-label.mistake, .move-label.blunder { color: var(--danger); }

/* Modals and forms */
.onboarding-card { width: min(560px, calc(100vw - 28px)); text-align: left; }
.onboarding-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.onboarding-brand > div { display: grid; gap: 2px; }
.onboarding-brand small { color: var(--muted); font-size: 10px; }
.onboarding-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.onboarding-card label { display: grid; gap: 7px; margin: 14px 0; color: #cbd6e2; font-size: 10px; font-weight: 800; }
.onboarding-card input, .onboarding-card select { width: 100%; height: 47px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.18); color: var(--text); padding: 0 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.onboarding-card .text-button { width: 100%; margin-top: 8px; }
.result-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin: 17px 0; }
.result-summary div { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.result-summary strong { font-size: 18px; }
.result-summary small { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.result-card .primary-button, .result-card .secondary-button { margin-top: 8px; }
.result-card .text-button { width: 100%; margin-top: 10px; }
.share-card { position: relative; width: min(480px, calc(100vw - 28px)); }
.modal-close { position: absolute; right: 15px; top: 13px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; color: var(--muted); }
.share-preview { margin: 18px 0; padding: 25px; min-height: 230px; border-radius: 20px; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 50% 0, rgba(88,166,255,.18), transparent 45%), linear-gradient(145deg,#101f34,#091421); border: 1px solid rgba(255,181,71,.18); }
.share-preview > span { font-size: 52px; color: var(--accent); }
.share-preview p { max-width: 310px; margin: 12px 0; font-size: 18px; font-weight: 800; line-height: 1.4; }
.share-preview strong { color: #d7e1eb; }
.share-preview small { color: var(--accent); margin-top: 5px; }

@media (max-width: 1120px) {
  .dashboard-grid, .training-layout, .review-layout, .progress-layout { grid-template-columns: 1fr; }
  .breakthrough-hero { grid-template-columns: minmax(0,1fr) 190px; }
  .breakthrough-score { width: 175px; height: 175px; }
  .training-sidebar { position: static; grid-template-columns: 1fr 1fr; }
  .review-result { min-height: 420px; }
  .skill-map { grid-row: auto; }
}

@media (max-width: 760px) {
  .app-view { padding: 22px 14px 96px; }
  .topbar { align-items: flex-start; }
  .topbar-actions .icon-button { display: none; }
  .profile-copy { display: none; }
  .profile-pill { padding: 5px; }
  .breakthrough-hero { grid-template-columns: 1fr; padding: 25px; }
  .breakthrough-score { width: 150px; height: 150px; margin-top: -4px; }
  .breakthrough-score strong { font-size: 41px; }
  .hero-actions { display: grid; }
  .hero-actions .primary-button, .hero-actions .secondary-button { width: 100%; }
  .diagnosis-body { grid-template-columns: 1fr; }
  .viral-card { grid-template-columns: 46px 1fr; }
  .viral-card .secondary-button { grid-column: 1/-1; width: 100%; }
  .scenario-card { grid-template-columns: 1fr; padding: 14px; }
  .scenario-board { max-width: 310px; }
  .training-sidebar { grid-template-columns: 1fr; }
  .review-kpis { grid-template-columns: repeat(2,1fr); }
  .recent-game { grid-template-columns: 1fr auto; }
  .recent-game > span:nth-of-type(1), .recent-game > span:nth-of-type(2) { display: none; }
  .skill-grid, .loop-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .mission-stats { grid-template-columns: 1fr 1fr; }
  .mission-stats div:last-child { grid-column: 1/-1; }
  .week-grid { gap: 4px; }
  .day-dot span { border-radius: 9px; }
  .import-actions { display: grid; }
}

/* The diagnosis card sits in the narrow dashboard column on desktop. */
.dashboard-grid > .diagnosis-card .diagnosis-body { grid-template-columns: 1fr; gap: 16px; }
.dashboard-grid > .diagnosis-card .dna-bars > div { grid-template-columns: 112px 1fr 24px; }

/* Founder Alpha cloud account layer */
.cloud-card {
  margin-top: 10px; padding: 12px; display: grid; grid-template-columns: 9px 1fr; gap: 8px 10px;
  align-items: center; border: 1px solid var(--line); border-radius: 14px; background: rgba(88,166,255,.045);
}
.cloud-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 5px rgba(145,160,182,.08); }
.cloud-card.synced .cloud-dot { background: var(--green); box-shadow: 0 0 0 5px rgba(84,212,154,.10); }
.cloud-card.syncing .cloud-dot { background: var(--accent); box-shadow: 0 0 0 5px rgba(255,181,71,.10); animation: pulse 1s infinite; }
.cloud-card.error .cloud-dot { background: var(--danger); box-shadow: 0 0 0 5px rgba(255,107,112,.10); }
.cloud-card > div { min-width: 0; display: grid; gap: 2px; }
.cloud-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.cloud-card small { color: var(--muted); font-size: 8px; line-height: 1.35; }
.cloud-card button { grid-column: 1/-1; min-height: 34px; border: 1px solid rgba(88,166,255,.2); border-radius: 10px; background: rgba(88,166,255,.08); color: #bedcff; cursor: pointer; font-size: 9px; font-weight: 900; }

.auth-card { position: relative; width: min(570px, calc(100vw - 28px)); max-height: min(820px, calc(100vh - 32px)); overflow: auto; text-align: left; }
.auth-card h2 { margin-bottom: 9px; }
.auth-intro { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 13px; background: rgba(0,0,0,.18); }
.auth-tab { min-height: 39px; border: none; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 900; }
.auth-tab.active { color: #17130d; background: linear-gradient(145deg, var(--accent), #ffd085); }
.auth-card form > label, #registerFields > label, #registerFields .form-grid label { display: grid; gap: 7px; margin: 13px 0; color: #cbd6e2; font-size: 10px; font-weight: 800; }
.auth-card input, .auth-card select { width: 100%; height: 47px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.18); color: var(--text); padding: 0 13px; }
.auth-card .primary-button { width: 100%; margin-top: 7px; }
.auth-message { margin: 10px 0; padding: 10px 12px; border: 1px solid rgba(255,107,112,.25); border-radius: 11px; background: rgba(255,107,112,.07); color: #ffc4c6; font-size: 10px; line-height: 1.45; }
.auth-message.success { border-color: rgba(84,212,154,.25); background: rgba(84,212,154,.07); color: #b6f0d4; }
.auth-fineprint { margin: 14px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.account-summary { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.account-summary > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, #3a74a4, #20466d); font-weight: 900; }
.account-summary > div { display: grid; gap: 4px; }
.account-summary small { color: var(--muted); font-size: 10px; }
.account-summary em { padding: 5px 8px; border-radius: 999px; background: rgba(84,212,154,.08); color: var(--green); font-size: 8px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.account-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 12px 0; }
.account-stats > div { display: grid; gap: 4px; padding: 13px; text-align: center; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.account-stats strong { font-size: 20px; }
.account-stats small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.account-actions { display: grid; gap: 8px; margin-top: 14px; }
.account-actions .secondary-button, .account-actions .text-button { width: 100%; }
.founder-metrics { margin-top: 14px; padding: 14px; border: 1px solid rgba(255,181,71,.16); border-radius: 15px; background: rgba(255,181,71,.04); }
.founder-metrics > p { margin-bottom: 10px; }
#founderMetricsGrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
#founderMetricsGrid > div { display: grid; gap: 3px; padding: 10px; border-radius: 11px; background: rgba(0,0,0,.14); text-align: center; }
#founderMetricsGrid strong { font-size: 17px; }
#founderMetricsGrid small { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.danger-zone { margin-top: 16px; padding: 12px; border: 1px solid rgba(255,107,112,.16); border-radius: 13px; background: rgba(255,107,112,.035); }
.danger-zone summary { cursor: pointer; color: #ffc4c6; font-size: 10px; font-weight: 900; }
.danger-zone p { color: var(--muted); font-size: 9px; line-height: 1.5; }
.danger-zone input { margin-bottom: 8px; }
.danger-zone button { width: 100%; min-height: 39px; border: 1px solid rgba(255,107,112,.28); border-radius: 10px; background: rgba(255,107,112,.08); color: #ffc4c6; cursor: pointer; font-size: 9px; font-weight: 900; }

.challenge-cloud-box { display: grid; gap: 4px; margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); text-align: left; }
.challenge-cloud-box strong { font-size: 11px; }
.challenge-cloud-box small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.challenge-cloud-box code { margin-top: 6px; padding: 8px 10px; border-radius: 9px; background: rgba(0,0,0,.18); color: var(--accent); font-size: 11px; font-weight: 900; text-align: center; letter-spacing: 1px; }
.challenge-join-banner { position: fixed; top: 18px; right: 18px; z-index: 120; width: min(520px, calc(100vw - 36px)); display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid rgba(88,166,255,.25); border-radius: 16px; background: rgba(9,20,33,.97); box-shadow: var(--shadow); }
.challenge-join-banner > div { display: grid; gap: 3px; }
.challenge-join-banner strong { font-size: 11px; }
.challenge-join-banner small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.challenge-join-banner .primary-button { min-height: 38px; padding: 0 14px; white-space: nowrap; }
.challenge-join-banner .icon-button { width: 36px; height: 36px; }

@media (max-width: 1120px) {
  .cloud-card { width: 56px; padding: 12px; grid-template-columns: 1fr; justify-items: center; }
  .cloud-card > div { display: none; }
  .cloud-card button { width: 34px; min-height: 32px; overflow: hidden; color: transparent; position: relative; }
  .cloud-card button::after { content: '☁'; position: absolute; inset: 0; display: grid; place-items: center; color: #bedcff; font-size: 14px; }
}
@media (max-width: 760px) {
  .cloud-card { display: none; }
  .auth-card { padding: 24px 18px; }
  .account-summary { grid-template-columns: 48px 1fr; }
  .account-summary em { grid-column: 1/-1; justify-self: start; }
  #founderMetricsGrid { grid-template-columns: 1fr 1fr; }
  .challenge-join-banner { top: 10px; right: 10px; width: calc(100vw - 20px); grid-template-columns: 1fr auto; }
  .challenge-join-banner .primary-button { grid-column: 1/-1; width: 100%; }
  .challenge-join-banner .icon-button { position: absolute; top: 8px; right: 8px; }
}

/* Founder Alpha v4: verified identity, recovery, MFA and engine controls */
.auth-link { width: 100%; margin-top: 7px; text-align: center; }
.security-panel { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: center; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.security-panel h3 { margin: 2px 0 3px; font-size: 14px; }
.security-panel small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.security-panel > button, .security-panel > .secondary-button { grid-column: 1 / -1; width: 100%; }
.security-badge { justify-self: end; padding: 5px 8px; border: 1px solid rgba(255,184,86,.26); border-radius: 999px; background: rgba(255,184,86,.08); color: var(--accent); font-size: 8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.security-badge.verified, .security-badge.enabled { border-color: rgba(84,212,154,.28); background: rgba(84,212,154,.08); color: var(--green); }
.security-badge.warning { border-color: rgba(255,107,112,.26); background: rgba(255,107,112,.08); color: #ffc4c6; }
.mfa-setup, .mfa-backup, .security-details { grid-column: 1 / -1; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.16); }
.mfa-setup p, .mfa-backup p, .security-details p { margin: 0 0 10px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.mfa-setup code { display: block; padding: 10px; border-radius: 9px; background: #101720; color: #c9e8ff; overflow-wrap: anywhere; font-size: 11px; letter-spacing: .08em; }
.mfa-setup label { display: grid; gap: 7px; margin: 12px 0; color: #cbd6e2; font-size: 10px; font-weight: 800; }
.mfa-backup pre { margin: 10px 0; padding: 12px; border-radius: 9px; background: #101720; color: #dbeaf7; white-space: pre-wrap; font-size: 11px; line-height: 1.6; }
.security-details summary { cursor: pointer; color: #ffc4c6; font-size: 9px; font-weight: 900; }
.security-details input { margin: 7px 0 0; }
.security-details button { width: 100%; min-height: 39px; margin-top: 8px; border: 1px solid rgba(255,107,112,.28); border-radius: 10px; background: rgba(255,107,112,.08); color: #ffc4c6; cursor: pointer; font-size: 9px; font-weight: 900; }
.engine-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.engine-actions small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.engine-actions button { white-space: nowrap; }
@media (max-width: 620px) {
  .security-panel { grid-template-columns: 1fr; }
  .security-badge { justify-self: start; }
  .engine-actions { grid-template-columns: 1fr; }
  .engine-actions button { width: 100%; }
}

/* Private Beta RC v9: server-authoritative live arena */
.live-connection-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.035); color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.live-connection-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live-connection-badge.connected { color: #b6f0d4; border-color: rgba(84,212,154,.22); background: rgba(84,212,154,.06); }
.live-connection-badge.connected i { background: var(--green); box-shadow: 0 0 0 5px rgba(84,212,154,.08); }
.live-connection-badge.connecting { color: #ffe0ad; border-color: rgba(255,181,71,.24); background: rgba(255,181,71,.06); }
.live-connection-badge.connecting i { background: var(--accent); animation: pulse 1s infinite; }
.live-layout { max-width: 1340px; margin: 0 auto; }
.live-gate { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: clamp(24px, 4vw, 42px); }
.live-gate-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: linear-gradient(145deg, var(--accent), var(--accent-strong)); color: #211609; font-size: 28px; box-shadow: 0 16px 38px rgba(255,142,60,.2); }
.live-gate h2 { margin: 0 0 8px; font-size: clamp(22px, 2.5vw, 32px); }
.live-gate p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 12px; }
.live-lobby { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 18px; align-items: stretch; }
.live-hero { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; background: linear-gradient(125deg, rgba(88,166,255,.09), rgba(255,181,71,.055)), var(--panel); }
.live-hero h2 { margin: 2px 0 8px; font-size: clamp(36px, 5vw, 62px); letter-spacing: -2px; }
.live-hero h2 small { color: var(--muted); font-size: 14px; letter-spacing: 0; }
.live-hero p { margin: 0; max-width: 610px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.live-record { display: grid; grid-template-columns: repeat(3, minmax(72px, 1fr)); gap: 8px; }
.live-record div { min-width: 78px; display: grid; gap: 4px; padding: 15px; text-align: center; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.16); }
.live-record strong { font-size: 22px; }
.live-record small { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.live-create, .live-join, .live-recent { padding: 23px; }
.live-create { grid-row: span 2; }
.live-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.live-form-grid label, .live-join label { display: grid; gap: 7px; color: #cbd6e2; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.live-rated-toggle { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin: 16px 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); cursor: pointer; }
.live-rated-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.live-rated-toggle span { display: grid; gap: 3px; }
.live-rated-toggle strong { font-size: 11px; }
.live-rated-toggle small { color: var(--muted); font-size: 8px; }
.live-create > .primary-button { width: 100%; }
.live-safety-note, .live-integrity-note { margin: 12px 0 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.live-code-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.live-code-row input { min-width: 0; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.18); color: var(--text); font: inherit; }
.live-invite-preview { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; margin-top: 12px; padding: 12px; border: 1px solid rgba(88,166,255,.2); border-radius: 13px; background: rgba(88,166,255,.05); }
.live-invite-preview > div:nth-child(2) { display: grid; gap: 4px; }
.live-invite-preview strong { font-size: 11px; }
.live-invite-preview small { color: var(--muted); font-size: 9px; }
.live-games-list { display: grid; gap: 8px; }
.live-game-row { width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); color: var(--text); cursor: pointer; text-align: left; }
.live-game-row:hover { border-color: rgba(88,166,255,.24); background: rgba(88,166,255,.045); }
.live-game-row > span:first-child { display: grid; gap: 3px; }
.live-game-row strong { font-size: 11px; }
.live-game-row small { color: var(--muted); font-size: 8px; }
.live-game-row em { padding: 5px 7px; border-radius: 999px; background: rgba(255,181,71,.08); color: var(--accent); font-size: 7px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.live-game-row b { font-size: 10px; }
.live-game-layout { display: grid; grid-template-columns: minmax(520px, 760px) minmax(320px, 390px); gap: clamp(26px, 4vw, 56px); align-items: start; }
.live-game-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; padding: 15px 17px; }
.live-game-banner h2 { margin: 0 0 4px; font-size: 18px; }
.live-game-banner p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 9px; }
.live-game-banner-actions { display: flex; align-items: center; gap: 7px; }
.live-game-banner-actions button { white-space: nowrap; }
.live-board-frame { isolation: isolate; }
.live-chessboard .square.locked { cursor: default; }
.live-chessboard .square.locked:hover::after { display: none; }
.live-waiting-overlay { position: absolute; inset: 9px; z-index: 12; display: grid; place-content: center; gap: 8px; text-align: center; border-radius: 14px; background: rgba(7,16,29,.84); backdrop-filter: blur(6px); }
.live-waiting-overlay span { font-size: 30px; color: var(--accent); }
.live-waiting-overlay strong { font-size: 16px; }
.live-waiting-overlay small { color: var(--muted); font-size: 9px; }
.live-control-panel { padding: 22px; min-height: 620px; }
.live-turn-notice { margin-bottom: 13px; padding: 11px 12px; border: 1px solid rgba(88,166,255,.18); border-radius: 12px; background: rgba(88,166,255,.055); color: #c9e8ff; font-size: 10px; font-weight: 800; line-height: 1.45; }
.live-turn-notice.your-turn { border-color: rgba(255,181,71,.28); background: rgba(255,181,71,.08); color: #ffe0ad; }
.live-move-list { min-height: 210px; max-height: 260px; margin-bottom: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: rgba(0,0,0,.13); }
.live-move-pair { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 6px; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.045); font-size: 10px; }
.live-move-pair:last-child { border-bottom: none; }
.live-move-pair span:first-child { color: var(--muted); }
.live-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.live-action-grid button, .live-safety-controls button { min-height: 40px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.035); cursor: pointer; font-size: 9px; font-weight: 900; }
.live-action-grid button:disabled { opacity: .35; cursor: not-allowed; }
.live-action-grid button span { margin-right: 5px; color: var(--accent); }
.live-draw-offer { display: grid; gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid rgba(255,181,71,.24); border-radius: 13px; background: rgba(255,181,71,.07); }
.live-draw-offer strong { font-size: 10px; }
.live-draw-offer div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.live-result-card { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; margin-top: 12px; padding: 12px; border: 1px solid rgba(84,212,154,.22); border-radius: 13px; background: rgba(84,212,154,.06); }
.live-result-card > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: rgba(84,212,154,.12); color: var(--green); font-weight: 900; }
.live-result-card div { display: grid; gap: 3px; }
.live-result-card strong { font-size: 10px; }
.live-result-card small { color: var(--muted); font-size: 8px; }
.live-result-card em { color: var(--green); font-size: 18px; font-style: normal; font-weight: 900; }
.live-safety-controls { margin-top: 14px; padding: 12px; border: 1px solid rgba(255,107,112,.12); border-radius: 13px; background: rgba(255,107,112,.025); }
.live-safety-controls summary { cursor: pointer; color: #ffc4c6; font-size: 9px; font-weight: 900; }
.live-safety-controls p { color: var(--muted); font-size: 8px; line-height: 1.5; }
.live-safety-controls select, .live-safety-controls textarea { width: 100%; margin-top: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0,0,0,.18); color: var(--text); font: inherit; font-size: 9px; }
.live-safety-controls textarea { min-height: 70px; resize: vertical; }
.live-safety-controls > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.live-quick-stats { grid-template-columns: 1.4fr 1fr 1fr; }
.live-quick-stats strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1120px) {
  .live-lobby { grid-template-columns: 1fr; }
  .live-create { grid-row: auto; }
  .live-game-layout { grid-template-columns: minmax(0, 1fr); max-width: 820px; margin: 0 auto; }
  .live-control-panel { position: static; min-height: auto; }
}
@media (max-width: 760px) {
  .live-gate { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .live-hero { display: grid; }
  .live-record { width: 100%; }
  .live-form-grid { grid-template-columns: 1fr; }
  .live-game-banner { display: grid; }
  .live-game-banner-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .live-game-banner-actions button { width: 100%; }
  .live-invite-preview { grid-template-columns: 38px 1fr; }
  .live-invite-preview .primary-button { grid-column: 1 / -1; width: 100%; }
  .live-game-row { grid-template-columns: 1fr auto; }
  .live-game-row b { grid-column: 1 / -1; }
  .live-connection-badge { display: none; }
  .live-control-panel { padding: 16px; }
}
@media (max-width: 460px) {
  .live-record div { min-width: 0; padding: 11px 7px; }
  .live-action-grid, .live-safety-controls > div { grid-template-columns: 1fr; }
  .live-code-row { grid-template-columns: 1fr; }
  .live-code-row button { width: 100%; }
}
.live-promotion-card { width: min(460px, calc(100vw - 30px)); text-align: center; }
.live-promotion-card h2 { margin: 0 0 18px; }
.live-promotion-card .promotion-choices button { display: grid; gap: 5px; place-items: center; min-height: 86px; font-size: 34px; }
.live-promotion-card .promotion-choices span { color: var(--muted); font-family: Inter, ui-sans-serif, sans-serif; font-size: 8px; font-weight: 900; text-transform: uppercase; }

/* Private Beta RC v9: private-beta operations and feedback */
.auth-card textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.18); color: var(--text); padding: 11px 13px; font: inherit; resize: vertical; }
.beta-feedback-panel { display: grid; gap: 11px; margin-top: 14px; padding: 14px; border: 1px solid rgba(88,166,255,.16); border-radius: 15px; background: rgba(88,166,255,.035); }
.beta-feedback-panel h3 { margin: 2px 0 3px; font-size: 14px; }
.beta-feedback-panel small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.beta-feedback-panel > label, .feedback-form-grid label { display: grid; gap: 7px; color: #cbd6e2; font-size: 9px; font-weight: 800; }
.feedback-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.beta-feedback-panel .secondary-button { width: 100%; }
.founder-operations { display: grid; gap: 12px; margin-top: 14px; padding: 14px; border: 1px solid rgba(255,181,71,.2); border-radius: 15px; background: linear-gradient(145deg, rgba(255,181,71,.055), rgba(88,166,255,.025)); }
.founder-ops-heading { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.founder-ops-heading h3 { margin: 2px 0 3px; font-size: 15px; }
.founder-ops-heading small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.founder-ops-heading .secondary-button { flex: 0 0 auto; }
.founder-ops-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.founder-ops-summary div { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0,0,0,.14); }
.founder-ops-summary strong { font-size: 16px; }
.founder-ops-summary small { color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .06em; }
.founder-ops-section { border: 1px solid var(--line); border-radius: 13px; background: rgba(0,0,0,.11); overflow: hidden; }
.founder-ops-section > summary { padding: 12px; cursor: pointer; color: #f2f5f8; font-size: 10px; font-weight: 900; }
.founder-ops-section[open] > summary { border-bottom: 1px solid var(--line); }
.founder-runtime-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 10px 0; }
.founder-runtime-grid article { display: grid; gap: 4px; padding: 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.022); }
.founder-runtime-grid strong { font-size: 10px; line-height: 1.35; }
.founder-runtime-grid small { color: var(--muted); font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.founder-backup-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px; }
.founder-backup-toolbar > div { display: grid; gap: 3px; }
.founder-backup-toolbar strong { font-size: 10px; }
.founder-backup-toolbar small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.founder-backup-toolbar .secondary-button { flex: 0 0 auto; }
.founder-invite-form { display: grid; grid-template-columns: 1.5fr .7fr .8fr; gap: 8px; padding: 12px; }
.founder-invite-form label { display: grid; gap: 6px; color: #cbd6e2; font-size: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.founder-invite-form button { grid-column: 1 / -1; width: 100%; }
.founder-secret-reveal { display: grid; gap: 8px; margin: 0 12px 12px; padding: 11px; border: 1px solid rgba(84,212,154,.22); border-radius: 11px; background: rgba(84,212,154,.055); }
.founder-secret-reveal strong { color: #b6f0d4; font-size: 9px; }
.founder-secret-reveal code { overflow-wrap: anywhere; color: var(--text); font-size: 11px; }
.founder-ops-list { display: grid; gap: 7px; padding: 10px; max-height: 330px; overflow: auto; }
.founder-ops-empty { padding: 13px; color: var(--muted); font-size: 9px; text-align: center; }
.founder-ops-item { display: grid; gap: 7px; padding: 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.022); }
.founder-ops-item-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.founder-ops-item strong { font-size: 10px; line-height: 1.35; }
.founder-ops-item small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.founder-ops-item p { margin: 0; color: #d4dde7; font-size: 9px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.founder-ops-item code { color: #ffe0ad; font-size: 8px; overflow-wrap: anywhere; }
.founder-ops-pill { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: rgba(88,166,255,.09); color: #c9e8ff; font-size: 7px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.founder-ops-pill.open, .founder-ops-pill.new, .founder-ops-pill.suspended { background: rgba(255,107,112,.09); color: #ffc4c6; }
.founder-ops-pill.active, .founder-ops-pill.resolved, .founder-ops-pill.actioned, .founder-ops-pill.verified, .founder-ops-pill.ready { background: rgba(84,212,154,.09); color: #b6f0d4; }
.founder-ops-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.founder-ops-actions button { min-height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.035); color: var(--text); cursor: pointer; font-size: 8px; font-weight: 900; }
.founder-ops-actions button.danger { border-color: rgba(255,107,112,.22); color: #ffc4c6; background: rgba(255,107,112,.055); }

@media (max-width: 620px) {
  .feedback-form-grid, .founder-invite-form, .founder-ops-summary, .founder-runtime-grid { grid-template-columns: 1fr; }
  .founder-ops-heading, .founder-backup-toolbar { display: grid; }
  .founder-ops-heading .secondary-button, .founder-backup-toolbar .secondary-button { width: 100%; }
}

/* Beta intelligence and human-reviewed fair-play queue */
.founder-insight-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 10px 0; }
.founder-insight-summary article { display: grid; gap: 3px; padding: 10px; border: 1px solid rgba(84,212,154,.13); border-radius: 11px; background: rgba(84,212,154,.035); }
.founder-insight-summary strong { font-size: 17px; line-height: 1; }
.founder-insight-summary small { color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .05em; }
.founder-insight-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; }
.founder-insight-toolbar > div { display: grid; gap: 3px; }
.founder-insight-toolbar strong { font-size: 10px; }
.founder-insight-toolbar small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.founder-funnel-list { display: grid; gap: 7px; padding: 0 10px 10px; }
.founder-funnel-row { display: grid; grid-template-columns: minmax(120px, .9fr) minmax(140px, 2fr) 64px; align-items: center; gap: 8px; }
.founder-funnel-row > span { font-size: 8px; color: #dde6ef; }
.founder-funnel-track { height: 9px; border: 1px solid rgba(255,255,255,.07); background: rgba(0,0,0,.18); border-radius: 999px; overflow: hidden; }
.founder-funnel-fill { height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, rgba(84,212,154,.62), rgba(88,166,255,.72)); }
.founder-funnel-row strong { font-size: 8px; text-align: right; }
.founder-cohort-list { display: grid; gap: 7px; padding: 0 10px 10px; }
.founder-cohort-card { display: grid; gap: 8px; padding: 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.022); }
.founder-cohort-card header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.founder-cohort-card header strong { font-size: 10px; }
.founder-cohort-card header small { color: var(--muted); font-size: 8px; }
.founder-cohort-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.founder-cohort-metrics div { display: grid; gap: 2px; padding: 7px; border-radius: 8px; background: rgba(0,0,0,.13); }
.founder-cohort-metrics strong { font-size: 10px; }
.founder-cohort-metrics small { color: var(--muted); font-size: 7px; }
.founder-method-note { margin: 0; padding: 0 10px 11px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.founder-fair-play-note { display: flex; gap: 7px; align-items: baseline; margin: 10px 10px 0; padding: 9px 10px; border: 1px solid rgba(255,181,71,.15); border-radius: 10px; background: rgba(255,181,71,.035); }
.founder-fair-play-note strong { flex: 0 0 auto; font-size: 8px; color: #ffe0ad; }
.founder-fair-play-note span { color: var(--muted); font-size: 8px; line-height: 1.45; }
.founder-fair-play-evidence { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.founder-fair-play-evidence div { display: grid; gap: 2px; padding: 7px; border-radius: 8px; background: rgba(0,0,0,.14); }
.founder-fair-play-evidence strong { font-size: 10px; }
.founder-fair-play-evidence small { color: var(--muted); font-size: 7px; }
.founder-signal-list { display: grid; gap: 4px; }
.founder-signal-list span { display: block; color: #d5e0ea; font-size: 8px; line-height: 1.45; }
.founder-ops-pill.high { background: rgba(255,107,112,.11); color: #ffc4c6; }
.founder-ops-pill.medium { background: rgba(255,181,71,.1); color: #ffe0ad; }
.founder-ops-pill.low, .founder-ops-pill.monitoring, .founder-ops-pill.reviewing { background: rgba(88,166,255,.09); color: #c9e8ff; }
.founder-ops-pill.cleared { background: rgba(84,212,154,.09); color: #b6f0d4; }
@media (max-width: 760px) {
  .founder-insight-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .founder-insight-toolbar { display: grid; }
  .founder-insight-toolbar button { width: 100%; }
  .founder-funnel-row { grid-template-columns: minmax(90px, .85fr) minmax(90px, 1.5fr) 54px; }
  .founder-cohort-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .founder-fair-play-evidence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .founder-fair-play-note { display: grid; }
}

/* Private Beta RC v9: activation, responsible referrals and experiment readouts */
.activation-mini-card { padding: 25px; display: grid; gap: 14px; }
.activation-mini-card .section-heading { margin: 0; }
.activation-mini-card .section-heading > strong { color: var(--green); font-size: 19px; }
.activation-progress { height: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(0,0,0,.2); }
.activation-progress span { display: block; height: 100%; width: var(--progress, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--green)); transition: width .35s ease; }
.activation-progress.large { height: 13px; }
.activation-mini-steps { display: flex; flex-wrap: wrap; gap: 7px; }
.activation-mini-steps span { padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 9px; }
.activation-mini-steps span.complete { color: #b6f0d4; border-color: rgba(84,212,154,.18); background: rgba(84,212,154,.055); }
.activation-mini-card .secondary-button { width: fit-content; }

.invite-layout { max-width: 1340px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 20px; align-items: start; }
.activation-roadmap, .referral-card, .referral-history-card, .growth-principles { padding: 25px; }
.activation-roadmap { grid-row: span 2; }
.activation-roadmap .section-heading > strong { color: var(--green); font-size: 24px; }
.activation-roadmap-steps { display: grid; gap: 10px; margin-top: 18px; }
.activation-roadmap-steps article { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.activation-roadmap-steps article > b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); background: rgba(255,255,255,.055); font-size: 11px; }
.activation-roadmap-steps article > div { display: grid; gap: 3px; }
.activation-roadmap-steps strong { font-size: 12px; }
.activation-roadmap-steps small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.activation-roadmap-steps em { color: var(--muted); font-size: 8px; font-style: normal; text-transform: uppercase; letter-spacing: .07em; }
.activation-roadmap-steps article.complete { border-color: rgba(84,212,154,.18); background: rgba(84,212,154,.045); }
.activation-roadmap-steps article.complete > b { color: #09271c; background: var(--green); }
.activation-roadmap-steps article.complete em { color: #b6f0d4; }
.activation-roadmap-steps article.current { border-color: rgba(255,181,71,.22); background: rgba(255,181,71,.045); }
.activation-roadmap-steps article.current > b { color: #1a1208; background: var(--accent); }

.referral-card { display: grid; gap: 15px; }
.referral-card .section-heading { align-items: start; }
.referral-card .security-badge { flex: 0 0 auto; }
.referral-locked-panel { display: grid; gap: 8px; padding: 15px; border: 1px dashed rgba(255,181,71,.23); border-radius: 14px; background: rgba(255,181,71,.035); }
.referral-locked-panel strong { font-size: 12px; }
.referral-locked-panel p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.referral-locked-panel .primary-button { width: fit-content; }
.referral-actions { display: grid; grid-template-columns: minmax(150px,.7fr) minmax(190px,1.3fr); gap: 10px; align-items: end; }
.referral-actions label { display: grid; gap: 7px; color: #cbd6e2; font-size: 9px; font-weight: 800; }
.referral-actions select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0,0,0,.18); color: var(--text); padding: 0 11px; }
.referral-actions .primary-button { width: 100%; }
.referral-reveal { margin: 0; }
.referral-reveal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.referral-reveal-actions button { flex: 1 1 160px; }
.referral-limits { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.referral-limits span { padding: 6px 8px; border-radius: 999px; color: var(--muted); background: rgba(88,166,255,.055); border: 1px solid rgba(88,166,255,.12); font-size: 8px; }
.referral-history-card { grid-column: 2; }
.referral-history { display: grid; gap: 9px; max-height: 390px; overflow: auto; }
.referral-history-item { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.referral-history-item header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.referral-history-item header > div { display: grid; gap: 3px; }
.referral-history-item strong { font-size: 11px; }
.referral-history-item small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.referral-status { padding: 4px 7px; border-radius: 999px; font-size: 7px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; background: rgba(88,166,255,.09); color: #c9e8ff; }
.referral-status.redeemed, .referral-status.activated { background: rgba(84,212,154,.09); color: #b6f0d4; }
.referral-status.expired, .referral-status.revoked { background: rgba(255,107,112,.08); color: #ffc4c6; }
.referral-history-item footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.referral-history-item code { color: #ffe0ad; font-size: 8px; }
.referral-history-item button { min-height: 30px; padding: 0 9px; border: 1px solid rgba(255,107,112,.16); border-radius: 9px; background: rgba(255,107,112,.04); color: #ffc4c6; cursor: pointer; font-size: 8px; font-weight: 850; }
.empty-state { margin: 0; padding: 18px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); text-align: center; font-size: 10px; }
.growth-principles { grid-column: 1 / -1; }
.growth-principles h2 { margin: 0 0 14px; font-size: 20px; }
.growth-principles > div { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.growth-principles article { display: grid; gap: 4px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.022); }
.growth-principles strong { font-size: 11px; }
.growth-principles small { color: var(--muted); font-size: 8px; line-height: 1.45; }

.founder-experiment-list { display: grid; gap: 7px; padding: 0 10px 10px; }
.founder-experiment-card { display: grid; grid-template-columns: minmax(170px,1.2fr) repeat(4,minmax(70px,.7fr)); gap: 7px; align-items: center; padding: 9px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.022); }
.founder-experiment-card > div { display: grid; gap: 2px; }
.founder-experiment-card strong { font-size: 9px; }
.founder-experiment-card small { color: var(--muted); font-size: 7px; line-height: 1.35; }

@media (max-width: 980px) {
  .invite-layout { grid-template-columns: 1fr; }
  .activation-roadmap { grid-row: auto; }
  .referral-history-card { grid-column: auto; }
  .growth-principles > div { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .founder-experiment-card { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .founder-experiment-card > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .activation-mini-card .secondary-button, .referral-locked-panel .primary-button { width: 100%; }
  .invite-layout { gap: 14px; }
  .activation-roadmap, .referral-card, .referral-history-card, .growth-principles { padding: 18px; }
  .activation-roadmap-steps article { grid-template-columns: 32px 1fr; }
  .activation-roadmap-steps article em { grid-column: 2; }
  .referral-actions { grid-template-columns: 1fr; }
  .growth-principles > div { grid-template-columns: 1fr; }
  .founder-experiment-card { grid-template-columns: 1fr 1fr; }
  .founder-experiment-card > div:first-child { grid-column: 1 / -1; }
}
