/* ============================================================
 * Star Path · Obsidian design system (v2)
 * Reference: redesign/styles.css (designer pack)
 * ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
  /* OBSIDIAN — Default theme */
  --bg-base: #0a0816;
  --bg-raised: #14102a;
  --bg-elevated: #1c1736;
  --bg-glass: rgba(20, 16, 42, 0.65);

  --line: #2a2342;
  --line-soft: #1f1a36;
  --line-strong: #3d3458;

  --ink-primary: #f4ede0;
  --ink-secondary: #c2b8a8;
  --ink-muted: #8b82a8;
  --ink-faint: #5a5478;

  --gold: #d4a574;
  --gold-dim: #9a7a55;
  --gold-glow: rgba(212, 165, 116, 0.18);

  --rose: #c47a8a;
  --celest: #7a8fc4;
  --sage: #8aa896;
  --signal: #d97757;
  --success: #8aa896;
  --danger: #c47a8a;

  --shadow-soft: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 60px -20px rgba(0,0,0,0.6);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 30px 80px -30px rgba(0,0,0,0.8);

  --noise-opacity: 0.06;
  --header-h: 64px;
  --tap: 44px;

  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-ui: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--ink-primary);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: -0.005em;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--ink-primary); }
img, svg { max-width: 100%; height: auto; display: block; }
::selection { background: var(--gold-glow); color: var(--gold); }

/* Subtle film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.7'/></svg>");
  opacity: var(--noise-opacity);
  mix-blend-mode: overlay;
}

/* ——— TYPOGRAPHY ——— */
.display, .display-xl, .display-lg, .display-md {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--ink-primary);
}
.display-xl { font-size: clamp(64px, 10vw, 144px); }
.display-lg { font-size: clamp(48px, 6vw, 92px); }
.display-md { font-size: clamp(32px, 4vw, 56px); }

.italic { font-style: italic; }
.mono { font-family: var(--font-mono); font-feature-settings: 'tnum', 'zero'; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 400;
}
.label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 400;
}

h1,h2,h3,h4 { font-weight: 400; margin: 0; font-family: var(--font-display); color: var(--ink-primary); }
h1 { font-size: clamp(44px, 6vw, 88px); letter-spacing: -0.02em; line-height: 1; }
h2 { font-size: clamp(32px, 4vw, 56px); letter-spacing: -0.015em; line-height: 1.05; }
h3 { font-size: 28px; letter-spacing: -0.01em; }
h4 { font-size: 18px; }
p  { margin: 0; text-wrap: pretty; }

.gold    { color: var(--gold); }
.rose    { color: var(--rose); }
.sage    { color: var(--sage); }
.celest  { color: var(--celest); }
.muted   { color: var(--ink-muted); }
.secondary { color: var(--ink-secondary); }

/* ——— LAYOUT ——— */
.wrap, .narrow { width: 100%; padding: 0 28px; margin: 0 auto; max-width: 1280px; }
.narrow { max-width: 520px; }
.section { padding: 96px 56px; position: relative; }
.section-sm { padding: 56px 56px; }
.section-lg { padding: 140px 56px; }
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; }
.gap-6 { gap: 24px; } .gap-8 { gap: 32px; } .gap-10 { gap: 40px; } .gap-12 { gap: 48px; }
.center  { display: flex; align-items: center; justify-content: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.grid { display: grid; }
.relative { position: relative; }
.absolute { position: absolute; }
.full { width: 100%; }
.divider { height: 1px; background: var(--line); width: 100%; }
.divider-v { width: 1px; background: var(--line); height: 100%; align-self: stretch; }
.hairline { border-top: 1px solid var(--line); }

/* ——— HEADER ——— */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  height: var(--header-h);
  display: flex; align-items: center;
}
header.site .wrap.row,
header.site .row { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  text-decoration: none;
  font-weight: 400;
}
.brand-mark {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gold);
}

/* ——— NAV RIGHT (used by app.js) ——— */
.nav-right { display: flex; align-items: center; gap: 8px; font-size: 14px; }
/* .nav-link — обычные ссылки в навбаре (не кнопки) */
.nav-right .nav-link {
  text-decoration: none; color: var(--ink-muted);
  padding: 8px 12px; min-height: 36px;
  display: inline-flex; align-items: center;
  transition: color 160ms ease;
  border-radius: 999px;
}
.nav-right .nav-link:hover { color: var(--ink-primary); }
/* .btn внутри nav — оставляем как кнопку (без override-цвета) */
.nav-right .btn { font-size: 13px; }
.nav-right .nav-admin {
  color: var(--gold); font-weight: 500;
  border: 1px solid color-mix(in oklab, var(--gold) 35%, transparent);
  border-radius: 999px; padding: 6px 14px;
}
.nav-right .nav-admin:hover {
  color: var(--bg-base); background: var(--gold); border-color: var(--gold);
}

