/* Conquest design system — port of ApexColors / ApexTheme / ApexTypography.
   Dark, high-contrast, metallic, electric red/orange accent. Numbers use
   monospaced/rounded faces for a scoreboard feel. Mobile-first; content is
   capped at 640px on desktop so the app keeps its native-app density. */

:root {
  /* Surfaces */
  --bg: #07090D;
  --surface: #12151C;
  --surface-elevated: #1A1E27;
  --surface-highlight: #232834;
  --hairline: #2A2F3A;

  /* Text */
  --text-primary: #F5F7FA;
  --text-secondary: #9AA3B2;
  --text-tertiary: #5E6675;

  /* Accent */
  --accent: #FF3B30;
  --accent-hot: #FF6A00;
  --accent-electric: #2BD9FF;
  --accent-gradient: linear-gradient(135deg, #FF6A00, #FF3B30);

  /* Categories */
  --finance: #3BE38B;
  --physical: #FF4D4D;
  --social: #9B6CFF;

  /* Status */
  --verified: #32D74B;
  --pending: #FFB020;
  --rejected: #FF453A;
  --warning: #FF9F0A;
  --danger: #FF453A;

  /* Spacing / radius */
  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 12px; --sp-lg: 16px; --sp-xl: 24px; --sp-xxl: 32px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;

  /* Inter for UI text, Space Grotesk for display type and scoreboard numbers
     (loaded from Google Fonts in index.html; system stacks are the fallback
     so a blocked CDN degrades gracefully). */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-rounded: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --tab-bar-height: 64px;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html, body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

/* Faint warm radials give the flat black some depth on large screens. */
body {
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(255, 106, 0, 0.055), transparent 60%),
    radial-gradient(900px 700px at -15% 20%, rgba(255, 59, 48, 0.045), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

::selection { background: rgba(255, 59, 48, 0.35); color: var(--text-primary); }

:focus-visible { outline: 2px solid rgba(255, 59, 48, 0.65); outline-offset: 2px; }
.input:focus-visible { outline: none; } /* the accent border already marks focus */

/* Slim, dark scrollbars (desktop) */
* { scrollbar-width: thin; scrollbar-color: var(--surface-highlight) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--surface-highlight);
  border-radius: 999px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #2E3442; }

/* ------------------------------------------------------------------ */
/* App shell                                                            */
/* ------------------------------------------------------------------ */

#app { min-height: 100vh; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.app-content {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--sp-lg) var(--sp-lg) calc(var(--tab-bar-height) + var(--sp-xl));
}
.app-content-bare { padding-bottom: var(--sp-xl); }
/* Marketing pages (the landing) breathe on desktop. */
.app-content-wide { max-width: 1140px; }

.tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--tab-bar-height);
  display: flex;
  justify-content: center;
  gap: var(--sp-sm);
  background: rgba(10, 12, 17, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--hairline);
  padding: 6px var(--sp-sm) calc(6px + env(safe-area-inset-bottom));
  z-index: 40;
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; flex: 1; max-width: 110px;
  color: var(--text-tertiary);
  border-radius: var(--r-md);
  font-size: 11px; font-weight: 600;
  transition: color .15s ease;
}
.tab-item .icon { width: 24px; height: 24px; }
.tab-item.active { color: var(--accent); }
.tab-item:hover { color: var(--text-secondary); }
.tab-item.active:hover { color: var(--accent); }

/* ------------------------------------------------------------------ */
/* Typography                                                           */
/* ------------------------------------------------------------------ */

