/* ═══════════════════════════════════════════════════════════════
   BLUEPRINT — LAYOUT v1.0
   Структура страниц: как блоки расположены.
   Никаких значений цветов напрямую — только var(--token).

   ПРАВИЛА:
   — Только позиционирование и структура
   — Значения → tokens.css, компоненты → components.css
   — @media только для глобальных лейаут изменений
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════
   BLUEPRINT CSS — Session 10
   Mobile-first · Liquid Glass · Cormorant + DM Sans
   ═══════════════════════════════════════════════ */

/* Tokens → design-system.css (SSoT) */

/* Reset + body → design-system.css */

/* Noise overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: var(--z-noise); opacity: .5; mix-blend-mode: overlay;
}

/* Gold aura */
body::after {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 50% 0%, #d4a8530a, transparent 60%),
    radial-gradient(ellipse 800px 400px at 50% 100%, #d4a8530a, transparent 60%);
  pointer-events: none; z-index: var(--z-below);
}


/* ─────────────────────────────────────────────
   HEADER
───────────────────────────────────────────── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-header);
  padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center;
  background: oklch(4% 0 0 / 90%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.logo {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-size: 20px;
  color: var(--text);
  letter-spacing: .01em;
  text-decoration: none;
}
.logo em { font-style: italic; color: var(--gold); }

.lang-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.lang-btn {
  padding: 6px 14px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px; min-height: 44px;
}
.lang-btn.active { background: var(--gold-dim); color: var(--gold); }


/* ═══════════════════════════════════════════════
   FORM PAGE — Redesign v2 — Apple Liquid Glass
   ═══════════════════════════════════════════════ */
.form-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px var(--content-pad) 40px;
  position: relative;
  /* overflow убран — обрезает position:fixed stars на iOS */
}

/* Stars canvas — глобальный фон, все страницы */
.stars-canvas {
  position: fixed;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
  z-index: var(--z-base);
  opacity: 1;
}

/* two-column layout */
.form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: var(--z-raised);
}

/* ── LEFT COLUMN ── */
.form-hero-left {
  display: flex; flex-direction: column; gap: var(--space-xl);
}
.form-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-label); letter-spacing: var(--ls-label);
  color: var(--gold); text-transform: uppercase;
  opacity: 0; animation: riseIn .6s var(--ease-out) forwards .1s;
}
.form-hero-hook {
  display: flex; flex-direction: column; gap: 10px;
  opacity: 0; animation: riseIn .6s var(--ease-out) forwards .2s;
}
.form-hero-hook-main {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 400; line-height: 1.1;
  color: var(--text); letter-spacing: -.02em;
}
.form-hero-hook-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-style: italic; color: var(--gold);
  opacity: .8; line-height: 1.2;
}
.form-hero-stat {
  display: flex; align-items: baseline; gap: 10px;
  opacity: 0; animation: riseIn .6s var(--ease-out) forwards .32s;
}
.form-hero-stat-num {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-style: italic; color: var(--gold);
  line-height: 1; font-weight: 300;
}
.form-hero-stat-label {
  font-family: var(--font-mono);
  font-size: var(--t-label); letter-spacing: var(--ls-label);
  color: var(--text-muted); text-transform: uppercase; line-height: 1.4;
}

