/* ========================================================
   AETHER EQ — Design System
   Theme: Cyan / Black / White — 60/30/10 Rule
   60% Black (backgrounds, panels)
   30% White (text, borders, subtle UI)
   10% Cyan (accent, CTAs, glow effects)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties ────────────────────────────── */
:root {
  color-scheme: dark;
  /* 60% — Black (Dominant) */
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1C1C1C;
  --bg-elevated: #1A1A1A;
  --bg-input: #0E0E0E;

  /* 30% — White (Secondary) — bumped contrast for a sharper read */
  --text-primary: #f7fafc;
  --text-secondary: #c8ced4;
  --text-muted: #8a939c;
  --border-subtle: rgba(255, 255, 255, 0.085);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.22);

  /* 10% — Cyan (Accent) */
  --accent: #12d8ea;
  --accent-hover: #34e5f1;
  --accent-dark: #00a2b8;
  --accent-glow: rgba(18, 216, 234, 0.28);
  --accent-subtle: rgba(18, 216, 234, 0.12);
  --accent-border: rgba(18, 216, 234, 0.42);

  /* Typography — Space Grotesk (HUD / tech headlines), DM Sans (UI + long copy) */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 12px var(--accent-glow), 0 0 28px rgba(18, 216, 234, 0.12);
  --shadow-glow-sm: 0 0 8px var(--accent-glow);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Glass — less blur + saturation reads sharper on panels */
  --glass-bg: rgba(18, 18, 18, 0.82);
  --glass-border: rgba(255, 255, 255, 0.11);
  --glass-blur: blur(12px) saturate(1.15);
}

html[data-aether-theme='light'] {
  color-scheme: light;
  --bg-primary: #f2f5f8;
  --bg-secondary: #e8edf3;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f4f9;
  --bg-elevated: #fafcfe;
  --bg-input: #eef2f7;
  --text-primary: #0f1419;
  --text-secondary: #3d4f5f;
  --text-muted: #5c6e7f;
  --border-subtle: rgba(15, 20, 25, 0.08);
  --border-medium: rgba(15, 20, 25, 0.12);
  --border-strong: rgba(15, 20, 25, 0.18);
  --accent-glow: rgba(0, 145, 160, 0.22);
  --accent-subtle: rgba(0, 145, 160, 0.1);
  --accent-border: rgba(0, 145, 160, 0.35);
  --shadow-sm: 0 2px 8px rgba(15, 20, 25, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 20, 25, 0.08);
  --shadow-lg: 0 8px 32px rgba(15, 20, 25, 0.1);
  --shadow-glow: 0 0 12px var(--accent-glow), 0 0 24px rgba(0, 145, 160, 0.08);
  --shadow-glow-sm: 0 0 8px var(--accent-glow);
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(15, 20, 25, 0.1);
}

html[data-aether-theme='light'] body.community-theme {
  --bg-primary: #f2f5f8;
  --bg-secondary: #e8edf3;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f4f9;
  --bg-elevated: #fafcfe;
  --bg-input: #eef2f7;
  --bg-deep: #e2e8f0;
  --text-primary: #0f1419;
  --text-secondary: #3d4f5f;
  --text-muted: #5c6e7f;
}

html[data-aether-theme='light'] body.community-theme .community-account-signed-in,
html[data-aether-theme='light'] body.community-theme .community-toolbar,
html[data-aether-theme='light'] body.community-theme .community-dropzone,
html[data-aether-theme='light'] body.community-theme .community-external-details {
  background: rgba(15, 20, 25, 0.04);
}

html[data-aether-theme='light'] #shader-bg {
  opacity: 0;
  visibility: hidden;
}

html[data-aether-theme='light'] body::before {
  background: radial-gradient(ellipse at 30% 20%, rgba(0, 145, 160, 0.06) 0%, transparent 52%),
    radial-gradient(ellipse at 70% 80%, rgba(18, 120, 140, 0.04) 0%, transparent 52%);
}

/* Light mode: cards and tiles keep resting colors on hover */
html[data-aether-theme='light'] .glass-card:hover {
  border-color: var(--glass-border);
  background: var(--glass-bg);
  box-shadow: 0 1px 0 rgba(15, 20, 25, 0.04) inset;
}

html[data-aether-theme='light'] .model-item:hover:not(.selected) {
  background: transparent;
  color: var(--text-secondary);
}

html[data-aether-theme='light'] .mode-tab:hover:not(.active) {
  color: var(--text-muted);
  background: transparent;
}

html[data-aether-theme='light'] .ai-chip:hover:not(.active) {
  border-color: var(--border-medium);
  background: transparent;
  color: var(--text-secondary);
  transform: none;
  box-shadow: none;
}

html[data-aether-theme='light'] .guide-step:hover {
  border-color: rgba(136, 165, 182, 0.18);
}

html[data-aether-theme='light'] .guide-step-header:hover {
  background: transparent;
}

html[data-aether-theme='light'] .brand-header:hover {
  color: var(--text-primary);
}

html[data-aether-theme='light'] .community-dropzone {
  background: rgba(15, 20, 25, 0.06);
}

html[data-aether-theme='light'] .community-dropzone:hover:not(.community-dropzone--drag),
html[data-aether-theme='light'] .community-dropzone:focus-within:not(.community-dropzone--drag) {
  border-color: var(--border-subtle);
  background: rgba(15, 20, 25, 0.06);
}

