/* === DEEN DAILY — Modern Luxe === */

@font-face {
  font-family: "Omar Naskh";
  src: url("/fonts/omar-naskh-medium.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LPMQ Isyarat";
  src: url("/fonts/lpmq-isyarat.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* Ink (deep emeralds, near black) */
  --ink-950: #061811;
  --ink-900: #0A1F18;
  --ink-800: #0F2A20;
  --ink-700: #163828;
  --ink-600: #1F4E3A;
  --ink-500: #2C7058;
  --ink-400: #4A8C77;
  --ink-300: #79AC9B;
  --ink-200: #B8D2C7;
  --ink-100: #DCE9E2;

  /* Champagne / gold accents */
  --gold-50:  #FAF4E2;
  --gold-100: #F2E5BC;
  --gold-200: #E5D195;
  --gold-300: #D4B86A;
  --gold-400: #C9A961;
  --gold-500: #B89248;
  --gold-600: #8E6D2C;

  /* Cream / surface — warm luxury */
  --cream-50:  #FBF8F0;
  --cream-100: #F6F0E1;
  --cream-200: #EDE3CB;
  --cream-300: #E0D2B0;

  /* Accent = champagne gold (luxury Islamic) */
  --accent-50:  #F8F1DA;
  --accent-100: #F2E5BC;
  --accent-200: #E5D195;
  --accent-300: #D4B86A;
  --accent-400: #C9A961;
  --accent-500: #B89248;
  --accent-600: #8E6D2C;
  --accent-700: #6B5320;

  /* Charcoal / text — warm, refined */
  --ink-text:  #1B1F1D;
  --text-1:    #1B1F1D;
  --text-2:    #4F5651;
  --text-3:    #7A8079;
  --text-4:    #A8ADA6;

  /* Lines & surfaces */
  --line:        rgba(11, 31, 24, 0.06);
  --line-strong: rgba(11, 31, 24, 0.10);
  --surface:     #FFFFFF;
  --surface-2:   #FBFAF6;
  --surface-3:   #F6F0E1;
  --bg:          #F5F1E8;
  --bg-warm:     #F8F4EA;

  /* Brand-anchor: deep emerald (luxury Islamic). Stays dark in both modes. */
  --brand-deep:  #0A1F18;
  --brand-mid:   #163828;
  --brand-light: #1F4E3A;
  --on-brand:    #FBF8F0;
  --on-gold:     #0A1F18;
  --on-accent:   #0A1F18;
  --text-strong: #0A1F18;  /* primary heading color (flips in dark mode) */

  /* Shadows — multi-layer, soft */
  --sh-xs: 0 1px 2px rgba(11, 31, 24, 0.04);
  --sh-sm: 0 1px 2px rgba(11, 31, 24, 0.04), 0 1px 1px rgba(11, 31, 24, 0.03);
  --sh-md: 0 2px 4px rgba(11, 31, 24, 0.04), 0 8px 24px rgba(11, 31, 24, 0.06);
  --sh-lg: 0 4px 8px rgba(11, 31, 24, 0.04), 0 24px 64px rgba(11, 31, 24, 0.10);
  --sh-xl: 0 8px 16px rgba(11, 31, 24, 0.05), 0 40px 96px rgba(11, 31, 24, 0.12);
  --sh-glow: 0 0 0 1px rgba(212, 184, 106, 0.15), 0 8px 32px rgba(212, 184, 106, 0.18);

  /* Radius — slightly bigger across the board for modern softness */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 999px;

  /* Type — Geist (sama dengan growallet) */
  --font-display: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  --font-body: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-arabic: "Omar Naskh", "LPMQ Isyarat", "Amiri", "Scheherazade New", serif;

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Ambient (used in body background) */
  --ambient-1: rgba(212, 184, 106, 0.08);
  --ambient-2: rgba(15, 42, 32, 0.05);

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
}

/* ============================================================
   DARK MODE — "Calm" direction
   Deep navy-emerald, warm cream text, gold + sage accents.
   ============================================================ */
[data-theme="dark"] {
  color-scheme: dark;

  --ink-950: #03100B;
  --ink-900: #0A1F18;     /* keep as bg in both modes — text uses --text-strong */
  --ink-800: #163828;
  --ink-700: #1F4E3A;     /* sage emerald-ish */
  --ink-600: #5BA28C;
  --ink-500: #6BB8A0;
  --ink-400: #80C8B5;
  --ink-300: #9DD3C5;
  --ink-200: #BAE0D5;
  --ink-100: #DCEEE8;

  --gold-50:  #2A2410;
  --gold-100: #3D3416;
  --gold-200: #B89248;
  --gold-300: #D4B86A;
  --gold-400: #E0CC92;
  --gold-500: #EDD9A5;
  --gold-600: #F4E5C2;

  --cream-50:  #15241D;
  --cream-100: #1A2D24;
  --cream-200: #213628;
  --cream-300: #2A4234;

  --ink-text: #E8DCC4;
  --text-1:   #E8DCC4;
  --text-2:   #B5AC97;
  --text-3:   #80796B;
  --text-4:   #545048;
  --text-strong: #F2E8D2;

  --line:        rgba(232, 220, 196, 0.08);
  --line-strong: rgba(232, 220, 196, 0.14);
  --surface:     #15241D;
  --surface-2:   #1A2D24;
  --surface-3:   #213628;
  --bg:          #0A1612;
  --bg-warm:     #0E1A15;

  --brand-deep:  #03100B;
  --brand-mid:   #0F261C;
  --brand-light: #1F4E3A;

  --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(0, 0, 0, 0.2);
  --sh-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
  --sh-lg: 0 4px 8px rgba(0, 0, 0, 0.3), 0 24px 64px rgba(0, 0, 0, 0.5);
  --sh-xl: 0 8px 16px rgba(0, 0, 0, 0.4), 0 40px 96px rgba(0, 0, 0, 0.6);

  --ambient-1: rgba(212, 184, 106, 0.06);
  --ambient-2: rgba(74, 140, 119, 0.05);
}

/* Smooth transition between modes */
html, body, .card, .btn, .field input, .field textarea, .field select,
.sidebar, .main, .audio-bar, .mobile-nav, .sheet, .modal {
  transition: background-color 0.4s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

* { box-sizing: border-box; }
*::selection { background: var(--gold-200); color: var(--on-gold); }
html, body { margin: 0; padding: 0; }

html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11", "ss02", "cv02";
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 20% 0%, var(--ambient-1), transparent 50%),
    radial-gradient(circle at 80% 100%, var(--ambient-2), transparent 50%);
  background-attachment: fixed;
}

/* === DARK MODE AMBIENT (brand-tinted, tenant-adaptive) === */
[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(var(--accent-rgb, 212, 184, 106), 0.10), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(var(--brand-deep-rgb, 31, 78, 58), 0.18), transparent 55%),
    radial-gradient(ellipse at 0% 60%, rgba(var(--brand-deep-rgb, 74, 140, 119), 0.10), transparent 50%);
}
[data-theme="dark"] body::before {
  /* Subtle star field */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(232, 220, 196, 0.4), transparent),
    radial-gradient(1px 1px at 28% 42%, rgba(232, 220, 196, 0.25), transparent),
    radial-gradient(2px 2px at 75% 22%, rgba(212, 184, 106, 0.3), transparent),
    radial-gradient(1px 1px at 88% 58%, rgba(232, 220, 196, 0.3), transparent),
    radial-gradient(1px 1px at 45% 78%, rgba(232, 220, 196, 0.25), transparent),
    radial-gradient(1.5px 1.5px at 18% 88%, rgba(212, 184, 106, 0.2), transparent),
    radial-gradient(1px 1px at 62% 12%, rgba(232, 220, 196, 0.3), transparent);
  background-size: 100% 100%;
  background-attachment: fixed;
  opacity: 0.7;
}

/* In dark mode, welcome & pom display use brand-tinted glow (tenant-adaptive) */
[data-theme="dark"] .welcome-card {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(var(--accent-rgb, 212, 184, 106), 0.16), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(var(--brand-deep-rgb, 74, 140, 119), 0.18), transparent 55%),
    linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-mid) 60%, var(--brand-light) 100%);
  border-color: rgba(var(--accent-rgb, 212, 184, 106), 0.14);
}
[data-theme="dark"] .pom-display {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb, 212, 184, 106), 0.20), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(var(--brand-deep-rgb, 74, 140, 119), 0.14), transparent 50%),
    linear-gradient(160deg, var(--brand-deep) 0%, var(--brand-mid) 100%);
}
[data-theme="dark"] .hadith-card,
[data-theme="dark"] .ai-reflection {
  background:
    radial-gradient(circle at 100% 0%, rgba(212, 184, 106, 0.06), transparent 55%),
    var(--surface);
}
[data-theme="dark"] .auth-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 184, 106, 0.08), transparent 60%),
    var(--surface);
}

