/* astro-compat — оформление страницы разбора совместимости.
   Палитра и правила заданы docs/contract.md §6. */

:root {
  --bg-0: #05060d;
  --bg-1: #0a0c18;
  --bg-2: #111427;
  --gold-1: #f0d79a;
  --gold-2: #c9a35a;
  --violet: #7b6ce0;
  --rose: #d98cab;
  --ice: #8fd0ff;
  --text: #ece9f5;
  --muted: #9d99b5;
  --line: rgba(214, 183, 116, .18);

  --line-soft: rgba(214, 183, 116, .10);
  --glass-top: rgba(255, 255, 255, .055);
  --glass-bottom: rgba(255, 255, 255, .018);
  --shadow-soft: 0 22px 60px -34px rgba(0, 0, 0, .9);
  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1180px;
  --prose: 72ch;
  --ease: cubic-bezier(.22, .72, .26, 1);
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-text: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-symbol: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", var(--font-text);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1100px 620px at 12% -6%, rgba(123, 108, 224, .16), transparent 62%),
    radial-gradient(900px 560px at 88% 4%, rgba(217, 140, 171, .12), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 46%, var(--bg-0) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: .004em;
  overflow-x: hidden;
}

img, svg, canvas, table { max-width: 100%; }
svg { display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: .006em;
  margin: 0;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--gold-1);
  text-decoration: none;
  transition: color .25s var(--ease);
}
a:hover { color: #fff; }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold-1);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: top .3s var(--ease);
}
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- два состояния страницы */

/* Скрывает только класс, который ставит разметка при старте: без JS видны и форма, и разбор.
   Форма и результат — один и тот же набор разделов, меняется лишь ветка расчёта. */
html.js.is-form .app-result,
html.js.is-form .hero__result,
html.js.is-form .nav,
html.js.is-result .form-state { display: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------------- верхнее меню */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(5, 6, 13, .88), rgba(5, 6, 13, .62));
  border-bottom: 1px solid var(--line-soft);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.topbar__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  font-family: var(--font-display);
  font-size: 1.06rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
}
.brand__glyph { color: var(--gold-2); font-size: 1.1rem; letter-spacing: 0; }
.brand:hover { color: var(--gold-1); }

.nav { min-width: 0; flex: 1 1 auto; }

.nav__list {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: flex-end;
}
.nav__list::-webkit-scrollbar { display: none; }

.nav__link {
  display: block;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.nav__link:hover { color: var(--text); border-color: var(--line); }
.nav__link.is-active {
  color: var(--gold-1);
  border-color: var(--line);
  background: rgba(240, 215, 154, .07);
}

/* ---------------------------------------------------------------- шапка/герой */

.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(56px, 11vh, 116px) 0 clamp(48px, 9vh, 96px);
  overflow: hidden;
}

.sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .9;
  pointer-events: none;
}

.hero__halo {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 78%;
  z-index: 0;
  background:
    radial-gradient(52% 60% at 50% 42%, rgba(240, 215, 154, .10), transparent 70%),
    radial-gradient(38% 46% at 22% 30%, rgba(123, 108, 224, .16), transparent 72%);
  pointer-events: none;
  animation: halo 26s ease-in-out infinite alternate;
}

.hero__inner { position: relative; z-index: 1; }

.overline {
  font-size: .78rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 18px;
}

.hero__title {
  font-size: clamp(2.7rem, 8.4vw, 5.6rem);
  line-height: 1.02;
  background: linear-gradient(100deg, #fff 6%, var(--gold-1) 44%, var(--gold-2) 74%, #fff 108%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: sheen 22s linear infinite;
}

.hero__subtitle {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.4vw, 1.5rem);
  color: var(--text);
  letter-spacing: .04em;
}

/* Имя пары появляется только после расчёта — отдельной строкой под заголовком сайта. */
.hero__result { margin-top: clamp(6px, 1.6vw, 14px); }