html[data-aether-theme='light'] body.community-theme .community-dropzone:hover:not(.community-dropzone--drag),
html[data-aether-theme='light'] body.community-theme .community-dropzone:focus-within:not(.community-dropzone--drag) {
  background: rgba(15, 20, 25, 0.04);
}

html[data-aether-theme='light'] .landing-benefit,
html[data-aether-theme='light'] .pricing-card {
  background: var(--bg-card);
  border-color: var(--border-medium);
  box-shadow: none;
}

html[data-aether-theme='light'] .landing-benefit:hover,
html[data-aether-theme='light'] .pricing-card:hover {
  background: var(--bg-card);
  border-color: var(--border-medium);
  box-shadow: none;
}

.theme-toggle {
  position: absolute;
  top: var(--space-md);
  right: max(var(--space-md), env(safe-area-inset-right, 0px));
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast),
    color var(--transition-fast), box-shadow var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--accent-border);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow-sm);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle__icons {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  pointer-events: none;
}

.theme-toggle__svg {
  grid-area: 1 / 1;
  width: 1.35rem;
  height: 1.35rem;
}

.theme-toggle__svg--moon {
  display: none;
}

html[data-aether-theme='light'] .theme-toggle__svg--sun {
  display: none;
}

html[data-aether-theme='light'] .theme-toggle__svg--moon {
  display: block;
}

@media (max-width: 520px) {
  .theme-toggle {
    position: fixed;
    top: max(var(--space-sm), env(safe-area-inset-top, 0px));
    right: max(var(--space-sm), env(safe-area-inset-right, 0px));
  }
}

.theme-toggle--embed {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
}

/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.58;
}

#shader-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.52;
}

/* Background ambient effect */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(18, 216, 234, 0.038) 0%, transparent 52%),
              radial-gradient(ellipse at 70% 80%, rgba(94, 234, 212, 0.028) 0%, transparent 52%);
  z-index: 0;
  pointer-events: none;
  animation: ambientShift 28s ease-in-out infinite alternate;
}

@keyframes ambientShift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(1%, -1%) rotate(1.5deg); }
}

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── Layout ───────────────────────────────────────────── */
.app-container {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-lg);
}

/* ── Header / Hero ────────────────────────────────────── */
.header-logo-img {
  max-width: 100%;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 15px var(--accent-glow));
  animation: logoPulse 3s ease-in-out infinite;
}
.header {
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-lg);
  position: relative;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  animation: fadeInDown 0.8s ease-out;
}

button.logo-home-action {
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  border: none;
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
  text-align: inherit;
}

button.logo-home-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

a.logo-container--link {
  text-decoration: none;
  color: inherit;
}

.logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px var(--accent-glow));
  animation: logoPulse 3s ease-in-out infinite;
}

.logo-symbol {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid var(--accent-border);
  background: linear-gradient(140deg, rgba(18, 216, 234, 0.18), rgba(18, 216, 234, 0.04));
  position: relative;
  box-shadow: 0 0 12px rgba(18, 216, 234, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.logo-symbol span {
  position: absolute;
  inset: 12px;
  border-radius: 10px;
  border: 2px solid rgba(18, 216, 234, 0.85);
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 15px var(--accent-glow)); }
  50% { filter: drop-shadow(0 0 25px var(--accent-glow)) brightness(1.1); }
}

.logo-text {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #eef6fb 0%, #67e3f0 48%, #dceaf3 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 300;
  animation: fadeIn 1s ease-out 0.3s both;
}

.auth-panel {
  margin-top: var(--space-lg);
  width: 100%;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--space-md);
}

.auth-panel-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: left;
}

.auth-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.auth-panel-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.auth-status {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.founder-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c9a227, #f5e6a6);
  color: #1a1205;
}

.auth-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  flex-wrap: wrap;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .auth-panel-top {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-panel-actions {
    justify-content: stretch;
  }

  .auth-panel-actions .reset-btn {
    flex: 1;
    min-width: 0;
  }
}

/* ── Mode Selector Tabs ───────────────────────────────── */
.mode-selector {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: var(--space-xs);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.onboarding-screen {
  max-width: 680px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}

.onboarding-copy {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-size: 0.95rem;
}

.tagline-sep {
  opacity: 0.45;
  margin: 0 0.15em;
}

.header-howto-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.header-howto-link:hover {
  border-bottom-color: var(--accent-border);
  color: var(--accent-hover);
}

button.header-howto-link {
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
}

.tagline #header-dashboard-btn {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  line-height: inherit;
  vertical-align: baseline;
}

/* ── How-to page (how-to.html) ────────────────────────── */
.howto-page {
  max-width: 880px;
  margin: 0 auto var(--space-xl);
}

.howto-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: var(--space-lg);
  transition: color var(--transition-fast);
}

.howto-back:hover {
  color: var(--accent);
}

.howto-lead {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  max-width: 40rem;
}

.howto-video-shell {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #000;
  aspect-ratio: 16 / 9;
}

.howto-video-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.howto-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.65;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  min-height: 12rem;
}

.howto-placeholder code {
  font-size: 0.78rem;
  color: var(--accent);
  word-break: break-all;
}

