/* SahiBol v6: Airy Warm Paper + Horizontal Wave + Noisy Frosted Glass + Royal Pro + WCAG AA */
:root {
  --bg-top: #FFF7F0;
  --bg-bottom: #FCF2E4;
  --sidebar-bg: #FFFFFF;
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-card: rgba(255, 255, 255, 0.62);
  --surface-solid: #FFFFFF;
  --surface-soft: #F3F1EC;
  --border: rgba(17, 24, 39, 0.08);
  --border-strong: rgba(17, 24, 39, 0.16);
  --text: #111827;
  --muted: #3F3F46;
  --subtle: #52525B;
  --accent: #C2410C;
  --accent-bright: #EA580C;
  --accent-hover: #9A3412;
  --accent-soft: #FFEDD5;
  --accent-text: #9A3412;
  --teal: #0F766E;
  --teal-soft: #CCFBF1;
  --warn: #B45309;
  --warn-soft: #FEF3C7;
  --err: #B91C1C;
  --err-soft: #FEE2E2;
  --gold-border: #C89B3C;
  --gold-text: #78350F;
  --gold-soft: #FEF3C7;
  --shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 14px 38px rgba(17, 24, 39, 0.07), 0 1px 3px rgba(17, 24, 39, 0.04);
  --shadow-lg: 0 22px 54px rgba(17, 24, 39, 0.11);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --sidebar-w: 244px;
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg-top: #1A1512;
  --bg-bottom: #191512;
  --sidebar-bg: #16161A;
  --glass-bg: rgba(26, 24, 28, 0.62);
  --glass-card: rgba(28, 26, 30, 0.62);
  --surface-solid: #1C1C22;
  --surface-soft: #26262E;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.19);
  --text: #F4F4F5;
  --muted: #D4D4D8;
  --subtle: #A1A1AA;
  --accent: #EA580C;
  --accent-bright: #FB923C;
  --accent-hover: #C2410C;
  --accent-soft: rgba(249, 115, 22, 0.20);
  --accent-text: #FDBA74;
  --teal: #2DD4BF;
  --teal-soft: rgba(45, 212, 191, 0.16);
  --warn: #FBBF24;
  --warn-soft: rgba(251, 191, 36, 0.16);
  --err: #FCA5A5;
  --err-soft: rgba(239, 68, 68, 0.18);
  --gold-border: #D9A74A;
  --gold-text: #FDE68A;
  --gold-soft: rgba(217, 167, 74, 0.18);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.52);
}

/* Global hidden fix so flex/inline-flex elements never leak when hidden */
[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  background-color: var(--bg-bottom);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Accessibility: Skip Link & Focus-Visible Rings */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--text);
  color: var(--surface-solid);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
}
.skip-link:focus { left: 12px; }

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

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Two-Tone Horizontal Wave Split Backdrop */
.wave-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg-bottom);
}
.wave-sky {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45vh;
  min-height: 310px;
  background: var(--bg-top);
}
.wave-svg {
  position: absolute;
  top: calc(45vh - 2px);
  left: 0;
  width: 100%;
  height: 92px;
  display: block;
}
@media (max-height: 700px) {
  .wave-svg { top: 308px; }
}
.wave-svg path.wave-fill { fill: var(--bg-top); }
.wave-svg path.wave-line {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.2;
}

/* App Shell */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 14px;
  z-index: 40;
  transition: transform 0.22s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 18px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.025em;
}
.sidebar-brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: block; }
.brand-name span { color: var(--accent); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover {
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
}
.nav-item.active {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}
.nav-item.nav-royal {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.55), rgba(255, 251, 235, 0.7));
  border: 1px solid rgba(200, 155, 60, 0.45);
  color: var(--gold-text);
  font-weight: 700;
}
[data-theme="dark"] .nav-item.nav-royal {
  background: linear-gradient(135deg, rgba(217, 167, 74, 0.16), rgba(180, 83, 9, 0.12));
  color: var(--gold-text);
}