.hero__pair {
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 1.05;
  background: linear-gradient(100deg, #fff 6%, var(--gold-1) 44%, var(--gold-2) 74%, #fff 108%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: sheen 22s linear infinite;
}
.hero__pair-date { margin-top: 12px; }

.hero__lead {
  margin-top: 18px;
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.badges li {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  color: var(--gold-1);
  font-size: .82rem;
  letter-spacing: .05em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.badges li:hover { border-color: rgba(240, 215, 154, .5); transform: translateY(-2px); }

.hero__stage {
  margin-top: clamp(34px, 6vw, 58px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.signs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.signs__item {
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-align: center;
  transition: border-color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.signs__item:hover {
  border-color: rgba(240, 215, 154, .42);
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.signs__glyph {
  font-family: var(--font-symbol);
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  line-height: 1;
  color: var(--gold-1);
  animation: breathe 7s ease-in-out infinite;
}
.signs__label {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: .04em;
}
.signs__date { margin-top: 4px; color: var(--muted); font-size: .88rem; }

.ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.ring__svg { width: min(300px, 72vw); height: auto; }
.ring__track { fill: none; stroke: rgba(236, 233, 245, .09); stroke-width: 10; }
.ring__value {
  fill: none;
  stroke: var(--gold-1);
  stroke-width: 10;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 10px rgba(240, 215, 154, .45));
}
.ring__num {
  fill: #fff;
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 600;
  text-anchor: middle;
}
.ring__cap {
  fill: var(--muted);
  font-family: var(--font-text);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-anchor: middle;
}
.ring__label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-1);
}
.ring__verdict { max-width: 46ch; color: var(--muted); font-size: .95rem; }

/* ---------------------------------------------------------------- форма расчёта */

.pair-form { margin-top: clamp(28px, 4.4vw, 44px); }

.pair-form__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap: clamp(16px, 2.4vw, 24px);
  align-items: start;
}

.pair-card {
  min-width: 0;
  margin: 0;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  -webkit-backdrop-filter: blur(13px);
  backdrop-filter: blur(13px);
  box-shadow: var(--shadow-soft);
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
}

@media (hover: hover) {
  .pair-card:hover {
    border-color: rgba(240, 215, 154, .34);
    box-shadow: 0 26px 70px -34px rgba(0, 0, 0, .95), 0 0 0 1px rgba(240, 215, 154, .06) inset;
  }
}

.pair-card__legend {
  padding: 0 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-1);
}

.field + .field { margin-top: 16px; }

.field__label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.field__opt {
  font-size: .74rem;
  letter-spacing: .02em;
  text-transform: none;
  opacity: .85;
}

.field__input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font: inherit;
  font-size: .97rem;
  line-height: 1.4;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.field__input:hover { border-color: var(--line); }
.field__input:focus-visible { border-color: rgba(240, 215, 154, .58); background: rgba(255, 255, 255, .06); }
.field__input:disabled { opacity: .42; cursor: not-allowed; }
.field__input[data-invalid="1"] { border-color: rgba(217, 140, 171, .75); background: rgba(217, 140, 171, .08); }
.field__input::placeholder { color: rgba(157, 153, 181, .6); }
.field__input[type="date"], .field__input[type="time"] { font-variant-numeric: tabular-nums; }
select.field__input { cursor: pointer; }

.field__check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  color: var(--muted);
  font-size: .88rem;
  cursor: pointer;
}
.field__check input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-2);
  cursor: pointer;
}

.field__error {
  margin-top: 8px;
  color: var(--rose);
  font-size: .88rem;
}
.field__error[hidden] { display: none; }

.pair-form__error { margin-top: 18px; }

.pair-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: clamp(20px, 3vw, 30px);
}

.pair-form__note {
  max-width: 62ch;
  color: var(--muted);
  font-size: .9rem;
}