.howto-note {
  margin-top: var(--space-lg);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Legal pages (terms.html, refund.html, privacy.html) ── */
.legal-page {
  max-width: 880px;
  margin: 0 auto var(--space-xl);
  text-align: left;
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-page p,
.legal-page ul,
.legal-page ol,
.legal-page address {
  margin-bottom: var(--space-md);
}

.legal-page a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.legal-page a:hover {
  color: var(--accent-hover);
}

.legal-page code {
  font-size: 0.82rem;
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent);
  word-break: break-word;
}

.legal-page strong {
  color: var(--text-primary);
}

.legal-effective {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-lg);
}

.legal-lead {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.legal-callout {
  border: 1px solid var(--border-medium);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  font-size: 0.92rem;
}

.legal-callout--accent {
  border-color: var(--accent-border);
  background: var(--accent-subtle);
  color: var(--text-primary);
}

.legal-h2 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  scroll-margin-top: var(--space-xl);
}

.legal-ul {
  padding-left: 1.4rem;
}

.legal-ul li {
  margin-bottom: 6px;
}

.legal-address {
  font-style: normal;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-footer-note {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Contact / feedback poll (contact.html) ─────────── */
.feedback-poll {
  margin-top: var(--space-lg);
}

.feedback-poll .legal-h2 {
  margin-top: var(--space-md);
}

.feedback-poll-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 var(--space-lg);
}

.feedback-poll-group {
  border: none;
  margin: 0;
  padding: 0 0 var(--space-md);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.feedback-poll-group--extra {
  padding-top: var(--space-xs);
  padding-bottom: var(--space-md);
  margin-bottom: 0;
  border-bottom: none;
}

.feedback-poll-q {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0;
  margin: 0 0 var(--space-xs);
  display: block;
}

.feedback-poll-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-sm);
}

.feedback-poll-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feedback-poll-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.feedback-poll-option input {
  flex-shrink: 0;
}

.feedback-poll-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.feedback-poll-nps {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  cursor: pointer;
}

.feedback-poll-nps:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.feedback-poll-nps:has(input:checked) {
  border-color: var(--accent-border);
  background: var(--accent-subtle);
}

.feedback-poll-nps:has(input:checked) .feedback-poll-nps-num {
  color: var(--text-primary);
}

.feedback-poll-nps input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.feedback-poll-nps-num {
  font-size: 0.9rem;
  color: var(--text-secondary);
  pointer-events: none;
}

.feedback-poll-input-full {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: var(--space-xs);
}

.feedback-poll-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  align-items: center;
}

.feedback-poll-status {
  margin-top: var(--space-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.checkout-consent {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.checkout-consent a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Community (community.html) ─────────────────────── */
body.community-theme {
  --bg-primary: #2c2c2c;
  --bg-secondary: #343434;
  --bg-card: #3a3a3a;
  --bg-card-hover: #444444;
  --bg-elevated: #3f3f3f;
  --bg-input: #3a3a3a;
  --bg-deep: #333333;
  --text-primary: #ffffff;
  --text-secondary: #ffffff;
  --text-muted: #f0f0f0;
}

body.community-theme .community-account-signed-in,
body.community-theme .community-toolbar,
body.community-theme .community-dropzone,
body.community-theme .community-external-details {
  background: rgba(255, 255, 255, 0.04);
}

body.community-theme .tagline {
  letter-spacing: clamp(1.1px, 0.18vw, 2.2px);
  line-height: 1.55;
  text-wrap: balance;
}

body.community-theme .tagline a {
  white-space: nowrap;
}

.community-page {
  max-width: 960px;
  margin: 0 auto var(--space-xl);
  text-align: left;
}

.community-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: var(--space-md);
  max-width: 52ch;
}

.community-account-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.community-account-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.community-account-heading {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.community-account-signed-in {
  margin: 0;
  max-width: none;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.12);
  justify-self: end;
}

.community-account-display-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.community-account-subheading {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-xs);
}

.community-username-help {
  margin: 0 0 var(--space-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 56ch;
}

.community-username-help strong {
  color: var(--accent);
  font-weight: 600;
}

.community-username-row {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-sm);
  align-items: center;
}

.community-username-input {
  flex: 1 1 250px;
  min-width: 0;
  box-sizing: border-box;
}

.community-username-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-sm);
  align-items: center;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.community-username-btn {
  margin: 0;
  flex: 0 0 auto;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
  padding: 0.5rem 0.8rem;
  font-size: 0.75rem;
}

.community-username-btn--ghost {
  background: transparent;
  border-color: rgba(110, 168, 212, 0.35);
  color: var(--text-secondary);
}

.community-username-btn--ghost:hover {
  border-color: rgba(110, 168, 212, 0.55);
  color: var(--text-primary);
}

.community-username-status {
  margin: var(--space-sm) 0 0;
  min-height: 1.25em;
  font-size: 0.78rem;
  color: var(--accent);
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.community-panel {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.community-panel h3 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-md);
}

.community-panel p,
.community-panel li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.community-panel ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.2rem;
}

.community-panel .ai-generate-btn,
.community-panel .reset-btn {
  margin-top: var(--space-sm);
  width: auto;
  justify-content: center;
}

.community-forum-fallback {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
  line-height: 1.5;
}