/* Mood verse card: in dark mode, deeper gradient based on mood tone */
[data-theme="dark"] .mood-verse-card {
  background:
    radial-gradient(circle at 100% 0%, var(--mood-bg-1), transparent 55%),
    var(--surface);
}

/* Mobile nav glass for dark mode */
[data-theme="dark"] .mobile-nav {
  background: rgba(10, 22, 18, 0.85);
  border-top-color: rgba(232, 220, 196, 0.08);
}
[data-theme="dark"] .mobile-nav a.active .ic {
  background: var(--cream-100);
  border-color: var(--line-strong);
}

/* Audio bar adjusts in dark mode */
[data-theme="dark"] .audio-bar {
  background: rgba(3, 16, 11, 0.92);
  border-top-color: rgba(212, 184, 106, 0.18);
}
[data-theme="dark"] .mobile-nav {
  background: rgba(10, 22, 18, 0.85);
  border-top-color: rgba(232, 220, 196, 0.08);
}

/* Sheet modal in dark mode */
[data-theme="dark"] .sheet { background: var(--surface-2); }

/* Make main content sit above star field */
.main, .sidebar, .landing, .auth-page { position: relative; z-index: 1; }

a { color: var(--ink-500); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--ink-700); }
hr { border: none; border-top: 1px solid var(--line); margin: var(--s-5) 0; }

/* === LAYOUT === */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--brand-deep) 0%, #061811 100%);
  color: var(--on-brand);
  padding: var(--s-6) var(--s-4);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  border-right: 1px solid rgba(212, 184, 106, 0.06);
  overflow-y: auto;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb, 212, 184, 106), 0.08), transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(var(--brand-deep-rgb, 31, 78, 58), 0.10), transparent 50%);
  pointer-events: none;
}
.sidebar > * { position: relative; }

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  margin-bottom: var(--s-6);
}
.sidebar .brand-mark {
  width: 40px;
  height: 40px;
  background:
    radial-gradient(circle at 70% 25%, rgba(var(--accent-rgb, 212,184,106),0.18), transparent 60%),
    linear-gradient(135deg, var(--brand-light) 0%, var(--brand-mid) 60%, var(--brand-deep) 100%);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-300);
  box-shadow: 0 4px 12px rgba(11, 31, 24, 0.4), inset 0 1px 0 rgba(212, 184, 106, 0.15);
  padding: 6px;
}
.sidebar .brand-mark svg { width: 100%; height: 100%; }
.sidebar .brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--on-brand);
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  color: rgba(246, 240, 225, 0.65);
  font-size: 13.5px;
  font-weight: 450;
  letter-spacing: -0.005em;
  transition: all 0.2s var(--ease);
  position: relative;
}
.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--on-brand);
}
.sidebar nav a.active {
  background: linear-gradient(90deg, rgba(212, 184, 106, 0.15) 0%, rgba(212, 184, 106, 0.04) 100%);
  color: var(--gold-200);
}
.sidebar nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 16px rgba(212, 184, 106, 0.35);
}
.sidebar nav a .ic {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.sidebar nav a .ic svg { width: 18px; height: 18px; }
.sidebar nav a:hover .ic, .sidebar nav a.active .ic { opacity: 1; }

.sidebar .nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246, 240, 225, 0.35);
  padding: var(--s-4) 14px var(--s-2);
}

.sidebar .footer-area {
  padding-top: var(--s-4);
  border-top: 1px solid rgba(246, 240, 225, 0.06);
  margin-top: var(--s-3);
}
.sidebar .user-chip {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--r-sm);
  margin-bottom: var(--s-2);
  border: 1px solid rgba(246, 240, 225, 0.05);
}
.sidebar .user-chip .name {
  color: var(--on-brand);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
}
.sidebar .user-chip .email {
  color: rgba(246, 240, 225, 0.45);
  font-size: 11px;
  margin-top: 2px;
}
.sidebar .footer-area a {
  display: block;
  padding: 6px 14px;
  font-size: 12px;
  color: rgba(246, 240, 225, 0.55);
  border-radius: var(--r-sm);
  transition: all 0.2s var(--ease);
}
.sidebar .footer-area a {
  display: block;
  padding: 8px 14px;
  font-size: 12px;
  color: rgba(246, 240, 225, 0.55);
  border-radius: var(--r-sm);
  transition: all 0.2s var(--ease);
  text-decoration: none;
}
.sidebar .footer-area a:hover { color: var(--gold-200); background: rgba(255,255,255,0.03); }
.sidebar .footer-area a.theme-toggle-link { color: var(--gold-300); }
.sidebar .footer-area a.install-btn { color: var(--ink-400); }

/* === MAIN === */
.main {
  padding: var(--s-7) var(--s-7) var(--s-9);
  max-width: 1080px;
  width: 100%;
  animation: fadeIn 0.4s var(--ease-out);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head {
  margin-bottom: var(--s-6);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 3.8vw, 48px);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-strong);
}
.page-head h1 em {
  font-style: normal;
  color: var(--text-2);
  font-weight: 400;
}
.page-head p {
  color: var(--text-3);
  margin: 6px 0 0;
  font-size: 14px;
  letter-spacing: -0.005em;
}

/* === CARDS === */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.02);
  border: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.card.tight { padding: var(--s-4); }
.card.lg { padding: var(--s-6); }
.card h2, .card h3 {
  margin: 0 0 var(--s-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.card-row { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); min-width: 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); min-width: 0; }
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* === BUTTONS — pill-shaped, bold (Nuvance signature) === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-full);
  border: none;
  background: var(--brand-deep);
  color: var(--on-brand);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  font-family: inherit;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-mid); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(11, 15, 31, 0.22); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(11, 15, 31, 0.15); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn.ghost {
  background: var(--surface);
  color: var(--text-strong);
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-xs);
}
.btn.ghost:hover { background: var(--cream-50); border-color: var(--text-3); }

.btn.gold {
  background: linear-gradient(180deg, var(--gold-300) 0%, var(--gold-500) 100%);
  color: var(--on-gold);
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 6px 18px rgba(212, 184, 106, 0.3);
}
.btn.gold:hover {
  background: linear-gradient(180deg, var(--gold-200) 0%, var(--gold-400) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 10px 24px rgba(212, 184, 106, 0.4);
}

.btn.accent {
  background: linear-gradient(180deg, var(--accent-400) 0%, var(--accent-600) 100%);
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 24px rgba(61, 77, 255, 0.32);
}
.btn.accent:hover {
  background: linear-gradient(180deg, var(--accent-300) 0%, var(--accent-500) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset, 0 12px 32px rgba(61, 77, 255, 0.42);
}

.btn.sm { padding: 8px 16px; font-size: 13px; }
.btn.lg { padding: 16px 32px; font-size: 15px; }
.btn.full { width: 100%; }
.btn.danger {
  background: transparent;
  color: #b34141;
  border: 1px solid rgba(179, 65, 65, 0.3);
}
.btn.danger::before { display: none; }
.btn.danger:hover { background: rgba(179, 65, 65, 0.06); border-color: #b34141; transform: translateY(-1px); }

/* === FORMS === */
.field { margin-bottom: var(--s-4); }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0;
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-1);
  transition: all 0.2s var(--ease);
  letter-spacing: -0.005em;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-4); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 4px rgba(31, 78, 58, 0.08);
}
.field textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.45; }

/* === LANDING === */
.landing {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(212, 184, 106, 0.18), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(31, 78, 58, 0.10), transparent 50%),
    linear-gradient(180deg, var(--bg-warm) 0%, var(--cream-100) 100%);
  display: flex;
  flex-direction: column;
}
.landing header {
  padding: var(--s-5) var(--s-7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}
.landing .brand {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.03em;
}
.landing .brand .mark {
  width: 38px;
  height: 38px;
  background:
    radial-gradient(circle at 70% 25%, rgba(var(--accent-rgb, 212,184,106),0.18), transparent 60%),
    linear-gradient(135deg, var(--brand-light) 0%, var(--brand-mid) 60%, var(--brand-deep) 100%);
  color: var(--gold-300);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(11, 31, 24, 0.2);
  padding: 6px;
}
.landing .brand .mark svg { width: 100%; height: 100%; }
.landing .auth-links { display: flex; gap: var(--s-3); }

.landing .hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--s-7) var(--s-5) var(--s-9);
  text-align: center;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}