.nav-pill-count,
.nav-pill-price,
.nav-pill-royal {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.nav-pill-count { background: var(--surface-soft); color: var(--muted); }
.nav-pill-price { background: var(--accent-soft); color: var(--accent-text); }
.nav-pill-royal { background: var(--gold-soft); color: var(--gold-text); }

.sidebar-bottom {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sidebar-utils {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}
.avatar-dot {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.account-meta { min-width: 0; flex: 1; }
.account-name { font-size: 0.83rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-tier { font-size: 0.73rem; color: var(--teal); font-weight: 700; }
.account-tier.royal { color: var(--gold-text); }

.local-dev-wrap {
  padding-top: 4px;
}
.btn-dev {
  width: 100%;
  font-size: 0.74rem;
  padding: 6px 10px;
  border-style: dashed;
  color: var(--muted);
}

/* Mobile Header (Option 2: Language + Dark/Light + Sound always visible) */
.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mobile-left, .mobile-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 35;
}

/* Main Canvas */
.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.page-wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 30px 56px;
  flex: 1;
}
.narrow { max-width: 780px; margin: 0 auto; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .mobile-bar { display: flex; }
  .main-area { margin-left: 0; }
  .page-wrap { padding: 18px 14px 44px; }
}

/* Buttons (WCAG tap target sizes) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--surface-soft); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #FFFFFF; }

.btn-ink {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface-solid);
}
.btn-ink:hover { opacity: 0.92; background: var(--text); color: var(--surface-solid); }

.btn-royal-sm {
  background: linear-gradient(135deg, #FFFDF5, #FDEFC7);
  border-color: var(--gold-border);
  color: #78350F;
  font-weight: 700;
}

.btn-sm { min-height: 36px; padding: 6px 11px; font-size: 0.82rem; border-radius: 9px; }
.btn-xs { min-height: 34px; padding: 5px 9px; font-size: 0.78rem; border-radius: 8px; }
.w-full { width: 100%; }

/* Top Plans & Pricing Pill */
.promo-pill-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.promo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 500;
}
.promo-pill strong { color: var(--text); }
.promo-pill:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 14px 0 38px;
}

.hero-title {
  margin: 0 auto 12px;
  max-width: 760px;
  font-size: clamp(1.95rem, 3.8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text);
}
html[lang="hi"] .hero-title {
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.hero-hook {
  margin: 0 auto 28px;
  max-width: 680px;
  font-size: clamp(1.18rem, 2.1vw, 1.42rem);
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}

/* Denser Frosted Liquid-Glass Composer with Subtle Noise Texture */
.composer-card {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    var(--shadow-md);
  padding: 16px 18px 13px;
  text-align: left;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
[data-theme="dark"] .composer-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    var(--shadow-md);
}
/* Subtle inline SVG noise grain overlay inside glass */
.composer-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.095;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  border-radius: inherit;
}
.composer-card > * { position: relative; z-index: 1; }

.composer-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md);
}
.composer-card.is-listening {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 5px var(--accent-soft), var(--shadow-lg);
}

.composer-textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1.04rem;
  line-height: 1.55;
  resize: vertical;
  min-height: 88px;
  padding: 4px 2px;
  outline: none;
}
.composer-textarea::placeholder { color: var(--subtle); }

.composer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 11px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.composer-controls,
.composer-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.mini-select {
  appearance: none;
  min-height: 34px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 26px 5px 12px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

.mic-circle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.mic-circle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.mic-circle svg { width: 17px; height: 17px; }

/* Classy Live Voice Wave Pill */
.voice-wave-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-bright);
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 700;
}
.wave-bars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
}
.wave-bars span {
  width: 3px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-bright);
  animation: sbVoiceWave 0.9s ease-in-out infinite;
}
.wave-bars span:nth-child(2) { animation-delay: 0.15s; }
.wave-bars span:nth-child(3) { animation-delay: 0.30s; }
.wave-bars span:nth-child(4) { animation-delay: 0.45s; }
.wave-bars span:nth-child(5) { animation-delay: 0.60s; }

