/* ========================================
   Behavior Translator — Styles
   Warm dark + gold. Built mobile-first for home screen use.
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --bg: #14120f;
  --bg-elev: #1b1814;
  --bg-card: #201c17;
  --bg-input: #17140f;
  --border: #3b342b;
  --border-light: #4d4438;
  --text: #f6efe3;
  --text-muted: #c9bfae;   /* ~10:1 on bg */
  --text-dim: #a39886;     /* ~6.5:1 on bg, still AA */
  --gold: #d9b778;
  --gold-strong: #e6c78c;
  --gold-dim: rgba(217, 183, 120, 0.12);
  --gold-border: rgba(217, 183, 120, 0.35);
  --red: #ff8f7f;
  --red-dim: rgba(255, 143, 127, 0.10);
  --red-border: rgba(255, 143, 127, 0.35);
  --orange: #f6bb63;
  --orange-dim: rgba(246, 187, 99, 0.12);
  --blue: #8ec2ff;
  --blue-dim: rgba(142, 194, 255, 0.12);
  --green: #7fdca5;
  --green-dim: rgba(127, 220, 165, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --transition: 0.2s ease;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

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

body {
  font-family: var(--font-body);
  font-size: 17px;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(217, 183, 120, 0.10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

h1, h2, .section-title, .hero h1 { font-family: var(--font-display); letter-spacing: -0.01em; }

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-strong); text-decoration: underline; text-underline-offset: 3px; }

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 2000;
  background: var(--gold); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: calc(12px + var(--safe-top)); text-decoration: none; }

/* ========================================
   Layout
   ======================================== */

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 640px; margin: 0 auto; padding: 0 20px; }

/* ========================================
   Nav
   ======================================== */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo:hover { color: var(--text); text-decoration: none; }
.nav-logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav-logo span { color: var(--gold); }

.nav-links { display: flex; align-items: center; gap: 8px; }

.nav-links a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover { color: var(--text); background: var(--bg-card); text-decoration: none; }

.nav-user { color: var(--text-dim); font-size: 14px; margin-right: 4px; }

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), border-color var(--transition), color var(--transition);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--gold); color: #14120f; }
.btn-primary:hover { background: var(--gold-strong); color: #14120f; transform: translateY(-1px); }
.btn-primary:disabled { background: #6b5d45; color: #2a251e; cursor: not-allowed; transform: none; }

.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border-light); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid var(--red-border); }
.btn-danger:hover { background: rgba(255, 143, 127, 0.2); }

.btn-small { min-height: 44px; padding: 8px 18px; font-size: 15px; }
.btn-full { width: 100%; }

/* ========================================
   Cards
   ======================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.card-glow { border-color: var(--gold-border); box-shadow: 0 0 40px var(--gold-dim); }

/* ========================================
   Forms
   ======================================== */

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 17px; /* 16px+ stops iOS from zooming in on focus */
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-dim); }
.form-input::placeholder { color: var(--text-dim); }

textarea.form-input { resize: vertical; min-height: 150px; line-height: 1.6; }

/* ========================================
   Landing Page
   ======================================== */

.hero { text-align: center; padding: 56px 0 48px; }

.hero h1 {
  font-size: 52px;
  font-weight: 600;
  line-height: 1.12;
  margin: 0 auto 24px;
  max-width: 760px;
}
.hero h1 .gold { color: var(--gold); font-style: italic; }