.hero-inner { max-width: 820px; width: 100%; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(212, 184, 106, 0.10);
  border: 1px solid rgba(212, 184, 106, 0.25);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-600);
  letter-spacing: 0.08em;
  margin-bottom: var(--s-5);
  text-transform: uppercase;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7.5vw, 88px);
  line-height: 0.96;
  margin: 0 0 var(--s-5);
  letter-spacing: -0.045em;
  color: var(--text-strong);
  font-weight: 600;
}
.hero h1 em {
  font-style: normal;
  font-weight: 600;
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--gold-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lede {
  font-size: 19px;
  color: var(--text-2);
  margin: 0 auto var(--s-6);
  line-height: 1.6;
  max-width: 620px;
  letter-spacing: -0.005em;
  font-weight: 400;
}
.hero .cta-row {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  flex-wrap: wrap;
}
.hero .preview {
  margin: var(--s-8) auto 0;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--sh-xl);
  border: 1px solid var(--line);
  text-align: left;
  max-width: 760px;
  position: relative;
  overflow: hidden;
}
.hero .preview::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 184, 106, 0.4), transparent);
}
.hero .preview h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}
.hero .preview .sub {
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: var(--s-5);
  letter-spacing: -0.005em;
}
.preview-times {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
@media (max-width: 600px) { .preview-times { grid-template-columns: repeat(3, 1fr); } }
.pt-cell {
  background: var(--cream-50);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 8px;
  text-align: center;
  transition: all 0.25s var(--ease);
}
.pt-cell .lbl {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.pt-cell .tm {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--text-strong);
  margin-top: 4px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.pt-cell.next {
  background: linear-gradient(160deg, var(--brand-deep) 0%, var(--brand-mid) 100%);
  border-color: var(--brand-light);
  box-shadow: 0 12px 28px -8px rgba(11, 31, 24, 0.30);
}
.pt-cell.next .lbl { color: var(--gold-300); }
.pt-cell.next .tm { color: var(--gold-200); }

/* === LANDING V2 (conversion-focused, long scroll) === */
/* Force full-viewport width — overrides any parent .main max-width */
main.public-main { max-width: none !important; width: 100% !important; padding: 0 !important; }
.landing-v2 {
  background: var(--bg-warm);
  min-height: 100vh;
  width: 100%;
  max-width: none;
}
.landing-v2 > header,
.landing-v2 > section,
.landing-v2 > footer { width: 100%; max-width: none; }
.lp-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 600px) { .lp-container { padding: 0 18px; } }

.lp-header {
  position: sticky;
  top: 0;
  background: rgba(248, 244, 234, 0.85);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  z-index: 50;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
[data-theme="dark"] .lp-header { background: rgba(10, 22, 18, 0.85); border-bottom-color: rgba(232, 220, 196, 0.08); }
[data-theme="dark"] .lp-trust { background: var(--surface); }
[data-theme="dark"] .lp-section-alt { background: var(--surface); }
.lp-header .lp-container {
  display: flex;
  align-items: center;
  gap: 32px;
}
.lp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  flex-shrink: 0;
}
.lp-brand-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #0F2A20, #061811);
  color: var(--gold-300);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 5px;
}
.lp-brand-mark svg { width: 100%; height: 100%; }
.lp-nav {
  display: flex;
  gap: 28px;
  flex: 1;
  margin-left: 16px;
}
.lp-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.lp-nav a:hover { color: var(--text-strong); }
.lp-auth-links { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 720px) { .lp-nav { display: none; } }

.lp-hero {
  padding: 80px 0 60px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212,184,106,0.18), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(31,78,58,0.10), transparent 50%);
}
.lp-hero-inner { max-width: 880px; margin: 0 auto; }
.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(212, 184, 106, 0.12);
  border: 1px solid rgba(212, 184, 106, 0.25);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-600);
  letter-spacing: 0.08em;
  margin-bottom: 28px;
  text-transform: uppercase;
}
.lp-hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--text-strong);
  font-weight: 700;
  margin: 0 0 20px;
}
.lp-hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--gold-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lp-hero-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto 36px;
  letter-spacing: -0.005em;
}
.lp-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.lp-hero-meta {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
}

.lp-trust {
  background: var(--surface);
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.lp-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.lp-stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.04em;
  line-height: 1;
}
.lp-stat-label {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 6px;
  letter-spacing: -0.005em;
}
@media (max-width: 720px) { .lp-trust-grid { grid-template-columns: repeat(2, 1fr); } }

.lp-section { padding: 80px 0; }
.lp-section-alt { background: var(--surface); }
.lp-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.lp-section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold-600);
  margin-bottom: 12px;
}
.lp-section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text-strong);
  font-weight: 700;
  margin: 0 0 16px;
}
.lp-section-sub {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.6;
  letter-spacing: -0.005em;
}

.lp-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.lp-feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: all 0.3s var(--ease);
}
.lp-section-alt .lp-feature { background: var(--bg-warm); }
.lp-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(11, 31, 24, 0.08);
  border-color: rgba(212, 184, 106, 0.3);
}
.lp-feature-ic {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--cream-100), var(--cream-200));
  color: var(--text-strong);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
}
.lp-feature h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.lp-feature p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}
@media (max-width: 880px) { .lp-feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .lp-feature-grid { grid-template-columns: 1fr; } }

.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.lp-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  text-align: center;
}
.lp-step-num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 16px;
}
.lp-step h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.lp-step p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 720px) { .lp-steps { grid-template-columns: 1fr; } }

.lp-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 1024px) { .lp-pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .lp-pricing-grid { grid-template-columns: 1fr; } }

.lp-pricing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s var(--ease);
}
.lp-pricing-card.is-popular {
  border-color: var(--gold-400);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 184, 106, 0.12), transparent 70%),
    var(--surface);
  box-shadow: 0 16px 40px -8px rgba(212, 184, 106, 0.25);
  transform: scale(1.03);
  z-index: 1;
}
.lp-pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--on-gold);
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(212, 184, 106, 0.3);
}
.lp-pricing-save {
  display: inline-block;
  background: rgba(74, 140, 119, 0.15);
  color: #2d6e5d;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  align-self: flex-start;
}
.lp-pricing-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.lp-pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.lp-price-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.04em;
  line-height: 1;
}
.lp-price-unit {
  font-size: 13px;
  color: var(--text-2);
}
.lp-pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}
.lp-pricing-features li {
  font-size: 13.5px;
  color: var(--text-1);
  padding: 6px 0;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.lp-pricing-cta {
  width: 100%;
  margin-top: auto;
}
.lp-pricing-note {
  margin-top: 32px;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.lp-pricing-note a { color: var(--gold-600); font-weight: 600; }

.lp-testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.lp-testimonial {
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}
.lp-section-alt .lp-testimonial { background: var(--surface); }
.lp-testimonial-quote {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-strong);
  letter-spacing: -0.015em;
  margin-bottom: 20px;
  font-style: italic;
}
.lp-testimonial-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-strong);
  letter-spacing: -0.015em;
}
.lp-testimonial-role {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}
@media (max-width: 880px) { .lp-testimonials { grid-template-columns: 1fr; } }

.lp-faq-list {
  max-width: 760px;
  margin: 0 auto;
}
.lp-faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0;
  margin-bottom: 10px;
  overflow: hidden;
}
.lp-faq-q {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -0.015em;
  cursor: pointer;
  padding: 18px 22px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lp-faq-q::-webkit-details-marker { display: none; }
.lp-faq-q::after {
  content: "+";
  font-size: 22px;
  color: var(--gold-600);
  font-weight: 400;
  transition: transform 0.2s;
}
.lp-faq-item[open] .lp-faq-q::after { content: "−"; }
.lp-faq-a {
  padding: 0 22px 18px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
}

.lp-final-cta { padding: 80px 0; }
.lp-final-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb, 212, 184, 106), 0.20), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(var(--brand-deep-rgb, 31, 78, 58), 0.30), transparent 55%),
    linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-mid) 100%);
  color: var(--on-brand);
  border-radius: var(--r-xl);
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lp-final-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 184, 106, 0.5), transparent);
}
.lp-final-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-300);
  letter-spacing: 0.18em;
  margin-bottom: 16px;
}
.lp-final-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--on-brand);
}
.lp-final-sub {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.85;
  max-width: 520px;
  margin: 0 auto 28px;
}