/* System chips */
.form-systems-grid {
  display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px;
  opacity: 0; animation: riseIn .6s var(--ease-out) forwards .45s;
}
.fsys-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px 6px 8px;
  border: 1px solid var(--color-white-8); border-radius: 100px;
  background: var(--color-white-4); backdrop-filter: blur(8px);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.fsys-chip:hover, .fsys-chip.open {
  border-color: var(--c, var(--color-white-20));
  background: var(--color-white-7);
  box-shadow: 0 0 12px oklch(0% 0 0 / 20%);
}
.fsys-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--c, var(--gold)); flex-shrink: 0;
}
.fsys-name {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); transition: color .2s;
}
.fsys-chip:hover .fsys-name,
.fsys-chip.open .fsys-name { color: var(--text-2); }
.fsys-arrow {
  font-size: 12px; color: var(--text-muted);
  opacity: .5; transition: transform .2s, opacity .2s; line-height: 1;
}
.fsys-chip.open .fsys-arrow { transform: rotate(90deg); opacity: .9; }
.fsys-dropdown {
  display: none; position: absolute;
  bottom: calc(100% + 8px); left: 0;
  min-width: min(220px, 80vw);
  background: oklch(5% 0 0 / 97%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--c, var(--color-white-12));
  border-radius: var(--r); padding: 10px 12px; z-index: var(--z-sticky);
  box-shadow: 0 8px 32px oklch(0% 0 0 / 50%), inset 0 1px 0 var(--color-white-5);
  animation: dropIn .15s var(--ease-out);
}
.fsys-chip.open .fsys-dropdown { display: block; }
@keyframes dropIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.fsys-param {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em;
  color: var(--text-muted); padding: 4px 0;
  border-bottom: 1px solid var(--color-white-5); line-height: 1.5;
}
.fsys-param:last-child { border-bottom: none; }

/* ── RIGHT COLUMN: form card — Liquid Glass ── */
.form-card-v2 {
  background: var(--color-white-4);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--color-white-10);
  border-radius: var(--r-xl);
  padding: var(--space-2xl);
  display: flex; flex-direction: column; gap: var(--space-lg);
  position: relative; z-index: var(--z-raised);
  opacity: 0; animation: riseIn .6s var(--ease-out) forwards .3s;
  box-shadow:
    inset 0 1px 0 var(--color-white-8),
    inset 0 -1px 0 oklch(0% 0 0 / 20%),
    0 24px 60px oklch(0% 0 0 / 45%),
    0 0 0 1px var(--color-white-4);
}
/* Gold top glow */
.form-card-v2::before {
  content: '';
  position: absolute; top: -1px; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-45), transparent);
  border-radius: 100px;
}
.form-card-inner {
  display: flex; flex-direction: column; gap: var(--space-lg);
}

/* Fields */
.field { display: flex; flex-direction: column; gap: 5px; position: relative; }
.field label {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: var(--ls-label);
  color: var(--text-muted); text-transform: uppercase;
  transition: color .2s;
}
.field:focus-within label { color: var(--color-gold-50); }

/* Base input */
.field input {
  width: 100%; padding: 13px 40px 13px 14px;
  background: var(--color-white-5);
  border: 1px solid var(--color-white-9);
  border-radius: var(--r);
  color: var(--text); font-size: 15px; font-family: var(--font-sans);
  transition: border-color .2s, background .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
  min-height: 52px; box-sizing: border-box;
  caret-color: var(--gold);
}
.field input:hover {
  border-color: var(--color-white-15);
  background: var(--color-white-7);
}
.field input:focus {
  outline: none;
  border-color: var(--color-gold-50);
  background: var(--color-white-6);
  box-shadow: 0 0 0 3px var(--color-gold-10), 0 2px 12px oklch(0% 0 0 / 20%);
}
.field input::placeholder { color: var(--text-muted); opacity: .4; }
.field input[type="date"],
.field input[type="time"] { color-scheme: dark; }

/* Icons via background-image */
.field--name input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='var(--color-white-20)' stroke-width='1.5'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.field--date input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='var(--color-white-20)' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.field--time input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='var(--color-white-20)' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 15'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
/* Focus gold icons */
.field--name input:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(212,168,83,0.5)' stroke-width='1.5'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.field--date input:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(212,168,83,0.5)' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.field--time input:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(212,168,83,0.5)' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 15'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }

.form-card-v2 .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-card-v2 .btn-generate { margin-top: var(--space-sm); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Restore banner */
.form-page .restore-banner {
  max-width: var(--content-max); margin: 0 auto var(--space-md);
  width: 100%; position: relative; z-index: var(--z-raised); box-sizing: border-box;
}
@media (min-width: 769px) {
  .form-page .restore-banner { margin-left: auto; width: 50%; padding-left: 0; }
}

/* City autocomplete */
.city-wrap { position: relative; }
.city-suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: oklch(5% 0 0 / 97%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-white-10); border-radius: var(--r);
  overflow: hidden; z-index: var(--z-overlay);
  box-shadow: 0 12px 40px oklch(0% 0 0 / 60%);
  max-height: 220px; overflow-y: auto;
}
.city-suggestion {
  padding: 11px 14px; cursor: pointer;
  border-bottom: 1px solid var(--color-white-4);
  transition: background .15s; -webkit-tap-highlight-color: transparent;
}
.city-suggestion:last-child { border-bottom: none; }
.city-suggestion:hover, .city-suggestion.focused { background: var(--color-white-6); }
.city-main { display: block; font-size: 13px; color: var(--text); }
.city-sub  { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.city-name { font-size: 14px; color: var(--text); font-weight: 500; }
.city-meta { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 2px; }
#coords-row .field input { font-size: 13px; min-height: 42px; padding: 10px 12px; }

/* Geo button */
.geo-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 16px; line-height: 1;
  padding: 6px; opacity: .6; transition: opacity .2s, color .2s;
  min-width: 32px; min-height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.geo-btn:hover { opacity: 1; color: var(--gold); }
.geo-btn:disabled { opacity: .3; cursor: default; }

/* Time warning */
.time-warning {
  font-family: var(--font-mono); font-size: var(--t-meta);
  color: var(--gold-dim); opacity: .7; min-height: 14px; margin-top: 2px;
}

/* ── GENERATE BUTTON — pulsing gold ── */
.btn-generate {
  width: 100%; padding: 16px 24px; min-height: 56px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--gold);
  border: none; border-radius: var(--r-lg);
  color: var(--bg); font-family: var(--font-sans);
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  cursor: pointer; position: relative; overflow: hidden;
  transition: opacity .2s, transform .15s, box-shadow .3s;
  -webkit-tap-highlight-color: transparent;
}
.btn-generate::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, var(--color-white-20) 50%, transparent 60%);
  transform: translateX(-100%); transition: transform .6s var(--ease-out);
}
.btn-generate:hover::after { transform: translateX(100%); }
.btn-generate:not(:disabled):hover {
  opacity: .92; transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--color-gold-35);
}
.btn-generate:active { transform: translateY(0); opacity: .95; }
.btn-generate:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-generate.ready {
  animation: btn-pulse 2var(--duration-normal) ease-in-out infinite;
}
@keyframes btn-pulse {
  0%   { box-shadow: 0 0 0 0 var(--color-gold-35); }
  70%  { box-shadow: 0 0 0 10px oklch(72% 0.12 68 / 0%); }
  100% { box-shadow: 0 0 0 0 oklch(72% 0.12 68 / 0%); }
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .form-page { padding: 72px 20px 32px; justify-content: flex-start; }
  .form-layout { grid-template-columns: 1fr; gap: var(--space-xl); }
  .form-hero-hook-main { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .form-hero-hook-sub  { font-size: clamp(1rem, 4.5vw, 1.35rem); }
  .form-hero-hook      { gap: 8px; }
  .form-hero-stat-num  { font-size: 2rem; }
  .form-hero-stat      { gap: 8px; }
  .form-hero-left      { gap: var(--space-lg); }
  .form-card-v2        { padding: var(--space-xl); }
  .form-systems-grid   { justify-content: center; }
  .form-card-v2 .field-row { gap: 8px; }
  .fsys-dropdown { min-width: min(180px, 70vw); }
  @media (max-height: 700px) {
    .form-hero-stat { display: none; }
    .form-hero-left { gap: var(--space-md); }
  }
}

/* legacy */
.hero { display: none; }
.form-card { display: none; }
.sys-chip {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .15em;
  padding: 5px 10px; border-radius: var(--r-lg); border: 1px solid var(--border2);
  color: var(--text-muted); text-transform: uppercase;
  cursor: pointer; transition: border-color .2s, color .2s; white-space: nowrap;
}
.sys-chip:hover { border-color: var(--gold-dim); color: var(--gold); }
.sys-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 4px; }
@keyframes riseIn { from { opacity:0; transform:translateY(14px) } to { opacity:1; transform:none } }


