/* Desastro — глубокий космос: снимки туманностей, лавандовое свечение, октаграмма с цветами чакр.
   Один движущийся элемент — медленно вращающееся кольцо возрастов знака на главной. */
:root {
  --void: #06040D;
  --deep: #0D0820;
  --panel: rgba(18, 12, 38, .78);
  --panel-2: #120B28;
  --line: rgba(196, 181, 253, .22);
  --line-strong: rgba(196, 181, 253, .6);
  --accent: #C4B5FD;
  --accent-hi: #EDE9FE;
  --accent-lo: #8B5CF6;
  --ink: #EFE9F8;
  --ink-2: #DCD3EC;
  --mist: #ABA0C4;
  --ok: #8FE3B8;
  --err: #FF8A8A;
  --c-violet: #8E4EC6;
  --c-gold: #F2C230;
  --c-red: #CC3A3A;
  --c-green: #4CD28E;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--void); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0; line-height: 1.08; text-wrap: balance; }
p { margin: 0; }
img, svg { max-width: 100%; }
button, input { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 90; background: var(--accent); color: #1A0B33; padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 18px; }

/* ---------- header ---------- */
.site-head { position: absolute; inset: 0 0 auto 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px); }
body:not(.on-home) .site-head { position: relative; border-bottom: 1px solid var(--line); background: rgba(6, 4, 13, .9); }
.site-head-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; font: 600 22px var(--serif); letter-spacing: .02em; white-space: nowrap; }
.logo-mark { width: 30px; height: 30px; color: var(--accent); }
.ghost-pill { border: 1px solid var(--line); color: var(--ink); background: rgba(13, 8, 32, .5); padding: 8px 16px; border-radius: 999px; font-size: 14px; cursor: pointer; flex-shrink: 0; white-space: nowrap; }
.ghost-pill:hover { border-color: var(--accent); }
.head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
a.ghost-pill { display: inline-flex; align-items: center; text-decoration: none; }
.demo-banner { position: relative; z-index: 21; text-align: center; font-size: 14px; font-weight: 600; padding: 9px 16px; color: #FFFFFF; background: repeating-linear-gradient(-45deg, #4C1D95, #4C1D95 12px, #5B21B6 12px, #5B21B6 24px); }

/* ---------- buttons & fields ---------- */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 26px;
  border: 0; border-radius: 14px; cursor: pointer; font: 600 17px var(--sans); color: #FFFFFF; text-decoration: none; text-align: center;
  background: linear-gradient(135deg, #7C3AED 0%, #A855F7 55%, #D946EF 100%);
  box-shadow: 0 10px 30px rgba(168, 85, 247, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  position: relative; overflow: hidden;
}
.cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s; }
.cta:hover::after { transform: translateX(120%); }
.cta:disabled { filter: grayscale(.6); cursor: progress; }
.cta--wide { width: 100%; }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-outline:hover { background: rgba(196, 181, 253, .1); }
.pill-btn { display: inline-flex; align-items: center; min-height: 42px; border: 1px solid var(--line); background: rgba(13, 8, 32, .6); color: var(--ink); border-radius: 999px; padding: 0 16px; cursor: pointer; font-size: 14px; text-decoration: none; }
.pill-btn:hover { border-color: var(--accent); color: var(--accent); }
.link-btn { display: block; margin: 10px auto 0; background: none; border: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 40px; font-size: 15px; }
.fine { font-size: 12.5px; color: var(--mist); }
.form-error { color: var(--err); font-size: 14px; }
.form-error:empty { display: none; }
.form-ok { color: var(--ok); font-size: 14px; }
.form-ok:empty { display: none; }
.field { display: grid; gap: 6px; margin-bottom: 12px; font-size: 13px; color: var(--mist); }
.field > span { font-weight: 500; }
.field em { font-style: normal; opacity: .8; }
.field input { width: 100%; min-height: 52px; border-radius: 12px; border: 1px solid rgba(196, 181, 253, .3); background: rgba(6, 4, 13, .65); color: var(--ink); padding: 0 14px; font-size: 16px; }
.field input:focus, .calc-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196, 181, 253, .18); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding-block: calc(78px + env(safe-area-inset-top, 0px)) 52px; }
.hero-bg { position: absolute; inset: 0; z-index: -2; background: url("/static/nebula-tall.webp") center top / cover no-repeat; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(ellipse 70% 45% at 70% 40%, rgba(120, 60, 170, .28), transparent 70%),
  linear-gradient(180deg, rgba(6, 4, 13, .55) 0%, rgba(6, 4, 13, .62) 45%, rgba(6, 4, 13, .94) 82%, var(--void) 100%); }
.starfield { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero-grid { display: grid; gap: 14px; align-items: center; }
.sigil { width: min(52vw, 210px); aspect-ratio: 1; margin: 0 auto; }
.sigil svg, .status-mark svg { width: 100%; height: 100%; overflow: visible; }
.sg-turn { transform-origin: 200px 200px; animation: turn 120s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.sg-tick { stroke: var(--accent); stroke-opacity: .45; stroke-width: 1; }
.sg-tick--major { stroke-opacity: .9; stroke-width: 1.6; }
.sg-star { fill: var(--accent-hi); }
.sg-ring { fill: none; stroke: var(--accent); stroke-opacity: .5; }
.sg-ring--inner { stroke-opacity: .25; }
.sg-sq { fill: none; stroke: var(--accent-hi); stroke-opacity: .85; stroke-width: 1.4; }
.sg-axis { stroke: var(--accent); stroke-opacity: .25; }
.sg-male { stroke: #7C8CFF; stroke-opacity: .6; stroke-dasharray: 4 4; }
.sg-female { stroke: #FF7AB6; stroke-opacity: .6; stroke-dasharray: 4 4; }
.sg-node { stroke: var(--accent-hi); stroke-width: 1; }
.sg-core { filter: drop-shadow(0 0 22px rgba(167, 139, 250, .65)); }
.status-mark .sg-turn { animation-duration: 8s; }
.status-mark.is-done .sg-turn, .status-mark.is-fail .sg-turn { animation: none; }
.kicker { font: italic 500 19px var(--serif); color: var(--accent); letter-spacing: .02em; }
.hero h1 { font-size: clamp(50px, 14vw, 108px); letter-spacing: .005em; margin: 6px 0 14px;
  background: linear-gradient(180deg, var(--accent-hi) 15%, var(--accent) 55%, var(--accent-lo) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 33em; }
.calc { margin-top: 24px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); max-width: 480px; display: grid; gap: 10px; }
.calc-label { font-size: 13px; color: var(--mist); }
.pair-person, #pair-own { display: grid; gap: 10px; }
.pair-who { font: 600 20px var(--serif); color: var(--ink); }
.pair-person + .pair-person { padding-top: 14px; border-top: 1px solid var(--line); }
.calc-input { width: 100%; min-height: 56px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(196, 181, 253, .3); background: rgba(6, 4, 13, .65); color: var(--ink); font: 600 24px var(--serif); letter-spacing: .08em; }
.calc-input::placeholder { color: rgba(171, 160, 196, .55); }
.calc-input[aria-invalid="true"] { border-color: var(--err); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 20px; color: var(--ink-2); font-size: 14px; }
.facts span { display: inline-flex; align-items: center; gap: 8px; }
.facts svg { width: 14px; height: 14px; color: var(--accent); }

/* ---------- landing sections ---------- */
.block { padding-block: 60px; }
.sec-title { font-size: clamp(36px, 8vw, 52px); text-align: center; }
.sec-sub { text-align: center; color: var(--mist); margin: 12px auto 34px; max-width: 34em; }
.grid-learn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { padding: 18px 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(30, 20, 60, .65), rgba(14, 9, 30, .65)); border: 1px solid var(--line); min-width: 0; }
.tile svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 10px; }
.tile h3 { font-size: 21px; margin-bottom: 6px; overflow-wrap: anywhere; hyphens: auto; }
.tile p { font-size: 14px; color: var(--mist); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: start; }
.step b { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font: 600 24px var(--serif); color: var(--accent); border: 1px solid var(--line); background: radial-gradient(circle, rgba(196, 181, 253, .15), transparent 70%); }
.step h3 { font-size: 25px; margin: 4px 0; }
.step p { color: var(--mist); }
.sample { position: relative; overflow: hidden; isolation: isolate; border-radius: 26px; border: 1px solid var(--line); }
.sample-bg { position: absolute; inset: 0; z-index: -1; background: url("/static/nebula-pillars.webp") center / cover; opacity: .55; }
.sample-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 4, 13, .5), rgba(6, 4, 13, .92)); }
.sample-in { display: grid; gap: 22px; padding: 30px 18px; align-items: center; }
.sample h2 { font-size: clamp(34px, 7vw, 48px); }
.sample p { color: var(--ink-2); margin-top: 12px; }
.legend-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-size: 14px; color: var(--mist); }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dot--violet { background: var(--c-violet); }
.dot--gold { background: var(--c-gold); }
.dot--red { background: var(--c-red); }
.dot--green { background: var(--c-green); }
.recent-list { list-style: none; padding: 0; margin: 0 auto; max-width: 640px; display: grid; gap: 8px; }
.recent-list a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink); text-decoration: none; }
.recent-list a:hover { border-color: var(--accent); }
.recent-list small { color: var(--mist); font-size: 13px; }
.recent .sec-title { margin-bottom: 20px; }
.muted-item { color: var(--mist); padding: 12px 4px; }
.faq { max-width: 760px; margin: 30px auto 0; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 4px 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font: 600 21px var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--sans); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--mist); padding-bottom: 16px; }
.final { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding-block: 76px; }
.final-bg { position: absolute; inset: 0; z-index: -1; background: url("/static/nebula-orion.webp") center / cover; opacity: .5; }
.final-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(6, 4, 13, .35), var(--void) 75%); }
.final h2 { font-size: clamp(36px, 9vw, 62px); }
.final .calc { margin: 26px auto 0; text-align: left; }

/* ---------- tariffs as tarot cards ---------- */
.tarots { display: grid; gap: 18px; }
.tarot { position: relative; padding: 30px 22px 24px; border-radius: 20px; background: linear-gradient(180deg, #171032, #0C0820); border: 1px solid var(--line); display: grid; gap: 14px; align-content: start; color: var(--ink); text-align: left; font: inherit; width: 100%; }
.tarot::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(196, 181, 253, .14); border-radius: 14px; pointer-events: none; }
.tarot-num { font: italic 600 18px var(--serif); color: var(--accent); text-align: center; }
.tarot h3 { font-size: 34px; text-align: center; }
.tarot-note { text-align: center; color: var(--mist); font-size: 14px; margin-top: -8px; }
.tarot-price { text-align: center; font: 600 46px var(--serif); color: var(--accent-hi); }
.tarot-old { display: block; text-align: center; margin-top: -6px; color: var(--mist); font-size: 15px; }
.tarot-price small { font: 500 15px var(--sans); color: var(--mist); }
.tarot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 15px; color: var(--ink-2); }
.tarot li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.tarot li svg { width: 16px; height: 16px; margin-top: 4px; color: var(--accent); }
.tarot .cta, .tarot .btn-outline { margin-top: 6px; }
.tarot--max { border-color: var(--line-strong); background: radial-gradient(ellipse at 50% 0%, rgba(196, 181, 253, .14), transparent 60%), linear-gradient(180deg, #1D1338, #0D0822); box-shadow: 0 18px 50px rgba(196, 181, 253, .12); }
.badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #7C3AED, #C026D3); color: #FFFFFF; font-size: 12.5px; font-weight: 600; padding: 5px 14px; border-radius: 999px; white-space: nowrap; }
.choose .tarot { cursor: pointer; }
.choose .tarot[aria-checked="true"] { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- report ---------- */
.res-head { text-align: center; padding-block: 28px 8px; }
.res-kicker { color: var(--accent); font: italic 500 19px var(--serif); }
.res-head h1 { font-size: clamp(38px, 10vw, 62px); margin-top: 4px; }
.chart { position: relative; isolation: isolate; max-width: 560px; margin: 8px auto 0; }
.chart-glow { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(167, 139, 250, .22), transparent 65%); z-index: -1; }
.ring-veil { position: absolute; inset: 0; border-radius: 50%; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 75%, #000 76.5% 100%); mask: radial-gradient(circle closest-side, transparent 0 75%, #000 76.5% 100%); pointer-events: none; }
.ring-chip { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); white-space: nowrap; max-width: 96%; overflow: hidden; text-overflow: ellipsis; background: rgba(13, 8, 32, .92); border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; }
.node-tip { position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 16px)); min-width: 170px; max-width: 240px; padding: 10px 14px; border-radius: 12px; background: #1B1236; border: 1px solid var(--accent); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); pointer-events: none; }
.node-tip.is-below { transform: translate(-50%, 18px); }
.tip-label { display: block; color: var(--mist); font-size: 12px; }
.tip-name { display: block; font: 600 20px var(--serif); color: var(--accent-hi); }
.tip-arch { display: block; color: var(--ink-2); font-size: 14px; }

/* octagram, dark edition (classes come from the server-rendered chart) */
.mx { display: block; width: 100%; height: auto; overflow: visible; }
.mx-ring { fill: none; stroke: rgba(196, 181, 253, .35); stroke-width: 1.4; }
.mx-tick { stroke: rgba(196, 181, 253, .45); stroke-width: 1; }
.mx-tick--major { stroke: var(--accent); stroke-width: 1.6; }
.mx-age { font: 600 14px var(--sans); fill: var(--accent); text-anchor: middle; dominant-baseline: central; }
.mx-rv { font: 11px var(--sans); fill: var(--mist); text-anchor: middle; dominant-baseline: central; }
.mx-rv--now { font-weight: 700; fill: var(--accent-hi); font-size: 13px; }
.mx-now { fill: var(--accent); }
.mx-sq { fill: none; stroke: rgba(247, 228, 180, .75); stroke-width: 1.6; stroke-linejoin: round; }
.mx-axis { stroke: rgba(196, 181, 253, .25); stroke-width: 1; }
.mx-male { stroke: #7C8CFF; stroke-width: 1.4; stroke-dasharray: 5 4; }
.mx-female { stroke: #FF7AB6; stroke-width: 1.4; stroke-dasharray: 5 4; }
.mx-chan { stroke: var(--c-green); stroke-width: 1.6; }
.mx-cap { font: italic 13px var(--serif); text-anchor: middle; }
.mx-cap--male { fill: #9AA6FF; }
.mx-cap--female { fill: #FF9CC8; }
.mx-sign { font: 700 19px var(--serif); text-anchor: middle; dominant-baseline: central; }
.mx-sign--money { fill: #5BE3A0; }
.mx-sign--love { fill: #FF7AB6; }
.mx-hit { fill: transparent; }
.mx-dot { stroke: rgba(255, 255, 255, .55); stroke-width: 1.2; filter: drop-shadow(0 0 6px rgba(200, 180, 255, .45)); }
.mx-num { font-family: var(--serif); font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.mx-node--xl .mx-num { font-size: 23px; }
.mx-node--m .mx-num { font-size: 16px; }
.mx-node--s .mx-num { font-size: 14px; }
.mx-node { cursor: pointer; outline: none; }
.mx-node:focus-visible .mx-dot, .mx-node.is-active .mx-dot { stroke: var(--accent-hi); stroke-width: 3; }
.chart--sample .mx-num { opacity: 0; transition: opacity .3s; }
.chart--sample .mx-node.is-set .mx-num { opacity: 1; }
.chart--sample .mx-node { cursor: default; }

.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 30px auto 0; max-width: 760px; }
.key { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--panel); min-width: 0; }
.key dt { color: var(--mist); font-size: 12.5px; margin-bottom: 8px; }
.key dd { margin: 0; display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center; }
.key-num { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 21px var(--serif); background: radial-gradient(circle at 35% 30%, #F5F3FF, #A78BFA 65%, #7C3AED); color: #1A0B33; box-shadow: 0 0 18px rgba(196, 181, 253, .4); }
.key-name { display: block; font: 600 19px/1.1 var(--serif); }
.key-arch { display: block; color: var(--mist); font-size: 13px; font-style: italic; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }

.reading { max-width: 760px; margin: 34px auto 0; display: grid; gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.panel-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 18px; background: none; border: 0; color: var(--ink); text-align: left; cursor: pointer; }
.panel-head h2 { flex: 1; font-size: clamp(25px, 6vw, 30px); }
.panel-tag { font-size: 12px; color: var(--ok); border: 1px solid rgba(143, 227, 184, .4); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.panel-tag--paid { color: var(--accent); border-color: var(--line-strong); }
.chev { width: 18px; height: 18px; flex: none; color: var(--mist); transition: transform .25s; }
.panel-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.panel-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.panel-body.is-open { grid-template-rows: 1fr; }
.panel-inner { overflow: hidden; }
.panel-content { padding: 0 18px 20px; }

/* server-rendered section content */
.panel-content p { color: var(--ink-2); margin-bottom: 10px; max-width: 40em; }
.panel-content h4 { font: 600 20px var(--serif); margin: 14px 0 6px; color: var(--accent); }
.arc { margin: 16px 0 20px; }
.arc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.arc-num { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--accent); font: 700 20px var(--serif); color: var(--accent-hi); background: radial-gradient(circle, rgba(196, 181, 253, .12), transparent 70%); }
.arc-name { font: 600 21px var(--serif); }
.arc-arch { font-style: italic; color: var(--mist); font-weight: 500; }
.arc-role { font-size: 13px; color: var(--mist); }
.kv span { color: var(--accent); font-weight: 600; }
.panel-content .note { color: var(--mist); font-size: 14px; }
.verdict { border-left: 2px solid var(--accent); padding: 2px 0 2px 14px; margin: 14px 0; }
.panel-content .verdict p { font: 500 19px/1.45 var(--serif); color: var(--ink); margin: 0; }
.list { padding-left: 1.2em; margin: 0 0 12px; color: var(--ink-2); }
.list li { margin-bottom: 6px; }
.list--plus li::marker { content: "+  "; color: var(--ok); font-weight: 700; }
.list--minus li::marker { content: "−  "; color: var(--err); font-weight: 700; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--ink-2); }
.legend li { padding-left: 14px; border-left: 2px solid var(--line); }
.tbl-wrap { overflow-x: auto; margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 12px; }
.tbl-wrap--scroll { max-height: 440px; overflow-y: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl thead th { position: sticky; top: 0; z-index: 1; background: #1A1233; color: var(--mist); font-size: 13px; }
.tbl tbody th { font-weight: 600; }
.tbl td { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tbl tr.now { background: rgba(196, 181, 253, .16); }
.tbl tr.total { background: rgba(196, 181, 253, .08); font-weight: 700; }

.locked-wrap { padding: 18px; }
.locked-wrap > h2 { font-size: clamp(25px, 6vw, 30px); margin-bottom: 12px; }
.locked-list { display: grid; gap: 10px; }
.locked { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: rgba(14, 9, 30, .7); }
.locked svg { width: 22px; height: 22px; color: var(--accent); }
.locked h3 { font-size: 21px; }
.locked p { color: var(--mist); font-size: 13.5px; }
.locked .open { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--accent); font-size: 13px; background: none; cursor: pointer; }
.unlock { margin-top: 18px; text-align: center; padding: 28px 18px; border-radius: 22px; border: 1px solid var(--line-strong); background: radial-gradient(ellipse at 50% 0%, rgba(196, 181, 253, .16), transparent 65%), var(--panel-2); }
.unlock h2 { font-size: clamp(30px, 7vw, 42px); }
.unlock p { color: var(--ink-2); margin: 10px auto 20px; max-width: 30em; }
.disclaimer { max-width: 760px; margin: 30px auto 60px; font-size: 13px; color: var(--mist); }

/* ---------- checkout & status ---------- */
.checkout { max-width: 900px; padding-block: 34px 60px; }
.checkout h1 { font-size: clamp(38px, 9vw, 58px); text-align: center; }
.pay { max-width: 480px; margin: 26px auto 0; display: grid; gap: 12px; }
.secure { display: flex; gap: 8px; align-items: flex-start; justify-content: center; color: var(--mist); font-size: 13px; text-align: center; }
.secure svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--ok); }
.status { text-align: center; padding-block: 50px 70px; max-width: 560px; }
.status-mark { width: 150px; height: 150px; margin: 0 auto 18px; }
.status-mark.is-fail { filter: grayscale(1) opacity(.6); }
.status h1 { font-size: clamp(36px, 9vw, 52px); margin-bottom: 10px; }
.status .lead { margin: 0 auto; }
.status-actions { display: grid; gap: 10px; max-width: 360px; margin: 26px auto 0; }
.status-actions .btn-outline { width: 100%; }

/* ---------- sheets ---------- */
.sheet { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; z-index: 60; width: min(440px, calc(100% - 24px)); max-height: calc(100vh - 32px); overflow: auto; border: 1px solid var(--line); border-radius: 20px; padding: 26px 18px 20px; background: #110A26; color: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.sheet-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(3, 2, 8, .7); }
.sheet h2 { font-size: 32px; margin-bottom: 6px; }
.sheet h3 { font-size: 21px; margin: 16px 0 8px; }
.profile-box { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink-2); }
.profile-box p { margin: 0; }
.profile-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 15px; }
.profile-facts dt { color: var(--mist); }
.profile-facts dd { margin: 0; color: var(--ink); overflow-wrap: break-word; min-width: 0; }
/* A spoiler: the summary is a row with a count and a chevron; the content opens below it. */
.spoiler > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.spoiler > summary::-webkit-details-marker { display: none; }
.spoiler > summary::after { content: ""; width: 9px; height: 9px; margin-left: auto; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s; }
.spoiler[open] > summary::after { transform: rotate(-135deg); }
.spoiler-title { font: 600 24px/1.1 var(--serif); color: var(--ink); }
.spoiler-count { min-width: 26px; padding: 2px 9px; border-radius: 999px; background: rgba(196, 181, 253, .14); color: var(--accent); font-size: 13px; font-weight: 600; text-align: center; }
.spoiler[open] > summary { margin-bottom: 10px; }
.spoiler--small > summary { padding: 10px 14px; }
.spoiler--small .spoiler-title { font: 600 15px/1.3 var(--sans); }
.profile-box .spoiler--small > summary { border-color: transparent; background: rgba(196, 181, 253, .08); }
.profile-calcs { margin: 18px 0 12px; }
.profile-fold { margin-top: 18px; }
.ghost-pill--accent { background: rgba(196, 181, 253, .16); border-color: rgba(196, 181, 253, .5); }
.sheet .profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sheet .profile-links .ghost-pill { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 20px; font-size: 15px; text-decoration: none; }
.notify-form { gap: 12px; }
.notify-on { margin: 0; color: var(--ok); font-weight: 600; }
.notify-types { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; min-width: 0; }
.notify-types legend { padding: 0; margin-bottom: 6px; color: var(--mist); font-size: 14px; }
.notify-types:disabled { opacity: .5; }
.notify-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.notify-quiet select, #tz-select { min-height: 44px; border-radius: 10px; border: 1px solid rgba(196, 181, 253, .3); background: rgba(6, 4, 13, .65); color: var(--ink); padding: 0 10px; font-size: 15px; }
#tz-select { width: 100%; }
.recent .spoiler { max-width: 640px; margin: 0 auto; }
.link-btn--danger { color: var(--err); }
/* The promo code field next to a payment and in the account. */
.promo-field { display: grid; gap: 6px; }
.promo-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; }
.promo-label { grid-column: 1 / -1; font-size: 13px; color: var(--mist); }
.promo-form .btn-outline { min-height: 50px; }
.promo-on { margin: 0; color: var(--ok); font-weight: 600; }
.promo-off { margin: 0; justify-self: start; min-height: 32px; }
.sheet-lead { color: var(--mist); }
.sheet-close { position: absolute; top: 8px; right: 8px; }
.sheet-close button { width: 40px; height: 40px; border: 0; background: none; font-size: 26px; color: var(--mist); cursor: pointer; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 16px 0; background: rgba(255, 255, 255, .05); border-radius: 12px; }
.tabs button { min-height: 40px; border: 0; border-radius: 9px; background: none; font-weight: 600; color: var(--mist); cursor: pointer; }
.tabs button[aria-selected="true"] { background: rgba(196, 181, 253, .14); color: var(--accent); }
.auth-form { margin-top: 12px; }
#form-register > .fine { margin: 0 0 14px; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mist); margin: 6px 0 14px; }
.check-line input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--accent); }
.auth-or { text-align: center; color: var(--mist); font-size: 14px; margin: 16px 0 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 18px; border-radius: 12px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn--primary { background: linear-gradient(135deg, #7C3AED 0%, #A855F7 55%, #D946EF 100%); color: #FFFFFF; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--wide { width: 100%; }
.btn--tg { background: #2AABEE; color: #fff; }
.login-buttons { display: flex; justify-content: center; gap: 14px; margin: 8px 0 12px; }
.auth-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; padding: 0; }
.auth-icon:hover { border-color: var(--accent); }
.auth-icon:disabled { opacity: .5; }
.btn--link { min-height: 44px; padding: 0 14px; gap: 8px; font-size: 14.5px; white-space: nowrap; }
.btn--vk, .btn--ya, .btn--tg { color: #fff; }
.btn--vk:hover, .btn--ya:hover, .btn--tg:hover { filter: brightness(1.08); }
.btn-ico { width: 20px; height: 20px; flex: none; }
.btn-ico--telegram, .btn-ico--vk { filter: brightness(0) invert(1); }
.btn-ico--yandex { border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; }
.btn--danger { background: #D63B3B; color: #fff; border-color: #D63B3B; }
.btn--danger:hover { background: #E04848; }
.btn--small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn--vk { background: #0077FF; color: #fff; }
.btn--ya { background: #FC3F1D; color: #fff; }
.login-wait { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; color: var(--ink-2); display: grid; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 70; background: #1B1236; border: 1px solid var(--accent); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-size: 15px; max-width: calc(100% - 32px); }

/* ---------- footer, documents, error pages ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 30px calc(40px + var(--safe-b)); color: var(--mist); font-size: 13px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; font-size: 14px; }
/* On a phone the footer keeps the documents and the 18+ line; the tools are in the app's tabs and the header. */
@media (max-width: 819px) { .foot-tools { display: none; } }
.foot p + p { margin-top: 6px; }
.doc { max-width: 760px; margin: 0 auto; padding: 28px 18px 70px; }
.doc h1 { font-size: clamp(34px, 8vw, 48px); margin-bottom: 18px; }
.doc h2 { font-size: 26px; margin: 28px 0 10px; color: var(--accent); }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin-bottom: 10px; }
.doc li { margin-bottom: 6px; }
.doc .back { display: inline-block; margin-bottom: 18px; }
.page-msg { display: grid; place-items: center; min-height: 100vh; padding: 18px; }
.msg { max-width: 440px; text-align: center; display: grid; gap: 12px; }
.msg-code { font: 600 72px var(--serif); color: var(--accent); }
.msg h1 { font-size: 34px; }
.msg p { color: var(--ink-2); }

/* ---------- hub ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hub-hero .hero-bg { background-image: url("/static/nebula-orion-s.webp"); }
.orrery-wrap { width: min(84vw, 330px); margin: 0 auto; }
.orrery { display: block; width: 100%; height: auto; overflow: visible; }
.orb-ring { fill: none; stroke: var(--accent); stroke-opacity: .38; stroke-width: 1; stroke-dasharray: 654; stroke-dashoffset: 654; animation: orb-draw 1.6s ease-out .1s forwards; }
.orb-ring--outer { stroke-opacity: .4; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: .1 7; stroke-dashoffset: 0; transform-box: view-box; transform-origin: 180px 180px; animation: orb-fade 1.4s ease-out .4s both, orb-turn 240s linear infinite; }
/* Both orbits turn together, so the planets never run into each other; each icon turns back at the same speed and
   stays upright. The seal in the centre turns slowly the other way, its halo breathes. Off with "reduce motion"
   (the rule at the end). */
.orb-orbit, .orb-core, .orb-halo { transform-box: view-box; transform-origin: 180px 180px; }
.orb-orbit { animation: orb-turn 60s linear infinite; }
.orb-upright { transform-box: fill-box; transform-origin: center; animation: orb-turn 60s linear infinite reverse; }
.orb-core { animation: orb-turn 120s linear infinite reverse; }
.orb-halo { animation: orb-breathe 5s ease-in-out infinite alternate; }
.orb-core-glyph { color: var(--accent-hi); filter: drop-shadow(0 0 16px rgba(196, 181, 253, .85)); }
.orb-core-dot { fill: var(--accent-hi); }
.orb-planet { animation: orb-fade .9s ease-out both; }
.orb-planet circle { fill: #120B28; stroke: var(--line-strong); stroke-width: 1; }
.orb-planet use { color: var(--accent-hi); }
.orb-planet--soon { opacity: .5; }
.orb-planet--soon circle { stroke: var(--accent); stroke-dasharray: 3 4; }
.orb-planet--soon use { color: var(--accent); }
.d1 { animation-delay: .7s; } .d2 { animation-delay: .85s; } .d3 { animation-delay: 1s; } .d4 { animation-delay: 1.15s; } .d5 { animation-delay: 1.3s; } .d6 { animation-delay: 1.45s; }
@keyframes orb-draw { to { stroke-dashoffset: 0; } }
@keyframes orb-fade { from { opacity: 0; } }
@keyframes orb-turn { to { transform: rotate(360deg); } }
@keyframes orb-breathe { from { opacity: .75; transform: scale(.94); } to { opacity: 1; transform: scale(1.06); } }
.hub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-top: 26px; }
.hub-actions .link-btn { margin: 0; display: inline-flex; align-items: center; }
.tools { display: grid; gap: 14px; }
.tool { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 16px; align-items: start; padding: 20px 18px; border-radius: 18px; color: var(--ink); text-decoration: none; }
.tool-glyph { width: 52px; height: 52px; }
.tool-body h3 { font-size: 27px; }
.tool-body p { color: var(--mist); font-size: 15px; margin-top: 6px; }
.tool--on { border: 1px solid var(--line-strong); background: radial-gradient(ellipse at 0% 0%, rgba(196, 181, 253, .16), transparent 60%), linear-gradient(180deg, #1A1135, #0D0822); box-shadow: 0 18px 50px rgba(124, 58, 237, .18); }
.tool--on:hover { border-color: var(--accent); }
.tool--on .tool-glyph { color: var(--accent-hi); filter: drop-shadow(0 0 10px rgba(196, 181, 253, .6)); }
.tool-cta { grid-column: 1 / -1; margin-top: 14px; }
.tool--soon { border: 1px dashed rgba(196, 181, 253, .3); background: rgba(10, 6, 22, .45); }
.tool--soon .tool-glyph { color: var(--accent); opacity: .6; }
.tool-chip { display: inline-block; vertical-align: middle; margin-left: 8px; font: 500 12.5px/1.5 var(--sans); color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; }
.tool-notify { grid-column: 2; justify-self: start; margin-top: 10px; }
.tool-notify:disabled { color: var(--ok); border-color: rgba(143, 227, 184, .4); cursor: default; }
.hub-steps { max-width: 760px; margin: 30px auto 0; }
.hub-stats { text-align: center; font: italic 500 24px/1.4 var(--serif); color: var(--ink-2); padding-bottom: 50px; }
.hub-stats b { font-style: normal; color: var(--accent-hi); }

/* ---------- tarot ---------- */
.hero--tool { padding-block: calc(76px + env(safe-area-inset-top, 0px)) 30px; }
.hero--tool h1 { font-size: clamp(52px, 15vw, 96px); }
.tarot-bg { background-image: url("/static/nebula-pillars-s.webp"); }
.tcard { position: relative; display: block; width: 100%; aspect-ratio: 600 / 894; padding: 0; border: 0; background: none; perspective: 1200px; cursor: default; }
button.tcard { cursor: pointer; }
.tcard-inner { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, .7, .2, 1); }
.tcard.is-open .tcard-inner { transform: rotateY(180deg); }
.tcard.no-anim .tcard-inner { transition: none; }
.tcard-back, .tcard-front { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 6.5% / 4.4%; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(196, 181, 253, .25); object-fit: cover; }
.tcard-front { transform: rotateY(180deg); }
.tcard.is-rev .tcard-front { transform: rotateY(180deg) rotate(180deg); }
.tcard--big { max-width: 260px; margin: 0 auto; }
button.tcard--big:not(.is-open) .tcard-back { box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(196, 181, 253, .35), 0 0 40px rgba(167, 139, 250, .35); }
.day-in { display: grid; gap: 22px; align-items: center; }
.day-card { width: min(62vw, 260px); margin: 0 auto; }
.sec-title--left { text-align: left; }
.day-text { display: grid; gap: 10px; max-width: 34em; }
.day-hint { color: var(--mist); }
#day-body { display: grid; gap: 10px; }
.card-name { font: 600 26px/1.15 var(--serif); color: var(--accent-hi); }
.card-keys { color: var(--accent); font-size: 14px; }
.card-advice { border-left: 2px solid var(--accent-lo); padding-left: 12px; color: var(--ink); font-style: italic; }
.card-waite { color: var(--mist); font-size: 13.5px; }
.spread-form { max-width: 640px; margin: 0 auto; display: grid; gap: 14px; }
.spreads { display: grid; gap: 10px; }
.spread { display: grid; gap: 4px; align-content: start; text-align: left; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; }
.spread[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 30px rgba(124, 58, 237, .2); }
.spread-title { font: 600 24px/1.1 var(--serif); }
.spread-sub { color: var(--mist); font-size: 14px; }
.spread-price { color: var(--accent); font-size: 14px; font-weight: 600; }
.field textarea, .field select { width: 100%; border-radius: 12px; border: 1px solid rgba(196, 181, 253, .3); background: rgba(6, 4, 13, .65); color: var(--ink); padding: 12px 14px; font: 16px/1.4 var(--sans); }
.field select { min-height: 52px; }
.field select:disabled { opacity: .5; }
.signif { border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px 12px; background: rgba(13, 8, 32, .5); }
.signif summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.signif summary em { font-style: normal; color: var(--mist); font-weight: 400; font-size: 13px; }
.muted-p { color: var(--mist); font-size: 14px; margin-bottom: 12px; }
.signif-card { display: flex; align-items: center; gap: 12px; }
.signif-card img { width: 64px; height: auto; border-radius: 6px; }
.reading-wrap { padding-block: 26px 60px; max-width: 900px; }
.reading-question { text-align: center; font: italic 500 21px/1.35 var(--serif); color: var(--ink-2); margin-top: 8px; }
.signif-line { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--mist); font-size: 14px; margin-top: 14px; }
.signif-line img { width: 34px; height: auto; border-radius: 3px; }
.layout { margin: 22px auto 10px; }
.layout--three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.layout--celtic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 6px minmax(0, 1fr); grid-template-rows: repeat(4, auto); gap: 10px 8px; max-width: 540px; }
.slot { margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; display: grid; gap: 6px; justify-items: center; min-width: 0; }
.slot-cap { font-size: 12.5px; color: var(--mist); text-align: center; }
.layout--celtic .slot-cap { font: 600 15px var(--serif); color: var(--accent); }
/* Waite's diagram: the Significator faces left, so 6 (before him) is on the left and 5 (behind him) on the right. */
.c1 { grid-area: 2 / 2; }
.c2 { grid-area: 2 / 2; z-index: 1; transform: rotate(90deg) scale(.86); }
.c2 .slot-cap { transform: rotate(-90deg); }
.c3 { grid-area: 1 / 2; }
.c4 { grid-area: 3 / 2; }
.c5 { grid-area: 2 / 3; }
.c6 { grid-area: 2 / 1; }
.c7 { grid-area: 4 / 5; }
.c8 { grid-area: 3 / 5; }
.c9 { grid-area: 2 / 5; }
.c10 { grid-area: 1 / 5; }
.pos { display: grid; gap: 10px; padding: 18px 0; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.pos-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; }
.pos-thumb { width: 64px; height: auto; border-radius: 5px; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.pos-thumb.is-rev { transform: rotate(180deg); }
.pos h3 { font-size: 23px; margin-bottom: 2px; }
.pos-text { color: var(--mist); font-size: 14.5px; font-style: italic; }
.summary { margin-top: 10px; padding: 20px 18px; border-radius: 18px; border: 1px solid var(--line-strong); background: radial-gradient(ellipse at 0% 0%, rgba(196, 181, 253, .12), transparent 60%), var(--panel); display: grid; gap: 10px; }
.summary h2 { font-size: 30px; }
.locked-pay { margin: 18px 0; padding: 20px 18px; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--panel); display: grid; gap: 12px; }
.locked-pay h2 { font-size: 28px; }
.reading-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 18px; }
.refine-note { max-width: 46em; margin: 22px auto 0; text-align: center; color: var(--mist); font-size: 14.5px; }

/* ---------- numerology ---------- */
.num-bg { background-image: url("/static/nebula-wide.webp"); }
.num-tabs { max-width: 480px; margin: 22px 0 0; }
.hero--tool .calc { margin-top: 12px; }
.calc-label em { font-style: normal; opacity: .75; }
.text-input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(196, 181, 253, .3); background: rgba(6, 4, 13, .65); color: var(--ink); font-size: 16px; }
.text-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196, 181, 253, .18); }
.nsec { display: grid; gap: 12px; padding: 22px 0; border-top: 1px solid var(--line); }
.nsec h2 { font-size: clamp(30px, 7vw, 40px); }
.nsub { font-size: 23px; margin-top: 8px; }
.nbig { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.nbig-num { font: 600 72px/1 var(--serif); font-variant-numeric: lining-nums; background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nbig-title { font: italic 600 26px var(--serif); color: var(--accent); }
.nworking { color: var(--mist); font-variant-numeric: tabular-nums; }
.nsquare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-width: 420px; }
.nsquare-cell { display: grid; gap: 4px; align-content: center; justify-items: center; min-height: 92px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); text-align: center; }
.nsquare-cell.is-empty { background: rgba(10, 6, 22, .35); border-style: dashed; }
.nsquare-digits { font: 600 26px/1.1 var(--serif); color: var(--accent-hi); letter-spacing: .04em; overflow-wrap: anywhere; font-variant-numeric: lining-nums tabular-nums; }
.nsquare-cell.is-empty .nsquare-digits { color: var(--mist); }
.nsquare-title { font-size: 11.5px; color: var(--mist); line-height: 1.25; }
.ncells { display: grid; gap: 14px; }
.ncell { display: grid; gap: 4px; align-content: start; }
.ncell h3 { font-size: 22px; }
.ncell-count { color: var(--accent); font-size: 14px; }
.nmonths { display: grid; gap: 8px; }
.nmonth { display: grid; grid-template-columns: 112px 34px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid rgba(196, 181, 253, .12); }
.nmonth-name { color: var(--mist); font-size: 14px; }
.nmonth-num { font: 600 24px var(--serif); color: var(--accent-hi); text-align: center; font-variant-numeric: lining-nums; }
.nmonth-text { font-size: 15px; }
.npair { display: grid; gap: 18px; }
.npair h3 { font-size: 22px; margin-bottom: 8px; }
.npair-text { color: var(--ink-2); font-size: 14.5px; }

/* ---------- human design ---------- */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: 300px; overflow-y: auto; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--panel-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .55); }
.combo-item { display: grid; gap: 2px; padding: 10px 12px; border-radius: 9px; cursor: pointer; }
.combo-item:hover, .combo-item[aria-selected="true"] { background: rgba(196, 181, 253, .14); }
.combo-name { font-weight: 600; }
.combo-meta { font-size: 13px; color: var(--mist); }
.combo-empty { padding: 10px 12px; font-size: 14px; color: var(--mist); }
.text-input[aria-invalid="true"], select.text-input[aria-invalid="true"] { border-color: var(--err); }
select.text-input { appearance: auto; }
#hd-manual-toggle { margin: 0; text-align: left; font-size: 14px; min-height: 36px; padding: 0; }
.hd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 8px 0 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--line); overflow: hidden; }
.hd-facts > div { display: grid; align-content: start; gap: 3px; padding: 12px 14px; background: var(--panel-2); min-width: 0; }
.hd-facts > .is-wide { grid-column: 1 / -1; }
.hd-facts dt { color: var(--mist); font-size: 12.5px; }
.hd-facts dd { margin: 0; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.hd-kv { display: grid; gap: 0; margin: 0; }
.hd-kv > div { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(196, 181, 253, .12); }
.hd-kv dt { color: var(--mist); font-size: 14px; }
.hd-kv dd { margin: 0; font-weight: 600; }
.hd-chart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 10px; align-items: start; }
.hd-graph { grid-column: 1 / -1; grid-row: 1; min-width: 0; }
.bodygraph { display: block; width: 100%; max-width: 400px; height: auto; margin: 0 auto; }
.bg-track { fill: none; stroke: rgba(196, 181, 253, .14); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.bg-ch { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.bg-ch--personality { stroke: #F5F1FF; }
.bg-ch--design { stroke: #E5484D; }
.bg-ch--striped { stroke-dasharray: 5 5; stroke-linecap: butt; }
.bg-center { fill: rgba(13, 8, 32, .94); stroke: rgba(196, 181, 253, .5); stroke-width: 1.5; stroke-linejoin: round; }
.bg-center--head.is-defined, .bg-center--g.is-defined { fill: #F2C94C; stroke: #F2C94C; }
.bg-center--ajna.is-defined { fill: #5FBF7F; stroke: #5FBF7F; }
.bg-center--throat.is-defined, .bg-center--spleen.is-defined, .bg-center--solar.is-defined, .bg-center--root.is-defined { fill: #B9845A; stroke: #B9845A; }
.bg-center--heart.is-defined, .bg-center--sacral.is-defined { fill: #E5484D; stroke: #E5484D; }
.bg-gate circle { fill: #120B28; stroke: rgba(196, 181, 253, .35); stroke-width: 1; }
.bg-gate text { fill: #ABA0C4; font: 600 8px var(--sans); text-anchor: middle; font-variant-numeric: lining-nums; }
.bg-gate.is-on circle { fill: #F5F1FF; stroke: #120B28; }
.bg-gate.is-on text { fill: #1A0B33; }
.bg-arrow { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bg-arrow--design { stroke: #E5484D; }
.bg-arrow--personality { stroke: #F5F1FF; }
.hd-planets { min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.hd-planets h3 { font-size: 21px; margin-bottom: 6px; }
.hd-planets--design h3 { color: #FF8A8E; }
.hd-planets ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hd-planets li { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--mist); }
.hd-planets b { color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.hd-planets--design b { color: #FF8A8E; }
.hd-planets b { display: inline-flex; align-items: baseline; gap: 4px; }
.fx { font-size: 11px; color: var(--accent-hi); }
.fx--detriment { color: var(--mist); }
.fx--juxtaposed { color: #F2C94C; letter-spacing: -1px; }
.hd-key-fx { flex-basis: 100%; text-align: center; }
.hd-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 14px 0 6px; font-size: 13px; color: var(--mist); }
.hd-key { display: inline-flex; align-items: center; gap: 8px; }
.hd-key::before { content: ""; width: 22px; height: 5px; border-radius: 3px; }
.hd-key--design::before { background: #E5484D; }
.hd-key--personality::before { background: #F5F1FF; }
.hd-key--both::before { background: repeating-linear-gradient(90deg, #F5F1FF 0 5px, #E5484D 5px 10px); }
.hd-birth { text-align: center; font-size: 13px; color: var(--mist); max-width: 60ch; margin: 0 auto 8px; }
.hd-note { margin: 10px auto; max-width: 62ch; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(242, 194, 48, .45); background: rgba(242, 194, 48, .08); font-size: 14.5px; }
.hd-lead { font: italic 600 24px/1.25 var(--serif); color: var(--accent); }
.hd-center.is-defined h3 { color: var(--accent-hi); }

/* ---------- astrology ---------- */
.astro-bg { background-image: url("/static/nebula-orion-s.webp"); }
.calc .check-line { margin: 0; color: var(--ink-2); }
.calc-input:disabled { opacity: .45; }
.sky-grid { display: grid; gap: 18px; max-width: 900px; margin: 22px auto 0; }
.sky-moon { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 20px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
.moon-disc { display: block; width: 84px; height: 84px; border-radius: 50%; }
.moon-disc svg { display: block; width: 100%; height: 100%; }
.sky-phase { font: italic 600 22px var(--serif); color: var(--accent); }
.sky-sign { color: var(--ink-2); max-width: 46ch; }
.sky-list { list-style: none; margin: 0; padding: 14px 18px; display: grid; gap: 4px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
.sky-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; color: var(--mist); padding: 3px 0; border-bottom: 1px solid rgba(196, 181, 253, .1); }
.sky-list li:last-child { border-bottom: 0; }
.sky-list b { color: var(--ink); font-variant-numeric: tabular-nums lining-nums; text-align: right; }
.sky-retro { max-width: 900px; margin: 14px auto 0; display: grid; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.astro-big3 { margin-top: 8px; color: var(--accent); font-weight: 600; }
.astro-chart { display: grid; gap: 18px; align-items: start; margin-top: 8px; }
.astro-wheel { min-width: 0; }
.wheel { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.wh-sign { stroke: rgba(196, 181, 253, .35); stroke-width: 1; }
.wh-sign--fire { fill: rgba(229, 72, 77, .12); }
.wh-sign--earth { fill: rgba(95, 191, 127, .12); }
.wh-sign--air { fill: rgba(242, 201, 76, .12); }
.wh-sign--water { fill: rgba(96, 165, 250, .12); }
.wh-glyph path { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wh-glyph--fire path { stroke: #FF8A8E; }
.wh-glyph--earth path { stroke: #7FD69C; }
.wh-glyph--air path { stroke: #F2D27A; }
.wh-glyph--water path { stroke: #8DB8FF; }
.wh-tick { stroke: rgba(196, 181, 253, .45); stroke-width: 1; }
.wh-ring { fill: none; stroke: rgba(196, 181, 253, .45); stroke-width: 1; }
.wh-cusp { stroke: rgba(196, 181, 253, .3); stroke-width: 1; }
.wh-cusp--angle { stroke: #EDE9FE; stroke-width: 2; }
.wh-house { fill: var(--mist); font: 600 11px var(--sans); text-anchor: middle; }
.wh-angle { fill: #EDE9FE; font: 700 13px var(--sans); text-anchor: middle; }
.wh-planet path { fill: none; stroke: #F5F1FF; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wh-pin { fill: none; stroke: rgba(196, 181, 253, .5); stroke-width: 1; }
.wh-deg { fill: var(--mist); font: 600 10.5px var(--sans); text-anchor: middle; font-variant-numeric: lining-nums; }
.wh-asp { fill: none; stroke-width: 1.2; }
.wh-asp--harmony { stroke: #60A5FA; }
.wh-asp--tension { stroke: #E5484D; }
.wh-asp--adjust { stroke: #A3E635; stroke-dasharray: 4 3; }
.astro-table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.astro-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.astro-table th, .astro-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(196, 181, 253, .1); white-space: nowrap; }
.astro-table th { color: var(--mist); font-weight: 500; font-size: 12.5px; }
.astro-table tr:last-child td { border-bottom: 0; }
.astro-deg { font-variant-numeric: tabular-nums lining-nums; }
.astro-note { color: var(--accent); font-size: 14px; }
.astro-bars { display: grid; gap: 10px; }
.astro-bar { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.astro-bar-label { font-weight: 600; }
.astro-bar-meter { height: 8px; border-radius: 4px; background: rgba(196, 181, 253, .12); overflow: hidden; }
.astro-bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.astro-bar-fill--fire { background: #E5484D; }
.astro-bar-fill--earth { background: #5FBF7F; }
.astro-bar-fill--air { background: #F2C94C; }
.astro-bar-fill--water { background: #60A5FA; }
.astro-bar-about { grid-column: 1 / -1; font-size: 13px; color: var(--mist); }
.astro-cusps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums lining-nums; }

/* ---------- practices ---------- */
.pr-bg { background-image: url("/static/nebula-pillars-s.webp"); }
.moods { border: 0; margin: 22px 0 0; padding: 0; max-width: 620px; }
.moods legend { margin-bottom: 10px; padding: 0; }
.mood-list { display: flex; flex-wrap: wrap; gap: 8px; }
.mood { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(13, 8, 32, .6); color: var(--ink); font-size: 15px; cursor: pointer; }
.mood:hover { border-color: var(--accent); }
.mood[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #1A0B33; font-weight: 600; }
.pr-block { padding-block: 34px; }
.pr-block .sec-title { margin-bottom: 8px; }
.pr-sub { text-align: center; color: var(--mist); max-width: 60ch; margin: 0 auto 18px; }
.pr-cards { display: grid; gap: 12px; max-width: 980px; margin: 0 auto; }
.pr-card { display: grid; gap: 6px; align-content: start; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; min-width: 0; }
.pr-card:hover { border-color: var(--accent); }
.pr-card-kind { font-size: 12.5px; color: var(--accent); }
.pr-card-title { font: 600 23px/1.15 var(--serif); }
.pr-card-lead { font-size: 14.5px; color: var(--ink-2); }
.pr-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px auto 18px; }
.pr-filter { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--mist); font-size: 14px; cursor: pointer; }
.pr-filter[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: rgba(196, 181, 253, .1); }
.pr-wrap { max-width: 760px; }
.pr-lead { font: italic 500 21px/1.4 var(--serif); color: var(--ink-2); text-align: center; max-width: 52ch; margin: 0 auto 22px; }
.pr-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.pr-steps li { padding: 6px 10px; border-radius: 10px; }
.pr-steps li.is-current { background: rgba(196, 181, 253, .14); color: var(--accent-hi); }
.pr-source { margin-top: 18px; font-size: 13.5px; color: var(--mist); font-style: italic; }
.pacer { display: grid; justify-items: center; gap: 14px; margin: 6px 0 26px; }
.pacer-orb { width: min(64vw, 260px); aspect-ratio: 1; max-width: 100%; border-radius: 50%; display: grid; place-content: center; text-align: center; gap: 2px; background: radial-gradient(circle at 50% 40%, rgba(237, 233, 254, .35), rgba(139, 92, 246, .28) 55%, rgba(76, 29, 149, .25)); box-shadow: 0 0 60px rgba(168, 85, 247, .35), inset 0 0 0 1px rgba(196, 181, 253, .45); transform: scale(.7); transition-property: transform; transition-timing-function: ease-in-out; }
.pacer-label { font: 600 26px var(--serif); }
.pacer-count { font: 600 40px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; color: var(--accent-hi); min-height: 40px; }
.pacer-round { color: var(--mist); font-size: 14px; }
.pr-timer { display: grid; justify-items: center; gap: 12px; margin: 6px 0 24px; }
.pr-music { display: flex; gap: 8px; width: max-content; max-width: 100%; margin: 4px auto 14px; }
.pr-music svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.pr-music[aria-pressed="false"] { color: var(--mist); }
.pr-music[aria-pressed="false"] svg { color: var(--mist); }
.pr-done { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); font-weight: 600; }
.pr-clock { font: 600 56px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; color: var(--accent-hi); }
.pr-affirm { display: grid; justify-items: center; gap: 12px; margin: 6px 0 26px; padding: 26px 20px; border-radius: 20px; border: 1px solid var(--line-strong); background: radial-gradient(ellipse at 50% 0%, rgba(196, 181, 253, .14), transparent 60%), var(--panel); text-align: center; }
.pr-affirm-line { font: italic 600 clamp(26px, 6vw, 34px)/1.25 var(--serif); max-width: 22ch; text-wrap: balance; }
.pr-affirm-pos { color: var(--mist); font-size: 14px; }
.pr-journal { margin-top: 18px; }
.pr-journal-past { display: grid; gap: 8px; margin-top: 6px; }
.pr-entry, .day-entry { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--panel); font-size: 15px; }
.pr-entry summary, .day-entry summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.pr-entry p, .day-entry p { margin: 8px 0 0; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.day-history { display: grid; gap: 10px; max-width: 820px; margin-top: 26px; }
.day-history-list { display: grid; gap: 8px; }
#day-login { justify-self: start; }
@media (prefers-reduced-motion: reduce) {
  .pacer-orb { transform: none !important; }
}

/* ---------- AI interpretation ---------- */
.ai-box { display: grid; gap: 12px; margin: 22px 0; padding: 22px 20px; border-radius: 18px; border: 1px solid var(--line-strong); background: radial-gradient(ellipse at 100% 0%, rgba(217, 70, 239, .12), transparent 55%), var(--panel); }
.ai-box h2 { font-size: clamp(28px, 6vw, 36px); }
.ai-note { color: var(--mist); font-size: 14px; }
.ai-text { display: grid; gap: 12px; }
.ai-text h3 { font-size: 23px; margin-top: 4px; }
.ai-status { color: var(--accent); font-size: 14.5px; }
.ai-status:empty { display: none; }
.ai-box .cta { justify-self: start; }
.ai-slot:empty, #ai-slot:empty { display: none; }

/* ---------- payment choice (Mini App) ---------- */
.pay-choice[open] { display: grid; gap: 12px; }
.pay-choice h2 { font-size: 30px; text-align: center; }
.pay-choice .btn-outline { justify-content: center; }

/* ---------- hub: today ---------- */
.today { padding-block: 40px 20px; }
.today .sec-title { margin-bottom: 18px; }
.today-grid { display: grid; gap: 12px; max-width: 1000px; margin: 0 auto; }
.widget { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; min-width: 0; }
.widget:hover { border-color: var(--accent); }
.widget-body { display: grid; gap: 4px; min-width: 0; grid-column: 2; }
.widget > .widget-body:only-child { grid-column: 1 / -1; }
.widget-kicker { font-size: 12.5px; color: var(--accent); }
.widget-title { font: 600 22px/1.15 var(--serif); }
.widget-text { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.widget-link { font-size: 14px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; margin-top: 2px; }
.widget-card { width: 58px; height: auto; border-radius: 5px; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.widget-card.is-rev { transform: rotate(180deg); }
.widget-moon { display: block; width: 52px; height: 52px; }
.widget-num { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-strong); font: 600 28px var(--serif); font-variant-numeric: lining-nums; color: var(--accent-hi); }

/* ---------- hub: energy of the day ---------- */
.energy { max-width: 1100px; margin: 0 auto; }
.energy-date { text-align: center; color: var(--mist); margin: -8px 0 22px; }
.energy-grid { display: grid; gap: 22px; }
.energy-text { display: grid; gap: 14px; width: 100%; max-width: 66ch; margin-inline: auto; font-size: 16.5px; line-height: 1.65; }
.energy-text p { margin: 0; }
.energy-cards { display: grid; gap: 10px; align-content: start; min-width: 0; max-width: 1100px; margin: 0 auto 34px; }
.energy-cards:empty { display: none; }
.energy-missing { display: grid; gap: 10px; justify-items: start; margin: 22px auto 0; max-width: 66ch; }
.energy-more { display: grid; gap: 12px; margin-top: 22px; max-width: 66ch; }
.energy-more .unlock-list { margin: 0; }
.sub-payments { margin: 0; padding-left: 18px; color: var(--mist); font-size: 14.5px; }
.profile-box > .ghost-pill { justify-self: start; }
.energy-note { margin: 0; color: var(--mist); font-size: 14.5px; }
.energy-more { justify-self: start; margin: 0; }
.msg-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 18px; }
.msg-links a { color: var(--accent); }
.items-more-row { list-style: none; }
.items-more { margin: 6px 0 0; }
/* Closed energy: the second paragraph fades out under the offer to open it. */
.energy-text.is-locked > p:nth-of-type(2) { max-height: 7.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 0%, transparent 95%); mask-image: linear-gradient(#000 0%, transparent 95%); }
.energy-lock { display: grid; gap: 14px; justify-items: start; padding: 18px; border-radius: 18px; border: 1px solid var(--line-strong); background: radial-gradient(ellipse at 100% 0%, rgba(217, 70, 239, .14), transparent 60%), var(--panel); }
.energy-lock p { margin: 0; }
.unlock-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.unlock-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
@media (max-width: 479px) {
  .unlock-item { grid-template-columns: minmax(0, 1fr); justify-items: start; }
}
.unlock-item.is-open { border-color: rgba(143, 227, 184, .45); }
.unlock-name { display: grid; gap: 2px; min-width: 0; }
.unlock-name b { font: 600 20px/1.2 var(--serif); }
.unlock-name span { color: var(--mist); font-size: 14px; }
.unlock-done { color: var(--ok); font-weight: 600; font-size: 15px; }
.unlock-buy { min-height: 44px; padding-inline: 18px; text-decoration: none; }
@media (max-width: 819px) {
  .energy-text:not(.is-open) > p:nth-of-type(n+3) { display: none; }
}
@media (min-width: 820px) {
  .energy-more { display: none; }
}

/* ---------- diary of states ---------- */
.dy-bg { background-image: url("/static/nebula-orion-s.webp"); }
.dy-streak { display: inline-block; margin-top: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--accent-hi); font-size: 14.5px; }
.dy-wrap > * { max-width: 760px; }
.dy-block { padding-block: 26px; }
.dy-block .sec-title { margin-bottom: 18px; font-size: clamp(30px, 7vw, 40px); }
#dy-guest .dy-wrap { display: grid; gap: 16px; justify-items: start; }
.dy-guest-text { margin: 0; font-size: 17px; max-width: 52ch; }
.dy-form { display: grid; gap: 22px; }
.dy-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.dy-q legend { padding: 0; margin-bottom: 10px; font: 600 21px/1.25 var(--serif); }
.dy-scale { display: flex; gap: 10px; }
.dy-dot { position: relative; }
.dy-dot input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.dy-dot span { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(13, 8, 32, .6); font: 600 22px var(--serif); font-variant-numeric: lining-nums; color: var(--ink); }
.dy-dot input:checked + span { background: var(--accent); border-color: var(--accent); color: #1A0B33; }
.dy-dot input:focus-visible + span { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.dy-scale-word { margin: 8px 0 0; min-height: 20px; color: var(--accent); font-size: 14.5px; }
.dy-note textarea { min-height: 84px; }
.dy-note > span { font: 600 21px/1.25 var(--serif); color: var(--ink); }
.dy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.dy-saved { margin: 0; color: var(--ok); font-size: 14.5px; }
.dy-chart-wrap { overflow-x: auto; }
.dy-chart { display: block; width: 100%; max-width: 560px; min-width: 300px; height: auto; }
.dy-grid { stroke: var(--line); stroke-width: 1; }
.dy-axis { stroke: var(--line-strong); stroke-width: 1; }
.dy-bar--mood { fill: var(--accent); }
.dy-bar--energy { fill: var(--c-gold); }
.dy-empty { fill: var(--mist); opacity: .6; }
.dy-day { fill: var(--ink-2); font: 500 14px var(--sans); }
.dy-day.is-today { fill: var(--accent-hi); font-weight: 700; }
.dy-num { fill: var(--mist); font: 12.5px var(--sans); }
.dy-legend { display: flex; gap: 18px; margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.dy-key::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.dy-key--mood::before { background: var(--accent); }
.dy-key--energy::before { background: var(--c-gold); }
.dy-avg { margin: 12px 0 0; }
.dy-tags-top { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); }
.dy-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.dy-entry { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--panel); }
.dy-entry p { margin: 0; }
.dy-entry-head { font-size: 15px; color: var(--ink-2); }
.dy-entry-head b { color: var(--ink); }
.dy-entry-note { margin-top: 6px !important; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- reference pages (meanings) ---------- */
.meaning { max-width: 860px; padding-block: 22px 56px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--mist); margin-bottom: 18px; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs-sep { color: var(--mist); }
.meaning-article { display: grid; gap: 14px; }
.meaning-article h1 { font-size: clamp(38px, 9vw, 60px); line-height: 1.05; text-wrap: balance; }
.meaning-article h2 { font-size: clamp(26px, 6vw, 32px); margin-top: 14px; }
.meaning-article p, .meaning-article li { font-size: 16.5px; line-height: 1.65; max-width: 68ch; }
.meaning-article p { margin: 0; }
.meaning-article ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.meaning-lead { font-size: 18px !important; color: var(--ink-2); }
.meaning-img { width: 200px; max-width: 46%; height: auto; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); justify-self: start; }
.meaning-index { list-style: none !important; padding: 0 !important; display: grid !important; gap: 8px !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.meaning-index a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; height: 100%; box-sizing: border-box; }
.meaning-index a:hover { border-color: var(--accent); }
.meaning-index b { font: 600 19px/1.2 var(--serif); }
.meaning-index span { font-size: 13.5px; color: var(--mist); }
.meaning-cta { display: grid; gap: 12px; justify-items: start; margin-top: 30px; padding: 20px; border-radius: 18px; border: 1px solid var(--line-strong); background: radial-gradient(ellipse at 100% 0%, rgba(217, 70, 239, .12), transparent 60%), var(--panel); }
.meaning-cta p { margin: 0; }
.meaning-cta .fine a { color: var(--accent); }
.meaning-related { margin-top: 30px; }
.meaning-related h2 { font-size: 26px; margin-bottom: 10px; }
.meaning-related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.meaning-related a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14.5px; }
.meaning-related a:hover { border-color: var(--accent); }
/* Links of a tool to its reference pages, and the footnote about the free and the paid part. */
.tool-refs { padding-block: 4px 18px; }
.tool-refs summary { display: inline-block; cursor: pointer; font-size: 13.5px; color: var(--mist); }
.tool-refs summary:hover { color: var(--ink-2); }
.tool-refs ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.tool-refs a { font-size: 13.5px; color: var(--mist); }
.tool-refs a:hover { color: var(--ink); }
/* The documents (offer, policy, terms, consent, seller's details): texts from content/legal/. */
.legal { display: grid; gap: 12px; }
.legal h2 { margin-top: 18px; }
.legal-edition { font-size: 14px !important; color: var(--mist) !important; }
.legal a { color: var(--accent); }
.msg .demo-pay-what { margin: 0; color: var(--ink-2); }
.msg .demo-pay-sum { margin: 4px 0 0; font: 600 44px/1.1 var(--serif); color: var(--ink); }
.msg .demo-pay-note { max-width: 36ch; margin-inline: auto; color: var(--mist); font-size: 14.5px; }
.demo-pay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.profile-docs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; font-size: 13.5px; }
.profile-docs a { color: var(--mist); }
.age-mark { display: inline-block; margin-right: 6px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 6px; font-weight: 600; color: var(--ink-2); }

/* ---------- wider screens ---------- */
@media (max-width: 599px) {
  .hd-kv > div { grid-template-columns: 1fr; gap: 2px; }
  .brand { gap: 8px; font-size: 19px; }
  .ghost-pill { padding: 8px 13px; font-size: 13px; }
  .sheet { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-width: none; border-radius: 20px 20px 0 0; padding-bottom: calc(22px + var(--safe-b)); }
}
@media (max-width: 339px) {
  .brand span { display: none; }
}
/* With «На главную» in the header a phone keeps only the logo (it leads home too). */
@media (max-width: 479px) {
  .site-head-in:has(#home-btn:not([hidden])) .brand span { display: none; }
}
@media (min-width: 820px) {
  .hero { padding-block: 130px 90px; }
  .hero-bg { background-image: url("/static/nebula-wide.webp"); }
  /* The hub keeps its own nebula on wide screens, full size; the other heroes take the wide one above. */
  .hub-hero .hero-bg { background-image: url("/static/nebula-orion.webp"); }
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 40px; }
  .sigil { width: 100%; max-width: 460px; order: 2; }
  .orrery-wrap { width: 100%; max-width: 460px; order: 2; }
  .day-in { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; }
  .day-card { width: 260px; }
  .spreads { grid-template-columns: 1fr 1fr; }
  .npair { grid-template-columns: 1fr 1fr; }
  .hd-chart { grid-template-columns: 170px minmax(0, 1fr) 170px; gap: 18px; }
  .hd-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hd-facts > .is-wide:nth-child(5) { grid-column: span 2; }
  .hd-graph { grid-column: 2; }
  .hd-wrap { max-width: 1000px; }
  .astro-wrap { max-width: 1100px; }
  .pr-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* One or two cards are centred instead of leaving empty columns. */
  .pr-cards:has(> :only-child) { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
  .pr-cards:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 660px; }
  /* The factors of the day in rows over «Энергия дня»: three to a row, four for four, seven or eight; no row with a hole
     for two, three, four, six. */
  .energy-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .energy-cards:has(> :nth-child(4):last-child), .energy-cards:has(> :nth-child(7):last-child), .energy-cards:has(> :nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .energy-cards:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
  .energy-cards:has(> :only-child) { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
  /* Five: two in the first row, three in the second. */
  .energy-cards:has(> :nth-child(5):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .energy-cards:has(> :nth-child(5):last-child) > :nth-child(-n+2) { grid-column: span 3; }
  .energy-cards:has(> :nth-child(5):last-child) > :nth-child(n+3) { grid-column: span 2; }
  .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Three widgets stand in one row, four in two, a single one in the middle: no row is left with a hole. */
  .today-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1100px; }
  .today-grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  /* Five widgets: two in the first row, three in the second. */
  .today-grid:has(> :nth-child(5):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 1100px; }
  .today-grid:has(> :nth-child(5):last-child) > :nth-child(-n+2) { grid-column: span 3; }
  .today-grid:has(> :nth-child(5):last-child) > :nth-child(n+3) { grid-column: span 2; }
  .astro-chart { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .sky-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .astro-cusps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bodygraph { max-width: 440px; }
  .ncells { grid-template-columns: 1fr 1fr; gap: 18px 28px; }
  .layout--three { gap: 22px; }
  .layout--celtic { gap: 14px 16px; }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool--on { grid-column: 1 / -1; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; padding: 26px 28px; }
  .tool--on .tool-glyph { width: 96px; height: 96px; }
  .tool--on .tool-cta { grid-column: auto; margin: 0; }
  .grid-learn { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .sample-in { grid-template-columns: 1fr 1fr; padding: 46px 40px; }
  .tarots { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .choose { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choose.tarots--one { grid-template-columns: minmax(0, 440px); justify-content: center; }
  .keys { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Telegram Mini App (html.in-tg) ----------
   The home page in Telegram is the app of app.js (html.app-spa): five screens and a tab bar, nothing of the site's
   home page. The tool pages stay the site's, without its header, footer and descriptions: pushed screens with
   Telegram's back button. */
.in-tg .site-head, .in-tg .foot, .in-tg .skip, .in-tg .tool-refs, .in-tg [data-app-hide] { display: none !important; }
.in-tg .hero, .in-tg .hero--tool { padding-block: 18px 24px; }
.in-tg .hero--tool h1 { font-size: clamp(40px, 12vw, 60px); }
.in-tg .block { padding-block: 28px; }
.in-tg .sec-title { font-size: clamp(30px, 8vw, 40px); text-align: left; }
.in-tg main { animation: app-in .2s ease-out both; }
@keyframes app-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .in-tg main, .app-screen { animation: none !important; } }

/* The site on a phone (html.app-web): the home page keeps its header, hero and footer; the app of app.js stands
   instead of the rest, the tab bar is fixed at the bottom. */
.app-web { --tabbar-h: 70px; }
.app-web #today, .app-web #tools, .app-web #hub-recent, .app-web #main > [data-app-hide] { display: none !important; }
.app-web .app { padding-bottom: 28px; }
.app-web .foot { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); }
.app-web .hub-hero { padding-bottom: 8px; }
.app-back { justify-self: start; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(13, 8, 32, .6); color: var(--ink); font: 500 14px var(--sans); cursor: pointer; }
.app-back::before { content: '‹'; margin-right: 6px; font-size: 18px; line-height: 1; }
.app-guest { display: grid; gap: 10px; }
.app-guest-actions { flex-wrap: wrap; gap: 10px; }
.app-guest-tools { display: grid; gap: 10px; }
.app-guest-tools .app-section-title { font-size: 16px; color: var(--ink); }

.app-spa { --tabbar-h: 70px; }
.app-spa body { background: radial-gradient(ellipse 120% 50% at 80% -10%, #2A1A5E 0%, #0E0920 45%, var(--void) 75%) var(--void) no-repeat; }
.app-spa #main, .app-spa .starfield { display: none !important; }
.app { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(var(--tabbar-h) + var(--safe-b) + 24px); }
.app-screen { display: grid; align-content: start; gap: 16px; animation: app-in .2s ease-out both; }
.app-energy { padding-bottom: 72px; }

.app-head { display: flex; align-items: center; gap: 12px; }
.app-head-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.app-date { margin: 0; font-size: 13px; color: var(--mist); }
.app-hello, .app-title { margin: 0; font: 600 32px/1.05 var(--serif); }
.app-muted { margin: 0; font-size: 14px; color: var(--mist); }
.app-avatar { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #7C3AED, #C026D3); color: #fff; font: 600 17px var(--sans); cursor: pointer; }
.app-avatar--big { width: 76px; height: 76px; font-size: 30px; }

.app-card { display: grid; gap: 8px; padding: 16px; border-radius: 20px; background: rgba(18, 12, 38, .88); border: 1px solid rgba(196, 181, 253, .18); color: var(--ink); text-decoration: none; text-align: left; font: inherit; }
a.app-card:hover, button.app-card:hover { border-color: rgba(196, 181, 253, .4); }
.app-kicker { font-size: 12px; color: var(--mist); }
.app-card-title { margin: 0; font-weight: 600; font-size: 16px; }
.app-row { display: flex; align-items: center; gap: 10px; }
.app-row--between { justify-content: space-between; }
.app-grow { flex: 1; min-width: 0; }

.app-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: linear-gradient(90deg, #7C3AED, #C026D3); color: #fff; font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.app-btn--wide { display: flex; width: 100%; height: 52px; border-radius: 16px; font-size: 16px; }
.app-btn--ghost { background: rgba(196, 181, 253, .14); color: var(--ink); justify-self: start; }
.app-btn--danger { background: transparent; color: #FCA5A5; border: 1px solid rgba(248, 113, 113, .4); font-weight: 500; }

.app-hero { gap: 12px; padding: 18px; border-radius: 24px; background: linear-gradient(160deg, rgba(124, 58, 237, .3), rgba(18, 12, 38, .92) 55%); border-color: rgba(196, 181, 253, .28); cursor: pointer; }
.app-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-hero-moon { width: 72px; height: 72px; flex: none; }
.app-hero-title { font: 600 27px/1.1 var(--serif); }
.app-hero-text { font-size: 15px; line-height: 1.55; color: #D9D1EC; }
.app-hero-meta { font-size: 13px; color: var(--mist); }

.app-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.app-pair:empty { display: none; }
.app-stack { display: grid; gap: 12px; align-content: stretch; }
.app-tile { align-content: start; }
.app-tile--card { justify-items: start; }
.app-card-img { width: 64px; height: 104px; object-fit: cover; border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.app-tile-title { font: 600 21px/1.1 var(--serif); }
.app-tile-strong { font-weight: 600; font-size: 15px; line-height: 1.3; }
.app-tile-note { font-size: 13px; line-height: 1.4; color: var(--mist); }
.app-tile-accent { font-size: 13px; color: var(--accent); }
.app-tile-moon { width: 36px; height: 36px; flex: none; }

.app-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.app-scale-btn { height: 48px; border-radius: 16px; border: 1px solid rgba(196, 181, 253, .22); background: rgba(196, 181, 253, .08); color: var(--ink); font: 600 18px var(--sans); cursor: pointer; }
.app-scale-btn.is-on { border: 0; background: linear-gradient(135deg, #7C3AED, #C026D3); color: #fff; }
.app-scale-ends { font-size: 12px; color: #8E84A8; }

.app-more p { margin: 0; color: #D9D1EC; font-size: 14px; line-height: 1.45; }
.app-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.app-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(196, 181, 253, .25); background: rgba(196, 181, 253, .1); color: var(--ink); font: 500 14px var(--sans); text-decoration: none; cursor: pointer; }
.app-chip.is-on { background: rgba(196, 181, 253, .24); border-color: var(--accent); color: #fff; }

/* The energy in full */
.app-energy-sky { display: grid; justify-items: center; gap: 4px; padding-top: 8px; }
.app-energy-moon { width: 190px; height: 190px; margin-bottom: 10px; }
.app-energy-sky .app-kicker { margin: 0; color: var(--accent); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.app-energy-body { display: grid; gap: 14px; }
.app-energy-title { margin: 0; font: 600 34px/1.08 var(--serif); }
.app-energy-text { margin: 0; font-size: 17px; line-height: 1.65; color: #E4DCF3; }
.app-note, .app-loading { margin: 0; color: var(--accent); font-size: 14.5px; }
.app-section-title { margin: 6px 0 0; font: 600 14px var(--sans); color: var(--mist); }
.app-factors { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.app-factor { flex: 0 0 150px; align-content: start; scroll-snap-align: start; }
.app-factor-num { font: 700 34px/1 var(--serif); color: var(--accent); }
.app-factor-img { width: 40px; height: 64px; object-fit: cover; border-radius: 6px; }
.app-factor-moon { width: 40px; height: 40px; }
.app-locked p { margin: 0; line-height: 1.5; }
.app-bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 16px calc(16px + var(--safe-b)); background: linear-gradient(rgba(6, 4, 13, 0), var(--void) 35%); }
.app-bottom-bar .app-btn { max-width: 528px; margin: 0 auto; }

/* Разборы */
.app-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.app-tool { min-height: 168px; align-content: start; gap: 8px; padding: 16px 14px; border-radius: 22px; }
.app-tool.is-open { background: linear-gradient(160deg, rgba(124, 58, 237, .32), rgba(18, 12, 38, .92) 70%); border-color: rgba(196, 181, 253, .28); }
.app-tile-glyph svg { width: 40px; height: 40px; color: var(--accent); }
.app-tool-title { font: 600 22px/1.05 var(--serif); }
.app-tool-text { font-size: 12.5px; line-height: 1.35; color: var(--mist); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.app-chip-sm { justify-self: start; align-self: end; padding: 4px 10px; border-radius: 999px; background: rgba(196, 181, 253, .14); color: #DDD6FE; font-size: 12px; font-weight: 600; }
.app-chip-sm.is-open { background: rgba(110, 231, 183, .14); color: #A7F3D0; }
.app-mine { display: grid; gap: 8px; }
.app-mine .app-section-title { font-size: 16px; color: var(--ink); }
.app-items { max-width: none; }

/* Дневник */
.app-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.app-week-day { display: grid; justify-items: center; gap: 6px; }
.app-week-wd { font-size: 12px; color: #8E84A8; }
.app-week-dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 15px; color: var(--mist); background: rgba(196, 181, 253, .08); }
.app-week-dot.m1 { background: #3B2A5E; color: #fff; } .app-week-dot.m2 { background: #4C3483; color: #fff; } .app-week-dot.m3 { background: #6D4AB8; color: #fff; }
.app-week-dot.m4 { background: #8B5CF6; color: #fff; } .app-week-dot.m5 { background: #C026D3; color: #fff; }
.app-week-dot.is-today { box-shadow: 0 0 0 2px var(--void), 0 0 0 4px var(--accent); }
.app-diary-form { gap: 12px; }
.app-field { display: grid; gap: 6px; font-size: 13px; color: var(--mist); }
.app-input { border-radius: 14px; border: 1px solid rgba(196, 181, 253, .22); background: rgba(6, 4, 13, .6); color: var(--ink); padding: 10px 12px; font: 15px var(--sans); resize: none; }

/* Профиль */
.app-profile-head { display: grid; justify-items: center; gap: 8px; text-align: center; padding-top: 6px; }
.app-profile-head .app-title { font-size: 28px; }
.app-sub { gap: 6px; background: linear-gradient(160deg, rgba(124, 58, 237, .3), rgba(18, 12, 38, .92) 65%); border-color: rgba(196, 181, 253, .28); }
.app-sub .app-kicker { color: var(--accent); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.app-sub-title { font-size: 17px; font-weight: 600; }
.app-sub-text { font-size: 14px; line-height: 1.45; color: #D9D1EC; }
.app-sub .app-btn { justify-self: start; margin-top: 6px; }
.app-list { gap: 0; padding: 0 16px; }
.app-list-row { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 0; border: 0; border-bottom: 1px solid rgba(196, 181, 253, .1); background: none; color: var(--ink); font: 15px var(--sans); text-align: left; text-decoration: none; cursor: pointer; width: 100%; }
.app-list-row:last-child { border-bottom: 0; }
.app-locked .app-list-row { padding: 0; }
.app-ico { display: grid; place-items: center; color: var(--accent); }
.app-ico svg, .app-chevron svg { width: 22px; height: 22px; }
.app-chevron { display: grid; color: #6F6590; }
.app-chevron svg { width: 16px; height: 16px; }

/* The tab bar */
.app-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; padding: 8px 10px calc(10px + var(--safe-b)); background: rgba(10, 6, 22, .96); border-top: 1px solid rgba(196, 181, 253, .18); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.app-tabbar--3 { grid-template-columns: repeat(3, 1fr); }
.app-tabbar--4 { grid-template-columns: repeat(4, 1fr); }
.app-tab { display: grid; justify-items: center; gap: 3px; padding: 0; border: 0; background: none; color: var(--mist); font: 500 12px/1.2 var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.app-tab-ico { display: grid; place-items: center; width: 60px; height: 32px; border-radius: 16px; transition: background-color .2s, color .2s; }
.app-tab-ico svg { width: 24px; height: 24px; }
.app-tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
.app-tab[aria-current="page"] .app-tab-ico { background: rgba(196, 181, 253, .2); color: var(--accent); }
.app-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }

/* The account sheet of core.js over the whole screen, the tabs below it. */
.app-spa #profile-sheet { inset: 0 0 calc(var(--tabbar-h) + var(--safe-b)) 0; top: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); left: 0; width: 100%; max-width: none; max-height: none; transform: none; border: 0; border-radius: 0; padding-top: 22px; box-shadow: none; }
.app-spa #profile-sheet .sheet-close, .app-spa .profile-links { display: none; }
.app-spa:has(#profile-sheet[open]) .app-tabbar { z-index: 65; }
.app-spa:has(#profile-sheet[open]) .sheet-backdrop { display: none; }