.lp-footer {
  background: var(--brand-deep);
  color: var(--on-brand);
  padding: 60px 0 30px;
}
.lp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.lp-footer .lp-brand { color: var(--on-brand); font-size: 18px; }
.lp-footer-tag {
  font-size: 13.5px;
  line-height: 1.6;
  opacity: 0.65;
  max-width: 320px;
}
.lp-footer-h {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 12px;
}
.lp-footer a {
  display: block;
  color: rgba(251, 248, 240, 0.7);
  font-size: 14px;
  text-decoration: none;
  padding: 4px 0;
}
.lp-footer a:hover { color: var(--on-brand); }
.lp-footer-copy {
  border-top: 1px solid rgba(251, 248, 240, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 720px) { .lp-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .lp-footer-grid { grid-template-columns: 1fr; } }

/* === LEGACY landing (keep for fallback) === */
.feature-grid {
  margin-top: var(--s-9);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
@media (max-width: 720px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  border: 1px solid var(--line);
  text-align: left;
  transition: all 0.3s var(--ease);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  border-color: rgba(61, 77, 255, 0.15);
}
.feature .ic-pill {
  background: linear-gradient(135deg, var(--cream-100), var(--cream-200));
  color: var(--text-strong);
  border: 1px solid var(--line);
}
.feature h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -0.025em;
}
.feature p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
  letter-spacing: -0.005em;
}
.feature .ic-pill {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--cream-100) 0%, var(--cream-200) 100%);
  color: var(--ink-700);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: var(--s-3);
  border: 1px solid var(--line);
}
.landing footer {
  text-align: center;
  padding: var(--s-6) var(--s-5);
  color: var(--text-4);
  font-size: 12px;
  letter-spacing: -0.005em;
}

/* === AUTH FORMS === */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(212, 184, 106, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg-warm) 0%, var(--cream-100) 100%);
  padding: var(--s-5);
}
.auth-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--sh-xl);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 184, 106, 0.5), transparent);
}
.auth-card .brand {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-strong);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.04em;
}
.auth-card .sub {
  text-align: center;
  color: var(--text-3);
  margin-bottom: var(--s-6);
  font-size: 14px;
  letter-spacing: -0.005em;
}
.auth-card .switch {
  text-align: center;
  margin-top: var(--s-5);
  font-size: 13px;
  color: var(--text-3);
}
.auth-card .switch a { color: var(--ink-600); font-weight: 500; }

/* === DASHBOARD === */
.welcome-card {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(var(--accent-rgb, 212, 184, 106), 0.22), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(var(--brand-deep-rgb, 31, 78, 58), 0.30), transparent 55%),
    linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-mid) 60%, var(--brand-light) 100%);
  color: var(--on-brand);
  padding: var(--s-7);
  border-radius: var(--r-xl);
  margin-bottom: var(--s-5);
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 48px -12px rgba(11, 31, 24, 0.30), 0 4px 8px rgba(11, 31, 24, 0.06);
}
.welcome-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.12), transparent 50%);
  pointer-events: none;
}
.welcome-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}
.welcome-card > * { position: relative; z-index: 1; }
.welcome-card .greet {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
.welcome-card h2 {
  font-family: var(--font-display);
  font-size: 32px;
  margin: 0 0 var(--s-5);
  color: var(--on-brand);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.welcome-card .next-prayer {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.welcome-card .next-prayer .label {
  font-size: 11px;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.welcome-card .next-prayer .name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.welcome-card .next-prayer .countdown {
  margin-left: auto;
  text-align: right;
}
.welcome-card .next-prayer .countdown .time {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 500;
  color: var(--gold-300);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.welcome-card .next-prayer .countdown .left {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  border: 1px solid var(--line);
  transition: all 0.25s var(--ease);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.stat-card:hover { border-color: rgba(61, 77, 255, 0.15); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08); }
.stat-card .lbl {
  font-size: 11.5px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 12px;
}
.stat-card .val {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}
.stat-card { min-width: 0; overflow: hidden; }
@media (max-width: 600px) {
  .stat-card .val { font-size: 28px; letter-spacing: -0.035em; }
}
.stat-card .val .small {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 4px;
}

.progress-bar {
  height: 6px;
  background: var(--cream-100);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-top: var(--s-3);
}
.progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-300), var(--gold-500));
  transition: width 0.6s var(--ease-out);
  border-radius: var(--r-full);
}

/* === SHOLAT TRACKER === */
.prayer-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: var(--s-3);
}
@media (max-width: 600px) { .prayer-grid { grid-template-columns: repeat(3, 1fr); } }
.prayer-cell {
  background: var(--cream-50);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-3) 8px;
  text-align: center;
  transition: all 0.25s var(--ease);
}
.prayer-cell .lbl {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.prayer-cell .tm {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 500;
  color: var(--text-strong);
  margin-top: 4px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.prayer-cell.next {
  background: linear-gradient(160deg, var(--brand-deep) 0%, var(--brand-mid) 100%);
  border-color: var(--brand-light);
  box-shadow: 0 12px 28px -8px rgba(11, 31, 24, 0.30);
}
.prayer-cell.next .lbl { color: var(--gold-300); }
.prayer-cell.next .tm { color: var(--gold-200); }

.checklist { display: flex; flex-direction: column; gap: 6px; }
.check-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  user-select: none;
}
.check-row:hover {
  border-color: var(--line-strong);
  background: var(--cream-50);
}
.check-row.done {
  background: linear-gradient(90deg, rgba(31, 78, 58, 0.04), rgba(212, 184, 106, 0.04));
  border-color: rgba(31, 78, 58, 0.15);
}
.check-row .check {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--text-4);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
  color: transparent;
  font-size: 13px;
  font-weight: 700;
}
.check-row.done .check {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  border-color: var(--gold-400);
  color: var(--on-gold);
  box-shadow: 0 4px 12px rgba(212, 184, 106, 0.30);
}
.check-row .lbl { flex: 1; font-weight: 500; font-size: 14px; letter-spacing: -0.005em; }
.check-row .meta {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--gold-200) 0%, var(--gold-400) 100%);
  color: var(--on-gold);
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.015em;
  box-shadow: 0 4px 16px rgba(212, 184, 106, 0.25), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* === DZIKIR === */
.dzikir-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: var(--s-7) var(--s-5);
  background: linear-gradient(160deg, var(--cream-50) 0%, var(--cream-100) 100%);
  border-radius: var(--r-lg);
  margin: var(--s-4) 0;
  border: 1px solid var(--line);
}
.dzikir-counter .num {
  font-family: var(--font-mono);
  font-size: clamp(96px, 16vw, 144px);
  font-weight: 500;
  color: var(--text-strong);
  line-height: 1;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}
.dzikir-counter .label {
  color: var(--text-3);
  margin-top: var(--s-3);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.dzikir-counter button {
  margin-top: var(--s-5);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--brand-mid) 0%, var(--brand-deep) 100%);
  color: var(--on-brand);
  border: none;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: -0.005em;
  box-shadow: 0 20px 40px -10px rgba(11, 31, 24, 0.35), inset 0 1px 0 rgba(255,255,255,0.10);
  transition: all 0.15s var(--ease);
  font-family: inherit;
}
.dzikir-counter button:hover {
  transform: scale(1.04);
  box-shadow: 0 24px 50px -8px rgba(11, 31, 24, 0.45), inset 0 1px 0 rgba(255,255,255,0.15);
}
.dzikir-counter button:active { transform: scale(0.96); }

.dzikir-arabic {
  font-family: var(--font-arabic);
  font-size: 30px;
  line-height: 2.1;
  text-align: right;
  direction: rtl;
  color: var(--text-strong);
  padding: var(--s-3) 0;
  font-feature-settings: "liga", "calt", "kern";
  text-rendering: optimizeLegibility;
}
.dzikir-translit {
  color: var(--text-2);
  margin-top: var(--s-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.dzikir-meaning { color: var(--text-1); margin-top: 6px; font-size: 14px; line-height: 1.55; }

/* === HABITS === */
.habit-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  transition: all 0.2s var(--ease);
}
.habit-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--sh-sm);
}
.habit-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--cream-100), var(--cream-200));
  color: var(--ink-700);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid var(--line);
}
.habit-name { flex: 1; font-weight: 500; font-size: 14px; letter-spacing: -0.005em; }
.habit-week { display: flex; gap: 4px; }
.habit-day {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--cream-50);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-4);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-weight: 600;
}
.habit-day:hover { background: var(--cream-100); border-color: var(--line-strong); }
.habit-day.done {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--on-gold);
  border-color: var(--gold-400);
  box-shadow: 0 4px 12px rgba(212, 184, 106, 0.30);
}
.habit-day.today { box-shadow: 0 0 0 2px var(--gold-300); }
.habit-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.habit-row:hover .habit-actions { opacity: 1; }