/* ——— BUTTONS ——— */
.btn {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  min-height: var(--tap);
  border-radius: 999px;
  border: 1px solid var(--ink-primary);
  cursor: pointer;
  background: var(--ink-primary);
  color: var(--bg-base);
  transition: all 160ms ease;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--bg-base); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--ink-primary); color: var(--bg-base); border-color: var(--ink-primary); }
.btn-primary:hover { background: var(--gold); border-color: var(--gold); }

.btn-ghost, .btn.ghost {
  background: transparent;
  color: var(--ink-primary);
  border-color: var(--line);
}
.btn-ghost:hover, .btn.ghost:hover {
  border-color: var(--ink-primary); background: transparent; color: var(--ink-primary);
}

.btn-gold { background: var(--gold); color: var(--bg-base); border-color: var(--gold); }
.btn-gold:hover { filter: brightness(1.08); background: var(--gold); color: var(--bg-base); }

.btn-danger { background: var(--danger); color: var(--bg-base); border-color: var(--danger); }
.btn-danger:hover { filter: brightness(1.06); }

.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }
.btn-lg { padding: 16px 28px; font-size: 15px; }
.btn.block, .btn-block { width: 100%; }
.btn-icon {
  width: 36px; height: 36px;
  padding: 0; min-height: 36px;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent; color: var(--ink-primary);
}
.btn-icon:hover { border-color: var(--ink-primary); background: transparent; color: var(--ink-primary); }

/* ——— CARDS / SURFACES ——— */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.card h1, .card h2, .card h3 { margin-top: 0; }

/* ——— INPUTS ——— */
.input, .textarea, .select,
.field input, .field select, .field textarea {
  width: 100%;
  min-height: var(--tap);
  background: var(--bg-base);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--ink-primary);
  transition: border-color 160ms ease, box-shadow 160ms ease;
  appearance: none; -webkit-appearance: none;
}
.input:focus, .textarea:focus, .select:focus,
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow);
}
.input-bare {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 0;
}
.input-bare:focus { outline: none; border-bottom-color: var(--gold); box-shadow: none; }