.hero-title { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.5px; }
.screen-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.3px; }
.headline { font-size: 20px; font-weight: 700; }
.card-title { font-size: 16px; font-weight: 700; }
.section-label {
  font-size: 13px; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-secondary);
}
.caption { font-size: 13px; font-weight: 500; }
.micro { font-size: 11px; font-weight: 600; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.center { text-align: center; }

.score-hero { font-size: 52px; font-weight: 900; font-family: var(--font-rounded); font-variant-numeric: tabular-nums; line-height: 1; }
.score-large { font-size: 32px; font-weight: 800; font-family: var(--font-rounded); font-variant-numeric: tabular-nums; }
.score-card { font-size: 24px; font-weight: 800; font-family: var(--font-rounded); font-variant-numeric: tabular-nums; }
.score { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-value { font-family: var(--font-mono); font-size: 15px; font-weight: 600; }
.stat-value-sm { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.rank-num { font-size: 22px; font-weight: 900; font-family: var(--font-rounded); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ */
/* Layout helpers                                                       */
/* ------------------------------------------------------------------ */

.stack { display: flex; flex-direction: column; gap: var(--sp-lg); }
.stack-sm { display: flex; flex-direction: column; gap: var(--sp-sm); }
.row { display: flex; align-items: center; gap: var(--sp-md); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--hairline); border: 0; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }

/* Sub-screen top bar with back button */
.nav-header {
  display: flex; align-items: center; gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}
.nav-back {
  display: flex; align-items: center; gap: 2px;
  background: none; border: 0; cursor: pointer;
  color: var(--accent); font-size: 16px; font-weight: 600;
  padding: var(--sp-xs) var(--sp-sm) var(--sp-xs) 0;
}
.nav-back .icon { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ */
/* Cards — top-lit gradient fill, hairline border, bevel highlight      */
/* ------------------------------------------------------------------ */

.card {
  position: relative;
  background: linear-gradient(to bottom, var(--surface-elevated), var(--surface));
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  box-shadow: 0 5px 9px rgba(0, 0, 0, 0.5);
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.12), transparent 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card-elevated { background: linear-gradient(to bottom, var(--surface-highlight), var(--surface-elevated)); }
.card-tight { padding: var(--sp-md); }
.card-tier { border-color: var(--tier-color, var(--hairline)); border-width: 1.5px; }

.card-press { cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.card-press:hover { border-color: #3A4150; }
.card-press:active { transform: scale(0.985); }

/* ------------------------------------------------------------------ */
/* Buttons                                                              */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-sm);
  border: 0; cursor: pointer;
  border-radius: var(--r-md);
  font-size: 16px; font-weight: 700;
  padding: 14px 20px;
  color: var(--text-primary);
  background: var(--surface-elevated);
  white-space: nowrap;
  transition: filter .15s ease, transform .12s ease, opacity .15s ease, box-shadow .15s ease;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-primary { background: var(--accent-gradient); box-shadow: 0 4px 14px rgba(255, 59, 48, 0.3); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(255, 59, 48, 0.42); }
.btn-secondary { background: var(--surface-elevated); border: 1px solid var(--hairline); }
.btn-destructive { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn .icon { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ */
/* Forms                                                                */
/* ------------------------------------------------------------------ */

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.4px; }
.input, select.input, textarea.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 16px; font-family: inherit;
  padding: 13px 14px;
  outline: none;
  transition: border-color .15s ease;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--text-tertiary); }
.input-error { border-color: var(--danger); }
.field-error { font-size: 13px; color: var(--danger); }
.field-hint { font-size: 13px; color: var(--text-tertiary); }
textarea.input { resize: vertical; min-height: 88px; }

.checkbox-row {
  display: flex; align-items: flex-start; gap: var(--sp-md);
  cursor: pointer; font-size: 14px; color: var(--text-secondary);
}
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px;
  accent-color: var(--accent);
}

/* Segmented control (category filter) */
.segmented {
  display: flex; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 4px;
}
.segmented button {
  flex: 1; border: 0; cursor: pointer;
  background: transparent; color: var(--text-secondary);
  font-size: 13px; font-weight: 700;
  padding: 8px 4px; border-radius: var(--r-sm);
  transition: background .15s ease, color .15s ease;
}
.segmented button.active { background: var(--surface-highlight); color: var(--text-primary); }

/* ------------------------------------------------------------------ */
/* Pills, badges, chips                                                 */
/* ------------------------------------------------------------------ */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 4px 10px;
  background: var(--surface-highlight); color: var(--text-secondary);
}
.pill .icon { width: 12px; height: 12px; }
.pill-pending, .pill-pendingReview, .pill-submitted { background: rgba(255,176,32,.14); color: var(--pending); }
.pill-approved, .pill-verified { background: rgba(50,215,75,.14); color: var(--verified); }
.pill-rejected, .pill-removed { background: rgba(255,69,58,.14); color: var(--rejected); }
.pill-appealed { background: rgba(43,217,255,.14); color: var(--accent-electric); }
.pill-open { background: rgba(255,176,32,.14); color: var(--pending); }
.pill-reviewing { background: rgba(43,217,255,.14); color: var(--accent-electric); }
.pill-resolved { background: rgba(50,215,75,.14); color: var(--verified); }
.pill-dismissed { background: var(--surface-highlight); color: var(--text-tertiary); }
.pill-active { background: rgba(50,215,75,.14); color: var(--verified); }
.pill-warned { background: rgba(255,159,10,.14); color: var(--warning); }
.pill-suspended, .pill-banned, .pill-blocked { background: rgba(255,69,58,.14); color: var(--rejected); }

.tier-badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
  padding: 4px 10px;
  background: var(--tier-gradient);
  color: #0B0D12;
}
.tier-badge.tier-unranked { color: var(--text-primary); }

.chip-grid { display: flex; flex-wrap: wrap; gap: var(--sp-sm); }
.chip {
  border: 1px solid var(--hairline); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text-secondary);
  font-size: 14px; font-weight: 600;
  padding: 8px 16px; cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: #3A4150; color: var(--text-primary); }
.chip.active {
  background: var(--accent-gradient); border-color: transparent;
  color: var(--text-primary);
}

/* City type-ahead (settings Change City, onboarding city step) */
.city-ac { position: relative; flex: 1; min-width: 0; }
.city-ac .input { width: 100%; }
.city-ac-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  max-height: 288px; overflow-y: auto;
  background: var(--surface-elevated);
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.city-ac-option {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  width: 100%; padding: 11px 14px;
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: inherit; font-size: 15px; font-weight: 500;
  color: var(--text-primary);
}
.city-ac-option.active { background: var(--surface-highlight); }
.city-ac-option:focus-visible { outline-offset: -2px; }
.city-ac-region { color: var(--text-tertiary); font-size: 12.5px; flex-shrink: 0; }

.badge-row { display: flex; flex-wrap: wrap; gap: var(--sp-sm); }
.profile-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--verified);
  background: rgba(50,215,75,.1);
  border-radius: var(--r-pill); padding: 5px 11px;
}
.profile-badge .icon { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ */
/* Avatar                                                               */
/* ------------------------------------------------------------------ */

.avatar {
  border-radius: 50%;
  background: var(--surface-highlight);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  border: 1px solid var(--hairline);
  color: var(--text-secondary); font-weight: 800;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--tier-color, var(--hairline)); }

