/* =====================================================
   Verse — מחברת שירה יומית
   Palette: plum + gold + cream on midnight-plum
   © אופיר ברנס 2026
   ===================================================== */

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

:root {
  /* Palette — Plum Night */
  --bg-deep: #100a17;
  --bg-base: #1a1421;
  --surface: rgba(42, 31, 51, 0.55);
  --surface-2: rgba(58, 41, 70, 0.5);
  --border-soft: rgba(245, 230, 211, 0.08);
  --border: rgba(245, 230, 211, 0.14);
  --border-strong: rgba(245, 230, 211, 0.24);

  --plum: #7b3a5c;
  --plum-light: #a35a82;
  --plum-deep: #4d2238;
  --gold: #c9a16d;
  --gold-bright: #e0b87c;
  --rose: #d4b5a0;
  --paper: #f5e6d3;
  --paper-dim: rgba(245, 230, 211, 0.72);
  --paper-muted: rgba(245, 230, 211, 0.5);
  --paper-faint: rgba(245, 230, 211, 0.32);
  --ink: #2a1a23;

  --ok: #8fb89a;
  --err: #c66a6a;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-soft: 0 6px 30px -10px rgba(0,0,0,.55);
  --shadow-deep: 0 18px 50px -16px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.3);

  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.4, 0, .2, 1);

  --font-serif: "Frank Ruhl Libre", "Heebo", serif;
  --font-italic: "Instrument Serif", "Frank Ruhl Libre", serif;
  --font-body: "Heebo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Menlo", monospace;
}

[data-theme="indigo"] {
  --bg-deep: #0b0a18;
  --bg-base: #15132a;
  --plum: #5a4b8a;
  --plum-light: #7e6db5;
  --plum-deep: #2d2454;
  --gold: #c9b86d;
  --gold-bright: #e0d07c;
  --rose: #b5b0d4;
}
[data-theme="sage"] {
  --bg-deep: #0a1310;
  --bg-base: #0f1c18;
  --plum: #6b8f7a;
  --plum-light: #8fb89e;
  --plum-deep: #36544a;
  --gold: #c9bb6d;
  --gold-bright: #d8cc7c;
  --rose: #b5d4c0;
  --paper: #f0ead3;
}
[data-theme="copper"] {
  --bg-deep: #110a0c;
  --bg-base: #1a0f12;
  --plum: #b87555;
  --plum-light: #d49075;
  --plum-deep: #6e3e2a;
  --gold: #d9b06d;
  --gold-bright: #e8c47c;
  --rose: #d4a890;
}

html, body { height: 100%; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: radial-gradient(ellipse at top right, var(--bg-base) 0%, var(--bg-deep) 60%);
  color: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* AMBIENT BG */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .35;
  animation: floaty 22s ease-in-out infinite alternate;
}
.orb-1 { width: 360px; height: 360px; background: var(--plum); top: -90px; right: -60px; }
.orb-2 { width: 280px; height: 280px; background: var(--gold); bottom: -60px; left: -40px; opacity: .18; animation-delay: -7s; }
.orb-3 { width: 220px; height: 220px; background: var(--plum-light); top: 38%; left: 45%; opacity: .12; animation-delay: -14s; }
@keyframes floaty {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.08); }
}
.grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.96 0 0 0 0 0.9 0 0 0 0 0.83 0 0 0 0.34 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  opacity: .06; mix-blend-mode: overlay;
  animation: grainShift 12s steps(6) infinite;
}
@keyframes grainShift {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 1%); }
}

/* TOPBAR */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(to bottom, rgba(16,10,23,.85), rgba(16,10,23,.55) 75%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}
.brand-text h1 {
  font-family: var(--font-serif); font-weight: 900;
  font-size: 1.65rem; line-height: 1; letter-spacing: -0.5px;
  color: var(--paper); margin: 0;
}
.brand-sub {
  display: block; font-size: 0.72rem;
  color: var(--paper-faint); margin-top: 4px;
  letter-spacing: 0.3px;
}
.top-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border-soft);
  color: var(--paper-dim); cursor: pointer;
  border-radius: 12px;
  transition: all .25s var(--ease);
  backdrop-filter: blur(10px);
}
.icon-btn:hover {
  background: var(--surface-2); color: var(--paper);
  transform: translateY(-1px);
  border-color: var(--border);
}
.icon-btn:active { transform: scale(.95); }