.field { margin-bottom: 14px; }
.field label, label.field > .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 400;
  margin-bottom: 6px;
}
.field-checkbox {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 13px; color: var(--ink-secondary); line-height: 1.5;
}
.field-checkbox input {
  width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0;
  accent-color: var(--gold);
}
.field-checkbox a { color: var(--gold); }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ——— CHIPS / BADGES ——— */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
}
.chip-gold {
  background: var(--gold-glow);
  border-color: var(--gold-dim);
  color: var(--gold);
}
.chip-rose { color: var(--rose); border-color: color-mix(in oklab, var(--rose) 50%, transparent); background: color-mix(in oklab, var(--rose) 10%, transparent); }
.chip-sage { color: var(--sage); border-color: color-mix(in oklab, var(--sage) 50%, transparent); background: color-mix(in oklab, var(--sage) 10%, transparent); }
.chip-celest { color: var(--celest); border-color: color-mix(in oklab, var(--celest) 50%, transparent); background: color-mix(in oklab, var(--celest) 10%, transparent); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-muted); display: inline-block; }
.dot-gold { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.dot-rose { background: var(--rose); }
.dot-sage { background: var(--sage); }

/* ——— STATUS FEEDBACK (compat with existing forms) ——— */
.status, .status-line {
  margin-top: 14px; padding: 12px 14px;
  border-radius: 12px; font-size: 14px;
  display: none;
}
.status.loading { display: block; background: var(--gold-glow); color: var(--gold); border: 1px solid color-mix(in oklab, var(--gold) 30%, transparent); }
.status.error   { display: block; background: color-mix(in oklab, var(--danger) 12%, transparent); color: var(--danger); border: 1px solid color-mix(in oklab, var(--danger) 40%, transparent); }
.status.success { display: block; background: color-mix(in oklab, var(--success) 12%, transparent); color: var(--success); border: 1px solid color-mix(in oklab, var(--success) 40%, transparent); }
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2.5px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin 0.8s linear infinite;
  margin-right: 8px; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ——— DIVIDER ("или") ——— */
.divider-or, .divider.text {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-faint); font-size: 12px; margin: 18px 0;
  text-transform: uppercase; letter-spacing: 1px;
  font-family: var(--font-mono); font-weight: 400;
}
.divider-or::before, .divider-or::after,
.divider.text::before, .divider.text::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ——— OAUTH BUTTONS ——— */
.oauth { display: grid; gap: 10px; }
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 16px; min-height: var(--tap);
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-raised); color: var(--ink-primary);
  text-decoration: none; font-weight: 500;
  font-size: 14px; cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 160ms, background 160ms;
}
.oauth-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.oauth-btn:disabled, .oauth-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.oauth-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ——— SCROLLBARS ——— */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* ——— ZODIAC MARQUEE ——— */
.marquee {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  padding: 20px 0;
}
.marquee-track {
  display: flex; gap: 64px; align-items: center; white-space: nowrap;
  animation: marquee-scroll 80s linear infinite;
  width: max-content;
}
.marquee-item {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink-secondary);
}
.marquee-item .mono {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ——— PRODUCT CARDS ——— */
.product-card {
  position: relative;
  padding: 32px 28px 28px;
  min-height: 440px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.product-card .corner-orn {
  position: absolute; top: -40px; right: -40px; opacity: 0.35; pointer-events: none;
}
.product-card .planets {
  display: flex; gap: 12px; margin-bottom: 20px;
}
.product-card .planet-pill {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}

/* ——— PROCESS STEPS ——— */
.process {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.process .step {
  padding: 40px 32px;
  border-right: 1px solid var(--line);
}
.process .step:last-child { border-right: none; }
.process .step .num {
  font-family: var(--font-display);
  font-size: 52px; color: var(--gold); line-height: 1;
}
@media (max-width: 900px) {
  .process { grid-template-columns: 1fr; }
  .process .step { border-right: none; border-bottom: 1px solid var(--line); }
  .process .step:last-child { border-bottom: none; }
}

/* ——— TESTIMONIAL ——— */
.testi {
  padding: 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 280px;
}
.testi .quote {
  font-family: var(--font-display);
  font-size: 21px; line-height: 1.4; margin-bottom: 24px;
}
.testi .quote .q { color: var(--gold); }
.testi .who {
  display: flex; align-items: center; gap: 12px;
}
.testi .ava {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}

/* ——— FAQ ——— */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  width: 100%; cursor: pointer;
  padding: 24px 0;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--ink-primary);
  font-family: var(--font-display); font-size: 22px;
  text-align: left;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon {
  color: var(--gold); transition: transform 200ms;
  width: 18px; height: 18px;
}
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item .answer {
  padding: 0 0 24px;
  color: var(--ink-secondary); font-size: 15px; line-height: 1.6;
  max-width: 680px;
}

/* ——— STAT (trust strip) ——— */
.stat {
  display: flex; flex-direction: column; gap: 4px;
}
.stat .num {
  display: flex; align-items: baseline; gap: 3px;
}
.stat .num .big {
  font-family: var(--font-display); font-size: 36px; color: var(--ink-primary); line-height: 1;
}
.stat .num .unit {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted);
}
.stat .lbl {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-muted); letter-spacing: 0.05em;
}

/* ——— PDF preview mockup on landing ——— */
.pdf-mock {
  padding: 40px 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 4px;
  aspect-ratio: 0.75 / 1;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.8);
}
.pdf-peek {
  position: absolute; top: 20px; left: 20%; right: 20%; bottom: -10px;
  background: var(--bg-raised); border-radius: 4px;
  border: 1px solid var(--line);
  z-index: -1; opacity: 0.4;
}