/* === GOALS === */
.goal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin-bottom: var(--s-3);
  position: relative;
  transition: all 0.25s var(--ease);
}
.goal-card:hover { border-color: var(--line-strong); box-shadow: var(--sh-sm); }
.goal-card.done { opacity: 0.55; }
.goal-card.done .goal-title { text-decoration: line-through; }
.goal-card .cat-pill {
  display: inline-block;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 10px;
}
.cat-pill.dunia { background: rgba(31, 78, 58, 0.08); color: var(--ink-600); }
.cat-pill.akhirat { background: rgba(31, 78, 58, 0.12); color: var(--ink-700); }
.cat-pill.keluarga { background: rgba(212, 184, 106, 0.18); color: var(--gold-600); }
.cat-pill.ilmu { background: rgba(11, 31, 24, 0.08); color: var(--ink-800); }
.goal-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 var(--s-3);
  color: var(--text-strong);
  letter-spacing: -0.025em;
  line-height: 1.3;
}
.goal-niat {
  color: var(--text-2);
  font-size: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--cream-50), var(--cream-100));
  border-left: 2px solid var(--gold-400);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 0 0 var(--s-3);
  line-height: 1.55;
  letter-spacing: -0.01em;
}
.goal-niat::before {
  content: "نِيَّة ";
  font-style: normal;
  color: var(--gold-500);
  font-weight: 600;
  font-family: var(--font-arabic);
}
.goal-meta { font-size: 12px; color: var(--text-3); }
.goal-actions { display: flex; gap: 8px; margin-top: var(--s-3); }

/* === POMODORO === */
.pom-display {
  text-align: center;
  padding: var(--s-9) var(--s-5);
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 184, 106, 0.22), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(31, 78, 58, 0.20), transparent 50%),
    linear-gradient(160deg, var(--brand-deep) 0%, var(--brand-mid) 100%);
  color: var(--on-brand);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 48px -12px rgba(11, 31, 24, 0.4);
  border: 1px solid rgba(212, 184, 106, 0.12);
}
.pom-display::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}
.pom-time {
  font-family: var(--font-mono);
  font-size: clamp(96px, 15vw, 168px);
  font-weight: 500;
  color: var(--gold-200);
  line-height: 1;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 40px rgba(212, 184, 106, 0.30);
}
.pom-state {
  font-size: 12px;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: var(--s-4);
  font-weight: 600;
}
.pom-controls {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  margin-top: var(--s-6);
}
.pom-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  margin-top: var(--s-4);
}

/* === JOURNAL === */
.journal-q { margin-bottom: var(--s-5); }
.journal-q label {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-strong);
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.journal-q textarea {
  width: 100%;
  min-height: 110px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-1);
  resize: vertical;
  transition: all 0.2s var(--ease);
  letter-spacing: -0.005em;
  display: block;
  box-sizing: border-box;
}
.journal-q textarea::placeholder {
  color: var(--text-3);
  font-family: var(--font-body);
  opacity: 0.85;
}
.journal-q textarea:hover { border-color: var(--text-3); }
.journal-q textarea:focus {
  outline: none;
  border-color: var(--gold-400);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(212, 184, 106, 0.12);
}
[data-theme="dark"] .journal-q textarea {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(232, 220, 196, 0.10);
}
[data-theme="dark"] .journal-q textarea:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--gold-300);
  box-shadow: 0 0 0 4px rgba(212, 184, 106, 0.15);
}
.ai-reflection {
  margin-top: var(--s-5);
  padding: var(--s-5);
  background:
    radial-gradient(circle at 100% 0%, rgba(212, 184, 106, 0.08), transparent 50%),
    linear-gradient(135deg, var(--cream-50) 0%, var(--cream-100) 100%);
  border-radius: var(--r-md);
  border: 1px solid rgba(212, 184, 106, 0.2);
  position: relative;
  overflow: hidden;
}
.ai-reflection::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
}
.ai-reflection .label {
  font-size: 11px;
  color: var(--gold-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.ai-reflection .body {
  color: var(--text-1);
  line-height: 1.7;
  white-space: pre-wrap;
  font-size: 15px;
  letter-spacing: -0.01em;
}

/* === HADITH === */
.hadith-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(212, 184, 106, 0.08), transparent 60%),
    linear-gradient(160deg, var(--surface) 0%, var(--cream-50) 100%);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-md);
}
.hadith-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 184, 106, 0.4), transparent);
}
.hadith-arabic {
  font-family: var(--font-arabic);
  font-size: 32px;
  line-height: 2.2;
  text-align: right;
  direction: rtl;
  color: var(--text-strong);
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
  font-feature-settings: "liga", "calt", "kern";
  text-rendering: optimizeLegibility;
}
.hadith-text {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.45;
  color: var(--text-strong);
  margin-bottom: var(--s-3);
  letter-spacing: -0.025em;
  font-weight: 500;
}
.hadith-source {
  font-size: 13px;
  color: var(--gold-600);
  font-weight: 600;
  margin-bottom: var(--s-5);
  letter-spacing: 0.02em;
}
.hadith-tadabbur {
  background: rgba(31, 78, 58, 0.04);
  padding: var(--s-5);
  border-radius: var(--r-md);
  border-left: 2px solid var(--ink-600);
  color: var(--text-1);
  line-height: 1.7;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.hadith-tadabbur .label {
  font-size: 11px;
  color: var(--ink-700);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-style: normal;
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-body);
}

/* === CHAT === */
.chat-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.chat-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: var(--r-md);
  line-height: 1.6;
  font-size: 14px;
  white-space: pre-wrap;
  letter-spacing: -0.005em;
  animation: bubbleIn 0.25s var(--ease-out);
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-bubble.user {
  background: linear-gradient(160deg, var(--brand-mid), var(--brand-deep));
  color: var(--on-brand);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 8px 20px -4px rgba(11, 31, 24, 0.20);
}
.chat-bubble.assistant {
  background: var(--cream-50);
  color: var(--text-1);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--line);
}
.chat-bubble.assistant.thinking { color: var(--text-3); font-style: italic; }
.chat-input-row {
  display: flex;
  gap: 10px;
  padding: var(--s-4);
  border-top: 1px solid var(--line);
  background: var(--cream-50);
}
.chat-input-row input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: -0.005em;
}
.chat-input-row input:focus {
  outline: none;
  border-color: var(--ink-500);
  box-shadow: 0 0 0 4px rgba(31, 78, 58, 0.08);
}

/* === SETTINGS === */
.settings-section { margin-bottom: var(--s-6); }
.settings-section h3 {
  font-family: var(--font-display);
  color: var(--text-strong);
  margin: 0 0 var(--s-3);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* === MODAL === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 24, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s var(--ease-out);
}
.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  width: 100%;
  max-width: 500px;
  margin: var(--s-5);
  box-shadow: var(--sh-xl);
  border: 1px solid var(--line);
  animation: modalIn 0.3s var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 var(--s-4);
  color: var(--text-strong);
  font-weight: 600;
  letter-spacing: -0.035em;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: var(--s-4);
}

/* === TOAST === */
.toast-stack {
  position: fixed;
  bottom: var(--s-5);
  right: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}
.toast {
  background: var(--ink-900);
  color: var(--on-brand);
  padding: 12px 18px;
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  animation: slideUp 0.3s var(--ease-out);
  max-width: 360px;
  border: 1px solid var(--ink-700);
}
.toast.success {
  background: linear-gradient(135deg, var(--ink-700), var(--ink-900));
  border-color: var(--ink-600);
}
.toast.error { background: #8b3838; border-color: #6e2c2c; }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* === TENANT CREATE FORM === */
.tn-dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 32px 20px;
  text-align: center;
  background: var(--cream-50);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}
