:root {
  --bg: #14171D;
  --panel: #1B1F27;
  --panel-raised: #20242E;
  --border: #2A2F3A;
  --text: #E7E9EC;
  --text-muted: #8B93A1;
  --accent-amber: #F5A623;
  --accent-amber-dim: #7A5518;
  --accent-teal: #34C3A6;
  --accent-teal-dim: #1B5F52;
  --danger: #E0555A;
  --font-ui: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
  --radius: 4px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 16px 4px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
/* legacy wrapper kept for pages that still nest the wordmark in it (privacy.html/terms.html) --
   harmless as a plain block inside the grid's first column */
.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.wordmark:hover { color: var(--text); }
.wordmark-icon { border-radius: 3px; display: block; }
.wordmark span { color: var(--text); font-size: 15px; }

@media (max-width: 640px) {
  .topbar { grid-template-columns: 1fr auto; row-gap: 12px; }
  .topbar .wordmark { grid-row: 1; grid-column: 1; }
  .topbar .nav-right { grid-row: 1; grid-column: 2; }
  .topbar .page-tabs { grid-row: 2; grid-column: 1 / -1; justify-self: stretch; }
  .topbar .page-tab { flex: 1; padding: 8px 4px; }
}

a { color: var(--accent-teal); text-decoration: none; }
a:hover { color: #5BD8BE; }

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

#app.wide { max-width: 1040px; }

/* reading-width column used inside a .wide page for text-heavy sections
   (grids/showcases stay full-width; prose stays a comfortable line length) */
.docs-col { max-width: 700px; margin: 0 auto; }

.nav-cta {
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  color: #1A1204;
  background: var(--accent-amber);
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius);
  padding: 9px 16px;
  white-space: nowrap;
  justify-self: end;
}
.nav-cta:hover { background: #FFB43A; border-color: #FFB43A; color: #1A1204; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-self: end;
  flex-wrap: wrap;
  row-gap: 8px;
}
.nav-support {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-amber);
  text-decoration: none;
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius);
  padding: 8px 14px;
  white-space: nowrap;
}
.nav-support:hover { background: var(--accent-amber); color: #1A1204; }
.nav-support-icon { flex: none; }

@media (max-width: 480px) {
  .nav-support { padding: 8px 9px; }
  .nav-support-label { display: none; }
}

.page-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  justify-self: center;
}
.page-tab {
  flex: 0 0 auto;
  text-align: center;
  text-decoration: none;
  background: transparent;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 18px;
  white-space: nowrap;
}
.page-tab:last-child { border-right: none; }
.page-tab.active { background: var(--accent-amber); color: #1A1204; }
.page-tab:hover:not(.active) { color: var(--text); }

/* ---------- hero ---------- */
.hero {
  padding: 60px 12px 36px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero img { width: 84px; height: 84px; display: block; margin-bottom: 24px; }
.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin: 0 0 14px;
}
.hero h1 {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 16px;
  text-wrap: pretty;
}
.hero p.sub {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 44ch;
  margin: 0 0 28px;
}
.hero .note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin: 16px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius);
  padding: 13px 28px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  background: var(--accent-amber);
  color: #1A1204;
}
.btn:hover { background: #FFB43A; color: #1A1204; }

/* ---------- panel / cards ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.section { padding: 0 4px 48px; }
.section-label {
  font-size: 12.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 20px;
  text-align: center;
}
.section-label.emphasis {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 24px;
}

/* ---------- crossfade diagram ---------- */
.diagram-note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  margin: 16px 0 0;
  line-height: 1.6;
}