/* ------------------------------------------------------------------ */
/* Leaderboard rows                                                     */
/* ------------------------------------------------------------------ */

.lb-rank {
  width: 40px; text-align: center; flex-shrink: 0;
  font-size: 22px; font-weight: 900; font-family: var(--font-rounded);
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
}
.lb-rank.top { color: var(--text-primary); }
.lb-rank.founder {
  background: linear-gradient(135deg, #FFD24A, #B14DFF, #2BD9FF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ------------------------------------------------------------------ */
/* Score bars                                                           */
/* ------------------------------------------------------------------ */

.score-bar { display: flex; flex-direction: column; gap: 5px; }
.score-bar-head { display: flex; justify-content: space-between; align-items: baseline; }
.score-bar-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.score-bar-value { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.score-bar-track { height: 8px; border-radius: 4px; background: var(--surface-highlight); overflow: hidden; }
.score-bar-fill {
  height: 100%; border-radius: 4px;
  background: var(--bar-color, var(--accent));
  transition: width .5s cubic-bezier(.22,1,.36,1);
}

/* ------------------------------------------------------------------ */
/* List rows (settings / admin)                                         */
/* ------------------------------------------------------------------ */

.list-group { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--hairline); }
.list-row {
  display: flex; align-items: center; gap: var(--sp-md);
  background: var(--surface);
  padding: 14px var(--sp-lg);
  border: 0; width: 100%; text-align: left;
  font-size: 16px; color: var(--text-primary); cursor: pointer;
  font-family: inherit;
}
.list-row + .list-row { border-top: 1px solid var(--hairline); }
.list-row:hover { background: var(--surface-elevated); }
.list-row .icon { color: var(--text-secondary); }
.list-row-title { flex: 1; min-width: 0; }
.list-row-sub { font-size: 13px; color: var(--text-tertiary); }
.list-row-trailing { color: var(--text-tertiary); display: flex; align-items: center; gap: 6px; font-size: 14px; }
.list-row.destructive, .list-row.destructive .icon { color: var(--danger); }

/* ------------------------------------------------------------------ */
/* Chat                                                                 */
/* ------------------------------------------------------------------ */

.chat-scroll { display: flex; flex-direction: column; gap: var(--sp-sm); padding-bottom: 96px; }
.chat-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 15px;
  overflow-wrap: break-word;
}
.chat-bubble.mine {
  align-self: flex-end;
  background: var(--accent-gradient);
  border-bottom-right-radius: 6px;
}
.chat-bubble.theirs {
  align-self: flex-start;
  background: var(--surface-elevated);
  border: 1px solid var(--hairline);
  border-bottom-left-radius: 6px;
}
.chat-meta { font-size: 10px; color: var(--text-tertiary); margin-top: 3px; }
.chat-composer {
  /* Seated directly above the fixed tab bar so neither intercepts the other. */
  position: fixed; bottom: var(--tab-bar-height); left: 0; right: 0;
  display: flex; gap: var(--sp-sm); align-items: flex-end;
  max-width: 640px; margin: 0 auto;
  padding: var(--sp-md) var(--sp-lg);
  background: rgba(10, 12, 17, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--hairline);
  z-index: 30;
}
.chat-composer .input { border-radius: 22px; }
.chat-send {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; flex-shrink: 0;
  background: var(--accent-gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.chat-send:disabled { opacity: .4; }
.chat-banner {
  text-align: center; font-size: 13px; color: var(--text-secondary);
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: var(--sp-md);
}

/* ------------------------------------------------------------------ */
/* Modal / alert                                                        */
/* ------------------------------------------------------------------ */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-xl);
}
.modal-card {
  width: 100%; max-width: 320px;
  background: var(--surface-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  display: flex; flex-direction: column; gap: var(--sp-md);
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
}
.modal-title { font-size: 18px; font-weight: 800; }
.modal-message { font-size: 14px; color: var(--text-secondary); }
.modal-actions { display: flex; flex-direction: column; gap: var(--sp-sm); margin-top: var(--sp-xs); }
/* Legal docs shown as a pre-auth modal: suppress the embedded Back header. */
.legal-modal .nav-header { display: none; }

/* ------------------------------------------------------------------ */
/* Empty state / spinner / splash                                       */
/* ------------------------------------------------------------------ */

.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-md);
  text-align: center; padding: var(--sp-xxl) var(--sp-lg);
  color: var(--text-secondary);
}
.empty-state .icon { width: 44px; height: 44px; color: var(--text-tertiary); }
.empty-state-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.empty-state-message { font-size: 14px; max-width: 300px; }

.spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--surface-highlight);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: var(--sp-lg) auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen { display: flex; justify-content: center; padding: var(--sp-xxl); }

/* Fixed overlay: covers the static landing pre-render until the app boots.
   A <noscript> style in index.html hides it for no-JS visitors. */
.boot-splash {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-lg);
}
.boot-word {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700; letter-spacing: 6px;
  background: var(--accent-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.boot-dot { -webkit-text-fill-color: #F5F7FA; }

.banned-screen {
  min-height: 70vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-lg); text-align: center; padding: var(--sp-xl);
}
.banned-icon .icon { width: 56px; height: 56px; color: var(--danger); }

/* Entrance animation (EntranceModifier port) */
@keyframes entrance {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.entrance { animation: entrance .35s cubic-bezier(.22,1,.36,1) both; }

/* Proof previews */
.proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--sp-sm); }
.proof-tile {
  position: relative; aspect-ratio: 1;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-highlight);
  border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
}
.proof-tile img, .proof-tile video { width: 100%; height: 100%; object-fit: cover; }
.proof-tile .proof-name {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: 10px; padding: 3px 6px;
  background: rgba(0,0,0,.65); color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.proof-remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.7); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.proof-remove .icon { width: 12px; height: 12px; }

/* Demo mode banner */
.demo-banner {
  text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-electric);
  background: rgba(43, 217, 255, 0.08);
  border: 1px solid rgba(43, 217, 255, 0.25);
  border-radius: var(--r-md);
  padding: 6px 10px;
}