@keyframes sbVoiceWave {
  0%, 100% { height: 5px; opacity: 0.65; }
  50% { height: 18px; opacity: 1; }
}

.voice-stop-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.7rem;
}

.voice-status-note {
  max-width: 780px;
  margin: 8px auto 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-text);
}

.submit-circle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: var(--text);
  color: var(--surface-solid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.14s, background 0.15s;
}
.submit-circle:hover { background: var(--accent); color: #FFFFFF; transform: translateY(-1px); }
.submit-circle svg { width: 17px; height: 17px; }

/* Segmented Mode Pill & Starter Chips */
.seg-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.seg-pill {
  display: inline-flex;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 999px;
  gap: 3px;
}
.seg-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 999px;
  cursor: pointer;
}
.seg-btn.active {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.rules-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--glass-card);
  border: 1px solid var(--border);
  padding: 7px 13px;
  border-radius: 999px;
}
.rules-indicator:hover { border-color: var(--accent); text-decoration: none; color: var(--text); }

.starters-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
  max-width: 780px;
}

.chip {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--glass-card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--accent); background: var(--surface-solid); }
.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

/* Optional Customize Panel */
.customize-panel {
  max-width: 780px;
  margin: 16px auto 0;
  background: var(--glass-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 560px) { .two-col { grid-template-columns: 1fr 1fr; } }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field-hint { font-size: 0.82rem; color: var(--muted); }

input[type="text"],
input[type="search"],
select.std-input,
textarea.std-input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--surface-solid);
}

/* Generated Result Panel */
.result-panel {
  max-width: 780px;
  margin: 22px auto 0;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
  text-align: left;
}
.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.result-title-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.result-title { margin: 0; font-size: 0.98rem; font-weight: 700; }

.score-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--teal-soft);
  color: var(--teal);
}
.score-pill.mid { background: var(--warn-soft); color: var(--warn); }
.score-pill.low { background: var(--err-soft); color: var(--err); }

.output-box {
  width: 100%;
  min-height: 165px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-top);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 14px;
}

.action-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.status-note { font-size: 0.83rem; color: var(--teal); font-weight: 600; }

.boost-strip { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.boost-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }

.ai-compat {
  margin-top: 24px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--subtle);
}

/* Seamless Discover Section (NO hard border divider on Landing Page!) */
.discover-section {
  margin-top: 26px;
  padding-top: 18px;
}

.discover-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.discover-head h2, .discover-head h1 {
  margin: 0 0 4px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.discover-head p { margin: 0; font-size: 0.92rem; color: var(--muted); }

.search-pill-wrap {
  position: relative;
  width: 270px;
  max-width: 100%;
}
.search-pill-wrap input {
  width: 100%;
  min-height: 40px;
  padding: 9px 14px 9px 38px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  font-size: 0.88rem;
}
.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--subtle);
  pointer-events: none;
}

/* Calm Borderless Category Tabs (Only Active Tab Gets Soft Pill) */
.role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.tab-link {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab-link:hover { color: var(--text); background: var(--surface-soft); }
.tab-link.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}

.subcat-block { margin-bottom: 34px; }
.subcat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.subcat-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

/* Spacious Airy 4-Column Cards (Only 2 Text Layers!) */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards-grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .cards-grid-4 { grid-template-columns: repeat(4, 1fr); } }

.prompt-card {
  background: var(--glass-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s;
}
.prompt-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.prompt-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.prompt-card h4, .prompt-card h2.tpl-title {
  margin: 0 0 6px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.prompt-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.48;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-pro-dot {
  display: inline-block;
  margin-top: 9px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--surface-soft);
  color: var(--muted);
}
.card-pro-dot.royal {
  background: var(--gold-soft);
  color: var(--gold-text);
}
.card-arrow {
  color: var(--subtle);
  font-size: 1rem;
  transition: transform 0.15s, color 0.15s;
  flex-shrink: 0;
}
.prompt-card:hover .card-arrow { transform: translateX(3px); color: var(--accent); }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
}
.badge-free { background: var(--surface-soft); color: var(--muted); }
.badge-pro { background: var(--accent-soft); color: var(--accent-text); }
.badge-teal { background: var(--teal-soft); color: var(--teal); }