.form-status {
  margin-top: 12px;
  color: var(--gold-2);
  font-size: .88rem;
}
.form-status:empty { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.06rem;
  letter-spacing: .05em;
  cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease), color .3s var(--ease);
}
.btn:hover { border-color: rgba(240, 215, 154, .6); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn:disabled { cursor: default; opacity: .55; transform: none; box-shadow: none; }
.btn--primary {
  border-color: rgba(240, 215, 154, .5);
  background: linear-gradient(180deg, rgba(240, 215, 154, .2), rgba(201, 163, 90, .1));
  color: var(--gold-1);
}
.btn--ghost {
  padding: 9px 18px;
  font-family: var(--font-text);
  font-size: .9rem;
  color: var(--muted);
}
.btn--ghost:hover { color: var(--text); }

/* ---------------------------------------------------------------- служебная строка и кнопка возврата */

.result-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 20px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.result-bar--foot {
  margin-top: 10px;
  padding-bottom: 34px;
  border-top: 1px solid var(--line-soft);
}

.service {
  max-width: 78ch;
  padding: 11px 16px;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--gold-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(240, 215, 154, .05);
  color: var(--muted);
  font-size: .92rem;
}
.hero__result .service { margin-top: 24px; }
.service--dim { border-left-color: var(--line); background: none; }
.service[hidden] { display: none; }

/* ---------------------------------------------------------------- секции */

.section {
  position: relative;
  padding: clamp(46px, 8vh, 92px) 0;
}
.section + .section { border-top: 1px solid var(--line-soft); }

.section__head { max-width: 70ch; margin-bottom: clamp(24px, 4vw, 40px); }
.section__kicker {
  font-size: .74rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 12px;
}
.section__title { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
.section__lead { margin-top: 14px; color: var(--muted); }

.section--closing .closing {
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(240, 215, 154, .09), transparent 58%),
    linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  text-align: center;
}
.section--closing .section__head { margin: 0 auto; }
.section--closing .section__lead { margin-top: 18px; }

.stack { display: grid; gap: 18px; }

/* ---------------------------------------------------------------- стекло и карточки */

.glass, .card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  -webkit-backdrop-filter: blur(13px);
  backdrop-filter: blur(13px);
  box-shadow: var(--shadow-soft);
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease), transform .4s var(--ease);
}
.glass { padding: clamp(20px, 3vw, 30px); }
.card { padding: clamp(20px, 3vw, 30px); height: 100%; }

@media (hover: hover) {
  .glass:hover, .card:hover {
    border-color: rgba(240, 215, 154, .34);
    box-shadow: 0 26px 70px -34px rgba(0, 0, 0, .95), 0 0 0 1px rgba(240, 215, 154, .06) inset;
  }
}

.cards {
  display: grid;
  gap: clamp(16px, 2.4vw, 24px);
  align-items: start;
}
.cards--two { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.cards--four { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); margin-top: 22px; }
.cards > * { min-width: 0; }
#method-meta { margin-top: 18px; }
#method-meta > .stack { display: grid; gap: 18px; }

/* ---------------------------------------------------------------- текст */

.prose { max-width: var(--prose); color: var(--text); }
.prose + .prose { margin-top: 14px; }
.prose--muted { color: var(--muted); }
.lead-line { color: var(--muted); font-size: 1.02rem; }

.stub {
  padding: 16px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: .92rem;
  background: rgba(255, 255, 255, .015);
}

.verdict { max-width: 76ch; }
.verdict__headline {
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  color: var(--gold-1);
  margin-bottom: 18px;
}
.verdict__body .prose { color: var(--text); }

.reason {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.reason:hover { border-color: rgba(240, 215, 154, .4); transform: translateY(-3px); }
.reason__title {
  font-family: var(--font-display);
  font-size: 1.24rem;
  color: var(--gold-1);
  margin-bottom: 10px;
}
.reason__text { color: var(--muted); font-size: .96rem; }

.quote {
  margin: 30px 0 0;
  padding: 24px 26px 24px 30px;
  border-left: 2px solid var(--gold-2);
  background: linear-gradient(90deg, rgba(240, 215, 154, .07), transparent 70%);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.8vw, 1.7rem);
  font-style: italic;
  color: var(--gold-1);
  max-width: 62ch;
}

/* ---------------------------------------------------------------- карточка человека */

.person { display: flex; flex-direction: column; gap: 22px; }

.person__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.person__medal {
  width: 76px; height: 76px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 30%, rgba(240, 215, 154, .18), transparent 68%);
  font-family: var(--font-symbol);
  font-size: 2.1rem;
  color: var(--gold-1);
}

