@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url('/client/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url('/client/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500 700;
  src: url('/client/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #090c12;
  --bg-elev: #0d121b;
  --panel: #111723;
  --panel2: #171f2e;
  --border: #243044;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --amber: #f59e0b;
  --amber-hover: #fbbf24;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --amber-glow: rgba(245, 158, 11, 0.25);
  --text: #f3f6fc;
  --muted: #94a3b8;
  --green: #34d399;
  --green-soft: rgba(16, 185, 129, 0.12);
  --red: #f87171;
  --red-soft: rgba(239, 68, 68, 0.12);
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (pointer: fine) {
  html { overscroll-behavior: none; }
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  background:
    radial-gradient(1100px 520px at 50% -140px, rgba(245, 158, 11, 0.08) 0%, transparent 62%),
    radial-gradient(900px 480px at 50% -60px, #131c2e 0%, var(--bg) 60%);
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[id] { scroll-margin-top: 84px; }

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

.skip-link {
  position: fixed;
  top: -120px;
  inset-inline-start: 16px;
  z-index: 100;
  background: var(--amber);
  color: #000;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.skip-link:focus-visible {
  top: 14px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

button, a, summary, input, select, textarea {
  touch-action: manipulation;
}

/* Sticky Glass Navigation */
.topnav-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 12, 18, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--amber); font-weight: 800; }
.brand img { border-radius: 8px; flex-shrink: 0; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 4px;
  position: relative;
  transition: color .16s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  text-decoration: none;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-right > * { white-space: nowrap; flex-shrink: 0; }

/* Language & Mobile Menu */
.lang-menu, .mobile-nav { position: relative; }
.lang-menu summary, .mobile-nav summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  min-height: 40px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 6px 11px;
  border-radius: 10px;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.lang-menu summary::-webkit-details-marker,
.mobile-nav summary::-webkit-details-marker { display: none; }
.lang-menu summary svg, .mobile-nav summary svg { width: 16px; height: 16px; flex-shrink: 0; }
.lang-menu[open] summary,
.lang-menu summary:hover,
.mobile-nav[open] summary,
.mobile-nav summary:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.lang-menu ul, .mobile-nav ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 170px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  z-index: 60;
}
.mobile-nav ul { min-width: 210px; }
.lang-menu li a, .mobile-nav li a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: background-color .14s ease, color .14s ease;
}
.lang-menu li a:hover, .mobile-nav li a:hover {
  background: var(--panel2);
  text-decoration: none;
}
.lang-menu li a[aria-current="true"],
.mobile-nav li a.active {
  color: var(--amber);
  font-weight: 700;
  background: var(--amber-soft);
}
.mobile-nav { display: none; }
.mobile-nav summary { min-width: 44px; min-height: 44px; padding: 6px 10px; }

/* Buttons */
.btn, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .12s ease, box-shadow .16s ease;
}
.btn:hover, .btn-ghost:hover { text-decoration: none; }
.btn:active, .btn-ghost:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-sm { min-height: 40px; padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn-ghost {
  background: var(--panel);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); background: var(--panel2); }
.btn-amber {
  background: var(--amber);
  color: #090c12;
  font-weight: 700;
  border-color: var(--amber);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.22);
}
.btn-amber:hover {
  background: var(--amber-hover);
  border-color: var(--amber-hover);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}
.btn-danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-warn { background: transparent; border: 1px solid var(--amber); color: var(--amber); }
.btn-warn:hover { background: var(--amber-soft); }

/* Hero */
.hero {
  text-align: center;
  padding: 40px 20px 18px;
  max-width: 820px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  color: var(--text);
  font-weight: 800;
  text-wrap: balance;
}
.hero p.lead {
  font-size: 16.5px;
  color: var(--muted);
  margin: 0 auto 18px;
  max-width: 64ch;
  line-height: 1.65;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.badge-accent {
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}
.badge svg { width: 14px; height: 14px; color: var(--amber); flex-shrink: 0; }
.hero-cta { padding-inline: 28px; }

/* Sections & Layout Grid */
.section { max-width: 1120px; margin: 0 auto; padding: 34px 20px; }
.section-workspace { padding-top: 14px; }
.section-title {
  text-align: center;
  font-size: clamp(1.375rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  text-wrap: balance;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 62ch;
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 920px) {
  .grid-2 { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.card-console {
  position: relative;
  border-top: 2px solid var(--amber);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.045) 0%, var(--panel) 110px);
}
.card h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: -0.015em; text-wrap: balance; }
.card .sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; line-height: 1.55; }