/* Floating Pro Nudge (Hidden for Pro Members) */
.pro-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 286px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 15px 17px;
  box-shadow: var(--shadow-lg);
  z-index: 25;
}
.pro-float-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.pro-float h4 { margin: 0; font-size: 0.9rem; font-weight: 700; }
.pro-float p { margin: 0 0 12px; font-size: 0.82rem; color: var(--muted); }
.icon-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 6px;
}
.icon-close:hover { background: var(--surface-soft); color: var(--text); }
@media (max-width: 640px) { .pro-float { display: none; } }

/* Generic Card & Pricing Cards */
.card {
  background: var(--glass-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 840px;
  margin: 0 auto 38px;
}
@media (min-width: 720px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }

.pricing-card {
  position: relative;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.pricing-card.featured { border: 2px solid var(--accent); }
.popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 13px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.price-figure { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.04em; margin: 12px 0 4px; }
.price-figure span { font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.price-sub { margin: 0 0 18px; font-size: 0.9rem; color: var(--muted); }

.check-list { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.check-list li { position: relative; padding-left: 22px; margin-bottom: 9px; font-size: 0.91rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }

/* ROYAL IVORY-AND-GOLD PRO MEMBERSHIP CARD (Sparkles & Glitters Theme, WCAG AAA Contrast) */
.royal-shell {
  max-width: 820px;
  margin: 6px auto 36px;
}
.royal-card {
  position: relative;
  border-radius: 26px;
  padding: 32px 30px;
  background: linear-gradient(135deg, #FFFDF7 0%, #FBF1D4 48%, #FFF9EC 100%);
  color: #1C1917;
  border: 2px solid #D4A43E;
  box-shadow:
    0 20px 55px rgba(180, 130, 32, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  overflow: hidden;
  margin-bottom: 24px;
}
/* Subtle traveling champagne-gold shimmer sheen */
.royal-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 255, 255, 0.65) 49%,
    rgba(234, 179, 8, 0.22) 52%,
    transparent 62%
  );
  transform: translateX(-60%);
  animation: royalShimmer 6.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes royalShimmer {
  0%, 100% { transform: translateX(-55%); }
  50% { transform: translateX(55%); }
}

.royal-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.sparkle {
  position: absolute;
  color: #C28E21;
  font-size: 1.1rem;
  opacity: 0.75;
  animation: royalTwinkle 3.2s ease-in-out infinite;
}
.sparkle.s1 { top: 18px; right: 32px; font-size: 1.3rem; animation-delay: 0s; }
.sparkle.s2 { top: 64px; right: 92px; font-size: 0.85rem; animation-delay: 0.9s; }
.sparkle.s3 { bottom: 26px; right: 44px; font-size: 1.1rem; animation-delay: 1.7s; }
.sparkle.s4 { top: 28px; left: 52%; font-size: 0.8rem; animation-delay: 2.3s; }
.sparkle.s5 { bottom: 30px; left: 26px; font-size: 0.9rem; animation-delay: 1.2s; }

@keyframes royalTwinkle {
  0%, 100% { opacity: 0.28; transform: scale(0.85) rotate(0deg); }
  50% { opacity: 0.95; transform: scale(1.18) rotate(12deg); }
}

.royal-content { position: relative; z-index: 1; }
.royal-crest {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(180, 128, 22, 0.14);
  border: 1px solid rgba(180, 128, 22, 0.35);
  color: #713F12;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.royal-card h1 {
  margin: 0 0 4px;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  color: #1C1917;
  letter-spacing: -0.025em;
}
.royal-email {
  margin: 0 0 22px;
  font-size: 0.92rem;
  color: #57534E;
  font-weight: 500;
}

.royal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.royal-stat {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(180, 128, 22, 0.28);
  border-radius: 14px;
  padding: 12px 14px;
}
.royal-stat-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #78716C;
  margin-bottom: 3px;
}
.royal-stat-val {
  font-size: 0.98rem;
  font-weight: 700;
  color: #1C1917;
}

.royal-progress-wrap {
  margin-bottom: 20px;
}
.royal-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: #713F12;
  margin-bottom: 6px;
}
.royal-progress-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(180, 128, 22, 0.18);
  overflow: hidden;
}
.royal-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #B45309, #D97706, #EAB308);
  transition: width 0.5s ease;
}