.tn-dropzone:hover { border-color: var(--gold-400); background: var(--cream-100); }
.tn-dropzone.drag { border-color: var(--gold-400); background: rgba(212, 184, 106, 0.10); transform: scale(1.005); }
.tn-dropzone img { display: block; }
.tn-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
@media (max-width: 600px) { .tn-swatches { grid-template-columns: repeat(2, 1fr); } }
.tn-swatch {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.tn-swatch:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.tn-swatch-color {
  width: 100%;
  height: 48px;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.tn-swatch-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tn-swatch-hex {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-strong);
  margin-top: 2px;
  letter-spacing: -0.02em;
}
.tn-swatch-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.tn-mock {
  font-family: var(--font-body);
}
.tn-mock button {
  font-family: var(--font-body);
}

/* === MOBILE NAV === */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-top: 1px solid rgba(11, 31, 24, 0.08);
  padding: 6px 8px env(safe-area-inset-bottom);
  z-index: 50;
}
.mobile-nav-row { display: flex; justify-content: space-around; }
.mobile-nav a, .mobile-nav-more {
  flex: 1;
  text-align: center;
  padding: 8px 2px 6px;
  font-size: 10.5px;
  color: var(--text-3);
  border-radius: var(--r-sm);
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 0.2s var(--ease);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.mobile-nav a .ic, .mobile-nav-more .ic {
  width: 36px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  transition: all 0.2s var(--ease);
}
.mobile-nav a .ic svg, .mobile-nav-more .ic svg { width: 22px; height: 22px; }
.mobile-nav a.active {
  color: var(--text-strong);
  font-weight: 600;
}
.mobile-nav a.active .ic {
  background: var(--cream-100);
  border: 1px solid var(--line);
}

/* === SHEET (mobile "Lainnya") === */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 24, 0);
  backdrop-filter: blur(0px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background 0.25s var(--ease-out), backdrop-filter 0.25s var(--ease-out);
}
.sheet-backdrop.open {
  background: rgba(11, 31, 24, 0.45);
  backdrop-filter: blur(8px);
}
.sheet {
  background: var(--surface);
  width: 100%;
  max-width: 560px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 14px 18px calc(env(safe-area-inset-bottom) + 24px);
  box-shadow: 0 -16px 40px rgba(11, 31, 24, 0.18);
  transform: translateY(100%);
  transition: transform 0.32s var(--ease-out);
  max-height: 88vh;
  overflow-y: auto;
}
.sheet-backdrop.open .sheet { transform: translateY(0); }
.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--line-strong);
  border-radius: 999px;
  margin: 0 auto 14px;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-4);
}
.sheet-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.035em;
  color: var(--text-strong);
}
.sheet-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--cream-100);
  color: var(--text-2);
  font-size: 18px;
  cursor: pointer;
  font-family: inherit;
}
.sheet-section { margin-bottom: var(--s-5); }
.sheet-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
  padding: 0 4px;
}
.sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 380px) { .sheet-grid { grid-template-columns: repeat(3, 1fr); } }
.sheet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  border-radius: var(--r-md);
  background: var(--cream-50);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text-1);
  transition: all 0.18s var(--ease);
  text-align: center;
}
.sheet-item:hover, .sheet-item:active {
  background: var(--cream-100);
  border-color: var(--line-strong);
  transform: scale(0.97);
}
.sheet-item-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-deep));
  color: var(--gold-300);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px -4px rgba(11, 31, 24, 0.20);
}
.sheet-item-icon svg { width: 22px; height: 22px; }
.sheet-item-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.sheet-footer {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  text-align: center;
}
.sheet-logout {
  background: none;
  border: none;
  color: #b34141;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 16px;
  margin-top: 4px;
}
.sheet-quick-action {
  background: var(--cream-50);
  border: 1px solid var(--line);
  width: 100%;
  padding: 14px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-1);
  cursor: pointer;
  margin-bottom: 8px;
  font-weight: 500;
  transition: all 0.18s var(--ease);
}
.sheet-quick-action:hover, .sheet-quick-action:active {
  background: var(--cream-100);
  border-color: var(--line-strong);
}

@media (max-width: 880px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: block; }
  .main { padding: var(--s-5) var(--s-4) calc(var(--s-9) + var(--s-5)); }
  .page-head h1 { font-size: 26px; }
  .welcome-card { padding: var(--s-5); }
  .welcome-card h2 { font-size: 22px; }
  .hero { padding: var(--s-5) var(--s-4) var(--s-7); }
  .landing header { padding: var(--s-4); }
  .auth-card { padding: var(--s-5); }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  opacity: 0.6;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  text-align: center;
  padding: var(--s-7) var(--s-5);
  color: var(--text-3);
}
.empty .icn { font-size: 32px; margin-bottom: 8px; opacity: 0.4; }

.muted { color: var(--text-3); font-size: 13px; letter-spacing: -0.005em; }
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  background: var(--cream-100);
  color: var(--text-2);
  font-weight: 500;
  border: 1px solid var(--line);
}

/* === SUBTLE DIVIDER ORNAMENT === */
.ornament {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--text-4);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  margin: var(--s-5) 0;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.sholat-dzikir-link {
  background:
    radial-gradient(circle at 100% 0%, rgba(212, 184, 106, 0.10), transparent 55%),
    var(--surface);
  border: 1px solid rgba(212, 184, 106, 0.2);
  transition: all 0.2s var(--ease);
}
.sholat-dzikir-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 184, 106, 0.15);
  border-color: var(--gold-300);
}

/* === QURAN READER (tabs + ornament badge + sticky resume) === */
/* NOTE: do NOT use overflow-x:hidden on html/body — it breaks position:sticky (sidebar).
   Mobile overflow is fixed by min-width:0 on flex/grid items + .grid-2 stacking. */
.app-shell { overflow-x: clip; }
@supports not (overflow-x: clip) { .app-shell { overflow-x: hidden; } }

/* Tabs (segmented control) */
.q-tabs {
  display: flex;
  background: var(--cream-100);
  border-radius: var(--r-full);
  padding: 4px;
  margin-bottom: var(--s-4);
  gap: 2px;
}
.q-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  border-radius: var(--r-full);
  letter-spacing: -0.01em;
  transition: all 0.2s var(--ease);
}
.q-tab.active {
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 2px 6px rgba(11, 31, 24, 0.06), 0 1px 1px rgba(11, 31, 24, 0.04);
}
[data-theme="dark"] .q-tabs { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .q-tab.active { background: var(--surface-2); }

/* Search wrap */
.q-search-wrap {
  position: relative;
  margin-bottom: var(--s-4);
}
.q-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
  display: inline-flex;
}
.q-search-input {
  width: 100%;
  padding: 13px 16px 13px 46px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--cream-50);
  font-family: inherit;
  font-size: 15px;
  color: var(--text-1);
  letter-spacing: -0.005em;
}
.q-search-input::placeholder { color: var(--text-3); }
.q-search-input:focus {
  outline: none;
  border-color: var(--gold-300);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(212, 184, 106, 0.10);
}

/* Surah list */
.q-surah-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.q-surah-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.18s var(--ease);
}
.q-surah-row:hover { background: var(--cream-50); }
.q-surah-badge {
  width: 48px; height: 48px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
}
.q-surah-badge svg.surah-ornament { width: 100%; height: 100%; }
.surah-ornament-num {
  fill: var(--text-strong);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.q-surah-meta { flex: 1; min-width: 0; overflow: hidden; }
.q-surah-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.q-surah-sub {
  font-size: 12.5px;
  color: var(--gold-600);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.q-surah-arabic {
  font-family: var(--font-arabic);
  font-size: 22px;
  color: var(--text-strong);
  flex-shrink: 0;
  direction: rtl;
}
.q-play-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand-deep);
  color: var(--gold-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

/* Juz list */
.q-juz-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.q-juz-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.18s var(--ease);
}
.q-juz-row:hover { background: var(--cream-50); }
.q-juz-badge {
  width: 48px; height: 48px;
  flex-shrink: 0;
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
}
.q-juz-badge svg.surah-ornament { width: 100%; height: 100%; }
.q-juz-info { flex: 1; min-width: 0; }
.q-juz-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}
.q-juz-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
}

/* Section labels (Riwayat) */
.q-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
  background: var(--cream-50);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 8px;
}
[data-theme="dark"] .q-section-label { background: rgba(255,255,255,0.03); }

/* History card (riwayat items) */
.q-history-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s var(--ease);
}
.q-history-card:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.q-history-highlight {
  background: linear-gradient(135deg, rgba(212, 184, 106, 0.08), rgba(212, 184, 106, 0.02));
  border-color: rgba(212, 184, 106, 0.25);
}
.q-history-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: rgba(212, 184, 106, 0.14);
  color: var(--gold-600);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.q-history-num {
  width: 32px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--brand-light);
  text-align: center;
  flex-shrink: 0;
}
.q-history-text { flex: 1; min-width: 0; }
.q-history-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-strong);
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.q-row-arrow {
  color: var(--text-3);
  font-size: 16px;
  flex-shrink: 0;
}

/* Sticky bottom "Lanjutkan Membaca" bar — anchored to main area, not over sidebar */
.quran-resume-bar {
  position: fixed;
  bottom: 0;
  left: 260px;  /* sidebar width on desktop */
  right: 0;
  background:
    radial-gradient(circle at 0% 50%, rgba(212, 184, 106, 0.18), transparent 50%),
    var(--cream-100);
  border-top: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 32px env(safe-area-inset-bottom);
  text-decoration: none;
  color: inherit;
  z-index: 40;
  box-shadow: 0 -4px 20px rgba(11, 31, 24, 0.06);
  animation: resumeBarSlide 0.4s var(--ease-out);
}
@keyframes resumeBarSlide { from { transform: translateY(100%); } to { transform: translateY(0); } }
.quran-resume-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: rgba(212, 184, 106, 0.18);
  color: var(--gold-600);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.quran-resume-text { flex: 1; min-width: 0; padding: 4px 0; }