/* APP MAIN */
.app {
  position: relative; z-index: 2;
  max-width: 1180px; margin: 0 auto;
  padding: 12px 20px 80px;
  display: flex; flex-direction: column; gap: 24px;
}

/* HERO */
.hero {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: 320px;
  display: flex; align-items: flex-end;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-deep);
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: saturate(1.05);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(110deg, rgba(16,10,23,.94) 0%, rgba(16,10,23,.78) 40%, rgba(16,10,23,.25) 100%),
    radial-gradient(ellipse at right, transparent 30%, rgba(16,10,23,.5) 100%);
}
.hero-inner {
  position: relative; padding: 40px 36px 36px;
  width: 100%;
  display: flex; flex-direction: column; gap: 14px;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.74rem; font-weight: 500;
  color: var(--gold-bright);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  width: fit-content;
}
.kicker .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 10px var(--gold);
}
.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1.05;
  font-weight: 400;
  color: var(--paper);
  letter-spacing: -1px;
}
.hero-headline .serif-italic {
  font-family: var(--font-italic);
  font-style: italic;
  color: var(--rose);
  font-weight: 400;
}
.hero-headline .serif-bold { font-weight: 900; color: var(--paper); }
.hero-headline .serif { font-weight: 400; color: var(--paper-dim); }
.hero-sub {
  font-size: 1rem; color: var(--paper-muted);
  max-width: 480px;
}
.hero-prompt {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(123, 58, 92, .25);
  border: 1px solid rgba(201, 161, 109, .3);
  border-radius: 12px;
  width: fit-content;
  margin-top: 6px;
  color: var(--paper);
}
.prompt-label { font-size: 0.78rem; color: var(--paper-faint); }
.prompt-word {
  font-family: var(--font-italic);
  font-style: italic; font-size: 1.15rem;
  color: var(--gold-bright);
  font-weight: 500;
}

/* STATS */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat-card {
  position: relative;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform .3s var(--spring), border-color .25s var(--ease);
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border);
}
.stat-card::before {
  content: ""; position: absolute; top: 0; right: 0;
  width: 70px; height: 70px;
  background: radial-gradient(circle at top right, var(--plum) 0%, transparent 70%);
  opacity: .3;
}
.stat-num {
  font-size: 2rem; font-weight: 500;
  color: var(--paper); line-height: 1;
  display: flex; align-items: baseline; gap: 6px;
}
.stat-unit {
  font-size: 0.78rem; font-weight: 400;
  color: var(--paper-faint); font-family: var(--font-body);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--paper-faint);
  margin-top: 8px;
  letter-spacing: 0.2px;
}
.stat-spark {
  margin-top: 10px;
  width: 100%; height: 28px;
  display: block;
}
.stat-flame { font-size: 1.2rem; margin-top: 8px; opacity: .9; }
.ring {
  position: absolute; bottom: 12px; left: 12px;
  width: 36px; height: 36px;
}

/* PANELS */
.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 22px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
  gap: 14px; flex-wrap: wrap;
}
.panel-head h3 {
  font-family: var(--font-serif);
  font-weight: 700; font-size: 1.2rem;
  color: var(--paper);
  letter-spacing: -0.2px;
  margin: 0;
}
.panel-sub {
  font-size: 0.76rem;
  color: var(--paper-faint);
  display: block; margin-top: 4px;
}

/* COMPOSE PAPER */
.compose-panel { padding: 22px 22px 20px; }
.syllable-bar { display: flex; gap: 6px; }
.syl-pill {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 5px 10px;
  background: rgba(123, 58, 92, .22);
  border: 1px solid rgba(201, 161, 109, .25);
  color: var(--paper-dim);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  border-radius: 6px;
  transition: all .25s var(--ease);
}
.syl-pill .num { color: var(--gold-bright); font-weight: 500; min-width: 12px; text-align: center; }
.syl-pill.match {
  background: rgba(143, 184, 154, .2);
  border-color: rgba(143, 184, 154, .4);
}
.syl-pill.match .num { color: var(--ok); }