/* ─────────────────────────────────────────────
   RESULTS PAGE — wrapper
───────────────────────────────────────────── */
.results-page {
  display: none;
  padding: clamp(60px, 10vw, 80px) 0 calc(clamp(60px,10vw,80px) + var(--safe-bottom));
  overflow-x: clip; /* clip не создаёт scroll context в отличие от hidden */
  width: 100%;
  max-width: 100%;
}
.results-page.active { display: block; }
.results-hero-meta {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: .08em;
  margin-bottom: var(--space-md);
}
.birth-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
.birth-line .sep { color: var(--border3); }
.results-hero-params {
  display: flex; justify-content: center; gap: var(--space-sm);
  flex-wrap: wrap; margin-top: var(--space-md);
}
.results-hero-param {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs); letter-spacing: .1em;
  color: var(--text-2); padding: 4px 10px;
  border: 1px solid var(--border2); border-radius: 100px;
  background: var(--glass-1);
}

/* ─────────────────────────────────────────────
   RESULTS HERO HEADER
───────────────────────────────────────────── */
.results-hero-header {
  text-align: center;
  padding: var(--space-2xl) var(--content-pad) var(--space-lg);
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%; box-sizing: border-box;
}
.results-hero-name {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-size: clamp(2.5rem, 10vw, 5rem);
  font-weight: 400; line-height: 1;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.02em;
}
.results-hero-name em {
  font-style: italic; color: var(--gold);
}
.results-hero-birth {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs); letter-spacing: .08em;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────
   IDENTITY HERO
   Hero header + Fingerprint + Share card в одном
───────────────────────────────────────────── */
.identity-hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--content-pad) var(--space-lg);
  width: 100%; box-sizing: border-box;
}
.identity-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* Имя + дата рождения */
/* DS-04: Hero имя — 3 строки */
.identity-hero-name-block {
  display: flex; flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) 0;
  gap: var(--space-xs);
}
.identity-hero-name {
  font-family: var(--font-serif);
  font-size: var(--t-display);
  font-weight: 400; line-height: var(--lh-display);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-sm);
}
.identity-hero-name em {
  font-style: italic; color: var(--gold);
}
/* 3 строки мета: дата+время / город / страна */
.identity-hero-birth {
  display: flex; flex-direction: column; gap: 3px;
}
.identity-hero-birth-line {
  font-family: var(--font-mono);
  font-size: var(--t-meta); letter-spacing: var(--ls-meta);
  color: var(--text-muted); line-height: var(--lh-meta);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.identity-hero-birth-line--name {
  font-family: var(--font-serif);
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  font-style: italic; color: var(--text-muted); opacity: .6;
}
/* Mobile */
@media (max-width: 640px) {
  .identity-hero-name-block { padding: var(--space-lg) 0 0; }
  .identity-hero-name { font-size: clamp(2.2rem, 8vw, 3.5rem); }
}
.identity-hero-fp {
  background: var(--card3-bg);
  border: 1px solid var(--card3-border);
  border-radius: var(--card3-radius);
  padding: var(--space-xl);
  box-shadow: var(--card3-glow);
  display: flex; flex-direction: column; gap: var(--space-md);
  position: relative; overflow: hidden;
}
/* Subtle gold gradient top edge */
.identity-hero-fp::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-55) 40%, var(--color-gold-55) 60%, transparent);
}
.identity-fp-eyebrow {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--t-label); letter-spacing: var(--ls-label);
  text-transform: uppercase; color: var(--gold); opacity: .8;
}
.identity-fp-title {
  font-family: var(--font-serif);
  font-size: var(--t-hero); line-height: var(--lh-hero);
  font-weight: 400; color: var(--text);
  letter-spacing: -0.01em;
}
.identity-fp-desc {
  font-family: var(--font-sans);
  font-size: var(--t-body); color: var(--text-muted);
  line-height: var(--lh-body);
}
/* Not-self signal */
.identity-fp-signal {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 12px;
  background: var(--color-white-4);
  border: 1px solid var(--card2-border);
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: var(--t-meta); color: var(--text-muted);
  line-height: 1.5;
}
.identity-fp-signal-label {
  font-family: var(--font-mono);
  font-size: var(--t-label); letter-spacing: var(--ls-label);
  text-transform: uppercase; color: var(--text-dim);
  white-space: nowrap; flex-shrink: 0; margin-top: 1px;
}
/* Gift + Shadow */
.identity-fp-chips {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: auto; padding-top: var(--space-md);
  border-top: 1px solid var(--color-gold-10);
}
.identity-fp-gift {
  font-family: var(--font-sans);
  font-size: var(--t-meta); color: var(--gold);
  background: var(--color-gold-8);
  border: 1px solid var(--color-gold-20);
  border-radius: var(--r-sm);
  padding: 6px 12px; display: block;
}
.identity-fp-shadow {
  font-family: var(--font-sans);
  font-size: var(--t-meta); color: var(--text-muted);
  padding: 4px 2px; display: block;
}