/* ---------- how it works ---------- */
.step-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 820px) { .step-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { display: flex; flex-direction: column; gap: 12px; }
.step-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.step-body { flex-grow: 1; min-width: 0; }
.step-body h3 { margin: 0 0 6px; font-size: 15.5px; }
.step-body p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.55; color: var(--text-muted); }
.mini-code {
  background: #0F1216;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- two import options ---------- */
.options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 480px) { .options-grid { grid-template-columns: 1fr; } }
.option-card h4 {
  margin: 0 0 8px;
  font-size: 14.5px;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.option-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent-teal);
  border: 1px solid var(--accent-teal-dim);
  background: rgba(52, 195, 166, 0.07);
  padding: 3px 7px;
  border-radius: var(--radius);
}
.option-card p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.apikey-howto {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 4px;
}
.apikey-howto p { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: var(--text-muted); max-width: 64ch; }
.apikey-howto ol { margin: 0 0 10px; padding-left: 20px; font-size: 13px; line-height: 1.7; color: var(--text-muted); max-width: 64ch; }
.apikey-howto a { font-family: var(--font-mono); font-size: 12.5px; }

/* ---------- feature grid ---------- */
.features-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 820px) { .features-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .features-grid { grid-template-columns: 1fr; } }
.features-grid .panel p { margin: 0; font-size: 13.5px; line-height: 1.5; }

/* ---------- notice boxes ---------- */
.notice { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.notice p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--text-muted); max-width: 70ch; }
.notice + .notice { margin-top: 10px; }

/* ---------- FAQ list (About page) ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item h3 { margin: 0 0 8px; font-size: 15px; color: var(--text); }
.faq-item p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--text-muted); max-width: 70ch; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; }
.site-footer .links { margin: 0 0 10px; font-size: 12.5px; color: var(--text-muted); }
.site-footer .legal { margin: 0 0 10px; font-size: 11.5px; line-height: 1.6; color: var(--text-muted); max-width: 52ch; margin-left: auto; margin-right: auto; }
.site-footer .domain { margin: 0; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.site-footer .domain a { font-family: var(--font-mono); }
.site-footer .links + .links { margin-top: -4px; }


/* ==================== NEW (2026-09-11): showcase mockups moved from index.html inline <style>, plus new mockup classes for blocked/replacement, presets, export/import, and the redesigned feature grid ==================== */