.compose-paper {
  position: relative;
  background: linear-gradient(160deg, rgba(245, 230, 211, .04) 0%, rgba(245, 230, 211, .015) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 22px 28px;
  margin: 6px 0 16px;
  background-image:
    linear-gradient(160deg, rgba(245, 230, 211, .04) 0%, rgba(245, 230, 211, .015) 100%),
    repeating-linear-gradient(180deg, transparent 0 38px, rgba(201, 161, 109, .08) 38px 39px);
  background-size: 100% 100%, 100% 39px;
}
.paper-edge {
  position: absolute; top: 0; right: 26px; bottom: 0;
  width: 1px; background: rgba(201, 161, 109, .25);
}
.compose-paper textarea {
  width: 100%;
  background: transparent;
  border: none; outline: none;
  font-family: var(--font-italic);
  font-size: 1.4rem; color: var(--paper);
  line-height: 1.62;
  resize: none;
  font-style: normal;
  padding: 0;
  caret-color: var(--gold-bright);
  letter-spacing: 0.1px;
  min-height: 38px;
}
.compose-paper textarea::placeholder {
  color: var(--paper-faint);
  font-style: italic;
  font-weight: 300;
}
.compose-paper textarea:focus { color: var(--paper); }

.compose-mood {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(201, 161, 109, .18);
}
.mood-label {
  font-size: 0.76rem;
  color: var(--paper-faint);
  font-family: var(--font-mono);
}
.mood-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.mood-chip {
  padding: 4px 11px;
  background: rgba(123, 58, 92, .18);
  border: 1px solid rgba(201, 161, 109, .18);
  border-radius: 30px;
  font-size: 0.78rem;
  color: var(--paper-dim);
  cursor: pointer;
  transition: all .2s var(--ease);
  font-family: var(--font-body);
}
.mood-chip:hover { background: rgba(123, 58, 92, .3); color: var(--paper); }
.mood-chip.selected {
  background: var(--plum);
  border-color: var(--gold);
  color: var(--paper);
  box-shadow: 0 0 0 2px rgba(201, 161, 109, .15);
}

.compose-actions {
  display: flex; justify-content: flex-end; gap: 10px;
}

/* BUTTONS */
.btn-primary, .btn-ghost, .btn-danger-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 500; font-size: 0.88rem;
  cursor: pointer;
  transition: all .25s var(--spring);
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--plum) 0%, var(--plum-light) 100%);
  color: var(--paper);
  box-shadow: 0 6px 18px -6px rgba(123, 58, 92, .7), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(123, 58, 92, .9), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:active { transform: scale(.97); }
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--paper-dim);
}
.btn-ghost:hover {
  background: var(--surface-2); color: var(--paper);
  border-color: var(--border);
}
.btn-danger-ghost {
  background: rgba(198, 106, 106, .12);
  border: 1px solid rgba(198, 106, 106, .25);
  color: var(--err);
}
.btn-danger-ghost:hover { background: rgba(198, 106, 106, .2); }

/* INSIGHT GRID */
.insight-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

/* HEATMAP */
.heatmap-panel { padding: 22px; }
.legend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.7rem; color: var(--paper-faint);
  font-family: var(--font-mono);
}
.lg {
  width: 11px; height: 11px;
  border-radius: 3px;
  background: var(--surface-2);
  margin: 0 1px;
}
.lg-1 { background: rgba(123, 58, 92, .35); }
.lg-2 { background: rgba(123, 58, 92, .55); }
.lg-3 { background: rgba(163, 90, 130, .8); }
.lg-4 { background: var(--gold); }

.heatmap {
  width: 100%; height: 110px;
  display: block;
  margin-bottom: 6px;
}
.heatmap rect {
  transition: transform .2s var(--ease), filter .2s var(--ease);
  cursor: pointer;
}
.heatmap rect:hover { filter: brightness(1.4); transform: scale(1.2); transform-origin: center; }
.weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  font-size: 0.62rem; color: var(--paper-faint);
  text-align: center;
}