/* ------------------------------------------------------------------ */
/* Ambient background video (signed-in shells only, see main.js)        */
/* ------------------------------------------------------------------ */

.app-bg {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}
.app-bg video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* Dimmed: the loop is ambience, the UI is the product. */
  opacity: 0.8;
}
.app-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(7, 9, 13, 0.68),
    rgba(7, 9, 13, 0.28) 30%,
    rgba(7, 9, 13, 0.38) 70%,
    rgba(7, 9, 13, 0.8));
}

/* ------------------------------------------------------------------ */
/* Landing page (views/welcome.js — copy mirrored in index.html)        */
/* ------------------------------------------------------------------ */

.landing { display: flex; flex-direction: column; gap: 64px; padding-top: var(--sp-sm); }

.landing-nav { display: flex; align-items: center; gap: var(--sp-md); }
.landing-nav .landing-brand {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; letter-spacing: 3px;
}
/* The hero carries its own CTAs on phones — keep the top nav to Sign In. */
@media (max-width: 639px) {
  .landing-nav .btn-primary { display: none; }
}

.landing-hero { display: grid; gap: 40px; align-items: center; }

.landing-h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 58px);
  font-weight: 700; letter-spacing: -1.5px; line-height: 1.04;
}
.landing-sub {
  font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65;
  color: var(--text-secondary); max-width: 560px;
}
.landing-cta-row { display: flex; flex-wrap: wrap; gap: var(--sp-md); }

.landing-section { display: flex; flex-direction: column; gap: var(--sp-xl); }
.landing-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  background: var(--accent-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.landing-h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700; letter-spacing: -0.8px; line-height: 1.15;
}
.landing-lede { font-size: 16px; line-height: 1.65; color: var(--text-secondary); max-width: 640px; }

.landing-grid3 { display: grid; gap: var(--sp-lg); }

.landing-step { display: flex; flex-direction: column; gap: var(--sp-md); }
.step-num {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700; letter-spacing: 2px;
  color: var(--text-tertiary);
}
.landing-step .icon { width: 26px; height: 26px; color: var(--accent); }
.landing-step h3 { font-size: 17px; font-weight: 700; }
.landing-step p { font-size: 14.5px; line-height: 1.6; color: var(--text-secondary); }

.arena-card { display: flex; flex-direction: column; gap: var(--sp-md); }
.arena-card .arena-head { display: flex; align-items: center; gap: var(--sp-sm); }
.arena-card .arena-head .icon { width: 20px; height: 20px; }
.arena-card h3 { font-size: 17px; font-weight: 800; letter-spacing: 0.3px; }
.arena-max {
  margin-left: auto;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 1px; color: var(--text-tertiary); white-space: nowrap;
}
.arena-card p { font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.arena-stats { display: flex; flex-direction: column; }
.arena-stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; font-size: 14px; color: var(--text-secondary);
}
.arena-stat + .arena-stat { border-top: 1px solid var(--hairline); }
.arena-stat .pts {
  font-family: var(--font-display); font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--text-primary);
}

.tier-ladder { display: flex; flex-wrap: wrap; gap: var(--sp-sm); }
.tier-step {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--hairline); border-radius: var(--r-pill);
  background: var(--surface);
  padding: 8px 14px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.4px;
}
.tier-step .tier-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.tier-step .tier-pts { font-size: 11px; font-weight: 600; color: var(--text-tertiary); }