.hero p {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-note { margin-top: 20px !important; font-size: 16px !important; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.features { padding: 48px 0; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { text-align: left; padding: 30px 26px; }

.feature-icon {
  width: 52px; height: 52px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-size: 24px;
}
.feature-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.feature-card p { font-size: 16px; color: var(--text-muted); line-height: 1.65; }

.how-it-works { padding: 56px 0; }
.section-title { text-align: center; font-size: 36px; font-weight: 600; margin-bottom: 44px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; list-style: none; }
.step { text-align: center; }
.step-number {
  width: 48px; height: 48px;
  background: var(--gold); color: #14120f;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px;
  margin: 0 auto 16px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { font-size: 16px; color: var(--text-muted); line-height: 1.65; }

.example-section { padding: 56px 0; }
.example-card { max-width: 720px; margin: 0 auto; }
.example-input { padding: 20px; background: var(--bg-input); border-radius: var(--radius-sm); margin-bottom: 20px; }
.example-label {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--gold); margin-bottom: 10px;
}
.example-label.muted { color: var(--text-dim); }
.example-text { font-size: 18px; font-style: italic; color: var(--text); font-family: var(--font-display); }
.example-output { padding: 20px; background: var(--bg-input); border-radius: var(--radius-sm); }
.example-output p { font-size: 16px; line-height: 1.7; color: var(--text-muted); }
.example-block { margin-top: 22px; }

.cta-section { padding: 72px 0; text-align: center; }
.cta-section h2 { font-size: 38px; font-weight: 600; margin-bottom: 16px; }
.cta-section p { color: var(--text-muted); font-size: 17px; margin-bottom: 28px; max-width: 560px; margin-left: auto; margin-right: auto; }

.footer {
  padding: 32px 0 calc(32px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 15px;
}

/* ========================================
   Auth Pages
   ======================================== */

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 20px;
}
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 32px; font-weight: 600; margin-bottom: 8px; text-align: center; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); font-size: 16px; margin-bottom: 28px; }
.auth-logo { justify-content: center; margin-bottom: 28px; font-size: 22px; }

.auth-footer { text-align: center; margin-top: 20px; font-size: 16px; color: var(--text-muted); line-height: 2.4; }
.auth-footer a { display: inline-block; min-height: 44px; line-height: 44px; }

.auth-error {
  background: var(--red-dim);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 15px;
  color: var(--red);
  margin-bottom: 20px;
  display: none;
}
.auth-success { color: var(--green); margin-top: 16px; font-size: 16px; }

/* ========================================
   App Page
   ======================================== */

.app-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  min-height: calc(100vh - 120px);
}

.sidebar { order: -1; border-right: 1px solid var(--border); padding-right: 28px; }

.sidebar h2 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.history-list { display: flex; flex-direction: column; gap: 8px; list-style: none; }

.history-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  min-height: 56px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.history-item:hover { border-color: var(--gold-border); background: var(--bg-card); }
.history-item[aria-current="true"] { border-color: var(--gold); background: var(--gold-dim); }

.history-preview {
  font-size: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.history-meta { font-size: 13px; color: var(--text-dim); }
.history-empty { color: var(--text-dim); font-size: 15px; }

.main-content { padding-bottom: 48px; min-width: 0; }

/* Translator input */
.translator-header { margin-bottom: 24px; }
.translator-header h1 { font-size: 38px; font-weight: 600; line-height: 1.15; margin-bottom: 10px; }
.translator-header p { color: var(--text-muted); font-size: 17px; }

.teen-selector { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.teen-selector-label { width: 100%; font-size: 14px; color: var(--text-dim); margin-bottom: -2px; }

.teen-tag {
  min-height: 44px;
  padding: 8px 18px;
  background: transparent;
  border: 1.5px solid var(--border-light);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.teen-tag:hover { border-color: var(--gold-border); text-decoration: none; color: var(--text); }
.teen-tag[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #14120f; }
.teen-tag.add { border-style: dashed; color: var(--text-muted); }

.translate-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}
.translate-box textarea { border: none; background: transparent; min-height: 160px; box-shadow: none !important; }
.translate-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-dim); }

.translate-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 2px;
}
.char-count { font-size: 14px; color: var(--text-dim); }
.kbd-hint { font-size: 13px; color: var(--text-dim); }

/* ========================================
   Translation Result
   ======================================== */

.result-container { margin-top: 32px; animation: fadeIn 0.4s ease; scroll-margin-top: 20px; }
.result-container:focus { outline: none; }

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