.royal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn-royal-primary {
  background: #1C1917;
  border-color: #1C1917;
  color: #FEF3C7;
}
.btn-royal-primary:hover { background: #292524; color: #FFFFFF; }
.btn-royal-outline {
  background: rgba(255, 255, 255, 0.82);
  border-color: #C89B3C;
  color: #451A03;
}
.btn-royal-outline:hover { background: #FFFFFF; color: #1C1917; }

/* FAQ Accordion */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 780px; margin: 0 auto 32px; }
.faq-item {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 19px;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--muted); font-weight: 500; }
.faq-item[open] summary::after { content: "−"; color: var(--accent); }
.faq-item p { margin: 10px 0 2px; font-size: 0.91rem; color: var(--muted); }

/* Rules Page */
.rules-box { max-width: 760px; margin: 0 auto; text-align: center; }
.preset-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 20px 0 24px; }
.rule-pill {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.rule-pill:hover { border-color: var(--accent); transform: translateY(-1px); }
.rule-pill.active { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }

.custom-rule-form { display: flex; gap: 8px; max-width: 560px; margin: 0 auto 24px; }
.active-rules-list { display: flex; flex-direction: column; gap: 8px; text-align: left; max-width: 640px; margin: 0 auto; }
.active-rule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.9rem;
}