/* DONUT */
.seasons-panel { padding: 22px; display: flex; flex-direction: column; }
.donut-wrap { position: relative; width: 100%; height: 160px; display: flex; align-items: center; justify-content: center; margin: 4px 0 12px; }
.donut { width: 160px; height: 160px; }
.donut-center { position: absolute; text-align: center; }
.donut-num { font-size: 1.6rem; color: var(--paper); font-weight: 500; line-height: 1; }
.donut-lbl { font-size: 0.72rem; color: var(--paper-faint); margin-top: 2px; }
.season-legend {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px;
  font-size: 0.78rem;
}
.season-legend-row {
  display: flex; align-items: center; gap: 6px;
  color: var(--paper-dim);
}
.season-legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.season-legend-row .num { color: var(--paper-faint); margin-right: auto; font-family: var(--font-mono); font-size: 0.72rem; }

/* ANTHOLOGY */
.anthology-panel { padding: 22px; }
.filter-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.search-wrap {
  position: relative; display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color .2s var(--ease);
}
.search-wrap:focus-within { border-color: var(--gold); }
.search-wrap svg { color: var(--paper-faint); margin-left: 6px; }
.search-wrap input {
  background: transparent;
  border: none; outline: none;
  color: var(--paper);
  font-family: var(--font-body); font-size: 0.88rem;
  padding: 9px 8px; width: 200px;
}
.search-wrap input::placeholder { color: var(--paper-faint); }

.select {
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--paper-dim);
  font-family: var(--font-body); font-size: 0.85rem;
  cursor: pointer;
}
.select:focus { outline: none; border-color: var(--gold); }

.anthology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.verse-card {
  position: relative;
  padding: 18px 18px 14px;
  background: linear-gradient(160deg, rgba(245, 230, 211, .04) 0%, rgba(245, 230, 211, .015) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all .3s var(--spring);
  overflow: hidden;
}
.verse-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 12px 28px -10px rgba(123, 58, 92, .6);
}
.verse-card .verse-lines {
  font-family: var(--font-italic);
  font-size: 1.05rem;
  color: var(--paper);
  line-height: 1.6;
  margin-bottom: 10px;
  font-style: italic;
}
.verse-card .verse-lines span { display: block; }
.verse-card .verse-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.7rem;
  color: var(--paper-faint);
  font-family: var(--font-mono);
  padding-top: 8px;
  border-top: 1px dashed rgba(201, 161, 109, .15);
}
.verse-card .verse-meta .season-badge {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--gold-bright);
}
.verse-card .verse-meta .season-badge::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold-bright);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 20px;
  color: var(--paper-faint);
}
.empty-img {
  width: 130px; height: auto;
  opacity: .85;
  margin: 0 auto 12px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
}
.empty-state h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--paper-dim);
  margin-bottom: 6px;
  font-weight: 500;
}
.empty-state p { font-size: 0.86rem; }