.result-section {
  margin-bottom: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.result-section-title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold);
  margin-bottom: 14px;
}

.result-underneath { font-family: var(--font-display); font-size: 21px; line-height: 1.55; color: var(--text); }

.nervous-system-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
}
.nervous-system-badge::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.badge-fight-flight { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(246, 187, 99, 0.35); }
.badge-shutdown { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(142, 194, 255, 0.35); }
.badge-safe-connected { background: var(--green-dim); color: var(--green); border: 1px solid rgba(127, 220, 165, 0.35); }

.scripts-list, .avoid-list { display: flex; flex-direction: column; gap: 12px; list-style: none; }

.script-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 16px 16px 16px 18px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 17px;
  line-height: 1.6;
  cursor: pointer;
  transition: background var(--transition);
}
.script-item:hover { background: rgba(217, 183, 120, 0.2); }

.copy-chip {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  padding: 4px 12px;
  margin-top: 2px;
}
.script-item.copied .copy-chip { background: var(--gold); color: #14120f; }

.avoid-item {
  padding: 16px 18px;
  background: var(--red-dim);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 1.6;
}

.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ========================================
   Flag Banner
   ======================================== */

.flag-banner {
  padding: 18px 20px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.6;
}
.flag-monitor { background: var(--orange-dim); border: 1px solid rgba(246, 187, 99, 0.4); color: var(--text); }
.flag-monitor strong { color: var(--orange); }
.flag-concerning { background: var(--red-dim); border: 1px solid var(--red-border); color: var(--text); }
.flag-concerning strong { color: var(--red); }
.flag-concerning a { color: var(--red); font-weight: 700; text-decoration: underline; }

/* ========================================
   Loading
   ======================================== */

.loading { display: none; text-align: center; padding: 44px 20px; }
.loading.active { display: block; }

.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--text-muted); font-size: 16px; }

/* ========================================
   Paywall
   ======================================== */

.paywall { text-align: center; padding: 40px 24px; }
.paywall h2 { font-size: 28px; margin-bottom: 12px; }
.paywall p { color: var(--text-muted); margin-bottom: 24px; font-size: 17px; }

/* ========================================
   Account Page
   ======================================== */

.account-title { font-size: 36px; font-weight: 600; margin-bottom: 28px; }

.account-section {
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 8px;
}
.account-section h2 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.account-section .help { color: var(--text-muted); font-size: 16px; margin-bottom: 16px; }

.account-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.account-row:last-child { border-bottom: none; }
.account-row-label { font-size: 16px; color: var(--text-muted); }
.account-row-value { font-size: 16px; font-weight: 500; text-align: right; word-break: break-word; }

.status-active { color: var(--green); }
.status-none { color: var(--text-dim); }

.teen-profiles-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; list-style: none; }

.teen-profile-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 12px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.teen-profile-info { display: flex; align-items: baseline; gap: 12px; }
.teen-profile-name { font-weight: 600; }
.teen-profile-age { color: var(--text-muted); font-size: 15px; }

.add-teen-form { display: flex; gap: 12px; align-items: flex-end; padding-bottom: 16px; }
.add-teen-form .form-group { margin-bottom: 0; flex: 1; }
.add-teen-form .form-group.age { flex: 0 0 100px; }

/* ========================================
   Toast
   ======================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translate(-50%, 120px);
  max-width: calc(100% - 32px);
  padding: 14px 22px;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  font-size: 16px;
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ========================================
   Install Banner
   ======================================== */

.install-banner {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  max-width: 520px;
  margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 12px 14px 14px;
  background: #241f19;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 900;
  transform: translateY(140%);
  transition: transform 0.35s ease;
}
.install-banner.show { transform: translateY(0); }
.install-icon { border-radius: 10px; flex-shrink: 0; }
.install-text { flex: 1; font-size: 14px; line-height: 1.45; color: var(--text-muted); }
.install-text strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.install-text b { color: var(--text); }
.ios-share { vertical-align: -3px; color: var(--blue); }
.install-close {
  width: 44px; height: 44px; flex-shrink: 0;
  background: transparent; border: none; color: var(--text-muted);
  font-size: 26px; line-height: 1; cursor: pointer; border-radius: 50%;
}
.install-close:hover { background: var(--bg-card); color: var(--text); }