/* Alerts */
.alert { max-width: 780px; margin: 0 auto 14px; padding: 11px 15px; border-radius: 11px; font-size: 0.88rem; font-weight: 500; }
.alert-err { background: var(--err-soft); color: var(--err); }
.alert-ok { background: var(--teal-soft); color: var(--teal); }
.alert-warn { background: var(--warn-soft); color: #78350F; }
[data-theme="dark"] .alert-warn { color: #FDE68A; }

/* Prose / Guides / Legal */
.prose {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}
.prose h1 { margin-top: 0; font-size: 1.65rem; letter-spacing: -0.025em; line-height: 1.25; }
.prose h2 { margin-top: 26px; font-size: 1.15rem; }
.prose h3 { margin-top: 18px; font-size: 1rem; }
.prose p, .prose li { color: var(--text); font-size: 0.95rem; }
.prose pre {
  background: var(--bg-top);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  white-space: pre-wrap;
}
.meta-line { font-size: 0.84rem; color: var(--muted); margin-bottom: 14px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 30px;
  font-size: 0.84rem;
  color: var(--subtle);
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--muted); }

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


/* =========================================================================
   SAHIBOL V7 ADDITIONS: Peachy Wave Blend, 62% Frosted Noise, Stepped Scale,
   Devanagari Typography, 12 Guides UX, Feedback Slide-Over, Smart Blanks
   ========================================================================= */

:root {
  --glass-blur: blur(24px) saturate(160%);
  --fs-page-title: clamp(2.05rem, 4vw, 2.85rem);
  --fs-section-head: clamp(1.38rem, 2.2vw, 1.72rem);
  --fs-card-title: 1.02rem;
  --fs-body: 0.96rem;
  --fs-subtext: 0.85rem;
  --fs-micro: 0.74rem;
}

/* Warm Peachy White top blending smoothly into warm blurred amber bottom */
.wave-sky {
  background: linear-gradient(180deg, var(--bg-top) 0%, #FFEEDB 100%);
}
[data-theme="dark"] .wave-sky {
  background: linear-gradient(180deg, #1A1512 0%, #231B15 100%);
}
.wave-backdrop::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -140px;
  height: 46vh;
  background: radial-gradient(ellipse at 50% 60%, rgba(234, 88, 12, 0.14), rgba(245, 158, 11, 0.09) 48%, transparent 76%);
  filter: blur(54px);
  pointer-events: none;
}

/* 62% Frosted Glass + Visible SVG Grain across cards, panels & veils */
.customize-panel,
.prompt-card,
.pro-float,
.feedback-panel,
.guide-peek-veil {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.prompt-card,
.feedback-panel,
.customize-panel {
  position: relative;
  overflow: hidden;
}
.prompt-card::before,
.feedback-panel::before,
.customize-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.085;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  border-radius: inherit;
}
.prompt-card > *,
.feedback-panel > *,
.customize-panel > * {
  position: relative;
  z-index: 1;
}

/* Stepped Text Hierarchy */
.hero-title, .prose h1, .discover-head h1 { font-size: var(--fs-page-title); }
.discover-head h2, .section-heading, .prose h2 { font-size: var(--fs-section-head); }
.prompt-card h4, .prompt-card h2.tpl-title { font-size: var(--fs-card-title); }
body, .prose p, .prose li { font-size: var(--fs-body); }
.prompt-card p, .discover-head p, .price-sub, .field-hint, .site-footer { font-size: var(--fs-subtext); }
.badge, .card-pro-dot, .nav-pill-count, .nav-pill-price, .nav-pill-royal, .ai-compat, .micro-label {
  font-size: var(--fs-micro);
}

/* Devanagari Typography Rules (unbroken shirorekha + +7% size + word-spacing + 1.75 LH) */
html[lang="hi"] {
  font-size: 107%;
}
html[lang="hi"] body,
html[lang="hi"] h1,
html[lang="hi"] h2,
html[lang="hi"] h3,
html[lang="hi"] h4,
html[lang="hi"] p,
html[lang="hi"] li,
html[lang="hi"] a,
html[lang="hi"] button,
html[lang="hi"] label,
html[lang="hi"] input,
html[lang="hi"] textarea,
html[lang="hi"] select,
html[lang="hi"] span {
  letter-spacing: 0 !important;
  word-spacing: 0.08em;
  line-height: 1.75;
}

/* Prompt Guides Cards & Reading UX */
.guide-card {
  gap: 14px;
}
.guide-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
}
.guide-cat-tag {
  font-size: var(--fs-micro);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  text-align: left;
}
.guide-read-time {
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--subtle);
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}
.guide-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.guide-tier-pill {
  font-size: var(--fs-micro);
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.guide-tier-pill.free {
  background: var(--teal-soft);
  color: var(--teal);
}
.guide-tier-pill.pro {
  background: var(--gold-soft);
  color: var(--gold-text);
}

/* Sticky Reading Progress Bar */
.reading-progress-wrap {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: 4px;
  background: rgba(194, 65, 12, 0.14);
  z-index: 60;
}
@media (max-width: 900px) {
  .reading-progress-wrap { left: 0; }
}
.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: width 0.08s linear;
}

