/* ===================================================================
   TheVaisnava Publication Studio v5 — Premium Design System
   =================================================================== */

:root {
  --cream: #fff8f1; --peach: #fae5d8; --blush: #d27a6b; --rose: #b95e73;
  --plum: #632047; --plum2: #4b1838; --plum3: #331026;
  --ink: #33263a; --muted: #8b7b86; --gold: #d9b477; --blue: #2c6fa3;
  --card: rgba(255,255,255,.78); --line: rgba(99,32,71,.12);
  --shadow: 0 26px 70px rgba(96,32,71,.16);
  --shadow-soft: 0 14px 35px rgba(96,32,71,.10);
  --shadow-btn: 0 16px 32px rgba(99,32,71,.20);
  --radius: 22px; --radius-sm: 14px;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

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

body {
  margin: 0; color: var(--ink); font-family: var(--sans);
  background: linear-gradient(180deg,#fae4d6 0%,#fff8f1 32%,#fffaf6 100%);
  min-height: 100vh; overflow-x: hidden; font-size: 14px; line-height: 1.6;
}

body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 16% 5%, rgba(185,94,115,.20), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(217,180,119,.22), transparent 30%),
    radial-gradient(circle at 50% 95%, rgba(99,32,71,.10), transparent 38%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(99,32,71,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,32,71,.025) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 78%);
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.app-shell { position: relative; z-index: 1; }
.top-ribbon {
  position: absolute; inset: 0 0 auto; height: 6px; z-index: 50;
  background: linear-gradient(90deg, var(--plum), var(--blush), var(--gold), var(--plum));
}
.floating-orb { position: fixed; pointer-events: none; border-radius: 50%; filter: blur(80px); z-index: 0; opacity: .6; }
.orb-a { width: 320px; height: 320px; left: -140px; top: 170px; background: rgba(185,94,115,.25); }
.orb-b { width: 400px; height: 400px; right: -160px; top: 340px; background: rgba(99,32,71,.15); }

/* ── Hero ── */
header.hero {
  position: relative; min-height: 360px; padding: 40px 40px 50px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center;
  overflow: hidden; color: white;
  background:
    linear-gradient(180deg, rgba(51,16,38,.72), rgba(99,32,71,.78)),
    radial-gradient(circle at 22% 30%, rgba(217,180,119,.55), transparent 28%),
    linear-gradient(135deg, #4b1838, #632047 52%, #d27a6b);
  border-bottom-left-radius: 50% 6%; border-bottom-right-radius: 50% 6%;
  box-shadow: 0 32px 90px rgba(99,32,71,.28);
}
header.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 14% 22%, rgba(255,255,255,.12), transparent 26%),
    radial-gradient(circle at 86% 12%, rgba(255,217,147,.24), transparent 30%);
}
header.hero::after {
  content: "हरे कृष्ण"; position: absolute; right: 42px; bottom: 26px;
  font-family: var(--serif); font-size: 62px; color: rgba(255,255,255,.06);
  letter-spacing: .04em; pointer-events: none;
}
.hero-copy, .hero-panel { position: relative; z-index: 1; }
.brandline {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px;
  margin-bottom: 18px; border-radius: 999px; background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(14px);
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .14em; color: #fff;
}
.brandline::before {
  content: "ॐ"; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: #fff; color: var(--plum);
  font-family: var(--serif); font-size: 16px; font-weight: 400;
}
h1 {
  margin: 0 0 16px; max-width: 760px; font-family: var(--serif);
  font-size: clamp(40px, 5vw, 72px); line-height: .96; font-weight: 700;
  letter-spacing: -.02em; text-shadow: 0 4px 22px rgba(0,0,0,.18);
}
header.hero p { margin: 0; max-width: 620px; color: rgba(255,255,255,.86); font-size: 15px; line-height: 1.65; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-actions a {
  display: inline-flex; text-decoration: none; border-radius: 999px; padding: 10px 16px;
  font-size: 12px; font-weight: 800; border: 1px solid rgba(255,255,255,.30);
  color: white; background: rgba(255,255,255,.14); backdrop-filter: blur(12px); transition: var(--transition);
}
.hero-actions a:hover { background: rgba(255,255,255,.22); }
.hero-actions a.primary { background: #fff; color: var(--plum); border-color: #fff; }
.hero-actions a.primary:hover { background: #fef5ef; }

.hero-panel {
  justify-self: end; width: min(380px,100%); border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14); border-radius: 28px; padding: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.20); backdrop-filter: blur(18px);
}
.studio-card { background: rgba(255,255,255,.92); color: var(--plum); border-radius: 22px; padding: 18px; box-shadow: var(--shadow-soft); }
.studio-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.studio-logo {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, var(--plum), var(--blush));
  display: grid; place-items: center; color: white; font-weight: 900; font-size: 14px;
}
.studio-pill { font-size: 10px; font-weight: 850; color: var(--plum); background: #f9e9ef; border-radius: 999px; padding: 6px 10px; letter-spacing: .04em; }
.studio-stat { font-size: 38px; font-weight: 900; letter-spacing: -.05em; color: var(--plum); line-height: 1; }
.studio-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.studio-bars { display: grid; grid-template-columns: 2fr 1.4fr .9fr .5fr; gap: 6px; height: 60px; align-items: end; margin-top: 16px; }
.studio-bars span { border-radius: 8px; background: linear-gradient(180deg, var(--plum), var(--blush)); transition: height .5s ease; }
.studio-bars span:nth-child(1){height:58px}.studio-bars span:nth-child(2){height:44px;opacity:.8}
.studio-bars span:nth-child(3){height:28px;opacity:.55}.studio-bars span:nth-child(4){height:14px;opacity:.3}

/* ── Layout ── */
main {
  position: relative; z-index: 1; display: grid;
  grid-template-columns: minmax(340px,420px) 1fr; gap: 22px;
  padding: 30px 22px 24px; align-items: start; max-width: 1640px; margin: 0 auto;
}

/* ── Cards ── */
.card {
  background: var(--card); border: 1px solid rgba(255,255,255,.72);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  margin-bottom: 20px; backdrop-filter: blur(18px); transition: box-shadow var(--transition);
  animation: fadeInUp .5s ease both;
}
.card:nth-child(2){animation-delay:.08s}.card:nth-child(3){animation-delay:.16s}
.card:hover { box-shadow: 0 30px 80px rgba(96,32,71,.18); }
.card h2 {
  margin: 0; padding: 16px 20px; background: rgba(255,255,255,.40);
  border-bottom: 1px solid var(--line); font-family: var(--serif);
  font-size: 23px; color: var(--plum); font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.card h2 .step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 50%; background: linear-gradient(135deg, var(--plum), var(--blush));
  color: white; font-family: var(--sans); font-size: 12px; font-weight: 900; flex-shrink: 0;
}
.body { padding: 18px 20px; }

/* ── Forms ── */
label {
  display: block; font-weight: 780; margin: 14px 0 6px; color: var(--plum);
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
}
input, select, textarea {
  width: 100%; border: 1px solid rgba(99,32,71,.14); border-radius: var(--radius-sm);
  padding: 11px 14px; font: inherit; font-size: 13px; background: rgba(255,255,255,.78);
  color: var(--ink); outline: none;
  transition: border var(--transition), box-shadow var(--transition), background var(--transition);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blush); box-shadow: 0 0 0 4px rgba(210,122,107,.14); background: #fff;
}
textarea { min-height: 220px; resize: vertical; font-family: var(--mono); font-size: 12px; line-height: 1.6; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ── Buttons ── */
button {
  border: 0; border-radius: 999px; padding: 11px 16px;
  background: linear-gradient(135deg, var(--plum), var(--plum2));
  color: white; font-weight: 800; font-size: 13px; cursor: pointer;
  box-shadow: var(--shadow-btn); font-family: var(--sans);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
button:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(99,32,71,.25); filter: saturate(1.05); }
button:active { transform: translateY(0); }
button.blue { background: linear-gradient(135deg, var(--blush), #b76061); }
button.ghost { background: rgba(255,255,255,.62); color: var(--plum); border: 1px solid rgba(99,32,71,.15); box-shadow: none; }
button.ghost:hover { background: rgba(255,255,255,.85); box-shadow: 0 8px 20px rgba(99,32,71,.08); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 9px 0; color: #675765; font-size: 13px; }
.check input { width: auto; margin-top: 3px; accent-color: var(--plum); }
.small { font-size: 12px; color: var(--muted); line-height: 1.55; }

/* ── Upload ── */
.upload-zone {
  position: relative; border: 2px dashed rgba(99,32,71,.18); border-radius: 22px;
  padding: 30px 22px; text-align: center; cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,.74), rgba(255,241,237,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.upload-zone:hover, .upload-zone.dragover {
  transform: translateY(-2px); border-color: var(--plum);
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(250,226,217,.92));
  box-shadow: 0 18px 42px rgba(99,32,71,.12);
}
.upload-icon {
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 18px;
  display: grid; place-items: center; background: linear-gradient(135deg, var(--plum), var(--blush));
  color: #fff; font-size: 24px; box-shadow: 0 14px 28px rgba(99,32,71,.18);
}
.upload-title { font-weight: 900; color: var(--plum); font-size: 16px; }
.upload-subtitle { margin-top: 4px; color: #756071; font-size: 12px; }
.upload-count {
  display: inline-flex; margin-top: 12px; padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.72); border: 1px solid rgba(99,32,71,.10);
  font-size: 11px; font-weight: 800; color: var(--plum);
}
.hidden-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-queue { display: grid; gap: 6px; margin-top: 10px; }
.file-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-radius: 12px; background: rgba(255,255,255,.68); border: 1px solid rgba(99,32,71,.10);
  padding: 8px 10px; color: #5d4b5a; font-size: 11px;
}
.file-chip b { color: var(--plum); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip span { color: #8b7b86; white-space: nowrap; }
.detected-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-left: auto;
  background: #eef7f0; border: 1px solid #cbe5d2; color: #2f7d4f;
  border-radius: 999px; padding: 2px 7px; font-size: 9px; font-weight: 900;
}

/* ── Workspace ── */
.workspace {
  background: var(--card); border: 1px solid rgba(255,255,255,.72); border-radius: 28px;
  box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(18px);
  animation: fadeInUp .5s .2s ease both;
}
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; background: rgba(255,255,255,.48); border-bottom: 1px solid var(--line); }
.tabs button { border-radius: 999px; background: transparent; color: #725b70; border: 1px solid transparent; box-shadow: none; padding: 9px 13px; font-size: 12px; font-weight: 700; }
.tabs button:hover { background: rgba(99,32,71,.06); }
.tabs button.active { background: var(--plum); color: #fff; box-shadow: 0 10px 22px rgba(99,32,71,.14); }
.pane { display: none; padding: 18px 20px; }
.pane.active { display: block; }

/* ── Metrics ── */
.metrics { display: grid; grid-template-columns: repeat(6,1fr); gap: 10px; margin-bottom: 16px; }
.metric {
  position: relative; overflow: hidden; border: 1px solid rgba(99,32,71,.08); border-radius: 16px;
  background: rgba(255,255,255,.72); padding: 14px; min-height: 88px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.metric:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(99,32,71,.08); }
.metric::after { content: ""; position: absolute; right: -24px; bottom: -24px; width: 72px; height: 72px; border-radius: 50%; background: rgba(210,122,107,.15); }
.metric b { display: block; font-size: 28px; line-height: 1; color: var(--plum); font-weight: 900; letter-spacing: -.04em; }
.metric span { display: block; margin-top: 6px; font-size: 11px; color: #725b70; font-weight: 740; text-transform: uppercase; letter-spacing: .06em; }

/* ── Table ── */
.tablewrap { max-height: 520px; overflow: auto; border: 1px solid rgba(99,32,71,.10); border-radius: 16px; background: rgba(255,255,255,.78); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 11px 12px; border-bottom: 1px solid #f1dfd7; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: #fff5ef; color: var(--plum); font-weight: 800; z-index: 2; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
tr:hover td { background: #fff9f4; }
tr[data-post-index] { cursor: pointer; }
.selected-post-row td { background: #fff1ed !important; }

/* ── Pre / Code ── */
pre { background: #1a0e1e; color: #fff4fa; border-radius: 16px; padding: 18px; white-space: pre-wrap; overflow: auto; max-height: 620px; font-size: 12px; line-height: 1.6; border: 1px solid rgba(99,32,71,.18); }

/* ── Notices ── */
.notice { padding: 13px 16px; border: 1px solid rgba(99,32,71,.10); border-radius: 16px; background: rgba(255,255,255,.66); margin: 8px 0; font-size: 13px; }
.ok { color: #4d7c0f; font-weight: 850; }
.warn { color: #b45309; font-weight: 850; }
.pill { display: inline-flex; align-items: center; gap: 5px; background: #fff1ed; color: var(--plum); border: 1px solid #f1d0c9; border-radius: 999px; padding: 5px 9px; margin: 3px; font-size: 10px; font-weight: 800; }
.pill::before { content: "◆"; color: var(--blush); font-size: 8px; }

/* ── Preview ── */
.preview-label { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; color: var(--plum); margin: 0 0 10px 4px; }
.publication-preview { background: #fffaf4; border: 1px solid #eadbc6; border-radius: 24px; padding: 30px; min-height: 480px; box-shadow: 0 20px 56px rgba(96,32,71,.08); font-family: var(--serif); color: #2d2230; }
.preview-empty { display: grid; place-items: center; min-height: 280px; color: #8b7b86; font-family: var(--sans); text-align: center; font-size: 14px; }
.preview-kicker { font-family: var(--sans); text-transform: uppercase; letter-spacing: .16em; font-size: 10px; font-weight: 900; color: var(--blush); text-align: center; }
.publication-preview h1 { font-family: var(--serif); font-size: clamp(30px,3.5vw,50px); line-height: 1.05; letter-spacing: -.01em; text-align: center; margin: 10px auto 12px; color: var(--plum); max-width: 700px; text-shadow: none; }
.preview-meta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 auto 22px; font-family: var(--sans); }
.preview-meta span { border-radius: 999px; background: #fff1ed; border: 1px solid #f1d0c9; color: #6f2b55; padding: 5px 9px; font-weight: 800; font-size: 10px; }
.preview-content { font-size: 17px; line-height: 1.78; }
.preview-content p { margin: 0 0 1.1em; }
.preview-content .has-text-align-center { text-align: center; }
.preview-content .has-medium-font-size { font-size: 1.05em; color: var(--plum); background: #fff1ed; border: 1px solid #f1d0c9; border-radius: 16px; padding: 18px; margin: 18px 0; }
.preview-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; border-top: 1px solid #eadbc6; margin-top: 24px; padding-top: 16px; font-family: var(--sans); }
.preview-tags span { font-size: 10px; font-weight: 800; color: var(--plum); background: #fff8ed; border: 1px solid #efd9bf; border-radius: 999px; padding: 5px 9px; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.preview-help { margin: 3px 0 0; color: #8b7b86; font-size: 11px; }
.full-preview { width: min(940px,100%); margin: 0 auto; min-height: 580px; }
.html-full { width: 100%; min-height: 680px; max-height: calc(100vh - 250px); }

/* ── Post navigator ── */
.post-navigator { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px; border-radius: 20px; background: rgba(255,255,255,.56); border: 1px solid rgba(99,32,71,.08); }
.post-navigator select { width: min(480px,100%); border-radius: 999px; font-weight: 800; color: var(--plum); background: #fff; font-size: 12px; }
.post-counter { font-size: 11px; font-weight: 900; color: #806178; background: #fff1ed; border: 1px solid #f1d0c9; border-radius: 999px; padding: 6px 9px; }
.post-navigator button { padding: 8px 12px; font-size: 12px; }
.excluded-preview-note { display: inline-flex; margin-left: 8px; border-radius: 999px; background: #fff1ed; border: 1px solid #f1d0c9; color: #9f1239; padding: 4px 8px; font-size: 10px; font-weight: 900; }

/* ── Article review ── */
.mag-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.magazine-review { display: grid; gap: 10px; }
.mag-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.mag-row { background: rgba(255,255,255,.72); border: 1px solid rgba(99,32,71,.08); box-shadow: 0 8px 24px rgba(99,32,71,.05); }
.mag-row td { border-top: 1px solid rgba(99,32,71,.08); border-bottom: 1px solid rgba(99,32,71,.08); padding: 11px; vertical-align: top; }
.mag-row td:first-child { border-left: 1px solid rgba(99,32,71,.08); border-radius: 16px 0 0 16px; }
.mag-row td:last-child { border-right: 1px solid rgba(99,32,71,.08); border-radius: 0 16px 16px 0; }
.mag-include { width: 20px; height: 20px; accent-color: var(--plum); }
.mag-field { display: grid; gap: 5px; }
.mag-field label { margin: 0; font-size: 9px; text-transform: uppercase; letter-spacing: .10em; color: #8b607a; }
.mag-field input { padding: 8px 10px; border-radius: 10px; font-size: 12px; }
.mag-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.mag-meta span { background: #fff1ed; border: 1px solid #f1d0c9; color: var(--plum); font-size: 10px; font-weight: 800; border-radius: 999px; padding: 4px 7px; }
.mag-snippet { font-size: 11px; color: #786677; line-height: 1.45; max-width: 300px; }
.mag-title-main { font-weight: 900; color: var(--plum); font-size: 13px; }
.mag-disabled { opacity: .42; }
.source-reference-pill { display: inline-flex; margin-top: 6px; border-radius: 999px; background: #fff1ed; border: 1px solid #f1d0c9; color: var(--plum); padding: 4px 8px; font-size: 10px; font-weight: 900; }
.book-chip { background: #eef3ff !important; border-color: #d5def3 !important; color: #2c4c7a !important; }

/* ── Reference chips ── */
.ref-chip-list { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.ref-chip { background: #f6ecf1; color: var(--plum); border: 1px solid #e6cbd8; border-radius: 999px; padding: 3px 7px; font-size: 9px; font-weight: 850; }
.ref-chip.scripture { background: #fff1ed; border-color: #f1d0c9; }
.ref-chip.person { background: #f3edf8; border-color: #ddcbe9; }
.ref-chip.book { background: #fff8ed; border-color: #efd9bf; }
.ref-chip.place { background: #edf7f4; border-color: #cbe5dc; }
.ref-chip.topic { background: #eef3ff; border-color: #d5def3; }

/* ── Sanskrit ── */
.sanskrit-converter { display: grid; gap: 14px; }
.sanskrit-controls { display: grid; grid-template-columns: repeat(3,1fr) auto; gap: 10px; align-items: end; background: rgba(255,255,255,.58); border: 1px solid rgba(99,32,71,.08); border-radius: 20px; padding: 14px; }
.sanskrit-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sanskrit-panels textarea { min-height: 300px; }
.sanskrit-preview-card { background: #fffaf4; border: 1px solid #eadbc6; border-radius: 24px; padding: 24px; box-shadow: 0 18px 50px rgba(96,32,71,.08); font-family: var(--serif); color: #2d2230; }
.sanskrit-line { padding: 13px 12px; border-bottom: 1px solid #f1dfd7; text-align: center; }
.sanskrit-line:last-child { border-bottom: 0; }
.sanskrit-dev { font-size: 26px; line-height: 1.55; color: var(--plum); font-family: 'Noto Serif Devanagari', 'Mangal', 'Kokila', 'Nirmala UI', serif; }
.sanskrit-iast { font-size: 16px; line-height: 1.55; color: #63485c; font-style: italic; }
.sanskrit-note { font-size: 11px; color: #806178; margin-top: 8px; text-align: center; }
.sanskrit-controls label { margin: 0 0 4px; }
.sanskrit-controls button { white-space: nowrap; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--plum); color: white; padding: 12px 20px; border-radius: 14px;
  font-weight: 700; font-size: 13px; box-shadow: 0 14px 40px rgba(99,32,71,.30);
  transform: translateY(120%); opacity: 0;
  transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .35s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }

/* ── Spinner ── */
.spinner {
  display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
footer { padding: 28px; text-align: center; color: #806f7d; font-size: 11px; letter-spacing: .02em; }
footer a { color: var(--plum); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .metrics { grid-template-columns: repeat(3,1fr); }
  .sanskrit-controls { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  header.hero { grid-template-columns: 1fr; border-bottom-left-radius: 12% 3%; border-bottom-right-radius: 12% 3%; padding: 26px 18px; min-height: auto; }
  .hero-panel { justify-self: start; }
  main { grid-template-columns: 1fr; padding: 18px 14px; }
  .sanskrit-panels { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 720px) {
  .sanskrit-controls { grid-template-columns: 1fr; }
  .mag-row, .mag-row td { display: block; border-radius: 0; }
}

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