/* Inline Account Bar inside Pairing Console */
.pair-acct-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  margin: 12px 0 4px;
  border-radius: 10px;
  background: var(--panel2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.pair-acct-bar.signed-in {
  background: var(--green-soft);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--text);
}
.pair-acct-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pair-acct-jump {
  background: none;
  border: none;
  color: var(--amber);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 2px;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: underline;
}
.pair-acct-jump:hover { color: var(--amber-hover); }

/* Form Inputs */
label { font-size: 12.5px; font-weight: 600; color: var(--muted); display: block; margin: 12px 0 5px; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  min-height: 44px;
  margin: 4px 0;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}
input::placeholder { color: #64748b; }

#code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  text-align: center;
  letter-spacing: 0.32em;
  font-weight: 700;
  padding: 14px 12px;
  min-height: 60px;
  background: #06090e;
  color: var(--amber);
  border-color: #2c3a52;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);
}
#code::placeholder { letter-spacing: 0.25em; font-weight: 500; color: #475569; }

.playlist-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 0;
}
.badge-optional {
  font-size: 11px;
  font-weight: 700;
  background: var(--panel2);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: .04em;
}
.playlist-sync-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--green-soft);
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 12px 14px;
  border-radius: 12px;
  margin: 14px 0 10px;
}
.playlist-sync-notice .sync-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #06120e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.playlist-sync-notice .sync-body { flex: 1; min-width: 0; }
.playlist-sync-notice .sync-body strong { display: block; font-size: 14px; color: var(--text); line-height: 1.35; }
.playlist-sync-notice .sync-body .sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.35; }

.btn-toggle-playlist {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--amber);
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 14px;
  width: 100%;
  font-family: inherit;
  transition: background-color .16s ease, border-color .16s ease;
}
.btn-toggle-playlist:hover { background: var(--amber-soft); border-color: var(--amber); }

/* Tabs (button[role=tab]) */
.tabs, .auth-tabs {
  display: flex;
  gap: 6px;
  margin: 12px 0 8px;
  background: var(--bg);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.tab, .auth-tab {
  flex: 1;
  min-height: 40px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: background-color .16s ease, color .16s ease;
}
.tab:hover, .auth-tab:hover { color: var(--text); }
.tab.active, .auth-tab.active { background: var(--amber); color: #090c12; font-weight: 700; }
.tab-content, .auth-form { display: none; }
.tab-content.active, .auth-form.active { display: block; }

.terms-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 12px;
  background: var(--panel2);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 10px;
}
.terms-line input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 2px 0 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--amber);
  cursor: pointer;
}
.terms-line label { margin: 0; font-size: 13.5px; color: var(--text); cursor: pointer; font-weight: 500; line-height: 1.45; }
.terms-line.error { border-color: var(--red); background: var(--red-soft); }
.terms-line.error label { color: var(--red); }
.terms-line .btn-terms-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.terms-link {
  background: none;
  border: none;
  color: var(--amber);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
}
.terms-link:hover { color: var(--amber-hover); }

.status { margin: 14px 0 0; font-size: 14px; min-height: 20px; text-align: center; font-weight: 500; }
.success { color: var(--green); }
.error { color: var(--red); }

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: start;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.notice strong { color: var(--amber); }

/* How It Works Steps */
.steps { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: start;
}
.step .num {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--amber);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* Screenshots Gallery */
.shots { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .shots { grid-template-columns: 1fr 1fr; } }
.shot-card {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #06090e;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: border-color .18s ease, transform .18s ease;
}
.shot-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .shot-card:hover { border-color: rgba(245, 158, 11, 0.55); transform: translateY(-2px); }
  .shot-card:hover img { transform: scale(1.02); }
}

/* About, Platform Matrix & FAQ */
.about-text { color: var(--muted); max-width: 68ch; margin: 0 auto; text-align: center; line-height: 1.7; }
.doc-updated { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0; }

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}
.compat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.compat-table th, .compat-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}
.compat-table th {
  background: var(--panel2);
  color: var(--amber);
  font-weight: 700;
  font-size: 13px;
}
.compat-table tr:last-child td { border-bottom: none; }
.compat-table td:first-child { font-weight: 600; color: var(--text); }
.compat-table td { color: var(--muted); }

.faq-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .faq-grid { grid-template-columns: 1fr 1fr; } }
.faq-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--amber);
  border-radius: 14px;
  padding: 20px 22px;
  text-align: start;
}
.faq-item h3 { margin: 0 0 8px; font-size: 16px; color: var(--text); line-height: 1.4; }
.faq-item p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.65; }

/* Accordions */
.accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--panel);
}
.accordion summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '+'; font-size: 20px; color: var(--amber); font-weight: 600; }
.accordion[open] summary::after { content: '−'; }
.accordion .acc-body { padding: 0 18px 18px; color: var(--muted); font-size: 14px; line-height: 1.65; }

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  margin-top: 44px;
  padding: 30px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.footer-links {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-links a { color: var(--muted); padding: 4px 2px; transition: color .15s ease; }
.footer-links a:hover { color: var(--amber); }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 11, 0.78);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 70;
  padding: 18px;
  overscroll-behavior: contain;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  width: 100%;
  max-width: 620px;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}
.modal h2 { margin: 0 0 4px; font-size: 20px; padding-inline-end: 36px; }
.modal .close {
  position: absolute;
  top: 12px;
  inset-inline-end: 14px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: none;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal .close:hover { color: var(--text); background: var(--panel2); }

.terms-modal-body {
  max-height: 55vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 14px 0 10px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
}
.terms-modal-body h3 { color: var(--amber); margin: 14px 0 6px; font-size: 15px; }
.terms-modal-body h3:first-child { margin-top: 0; }
.terms-modal-body hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.terms-scroll-done { padding: 14px 0 6px; text-align: center; font-weight: 700; color: var(--amber); }
.terms-scroll-hint { font-size: 12.5px; color: var(--amber); margin-bottom: 12px; text-align: center; }

/* Auth Widgets */
.google-signin-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  margin: 8px 0 14px;
}
.google-signin-container iframe { margin: 0 auto !important; }
.or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
  margin: 12px 0;
}
.or-divider::before, .or-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.or-divider span { padding: 0 12px; }
.guest-notice { text-align: center; margin: 14px 0 0; color: var(--muted); font-size: 12.5px; }

.turnstile-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 14px auto 4px;
  min-height: 65px;
}
.turnstile-container .cf-turnstile { display: inline-block; margin: 0 auto; }
.auth-status { font-size: 13px; min-height: 18px; margin: 10px 0 0; }
.auth-sublink-row { margin-top: 8px; text-align: end; }
.auth-sublink {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
}
.auth-sublink:hover { color: var(--amber); }
.account-actions { display: grid; gap: 10px; margin-top: 18px; }
.account-actions .btn, .account-actions .btn-ghost { width: 100%; }

/* Download Page */
.dl-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 20px 0 8px;
}
@media (min-width: 640px) {
  .dl-cards { grid-template-columns: 1fr 1fr; }
}
.dl-option-card {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: center;
}
.dl-option-card h2 { font-size: 17px; margin: 0; }
.dl-option-meta { font-size: 13px; color: var(--muted); margin: 0; font-variant-numeric: tabular-nums; }
.play-badge-link {
  display: inline-block;
  line-height: 0;
  transition: transform .16s ease;
}
.play-badge-link:hover { transform: translateY(-2px); }
.play-badge-img { height: 48px; width: auto; display: block; }
.apk-btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 16px;
  border-radius: 12px;
}
.apk-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.apk-btn small { font-weight: 500; font-size: 12.5px; opacity: .82; }