.faq-list { display: flex; flex-direction: column; gap: var(--sp-sm); max-width: 760px; }
.faq-item {
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--surface);
}
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md);
  list-style: none; cursor: pointer;
  padding: var(--sp-lg);
  font-size: 15px; font-weight: 700;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-display); font-size: 20px; font-weight: 500;
  color: var(--text-tertiary); line-height: 1;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq-item .faq-answer {
  padding: 0 var(--sp-lg) var(--sp-lg);
  font-size: 14.5px; line-height: 1.65; color: var(--text-secondary);
}

.landing-final {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-lg);
  padding: var(--sp-xxl) var(--sp-lg);
}

.landing-footer {
  border-top: 1px solid var(--hairline);
  padding-top: var(--sp-xl);
  display: flex; flex-direction: column; gap: var(--sp-md);
  font-size: 13px; color: var(--text-tertiary);
}
.landing-footer .row { flex-wrap: wrap; }
.landing-footer a { color: var(--text-secondary); }
.landing-footer a:hover { color: var(--text-primary); }
.footer-link { background: none; border: 0; cursor: pointer; font: inherit; color: var(--text-secondary); padding: 0; }
.footer-link:hover { color: var(--text-primary); }

/* Static pre-render (crawlers / no-JS). Replaced by the app on boot. */
.static-landing { max-width: 760px; margin: 0 auto; padding: var(--sp-xl) var(--sp-lg) 64px; }
.static-landing .static-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: var(--sp-xl);
}
.static-landing .static-brand { font-family: var(--font-display); font-weight: 700; letter-spacing: 3px; }
.static-landing nav { display: flex; gap: var(--sp-lg); font-weight: 600; }
.static-landing h1 { font-family: var(--font-display); font-size: 38px; letter-spacing: -1px; line-height: 1.1; margin-bottom: var(--sp-lg); }
.static-landing h2 { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.4px; margin: var(--sp-xxl) 0 var(--sp-md); }
.static-landing h3 { font-size: 16px; margin: var(--sp-lg) 0 var(--sp-xs); }
.static-landing p, .static-landing li { color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--sp-sm); }
.static-landing ol { padding-left: 20px; }
.static-landing a { color: var(--accent-electric); font-weight: 600; }
.static-landing .static-cta { color: var(--accent); }
.static-landing footer { margin-top: 48px; border-top: 1px solid var(--hairline); padding-top: var(--sp-lg); font-size: 13px; }

/* ------------------------------------------------------------------ */
/* Desktop                                                              */
/* ------------------------------------------------------------------ */

@media (min-width: 700px) {
  .app-content { padding-top: var(--sp-xl); }
  .modal-card { max-width: 380px; }
}

@media (min-width: 900px) {
  /* The bottom tab bar becomes a floating dock. */
  :root { --tab-bar-height: 92px; }
  .tab-bar {
    left: 50%; right: auto; bottom: 16px;
    transform: translateX(-50%);
    width: auto; height: 60px;
    gap: 4px;
    padding: 6px 8px;
    background: rgba(13, 16, 22, 0.88);
    border: 1px solid var(--hairline);
    border-radius: var(--r-pill);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  }
  .tab-item {
    flex: initial; max-width: none;
    flex-direction: row; gap: 8px;
    font-size: 13px;
    padding: 0 18px;
    border-radius: var(--r-pill);
  }
  .tab-item .icon { width: 20px; height: 20px; }
  .tab-item.active { background: rgba(255, 59, 48, 0.12); }

  .chat-composer { border-radius: var(--r-lg) var(--r-lg) 0 0; border: 1px solid var(--hairline); border-bottom: 0; }

  .landing { gap: 88px; padding-top: var(--sp-lg); }
  .landing-hero { grid-template-columns: 1.15fr 1fr; gap: 56px; }
  .landing-grid3 { grid-template-columns: repeat(3, 1fr); }
  .landing-step { padding: var(--sp-sm); }
}