/* Mobile: стекой */
@media (max-width: 640px) {
  .identity-hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .identity-hero-name-block { padding: var(--space-lg) 0 0; }
  .identity-hero-name { font-size: clamp(2.2rem, 8vw, 3.5rem); }
}

/* ─────────────────────────────────────────────
   SYSTEMS GRID — 8 карточек систем
   HD + Astro большие (large), остальные малые
───────────────────────────────────────────── */
.systems-grid-section {
  padding: 0 0 var(--space-xl);
}

/* ─── SYNTH CARDS — desktop width constraint ───
   Выравниваем по ширине synthesis-block (820px)
   чтобы карточки и глубокий синтез были одной колонки */
.synth-cards-section {
  border-top: 1px solid var(--card-border);
}
.synth-cards-section .bp-container {
  max-width: 960px;
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-xl);
}
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.cards-grid-cell {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}
/* Карточка занимает всю ширину ячейки */
.cards-grid-cell .synth-card-slot,
.cards-grid-cell .synth-card {
  width: 100%;
}
@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}
.systems-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  width: 100%; box-sizing: border-box;
}

/* sys-tile--large больше не растягивается — оставлен для совместимости */
.sys-tile--large {
  min-height: 120px; /* как обычные */
}

/* params-preview — для всех тайлов с ней */
.sys-tile-params-preview {
  font-family: var(--font-mono);
  font-size: var(--t-meta); letter-spacing: var(--ls-meta);
  color: var(--text-muted); opacity: .5; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Базовая карточка системы */
.sys-tile {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: var(--space-lg);
  display: flex; flex-direction: column; gap: var(--space-sm);
  cursor: pointer; text-align: left;
  transition: background .2s, border-color .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden; box-sizing: border-box;
  min-height: 120px;
}
.sys-tile:hover {
  background: var(--card2-bg);
  border-color: var(--card2-border);
  transform: translateY(-1px);
}
.sys-tile:active { transform: translateY(0); }

/* Цветная полоска слева — акцент системы */
.sys-tile-accent {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: var(--r-lg) 0 0 var(--r-lg);
  opacity: .7;
}

/* Header: иконка + лейбл + лупа */
.sys-tile-header {
  display: flex; align-items: center; gap: 8px;
}
.sys-tile-icon {
  width: 20px; height: 20px; flex-shrink: 0; opacity: .8;
}
.sys-tile-icon svg { width: 100%; height: 100%; }
.sys-tile-label {
  font-family: var(--font-mono);
  font-size: 9px; /* фиксированный — не clamp, иначе схлопывается */
  letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-muted); opacity: .65;
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1;
}
/* Иконка лупы */
.sys-tile-detail-icon {
  color: var(--text-dim); opacity: 0;
  transition: opacity .2s; flex-shrink: 0;
}
.sys-tile:hover .sys-tile-detail-icon { opacity: .5; }