.quran-resume-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}
.quran-resume-ref {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quran-resume-arrow {
  color: var(--text-3);
  font-size: 18px;
  flex-shrink: 0;
}
body.has-resume-bar { padding-bottom: 90px; }
[data-theme="dark"] .quran-resume-bar { background: linear-gradient(0deg, var(--surface-2), var(--surface)); }

@media (max-width: 880px) {
  .quran-resume-bar {
    left: 0;
    bottom: calc(60px + env(safe-area-inset-bottom));
    padding: 14px 20px;
  }
  body.has-resume-bar { padding-bottom: 160px; }
}
@media (max-width: 600px) {
  .q-surah-arabic { font-size: 18px; }
  .q-surah-name { font-size: 15px; }
  .q-surah-badge { width: 40px; height: 40px; }
}

/* === SURAH READER AUDIO === */
.surah-audio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 14px 18px;
  background: linear-gradient(160deg, var(--cream-50), var(--cream-100));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}
.sab-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.sab-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-deep));
  color: var(--gold-300);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 6px 14px -4px rgba(11, 31, 24, 0.20);
}
.sab-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sab-select {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-strong);
  cursor: pointer;
  letter-spacing: -0.005em;
  min-width: 140px;
}
.sab-select:focus {
  outline: none;
  border-color: var(--ink-500);
  box-shadow: 0 0 0 3px rgba(31, 78, 58, 0.08);
}

.ayah-row {
  position: relative;
}
.ayah-row:hover {
  background: var(--cream-50);
}
.ayah-row.playing {
  background: linear-gradient(90deg, rgba(212, 184, 106, 0.10), rgba(212, 184, 106, 0.02));
  box-shadow: inset 3px 0 0 var(--gold-400);
  animation: ayahPulse 2s ease-out;
}
@keyframes ayahPulse {
  0%   { background: rgba(212, 184, 106, 0.22); }
  100% { background: linear-gradient(90deg, rgba(212, 184, 106, 0.10), rgba(212, 184, 106, 0.02)); }
}

@media (max-width: 600px) {
  .surah-audio-bar { padding: 10px 12px; }
  .sab-select { min-width: 120px; font-size: 12px; }
  .sab-label { display: none; }
}

/* === MOOD TRACKER === */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: var(--s-5);
}
.mood-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 16px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.mood-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--mood-bg-1, rgba(11,31,24,0.04)), var(--mood-bg-2, rgba(11,31,24,0.01)));
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.mood-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: var(--mood-accent, var(--ink-300));
}
.mood-card > * { position: relative; z-index: 1; }
.mood-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--mood-icon-bg, var(--cream-100));
  margin-bottom: 12px;
  border: 1px solid rgba(11,31,24,0.06);
  font-size: 28px;
  line-height: 1;
}
.mood-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}
.mood-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
  letter-spacing: -0.005em;
}

/* Tone palettes */
.mood-ember    { --mood-bg-1: rgba(202,90,60,.10); --mood-bg-2: rgba(202,90,60,.02); --mood-icon-bg: rgba(202,90,60,.14); --mood-icon-fg: #8a3a1f; --mood-accent: rgba(202,90,60,.3); }
.mood-indigo   { --mood-bg-1: rgba(60,75,135,.10); --mood-bg-2: rgba(60,75,135,.02); --mood-icon-bg: rgba(60,75,135,.14); --mood-icon-fg: #2c386b; --mood-accent: rgba(60,75,135,.3); }
.mood-violet   { --mood-bg-1: rgba(120,80,170,.10); --mood-bg-2: rgba(120,80,170,.02); --mood-icon-bg: rgba(120,80,170,.14); --mood-icon-fg: #5e3f8c; --mood-accent: rgba(120,80,170,.3); }
.mood-slate    { --mood-bg-1: rgba(80,95,110,.10); --mood-bg-2: rgba(80,95,110,.02); --mood-icon-bg: rgba(80,95,110,.14); --mood-icon-fg: #3d4a59; --mood-accent: rgba(80,95,110,.3); }
.mood-ocean    { --mood-bg-1: rgba(40,110,140,.10); --mood-bg-2: rgba(40,110,140,.02); --mood-icon-bg: rgba(40,110,140,.14); --mood-icon-fg: #1e5573; --mood-accent: rgba(40,110,140,.3); }
.mood-ash      { --mood-bg-1: rgba(110,110,110,.10); --mood-bg-2: rgba(110,110,110,.02); --mood-icon-bg: rgba(110,110,110,.14); --mood-icon-fg: #555; --mood-accent: rgba(110,110,110,.3); }
.mood-rose     { --mood-bg-1: rgba(180,90,120,.10); --mood-bg-2: rgba(180,90,120,.02); --mood-icon-bg: rgba(180,90,120,.14); --mood-icon-fg: #8a3f5a; --mood-accent: rgba(180,90,120,.3); }
.mood-midnight { --mood-bg-1: rgba(35,50,90,.12); --mood-bg-2: rgba(35,50,90,.02); --mood-icon-bg: rgba(35,50,90,.18); --mood-icon-fg: #1a2548; --mood-accent: rgba(35,50,90,.35); }
.mood-umber    { --mood-bg-1: rgba(140,90,50,.10); --mood-bg-2: rgba(140,90,50,.02); --mood-icon-bg: rgba(140,90,50,.14); --mood-icon-fg: #6b4220; --mood-accent: rgba(140,90,50,.3); }
.mood-gold     { --mood-bg-1: rgba(212,184,106,.16); --mood-bg-2: rgba(212,184,106,.04); --mood-icon-bg: rgba(212,184,106,.22); --mood-icon-fg: #8a6d2c; --mood-accent: rgba(212,184,106,.4); }
.mood-amber    { --mood-bg-1: rgba(220,150,50,.12); --mood-bg-2: rgba(220,150,50,.02); --mood-icon-bg: rgba(220,150,50,.18); --mood-icon-fg: #8a5b1c; --mood-accent: rgba(220,150,50,.35); }
.mood-emerald  { --mood-bg-1: rgba(13,92,63,.10); --mood-bg-2: rgba(13,92,63,.02); --mood-icon-bg: rgba(13,92,63,.14); --mood-icon-fg: var(--ink-700); --mood-accent: rgba(13,92,63,.3); }

/* === MOOD MODAL — immersive, calming === */
.mood-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 31, 24, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
  overflow-y: auto;
}
.mood-modal-backdrop.open {
  background: rgba(11, 31, 24, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.mood-modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 48px 36px 36px;
  max-width: 600px;
  width: 100%;
  position: relative;
  text-align: center;
  border: 1px solid var(--line);
  box-shadow: var(--sh-xl);
  transform: scale(0.96) translateY(16px);
  opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.4s var(--ease-out);
  overflow: hidden;
}
.mood-modal-backdrop.open .mood-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.mood-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, var(--mood-bg-1, rgba(11,31,24,0.06)), transparent 55%),
    radial-gradient(ellipse at 50% 100%, var(--mood-bg-2, rgba(11,31,24,0.03)), transparent 50%);
  pointer-events: none;
}
.mood-modal::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mood-accent, rgba(212,184,106,0.4)), transparent);
}
.mood-modal > * { position: relative; }

.mood-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(11, 31, 24, 0.06);
  color: var(--text-2);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  font-family: inherit;
  transition: all 0.2s var(--ease);
}
.mood-modal-close:hover { background: rgba(11, 31, 24, 0.12); transform: scale(1.05); }

.mood-audio-toggle {
  position: absolute;
  top: 16px; left: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(11, 31, 24, 0.06);
  color: var(--text-strong);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  font-family: inherit;
  transition: all 0.2s var(--ease);
}
.mood-audio-toggle:hover { background: rgba(11, 31, 24, 0.12); transform: scale(1.05); }
.mood-audio-toggle svg .mute-line { display: none; }
.mood-audio-toggle.off {
  color: var(--text-3);
}
.mood-audio-toggle.off svg .wave-1,
.mood-audio-toggle.off svg .wave-2 { display: none; }
.mood-audio-toggle.off svg .mute-line { display: block; opacity: 0.7; }
.mood-audio-toggle.playing {
  color: var(--gold-600);
  background: rgba(212, 184, 106, 0.16);
  box-shadow: 0 0 0 0 rgba(212, 184, 106, 0.4);
  animation: audioPulse 2.4s ease-in-out infinite;
}
.mood-audio-toggle.playing svg .wave-1 {
  animation: waveFade 2s ease-in-out infinite;
  transform-origin: 16px 12px;
}
.mood-audio-toggle.playing svg .wave-2 {
  animation: waveFade 2s ease-in-out infinite 0.4s;
  transform-origin: 18px 12px;
}
@keyframes audioPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 184, 106, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(212, 184, 106, 0); }
}
@keyframes waveFade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
[data-theme="dark"] .mood-audio-toggle { background: rgba(255,255,255,0.06); color: var(--gold-300); }
[data-theme="dark"] .mood-audio-toggle:hover { background: rgba(255,255,255,0.12); }
[data-theme="dark"] .mood-audio-toggle.playing { background: rgba(212, 184, 106, 0.18); color: var(--gold-200); }

.mood-modal-transform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 56px;
  line-height: 1;
}
.mood-emoji-from {
  display: inline-block;
  filter: saturate(0.85);
  animation: moodFromFade 1.2s var(--ease-out);
  opacity: 0.85;
}
.mood-emoji-to {
  display: inline-block;
  animation: moodToBreath 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 16px var(--mood-bg-1, rgba(212, 184, 106, 0.4)));
}
.mood-emoji-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--mood-icon-fg, var(--text-3));
  opacity: 0.5;
  animation: arrowGlide 2s ease-in-out infinite;
}
@keyframes moodFromFade {
  0% { transform: scale(1.1); opacity: 0; }
  50% { opacity: 0.85; }
  100% { transform: scale(1); opacity: 0.85; }
}
@keyframes moodToBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes arrowGlide {
  0%, 100% { transform: translateX(-2px); opacity: 0.4; }
  50% { transform: translateX(4px); opacity: 0.85; }
}