.community-eq-file {
  display: block;
  width: 100%;
  margin-top: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

#community-eq-hint {
  margin-top: var(--space-sm);
  min-height: 1.4em;
  font-size: 0.8125rem;
  color: var(--accent);
}

.community-loading {
  max-width: 520px;
  margin: 0 auto var(--space-xl);
  text-align: center;
  padding: var(--space-xl);
}

.community-loading p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.community-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  align-items: center;
  padding: var(--space-sm);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.12);
  row-gap: 10px;
}

.community-toolbar .reset-btn {
  flex: 0 1 auto;
  width: auto;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
  margin-top: 0;
}

.community-forum-config {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.community-forum-config h3 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 var(--space-sm);
}

.community-muted {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 var(--space-md);
}

.community-forum-config-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.community-forum-config-row .search-input {
  flex: 1 1 200px;
  min-width: 0;
}

.community-forum-url-status {
  margin: var(--space-sm) 0 0;
  min-height: 1.25em;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.community-dropzone {
  position: relative;
  display: block;
  margin-top: var(--space-md);
  padding: var(--space-lg) var(--space-md);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base);
}

.community-dropzone:hover,
.community-dropzone:focus-within {
  border-color: rgba(110, 168, 212, 0.45);
}

.community-dropzone--drag {
  border-color: var(--accent);
  background: rgba(110, 168, 212, 0.08);
}

.community-dropzone-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  pointer-events: none;
}

.community-eq-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.community-preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  align-items: flex-start;
}

.community-preset-actions .reset-btn {
  margin-top: 0;
  width: auto;
}

.community-paste-field {
  width: 100%;
  min-height: 88px;
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-secondary);
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  resize: vertical;
}

.community-feed-toolbar {
  align-items: center;
}

.community-sort-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-right: var(--space-xs);
}

.community-sort-select {
  padding: 0.32rem 0.62rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-deep);
  color: var(--text-secondary);
  font-size: 0.78rem;
  margin-right: var(--space-md);
}

.community-filter-preset {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-right: var(--space-md);
  cursor: pointer;
}

.community-composer {
  margin-bottom: var(--space-md);
}

.community-composer .ai-generate-btn {
  width: 100%;
}

.community-input-full {
  width: 100%;
  margin-top: var(--space-sm);
  box-sizing: border-box;
}

.community-composer-body {
  width: 100%;
  margin-top: var(--space-md);
  padding: var(--space-md);
  min-height: 96px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  resize: vertical;
  box-sizing: border-box;
}

.community-dropzone--compact {
  margin-top: var(--space-sm);
  padding: var(--space-md);
}

.community-feed-status {
  margin-top: var(--space-sm);
  min-height: 1.25em;
  font-size: 0.8125rem;
  color: var(--accent);
}

.community-feed-loading,
.community-feed-empty {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: var(--space-md) 0;
}

.community-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.community-post-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  overflow: hidden;
}

@media (max-width: 760px) {
  .community-account-top {
    grid-template-columns: 1fr;
  }

  .community-account-signed-in {
    justify-self: start;
  }

  .community-username-row {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .community-username-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.community-post-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 var(--space-xs);
  color: var(--text-primary);
}

.community-post-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-md);
}

.community-post-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.community-post-preset {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.community-post-preset-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.community-post-preset-pre {
  max-height: 220px;
  overflow: auto;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.72rem;
  line-height: 1.45;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin: 0 0 var(--space-sm);
  white-space: pre-wrap;
  word-break: break-word;
}

.community-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  align-items: center;
}