/* Modal (password reset) */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7);
  display: none; align-items: center; justify-content: center; padding: 20px; z-index: 1500;
}
.modal-backdrop.open { display: flex; }
.modal-backdrop .card { width: 100%; max-width: 420px; }
.modal-backdrop h2 { font-size: 26px; margin-bottom: 8px; }
.modal-backdrop p { color: var(--text-muted); margin-bottom: 20px; }

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 820px) {
  body { font-size: 17px; }

  .hero { padding: 32px 0 32px; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 17px; }
  .hero-cta .btn { width: 100%; }

  .section-title, .cta-section h2 { font-size: 30px; }
  .features-grid, .steps { grid-template-columns: 1fr; gap: 16px; }

  .nav { margin-bottom: 20px; padding: 12px 0; }
  .nav-user { display: none; }
  .nav-links a { padding: 10px 10px; font-size: 15px; }

  /* Translator first, history underneath */
  .app-layout { grid-template-columns: 1fr; gap: 8px; min-height: 0; }
  .main-content { order: 1; padding-bottom: 16px; }
  .sidebar {
    order: 2;
    border-right: none;
    border-top: 1px solid var(--border);
    padding: 24px 0 calc(100px + var(--safe-bottom));
  }

  .translator-header h1 { font-size: 30px; }
  .translator-header p { font-size: 16px; }
  .kbd-hint { display: none; }

  .result-section { padding: 18px; }
  .result-underneath { font-size: 19px; }

  .add-teen-form { flex-wrap: wrap; }
  .add-teen-form .form-group { flex: 1 1 60%; }
  .add-teen-form .form-group.age { flex: 1 1 25%; }
  .add-teen-form .btn { width: 100%; }

  .card { padding: 22px; }
}

/* Standalone (home screen app): tighter top since there's no browser chrome */
.is-standalone .nav { padding-top: 8px; }

/* Respect reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .spinner { animation: spin 1.6s linear infinite !important; animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}

/* Windows high contrast */
@media (forced-colors: active) {
  .btn, .teen-tag, .script-item, .history-item { border: 1px solid ButtonText; }
}

.nav-links a { white-space: nowrap; }
@media (max-width: 480px) {
  .nav-logo .logo-word { display: none; }
  .nav-links { gap: 0; }
}
.nav-logo .logo-word { color: var(--text); }

/* Free tier */
.free-meter {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  color: var(--gold) !important;
  font-size: 15px !important;
  font-weight: 600;
}
.paywall-note { font-size: 15px !important; margin-bottom: 8px !important; }
.free-meter.member-badge {
  background: linear-gradient(135deg, #e6c78c, #c9a25e);
  border-color: #e6c78c;
  color: #14120f !important;
  font-size: 13px !important;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgba(217, 183, 120, 0.25);
}
.nav-id { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-right: 6px; }
.nav-id .nav-user { margin-right: 0; line-height: 1.2; }
.member-tag {
  align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e6c78c, #c9a25e);
  color: #14120f;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(217, 183, 120, 0.25);
}
@media (max-width: 820px) {
  .nav-id .nav-user { display: none; }
  .member-tag { font-size: 10px; padding: 3px 8px; }
}
@media (max-width: 480px) { .member-tag .tag-long { display: none; } }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.brand .member-tag { margin-left: 42px; }
.nav-logo .pro-tag {
  align-self: center;
  margin-left: 2px;
  padding: 3px 7px 2px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f0d49a, #c9a25e);
  color: #14120f;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  line-height: 1.2;
  box-shadow: 0 0 14px rgba(217, 183, 120, 0.35);
}