/* Главное значение — serif italic, заметно крупнее лейбла */
.sys-tile-main {
  font-family: var(--font-serif);
  font-size: var(--t-title); line-height: var(--lh-title);
  color: var(--text); font-weight: 400;
  font-style: italic; /* italic добавляет глубины */
  padding-left: 2px;
}
.sys-tile--large .sys-tile-main {
  font-size: clamp(1.3rem, 2.8vw, 1.7rem);
  font-style: italic;
}

/* Preview параметров (только в large) */
.sys-tile-params-preview {
  font-family: var(--font-mono);
  font-size: var(--t-meta); letter-spacing: var(--ls-meta);
  color: var(--text-muted); opacity: .5; line-height: 1.6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Mobile: 2 колонки для всех */
@media (max-width: 640px) {
  .systems-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sys-tile { min-height: 100px; padding: var(--space-md); }
  .sys-tile-main { font-size: var(--t-value); }
}
@media (max-width: 380px) {
  .sys-tile { padding: var(--space-sm) var(--space-md); }
}

/* ─────────────────────────────────────────────
   SYSTEM BOTTOM SHEET
   Мобайл: снизу 85vh. Десктоп: side panel справа
───────────────────────────────────────────── */

/* ─────────────────────────────────────────────
   SPRINT 7.2: COLLAPSED SYNTHESIS
───────────────────────────────────────────── */
.synth-preview--collapsed {
  max-height: 18em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
}
.synth-preview--expanded {
  max-height: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.synth-expand-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-lg);
  padding: 8px 16px;
  background: var(--color-gold-8);
  border: 1px solid var(--color-gold-22);
  border-radius: var(--r);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--duration-normal);
  -webkit-tap-highlight-color: transparent;
}
.synth-expand-btn:hover { background: var(--color-gold-10); }
.synth-expand-icon { transition: transform var(--duration-normal) var(--ease-out); flex-shrink: 0; }

/* ─────────────────────────────────────────────
   TOAST
───────────────────────────────────────────── */
.toast {
  position: fixed; bottom: calc(20px + var(--safe-bottom)); left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--r); padding: 10px 18px;
  font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: .08em;
  color: var(--text); white-space: nowrap;
  opacity: 0; transition: all .3s; z-index: var(--z-loader); pointer-events: none;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─────────────────────────────────────────────
   ERROR + EMPTY STATES
───────────────────────────────────────────── */
.error-block  { text-align: center; padding: 32px 20px; }
.error-icon   { font-size: 28px; color: var(--text-muted); margin-bottom: 12px; }
.error-msg    { font-size: 14px; color: var(--text-2); margin-bottom: 20px; line-height: 1.6; }
.error-retry  {
  padding: 10px 24px; border-radius: var(--r);
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--text); font-size: 14px; cursor: pointer; transition: border-color .2s;
}
.error-retry:hover { border-color: var(--gold); color: var(--gold); }

/* ─────────────────────────────────────────────
   UTILS + ANIMATIONS
───────────────────────────────────────────── */
.mono  { font-family: 'DM Mono', monospace; letter-spacing: .15em; text-transform: uppercase; }
@keyframes fadeIn    { from { opacity: 0; transform: translateY(4px) }  to { opacity: 1; transform: none } }
@keyframes fadeInUp  { from { opacity: 0; transform: translateY(8px) }  to { opacity: 1; transform: translateY(0) } }
@keyframes blink     { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes live-blink{ 0%,100% { opacity: 1 } 50% { opacity: .3 } }

/* ─────────────────────────────────────────────
   TABLET 768+
───────────────────────────────────────────── */
@media (min-width: 768px) {
  header { padding: 18px 40px; }
  .hero  { padding: 100px 40px 80px; }
}

/* ─────────────────────────────────────────────
   DESKTOP 1024+
───────────────────────────────────────────── */
@media (min-width: 1024px) {
  h1 { font-size: 80px; }
  .synth-section-body { font-size: 16px; }
}