.person__name { font-size: clamp(1.5rem, 3vw, 2rem); }
.person__role {
  margin-top: 6px;
  color: var(--gold-2);
  font-size: .84rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.person__date { margin-top: 8px; color: var(--muted); font-size: .92rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0; }
.fact {
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .02);
}
.fact__label {
  display: block;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.fact__value { margin: 0; font-family: var(--font-display); font-size: 1.16rem; color: var(--text); overflow-wrap: anywhere; }
.fact__value--symbol { font-family: var(--font-symbol); color: var(--gold-1); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: var(--text);
  font-size: .84rem;
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.chip:hover { color: #fff; border-color: rgba(240, 215, 154, .45); transform: translateY(-2px); }
.chip__glyph { font-family: var(--font-symbol); font-size: 1rem; }
.chip__num { color: var(--muted); font-variant-numeric: tabular-nums; }

.block-title {
  font-family: var(--font-display);
  font-size: 1.14rem;
  letter-spacing: .04em;
  color: var(--gold-1);
  margin: 0 0 12px;
}

/* ---------------------------------------------------------------- таблица планет */

.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }

.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table caption { text-align: left; padding: 12px 14px 4px; color: var(--muted); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.data-table th, .data-table td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.data-table thead th {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .25s var(--ease); }
.data-table tbody tr:hover { background: rgba(240, 215, 154, .05); }
.data-table .cell-body { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.data-table .glyph { font-family: var(--font-symbol); color: var(--gold-1); font-size: 1.05rem; }
.data-table td.num { font-variant-numeric: tabular-nums; color: var(--text); }
.data-table .dim { color: var(--muted); }
.el-fire { color: var(--rose); }
.el-earth { color: var(--gold-2); }
.el-air { color: var(--ice); }
.el-water { color: var(--violet); }

/* ---------------------------------------------------------------- колесо зодиака */

.wheel { display: grid; place-items: center; }
.wheel__svg { width: min(340px, 84vw); height: auto; }
.w-sector { fill: rgba(255, 255, 255, .022); stroke: none; }
.w-sector--earth { fill: rgba(201, 163, 90, .11); }
.w-sector--air { fill: rgba(143, 208, 255, .09); }
.w-sector--water { fill: rgba(123, 108, 224, .12); }
.w-sector--fire { fill: rgba(217, 140, 171, .10); }
.w-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.w-tick { stroke: rgba(236, 233, 245, .22); stroke-width: 1; }
.w-tick--major { stroke: rgba(214, 183, 116, .5); stroke-width: 1.3; }
.w-sign { font-family: var(--font-symbol); font-size: 15px; fill: var(--gold-2); text-anchor: middle; }
.w-core { fill: rgba(5, 6, 13, .72); stroke: var(--line); stroke-width: 1; }
.w-core-sign { font-family: var(--font-symbol); font-size: 34px; fill: var(--gold-1); text-anchor: middle; }
.w-core-name { font-family: var(--font-text); font-size: 10px; letter-spacing: .2em; fill: var(--muted); text-anchor: middle; }
.w-dot { fill: var(--gold-1); }
.w-link { stroke: rgba(240, 215, 154, .45); stroke-width: 1; }
.w-planet { font-family: var(--font-symbol); font-size: 17px; fill: #fff; text-anchor: middle; dominant-baseline: middle; }
.w-planet--sun { fill: var(--gold-1); }
.w-planet--moon { fill: var(--ice); }
.w-moon-arc { fill: none; stroke: rgba(143, 208, 255, .55); stroke-width: 2; stroke-dasharray: 4 5; stroke-linecap: round; }
.w-moon-cap { font-family: var(--font-text); font-size: 9px; fill: var(--muted); text-anchor: middle; letter-spacing: .12em; }

/* ---------------------------------------------------------------- интервал Луны */

.moon-range {
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(143, 208, 255, .07), transparent 70%);
}
.moon-range__row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; font-size: .94rem; }
.moon-range__label { color: var(--muted); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; }
.moon-range__value { font-variant-numeric: tabular-nums; }
.moon-range__arrow { color: var(--gold-2); }
.moon-range__note { margin-top: 10px; color: var(--muted); font-size: .88rem; }

.strengths { display: grid; gap: 8px; }
.strengths li {
  position: relative;
  padding-left: 20px;
  color: var(--text);
  font-size: .95rem;
}
.strengths li::before {
  content: "✷";
  position: absolute;
  left: 0; top: 0;
  color: var(--gold-2);
  font-size: .8rem;
}

.note-card {
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--ice);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(143, 208, 255, .05);
  color: var(--text);
  font-size: .95rem;
}

/* ---------------------------------------------------------------- полосы и диаграммы */

.meters { display: grid; gap: 14px; }
.meters__group + .meters__group { margin-top: 22px; }
.meter { display: grid; grid-template-columns: minmax(96px, 132px) minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.meter__label { color: var(--muted); font-size: .86rem; }
.meter__track {
  height: 9px;
  border-radius: 999px;
  background: rgba(236, 233, 245, .08);
  overflow: hidden;
}
.meter__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-2), var(--gold-1));
}
.meter__fill.is-filled { width: var(--val, 0%); }
.meter__fill--fire { background: linear-gradient(90deg, #a94f6d, var(--rose)); }
.meter__fill--earth { background: linear-gradient(90deg, #7d6330, var(--gold-2)); }
.meter__fill--air { background: linear-gradient(90deg, #3f7fb0, var(--ice)); }
.meter__fill--water { background: linear-gradient(90deg, #4a3fa0, var(--violet)); }
.meter__fill--cardinal { background: linear-gradient(90deg, var(--gold-2), var(--gold-1)); }
.meter__fill--fixed { background: linear-gradient(90deg, #3f7fb0, var(--ice)); }
.meter__fill--mutable { background: linear-gradient(90deg, #4a3fa0, var(--violet)); }
.meter__value { font-variant-numeric: tabular-nums; color: var(--text); font-size: .9rem; white-space: nowrap; }
.meter__value--dim { color: var(--muted); }

.balance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.balance-card {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .02);
}
.balance-card__title { font-family: var(--font-display); font-size: 1.2rem; color: var(--gold-1); margin-bottom: 10px; }
.balance-card__text { color: var(--muted); font-size: .96rem; }

/* ---------------------------------------------------------------- сферы */

.sphere { display: flex; flex-direction: column; gap: 16px; }
.sphere__head { display: grid; gap: 12px; }
.sphere__top { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.sphere__kicker { color: var(--gold-2); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.sphere__name { font-size: clamp(1.3rem, 2.6vw, 1.66rem); }
.sphere__score { font-family: var(--font-display); font-size: clamp(1.6rem, 3.2vw, 2.1rem); color: var(--gold-1); font-variant-numeric: tabular-nums; }
.sphere__lead { color: var(--muted); font-size: .96rem; }
.sphere__keys { display: grid; gap: 8px; }
.sphere__keys li { position: relative; padding-left: 18px; font-size: .94rem; }
.sphere__keys li::before {
  content: "—";
  position: absolute; left: 0; color: var(--gold-2);
}
.sphere__summary {
  padding: 12px 14px;
  border-left: 2px solid var(--gold-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(240, 215, 154, .05);
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold-1);
}
.sphere__aspects { display: flex; flex-wrap: wrap; gap: 8px; }

.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(236, 233, 245, .08);
  overflow: hidden;
}
.bar__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--gold-1));
  transition: width 1.4s var(--ease);
}
.bar__fill.is-filled { width: var(--val, 0%); }

/* ---------------------------------------------------------------- оглавление и панель инструментов */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.toolbar__note { color: var(--muted); font-size: .9rem; margin-left: auto; }

.btn {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  color: var(--text);
  font-size: .86rem;
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), background .3s var(--ease);
}
.btn:hover { border-color: rgba(240, 215, 154, .5); color: var(--gold-1); transform: translateY(-2px); }

.toc {
  position: sticky;
  top: 58px;
  z-index: 20;
  margin: 0 0 26px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(10, 12, 24, .92), rgba(10, 12, 24, .74));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.toc__title {
  margin: 2px 6px 10px;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.toc__list { display: flex; flex-wrap: wrap; gap: 8px; }

.toc__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: .85rem;
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.toc__link:hover { color: var(--gold-1); border-color: rgba(240, 215, 154, .45); transform: translateY(-2px); }
.toc__count { color: var(--text); font-variant-numeric: tabular-nums; font-size: .78rem; }

/* ---------------------------------------------------------------- группы и записи аспектов */

.group { margin-bottom: 34px; scroll-margin-top: 140px; }
.group__head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: baseline;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.group__name { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.group__meta { color: var(--muted); font-size: .88rem; }

.group__list { display: grid; gap: 12px; }

.aspect {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  -webkit-backdrop-filter: blur(11px);
  backdrop-filter: blur(11px);
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 132px;
  transition: border-color .35s var(--ease);
}
.aspect:hover { border-color: rgba(240, 215, 154, .3); }

.aspect__head {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius);
}

.aspect__glyph {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-family: var(--font-symbol);
  font-size: 1.35rem;
  line-height: 1;
}

.aspect__text { min-width: 0; }
.aspect__title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.3vw, 1.36rem);
  color: var(--text);
}
.aspect__tagline { display: block; margin-top: 4px; color: var(--muted); font-size: .92rem; }
.aspect__nature {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .88;
}
.aspect.q-harmony .aspect__nature { color: var(--gold-1); }
.aspect.q-tension .aspect__nature { color: var(--rose); }
.aspect.q-fusion .aspect__nature { color: var(--violet); }
.aspect.q-adjust .aspect__nature { color: var(--muted); }
.aspect__meta {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .8rem;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.aspect__meta b { color: var(--gold-2); font-weight: 500; }

.aspect__chev {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--gold-2);
  font-size: 1.05rem;
  line-height: 1;
  transition: transform .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.aspect.is-open .aspect__chev { transform: rotate(180deg); border-color: rgba(240, 215, 154, .5); color: var(--gold-1); }

.aspect__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease);
}
.aspect.is-open .aspect__panel { grid-template-rows: 1fr; }
.aspect__inner { overflow: hidden; min-height: 0; }
.aspect__content {
  padding: 4px 18px 20px;
  display: grid;
  gap: 16px;
}
.aspect__body { max-width: var(--prose); }
.aspect__body .prose + .prose { margin-top: 12px; }

.notes { display: grid; gap: 12px; }
.note {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--gold-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(240, 215, 154, .045);
}
.note__label {
  display: block;
  margin-bottom: 6px;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.note__text { color: var(--text); font-size: .96rem; }
.note--caution { border-left-color: var(--rose); background: rgba(217, 140, 171, .06); }
.note--caution .note__label { color: var(--rose); }
.note--proof { border-left-color: var(--ice); background: rgba(143, 208, 255, .05); }
.note--proof .note__label { color: var(--ice); }

.moon-line {
  padding: 13px 16px;
  border: 1px solid rgba(143, 208, 255, .28);
  border-radius: var(--radius-sm);
  background: rgba(143, 208, 255, .05);
  color: var(--text);
  font-size: .93rem;
}
.moon-line__label {
  display: block;
  margin-bottom: 6px;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ice);
}

.power { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.power__label { color: var(--muted); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.power__value { color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.aspect.q-harmony .aspect__glyph { color: var(--gold-1); }
.aspect.q-tension .aspect__glyph { color: var(--rose); }
.aspect.q-fusion .aspect__glyph { color: var(--violet); }
.aspect.q-adjust .aspect__glyph { color: var(--muted); }

.chip.q-harmony { border-color: rgba(240, 215, 154, .34); }
.chip.q-tension { border-color: rgba(217, 140, 171, .34); }
.chip.q-fusion { border-color: rgba(123, 108, 224, .42); }
.chip.q-adjust { border-color: rgba(157, 153, 181, .34); }
.chip.q-harmony .chip__glyph { color: var(--gold-1); }
.chip.q-tension .chip__glyph { color: var(--rose); }
.chip.q-fusion .chip__glyph { color: var(--violet); }
.chip.q-adjust .chip__glyph { color: var(--muted); }

/* ---------------------------------------------------------------- препятствия, метод, финал */

.obstacle { display: grid; gap: 10px; }
.obstacle__title { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold-1); }
.obstacle__text { color: var(--text); font-size: .97rem; }

.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.meta-item {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .02);
}
.meta-item__label {
  display: block;
  margin-bottom: 6px;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.meta-item__value { color: var(--text); font-size: .95rem; }

.accuracy {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(240, 215, 154, .06), transparent 75%);
  color: var(--text);
  font-size: .95rem;
}
.accuracy__label {
  display: block;
  margin-bottom: 8px;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-2);
}

.details {
  margin-top: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .015);
}
.details__summary {
  padding: 12px 16px;
  cursor: pointer;
  color: var(--gold-2);
  font-size: .86rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.details__body { padding: 0 16px 16px; color: var(--muted); font-size: .93rem; max-width: var(--prose); }

.closing__title { font-size: clamp(1.8rem, 4.2vw, 2.7rem); color: var(--gold-1); }
.closing__text { margin-top: 16px; font-family: var(--font-display); font-size: clamp(1.16rem, 2.6vw, 1.5rem); color: var(--text); }

.site-foot { border-top: 1px solid var(--line-soft); padding: 30px 0 44px; }
.site-foot__inner { display: grid; gap: 8px; }
.site-foot__line { color: var(--muted); font-size: .88rem; }
.site-foot__line--dim { opacity: .7; }

.noscript {
  max-width: var(--wrap);
  margin: 0 auto 30px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(240, 215, 154, .06);
  color: var(--text);
}

/* ---------------------------------------------------------------- анимации */

/* Контент виден при выключенном JS: скрывает только класс .js, который ставит страница. */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

html.js .bar__fill,
html.js .meter__fill { transition: width 1.4s var(--ease), background .4s var(--ease); }

html.js .ring__value { transition: stroke-dashoffset 1.8s var(--ease); }

@keyframes halo {
  from { opacity: .55; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: .95; transform: translate3d(0, -2%, 0) scale(1.06); }
}
@keyframes sheen {
  from { background-position: 0% 50%; }
  to { background-position: 220% 50%; }
}
@keyframes breathe {
  0%, 100% { opacity: .82; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* ---------------------------------------------------------------- адаптив */

@media (max-width: 1024px) {
  .hero__stage { grid-template-columns: minmax(0, 1fr); }
  .ring { order: -1; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .topbar__inner { padding: 8px 16px; gap: 12px; flex-wrap: wrap; }
  .nav__list { justify-content: flex-start; }
  .wrap { padding: 0 18px; }
  .toc { position: static; top: auto; }
  .group { scroll-margin-top: 88px; }
}

@media (max-width: 640px) {
  .cards--two, .cards--four { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 40px; }
  .person__head { grid-template-columns: minmax(0, 1fr); }
  .person__medal { width: 62px; height: 62px; font-size: 1.7rem; }
  .toolbar__note { margin-left: 0; width: 100%; }

  /* таблица планет превращается в список */
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .data-table tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
  }
  .data-table tbody tr:last-child { border-bottom: 0; }
  .data-table td { border: 0; padding: 3px 0; }
  .data-table td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 96px;
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
  }
  .table-wrap { overflow: visible; border: 0; }
  .meter { grid-template-columns: minmax(0, 1fr) auto; }
  .meter__track { grid-column: 1 / -1; order: 3; }

  /* Палец не мышь: минимальная цель — 44 px по высоте. */
  .btn { min-height: 44px; }
  .field__check { min-height: 44px; }
  .aspect__head { grid-template-columns: auto minmax(0, 1fr); padding: 14px; align-items: start; }
  .aspect__glyph { margin-top: 2px; }
  .aspect__chev { grid-column: 2; justify-self: end; }
  .aspect__content { padding: 4px 14px 18px; }
}

@media (max-width: 400px) {
  .wrap { padding: 0 14px; }
  .overline { letter-spacing: .2em; font-size: .72rem; }
  .badges li { font-size: .76rem; padding: 7px 12px; }
  .signs { grid-template-columns: minmax(0, 1fr); }
  .meter__label { font-size: .8rem; }
  .pair-form__actions .btn { width: 100%; }
  .result-bar .btn { width: 100%; }
}

/* ---------------------------------------------------------------- печать */

@media print {
  :root {
    --bg-0: #ffffff; --bg-1: #ffffff; --bg-2: #f4f4f6;
    --gold-1: #6b4f13; --gold-2: #8a6a22; --violet: #4b3fa5;
    --rose: #93405c; --ice: #2f6a99;
    --text: #14141a; --muted: #4c4c58;
    --line: rgba(20, 20, 26, .22);
    --line-soft: rgba(20, 20, 26, .12);
    --glass-top: rgba(255, 255, 255, 1); --glass-bottom: rgba(248, 248, 250, 1);
    --shadow-soft: none;
  }

  html, body {
    background: #fff;
    color: var(--text);
    font-size: 11.5pt;
  }

  .sky, .hero__halo, .topbar, .skip, .noscript, .toc, .toolbar, .site-foot { display: none !important; }

  /* Печатается разбор, а не форма: поля и кнопки в PDF не нужны, служебная строка остаётся. */
  .pair-form, .form-status, .result-bar .btn { display: none !important; }

  body, .glass, .card, .aspect, .reason, .note, .moon-range, .section--closing .closing,
  .balance-card, .meta-item, .accuracy, .details, .moon-line, .service {
    background: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }

  .hero { padding: 0 0 18pt; border-bottom: 1px solid var(--line); }
  .hero__title, .hero__pair {
    background: none !important;
    -webkit-text-fill-color: currentColor;
    color: var(--text) !important;
  }
  .hero__title, .hero__pair, .section__title, .closing__title { animation: none !important; }
  .signs__glyph, .hero__halo { animation: none !important; }

  .reveal, html.js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .page-1, .hero, .section { break-inside: auto; }
  .section { break-before: page; }
  .hero { break-before: avoid; }

  .aspect, .card, .reason, .note, .sphere, .obstacle, .fact, .moon-range, .balance-card {
    break-inside: avoid;
  }

  .aspect__panel, html.js .aspect__panel {
    grid-template-rows: 1fr !important;
    transition: none !important;
  }
  .aspect__chev { display: none; }
  .aspect__head { cursor: default; }

  .bar, .meter__track { border: 1px solid var(--line); background: #fff !important; }
  .bar__fill, .meter__fill {
    transition: none !important;
    width: var(--val, 0%) !important;
    background: var(--gold-2) !important;
  }
  .ring__value { stroke: var(--gold-2) !important; transition: none !important; filter: none !important; }
  .ring__num { fill: var(--text) !important; }
  .ring__cap { fill: var(--muted) !important; }

  .w-sector, .w-sector--earth, .w-sector--air, .w-sector--water, .w-sector--fire { fill: #fff !important; }
  .w-tick, .w-tick--major, .w-ring { stroke: var(--line) !important; }
  .w-sign, .w-planet, .w-core-sign { fill: var(--text) !important; }
  .w-moon-arc { stroke: var(--muted) !important; }
  .w-core { fill: #fff !important; }

  a { color: var(--text); text-decoration: none; }
}

/* ---------------------------------------------------------------- вырезы на телефонах
   В альбомной ориентации у айфонов с вырезом контент уезжал бы под него: env() отдаёт
   безопасные отступы, max() оставляет прежнее значение там, где выреза нет. */
@supports (padding: max(0px)) {
  .wrap, .topbar__inner {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }

  @media (max-width: 860px) {
    .topbar__inner {
      padding-left: max(16px, env(safe-area-inset-left));
      padding-right: max(16px, env(safe-area-inset-right));
    }
  }

  @media (max-width: 400px) {
    .wrap {
      padding-left: max(14px, env(safe-area-inset-left));
      padding-right: max(14px, env(safe-area-inset-right));
    }
  }
}

/* ---------------------------------------------------------------- iOS: поля даты и времени
   WebKit навязывает нативным date/time собственную геометрию: ширина считается вместе с
   padding, поэтому поле выезжает за карточку и тянет горизонтальную прокрутку страницы.
   appearance: none возвращает контрол к обычным правилам; выбор даты по нажатию работает.
   Правило включается только на iOS (@supports с -webkit-touch-callout), остальные браузеры
   не затрагивает. */
@supports (-webkit-touch-callout: none) {
  .field__input[type="date"],
  .field__input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}