.community-post-replies-section {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.community-replies-list {
  margin-bottom: var(--space-md);
}

.community-reply-row {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.community-reply-row:last-child {
  border-bottom: none;
}

.community-reply-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.community-reply-body {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.community-reply-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8125rem;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  resize: vertical;
}

.community-external-details {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.community-external-details summary {
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.community-post-actions .reset-btn {
  margin-top: 0;
}

.community-post-copy-preset,
.community-reply-send,
.community-post-toggle-replies,
.community-post-delete,
.community-reply-delete {
  margin-top: 0;
}

.community-sort-select,
.community-filter-preset,
.community-sort-label {
  margin-right: 0;
}

@media (max-width: 920px) {
  body.community-theme .tagline {
    letter-spacing: 1px;
  }

  body.community-theme .tagline a {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .community-toolbar {
    align-items: stretch;
  }

  .community-toolbar .reset-btn,
  .community-toolbar a.reset-btn {
    flex: 1 1 220px;
    text-align: center;
    justify-content: center;
  }

  .community-sort-select {
    flex: 1 1 180px;
    min-width: 0;
  }

  .community-filter-preset {
    flex: 1 1 180px;
  }
}

@media (min-width: 2560px) {
  .app-container {
    max-width: 1760px;
    padding: calc(var(--space-xl) + 4px);
  }

  .community-page {
    max-width: 1180px;
  }

  body.community-theme {
    font-size: 18px;
  }

  body.community-theme .tagline {
    font-size: 1.08rem;
    letter-spacing: 2.4px;
  }

  .community-intro,
  .community-panel p,
  .community-post-body,
  .community-reply-body,
  .community-muted {
    font-size: 0.97rem;
    line-height: 1.72;
  }

  .community-sort-label,
  .community-account-heading,
  .community-account-subheading,
  .community-panel h3 {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
  }

  .community-post-title {
    font-size: 1.18rem;
  }

  .community-post-meta,
  .community-reply-meta,
  .community-feed-status,
  .community-forum-url-status,
  .community-username-status {
    font-size: 0.86rem;
  }

  .community-composer-body {
    min-height: 128px;
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .community-paste-field {
    min-height: 110px;
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .community-post-preset-pre {
    max-height: 300px;
    font-size: 0.82rem;
  }
}

.mode-tab {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: var(--space-sm) var(--space-xl);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  background: transparent;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.mode-tab:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.mode-tab.active {
  background: var(--accent);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow-sm);
}

.mode-tab.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  border-radius: inherit;
}

/* ── Main Grid ────────────────────────────────────────── */
.main-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-md);
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.main-grid.preselect {
  grid-template-columns: 1fr;
  max-width: 460px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Glass Card ───────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.glass-card:hover {
  border-color: var(--border-strong);
  background: rgba(22, 22, 22, 0.88);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, var(--shadow-sm);
}

.card-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.card-title .icon {
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Stroke SVG icons (replaces emoji); filled by js/ui-icons.js */
.aether-icon {
  display: block;
  flex-shrink: 0;
}

.ai-chip [data-aether-icon] {
  display: inline-flex;
}

.ai-chip [data-aether-icon] .aether-icon {
  width: 14px;
  height: 14px;
}

.export-btn .export-icon[data-aether-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.export-btn .export-icon[data-aether-icon] .aether-icon {
  width: 20px;
  height: 20px;
}

.export-btn .arrow[data-aether-icon] {
  display: inline-flex;
  align-items: center;
}

.export-btn .arrow[data-aether-icon] .aether-icon {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}

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

.btn-text-inner [data-aether-icon] .aether-icon {
  width: 16px;
  height: 16px;
}

.reset-btn--icon-leading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.reset-btn--icon-leading [data-aether-icon] .aether-icon {
  width: 16px;
  height: 16px;
}

.simulator-premium-icon {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 6px;
}

.simulator-premium-icon .aether-icon {
  width: 22px;
  height: 22px;
}

.modal-content .export-icon[data-aether-icon] .aether-icon {
  width: 20px;
  height: 20px;
}

/* ── Sidebar — Headphone Selector ─────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Keep the selected-headphone card centered */
#headphone-sidebar .glass-card:first-child .card-title {
  justify-content: center;
}

#selected-headphone {
  text-align: center;
}

/* Center the Pick Your Headphone card content */
#headphone-search-card {
  text-align: center;
}

#headphone-search-card .card-title {
  justify-content: center;
}

#headphone-search-card .howto-lead {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Search Input */
.search-container {
  position: relative;
}

.search-input {
  width: 100%;
  padding: var(--space-md) var(--space-md) var(--space-md) 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: all var(--transition-base);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

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

.search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

/* Brand Groups */
.brand-group {
  margin-bottom: var(--space-md);
}

.brand-header {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: color var(--transition-fast);
}

.brand-header:hover {
  color: var(--text-secondary);
}

.brand-header .chevron {
  transition: transform var(--transition-fast);
  font-size: 0.65rem;
}

.brand-header.collapsed .chevron {
  transform: rotate(-90deg);
}

.brand-header--static {
  cursor: default;
  pointer-events: none;
  border-bottom-color: var(--border-subtle);
}

.headphone-browse-list {
  margin-top: var(--space-sm);
  max-height: min(52vh, 520px);
  min-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.model-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 300px;
  overflow-y: auto;
  transition: max-height var(--transition-slow), opacity var(--transition-slow);
}

.model-list.collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.model-item {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.825rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.model-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.model-item.selected {
  background: var(--accent-subtle);
  color: var(--accent);
  border-left: 2px solid var(--accent);
}

.model-item .model-tags {
  display: flex;
  gap: 4px;
}

.model-tag {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.model-item.selected .model-tag {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* ── Visualizer Section ───────────────────────────────── */
.visualizer-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.assistant-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.guide-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.secondary-tuning-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.eq-canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2.5 / 1;
  min-height: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

#eq-canvas {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.canvas-overlay-label {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-md);
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  pointer-events: none;
}

/* ── EQ Band Sliders (below canvas) ───────────────────── */
.eq-sliders-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: var(--space-sm);
}

.optional-tuning-card {
  padding-top: var(--space-md);
}

.optional-tuning-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  background: transparent;
  border: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.optional-tuning-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.optional-tuning-body {
  margin-top: var(--space-md);
}

.optional-tuning-copy {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.eq-band-label {
  font-family: var(--font-display);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.eq-band-value {
  font-family: var(--font-display);
  font-size: 0.6rem;
  color: var(--accent);
  font-weight: 600;
  min-width: 58px;
  text-align: center;
}

.q-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.q-label {
  font-size: 0.55rem;
  color: var(--text-muted);
}

.q-slider {
  width: 100%;
}

.q-value {
  font-size: 0.6rem;
  color: var(--text-secondary);
}

.eq-slider-container {
  height: 100px;
  width: 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eq-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  background: linear-gradient(to right, var(--border-medium), var(--accent), var(--border-medium));
  border-radius: var(--radius-full);
  outline: none;
  transform: rotate(-90deg);
  transform-origin: center;
}

.eq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: grab;
  box-shadow: var(--shadow-glow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.eq-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: var(--shadow-glow);
}

.eq-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.2);
}

.eq-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: grab;
  border: none;
  box-shadow: var(--shadow-glow-sm);
}

/* ── AI Quick-Prompt Chips ─────────────────────────────── */
.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  white-space: nowrap;
}

.ai-chip:hover {
  border-color: var(--accent-border);
  background: var(--accent-subtle);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ai-chip.active {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
  box-shadow: var(--shadow-glow-sm);
}

/* ── Reset Button ─────────────────────────────────────── */
.reset-btn {
  display: block;
  width: 100%;
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-base);
}

.reset-btn:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-subtle);
}

/* ── AI Generator Card ────────────────────────────────── */
.ai-generator-card {
  border-color: var(--accent-border) !important;
  position: relative;
  overflow: hidden;
}

.ai-generator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scanline 3s ease-in-out infinite;
}

@keyframes scanline {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── Export Panel ──────────────────────────────────────── */
.export-card {
  margin-top: 0;
}

.export-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.export-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  width: 100%;
  text-align: left;
}

.export-btn:hover {
  border-color: var(--accent-border);
  background: var(--accent-subtle);
  color: var(--text-primary);
  transform: translateX(4px);
}

.export-btn .export-icon {
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.export-btn .export-label {
  flex: 1;
}

.export-btn .export-label small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.export-btn .arrow {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.export-btn:hover .arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ── AI Panel ─────────────────────────────────────────── */
.ai-section {
  margin-top: var(--space-lg);
  animation: fadeInUp 0.6s ease-out 0.8s both;
}

.ai-input-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.ai-prompt-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.ai-prompt-block:focus-within {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.ai-prompt-field {
  display: block;
  flex: none;
  width: 100%;
  height: 8rem;
  min-height: 8rem;
  max-height: 8rem;
  padding: var(--space-md) var(--space-lg);
  line-height: 1.55;
  font-size: 0.9375rem;
  resize: none;
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
}

.ai-prompt-block .ai-prompt-field.ai-input {
  border: none;
  box-shadow: none;
}

.ai-prompt-block .ai-prompt-field.ai-input:focus {
  border: none;
  box-shadow: none;
}

.ai-prompt-field::-webkit-scrollbar {
  width: 6px;
}

.ai-prompt-field::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}

.ai-prompt-field::-webkit-scrollbar-track {
  background: transparent;
}

.ai-prompt-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.28);
}

.ai-quota-label {
  margin: 0;
  padding: 8px 14px 0;
  font-size: 0.78rem;
  color: var(--text-muted, rgba(232, 238, 242, 0.65));
  text-align: right;
}

.ai-quota-label:empty {
  display: none;
}

.ai-quota-upgrade {
  margin: 8px 14px 14px;
  align-self: flex-end;
  font-size: 0.78rem;
  padding: 6px 12px;
}

.ai-quota-upgrade.hidden {
  display: none;
}

.ai-quota-exhausted {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.ai-input {
  flex: 1;
  padding: var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition-base);
}

.ai-input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* After .ai-input so cascade cannot restore UA textarea resize */
#ai-prompt-input.ai-input.ai-prompt-field {
  resize: none !important;
}