/* MODAL */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(7, 4, 11, .75);
  backdrop-filter: blur(8px);
  animation: fadeIn .2s var(--ease);
}
.modal-card {
  position: relative;
  background: linear-gradient(160deg, var(--bg-base) 0%, var(--bg-deep) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px -10px rgba(0,0,0,.8);
  animation: scaleIn .35s var(--spring);
}
.modal-close {
  position: absolute; top: 14px; left: 14px;
  width: 32px; height: 32px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--paper-dim);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s var(--ease);
}
.modal-close:hover { background: var(--surface-2); color: var(--paper); }
.modal-title {
  font-family: var(--font-serif);
  font-size: 1.4rem; font-weight: 700;
  color: var(--paper); margin-bottom: 18px;
  letter-spacing: -0.3px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* VERSE MODAL CARD */
.verse-modal-card { max-width: 520px; }
.verse-modal-paper {
  position: relative;
  padding: 50px 36px 40px;
  background: linear-gradient(160deg, #faf3e3 0%, #f0e3cb 100%);
  background-image:
    linear-gradient(160deg, #faf3e3 0%, #f0e3cb 100%),
    radial-gradient(ellipse at top, rgba(123, 58, 92, .08), transparent 60%);
  border-radius: var(--r-md);
  margin: 12px 0 18px;
  text-align: center;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(123, 58, 92, .1), 0 8px 24px rgba(0,0,0,.3);
}
.verse-modal-paper::before, .verse-modal-paper::after {
  content: ""; position: absolute;
  width: 60px; height: 1px;
  background: linear-gradient(to right, transparent, var(--plum), transparent);
}
.verse-modal-paper::before { top: 24px; left: 50%; transform: translateX(-50%); }
.verse-modal-paper::after { bottom: 24px; left: 50%; transform: translateX(-50%); }
.verse-modal-paper .vmp-line {
  font-family: var(--font-italic);
  font-style: italic;
  font-size: 1.45rem;
  color: var(--ink);
  line-height: 1.7;
}
.verse-modal-paper .vmp-meta {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--plum-deep);
  display: flex; justify-content: center; gap: 14px;
}
.verse-modal-paper .vmp-mood {
  margin-top: 12px;
  display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.verse-modal-paper .vmp-mood span {
  font-size: 0.74rem;
  padding: 3px 10px;
  background: rgba(123, 58, 92, .12);
  border: 1px solid rgba(123, 58, 92, .2);
  color: var(--plum-deep);
  border-radius: 30px;
}
.verse-modal-actions {
  display: flex; gap: 8px; justify-content: center;
  flex-wrap: wrap;
}

/* SETTINGS */
.settings-group {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.settings-group:last-of-type { border-bottom: none; }
.settings-label {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--paper-dim);
  margin-bottom: 12px;
  letter-spacing: 0.2px;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.theme-tile {
  position: relative;
  padding: 14px 8px 10px;
  background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  border: 2px solid transparent;
  border-radius: 10px;
  color: var(--paper);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 500;
  text-align: center;
  transition: all .25s var(--spring);
}
.theme-tile:hover { transform: translateY(-2px); }
.theme-tile.active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 161, 109, .2); }

.switch {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--paper-dim);
}
.switch input { display: none; }
.switch-track {
  display: inline-block; position: relative;
  width: 38px; height: 22px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 30px;
  transition: background .2s var(--ease);
}
.switch-thumb {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px;
  background: var(--paper-dim);
  border-radius: 50%;
  transition: all .25s var(--spring);
}
.switch input:checked + .switch-track { background: var(--plum); }
.switch input:checked + .switch-track .switch-thumb {
  right: 18px;
  background: var(--gold-bright);
}
.settings-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.install-section { margin-top: 14px; text-align: center; }

/* ABOUT */
.about-text {
  color: var(--paper-dim);
  font-size: 0.94rem; line-height: 1.65;
  margin-bottom: 12px;
}
.about-text strong { color: var(--gold-bright); font-weight: 700; }
.about-text em { font-family: var(--font-italic); font-style: italic; color: var(--rose); }
.about-credits {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 0.7rem;
  color: var(--paper-faint);
}

/* TOAST */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: var(--bg-base);
  border: 1px solid var(--gold);
  color: var(--paper);
  padding: 12px 22px;
  border-radius: 12px;
  z-index: 200;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.7);
  animation: toastIn .35s var(--spring);
  font-size: 0.9rem;
}
.toast[hidden] { display: none; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 30px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* RESPONSIVE */
@media (max-width: 920px) {
  .insight-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .topbar { padding: 14px 16px; }
  .app { padding: 8px 14px 80px; gap: 18px; }
  .hero { min-height: 280px; }
  .hero-inner { padding: 30px 24px 24px; }
  .hero-headline { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .stat-num { font-size: 1.55rem; }
  .panel { padding: 18px; }
  .compose-paper { padding: 18px 20px; }
  .compose-paper textarea { font-size: 1.2rem; }
  .anthology-grid { grid-template-columns: 1fr; }
  .filter-row { flex-direction: column; }
  .search-wrap input { width: 100%; }
  .filter-row .select { width: 100%; }
  .search-wrap { width: 100%; }
}
@media (max-width: 540px) {
  .stats { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-num { font-size: 1.35rem; }
  .stat-label { font-size: 0.7rem; }
  .syl-pill { font-size: 0.66rem; padding: 4px 7px; }
  .hero-prompt { font-size: 0.88rem; }
}
@media (max-width: 380px) {
  .top-actions .icon-btn { width: 34px; height: 34px; }
  .brand-text h1 { font-size: 1.4rem; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--plum); }

/* SELECTION */
::selection { background: var(--gold); color: var(--ink); }

/* MONO HELPER */
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