.dl-guide { text-align: start; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.dl-guide h2 { font-size: 18px; margin: 18px 0 8px; color: var(--amber); }
.dl-guide p, .dl-guide li { font-size: 14.5px; color: var(--muted); line-height: 1.65; }
.dl-guide ol, .dl-guide ul { padding-inline-start: 22px; margin: 8px 0; }
.dl-guide code { font-family: var(--font-mono); font-size: 13px; background: var(--panel2); padding: 2px 6px; border-radius: 6px; color: var(--text); }

/* Legal & Pricing Pages */
.player-only { border-color: rgba(245, 158, 11, 0.55); margin-bottom: 18px; font-size: 14.5px; line-height: 1.6; }
.legal h2 { font-size: 19px; margin: 28px 0 10px; color: var(--amber); }
.legal p, .legal li { color: var(--muted); line-height: 1.7; max-width: 68ch; }
.legal ul, .legal ol { padding-inline-start: 22px; }
.legal li { margin: 5px 0; }

.pay-hero { text-align: center; margin-bottom: 24px; }
.pay-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin: 0 0 8px; text-wrap: balance; }
.pay-plans-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 20px 0;
}
.plan-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 22px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .16s ease, border-color .16s ease;
}
.plan-card:hover { border-color: rgba(245, 158, 11, 0.45); }
.plan-title { font-size: 19px; margin: 0 0 6px; font-weight: 700; color: var(--text); }
.plan-card.featured {
  border-color: var(--amber);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--panel) 100%);
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.12);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber);
  color: #090c12;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: .04em;
}
.plan-price {
  font-size: 36px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin: 10px 0 6px;
}
.plan-price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan-features {
  list-style: none;
  padding: 0;
  margin: 16px 0 22px;
  text-align: start;
  font-size: 14px;
  color: var(--muted);
}
.plan-features li { padding: 5px 0; display: flex; align-items: flex-start; gap: 8px; }
.plan-features li::before { content: '✓'; color: var(--amber); font-weight: 800; }

.period-toggle {
  display: flex;
  gap: 6px;
  max-width: 320px;
  margin: 22px auto 6px;
  background: var(--panel);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.period-toggle label { flex: 1; position: relative; margin: 0; }
.period-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; min-height: 0; }
.period-toggle span {
  display: block;
  text-align: center;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.period-toggle input:checked + span { background: var(--amber); color: #090c12; }
.period-toggle input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.plans:has(input[value="yearly"]:checked) .per-lifetime,
.plans:has(input[value="lifetime"]:checked) .per-yearly { display: none; }
.tv-status, .my-plan { text-align: center; margin-bottom: 16px; }

/* 404 Card */
.not-found-card {
  max-width: 520px;
  margin: 36px auto;
  text-align: center;
  padding: 36px 26px;
}
.not-found-code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 48px;
  font-weight: 800;
  color: var(--amber);
  margin: 0 0 8px;
  line-height: 1;
}

/* Responsive Breakpoints */
@media (max-width: 820px) {
  .nav-links, .nav-web-desktop { display: none; }
  .mobile-nav { display: block; }
}

@media (max-width: 640px) {
  .topnav { padding: 10px 14px; gap: 8px; }
  .brand { font-size: 18px; gap: 8px; }
  .hero { padding: 24px 16px 8px; }
  .hero h1 { font-size: 26px; }
  .hero p.lead { font-size: 15px; margin-bottom: 14px; }
  .chips { margin-bottom: 14px; gap: 6px; }
  .badge { font-size: 12px; padding: 5px 10px; }
  .section { padding: 22px 14px; }
  .section-workspace { padding-top: 8px; }
  .card { padding: 20px 16px; border-radius: 14px; }
  .card h2 { font-size: 19px; }
  .about-text { font-size: 14.5px; text-align: start; }
  .how .step { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; padding: 14px; }
  .how .step .num { grid-row: span 2; margin: 0; width: 36px; height: 36px; font-size: 15px; }
  .how .step h3 { font-size: 15.5px; margin-bottom: 3px; }
}

@media (max-width: 420px) {
  .topnav { padding: 8px 10px; gap: 6px; }
  .brand { font-size: 15px; gap: 5px; }
  .brand img { width: 22px; height: 22px; }
  .nav-right { gap: 4px; min-width: 0; }
  .nav-right #accountBtn {
    display: inline-block;
    max-width: 112px;
    line-height: 26px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 6px 8px;
    font-size: 12px;
    text-align: center;
  }
  .lang-menu summary { padding: 6px 7px; font-size: 12px; gap: 4px; }
  .mobile-nav summary { min-width: 40px; min-height: 40px; padding: 6px 8px; }
  #code { font-size: 24px; letter-spacing: 0.24em; }
  .pair-acct-bar { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 360px) {
  .nav-right #accountBtn { max-width: 84px; }
}

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