:root {
  color-scheme: dark;
  --bg: #15161b;
  --raise: #22232a;
  --raise-2: #2a2a31;
  --ink: #f6f1e7;
  --muted: #b9afa2;
  --gold: #e0c48a;
  --gold-dim: #8c7040;
  --gold-glow: rgba(224, 196, 138, 0.35);
  --line: #3a362e;
  --field: #101116;
  --danger: #f0b4a8;
  --ok: #b9e0a8;
  --kb: 0px;
  --gap: 0.75rem;
  --btn-h: 50px;
  /* Высота нижней панели действий: кнопка + отступы. Контент никогда не уходит под неё. */
  --dock-pad: 0.85rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

body {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(224, 196, 138, 0.10), transparent 60%),
    radial-gradient(90% 50% at 100% 100%, rgba(120, 90, 160, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

.shell {
  width: min(100%, 30rem);
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0.6rem 1rem var(--kb);
  overflow-x: clip;
}

#screen {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Дети экрана не сжимаются: кнопки и поля не наезжают друг на друга при нехватке высоты. */
#screen > * { flex-shrink: 0; }

#screen.is-arriving { animation: screen-in 0.36s cubic-bezier(.2, .7, .2, 1) both; }

.topbar {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 2.25rem;
  margin: 0 0 0.6rem;
}

.nav-back {
  appearance: none;
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  font-size: 1rem;
  padding: 0.4rem 0.2rem;
  min-height: 2.25rem;
}

.demo-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0 0 0 auto;
  color: var(--gold);
  font-size: 0.9rem;
  line-height: 1.3;
}

.chip {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(224, 196, 138, 0.07);
  white-space: nowrap;
}

.chip:empty { display: none; }

.demo-sep { white-space: pre; }

#reset-demo {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.hint, .panel-help, .panel-status, .panel-key {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.center { text-align: center; }

h1, h2, .section-title {
  font-family: Georgia, "Iowan Old Style", Palatino, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6rem;
}

h1 { font-size: 2.3rem; letter-spacing: 0.02em; }
h2 { font-size: 1.5rem; }

.section-title {
  margin: 1.4rem 0 0.7rem;
  font-size: 1.05rem;
  color: var(--gold);
}

.screen-sub { margin: -0.2rem 0 1rem; }

.lead, .prose {
  margin: 0 0 1rem;
  line-height: 1.55;
  font-size: 1.04rem;
}

.prose { white-space: pre-wrap; }

/* ── Кнопки и раскладка действий ── */

.stack, .actions {
  display: grid;
  gap: var(--gap);
}

.actions { margin-top: 1.25rem; }

.dock {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  gap: var(--gap);
  margin: auto -1rem 0;
  padding: 1.4rem 1rem calc(var(--dock-pad) + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 0, var(--bg) 72%, transparent);
}


.btn {
  appearance: none;
  width: 100%;
  min-height: var(--btn-h);
  border-radius: 14px;
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, #ecd5a2, var(--gold));
  color: #241c10;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: center;
  box-shadow: 0 6px 20px rgba(224, 196, 138, 0.18);
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  font-weight: 500;
  box-shadow: none;
}

.btn:focus-visible, .back:focus-visible, select:focus-visible, textarea:focus-visible,
input:focus-visible, .tile:focus-visible, .spread-btn:focus-visible, .history-item:focus-visible,
.sign-chip:focus-visible, .nav-back:focus-visible, .lang-switch-btn:focus-visible, .lang-switch-menu button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── Главная ── */

.home-head { text-align: center; }
.home-hello { margin: 0.2rem 0 0.1rem; color: var(--muted); font-size: 0.98rem; }
.home-head h1 { margin: 0; }

.home-sub {
  margin: 0.2rem 0 0;
  color: var(--gold);
  font-size: 1.05rem;
  line-height: 1.35;
}

.home-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(9rem, 26svh, 14rem);
  margin: 0.4rem 0 0.8rem;
}

.home-deck {
  position: relative;
  width: clamp(5.8rem, 17svh, 8.2rem);
  aspect-ratio: 2 / 3;
  animation: deck-float 4.8s ease-in-out infinite alternate;
}

.home-deck::before {
  content: "";
  position: absolute;
  inset: -22% -14%;
  background: radial-gradient(circle at 50% 58%, rgba(224, 196, 138, 0.65), transparent 62%);
  filter: blur(18px);
  z-index: 0;
  animation: deck-glow 4.8s ease-in-out infinite alternate;
  pointer-events: none;
}

.deck-card {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid #7d6c50;
  background: radial-gradient(circle at 50% 42%, #3a342c 0, #16171b 72%);
  color: var(--gold);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.38);
  transform: translate(calc(var(--d) * 8px - 8px), calc(var(--d) * -9px + 9px)) rotate(calc(var(--d) * 4deg - 4deg));
  z-index: calc(var(--d) + 1);
}

.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px 2px var(--gold-glow);
  opacity: 0;
  animation: twinkle 3s ease-in-out infinite;
  animation-delay: var(--t);
}

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

.tile {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  min-height: 6.4rem;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--raise-2), var(--raise));
  color: var(--ink);
  font: inherit;
  text-align: left;
  transition: transform 0.12s ease, border-color 0.2s ease;
}

.tile:active { transform: scale(0.97); border-color: var(--gold-dim); }

.tile-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  min-height: 4.6rem;
  border-color: var(--gold-dim);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(224, 196, 138, 0.22), transparent 55%),
    linear-gradient(160deg, #2f2a22, var(--raise));
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  border-radius: 12px;
  background: rgba(224, 196, 138, 0.12);
  color: var(--gold);
}

.tile-icon svg { width: 1.35rem; height: 1.35rem; }
.tile-wide .tile-icon { width: 2.8rem; height: 2.8rem; }

.tile-text { display: grid; gap: 0.15rem; min-width: 0; }
.tile-text strong { font-size: 1.02rem; }
.tile-text span { color: var(--muted); font-size: 0.84rem; line-height: 1.3; }
.tile-wide .tile-text strong { font-size: 1.15rem; color: var(--gold); }

/* ── Список раскладов ── */

.spread-list { display: grid; gap: 0.65rem; }

.spread-btn {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 4.2rem;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--raise);
  color: var(--ink);
  font: inherit;
  text-align: left;
  transition: transform 0.12s ease, border-color 0.2s ease;
}

.spread-btn:active { transform: scale(0.98); border-color: var(--gold-dim); }

.spread-count {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.3rem;
  height: 3.2rem;
  border-radius: 8px;
  border: 1px solid var(--gold-dim);
  background: radial-gradient(circle at 50% 42%, #3a342c 0, #16171b 80%);
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 1.05rem;
}

.spread-text { display: grid; gap: 0.2rem; flex: 1; min-width: 0; }
.spread-text strong { color: var(--gold); font-size: 1.02rem; }
.spread-text span { color: var(--muted); font-size: 0.9rem; line-height: 1.3; }
.spread-arrow { color: var(--muted); font-size: 1.5rem; }

/* ── Формы ── */

label.field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.field-label { color: var(--muted); font-size: 0.92rem; }
.field-help { color: var(--muted); font-size: 0.8rem; opacity: 0.85; }

textarea, select, input[type="text"], input[type="date"], input[type="time"] {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.8rem;
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

input::-webkit-calendar-picker-indicator { filter: invert(0.8) sepia(0.6); }

textarea { min-height: 7.5rem; resize: vertical; line-height: 1.45; }

.form { display: grid; gap: 0.95rem; margin-top: 1rem; }
.form-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0.7rem; }
/* Время + часовой пояс: поясу нужно место под «Europe/Moscow», «America/Sao_Paulo»; длинные — с многоточием. */
.form-row.tz-row { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); }
/* Имя + пол: полю пола нужно место под «No indicado» / «Não informado» (es/pt длиннее «Не указан»). */
.form-row.name-sex-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.name-sex-row select { padding-left: 0.7rem; padding-right: 1.7rem; text-overflow: ellipsis; }
.tz-input { text-overflow: ellipsis; font-size: 0.95rem; }

.form-status { margin: 0; min-height: 1.2em; text-align: center; color: var(--muted); font-size: 0.92rem; }
.form-status:empty { display: none; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-error { color: var(--danger); }

.profile-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid var(--gold-dim);
  background: radial-gradient(120% 140% at 0% 0%, rgba(224, 196, 138, 0.18), transparent 55%), var(--raise);
}

.profile-glyph {
  display: grid;
  place-items: center;
  flex: none;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 1.7rem;
  box-shadow: 0 0 18px var(--gold-glow);
}

.profile-meta { display: grid; gap: 0.15rem; min-width: 0; }
.profile-meta strong { font-size: 1.15rem; }
.profile-meta span { color: var(--muted); font-size: 0.92rem; }
.profile-meta .profile-access { color: var(--gold); }
.profile-meta .profile-access-note { font-size: 0.82rem; line-height: 1.35; }
.profile-meta .profile-tariffs { justify-self: start; padding: 0.15rem 0; font-size: 0.85rem; }

.invite-entry {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border-radius: 18px;
  border: 1px solid var(--gold-dim);
  background: radial-gradient(120% 140% at 100% 0%, rgba(224, 196, 138, 0.16), transparent 55%), var(--raise);
}
.invite-entry strong { display: block; font-size: 1.02rem; }
.invite-entry span { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }
.invite-entry .tile-icon { flex: none; }

.invite-hero {
  position: relative;
  overflow: hidden;
  padding: 1.15rem 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid var(--gold-dim);
  background: radial-gradient(120% 140% at 0% 0%, rgba(224, 196, 138, 0.2), transparent 58%), var(--raise);
}
.invite-hero p { margin: 0.4rem 0 0; color: var(--muted); line-height: 1.45; }
.invite-hero .sparkles { inset: 0; }

.invite-link-box {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.45rem 0.45rem 0.45rem 0.85rem;
  border-radius: 16px;
  border: 1px solid var(--gold-dim);
  background: var(--raise);
}
.invite-link-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 0.88rem;
  padding: 0.35rem 0;
}
.invite-link-box input:focus { outline: none; }

.invite-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}
.invite-stat {
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-radius: 16px;
  border: 1px solid var(--gold-dim);
  background: var(--raise);
}
.invite-stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.invite-stat span { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.8rem; }

.invite-actions { margin-top: 1rem; }
.invite-copied { color: var(--ok); text-align: center; min-height: 1.2em; }

.counter {
  margin: 0.2rem 0 0.8rem;
  font-size: 1.35rem;
  color: var(--gold);
}

.backs-head { margin-bottom: 0.2rem; }

.fan-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  min-height: 16rem;
}

.slots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
}

.slots[data-count="10"] {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem 0.3rem;
}

.slot { width: 4.75rem; }
.slots[data-count="10"] .slot { width: auto; }
.slots[data-count="1"] .slot,
.slots[data-count="2"] .slot { width: 5.4rem; }

.slot-well {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  border: 1px dashed rgba(224, 196, 138, 0.6);
  background: rgba(224, 196, 138, 0.05);
}

.slot-well.is-filled {
  border-style: solid;
  border-color: var(--gold);
  background: radial-gradient(circle at 50% 42%, #34302a 0, #1b1c20 72%);
  color: var(--gold);
  box-shadow: 0 0 0 1px rgba(224, 196, 138, 0.35);
}

.slot-label {
  display: block;
  margin-top: 0.28rem;
  text-align: center;
  color: var(--gold);
  font-size: 0.72rem;
  line-height: 1.2;
}

.slots[data-count="10"] .slot-label { font-size: 0.62rem; }

.slot-hit {
  appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
}

.fan {
  position: relative;
  width: 100%;
  margin-top: 8px;
  aspect-ratio: 1 / 0.56;
  overflow: hidden;
}

.back {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 30%;
  margin-left: -15%;
  aspect-ratio: 2 / 3;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--gold);
  padding: 0;
  min-height: 0;
  appearance: none;
  touch-action: manipulation;
  transform-origin: 50% 100%;
  transform: rotate(var(--angle));
  transition: transform 0.42s cubic-bezier(.22, .7, .2, 1);
  z-index: var(--z, 1);
}

.back-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  border: 1px solid #5c5346;
  background: radial-gradient(circle at 50% 42%, #34302a 0, #1b1c20 72%);
  color: inherit;
  transition: transform 0.16s cubic-bezier(.22, .7, .2, 1);
}

.back.is-entering {
  transition: none;
  animation: fan-in 0.62s cubic-bezier(.16, .84, .24, 1) both;
  animation-delay: calc(var(--i) * 28ms);
}

.back:hover,
.back:focus-visible,
.back.is-preview {
  z-index: 80;
}

.back:hover .back-face,
.back:focus-visible .back-face,
.back.is-preview .back-face {
  transform: translateY(-24px);
}

.back.is-dealt,
.back.is-dealt:hover,
.back.is-dealt.is-preview {
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}

.flyer {
  position: fixed;
  bottom: auto;
  margin: 0;
  z-index: 80;
  pointer-events: none;
  animation: none;
}

.back-art {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.back-art svg { width: 68%; height: 68%; }



/* ── Экран ожидания ── */

.oracle-screen {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 60svh;
  text-align: center;
}

.oracle-screen.is-small { min-height: 40svh; }

.oracle {
  position: relative;
  width: 13rem;
  height: 13rem;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.is-small .oracle { width: 9rem; height: 9rem; margin-bottom: 0.4rem; }

.oracle::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 196, 138, 0.45), transparent 65%);
  filter: blur(14px);
  animation: deck-glow 2.4s ease-in-out infinite alternate;
}

.oracle-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(224, 196, 138, 0.45);
  animation: spin 18s linear infinite;
}

.oracle-ring-2 {
  inset: 9%;
  border-style: solid;
  border-color: rgba(224, 196, 138, 0.18);
  border-top-color: var(--gold);
  animation-duration: 3.2s;
}

.oracle-cards { position: relative; width: 4.6rem; aspect-ratio: 2 / 3; }
.is-small .oracle-cards { width: 3.4rem; }

.oracle-card {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid #7d6c50;
  background: radial-gradient(circle at 50% 42%, #3a342c 0, #16171b 72%);
  color: var(--gold);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45), 0 0 14px rgba(224, 196, 138, 0.15);
  animation: shuffle 2.4s cubic-bezier(.45, .05, .35, 1) infinite;
  animation-delay: calc(var(--k) * -0.8s);
}

.oracle-title { margin: 0.4rem 0 0; color: var(--gold); }

.oracle-phrase {
  margin: 0.2rem 0 0;
  color: var(--ink);
  font-size: 1.05rem;
  min-height: 1.5em;
}

.oracle-phrase.is-fresh { animation: fade-up 0.5s ease both; }

/* ── Результат ── */

.result-question {
  margin: -0.2rem 0 1rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.45;
}

.stamp { margin: 0 0 0.5rem; font-size: 0.85rem; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 0.5rem;
  align-items: start;
}

.result-grid[data-count="1"] { grid-template-columns: minmax(0, 11rem); justify-content: center; }
.result-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 9rem)); justify-content: center; }
.result-grid[data-count="10"] { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.6rem 0.3rem; }

.pos-block h3,
.summary-card h3,
.reading-block h3,
.tip-card h3 {
  margin: 0 0 0.35rem;
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: var(--gold);
}

.result-grid[data-count="10"] .pos-block h3 { font-size: 0.6rem; min-height: 2.5em; }

.flip {
  width: 100%;
  margin: 0 0 0.35rem;
  perspective: 700px;
}

.flip-inner {
  width: 100%;
  animation: flip-in 0.6s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i) * 0.16s);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 18px rgba(224, 196, 138, 0.12);
}

.card-face {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3.4;
  object-fit: cover;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 42%, #3a342c 0, #16171b 72%);
}

.card-face.is-reversed { transform: rotate(180deg); }
.card-face.is-missing { border: 1px solid var(--gold-dim); }

.name, .ori {
  margin: 0.12rem 0;
  text-align: center;
  line-height: 1.3;
}

.name { font-size: 0.8rem; }
.ori { color: var(--muted); font-size: 0.7rem; }
.result-grid[data-count="10"] .name { font-size: 0.62rem; }
.result-grid[data-count="10"] .ori { display: none; }

.reading-list { display: grid; gap: 0.7rem; }

.reading-block, .summary-card, .tip-card, .notice-card, .horo-card {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--raise);
}

.result.is-fresh .reading-block,
.result.is-fresh .summary-card {
  animation: fade-up 0.5s ease both;
  animation-delay: calc(min(var(--i), 6) * 0.12s + 0.2s);
}

.reading-block h3 { margin: 0 0 0.15rem; text-align: left; font-size: 0.98rem; }

.reading-card {
  margin: 0 0 0.4rem;
  color: var(--gold);
  font-size: 0.95rem;
}

.reading-block .prose { margin: 0; font-size: 0.98rem; }

.summary-card, .tip-card {
  margin-top: 1.2rem;
  border-color: var(--gold-dim);
  background: radial-gradient(130% 120% at 0% 0%, rgba(224, 196, 138, 0.14), transparent 60%), #241f17;
}

.summary-card h3, .tip-card h3 { text-align: left; font-size: 1.08rem; margin-bottom: 0.5rem; }
.summary-card .prose, .tip-card .prose { margin-bottom: 0.2rem; font-size: 1.02rem; }

.notice-card { margin-top: 0.4rem; }
.notice-card .lead:last-child { margin-bottom: 0; }

/* ── История ── */

.history-list { display: grid; gap: 0.65rem; }

.history-item {
  appearance: none;
  display: grid;
  gap: 0.3rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--raise);
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.history-item:active { border-color: var(--gold-dim); }
.history-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.history-top strong { color: var(--gold); }
.history-top time { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.history-q { font-style: italic; }
.history-cards { color: var(--gold); font-size: 0.85rem; opacity: 0.85; }
.history-preview {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Гороскоп и совет дня ── */

.horo-card { border-color: var(--gold-dim); }
.horo-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem; }
.horo-head strong { display: block; font-family: Georgia, serif; font-size: 1.3rem; color: var(--gold); }
.horo-head .hint { margin: 0; font-size: 0.85rem; }

.horo-glyph {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 1.6rem;
  box-shadow: 0 0 18px var(--gold-glow);
  animation: deck-glow 3s ease-in-out infinite alternate;
}

.horo-par { animation: fade-up 0.5s ease both; animation-delay: calc(var(--i) * 0.12s); }
.horo-par:last-child { margin-bottom: 0; }

.sign-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.sign-chip {
  appearance: none;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  min-height: 3.6rem;
  padding: 0.45rem 0.2rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--raise);
  color: var(--ink);
  font: inherit;
  font-size: 0.74rem;
}

.sign-chip.is-active { border-color: var(--gold); background: rgba(224, 196, 138, 0.14); color: var(--gold); }
.sign-glyph { font-size: 1.2rem; color: var(--gold); }

.advice-stage { display: grid; justify-items: center; margin: 0.4rem 0 0.2rem; }
.advice-card { width: min(46vw, 11rem); }
.advice-card .flip-inner { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 30px rgba(224, 196, 138, 0.25); }
.advice-name { font-size: 1rem; color: var(--gold); margin-top: 0.3rem; }

.more {
  margin-top: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--raise);
}

.more summary { cursor: pointer; color: var(--gold); }
.more .prose { margin: 0.6rem 0 0; font-size: 0.98rem; }
.more .reading-card { margin: 0.6rem 0 0; }

.accepted {
  margin: 0 0 0.4rem;
  color: var(--gold);
  font-weight: 700;
}

.warn { color: var(--danger); }

.panel {
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.panel summary { cursor: pointer; color: var(--gold); }
.panel-field { display: grid; gap: 0.35rem; margin-top: 0.8rem; }
.panel-actions { display: grid; gap: 0.5rem; margin-top: 0.8rem; }
.panel-key code { color: var(--ink); overflow-wrap: anywhere; }

@keyframes fan-in {
  from { transform: rotate(0deg); }
  to { transform: rotate(var(--angle)); }
}

@keyframes deck-float {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

@keyframes deck-glow {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

@keyframes flip-in {
  from { transform: rotateY(92deg); opacity: 0.4; }
  to { transform: rotateY(0deg); opacity: 1; }
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 0.9; transform: scale(1); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes shuffle {
  0% { transform: translateX(0) rotate(0deg); z-index: 3; }
  25% { transform: translateX(-62%) rotate(-12deg); z-index: 3; }
  50% { transform: translateX(0) rotate(0deg); z-index: 1; }
  75% { transform: translateX(62%) rotate(12deg); z-index: 1; }
  100% { transform: translateX(0) rotate(0deg); z-index: 3; }
}

/* Узкие телефоны (до 360 px): плотнее сетки и шрифты. */
@media (max-width: 360px) {
  .shell { padding-left: 0.75rem; padding-right: 0.75rem; }
  .dock { margin-left: -0.75rem; margin-right: -0.75rem; padding-left: 0.75rem; padding-right: 0.75rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.32rem; }
  .tile { min-height: 5.8rem; padding: 0.75rem; }
  .tile-text span { font-size: 0.78rem; }
  .form-row, .form-row.tz-row { grid-template-columns: minmax(0, 1fr); }
  .sign-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-height: 640px) {
  .home-stage { height: 9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .flip-inner,
  .back,
  .back-face,
  .home-deck,
  .home-deck::before,
  .oracle-card,
  .oracle-ring,
  .oracle::before,
  .sparkles span,
  #screen.is-arriving,
  .result.is-fresh .reading-block,
  .result.is-fresh .summary-card,
  .horo-par,
  .horo-glyph { animation: none; transition: none; }
}

/* Последний блок экрана без нижней панели отстоит от края с учётом безопасной зоны. */
#screen > :last-child:not(.dock) { margin-bottom: calc(1.2rem + env(safe-area-inset-bottom)); }

/* Структурная трактовка: ответ сверху, итог с шагами снизу */
.answer-card .answer { font-size: 1.08rem; line-height: 1.5; }
.summary-card .verdict { font-weight: 600; }
.areas { margin: 0.6rem 0 0.2rem; display: grid; gap: 0.35rem; }
.areas dt { color: var(--gold); font-size: 0.86rem; }
.areas dd { margin: 0 0 0.25rem; line-height: 1.45; }
.steps-title { margin: 0.7rem 0 0.3rem; color: var(--gold); font-size: 0.92rem; }
.steps { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.4rem; line-height: 1.45; }
.steps li::marker { color: var(--gold); }
.term { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.95rem; }
.term span { color: var(--gold); }
.horo-label { color: var(--gold); font-weight: 600; }

/* ── Натальная карта ── */

.tile-natal {
  border-color: rgba(127, 179, 230, 0.45);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(127, 179, 230, 0.18), transparent 55%),
    radial-gradient(120% 140% at 0% 100%, rgba(224, 196, 138, 0.12), transparent 60%),
    linear-gradient(160deg, #23252f, var(--raise));
}
.tile-natal .tile-icon { background: rgba(127, 179, 230, 0.14); color: #b9d4f0; }
.tile-natal .tile-icon svg { animation: spin 40s linear infinite; }
.tile-natal.tile-wide .tile-text strong { color: #cfe0f4; }

.natal-intro { margin-bottom: 0.2rem; }
.natal-form { margin-top: 0.8rem; }
.check-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.95rem;
}
.check-row input { width: 1.25rem; height: 1.25rem; accent-color: var(--gold); margin: 0; }
.natal-unknown-help { margin: -0.5rem 0 0; }
input[type="time"]:disabled { opacity: 0.45; }

.place-field { position: relative; }
.place-picked { margin-top: 0.1rem; }
.place-picked.is-ok { color: var(--ok); }
.place-suggest { display: grid; gap: 0.4rem; margin-top: -0.4rem; }
.place-suggest:empty { display: none; }
.place-option {
  appearance: none;
  display: grid;
  gap: 0.1rem;
  text-align: left;
  padding: 0.6rem 0.8rem;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--raise);
  color: var(--ink);
  font: inherit;
}
.place-option:active { border-color: var(--gold-dim); }
.place-option strong { font-size: 0.98rem; font-weight: 600; }
.place-option span { color: var(--muted); font-size: 0.8rem; }
.place-empty { margin: 0; color: var(--muted); font-size: 0.88rem; }
.natal-free { margin-top: 0.6rem; }
.natal-attr { opacity: 0.7; font-size: 0.75rem; margin-top: 0.4rem; }

.natal-confirm { border-color: var(--gold-dim); }
.natal-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem 0.9rem; margin: 0; }
.natal-facts dt { color: var(--muted); font-size: 0.86rem; padding-top: 0.08rem; }
.natal-facts dd { margin: 0; font-size: 0.96rem; overflow-wrap: anywhere; }
.natal-warn { margin: 0.8rem 0 0; font-size: 0.9rem; line-height: 1.45; }
.natal-confirm-actions { display: grid; gap: 0.6rem; }

.natal-loader { width: 9rem; height: 9rem; margin: 0 auto 0.4rem; }
.natal-loader svg { width: 100%; height: 100%; overflow: visible; }
.natal-loader .nl-ring { fill: none; stroke: var(--gold-dim); stroke-width: 1; stroke-dasharray: 3 5; transform-origin: 60px 60px; animation: spin 18s linear infinite; }
.natal-loader .nl-ring-2 { stroke: rgba(127, 179, 230, 0.55); animation-duration: 11s; animation-direction: reverse; }
.natal-loader text { fill: var(--gold); font-size: 11px; text-anchor: middle; dominant-baseline: central; animation: nl-blink 2.4s ease-in-out infinite; animation-delay: calc(var(--k) * 0.2s); }
@keyframes nl-blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.natal-loader .nl-sun { fill: var(--gold); filter: drop-shadow(0 0 6px var(--gold)); animation: deck-glow 1.2s ease-in-out infinite alternate; }

.natal-meta { margin: -0.3rem 0 0.8rem; text-align: center; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.natal-big3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.9rem; }
.big3-chip {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--raise);
}
.big3-label { display: flex; align-items: center; gap: 0.3rem; color: var(--muted); font-size: 0.74rem; }
.big3-glyph { color: var(--gold); font-size: 0.9rem; font-weight: 700; }
.big3-chip strong { font-size: 0.92rem; font-weight: 600; white-space: nowrap; }

.natal-wheel-wrap { width: min(100%, 26rem); margin: 0 auto; aspect-ratio: 1; }
.natal-wheel { width: 100%; height: 100%; display: block; overflow: visible; }
.natal-wheel text { dominant-baseline: central; text-anchor: middle; font-family: inherit; }
.nw-sign { stroke: #3a362e; stroke-width: 0.6; }
.nw-sign.nw-fire { fill: rgba(226, 115, 95, 0.10); }
.nw-sign.nw-earth { fill: rgba(185, 224, 168, 0.08); }
.nw-sign.nw-air { fill: rgba(224, 196, 138, 0.09); }
.nw-sign.nw-water { fill: rgba(127, 179, 230, 0.10); }
.nw-sign-glyph { font-size: 15px; }
.nw-sign-glyph.nw-fire { fill: #eea08f; }
.nw-sign-glyph.nw-earth { fill: #b9e0a8; }
.nw-sign-glyph.nw-air { fill: #e0c48a; }
.nw-sign-glyph.nw-water { fill: #9cc5ee; }
.nw-tick { stroke: #8c7040; stroke-width: 0.6; }
.nw-ring { fill: none; stroke: #8c7040; stroke-width: 0.9; }
.nw-ring-soft { stroke: #3a362e; }
.nw-cusp { stroke: #5a5244; stroke-width: 0.7; }
.nw-cusp.nw-axis { stroke: var(--gold); stroke-width: 1.4; }
.nw-house-num { fill: var(--muted); font-size: 9px; }
.nw-axis-label { fill: var(--gold); font-size: 9px; font-weight: 700; letter-spacing: 0.04em; }
.nw-aspect { stroke-linecap: round; opacity: 0.85; }
.nw-aspect.is-uncertain { stroke-dasharray: 3 3; opacity: 0.6; }
.nw-planet-tick { stroke: var(--ink); stroke-width: 1.2; }
.nw-planet-lead { stroke: rgba(246, 241, 231, 0.3); stroke-width: 0.6; }
.nw-planet-glyph { fill: var(--ink); font-size: 16px; }
.nw-planet-glyph.is-light { fill: var(--gold); font-size: 17px; }
.nw-planet-glyph.is-point { fill: #c9b6e8; font-size: 14px; }
.nw-planet-deg { fill: var(--muted); font-size: 8.5px; }
.nw-core { fill: var(--gold); }

.is-revealing .nw-zodiac { transform-origin: 210px 210px; animation: nw-turn 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.is-revealing .nw-cusp { stroke-dasharray: 80; stroke-dashoffset: 80; animation: nw-draw 0.7s ease forwards; animation-delay: calc(0.6s + var(--i) * 0.04s); }
.is-revealing .nw-house-num, .is-revealing .nw-axis-label { animation: fade-in 0.6s ease both; animation-delay: 1.1s; }
.is-revealing .nw-planet { transform-box: fill-box; animation: nw-pop 0.5s ease both; animation-delay: calc(0.9s + var(--i) * 0.08s); }
.is-revealing .nw-aspect { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: nw-draw 0.8s ease forwards; animation-delay: calc(1.8s + min(var(--i), 14) * 0.06s); }

@keyframes nw-turn { from { transform: rotate(-40deg) scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nw-draw { to { stroke-dashoffset: 0; } }
@keyframes nw-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.natal-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem 0.9rem; margin: 0.5rem 0 0.2rem; color: var(--muted); font-size: 0.78rem; }
.natal-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.natal-legend i { width: 1rem; height: 3px; border-radius: 2px; display: inline-block; }
.natal-notes { margin-top: 0.6rem; }
.natal-notes .hint { margin: 0.25rem 0; text-align: center; }

.natal-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.natal-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 0.78rem; padding: 0 0.4rem 0.35rem; border-bottom: 1px solid var(--line); }
.natal-table td { padding: 0.5rem 0.4rem; border-bottom: 1px solid rgba(58, 54, 46, 0.6); vertical-align: middle; }
.natal-table .num { text-align: right; width: 2.4rem; }
.natal-table .deg { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.natal-table td:first-child, .natal-table td.sign { white-space: nowrap; }
.pos-sign { color: var(--gold); margin-right: 0.3rem; }
.pos-retro { margin-left: 0.15rem; }
.pos-name { display: inline-grid; line-height: 1.2; vertical-align: middle; }
.pos-name small { color: var(--muted); font-size: 0.72rem; }
.pos-glyph { display: inline-block; width: 1.5rem; color: var(--gold); text-align: center; margin-right: 0.25rem; font-size: 0.95rem; }
.pos-angle .pos-glyph { font-size: 0.7rem; font-weight: 700; }
.pos-retro { color: var(--danger); font-weight: 600; }

.cusp-list { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem 0.8rem; font-size: 0.86rem; }
.cusp-list li { display: flex; gap: 0.45rem; }
.cusp-num { color: var(--gold); width: 1.3rem; text-align: right; flex: none; }
.asp-list { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; gap: 0.4rem; font-size: 0.86rem; }
.asp-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; }
.asp-list li.is-uncertain { opacity: 0.7; }
.asp-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; }
.asp-orb { color: var(--muted); font-variant-numeric: tabular-nums; }

.natal-balance { margin-top: 0.4rem; }
.bal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem 1rem; }
.bal-grid .bal-row { grid-template-columns: 7.6rem minmax(0, 1fr) 1.2rem; }
.bal-row { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr) 1.2rem; align-items: center; gap: 0.45rem; font-size: 0.8rem; margin-bottom: 0.4rem; }
.bal-label { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal-track { height: 6px; border-radius: 3px; background: var(--raise-2); overflow: hidden; }
.bal-fill { display: block; height: 100%; width: var(--w); border-radius: 3px; background: var(--gold); animation: bal-grow 0.9s ease both; }
.bal-fire .bal-fill { background: #e2735f; }
.bal-earth .bal-fill { background: #9fcf8c; }
.bal-air .bal-fill { background: #e0c48a; }
.bal-water .bal-fill { background: #7fb3e6; }
.bal-mod .bal-fill { background: #b7a3d9; }
.bal-n { text-align: right; font-variant-numeric: tabular-nums; }
@keyframes bal-grow { from { width: 0; } }

.natal-reading-title { margin-top: 1.4rem; }
.natal-reading { display: grid; gap: 0.7rem; }
.natal-section h3 { color: var(--gold); font-size: 1.02rem; margin-bottom: 0.45rem; }
.natal-section .prose + .prose { margin-top: 0.55rem; }
.natal-list h4 { margin: 0.5rem 0 0.3rem; font-size: 0.92rem; color: var(--ink); }
.natal-list h4:first-child { margin-top: 0; }
.natal-list ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.natal-list li { line-height: 1.5; font-size: 0.97rem; }
.natal-reading.is-arriving .natal-section { animation: fade-up 0.5s ease both; animation-delay: calc(var(--i) * 0.12s); }
.natal-writing { padding: 1rem; border-radius: 16px; border: 1px dashed var(--gold-dim); background: var(--raise); text-align: center; }
.natal-writing .natal-loader { width: 6.5rem; height: 6.5rem; }
.skeleton { display: grid; gap: 0.45rem; margin: 0.8rem 0 0.4rem; }
.skeleton span { height: 0.7rem; border-radius: 6px; background: linear-gradient(90deg, var(--raise-2), #34343c, var(--raise-2)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.skeleton span:nth-child(2) { width: 88%; }
.skeleton span:nth-child(3) { width: 64%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.natal-actions { margin-top: 1rem; }

@media (max-width: 360px) {
  .big3-chip { padding: 0.5rem 0.5rem; }
  .big3-chip strong { font-size: 0.84rem; }
  .natal-table td, .natal-table th { padding-left: 0.25rem; padding-right: 0.25rem; }
  .pos-glyph { width: 1.2rem; margin-right: 0.15rem; }
  .bal-grid { grid-template-columns: minmax(0, 1fr); }
  .bal-row { grid-template-columns: 7.6rem minmax(0, 1fr) 1.2rem; }
  .natal-table { font-size: 0.84rem; }
  .cusp-list { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tile-natal .tile-icon svg,
  .natal-loader .nl-ring,
  .natal-loader text,
  .natal-loader .nl-sun,
  .skeleton span,
  .bal-fill { animation: none; }
}

/* ── Натальная карта: пояснения простыми словами ───────────────────── */
.natal-explain { margin: 0 0 0.9rem; padding: 0.8rem 0.95rem; border-radius: 14px; background: linear-gradient(160deg, rgba(224, 196, 138, 0.09), rgba(224, 196, 138, 0.02)); border: 1px solid rgba(224, 196, 138, 0.22); }
.natal-explain p { margin: 0; font-size: 0.9rem; line-height: 1.45; }
.natal-explain p + p { margin-top: 0.45rem; color: var(--muted); }
.title-row { display: flex; align-items: center; gap: 0.5rem; }
.title-row > :first-child { margin-bottom: 0; }
.info-btn {
  flex: none; width: 1.45rem; height: 1.45rem; padding: 0; border-radius: 50%;
  border: 1px solid var(--gold-dim); background: transparent; color: var(--gold);
  font: italic 700 0.8rem/1 Georgia, "Times New Roman", serif; cursor: pointer;
}
.info-btn.is-open, .info-btn:focus-visible { background: var(--gold); color: #1a1710; outline: none; }
.term-hint { margin: 0.45rem 0 0.6rem; padding: 0.6rem 0.75rem; border-radius: 12px; background: var(--raise-2); color: var(--ink); font-size: 0.86rem; line-height: 1.45; border-left: 3px solid var(--gold-dim); }
.term-hint[hidden] { display: none; }
.term-list, .asp-types { list-style: none; margin: 0.45rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.asp-types li { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: 0.45rem; align-items: baseline; }
.asp-types i { display: inline-block; width: 1rem; height: 3px; border-radius: 2px; transform: translateY(-3px); }
button.big3-chip { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.big3-chip.is-open { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-glow); }
.big3-i { margin-left: auto; width: 0.95rem; height: 0.95rem; border-radius: 50%; border: 1px solid var(--gold-dim); color: var(--gold); font: italic 700 0.6rem/0.85rem Georgia, serif; text-align: center; }
.big3-hint { margin-top: -0.4rem; }
.nw-axis-label { font-size: 8px; font-weight: 600; letter-spacing: 0.02em; }
.nw-planet-deg.is-retro { fill: #f08a6c; font-weight: 700; }
.legend-retro b { color: #f08a6c; font-weight: 700; font-size: 0.8rem; }
.legend-how { color: var(--gold); }
.legend-how .info-btn { width: 1.25rem; height: 1.25rem; font-size: 0.7rem; }
.natal-legend + .term-hint { margin-top: 0.5rem; }
.pos-row { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pos-row:hover td, .pos-row.is-open td { background: rgba(224, 196, 138, 0.06); }
.pos-row.is-open td { border-bottom-color: transparent; }
.pos-detail td { padding: 0.1rem 0.6rem 0.7rem; background: rgba(224, 196, 138, 0.06); font-size: 0.84rem; line-height: 1.45; color: var(--ink); white-space: normal !important; }
.pos-detail p { margin: 0.25rem 0 0; }
.pos-detail p:first-child { margin-top: 0; }
.natal-table .pos-retro { color: #f08a6c; font-weight: 600; font-size: 0.68rem; }
.natal-table .num { width: 2rem; }
.cusp-list { grid-template-columns: 1fr; gap: 0.45rem; }
.cusp-list li { align-items: baseline; }
.cusp-num { flex: none; min-width: 2.1rem; color: var(--gold); font-weight: 600; }
.cusp-body { display: grid; gap: 0.05rem; }
.cusp-body small { color: var(--muted); font-size: 0.78rem; }
.asp-name small { display: block; color: var(--muted); font-size: 0.74rem; }
.asp-orb { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.natal-details { margin: 1.2rem 0 0.4rem; border: 1px solid var(--line); border-radius: 16px; background: var(--raise); }
.natal-details > summary { list-style: none; cursor: pointer; padding: 0.85rem 2.4rem 0.85rem 1rem; position: relative; display: grid; gap: 0.15rem; }
.natal-details > summary::-webkit-details-marker { display: none; }
.natal-details > summary::after { content: "⌄"; position: absolute; right: 1rem; top: 0.75rem; color: var(--gold); font-size: 1.2rem; transition: transform 0.2s ease; }
.natal-details[open] > summary::after { transform: rotate(180deg); }
.natal-details > summary span { font-weight: 600; color: var(--gold); }
.natal-details > summary small { color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.natal-sub { padding: 0.8rem 0.75rem 0.9rem; border-top: 1px solid var(--line); }
@media (max-width: 380px) { .natal-sub { padding-left: 0.45rem; padding-right: 0.45rem; } }
.sub-title { margin: 0; font-size: 0.98rem; font-weight: 600; color: var(--ink); }
.natal-sub > .hint { margin: 0.3rem 0 0.5rem; }
.natal-sub.natal-balance { margin: 0; }
.bal-head { margin: 0.5rem 0 0.3rem; color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Разбор пишется — заметный блок с прогрессом */
.natal-writing {
  position: relative; overflow: hidden; text-align: left; padding: 1rem 1rem 0.9rem;
  border: 1px solid rgba(224, 196, 138, 0.45); border-radius: 18px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(224, 196, 138, 0.16), transparent 60%), var(--raise);
  box-shadow: 0 0 0 1px rgba(224, 196, 138, 0.08), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.natal-writing::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(224, 196, 138, 0.12) 50%, transparent 70%);
  background-size: 250% 100%; animation: nwr-sheen 2.8s linear infinite;
}
@keyframes nwr-sheen { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.nwr-head { display: flex; gap: 0.8rem; align-items: center; }
.nwr-head h3 { margin: 0 0 0.25rem; font-size: 1.12rem; color: var(--gold); }
.nwr-head p { margin: 0; font-size: 0.86rem; color: var(--muted); line-height: 1.4; }
.natal-writing .natal-loader { flex: none; width: 4.2rem; height: 4.2rem; margin: 0; }
.nwr-bar { margin: 0.9rem 0 0.35rem; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.nwr-fill { display: block; height: 100%; width: 10%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); box-shadow: 0 0 10px var(--gold-glow); transition: width 0.4s ease; }
.nwr-meta { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.nwr-meta .oracle-phrase { margin: 0; font-size: 0.86rem; text-align: left; }
.nwr-pct { color: var(--gold); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.nwr-steps { list-style: none; margin: 0.7rem 0 0.4rem; padding: 0; display: grid; gap: 0.3rem; font-size: 0.84rem; color: var(--muted); }
.nwr-steps li { display: flex; gap: 0.5rem; align-items: center; }
.nwr-steps li::before { content: ""; flex: none; width: 0.95rem; height: 0.95rem; border-radius: 50%; border: 1.5px solid var(--line); box-sizing: border-box; }
.nwr-steps li.is-done { color: var(--ink); }
.nwr-steps li.is-done::before { border-color: var(--gold); background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%231a1710' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/80% no-repeat; }
.nwr-steps li.is-active { color: var(--gold); }
.nwr-steps li.is-active::before { border-color: var(--gold); border-top-color: transparent; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.natal-writing .skeleton { margin-top: 0.6rem; }
.natal-reading-note { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.8rem; }

/* Уведомление */
.toast {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 50;
  transform: translate(-50%, 140%); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease;
  display: flex; align-items: center; gap: 0.8rem; width: max-content; max-width: calc(100vw - 2rem); white-space: nowrap;
  padding: 0.65rem 0.7rem 0.65rem 1rem; border-radius: 14px; background: #2b2a24; color: var(--ink);
  border: 1px solid var(--gold-dim); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-size: 0.92rem;
}
.toast.is-shown { transform: translate(-50%, 0); opacity: 1; }
.toast-btn { border: 0; border-radius: 10px; padding: 0.45rem 0.8rem; background: var(--gold); color: #1a1710; font-weight: 700; font-size: 0.86rem; cursor: pointer; }

/* Постер */
.natal-poster { margin-top: 1.4rem; }
.natal-poster > .lead { margin: 0.3rem 0 0.8rem; font-size: 0.92rem; }
.poster-frame { position: relative; margin: 0 auto 0.9rem; width: min(78%, 300px); aspect-ratio: 2480 / 3508; border-radius: 6px; overflow: hidden; background: #10111c; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(224, 196, 138, 0.25); }
.poster-frame.is-light { background: #f6efe0; }
.poster-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s ease; }
.poster-frame.is-loading .poster-img { opacity: 0.35; }
.poster-spin { position: absolute; inset: 0; margin: auto; width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--gold); border-top-color: transparent; animation: spin 0.9s linear infinite; opacity: 0; transition: opacity 0.2s; }
.poster-frame.is-loading .poster-spin { opacity: 1; }
.poster-frame.is-failed .poster-img { visibility: hidden; }
.poster-frame.is-failed::after { content: "Превью не загрузилось — постер всё равно можно получить"; position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; text-align: center; color: var(--muted); font-size: 0.8rem; }
.poster-form { display: grid; gap: 0.75rem; }
.seg-field { display: grid; gap: 0.35rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.seg-btn { display: grid; gap: 0.05rem; padding: 0.55rem 0.6rem; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.seg-btn small { color: var(--muted); font-weight: 400; font-size: 0.74rem; }
.seg-btn.is-on { border-color: var(--gold); background: rgba(224, 196, 138, 0.12); box-shadow: 0 0 0 1px var(--gold-glow); }
.seg-btn.is-on small { color: var(--gold); }
.poster-actions { margin-top: 0.9rem; }
@media (prefers-reduced-motion: reduce) {
  .natal-writing::before, .nwr-steps li.is-active::before, .poster-spin { animation: none; }
}

/* ── Натальная карта: портрет по разделам и карта неба в деталях ───────── */
.natal-intro { margin: 0 0 0.9rem; font-family: var(--serif, inherit); font-style: italic; font-size: 0.98rem; line-height: 1.5; color: var(--ink); text-align: center; opacity: 0.92; }
.natal-unknown { margin: 0.6rem 0 0; }
.natal-reading { display: grid; gap: 0.75rem; margin-top: 1.3rem; }
.natal-reading .natal-reading-title { margin: 0; }
.natal-toc { padding: 0.75rem 0.85rem 0.6rem; border-radius: 16px; border: 1px solid rgba(224, 196, 138, 0.22); background: linear-gradient(160deg, rgba(224, 196, 138, 0.08), rgba(224, 196, 138, 0.015)); }
.natal-toc .toc-head { margin: 0 0 0.35rem; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.natal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.15rem 0.6rem; }
@media (max-width: 360px) { .natal-toc ol { grid-template-columns: 1fr; } }
.natal-toc a { display: flex; align-items: baseline; gap: 0.4rem; padding: 0.3rem 0.1rem; font-size: 0.86rem; line-height: 1.25; color: var(--ink); text-decoration: none; border-radius: 8px; }
.natal-toc a:active { background: rgba(224, 196, 138, 0.1); }
.natal-toc a.is-waiting { color: var(--muted); cursor: default; }
.natal-toc a.is-waiting .toc-glyph { animation: ns-pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .natal-toc a.is-waiting .toc-glyph { animation: none; } }
.natal-toc .toc-glyph { flex: none; width: 1.1rem; text-align: center; color: var(--gold); }
.natal-section { scroll-margin-top: 4.2rem; }
.natal-section h3 { display: flex; align-items: center; gap: 0.5rem; }
.natal-section .ns-glyph { flex: none; display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: rgba(224, 196, 138, 0.12); border: 1px solid rgba(224, 196, 138, 0.3); font-size: 0.95rem; }
.natal-section .prose.has-lead { padding-left: 0.7rem; border-left: 2px solid rgba(224, 196, 138, 0.35); }
.natal-section .prose-lead { color: var(--gold); font-weight: 600; }
.natal-section.is-fresh { animation: fade-up 0.55s ease both; }
.natal-section.is-waiting { border-style: dashed; opacity: 0.85; }
.natal-section.is-waiting h3 { color: var(--muted); }
.ns-wait { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; font-size: 0.86rem; color: var(--muted); }
.ns-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold-glow); animation: ns-pulse 1.4s ease-in-out infinite; }
@keyframes ns-pulse { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .ns-dot, .natal-section.is-fresh { animation: none; } }

.natal-sky { margin-top: 1.6rem; display: grid; gap: 0.75rem; }
.natal-sky .sky-head .section-title { margin: 0 0 0.2rem; }
.natal-sky .sky-head .hint { margin: 0; }
.natal-card { padding: 0.85rem 0.8rem 0.9rem; border-radius: 16px; border: 1px solid var(--line); background: var(--raise); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
@media (max-width: 380px) { .natal-card { padding-left: 0.55rem; padding-right: 0.55rem; } }
.natal-card > .hint { margin: 0.3rem 0 0.5rem; }
.natal-card .sub-title { margin: 0; }
.natal-card .natal-table { margin-top: 0.4rem; }
.natal-card .natal-table tbody tr.pos-row:nth-of-type(4n+1) td { background: rgba(255, 255, 255, 0.018); }
.natal-card .natal-table .pos-glyph { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; margin-right: 0.35rem; border-radius: 50%; background: rgba(224, 196, 138, 0.1); color: var(--gold); }
.natal-card .natal-table .pos-sign { color: var(--gold); margin-right: 0.25rem; }
.natal-card .cusp-list li { padding: 0.4rem 0.5rem; border-radius: 10px; background: rgba(255, 255, 255, 0.025); }
.natal-card .cusp-num { flex: none; min-width: 2rem; color: var(--gold); font-weight: 600; }
.natal-card .asp-list li { padding: 0.4rem 0.5rem; border-radius: 10px; background: rgba(255, 255, 255, 0.025); }
.natal-card .asp-orb { color: var(--muted); font-size: 0.76rem; white-space: nowrap; }
.natal-features { border-color: rgba(224, 196, 138, 0.28); background: linear-gradient(160deg, rgba(224, 196, 138, 0.09), var(--raise) 60%); }
.feat-list { list-style: none; margin: 0.55rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.feat-list li { display: grid; gap: 0.1rem; padding: 0.5rem 0.6rem; border-radius: 12px; background: rgba(0, 0, 0, 0.14); }
.feat-label { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.feat-value { color: var(--gold); font-size: 0.98rem; }
.feat-list small { color: var(--ink); opacity: 0.8; font-size: 0.8rem; line-height: 1.4; }
.dign-box { margin-top: 0.7rem; }
.dign-list { list-style: none; margin: 0.35rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.dign-list li { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 0.2rem 0.5rem; font-size: 0.86rem; }
.dign-list small { grid-column: 1 / -1; color: var(--muted); font-size: 0.78rem; }
.dign-planet { font-weight: 600; }
.dign-tag { padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.74rem; border: 1px solid currentColor; }
.dign-domicile .dign-tag, .dign-exaltation .dign-tag { color: #9fd49b; }
.dign-detriment .dign-tag, .dign-fall .dign-tag { color: #f0a77c; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.natal-card .cusp-ruler { color: var(--gold); opacity: 0.85; }

/* ── Тарифы и баланс ── */

#balance[role="button"] { cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease; }
#balance[role="button"]:active { border-color: var(--gold-dim); background: rgba(224, 196, 138, 0.08); }

.tile-bill {
  border-color: var(--line);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(150, 120, 200, 0.16), transparent 55%),
    linear-gradient(160deg, var(--raise-2), var(--raise));
}

.bill-line {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0 0 0.8rem;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  border: 1px dashed var(--gold-dim);
  background: rgba(224, 196, 138, 0.06);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  animation: fade-up 0.4s ease both;
}
.bill-line > span:nth-child(2) { flex: 1; min-width: 0; }
.bill-line-dot { color: var(--gold); }
.bill-line-go { color: var(--gold); font-weight: 600; white-space: nowrap; }

.spread-cost {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
  vertical-align: 0.12em;
}

.bill-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  margin: 0.2rem 0 1rem;
  padding: 1.3rem 1rem 1.1rem;
  border-radius: 22px;
  border: 1px solid var(--gold-dim);
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(224, 196, 138, 0.20), transparent 60%),
    radial-gradient(80% 90% at 100% 100%, rgba(120, 90, 160, 0.16), transparent 60%),
    linear-gradient(170deg, #2c2820, var(--raise));
  text-align: center;
  animation: fade-up 0.45s cubic-bezier(.2, .7, .2, 1) both;
}
.bill-hero h3 { margin: 0.2rem 0 0; color: var(--gold); font-family: Georgia, serif; font-weight: 500; }
.bill-hero .hint { margin: 0.2rem 0 0; }
.bill-hero > * { position: relative; }
.bill-hero > .sparkles { position: absolute; }
.bill-kicker { margin: 0; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.bill-big {
  margin: 0.1rem 0 0;
  font-family: Georgia, serif;
  font-size: 3.1rem;
  line-height: 1.05;
  background: linear-gradient(100deg, #f4e3bb 20%, var(--gold) 40%, #fff6dc 50%, var(--gold) 60%, #f4e3bb 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
.is-sub .bill-big { font-size: 2rem; }
.bill-unit { margin: 0; color: var(--gold); font-size: 1rem; }
.bill-free { margin: 0.55rem 0 0; padding: 0.3rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; }
.bill-free.is-on { border-color: var(--gold-dim); color: var(--gold); background: rgba(224, 196, 138, 0.08); }
.bill-demo { font-size: 0.78rem; opacity: 0.8; }
.bill-meter { width: min(220px, 80%); height: 6px; margin: 0.6rem 0 0.1rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bill-meter span { display: block; width: var(--p); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); animation: bal-grow 0.8s ease both; }
.bill-link { appearance: none; border: 0; background: none; color: var(--gold); font: inherit; font-size: 0.88rem; text-decoration: underline; text-underline-offset: 3px; padding: 0.35rem; cursor: pointer; }
.bill-reason {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border-left: 3px solid var(--gold);
  background: rgba(224, 196, 138, 0.08);
  color: var(--ink);
  font-size: 0.93rem;
  line-height: 1.4;
  animation: fade-up 0.4s ease 0.05s both;
}
.bill-section { margin: 1.4rem 0 0.7rem; }
.bill-foot { margin-top: 1.2rem; }

.plan {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--raise-2), var(--raise));
  animation: fade-up 0.45s cubic-bezier(.2, .7, .2, 1) both;
}
.plan-featured {
  padding: 1.1rem 1rem 1rem;
  border-color: var(--gold);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(224, 196, 138, 0.22), transparent 55%),
    linear-gradient(160deg, #302a20, var(--raise));
  box-shadow: 0 10px 34px rgba(224, 196, 138, 0.12);
  animation-delay: 0.06s;
}
.plan-featured::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 240, 200, 0.10) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: nwr-sheen 4.5s ease-in-out infinite;
}
.plan-badge {
  position: absolute;
  top: -0.7rem;
  right: 0.9rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #ecd5a2, var(--gold));
  color: #241c10;
  font-size: 0.74rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(224, 196, 138, 0.3);
}
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8rem; }
.plan-head h3 { margin: 0; color: var(--gold); font-family: Georgia, serif; font-weight: 500; font-size: 1.35rem; }
.plan-head .hint { margin: 0.1rem 0 0; }
.plan-price { display: grid; justify-items: end; gap: 0.05rem; }
.plan-price strong { font-size: 1.35rem; color: var(--ink); white-space: nowrap; }
.plan-price small { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.plan-perks { display: grid; gap: 0.45rem; margin: 0.9rem 0 1rem; padding: 0; list-style: none; }
.plan-perks li { position: relative; padding-left: 1.4rem; font-size: 0.93rem; line-height: 1.35; }
.plan-perks li::before { content: "✦"; position: absolute; left: 0; top: 0; color: var(--gold); font-size: 0.85rem; }
.plan-buy { min-height: 46px; }

.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.plan-pack { display: grid; justify-items: center; gap: 0.15rem; padding: 1rem 0.75rem 0.8rem; text-align: center; animation-delay: 0.12s; }
.plan-pack.is-best { border-color: var(--gold-dim); animation-delay: 0.18s; }
.plan-pack .plan-price { justify-items: center; margin-top: 0.4rem; }
.plan-pack .hint { margin: 0 0 0.6rem; font-size: 0.78rem; }
.plan-pack .plan-badge { right: 50%; transform: translateX(50%); }
.plan-count { margin: 0; font-family: Georgia, serif; font-size: 2.3rem; line-height: 1; color: var(--gold); }
.plan-unit { margin: 0; color: var(--muted); font-size: 0.86rem; }
.plan-pack .btn { min-height: 42px; padding: 0.5rem; font-size: 0.95rem; }

.plan-list { display: grid; gap: 0.6rem; }
.plan-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 0.85rem; animation-delay: 0.22s; }
.plan-row-text { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.plan-row-text strong { font-size: 0.98rem; }
.plan-row-text span { color: var(--muted); font-size: 0.82rem; line-height: 1.3; }
.plan-chip {
  appearance: none;
  flex: none;
  padding: 0.5rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--gold);
  background: rgba(224, 196, 138, 0.1);
  color: var(--gold);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
}
.plan-chip:active { transform: scale(0.96); }
.plan-owned { flex: none; color: var(--ok); font-size: 0.88rem; font-weight: 600; }

/* Пейволл: расклады закончились, натальная карта, постер */
.paywall { position: relative; overflow: hidden; }
.paywall > *:not(.sparkles) { position: relative; }
.paywall-list { display: grid; gap: 0.6rem; margin-top: 1rem; }
.paywall-item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--raise);
  color: var(--ink);
  font: inherit;
  text-align: left;
  animation: fade-up 0.4s ease both;
  transition: transform 0.12s ease, border-color 0.2s ease;
}
.paywall-item:nth-child(2) { animation-delay: 0.06s; }
.paywall-item:nth-child(3) { animation-delay: 0.12s; }
.paywall-item:active { transform: scale(0.98); border-color: var(--gold-dim); }
.paywall-item.is-featured { border-color: var(--gold); background: radial-gradient(120% 140% at 0% 0%, rgba(224, 196, 138, 0.18), transparent 55%), var(--raise); }
.paywall-text { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.paywall-text strong { color: var(--gold); }
.paywall-text span { color: var(--muted); font-size: 0.84rem; }
.paywall-price { flex: none; font-weight: 700; white-space: nowrap; }

.natal-lock { margin-top: 0.9rem; padding: 0.9rem 1rem 0.2rem; border-radius: 16px; border: 1px dashed var(--gold-dim); background: rgba(224, 196, 138, 0.05); animation: fade-up 0.4s ease both; }
.natal-lock .plan-perks { margin: 0.6rem 0; }
.poster-lock { margin-top: 1rem; }
.poster-lock .lead { margin: 0; font-size: 0.93rem; }

/* Шторка оплаты */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 8, 12, 0.62); backdrop-filter: blur(3px); animation: fade-in 0.22s ease both; }
.sheet {
  position: relative;
  width: min(560px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 0.6rem 1.1rem calc(1rem + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--gold-dim);
  border-bottom: 0;
  background:
    radial-gradient(100% 70% at 50% 0%, rgba(224, 196, 138, 0.14), transparent 60%),
    var(--bg);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.5);
  animation: sheet-up 0.34s cubic-bezier(.2, .8, .2, 1) both;
}
.sheet-wrap.is-leaving .sheet { animation: sheet-down 0.22s ease both; }
.sheet-wrap.is-leaving .sheet-backdrop { animation: fade-in 0.22s ease reverse both; }
.sheet-grip { display: block; width: 42px; height: 4px; margin: 0 auto 0.9rem; border-radius: 999px; background: var(--line); }
.sheet-body { display: grid; gap: 0.55rem; text-align: center; }
.sheet-body .lead { margin: 0; }
.sheet-title { margin: 0; color: var(--gold); font-family: Georgia, serif; font-weight: 500; font-size: 1.45rem; }
.sheet-price { margin: 0.2rem 0 0.4rem; font-size: 1.7rem; font-weight: 700; }
.sheet-price small { color: var(--muted); font-size: 1rem; font-weight: 500; }
.sheet-actions { display: grid; gap: 0.6rem; }
.sheet-consent { margin: 0.75rem 0 0.15rem; font-size: 0.95rem; line-height: 1.45; }
.sheet-actions .btn { display: flex; justify-content: space-between; align-items: center; }
.sheet-actions .btn small { font-weight: 600; opacity: 0.85; }
.sheet-close { justify-self: center; }

.pay-wait { display: grid; justify-items: center; gap: 0.9rem; padding: 1.2rem 0 0.6rem; }
.pay-orb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(224, 196, 138, 0.2);
  border-top-color: var(--gold);
  box-shadow: 0 0 24px var(--gold-glow);
  animation: spin 1s linear infinite;
}
.pay-done { position: relative; display: grid; justify-items: center; gap: 0.5rem; padding: 1.4rem 0 0.4rem; }
.pay-check {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f7e6bd, var(--gold) 60%, var(--gold-dim));
  color: #241c10;
  font-size: 2.2rem;
  font-weight: 700;
  box-shadow: 0 0 0 8px rgba(224, 196, 138, 0.12), 0 0 40px var(--gold-glow);
  animation: pay-pop 0.55s cubic-bezier(.2, 1.6, .4, 1) both;
}
.pay-burst { position: absolute; top: calc(1.4rem + 38px); left: 50%; width: 0; height: 0; }
.pay-burst span {
  position: absolute;
  left: -2px;
  top: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px 2px var(--gold-glow);
  transform: rotate(var(--a)) translateY(0);
  animation: pay-ray 0.9s ease-out 0.1s both;
}
.pay-done .sheet-title { animation: fade-up 0.4s ease 0.25s both; }
.pay-done .lead { animation: fade-up 0.4s ease 0.35s both; }

@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { from { transform: none; } to { transform: translateY(100%); } }
@keyframes pay-pop { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pay-ray {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-70px); }
}

@media (prefers-reduced-motion: reduce) {
  .bill-big, .plan-featured::after, .pay-burst span { animation: none; }
  .sheet, .plan, .bill-hero, .paywall-item { animation-duration: 0.01s; }
}

/* Кабинет администратора */
.admin-entry { margin-top: 0.75rem; }
.admin-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
}
.admin-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  outline: none;
}
.admin-card h3 { margin: 0.15rem 0 0.35rem; }
.admin-id { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.4rem; }
.admin-card p { margin: 0.2rem 0; }
.admin-actions { display: grid; gap: 0.55rem; margin-top: 1rem; }
.admin-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
.admin-presets .btn { padding-inline: 0.4rem; }
.admin-danger { color: #f3c2c2; border-color: rgba(243, 194, 194, 0.35); }

.admin-sort { display: flex; flex-wrap: nowrap; gap: 0.4rem; margin: 0.2rem 0 0.35rem; }
.admin-sort-btn {
  width: auto;
  flex: 1 1 0;
  padding: 0.4rem 0.45rem;
  min-height: 2.2rem;
  font-size: 0.86rem;
  font-weight: 600;
}
.admin-sort-btn[aria-pressed="true"] {
  color: var(--gold);
  border-color: rgba(224, 196, 138, 0.55);
  background: rgba(224, 196, 138, 0.08);
}
.admin-list { display: grid; gap: 0.55rem; }
.admin-user-row {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--raise);
  color: inherit;
  font: inherit;
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  display: grid;
  gap: 0.35rem;
}
.admin-user-row:active { background: var(--raise-2); }
.admin-user-head { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.admin-user-nick { color: var(--muted); font-size: 0.9rem; }
.admin-user-meta { color: var(--muted); font-size: 0.85rem; margin: 0; }
.admin-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.admin-badge {
  font-size: 0.74rem;
  line-height: 1.3;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  color: var(--muted);
}
.admin-badge.is-gold { color: var(--gold); border-color: rgba(224, 196, 138, 0.45); }
.admin-sentinel { height: 1px; }

.place-coords { display: grid; gap: 0.35rem; margin-top: 0.35rem; }
.place-coords[hidden] { display: none; }
.place-coords-toggle {
  appearance: none;
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  padding: 0.25rem 0 0;
  cursor: pointer;
}
.place-coords-hint { margin: 0.15rem 0 0; }

.natal-list { display: grid; gap: 0.55rem; }
.natal-list-row {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--raise);
  color: inherit;
  font: inherit;
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  display: grid;
  gap: 0.25rem;
}
.natal-list-meta { color: var(--muted); font-size: 0.88rem; }
.natal-rename-row { margin: 0.15rem 0 0.5rem; }
.linkish {
  appearance: none;
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  font-size: 0.95rem;
  padding: 0;
  cursor: pointer;
}
.sheet input[type="text"] {
  width: 100%;
  margin: 0.4rem 0 0.6rem;
}


/* Переписка с гадалкой по раскладу */
.discuss {
  margin: 1.1rem 0 0.4rem;
  display: grid;
  gap: 0.7rem;
}
.discuss-title { margin-bottom: 0; }
.discuss-thread {
  display: grid;
  gap: 0.55rem;
  max-height: 28rem;
  overflow: auto;
  padding: 0.15rem 0.1rem 0.2rem;
}
.discuss-msg {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.7rem 0.85rem;
  display: grid;
  gap: 0.35rem;
  background: var(--raise);
}
.discuss-msg.is-user {
  background: var(--raise-2);
  margin-left: 1.6rem;
}
.discuss-msg.is-reader,
.discuss-msg.is-card {
  margin-right: 1.2rem;
  background:
    linear-gradient(180deg, rgba(224, 196, 138, 0.10), transparent 42%),
    var(--raise);
}
.discuss-who {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}
.discuss-msg.is-user .discuss-who { color: var(--muted); }
.discuss-msg .prose { margin: 0; white-space: pre-wrap; }
.discuss-card-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.7rem;
  align-items: center;
  margin: 0.15rem 0 0.2rem;
}
.discuss-card-row > div {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.discuss-card-row strong { display: block; }
.discuss-card-row .hint { display: block; }

.discuss-card-img {
  width: 72px;
  height: auto;
  border-radius: 0.35rem;
  border: 1px solid var(--line);
  display: block;
}
.discuss-card-ph {
  display: grid;
  place-items: center;
  min-height: 5.5rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  color: var(--gold);
  text-align: center;
  padding: 0.3rem;
  font-size: 0.85rem;
}
.discuss-composer { display: grid; gap: 0.5rem; }
.discuss-input {
  width: 100%;
  min-height: 4.8rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.8rem;
}
.discuss-input:focus {
  outline: 2px solid var(--gold-glow);
  border-color: var(--gold-dim);
}
.discuss-teaser {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.9rem 1rem 1rem;
  display: grid;
  gap: 0.55rem;
  background:
    linear-gradient(180deg, rgba(224, 196, 138, 0.12), transparent 50%),
    var(--raise);
}
.discuss-teaser .lead { margin: 0; }
.discuss-limits, .discuss-lock { margin: 0; }

/* ── Разделы подписки ── */

.tile { position: relative; }
.tile-badge {
  position: absolute; top: 0.55rem; right: 0.6rem;
  padding: 0.1rem 0.45rem; border-radius: 999px;
  border: 1px solid var(--gold-dim); color: var(--gold);
  font-size: 0.7rem; line-height: 1.4; background: rgba(224, 196, 138, 0.08);
}
/* Длинные заголовки (es/pt) не залезают под цену в углу плитки. */
.tile-wide:has(.tile-badge) .tile-text > strong { padding-right: 3.9rem; }
.extra-gate { border-color: var(--gold-dim); margin-top: 1rem; }
.extra-gate h3 { margin: 0 0 0.4rem; color: var(--gold); font-family: Georgia, serif; font-size: 1.12rem; }
.extra-gate .plan-perks { margin: 0.7rem 0 0.9rem; }
.extra-gate .btn { width: 100%; }
.extra-lead { color: var(--ink); font-size: 1.04rem; margin: 0.9rem 0 0.4rem; padding-left: 0.7rem; border-left: 2px solid rgba(224, 196, 138, 0.45); }
.extra-sec { margin-top: 0.7rem; animation: fade-up 0.45s ease both; animation-delay: calc(var(--i, 0) * 0.07s); }
.extra-sec h3 { margin: 0 0 0.35rem; color: var(--gold); font-size: 1rem; }
.extra-sec .prose { margin: 0 0 0.35rem; font-size: 0.98rem; }
.extra-sec .prose:last-child { margin-bottom: 0; }
.extra-quota { margin: 0.4rem 0; }
.extra-blur { filter: blur(4px); opacity: 0.6; user-select: none; margin: 0.6rem 0 0; }

.compat-block { margin-top: 0.9rem; padding: 0.85rem; border: 1px solid var(--line); border-radius: 16px; background: var(--raise); }
.compat-block .section-title { margin-top: 0; }
.compat-hero { display: grid; gap: 1rem; justify-items: center; }
.compat-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.6rem; align-items: center; width: 100%; }
.compat-person { display: grid; gap: 0.15rem; text-align: center; min-width: 0; }
.compat-person strong { color: var(--gold); font-family: Georgia, serif; font-size: 1.08rem; overflow-wrap: anywhere; }
.compat-person .hint { margin: 0; font-size: 0.8rem; }
.compat-and { color: var(--gold); font-size: 1.4rem; text-shadow: 0 0 12px var(--gold-glow); }
.score-ring {
  --p: 0;
  width: 8.2rem; height: 8.2rem; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  background:
    radial-gradient(closest-side, #1d1b18 78%, transparent 79% 100%),
    conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0);
  box-shadow: 0 0 26px var(--gold-glow);
  animation: fade-up 0.6s ease both;
}
.score-ring strong { font-family: Georgia, serif; font-size: 2rem; color: var(--gold); line-height: 1; }
.score-ring span { color: var(--muted); font-size: 0.78rem; margin-top: 0.2rem; }
.compat-bars { display: grid; gap: 0.5rem; width: 100%; }
.compat-bar { display: grid; grid-template-columns: 6.5rem 1fr 2.6rem; gap: 0.5rem; align-items: center; font-size: 0.9rem; }
.compat-bar .bill-meter { width: 100%; margin: 0; }
.compat-bar strong { text-align: right; color: var(--gold); }
.compat-aspects { margin: 0.6rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.3rem; font-size: 0.92rem; }
.compat-aspects .is-soft::marker { color: var(--ok); }
.compat-aspects .is-hard::marker { color: var(--danger); }

.lunar-glyph { font-size: 1.9rem; }
.lunar-day .prose { margin: 0.3rem 0; }
.lunar-day .hint { margin: 0.2rem 0; }
.lunar-ratings { list-style: none; margin: 0.7rem 0 0; padding: 0; display: grid; gap: 0.3rem; font-size: 0.9rem; }
.lunar-ratings li { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.35rem 0.55rem; border-radius: 10px; background: rgba(255, 255, 255, 0.03); }
.lunar-ratings li.is-good strong { color: var(--ok); }
.lunar-ratings li.is-bad strong { color: var(--danger); }
.lunar-ratings li.is-neutral strong { color: var(--muted); font-weight: 500; }
.lunar-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 1rem 0 0.6rem; }
.lunar-nav strong { font-family: Georgia, serif; color: var(--gold); font-size: 1.1rem; }
.lunar-arrow { min-height: 2.4rem; width: 2.8rem; padding: 0; font-size: 1.3rem; flex: none; }
.lunar-cats { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.4rem; margin-bottom: 0.5rem; scrollbar-width: none; }
.lunar-cat { flex: none; white-space: nowrap; padding: 0.4rem 0.7rem; }
.lunar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.3rem; }
.lunar-wd { text-align: center; color: var(--muted); font-size: 0.72rem; padding-bottom: 0.15rem; }
.lunar-cell {
  appearance: none; display: grid; justify-items: center; gap: 0.05rem;
  padding: 0.3rem 0 0.25rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--raise); color: var(--ink); font: inherit;
}
.lunar-cell.is-empty { visibility: hidden; }
.lunar-num { font-size: 0.82rem; }
.lunar-moon { font-size: 0.95rem; line-height: 1.1; }
.lunar-cell.is-today { border-color: var(--gold-dim); }
.lunar-cell.is-active { border-color: var(--gold); box-shadow: 0 0 10px var(--gold-glow); }
.lunar-cell.is-good { background: rgba(185, 224, 168, 0.14); }
.lunar-cell.is-bad { background: rgba(240, 180, 168, 0.12); }
.lunar-legend { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; margin-top: 0.5rem; }
.lunar-legend .dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; }
.lunar-legend .dot.is-good { background: rgba(185, 224, 168, 0.45); }
.lunar-legend .dot.is-bad { background: rgba(240, 180, 168, 0.45); margin-left: 0.6rem; }

.dream-item { margin-top: 0.6rem; }
.dream-item summary { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.dream-q { color: var(--ink); font-style: italic; min-width: 0; }
.dream-item time { flex: none; margin: 0; font-size: 0.78rem; }
.dream-body .extra-sec { background: transparent; }
textarea#dream-text { min-height: 8rem; resize: vertical; }

.num-hero { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; align-items: center; }
.num-big {
  width: 4.4rem; height: 4.4rem; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--gold-dim); color: var(--gold); font-family: Georgia, serif; font-size: 2rem;
  box-shadow: 0 0 18px var(--gold-glow);
}
.num-hero .bill-kicker { margin: 0 0 0.15rem; }
.num-title { display: block; font-family: Georgia, serif; color: var(--gold); font-size: 1.2rem; }
.num-hero .hint { margin: 0.2rem 0 0; }
.num-short { grid-column: 1 / -1; margin: 0.4rem 0 0; }
.num-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.8rem; }
.num-cell { display: grid; gap: 0.15rem; padding: 0.75rem; border-radius: 16px; border: 1px solid var(--line); background: var(--raise); }
.num-cell strong { font-family: Georgia, serif; font-size: 1.6rem; color: var(--gold); line-height: 1.1; }
.num-label { font-size: 0.85rem; }
.num-word { color: var(--gold); font-size: 0.85rem; }
.num-cell .hint { margin: 0.15rem 0 0; font-size: 0.8rem; line-height: 1.35; }

.morning-box { margin-top: 1rem; }
.morning-box h3 { margin: 0 0 0.4rem; color: var(--gold); font-size: 1.02rem; }
.morning-box .btn { width: 100%; margin-top: 0.5rem; }
.morning-row { margin: 0.2rem 0 0.6rem; }

/* Три уровня тарифов */
.tier-intro { margin: 0.4rem 0 0.8rem; }
.plan-tier { margin-bottom: 0.9rem; padding: 1.1rem 1rem 1rem; }
.plan-note { margin: 0.2rem 0 0.7rem; }
.plan-included { display: block; text-align: center; padding: 0.6rem 0 0.2rem; }
.bill-hero.is-all { border-color: var(--gold); }
.gate-upsell { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--gold-dim); }
.gate-upsell .hint { margin: 0 0 0.6rem; }
.extra-gate .hint.center { margin: 0.35rem 0 0; }
.admin-tier { margin-bottom: 0.5rem; }

/* ── Серия дней и уведомления ── */
.streak-card { display: flex; align-items: center; gap: 0.8rem; margin: 0.8rem 0 0.2rem; padding: 0.8rem 0.95rem;
  border-radius: 16px; background: linear-gradient(135deg, rgba(232, 160, 74, 0.16), rgba(201, 162, 39, 0.06));
  border: 1px solid rgba(232, 160, 74, 0.28); }
.streak-card:empty { display: none; }
.streak-flame { font-size: 1.9rem; line-height: 1; filter: drop-shadow(0 0 8px rgba(255, 150, 60, 0.45)); }
.streak-meta { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; min-width: 0; }
.streak-meta strong { color: var(--ink); font-size: 1rem; }
.streak-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.streak-bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #e8a04a, var(--gold)); }
.streak-hint { color: var(--muted); font-size: 0.82rem; }
.notify-list { display: flex; flex-direction: column; gap: 0.1rem; margin: 0.3rem 0 0.6rem; }
.notify-row { align-items: flex-start; padding: 0.35rem 0; }
.notify-row input { margin-top: 0.15rem; flex: none; }
.notify-text { display: flex; flex-direction: column; gap: 0.1rem; }
.notify-text strong { font-weight: 600; font-size: 0.95rem; }
.notify-text span { color: var(--muted); font-size: 0.8rem; line-height: 1.3; }
.notify-master { font-weight: 600; }
.notify-warn { color: #e8b04a; }
.admin-notify-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 0.4rem 0; }
.admin-notify-table th, .admin-notify-table td { text-align: left; padding: 0.3rem 0.2rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.admin-notify-table th:not(:first-child), .admin-notify-table td:not(:first-child) { text-align: right; }
.notify-sound { margin-top: 0.3rem; padding-top: 0.6rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }

.num-for { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem; margin: 0.2rem 0 0.6rem; }
.num-for .bill-link { padding: 0 0.2rem; }
.num-name-card .lead { margin: 0.35rem 0; }

/* ── Ба Цзы ── */

:root {
  --el-wood: #8fcf86;
  --el-fire: #f08a72;
  --el-earth: #e2b86a;
  --el-metal: #dfe3ea;
  --el-water: #7fb0f0;
}

.bz-han { font-family: "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif; font-weight: 700; line-height: 1; }
.el-wood { color: var(--el-wood); }
.el-fire { color: var(--el-fire); }
.el-earth { color: var(--el-earth); }
.el-metal { color: var(--el-metal); }
.el-water { color: var(--el-water); }

.bz-sign-head, .bz-match-head, .bz-day-head { display: flex; align-items: center; gap: 0.9rem; margin: 0.2rem 0 0.7rem; }
.bz-sign-head strong, .bz-match-head strong { display: block; font-family: Georgia, serif; font-size: 1.3rem; color: var(--gold); }
.bz-sign-head .hint, .bz-match-head .hint, .bz-day-head .hint { display: block; margin: 0.15rem 0 0; font-size: 0.85rem; }
.bz-day-head h3 { margin: 0; text-align: left; }
.bz-animal {
  display: grid; place-items: center; flex: none;
  width: 3.6rem; height: 3.6rem; border-radius: 50%;
  font-size: 2rem;
  border: 1px solid var(--gold-dim);
  background: radial-gradient(circle at 35% 30%, rgba(224, 196, 138, 0.22), rgba(0, 0, 0, 0.25));
  box-shadow: 0 0 22px var(--gold-glow);
}
.bz-lichun { font-size: 0.82rem; margin-bottom: 0; }
.bz-lichun.is-early { color: var(--gold); }
.bz-boundary { color: var(--gold); }

.bz-animals .sign-chip { min-height: 3.4rem; }
.bz-chip-han { font-family: "Noto Serif CJK SC", "Songti SC", serif; font-size: 1.25rem; }
.bz-k-liuhe:not(.is-active), .bz-k-sanhe:not(.is-active) { border-color: rgba(185, 224, 168, 0.45); }
.bz-k-clash:not(.is-active), .bz-k-harm:not(.is-active) { border-color: rgba(240, 180, 168, 0.4); }
.bz-match { margin-top: 0.8rem; }
.bz-pair { font-size: 1.7rem; letter-spacing: 0.1em; color: var(--gold); }
.bz-meter { display: grid; grid-template-columns: 1fr 2.8rem; gap: 0.5rem; align-items: center; }
.bz-meter .bill-meter { width: 100%; margin: 0; }
.bz-meter strong { text-align: right; color: var(--gold); }

.bz-teaser { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; margin-bottom: 0.4rem; opacity: 0.55; }
.bz-teaser-col { display: grid; justify-items: center; gap: 0.35rem; padding: 0.6rem 0.2rem; border: 1px dashed var(--gold-dim); border-radius: 12px; }
.bz-teaser-col small { color: var(--muted); }
.bz-teaser-col b { font-family: Georgia, serif; font-size: 1.6rem; color: var(--gold-dim); }

.bz-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin: 0.4rem 0 0.6rem; }
.bz-col {
  display: grid; justify-items: center; align-content: start; gap: 0.25rem;
  padding: 0.55rem 0.15rem 0.6rem;
  border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.18));
  text-align: center; min-width: 0;
  animation: fade-up 0.5s ease both;
}
.bz-col:nth-child(2) { animation-delay: 0.08s; }
.bz-col:nth-child(3) { animation-delay: 0.16s; }
.bz-col:nth-child(4) { animation-delay: 0.24s; }
.bz-col.is-master { border-color: var(--gold); box-shadow: 0 0 18px var(--gold-glow); background: linear-gradient(180deg, rgba(224, 196, 138, 0.14), rgba(0, 0, 0, 0.2)); }
.bz-col.is-empty { opacity: 0.5; border-style: dashed; }
.bz-col-label { color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; }
.bz-god { min-height: 2.1em; font-size: 0.68rem; color: var(--gold); line-height: 1.05; display: grid; place-items: center; padding: 0 0.1rem; }
.bz-cell { font-size: 2.35rem; text-shadow: 0 0 14px rgba(0, 0, 0, 0.55); margin-top: 0.1rem; }
.bz-cap { font-size: 0.66rem; color: var(--muted); line-height: 1.15; min-height: 2.3em; }
.bz-hidden { display: flex; gap: 0.2rem; justify-content: center; font-size: 0.92rem; min-height: 1.1rem; opacity: 0.9; }
.bz-solar { font-size: 0.8rem; margin-bottom: 0.2rem; }

.bz-master-han, .bz-day-han {
  display: flex; gap: 0.05rem; align-items: center; justify-content: center; flex: none;
  min-width: 3.4rem; height: 3.4rem; padding: 0 0.35rem; border-radius: 14px;
  font-size: 1.8rem; border: 1px solid var(--gold-dim); background: rgba(0, 0, 0, 0.25);
}
.bz-master { border-color: var(--gold-dim); }

.bz-elements { display: grid; gap: 0.45rem; }
.bz-el { display: grid; grid-template-columns: 1.6rem 4.6rem 1fr 2.6rem; gap: 0.5rem; align-items: center; font-size: 0.92rem; }
.bz-el-han { font-size: 1.25rem; text-align: center; }
.bz-el-name { color: var(--ink); }
.bz-el-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bz-el-bar span { display: block; width: var(--p); height: 100%; border-radius: inherit; background: currentColor; opacity: 0.85; animation: bal-grow 0.8s ease both; }
.bz-el strong { text-align: right; }

.bz-luck { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.2rem 0 0.5rem; scrollbar-width: none; }
.bz-luck-col {
  flex: none; width: 3.6rem; display: grid; justify-items: center; gap: 0.2rem;
  padding: 0.45rem 0.1rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.03);
}
.bz-luck-col .bz-han { font-size: 1.45rem; }
.bz-luck-col small { color: var(--muted); font-size: 0.7rem; }
.bz-luck-col em { font-style: normal; font-size: 0.66rem; color: var(--bg); background: var(--gold); border-radius: 999px; padding: 0.05rem 0.4rem; }
.bz-luck-col.is-current { border-color: var(--gold); box-shadow: 0 0 14px var(--gold-glow); }
.bz-year { margin-top: 1rem; border-color: var(--gold-dim); }
.bz-list-han { font-family: "Noto Serif CJK SC", "Songti SC", serif; letter-spacing: 0.06em; color: var(--gold); }
.bz-day { margin-top: 0.9rem; }
.bz-day.is-loading .hint { margin: 0; }
.bz-head .horo-head .hint { display: block; margin-top: 0.15rem; }

/* Восточная совместимость в разборе пары */
.cpe { margin-top: 0.9rem; }
.cpe-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.4rem; margin: 0.5rem 0 0.8rem; }
.cpe-side { display: grid; justify-items: center; gap: 0.3rem; text-align: center; }
.cpe-side .bz-animal { width: 4.2rem; height: 4.2rem; font-size: 2.3rem; }
.cpe-side strong { font-family: Georgia, serif; color: var(--gold); font-size: 1.05rem; }
.cpe-side .hint { margin: 0; font-size: 0.85rem; }
.cpe-han { font-size: 0.95rem; color: var(--muted); letter-spacing: 0.08em; }
.cpe-link { font-size: 1.4rem; color: var(--gold-dim); }
.cpe-kind { text-align: center; margin-bottom: 0.5rem; }
.cpe-kind strong { font-family: Georgia, serif; font-size: 1.15rem; color: var(--gold); }
.cpe-note { font-size: 0.8rem; }
.cpe .actions { margin-top: 0.4rem; }
.cpe-alt { margin: 0.2rem 0 0.4rem; font-size: 0.9rem; color: var(--muted); }
.cpe-alt strong { color: var(--gold); font-weight: 600; }
.cpe-pair { align-items: start; }
.cpe-link { align-self: start; margin-top: 1.4rem; }
.cpe .bz-boundary { font-size: 0.85rem; }

/* Карта крупно */
img[data-zoom] { cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
img[data-zoom]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.discuss-card-img.is-reversed { transform: rotate(180deg); }
.is-zoom-source { visibility: hidden; }
html.is-zoomed, html.is-zoomed body { overflow: hidden; overscroll-behavior: none; }
.card-zoom {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  padding: max(env(safe-area-inset-top), 0.75rem) 0.75rem max(env(safe-area-inset-bottom), 0.75rem);
  background: radial-gradient(circle at 50% 42%, rgba(40, 34, 26, 0.92), rgba(6, 6, 9, 0.96) 70%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: zoom-out; touch-action: none; outline: none;
}
.card-zoom-stage { display: grid; justify-items: center; gap: 0.7rem; }
.card-zoom-frame {
  border-radius: 14px; overflow: hidden; transform-origin: center center; will-change: transform;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 50px rgba(224, 196, 138, 0.22);
  background: radial-gradient(circle at 50% 42%, #3a342c 0, #16171b 72%);
}
.card-zoom-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card-zoom-img.is-reversed { transform: rotate(180deg); }
.card-zoom-caption { display: grid; justify-items: center; gap: 0.1rem; text-align: center; max-width: 92vw; }
.card-zoom-caption strong { font-family: Georgia, serif; font-size: 1.25rem; color: var(--gold); }
.card-zoom-pos { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.card-zoom-ori { font-size: 0.85rem; color: var(--muted); }
.card-zoom-hint { position: absolute; left: 0; right: 0; bottom: max(env(safe-area-inset-bottom), 0.4rem); margin: 0; text-align: center; font-size: 0.75rem; color: var(--muted); opacity: 0.7; }
@media (max-height: 600px) { .card-zoom-hint { display: none; } .card-zoom-caption strong { font-size: 1.05rem; } }

/* Оферта: экран согласия поверх приложения */
.offer-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
  background: var(--bg, #0d0b16);
  overflow-y: auto;
}
.offer-gate-card {
  position: relative;
  width: min(440px, 100%);
  padding: 28px 22px 22px;
  border-radius: 22px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  background: var(--card, rgba(255, 255, 255, 0.04));
  text-align: center;
  overflow: hidden;
}
.offer-gate-card h2 { margin: 6px 0 12px; }
.offer-gate-card .lead { margin-bottom: 18px; }
.offer-gate-card .sheet-actions { display: grid; gap: 10px; }
.offer-gate-card .offer-age { margin: 6px 0 0; font-size: 0.95rem; }
.offer-inline { color: var(--gold, #e3c27a); text-decoration: underline; text-underline-offset: 3px; }
html.has-offer-gate body { overflow: hidden; }
html.has-offer-gate .lang-switch { visibility: hidden; pointer-events: none; }
.legal-links { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.legal-link { font-size: 13px; }
.field-privacy { display: block; margin-top: 6px; font-size: 12.5px; opacity: .75; }

/* Язык и английский экран согласия */
.offer-summary { margin: 8px 0 10px; padding-left: 18px; text-align: left; line-height: 1.45; }
.offer-summary li { margin: 4px 0; }
.offer-doc-line { margin: 2px 0; text-align: left; }
.offer-doc-note { margin-top: 10px; font-style: italic; }
.lang-actions { flex-direction: row; gap: 8px; }
.lang-actions .sign-chip { flex: 1; min-height: 2.8rem; align-items: center; font-size: 0.95rem; }
/* Четыре языка (ru, en, es, pt — es/pt по флагу): сетка 2×2 в профиле и на экране выбора. */
.lang-actions.lang-actions-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.offer-gate-card .sheet-actions.lang-actions-4 { grid-template-columns: 1fr 1fr; }
.offer-gate-card .sheet-actions.lang-actions-4 .btn { justify-content: center; }


/* Компактная смена языка слева в шапке главной: в одном ряду с «Тарифы»,
   ниже padding body (env(safe-area-inset-*)), без наложений на узкой ширине. */
.lang-switch {
  position: relative;
  flex: 0 0 auto;
  z-index: 9;
}
.lang-switch-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  min-height: 2.25rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(224, 196, 138, 0.07);
  color: var(--gold);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1;
  cursor: pointer;
}
.lang-switch-btn[aria-expanded="true"],
.lang-switch-btn:active {
  border-color: var(--gold-dim);
  background: rgba(224, 196, 138, 0.14);
}
.lang-switch-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 9.75rem;
  max-width: min(16rem, calc(100vw - 1.5rem));
  padding: 0.3rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: var(--raise);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  display: grid;
  gap: 0.15rem;
}
.lang-switch-menu[hidden] { display: none; }
.lang-switch-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  min-height: 2.4rem;
  cursor: pointer;
}
.lang-switch-menu button.is-active {
  color: var(--gold);
  background: rgba(224, 196, 138, 0.14);
}
.lang-switch-menu button:disabled { opacity: 0.6; }
@media (max-width: 360px) {
  .lang-switch-btn { min-width: 2.4rem; padding: 0.3rem 0.5rem; font-size: 0.74rem; }
}

.translate-status, .translate-error {
  margin: 0.25rem 0 0.8rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.8rem;
}
.translate-status {
  color: var(--gold);
  background: rgba(224, 196, 138, 0.12);
}
.translate-error {
  color: var(--ink);
  background: rgba(224, 196, 138, 0.08);
}