.guide-article {
  line-height: 1.8;
}
.guide-article p,
.guide-article li {
  line-height: 1.8;
}
.guide-article h2 {
  margin-top: 28px;
  margin-bottom: 10px;
}
.guide-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0 18px;
}
@media (min-width: 680px) {
  .guide-compare { grid-template-columns: 1fr 1fr; }
}
.guide-box {
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--bg-top);
}
.guide-box.bad { border-left: 3px solid var(--err); }
.guide-box.good { border-left: 3px solid var(--teal); }
.guide-box-label {
  font-size: var(--fs-micro);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.guide-box.bad .guide-box-label { color: var(--err); }
.guide-box.good .guide-box-label { color: var(--teal); }
.guide-box pre {
  margin: 0;
  padding: 10px;
  font-size: 0.82rem;
  background: var(--surface-solid);
}

.guide-mistakes {
  background: var(--warn-soft);
  border: 1px solid rgba(180, 83, 9, 0.25);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 20px;
}
.guide-mistakes h3 {
  margin-top: 0;
  color: var(--gold-text);
}

/* Pro Peek Frosted Unlock Veil */
.guide-peek-wrap {
  position: relative;
  margin-top: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 260px;
}
.guide-peek-blur {
  filter: blur(5.5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.45;
  padding: 18px;
}
.guide-peek-veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px;
  border: 1.5px solid var(--gold-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.guide-peek-veil h3 {
  margin: 8px 0 8px;
  font-size: 1.2rem;
}
.guide-peek-veil p {
  max-width: 440px;
  margin: 0 0 16px;
  color: var(--muted);
}

/* Smart Fill-in-the-Blanks Bar */
.blanks-bar {
  margin-bottom: 14px;
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--bg-top);
  border: 1px dashed var(--accent);
}
.blanks-head {
  font-size: var(--fs-subtext);
  font-weight: 700;
  color: var(--accent-text);
  margin-bottom: 9px;
}
.blanks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 9px;
}
.blank-field label {
  display: block;
  font-size: var(--fs-micro);
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 3px;
}
.blank-field input {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  font-size: var(--fs-subtext);
}

/* Anonymous Feedback Slide-Over Panel */
.feedback-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.36);
  z-index: 80;
}
.feedback-panel {
  position: fixed;
  top: 14px;
  right: 14px;
  bottom: 14px;
  width: min(420px, calc(100vw - 24px));
  z-index: 85;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.feedback-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.feedback-head h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}
.feedback-head p {
  margin: 0;
  font-size: var(--fs-subtext);
  color: var(--muted);
}
.feedback-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.feedback-pill {
  min-height: 42px;
  padding: 7px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: var(--fs-subtext);
  cursor: pointer;
  transition: all 0.15s;
}
.feedback-pill:hover { border-color: var(--accent); }
.feedback-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-text);
}
.fb-counter {
  text-align: right;
  font-size: var(--fs-micro);
  color: var(--subtle);
  margin-top: 4px;
}
.fb-thanks {
  text-align: center;
  padding: 28px 12px;
}
.fb-thanks-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
}
.feedback-trigger-btn {
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--muted);
}
.feedback-trigger-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface-soft);
}
.footer-feedback-btn {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: var(--accent-text);
  font-weight: 600;
  cursor: pointer;
}
.footer-feedback-btn:hover { text-decoration: underline; }

/* Session Replaced Alert Banner */
.session-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  max-width: 560px;
  width: calc(100% - 24px);
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--err-soft);
  color: var(--err);
  border: 1px solid var(--err);
  font-weight: 600;
  font-size: var(--fs-subtext);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}


/* =========================================================================
   SAHIBOL V8 PREMIUM ELEVATION: Ambient Warm Depth, Tactile Specular Glass,
   Generate / New-Version Pill CTA, Calendar-Only Date Pickers, Pro Benefits
   ========================================================================= */

/* Richer atmospheric depth behind 62% frosted glass so blur refracts warm light */
.wave-backdrop::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, 120vw);
  height: 460px;
  background:
    radial-gradient(circle at 26% 42%, rgba(251, 146, 60, 0.16), transparent 54%),
    radial-gradient(circle at 74% 38%, rgba(245, 158, 11, 0.14), transparent 56%),
    radial-gradient(circle at 50% 70%, rgba(234, 88, 12, 0.08), transparent 62%);
  filter: blur(42px);
  pointer-events: none;
}
[data-theme="dark"] .wave-backdrop::before {
  background:
    radial-gradient(circle at 28% 42%, rgba(234, 88, 12, 0.14), transparent 55%),
    radial-gradient(circle at 72% 40%, rgba(217, 119, 6, 0.10), transparent 55%);
}

/* Elevated Frosted Sidebar */
.sidebar {
  background: rgba(255, 253, 250, 0.84);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  box-shadow: 1px 0 24px rgba(120, 53, 15, 0.04);
}
[data-theme="dark"] .sidebar {
  background: rgba(22, 20, 22, 0.86);
}
.sidebar-brand .brand-mark {
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.25);
}
.nav-item {
  position: relative;
  transition: background 0.18s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s, transform 0.18s;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
}