/* ---------- showcase (static UI mockups, real classes/colors, placeholder content) ---------- */
.showcase-list { display: flex; flex-direction: column; gap: 14px; }
.showcase-card { display: flex; align-items: center; gap: 28px; }
.showcase-card.reverse { flex-direction: row-reverse; }
.showcase-mock { flex: 0 0 auto; width: 44%; min-width: 220px; }
.showcase-copy { flex: 1; min-width: 0; }
.showcase-copy h3 { margin: 0 0 8px; font-size: 16.5px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.showcase-copy p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
@media (max-width: 640px) {
  .showcase-card, .showcase-card.reverse { flex-direction: column; align-items: stretch; }
  .showcase-mock { width: 100%; }
}
.mock-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.mock-stage {
  aspect-ratio: 16/9;
  border-radius: 3px;
  background:
    radial-gradient(circle at 28% 24%, rgba(245,166,35,0.38), transparent 52%),
    radial-gradient(circle at 74% 78%, rgba(52,195,166,0.32), transparent 52%),
    linear-gradient(135deg, #232C34, #171D23);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px; position: relative; overflow: hidden;
}
.mock-stage svg { opacity: 0.55; }
.mock-meter { position: absolute; top: 10px; right: 12px; display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.mock-meter span { width: 3px; background: var(--accent-amber); border-radius: 1px; }
.mock-meter span:nth-child(1) { height: 55%; } .mock-meter span:nth-child(2) { height: 100%; }
.mock-meter span:nth-child(3) { height: 35%; } .mock-meter span:nth-child(4) { height: 75%; }
.mock-title { font-size: 14.5px; font-weight: 600; margin: 0 0 2px; }
.mock-channel { font-size: 12px; color: var(--text-muted); margin: 0 0 12px; }
.mock-scrub { position: relative; height: 5px; background: #0F1216; border-radius: 3px; margin-bottom: 6px; }
.mock-scrub-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 42%; background: var(--accent-amber); border-radius: 3px; }
.mock-scrub-marker { position: absolute; top: -3.5px; width: 2px; height: 12px; background: var(--accent-teal); left: 60%; }
.mock-times { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); margin: 0 0 14px; }
.mock-transport { display: flex; align-items: center; justify-content: center; gap: 16px; }
.mock-transport .mock-icon-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.mock-transport .mock-play { width: 40px; height: 40px; background: var(--accent-amber); border-color: var(--accent-amber); color: #1A1204; }
.mock-row { margin-bottom: 14px; }
.mock-row:last-child { margin-bottom: 0; }
.mock-row label { display: block; font-size: 11.5px; color: var(--text-muted); margin-bottom: 7px; }
.mock-row label span { color: var(--accent-amber); font-family: var(--font-mono); }
.mock-range { height: 4px; background: var(--border); border-radius: 2px; position: relative; }
.mock-range-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--accent-amber); }
.mock-range-thumb { position: absolute; top: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-amber); border: 2px solid var(--panel); margin-left: -8px; }
.mock-toggle-row { display: flex; gap: 8px; }
.mock-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 11px; }
.mock-toggle.on { background: var(--accent-teal); border-color: var(--accent-teal); color: #08251F; }
.mock-queue-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #22262F; }
.mock-queue-item:last-child { border-bottom: none; }
.mock-queue-item.now .mock-title-sm { color: var(--accent-amber); }
.mock-thumb { width: 32px; height: 32px; border-radius: 3px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.mock-title-sm { font-size: 12.5px; margin: 0; }
.mock-sub-sm { font-size: 10.5px; color: var(--text-muted); margin: 0; }
.mock-sleep { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-top: 14px; }
.mock-sleep span { flex: 1; text-align: center; font-size: 10.5px; padding: 6px 2px; color: var(--text-muted); border-right: 1px solid var(--border); }
.mock-sleep span:last-child { border-right: none; }
.mock-sleep span.on { background: var(--accent-amber); color: #1A1204; }

/* ---------- new: blocked-track / find-replacement mockup ---------- */
.mock-blocked { opacity: .65; }
.mock-blocked .mock-title-sm { text-decoration: line-through; }
.mock-blocked-badge { display: inline-block; font-family: var(--font-mono); font-size: 9.5px; color: var(--danger); border: 1px solid rgba(224,85,90,.4); background: rgba(224,85,90,.08); padding: 1px 6px; border-radius: 3px; margin-left: 7px; vertical-align: middle; }
.mock-find-btn { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-ui); font-size: 11px; font-weight: 600; color: var(--accent-teal); border: 1px solid var(--accent-teal-dim); border-radius: 3px; padding: 4px 9px; margin-top: 6px; background: none; }
.mock-suggest-row { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.mock-suggest-card { flex: 1; border: 1px solid var(--border); border-radius: 3px; padding: 8px; text-align: center; }
.mock-suggest-card .mock-sq {
  width: 100%; aspect-ratio: 16/10; border-radius: 2px; margin-bottom: 6px;
  background:
    radial-gradient(circle at 30% 30%, rgba(245,166,35,.4), transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(52,195,166,.35), transparent 55%),
    linear-gradient(135deg, #232C34, #171D23);
}
.mock-suggest-card.alt .mock-sq {
  background:
    radial-gradient(circle at 70% 25%, rgba(52,195,166,.4), transparent 55%),
    radial-gradient(circle at 25% 80%, rgba(245,166,35,.35), transparent 55%),
    linear-gradient(135deg, #232C34, #171D23);
}
.mock-suggest-card p { margin: 0; font-size: 9.5px; color: var(--text-muted); line-height: 1.4; }
.mock-suggest-card .use-btn { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 9px; color: var(--accent-amber); border: 1px solid var(--accent-amber-dim); border-radius: 3px; padding: 3px; }

/* ---------- new: presets + export/import mockup ---------- */
.mock-chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.mock-chip { display: flex; align-items: center; gap: 6px; font-family: var(--font-ui); font-size: 11.5px; border: 1px solid var(--border); border-radius: 20px; padding: 5px 6px 5px 12px; color: var(--text); }
.mock-chip.active { border-color: var(--accent-amber); color: var(--accent-amber); }
.mock-chip .x { width: 16px; height: 16px; border-radius: 50%; background: var(--panel-raised); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-muted); }
.mock-add-chip { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 20px; padding: 5px 12px; }
.mock-io-row { display: flex; gap: 8px; }
.mock-io-btn { flex: 1; text-align: center; font-family: var(--font-ui); font-size: 11.5px; font-weight: 600; border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 6px; color: var(--text-muted); }
.mock-io-btn svg { display: block; margin: 0 auto 4px; }

/* ---------- new: keyboard shortcut key-cap mockup ---------- */
.mock-keys-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.mock-keys-row:not(:last-child) { border-bottom: 1px solid #22262F; }
.mock-key { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 8px; background: var(--panel-raised); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text); }
.mock-keys-label { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

/* ---------- new: multi-tab mockup ---------- */
.mock-tabs-row { display: flex; gap: 10px; }
.mock-tab { flex: 1; border: 1px solid var(--border); border-radius: 6px; padding: 10px; text-align: center; }
.mock-tab.playing { border-color: var(--accent-amber); }
.mock-tab .mock-tab-dot { width: 8px; height: 8px; border-radius: 50%; margin: 0 auto 6px; background: var(--border); }
.mock-tab.playing .mock-tab-dot { background: var(--accent-amber); }
.mock-tab p { margin: 0; font-size: 10.5px; color: var(--text-muted); }
.mock-tab.playing p.state { color: var(--accent-amber); font-weight: 600; }

/* ---------- badge ---------- */
.badge-new { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #08251F; background: var(--accent-teal); padding: 2px 7px; border-radius: 3px; }

.section-sub { text-align: center; font-size: 13.5px; color: var(--text-muted); margin: 0 0 28px; margin-top: -12px; }

/* ---------- redesigned feature grid (replaces the old plain-text features-grid on the homepage) ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 820px) { .feat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .feat-grid { grid-template-columns: 1fr; } }
.feat-card { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 18px 16px; transition: border-color .15s, background .15s; color: var(--text); text-decoration: none; }
.feat-card:hover { border-color: var(--accent-teal); background: var(--panel-raised); }
.feat-icon { width: 34px; height: 34px; border-radius: 8px; background: rgba(52,195,166,.1); border: 1px solid var(--accent-teal-dim); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.feat-icon svg { width: 17px; height: 17px; }
.feat-card h4 { margin: 0 0 5px; font-size: 13.5px; font-weight: 600; }
.feat-card p { margin: 0; font-size: 12px; line-height: 1.55; color: var(--text-muted); }
.feat-card .feat-goto { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 10.5px; color: var(--accent-teal); margin-top: 9px; opacity: 0; transition: opacity .15s; }
.feat-card:hover .feat-goto { opacity: 1; }


/* ---------- hero v2 (2026-09-12): two-column hero merging old .hero + the
   standalone crossfade-diagram section; replaces both on index.html ---------- */
.hero-v2 {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 56px 4px 40px;
}
.hero-v2-copy { flex: 1 1 420px; min-width: 0; }
.hero-v2-copy .eyebrow { margin: 24px 0 14px; }
.hero-v2-copy h1 { font-size: 34px; line-height: 1.22; font-weight: 700; margin: 0 0 16px; text-wrap: pretty; }
.hero-v2-copy .sub { font-size: 15.5px; line-height: 1.6; color: var(--text-muted); max-width: 46ch; margin: 0 0 26px; }
.hero-v2-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-v2-cta .note { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); margin: 0; }

.hero-v2-diagram { flex: 0 0 480px; width: 480px; max-width: 100%; }
.diagram-card {
  position: relative;
  border-radius: 8px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 26% 20%, rgba(245,166,35,0.30), transparent 55%),
    radial-gradient(circle at 76% 82%, rgba(52,195,166,0.26), transparent 55%),
    linear-gradient(135deg, #232C34, #171D23);
  padding: 26px 22px 22px;
}
.diagram-card-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 24px;
}
.diagram-card svg { display: block; width: 100%; height: auto; }
.diagram-card .diagram-note { text-align: left; margin: 18px 0 0; }

@media (max-width: 760px) {
  .hero-v2 { flex-direction: column; align-items: stretch; padding-top: 40px; gap: 32px; }
  .hero-v2-diagram { flex: none; width: 100%; }
  .hero-v2-copy h1 { font-size: 27px; }
}