.ai-generate-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-glow-sm);
  white-space: nowrap;
}

.ai-generate-btn:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.ai-generate-btn:active {
  transform: translateY(0);
}

.ai-generate-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.ai-generate-btn.loading .btn-text {
  display: none;
}

.ai-generate-btn .spinner {
  display: none;
}

.ai-generate-btn.loading .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ai-generator-lead {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.55;
  max-width: 36rem;
}

.ai-response {
  background: rgba(12, 12, 12, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  min-height: 10rem;
  max-height: min(52vh, 26rem);
  overflow-y: auto;
  word-break: break-word;
}

.ai-response.ai-response--idle {
  min-height: 5.75rem;
  padding: var(--space-lg) var(--space-lg);
}

.ai-response:not(.ai-response--idle) .ai-response-body {
  white-space: pre-wrap;
}

.ai-response--idle {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ai-response--idle .ai-response-body {
  width: 100%;
}

.ai-response-idle {
  max-width: 22rem;
  margin: 0 auto;
}

.ai-response-idle-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
  letter-spacing: 0.01em;
}

/* ── Setup Guide (Accordion) ──────────────────────────── */
.guide-section {
  margin-top: 0;
  animation: fadeInUp 0.6s ease-out 1s both;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.guide-step {
  background: linear-gradient(180deg, rgba(16, 24, 30, 0.7), rgba(14, 19, 24, 0.76));
  border: 1px solid rgba(136, 165, 182, 0.18);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
}

.guide-step:hover {
  border-color: var(--border-medium);
}

.guide-step-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}

.guide-step-header:hover {
  background: rgba(18, 216, 234, 0.08);
}

.guide-step-number {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.guide-step-title {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.guide-step-chevron {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  font-size: 0.75rem;
}

.guide-step.open .guide-step-chevron {
  transform: rotate(180deg);
}

.guide-step-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.guide-step.open .guide-step-content {
  max-height: 500px;
}

.guide-step-body {
  padding: 0 var(--space-lg) var(--space-lg);
  font-size: 0.86rem;
  color: #bfccd6;
  line-height: 1.78;
}

.guide-step-body code {
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--accent);
  font-family: 'Consolas', monospace;
}

.guide-step-body .path-highlight {
  display: block;
  background: var(--bg-primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  margin: var(--space-sm) 0;
  font-family: 'Consolas', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  word-break: break-all;
}

.guide-summary-card {
  margin-bottom: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid rgba(136, 165, 182, 0.2);
  background: linear-gradient(180deg, rgba(16, 24, 30, 0.72), rgba(11, 18, 24, 0.8));
}

.guide-summary-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e7f5ff;
  margin-bottom: 8px;
}

.guide-summary-row {
  font-size: 0.86rem;
  color: #bfd5e3;
  margin-bottom: 4px;
}

.guide-summary-note {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #8fb4c8;
}

/* ── Desktop recommendation (mobile hint, bottom-right) ─── */
.pc-use-note {
  position: fixed;
  z-index: 1100;
  pointer-events: auto;
  isolation: isolate;
  /* top, right, bottom, left — anchor box to bottom-right (not full-bleed on narrow screens) */
  inset: auto max(var(--space-lg), env(safe-area-inset-right, 0px)) max(var(--space-lg), env(safe-area-inset-bottom, 0px)) auto;
  box-sizing: border-box;
  width: min(22rem, calc(100vw - 2 * var(--space-lg)));
  direction: ltr;
  padding: var(--space-md);
  padding-top: calc(var(--space-md) + 2px);
  margin: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(18, 216, 234, 0.12);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.pc-use-note__inner {
  padding-right: 2.75rem;
  min-width: 0;
}

.pc-use-note__text {
  margin: 0;
}

.pc-use-note__text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.pc-use-note__close {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  z-index: 3;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.pc-use-note__close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.pc-use-note__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── In-tool review reminder ─────────────────────────── */
.review-nudge {
  position: relative;
  padding: var(--space-md);
  padding-right: 2.75rem;
  border-color: var(--accent-border);
  background: linear-gradient(135deg, rgba(18, 216, 234, 0.08), rgba(0, 0, 0, 0.12));
}

.review-nudge__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.review-nudge__link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.review-nudge__link:hover {
  color: var(--text-primary);
}

.review-nudge__close {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.review-nudge__close:hover {
  color: var(--text-primary);
}

.landing-review-note {
  margin: var(--space-md) 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-secondary);
  text-align: center;
}

.landing-review-note a {
  color: var(--accent);
  font-weight: 600;
}

html[data-aether-theme='light'] .review-nudge {
  background: linear-gradient(135deg, rgba(18, 216, 234, 0.1), rgba(255, 255, 255, 0.9));
}

/* ── Toast Notification ───────────────────────────────── */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  padding: var(--space-md) var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transform: translateY(120%);
  opacity: 0;
  transition: all var(--transition-spring);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast .toast-icon {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast .toast-icon.toast-icon--svg {
  font-size: 0;
}

.toast .toast-icon.toast-icon--svg .aether-icon {
  width: 22px;
  height: 22px;
}

/* ── Animations ───────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px var(--accent-glow); }
  50% { box-shadow: 0 0 25px var(--accent-glow), 0 0 50px rgba(18, 216, 234, 0.1); }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .logo-text {
    font-size: 1.8rem;
    letter-spacing: 3px;
  }

  .logo-img {
    width: 50px;
    height: 50px;
  }

  .app-container {
    padding: var(--space-md);
  }

  .eq-sliders-row {
    grid-template-columns: repeat(5, 1fr);
  }

  .mode-tab {
    font-size: 0.6rem;
    padding: var(--space-sm) var(--space-md);
  }

  .ai-input-row {
    flex-direction: column;
  }

  .ai-prompt-field {
    height: 7rem;
    min-height: 7rem;
    max-height: 7rem;
    padding: var(--space-md);
    font-size: 0.9rem;
  }

  .ai-response {
    min-height: 8rem;
    max-height: min(45vh, 22rem);
  }

  .ai-response.ai-response--idle {
    min-height: 5.25rem;
  }

  .assistant-row {
    grid-template-columns: 1fr;
    margin-bottom: 0;
  }

  .secondary-tuning-stack {
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .eq-sliders-row {
    display: flex;
    grid-template-columns: none;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .eq-band {
    flex: 0 0 64px;
    scroll-snap-align: start;
  }

  .eq-slider-container {
    height: 88px;
  }

  .eq-slider {
    width: 88px;
  }

  .ai-chips {
    gap: 6px;
  }

  .ai-chip {
    font-size: 0.78rem;
    padding: 10px 12px;
    min-height: 40px;
  }

  .modal-close {
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 1.6rem;
    text-align: center;
  }

  .pricing-cta,
  .reset-btn,
  .ai-generate-btn {
    min-height: 44px;
  }

  .footer-links {
    gap: 12px;
    font-size: 0.85rem;
  }

  .legal-page {
    padding: var(--space-lg);
  }
}

@media (max-width: 360px) {
  body {
    font-size: 15px;
  }

  .app-container {
    padding: var(--space-sm) var(--space-sm);
  }

  .logo-text {
    font-size: 1.4rem;
    letter-spacing: 2px;
  }

  .tagline {
    letter-spacing: 1px;
    font-size: 0.7rem;
    line-height: 1.5;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .pricing-card {
    padding: var(--space-md);
  }

  .modal-content {
    padding: var(--space-lg);
  }

  .legal-h2 {
    font-size: 0.72rem;
  }
}

/* ── Modal Overlay ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: fadeInUp 0.3s ease-out;
}

.modal-content h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.modal-content pre {
  background: var(--bg-primary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
}

.software-modal-easy-tip {
  margin: var(--space-lg) 0 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.software-modal-easy-tip a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-close {
  float: right;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--accent);
}

/* ── Footer ───────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-xl);
  animation: fadeIn 0.6s ease-out 1.2s both;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.footer-text span {
  color: var(--accent);
}

.footer-logo-img {
  max-height: 24px;
  width: auto;
  vertical-align: middle;
  margin-right: 4px;
}

.footer-links {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 var(--space-md);
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  padding: 6px 4px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-links a.is-current {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Landing + Pricing Funnel ─────────────────────────── */
.landing-screen,
.login-screen {
  max-width: 1100px;
  margin: 0 auto var(--space-xl);
  padding: var(--space-2xl);
}

.landing-badge {
  display: inline-block;
  margin-bottom: var(--space-md);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent-border);
  background: var(--accent-subtle);
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
}

.landing-copy {
  max-width: 760px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.pricing-market-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 40rem;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
  text-align: center;
}

.pricing-market-note strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.landing-site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  margin: 0 0 var(--space-xl);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.landing-site-nav a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.landing-site-nav a:hover {
  color: #e8f4fc;
}

.landing-site-nav .landing-site-nav-sep {
  color: var(--text-muted);
  user-select: none;
}

.landing-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.landing-benefit {
  border: 1px solid var(--border-medium);
  background: rgba(255, 255, 255, 0.035);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: 0.86rem;
  color: var(--text-secondary);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.landing-contact {
  max-width: 36rem;
  margin: 0 auto var(--space-xl);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-border);
  background: var(--accent-subtle);
  text-align: center;
}

.landing-contact-email {
  margin: 0 0 var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
}

.landing-contact-email a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.landing-contact-email a:hover {
  color: var(--accent);
}

.landing-contact-note {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
}

.pricing-grid--single {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}

.pricing-card {
  border: 1px solid var(--border-medium);
  background: rgba(255, 255, 255, 0.035);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset;
}

.pricing-card h3 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.pricing-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1.2;
}

.pricing-value span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: 2px;
}

.pricing-note {
  color: var(--text-secondary);
  font-size: 0.8rem;
  min-height: 34px;
}

.pricing-card ul {
  list-style: none;
  display: grid;
  gap: 6px;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.pricing-card li::before {
  content: '• ';
  color: var(--accent);
}

.pricing-card.featured {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-glow-sm);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Subscribe now';
  position: absolute;
  top: -10px;
  right: 12px;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #082226;
  background: var(--accent);
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.pricing-cta {
  margin-top: auto;
}

.saved-profiles-card {
  margin-top: var(--space-lg);
}

.saved-profiles-copy {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-bottom: var(--space-md);
}

.saved-profiles-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.saved-profiles-row .ai-input,
.saved-profiles-row .search-input {
  width: 100%;
}

.saved-profiles-row:first-of-type {
  grid-template-columns: 1fr auto;
}

.login-screen {
  max-width: 540px;
  text-align: center;
}

.subscribe-price-summary {
  margin: var(--space-md) 0 var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.subscribe-price-summary strong {
  color: var(--text-primary);
  font-weight: 600;
}

.login-copy {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.login-copy.checkout-warning {
  color: var(--text-primary);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 180, 80, 0.35);
  background: rgba(255, 180, 80, 0.08);
  margin-top: calc(-1 * var(--space-sm));
}

@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-benefits {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .landing-screen,
  .login-screen {
    padding: var(--space-lg);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .saved-profiles-row,
  .saved-profiles-row:first-of-type {
    grid-template-columns: 1fr;
  }
}

/* ── Utility ──────────────────────────────────────────── */
.hidden {
  display: none !important;
}

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

/* ── Low-end / lite mode (see js/perf-detect.js; override with localStorage AETHER_PERF=lite|full) ── */
html[data-aether-perf="lite"] {
  --transition-fast: 80ms ease;
  --transition-base: 140ms ease;
  --transition-slow: 200ms ease;
  --transition-spring: 220ms ease;
}

html[data-aether-perf="lite"] body::before {
  animation: none;
  opacity: 0.5;
}

html[data-aether-perf="lite"] .logo-symbol {
  animation: none;
}

html[data-aether-perf="lite"] .logo-text {
  animation: none;
}

html[data-aether-perf="lite"] .glass-card,
html[data-aether-perf="lite"] .pc-use-note,
html[data-aether-perf="lite"] .modal-overlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-aether-perf="lite"] .ai-generator-card::before {
  animation: none;
  opacity: 0.55;
}

html[data-aether-perf="lite"] .toast {
  transition: opacity var(--transition-base), transform var(--transition-base);
}

html[data-aether-perf="lite"] .main-grid,
html[data-aether-perf="lite"] .logo-container {
  animation: none;
}