/* Hero Eyebrow & Typographic Polish */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(194, 65, 12, 0.16);
  color: var(--accent-text);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(194, 65, 12, 0.06);
}
[data-theme="dark"] .hero-eyebrow {
  background: rgba(34, 28, 25, 0.72);
  border-color: rgba(251, 146, 60, 0.26);
}
.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Specular Dimensional Composer Card */
.composer-card {
  border: 1px solid rgba(180, 83, 9, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 20px 50px rgba(120, 53, 15, 0.09),
    0 2px 6px rgba(17, 24, 39, 0.04);
  padding: 18px 20px 15px;
}
[data-theme="dark"] .composer-card {
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 22px 54px rgba(0, 0, 0, 0.45);
}

/* Primary Tactile Gradient Generate / Create New Version Button */
.btn-generate-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #EA580C 0%, #C2410C 100%);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 8px 20px rgba(194, 65, 12, 0.28);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s, filter 0.15s;
}
.btn-generate-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 12px 26px rgba(194, 65, 12, 0.34);
}
.btn-generate-pill:active {
  transform: translateY(0);
}
.btn-generate-pill.is-dirty {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  box-shadow:
    0 0 0 4px rgba(245, 158, 11, 0.22),
    0 10px 24px rgba(180, 83, 9, 0.32);
}
.btn-generate-pill svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Composer Inline Blanks & Calendar-Only Date Tray */
.input-blanks-bar {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(255, 247, 240, 0.72);
  border: 1px dashed rgba(194, 65, 12, 0.36);
}
[data-theme="dark"] .input-blanks-bar {
  background: rgba(32, 26, 23, 0.72);
  border-color: rgba(251, 146, 60, 0.35);
}

.date-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.calendar-only-input {
  width: 100%;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-solid);
  cursor: pointer;
  caret-color: transparent;
}
.calendar-only-input:hover {
  border-color: var(--accent);
}
.blank-field .calendar-only-input {
  min-height: 36px;
  font-size: var(--fs-subtext);
}

/* Result Panel Entrance, Version Pill, Quality Meter & Stale/Regen Banner */
@keyframes sbFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-panel {
  animation: sbFadeUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid rgba(180, 83, 9, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 18px 46px rgba(17, 24, 39, 0.08);
  transition: opacity 0.2s, border-color 0.2s;
}
.result-panel.is-stale {
  border-color: var(--warn);
}
.result-panel.is-stale .output-box {
  opacity: 0.72;
}

.regen-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--warn-soft);
  border: 1px solid rgba(180, 83, 9, 0.35);
  color: #78350F;
  font-size: var(--fs-subtext);
  font-weight: 600;
}
[data-theme="dark"] .regen-banner {
  color: #FDE68A;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: var(--fs-micro);
  font-weight: 800;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.score-meter {
  width: 68px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}
.score-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-bright), var(--teal));
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.output-box {
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.09);
  box-shadow: inset 0 1px 4px rgba(17, 24, 39, 0.03);
}

.btn-launch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-launch svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Elevated Hover Lift on Cards */
.prompt-card {
  border: 1px solid rgba(180, 83, 9, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 6px 20px rgba(17, 24, 39, 0.045);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s, box-shadow 0.2s;
}
[data-theme="dark"] .prompt-card {
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 22px rgba(0, 0, 0, 0.32);
}
.prompt-card:hover {
  transform: translateY(-3px);
  border-color: rgba(234, 88, 12, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 36px rgba(194, 65, 12, 0.10);
}

/* Buy Pro Pass Benefits Showcase Grid (exclusively on pricing.html) */
.pro-benefits-section {
  max-width: 960px;
  margin: 0 auto 40px;
}
.pro-benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .pro-benefits-grid { grid-template-columns: repeat(3, 1fr); }
}
.benefit-card {
  background: var(--glass-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(200, 155, 60, 0.32);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.benefit-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--text);
}
.benefit-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: var(--fs-subtext);
  line-height: 1.6;
}
.benefit-list li {
  margin-bottom: 5px;
}