/* ——— KEYFRAMES ——— */
@keyframes orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes pulse-glow { 0%, 100% { filter: drop-shadow(0 0 4px var(--gold-glow)); } 50% { filter: drop-shadow(0 0 16px var(--gold)); } }
@keyframes drift { 0% { transform: translateY(0); } 50% { transform: translateY(-6px); } 100% { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 600ms ease both; }

/* ——— ORDER PAGE topbar (back-link wrapper, replaces former inline style) ——— */
.order-topbar { max-width: 1280px; margin: 0 auto; padding: 18px 28px 0; }

/* ——— RESPONSIVE ——— */
@media (max-width: 900px) {
  .section, .section-lg { padding: 56px 24px; }
  .section-sm { padding: 32px 24px; }
  .wrap, .narrow { padding: 0 20px; }
  .order-topbar { padding: 14px 20px 0; }
  .display-xl { font-size: 56px; }
  .display-lg { font-size: 40px; }

  /* Order reader: keep the aside-on-top / reader-below single column even if
     order-v2.css's own 980px rule is ever absent. body.order-page boosts
     specificity so we win over order-v2.css (loaded after app.css). */
  body.order-page .order-v2 { grid-template-columns: 1fr; gap: 28px; }
  body.order-page .reader { min-height: 0; }
}

@media (max-width: 640px) {
  .display-xl { font-size: 44px; }
  .display-lg { font-size: 34px; }
}

@media (max-width: 560px) {
  /* Sitewide: shrink large horizontal paddings so /app.css pages stop
     overflowing on phones (~360–414px). */
  .section, .section-lg { padding: 48px 16px; }
  .section-sm { padding: 28px 16px; }
  .wrap, .narrow { padding: 0 16px; }
  .order-topbar { padding: 12px 16px 0; }
  .card { padding: 20px 16px; }

  /* Order layout: full-width single column with tight gutters. */
  body.order-page .order-v2 { padding: 14px 12px 48px; gap: 20px; }

  /* PDF page viewer scales to fit width instead of overflowing. The reader is
     a flex column inside the grid cell; the "paper" pages inherit width but
     their generous 32px frame + 48px paper gutters blow past a 360px viewport.
     Cut the frame/gutters and let the paper be fluid (max-width: 100%). */
  body.order-page .pages { padding: 16px 12px; gap: 18px; }
  body.order-page .paper {
    width: 100%;
    max-width: 100%;
    padding: 28px 20px 26px;
  }
  body.order-page .paper .p-title { font-size: 27px; }
  body.order-page .paper .body-serif { font-size: 16px; }

  /* Toolbar / chapter controls wrap instead of overflowing. */
  body.order-page .reader-toolbar { padding: 12px; row-gap: 10px; }
  body.order-page .reader-toolbar .left,
  body.order-page .reader-toolbar .right { flex-wrap: wrap; }
  body.order-page .chapter-pop { right: 12px; left: 12px; min-width: 0; max-width: none; }

  /* Sidebar cards: trim inner padding so meta rows fit narrow screens. */
  body.order-page .side .meta-card { padding: 18px 16px; }
}

/* ——— LEGACY COMPAT (старые pages, используют классы с предыдущей дизайн-системы) ——— */
.hero-light, .hero-eyebrow, .hero-headline { /* placeholders */ }
.subtitle { color: var(--ink-secondary); font-size: 16px; margin-top: 8px; }
.btn.gradient { background: linear-gradient(135deg, var(--gold), var(--rose)); border-color: transparent; }

/* Margin utilities */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }

/* Flex shortcut (used by account/order legacy) */
.flex { display: flex; gap: 8px; }

/* Legacy --muted/--danger fallback (старые места использовали var(--muted)) */
:root {
  --muted: var(--ink-muted);
  --text: var(--ink-primary);
  --bg: var(--bg-base);
  --bg-card: var(--bg-raised);
  --accent: var(--gold);
}

/* ——— MODAL (used by /account, /order pages) ——— */
.modal-bg {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10, 8, 22, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
}
.modal-bg.open, .modal-bg.shown { display: flex; }
.modal {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-card);
}
.modal h2 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.modal .subtitle { margin-top: 0; margin-bottom: 18px; }

/* Cookie banner — старый класс */
#cookie-banner {
  display: none;
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  max-width: 480px; margin: 0 auto;
  padding: 14px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 14px;
  z-index: 200;
  font-size: 13px;
  color: var(--ink-secondary);
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-card);
}
#cookie-banner a { color: var(--gold); }
#cookie-banner .btn { padding: 8px 14px; font-size: 13px; min-height: 36px; }

/* Hero title legacy alias */
.hero-title, .hero {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink-primary);
}

/* Toast (used by astro.toast) */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 12px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-primary);
  font-size: 14px;
  z-index: 2000;
  box-shadow: var(--shadow-card);
  animation: fadeIn 240ms ease both;
}
.toast.success { border-color: color-mix(in oklab, var(--sage) 50%, transparent); color: var(--sage); }
.toast.error   { border-color: color-mix(in oklab, var(--rose) 50%, transparent); color: var(--rose); }
.toast.info    { border-color: var(--gold-dim); color: var(--gold); }