.mood-modal-transform-label {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.02em;
  margin-bottom: 32px;
  font-weight: 500;
}
.mood-modal-arabic {
  font-family: var(--font-arabic);
  font-size: 30px;
  line-height: 2.0;
  text-align: center;
  direction: rtl;
  color: var(--text-strong);
  margin-bottom: 24px;
  padding: 16px 8px;
  font-feature-settings: "liga", "calt", "kern";
  text-rendering: optimizeLegibility;
  animation: arabicReveal 0.8s var(--ease-out) 0.2s both;
}
@keyframes arabicReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.mood-modal-snippet {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.45;
  color: var(--text-strong);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  padding: 0 8px;
  animation: arabicReveal 0.8s var(--ease-out) 0.4s both;
}
.mood-modal-ref {
  font-size: 11px;
  color: var(--gold-600);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
  animation: arabicReveal 0.8s var(--ease-out) 0.5s both;
}
.mood-modal-full {
  text-align: left;
  margin: 20px auto 8px;
  max-width: 460px;
}
.mood-modal-full summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
  text-align: center;
  padding: 8px;
  list-style: none;
}
.mood-modal-full summary::-webkit-details-marker { display: none; }
.mood-modal-full summary::after { content: " ⌄"; opacity: 0.5; }
.mood-modal-full[open] summary::after { content: " ⌃"; }
.mood-modal-full p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
  text-align: left;
}
.mood-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.mood-modal-counter {
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: 0.05em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.mood-audio-source {
  color: var(--gold-600);
  font-weight: 600;
}

.mood-modal-loading {
  padding: 80px 0;
  text-align: center;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mood-modal-loading-state { padding: 60px 36px; }

/* Dark mode adjustments */
[data-theme="dark"] .mood-modal-backdrop.open { background: rgba(0, 0, 0, 0.65); }
[data-theme="dark"] .mood-modal-close { background: rgba(255,255,255,0.06); color: var(--text-2); }
[data-theme="dark"] .mood-modal-close:hover { background: rgba(255,255,255,0.12); }
[data-theme="dark"] .mood-modal-actions { border-top-color: rgba(255,255,255,0.06); }

@media (max-width: 600px) {
  .mood-modal-backdrop { padding: 12px; align-items: flex-end; }
  .mood-modal {
    padding: 36px 20px 24px;
    border-radius: var(--r-xl) var(--r-xl) var(--r-md) var(--r-md);
    max-height: 92vh;
    overflow-y: auto;
  }
  .mood-modal-transform { font-size: 44px; gap: 12px; }
  .mood-modal-arabic { font-size: 24px; line-height: 1.9; }
  .mood-modal-snippet { font-size: 18px; }
  .mood-modal-actions .btn { flex: 1 1 auto; min-width: 100px; }
}

/* ===== legacy verse card (kept for fallback, not actively used) ===== */
.mood-verse-card {
  margin-top: 8px;
  background:
    radial-gradient(circle at 100% 0%, var(--mood-bg-1), transparent 60%),
    var(--surface);
  border-color: var(--mood-accent, var(--line-strong));
  animation: fadeIn 0.4s var(--ease-out);
}
.mood-verse-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.mood-verse-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mood-icon-bg);
  border: 1px solid rgba(11,31,24,0.08);
  font-size: 36px;
  line-height: 1;
}
.mood-verse-mood-label {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -0.025em;
}
.mood-verse-ref {
  font-size: 12px;
  color: var(--gold-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.mood-verse-arabic {
  margin-bottom: 16px !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid var(--line);
}
.mood-verse-snippet {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.45;
  color: var(--text-strong);
  letter-spacing: -0.025em;
  font-weight: 500;
  padding: 8px 0;
}
.mood-verse-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.mood-log-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mood-icon-bg);
  border: 1px solid rgba(11,31,24,0.06);
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1;
}

/* === AUDIO LIBRARY === */
.qari-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.qari-chip {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 10px 14px 10px 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.2s var(--ease);
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.qari-chip:hover { border-color: var(--ink-300); background: var(--cream-50); transform: translateY(-1px); }
.qari-chip-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--cream-100);
  border: 1px solid var(--line);
}
.qari-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--text-strong);
}
.qari-chip-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.qari-chip.active {
  background: linear-gradient(160deg, var(--brand-mid), var(--brand-deep));
  border-color: var(--brand-mid);
  color: var(--on-brand);
  box-shadow: 0 8px 20px -6px rgba(11, 31, 24, 0.30);
}
.qari-chip.active .qari-chip-photo {
  border-color: var(--gold-300);
  box-shadow: 0 0 0 2px rgba(212, 184, 106, 0.35);
}
.qari-chip-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.qari-chip.active .qari-chip-name { color: var(--gold-200); }
.qari-chip-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.qari-chip.active .qari-chip-sub { color: rgba(246, 240, 225, 0.6); }

.audio-bar {
  position: fixed;
  bottom: -100px;
  left: 0;
  right: 0;
  background: rgba(10, 31, 24, 0.96);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  color: var(--on-brand);
  padding: 12px 20px env(safe-area-inset-bottom);
  z-index: 60;
  border-top: 1px solid rgba(212, 184, 106, 0.15);
  transition: bottom 0.3s var(--ease-out);
  box-shadow: 0 -8px 32px rgba(11, 31, 24, 0.3);
}
.audio-bar.open { bottom: 0; }
.audio-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 20px;
  align-items: center;
}
.audio-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.audio-thumb {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--on-gold);
  font-size: 15px;
  flex-shrink: 0;
}
.audio-text { min-width: 0; flex: 1; }
.audio-title {
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-sub {
  font-size: 11.5px;
  color: rgba(246, 240, 225, 0.6);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.audio-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold-300);
  color: var(--on-gold);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
  font-family: inherit;
}
.audio-btn:hover { background: var(--gold-200); transform: scale(1.04); }
.audio-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.audio-time {
  font-family: var(--font-display);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(246, 240, 225, 0.7);
  flex-shrink: 0;
}
.audio-seek-wrap { flex: 1; min-width: 60px; display: flex; }
.audio-seek {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  background: rgba(246, 240, 225, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.audio-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--gold-300);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--ink-900);
}
.audio-seek::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--gold-300);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--ink-900);
}
.audio-actions { display: flex; gap: 6px; flex-shrink: 0; }
.audio-btn-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(246, 240, 225, 0.08);
  color: rgba(246, 240, 225, 0.85);
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s var(--ease);
}
.audio-btn-sm:hover { background: rgba(246, 240, 225, 0.15); color: var(--gold-200); }

body.has-audio-bar { padding-bottom: 90px; }
@media (max-width: 880px) {
  .audio-bar.open { bottom: 60px; }
  body.has-audio-bar { padding-bottom: 150px; }
  .audio-bar-inner { grid-template-columns: 1fr auto; gap: 8px; }
  .audio-controls { grid-column: 1 / -1; order: 2; padding-top: 4px; }
  .audio-actions { order: 1; }
  .audio-thumb { width: 38px; height: 38px; }
}

/* === SCROLLBARS === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-full); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }
