@font-face { font-family: "Forum"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/forum-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Forum"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/forum-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/golos-text-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/golos-text-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/golos-text-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/golos-text-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/golos-text-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/golos-text-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Стол гадальщика: слева колода, вопрос и выбор расклада; справа сам расклад, список позиций и трактовка. */
:root {
  --display: "Forum", "Times New Roman", serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #16132b;
  --surface: #1e1a38;
  --surface-2: #262145;
  --line: #3a3363;
  --fg: #f4eee2;
  --muted: #a89ed0;
  --accent: #d4af6a;
  --accent-ink: #16132b;
  --card-face: #f4eee2;
  --card-ink: #1d1934;
  --card-gold: #8a6a2a;
  --back-a: #221d42;
  --back-b: #d4af6a;
  --back-line: color-mix(in srgb, var(--back-b) 28%, transparent);
  --shadow: 0 8px 20px rgb(0 0 0 / .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4eee2;
    --surface: #fbf7ee;
    --surface-2: #ece4d3;
    --line: #d3c8b2;
    --fg: #1d1934;
    --muted: #5b4e8c;
    --accent: #8a6a2a;
    --accent-ink: #fffaf0;
    --card-face: #fbf7ee;
    --card-ink: #1d1934;
    --card-gold: #8a6a2a;
    --back-a: #2a2450;
    --back-b: #d4af6a;
    --shadow: 0 6px 16px rgb(24 34 38 / .2);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4eee2;
  --surface: #fbf7ee;
  --surface-2: #ece4d3;
  --line: #d3c8b2;
  --fg: #1d1934;
  --muted: #5b4e8c;
  --accent: #8a6a2a;
  --accent-ink: #fffaf0;
  --card-face: #fbf7ee;
  --card-ink: #1d1934;
  --card-gold: #8a6a2a;
  --back-a: #2a2450;
  --back-b: #d4af6a;
  --shadow: 0 6px 16px rgb(24 34 38 / .2);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #16132b;
  --surface: #1e1a38;
  --surface-2: #262145;
  --line: #3a3363;
  --fg: #f4eee2;
  --muted: #a89ed0;
  --accent: #d4af6a;
  --accent-ink: #16132b;
  --card-face: #f4eee2;
  --card-ink: #1d1934;
  --card-gold: #8a6a2a;
  --back-a: #221d42;
  --back-b: #d4af6a;
  --shadow: 0 8px 20px rgb(0 0 0 / .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  padding-inline: clamp(16px, 4vw, 32px);
  padding-block: 28px 56px;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--body);
}
.wrap { max-width: 1040px; margin-inline: auto; display: grid; gap: 28px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; }

header { display: grid; gap: 10px; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
h1 { font-size: clamp(36px, 7vw, 60px); line-height: 1.05; letter-spacing: .01em; }
.lead { margin: 0; max-width: 56ch; color: var(--muted); }

.layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 880px) {
  .layout { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
  #form { position: sticky; top: env(safe-area-inset-top, 0px); }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }

/* форма */
#form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
label.lbl, legend { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0; }
textarea {
  width: 100%; min-height: 84px; resize: vertical; padding: 10px 12px;
  background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); border-radius: 10px;
  font: inherit; line-height: 1.45;
}
textarea::placeholder { color: var(--muted); opacity: .8; }
textarea:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
fieldset.spreads { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt .box { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.opt .box b { display: block; font-weight: 600; font-size: 15px; }
.opt .box small { display: block; color: var(--muted); font-size: 13px; }
.opt input:checked + .box { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.opt input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

.btn {
  font: 600 15px/1.2 var(--body); padding: 13px 18px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }

/* колода */
.deck { position: relative; width: 84px; aspect-ratio: 4 / 7; margin: 4px auto 14px; }
.deck i { position: absolute; inset: 0; border-radius: 7px; box-shadow: var(--shadow); }
.deck i:nth-child(1) { translate: -8px 6px; }
.deck i:nth-child(2) { translate: -4px 3px; }
.deck i:nth-child(3) { translate: 0 0; }
.deck i:nth-child(4) { translate: 4px -3px; }
.deck i:nth-child(5) { translate: 8px -6px; }
.deck.shuffling i:nth-child(odd) { animation: rifL .45s ease-in-out 2; }
.deck.shuffling i:nth-child(even) { animation: rifR .45s ease-in-out 2; }
@keyframes rifL { 50% { translate: -40px -8px; rotate: -9deg; } }
@keyframes rifR { 50% { translate: 40px -2px; rotate: 9deg; } }

.cardback {
  background-color: var(--back-a);
  background-image:
    repeating-linear-gradient(45deg, transparent 0 9px, var(--back-line) 9px 10px),
    repeating-linear-gradient(-45deg, transparent 0 9px, var(--back-line) 9px 10px);
  border: 1px solid var(--back-b);
}

/* стол */
.table { display: grid; gap: 20px; min-width: 0; }
.tablehead { display: grid; gap: 6px; }
.tablehead h2 { font-size: clamp(24px, 4vw, 32px); }
.qecho { margin: 0; color: var(--fg); font-style: italic; overflow-wrap: anywhere; max-width: 60ch; }
.status { margin: 0; color: var(--muted); font-size: 14px; min-height: 1.5em; }
.boardbox { container-type: inline-size; padding-block: 14px 6px; }
.board { --cw: 120px; }
.board.l-day { --cw: min(168px, 60cqw); display: flex; justify-content: center; }
.board.l-row { --cw: min(132px, calc((100cqw - 2 * 14px) / 3)); display: flex; justify-content: center; gap: 14px; }
.board.l-celtic {
  --cw: min(98px, calc(100cqw / 5.9));
  display: grid; grid-template-columns: repeat(4, var(--cw));
  column-gap: calc(var(--cw) * .6); row-gap: calc(var(--cw) * .3); justify-content: center;
}
.slot { width: var(--cw); min-width: 0; }
.slot.cross { z-index: 2; rotate: 90deg; }
.board.dealt .slot { animation: deal .5s ease-out both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes deal { from { opacity: 0; translate: 0 -22px; scale: .92; } }

.ghost {
  width: var(--cw); aspect-ratio: 4 / 7; border: 1px dashed var(--line); border-radius: calc(var(--cw) * .07);
  position: relative;
}
.card {
  width: var(--cw); aspect-ratio: 4 / 7; position: relative; perspective: 900px; cursor: pointer;
  border-radius: calc(var(--cw) * .07);
}
.card:not(.open):hover { translate: 0 -4px; }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.flip { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.3, .7, .2, 1); }
.card.open .flip { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; display: block; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: calc(var(--cw) * .07); box-shadow: var(--shadow);
}
.back .seal {
  position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; translate: -50% -50%;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--back-a); border: 1px solid var(--back-b); color: var(--back-b);
}
.back .seal svg { width: 74%; height: 74%; }
.front { transform: rotateY(180deg); background: var(--card-face); color: var(--card-ink); container-type: inline-size; }
.art {
  position: absolute; inset: 5cqw; display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; padding: 5cqw 3cqw; text-align: center; border: 1px solid var(--card-gold);
}
.art::before { content: ""; position: absolute; inset: 2cqw; border: 1px solid color-mix(in srgb, var(--card-gold) 45%, transparent); pointer-events: none; }
.art.rev { transform: rotate(180deg); }
.tl { font: 400 15cqw/1 var(--display); color: var(--card-gold); }
.emb { width: 46cqw; height: 46cqw; color: var(--card-ink); }
.nm { font: 500 8cqw/1.15 var(--body); text-transform: uppercase; letter-spacing: .06em; overflow-wrap: anywhere; text-wrap: balance; }
.pips { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 3cqw; width: 70cqw; color: var(--card-ink); }
.pips svg { width: 15cqw; height: 15cqw; }
.pips.p1 svg { width: 44cqw; height: 44cqw; }
.pips.p2 svg, .pips.p3 svg { width: 20cqw; height: 20cqw; }
.pos {
  position: absolute; top: -7px; left: -7px; z-index: 3; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font: 600 12px/22px var(--body); text-align: center;
  font-variant-numeric: tabular-nums;
}
.slot.cross .pos { rotate: -90deg; }
.ghost .pos { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); line-height: 20px; }

.cap { width: calc(var(--cw) + 20px); margin: 10px -10px 0; text-align: center; }
.cap .cp { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cap .cn { font: 400 17px/1.2 var(--display); margin-top: 2px; text-wrap: balance; }
.cap .cn.wait { font: 400 13px/1.3 var(--body); color: var(--muted); }
.cap .co { font-size: 12px; color: var(--accent); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.legend { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.legend li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.legend .n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font: 600 12px/22px var(--body); text-align: center; font-variant-numeric: tabular-nums; }
.legend .lp { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.legend .ln { font: 400 20px/1.25 var(--display); }
.legend .ln em { font: 500 13px/1 var(--body); font-style: normal; color: var(--accent); margin-left: 8px; }
.legend .ln.wait { font: 400 15px/1.4 var(--body); color: var(--muted); }
.legend .lk { margin-top: 2px; }
.legend .lm { font-size: 13px; color: var(--muted); }
.note { margin: 0; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 14px; }

.reading { display: grid; gap: 14px; }
.readhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.readhead h2 { font-size: 26px; }
.readhead .row { display: flex; gap: 8px; flex-wrap: wrap; }
.readhead .btn { padding: 8px 14px; font-size: 14px; }
.think { color: var(--muted); }
.think::after { content: ""; display: inline-block; width: 1.5em; text-align: left; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
#readingBody { max-width: 65ch; }
#readingBody h3 { font-size: 22px; margin-top: 20px; color: var(--accent); }
#readingBody h3:first-child { margin-top: 0; }
#readingBody p { margin: 8px 0 0; overflow-wrap: anywhere; }
.foot { margin: 0; font-size: 13px; color: var(--muted); max-width: 70ch; }

/* аккаунт, окна входа и оплаты */
.btn.sm { padding: 8px 14px; font-size: 14px; }
.acct { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.acct .at { min-width: 0; overflow-wrap: anywhere; }
.acct-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 78%, transparent); }
.sheet { position: relative; width: min(520px, 100%); max-height: 100%; overflow: auto; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.mbody { display: grid; gap: 14px; min-width: 0; }
.mbody h2 { font-size: 26px; padding-right: 36px; }
.mbody p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.sheet .x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 400 26px/1 var(--body); cursor: pointer; }
.sheet .x:hover { color: var(--fg); }
.sheet .x:focus-visible, .plan:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stack { display: grid; gap: 10px; }
.plans { display: grid; gap: 14px; padding-top: 6px; }
.plan { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--fg); font: inherit; cursor: pointer; }
.plan:hover { border-color: var(--accent); }
.plan.rec { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan .pn { font-weight: 600; }
.plan .pp { font: 400 22px/1 var(--display); color: var(--accent); text-align: right; white-space: nowrap; }
.plan .pd { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.plan .badge { position: absolute; top: -9px; left: 14px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.sum { display: grid; gap: 6px; margin: 0; }
.sum div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.sum dt { color: var(--muted); }
.sum dd { margin: 0; font: 400 20px/1.2 var(--display); text-align: right; }
.methods { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--fg); font: inherit; cursor: pointer; }
.chip.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.demo-note { padding: 12px 14px; border: 1px dashed var(--accent); border-radius: 10px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; z-index: 60; max-width: min(92vw, 460px); padding: 10px 16px; border-radius: 10px; background: var(--fg); color: var(--bg); font-size: 14px; box-shadow: var(--shadow); }

@media (prefers-reduced-motion: reduce) {
  .flip { transition: none; }
  .board.dealt .slot, .deck.shuffling i, .think::after { animation: none; }
  .card:not(.open):hover { translate: none; }
}

/* поля ввода в окнах, история, юридические страницы */
.inp {
  width: 100%; padding: 11px 12px; background: var(--surface-2); color: var(--fg);
  border: 1px solid var(--line); border-radius: 10px; font: inherit;
}
.inp:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inp.code { font: 500 22px/1.2 var(--body); letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.check.small { font-size: 13px; color: var(--muted); align-items: flex-start; }
.check.small input { margin-top: 2px; flex: none; }
.err { color: #e0826b; font-size: 14px; margin: 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.tgbox { min-height: 40px; display: flex; justify-content: center; }
.demo-banner { margin: 0; padding: 8px 14px; border: 1px dashed var(--accent); border-radius: 10px; font-size: 13px; color: var(--muted); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 40px; height: 40px; color: var(--accent); flex: none; }
.foot a, .legal a { color: var(--accent); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.hist { display: grid; gap: 10px; }
.hist details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.hist summary { cursor: pointer; }
.hist summary small { display: block; color: var(--muted); }
.hist .hc { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.hist .hr { margin-top: 8px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.legal { max-width: 760px; margin-inline: auto; display: grid; gap: 14px; }
.legal h1 { font-size: clamp(30px, 6vw, 44px); }
.legal h2 { font-size: 24px; margin-top: 12px; color: var(--accent); }
.legal p, .legal li { color: var(--fg); }
.legal .muted { color: var(--muted); }
.support { border-color: var(--accent); }

.brand img { width: 44px; height: 44px; flex: none; }
.brand .logo-light { display: none; }
@media (prefers-color-scheme: light) { .brand .logo-dark { display: none; } .brand .logo-light { display: block; } }
