:root {
  --night: #0b1021;
  --plate: #0f1630;
  --plate-2: #141c3b;
  --ivory: #ede4cf;
  --dim: #8f98b5;
  --gilt: #d8b66b;
  --line: rgba(237, 228, 207, 0.16);
  --line-strong: rgba(237, 228, 207, 0.32);
  --acc: #e8836f;
  --acc-ink: #1b0f0c;
  --serif: "Alegreya", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}
body[data-game="superloto"] { --acc: #e0b050; --acc-ink: #231a05; }
body[data-game="keno"]      { --acc: #52b5a8; --acc-ink: #04211e; }
body[data-game="maxima"]    { --acc: #e8836f; --acc-ink: #2a0f09; }
body[data-game="loto636"]   { --acc: #a190ea; --acc-ink: #130d2e; }

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--ivory);
  font: 400 16px/1.55 var(--sans); min-height: 100vh;
}
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ivory); color: var(--night); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: 0.005em; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- шапка и вкладки ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))) 6px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--gilt); }
.brand-mark { width: 40px; height: 40px; flex: none; animation: slow-turn 90s linear infinite; }
.brand h1, .brand div.logo { font-size: 26px; line-height: 1.05; color: var(--ivory); font-weight: 700; }
.logo { font-size: 32px !important; letter-spacing: .01em; white-space: nowrap; }
.logo .lw { background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: shimmer 7s ease-in-out infinite; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--gilt) 38%, transparent)); }
.logo .lw[data-w="Space"] { font-weight: 500; font-variant-caps: all-small-caps; letter-spacing: .2em; font-size: .86em; background-image: linear-gradient(100deg, #9fb4ff 0%, #ede4cf 28%, #8fd6ff 50%, #ede4cf 72%, #9fb4ff 100%); }
.logo .lw[data-w="Oracle"] { font-style: italic; font-weight: 700; background-image: linear-gradient(100deg, #d8b66b 0%, #fff0c2 30%, #e8a06f 50%, #fff0c2 70%, #d8b66b 100%); animation-delay: -2.4s; }
@keyframes shimmer { 0% { background-position: 100% 0; } 50% { background-position: 0 0; } 100% { background-position: 100% 0; } }
@media (max-width: 520px) { .logo { font-size: 26px !important; } }
.brand p { margin: 2px 0 0; font: italic 400 15px var(--serif); color: var(--dim); }
.sound { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--ivory); padding: 0; display: inline-grid; place-items: center; line-height: 1; }
.ico { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound .slash { display: none; grid-area: 1 / 1; }
.sound .ico { grid-area: 1 / 1; }
.sound > * { grid-area: 1 / 1; }
.sound[aria-pressed="false"] { color: var(--dim); }
.sound[aria-pressed="false"] .slash { display: block; }

.tabs-wrap { position: relative; margin: 0 max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))); border-bottom: 1px solid var(--line); }
.tabs-wrap .tabs { margin: 0; border-bottom: 0; scroll-behavior: smooth; }
.tabs-arr { position: absolute; top: 6px; bottom: 0; width: 44px; z-index: 3; border: 0; padding: 0; display: none; align-items: center; color: var(--ivory); cursor: pointer; }
.tabs-arr svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--gilt)); animation: nudge 1.6s ease-in-out infinite; }
.tabs-arr.l { left: 0; justify-content: flex-start; background: linear-gradient(90deg, var(--night) 25%, transparent); }
.tabs-arr.r { right: 0; justify-content: flex-end; background: linear-gradient(270deg, var(--night) 25%, transparent); }
.tabs-arr.l svg { animation-name: nudgeL; }
.tabs-wrap.can-l .tabs-arr.l, .tabs-wrap.can-r .tabs-arr.r { display: flex; }
@keyframes nudge { 50% { transform: translateX(4px); } }
@keyframes nudgeL { 50% { transform: translateX(-4px); } }
.tabs { position: relative; display: flex; gap: 0; padding-top: 6px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin: 0 max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))); padding-left: 0; padding-right: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; min-width: 150px; text-align: left; background: none; border: 0; border-bottom: 2px solid transparent; padding: 14px 18px 14px 16px; margin-bottom: -1px; color: var(--dim); }
.tab .t-name { display: flex; align-items: center; gap: 10px; font: 500 20px var(--serif); color: inherit; }
.tab .t-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot) 22%, transparent); }
.tab .t-sub { display: block; margin-top: 2px; font-size: 13px; }
.tab[aria-selected="true"] { color: var(--ivory); border-bottom-color: var(--dot); }
.tab:hover { color: var(--ivory); }

/* ---------- основное ---------- */
main { padding: 28px var(--gutter) 40px; max-width: 1280px; margin: 0 auto; outline: none; }
.loading { color: var(--dim); font-family: var(--serif); font-style: italic; font-size: 20px; padding: 60px 0; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 5vw, 72px); align-items: center; padding-bottom: 34px; }
.when { margin: 0; color: var(--dim); }
.gname { font-size: clamp(44px, 7.4vw, 96px); line-height: 0.95; font-weight: 700; margin: 8px 0 10px; text-shadow: 0 0 40px color-mix(in srgb, var(--acc) 45%, transparent); }
.rule { color: var(--acc); font: italic 500 22px var(--serif); margin: 0 0 26px; }
.clock { display: flex; gap: clamp(10px, 2vw, 22px); font-variant-numeric: tabular-nums; }
.clock .u { display: flex; flex-direction: column; min-width: 64px; }
.clock b { font: 500 clamp(40px, 6vw, 72px)/1 var(--sans); letter-spacing: -0.02em; }
.clock small { color: var(--dim); font-size: 13px; margin-top: 4px; }
.pending-note { margin: 14px 0 0; color: var(--dim); max-width: 38ch; }
.pending-note.live { color: var(--acc); }

/* орб и способы гадания */
.ritual { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-right: clamp(0px, 4vw, 56px); }
.orb-wrap { position: relative; width: min(320px, 70vw); aspect-ratio: 1; }
.orb { position: absolute; inset: 0; border: 0; background: none; padding: 0; border-radius: 50%; color: var(--ivory); }
.orb svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 0 26px color-mix(in srgb, var(--acc) 40%, transparent)); }
.orb .ring-a { transform-origin: 50% 50%; animation: slow-turn 60s linear infinite; }
.orb .ring-b { transform-origin: 50% 50%; animation: slow-turn 38s linear infinite reverse; }
.orb .core { fill: color-mix(in srgb, var(--acc) 22%, var(--night)); stroke: var(--acc); transition: fill .3s; }
.orb:hover .core, .orb:focus-visible .core { fill: color-mix(in srgb, var(--acc) 42%, var(--night)); }
.orb-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; padding: 0 22%; }
.orb-label b { font: 700 clamp(22px, 3vw, 28px)/1.1 var(--serif); }
.orb-label span { display: block; margin-top: 6px; color: var(--dim); font-size: 13px; }
.orb[disabled] { cursor: progress; }
.orb[disabled] .core { fill: var(--acc); }

.pick { margin: 0 0 44px; }
.pick-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.pick-head h3 { font-size: clamp(26px, 3vw, 34px); }
.pick-head .hint { color: var(--dim); margin: 4px 0 0; max-width: 62ch; }
.global-opts { display: flex; gap: 12px; align-items: center; color: var(--dim); font-size: 14px; }
.global-opts select, .methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.method { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--night) 55%, transparent); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s, transform .2s; }
.method:hover { border-color: var(--line-strong); }
.method.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 9%, color-mix(in srgb, var(--night) 60%, transparent)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc) 40%, transparent), 0 8px 30px -12px color-mix(in srgb, var(--acc) 55%, transparent); }
.m-top { display: flex; align-items: center; gap: 12px; }
.m-ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--gilt); border: 1px solid var(--line-strong); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--gilt) 18%, transparent), transparent 70%); transition: color .2s, border-color .2s, transform .3s; }
.m-ico svg { width: 26px; height: 26px; }
.method.on .m-ico { color: var(--acc); border-color: var(--acc); transform: rotate(-6deg) scale(1.04); }
.m-title { flex: 1; font: 600 20px/1.15 var(--serif); cursor: pointer; }
.method input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--line-strong); border-radius: 4px; display: grid; place-content: center; cursor: pointer; background: transparent; transition: background .15s, border-color .15s; }
.method input[type="checkbox"]::after { content: ""; width: 6px; height: 11px; border: solid var(--acc-ink); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg) scale(0); margin-top: -2px; transition: transform .18s; }
.method input[type="checkbox"]:checked { border-color: var(--acc); background: var(--acc); }
.method input[type="checkbox"]:checked::after { transform: rotate(45deg) scale(1); }
.m-blurb { margin: 0; font-size: 14px; line-height: 1.4; color: var(--dim); flex: 1; }
.m-extra { display: none; gap: 8px; flex-wrap: wrap; }
.method.on .m-extra { display: flex; }
.m-foot { display: none; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--dim); }
.method.on .m-foot { display: flex; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); }
.stepper button { width: 32px; height: 30px; background: none; border: 0; font-size: 17px; line-height: 1; }
.stepper button:hover { background: var(--plate-2); }
.stepper output { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ivory); }
.m-extra input[type="text"], .m-extra input[type="date"] { flex: 1 1 140px; min-width: 0; background: var(--plate); border: 1px solid var(--line-strong); color: var(--ivory); padding: 7px 10px; font: inherit; font-size: 15px; border-radius: 0; color-scheme: dark; }
.m-extra input:focus-visible { outline-offset: 0; }
.slider-row { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 13px; color: var(--dim); }
.slider-row input { flex: 1; accent-color: var(--acc); }
.cast-bar { max-width: 900px; flex-wrap: wrap; margin-left: auto; position: sticky; bottom: 14px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 12px 14px 12px 20px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--night) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 40px -10px #000c; }
.cast-sum { color: var(--ivory); font-size: 15px; }
.cast-sum.warn { color: var(--acc); }
.btn.big { padding: 12px 26px; font-size: 17px; font-family: var(--serif); font-weight: 600; letter-spacing: .01em; }
.btn.big .cast-star { display: inline-block; margin-right: 4px; animation: slow-turn 8s linear infinite; }
.btn.big[disabled], .orb[disabled] { cursor: progress; opacity: .7; }

/* язык */
.top-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.lang { display: inline-flex; border: 1px solid var(--line-strong); }
.lang button { background: none; border: 0; padding: 6px 11px; font-size: 13px; font-weight: 500; letter-spacing: .06em; color: var(--dim); }
.lang button + button { border-left: 1px solid var(--line); }
.lang button:hover { color: var(--ivory); }
.lang button[aria-pressed="true"] { background: var(--acc); color: var(--acc-ink); }
.t-ico { display: inline-grid; vertical-align: -5px; margin-right: 10px; width: 24px; height: 24px; color: var(--acc); }
.t-ico svg { width: 24px; height: 24px; }

/* пульсирующая точка активной лотереи */
.tab .t-dot { position: relative; }
.tab[aria-selected="true"] .t-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot) 30%, transparent), 0 0 12px var(--dot); }
.tab[aria-selected="true"] .t-dot::before, .tab[aria-selected="true"] .t-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--dot); animation: pulse 2.4s cubic-bezier(.2, .6, .3, 1) infinite; }
.tab[aria-selected="true"] .t-dot::after { animation-delay: 1.2s; }
@keyframes pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tab[aria-selected="true"] .t-dot::before, .tab[aria-selected="true"] .t-dot::after, .btn.big .cast-star { animation: none; } .tab[aria-selected="true"] .t-dot::before { transform: scale(2); opacity: .4; } }

/* ---------- шары ---------- */
.balls { display: flex; flex-wrap: wrap; gap: 8px; }
.ball {
  --s: 46px; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  display: grid; place-content: center; font: 600 calc(var(--s) * 0.4)/1 var(--sans); font-variant-numeric: tabular-nums;
  color: var(--acc-ink);
  background: radial-gradient(circle at 32% 28%, #fff9 0, transparent 38%), var(--acc);
  box-shadow: inset 0 -4px 8px #0003, 0 0 0 1px #0004;
}
.ball.sm { --s: 30px; }
.ball.xs { --s: 24px; }
.ball.lg { --s: 56px; }
.ball.bonus { background: transparent; color: var(--ivory); box-shadow: inset 0 0 0 2px var(--gilt); }
.ball.dim { background: var(--plate-2); color: var(--dim); box-shadow: inset 0 0 0 1px var(--line-strong); }
.ball.hit { background: radial-gradient(circle at 32% 28%, #ffffffb0 0, transparent 40%), linear-gradient(150deg, #7be3ab, #2ea46d); color: #04271a; outline: 2px solid #b9f4d4; outline-offset: 2px; box-shadow: inset 0 -4px 8px #0003, 0 0 14px #4fd38f77; }

/* ---------- плиты со статистикой ---------- */
.plates { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px 28px; }
.plate { position: relative; border: 1px solid var(--line); padding: 30px 22px 22px; min-width: 0; grid-column: span 12; background: linear-gradient(180deg, color-mix(in srgb, var(--plate) 62%, transparent), color-mix(in srgb, var(--plate) 28%, transparent)); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.plate > h3 { position: absolute; top: -14px; left: 16px; background: color-mix(in srgb, var(--night) 92%, transparent); padding: 0 10px; font-size: 21px; color: var(--ivory); }
.plate .hint { color: var(--dim); font-size: 14px; margin: 0 0 14px; max-width: 70ch; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); margin-bottom: 14px; }
.seg button { background: none; border: 0; padding: 5px 12px; font-size: 14px; color: var(--dim); }
.seg button[aria-pressed="true"] { background: var(--acc); color: var(--acc-ink); font-weight: 500; }

.draw-row { display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.draw-row:first-child { border-top: 0; }
.draw-row .meta { font-size: 13px; color: var(--dim); line-height: 1.25; }
.draw-row .meta b { color: var(--ivory); font-weight: 500; display: block; font-size: 14px; }
.draw-big { padding-bottom: 14px; }
.draw-big .meta { font-size: 15px; margin-bottom: 12px; color: var(--dim); }
.draw-big .meta b { display: inline; color: var(--ivory); font-family: var(--serif); font-size: 22px; font-weight: 500; margin-right: 8px; }

.fact-list { display: grid; gap: 0; margin: 0; }
.fact { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; }
.fact:first-child { border-top: 0; }
.fact dt { color: var(--dim); font-size: 14.5px; }
.fact dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.fact dd b { font: 500 22px var(--serif); }
.fact dd small { display: block; color: var(--dim); font-size: 12.5px; }
.money { color: var(--gilt); }

.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 32px 1fr 76px; gap: 10px; align-items: center; font-size: 14px; }
.bar .n { font: 600 14px var(--sans); text-align: center; }
.bar .track { position: relative; height: 12px; background: var(--plate-2); }
.bar .fill { position: absolute; inset: 0 auto 0 0; background: var(--acc); }
.bar .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ivory); }
.bar .v { color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }

.heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
.cell { position: relative; aspect-ratio: 1; display: grid; place-content: center; font: 500 14px var(--sans); font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--acc) calc(var(--h) * 100%), var(--plate-2)); color: var(--ivory); }
.cell small { display: block; font-size: 10px; opacity: .8; text-align: center; }
.cell.cold { background: color-mix(in srgb, #5668b8 calc(var(--h) * 100%), var(--plate-2)); }
.cell.in-last { outline: 2px solid var(--ivory); outline-offset: -2px; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--dim); margin-top: 12px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-right: 6px; }

.pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pairs li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pairs li:first-child { border-top: 0; }
.pairs .c { color: var(--dim); font-variant-numeric: tabular-nums; text-align: right; }
.pairs .x { color: var(--acc); font-size: 13px; }
.sky { width: 100%; height: auto; max-height: 560px; display: block; }
.sky text { font: 600 12px var(--sans); fill: var(--ivory); text-anchor: middle; dominant-baseline: central; }

.hists { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px 28px; }
.hist h4 { font-size: 17px; margin-bottom: 4px; }
.hist p { margin: 0 0 10px; color: var(--dim); font-size: 13.5px; }
.hbars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.hbars div { flex: 1; background: var(--line-strong); min-height: 2px; position: relative; }
.hbars div.cur { background: var(--acc); }
.hlab { display: flex; gap: 3px; font-size: 11px; color: var(--dim); }
.hlab span { flex: 1 1 0; min-width: 0; overflow: visible; white-space: nowrap; text-align: center; font-variant-numeric: tabular-nums; }

.verdict { font: 500 22px/1.25 var(--serif); margin: 0 0 8px; }
.small { color: var(--dim); font-size: 14px; }

/* ---------- результат гадания ---------- */
.results { margin: 0 0 48px; }
.results[hidden] { display: none; }
.results h3 { font-size: 32px; margin-bottom: 4px; }
.results .sub { color: var(--dim); margin: 0 0 22px; }
.tickets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ticket { border: 1px solid var(--line-strong); padding: 16px 18px 14px; background: color-mix(in srgb, var(--plate) 70%, transparent); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: grid; gap: 12px; }
.ticket header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ticket header h4 { font-size: 22px; }
.ticket header span { color: var(--dim); font-size: 13px; }
.ticket .balls .ball { opacity: 0; transform: scale(.2) translateY(14px); animation: appear .55s cubic-bezier(.2, 1.4, .4, 1) forwards; animation-delay: var(--d, 0s); }
.ticket .note { margin: 0; color: var(--dim); font-size: 14px; }
.ticket footer { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { background: none; border: 1px solid var(--line-strong); padding: 6px 12px; font-size: 14px; }
.btn:hover { border-color: var(--acc); }
.btn.primary { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); font-weight: 500; }
.empty { color: var(--dim); }

.hist-list { display: grid; gap: 0; }
.hist-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.hist-item:first-child { border-top: 0; }
.hist-item .meta { font-size: 13px; color: var(--dim); }
.hist-item .score { font: 500 18px var(--serif); text-align: right; }

.foot { max-width: 1280px; margin: 0 auto; padding: 24px var(--gutter) 60px; color: var(--dim); font-size: 14px; border-top: 1px solid var(--line); }
.foot p { margin: 0 0 8px; max-width: 80ch; }

#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

@keyframes slow-turn { to { transform: rotate(360deg); } }
@keyframes appear { to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .orb-wrap { width: min(250px, 66vw); }
  .ritual { padding-right: 0; }
  .cast-bar { bottom: 8px; padding: 10px 10px 10px 14px; }
  .btn.big { padding: 11px 18px; }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .plates { column-gap: 0; }
  .tab { min-width: 138px; }
}
@media (max-width: 520px) {
  .top { flex-wrap: wrap; row-gap: 12px; }
  .top-tools { width: 100%; justify-content: space-between; }
  .cast-bar { gap: 10px; }
  .cast-sum { font-size: 13px; line-height: 1.25; flex: 1; min-width: 0; }
  .btn.big { white-space: nowrap; padding: 10px 14px; font-size: 15px; }
  .btn.big .cast-star { display: none; }
  .clock .u { min-width: 0; }
  .brand p { display: none; }
  .ball { --s: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-mark, .orb .ring-a, .orb .ring-b { animation: none; }
  .ticket .balls .ball { animation-duration: .01s; animation-delay: 0s; }
}

/* ---------- Таро ---------- */
.spread { display: flex; flex-wrap: wrap; gap: 10px 8px; }
.spread { --tw: 56px; }
@media (min-width: 700px) { .spread { --tw: 92px; } }
.tc { width: var(--tw); display: grid; gap: 4px; justify-items: center; text-align: center; }
.tcard { width: var(--tw); aspect-ratio: 120 / 200; perspective: 600px; }
.tcard-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(0deg); animation: flip .9s cubic-bezier(.3, .7, .2, 1) forwards; animation-delay: var(--d, 0s); }
.tcard .face, .tcard .back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 6px; overflow: hidden; box-shadow: 0 4px 14px #0008; }
.tcard .face { transform: rotateY(180deg); }
.tcard .face svg, .tcard .back svg { width: 100%; height: 100%; display: block; }
.tcard.rev .face svg { transform: rotate(180deg); }
.tc .pos { font-size: 10.5px; line-height: 1.15; color: var(--dim); min-height: 24px; }
.read { font-size: 14px; color: var(--dim); }
.read summary { cursor: pointer; color: var(--ivory); }
.read ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.read li b { color: var(--ivory); font-weight: 500; }
.ticket .sorted { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ticket .sorted .small { margin-right: 4px; }
@keyframes flip { from { transform: rotateY(0deg); } to { transform: rotateY(180deg); } }
@media (prefers-reduced-motion: reduce) { .tcard-in { animation-duration: .01s; animation-delay: 0s; } }

/* ---------- импорт, вход ---------- */
.export { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 0 0 22px; padding: 12px 14px; border: 1px dashed var(--line-strong); background: color-mix(in srgb, var(--night) 55%, transparent); }
.export label { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--dim); }
.export select { background: var(--plate); color: var(--ivory); border: 1px solid var(--line-strong); padding: 5px 8px; font: inherit; border-radius: 0; }
.export .small { flex-basis: 100%; margin: 0; }
.who { display: flex; align-items: center; gap: 10px; }
.who .btn { padding: 5px 12px; }
.who-name { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 4px; color: var(--dim); font-size: 14px; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.auth { background: var(--plate); color: var(--ivory); border: 1px solid var(--line-strong); padding: 0; width: min(420px, calc(100vw - 32px)); }
dialog.auth::backdrop { background: rgba(3, 5, 14, 0.72); backdrop-filter: blur(3px); }
.auth form { display: grid; gap: 12px; padding: 22px; }
.auth h2 { font-size: 28px; }
.auth .seg { margin: 0; }
.auth label { display: grid; gap: 4px; font-size: 14px; color: var(--dim); }
.auth input { background: var(--night); color: var(--ivory); border: 1px solid var(--line-strong); padding: 9px 10px; font: inherit; border-radius: 0; }
.auth .err { color: #ff9b8a; min-height: 1.4em; margin: 0; font-size: 14px; }
.auth .row { display: flex; gap: 10px; justify-content: flex-end; }
.sync-note { font-size: 13px; color: var(--dim); margin: 0 0 12px; }

.tc .ball { opacity: 0; transform: scale(.2); animation: appear .5s cubic-bezier(.2, 1.4, .4, 1) forwards; animation-delay: var(--d, 0s); }
.hist-item .score .btn { margin-top: 6px; padding: 1px 9px; font-size: 16px; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .tc .ball { animation-duration: .01s; animation-delay: 0s; } }

.elems { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.elems button { display: grid; justify-items: center; gap: 2px; width: 62px; padding: 6px 2px 4px; background: transparent; border: 1px solid var(--line-strong); color: var(--dim); font-size: 12px; border-radius: 4px; }
.elems button svg { width: 26px; height: 26px; }
.elems button[aria-checked="true"] { border-color: var(--acc); color: var(--ivory); background: color-mix(in srgb, var(--acc) 16%, transparent); }
.m-extra select { background: var(--plate); color: var(--ivory); border: 1px solid var(--line-strong); padding: 7px 10px; font: inherit; font-size: 15px; border-radius: 0; color-scheme: dark; }
.tokens { display: flex; flex-wrap: wrap; gap: 14px 10px; --tkw: 76px; }
@media (min-width: 700px) { .tokens { --tkw: 112px; } }
.tk { width: var(--tkw); display: grid; gap: 5px; justify-items: center; text-align: center; }
.tk.dice { width: calc(var(--tkw) * 1.6); }
.tk-g { width: 100%; opacity: 0; transform: translateY(10px) scale(.7) rotate(-6deg); animation: appear .6s cubic-bezier(.2, 1.4, .4, 1) forwards; animation-delay: var(--d, 0s); }
.tk-g svg { width: 100%; height: auto; display: block; max-height: 80px; filter: drop-shadow(0 4px 10px #0008); }
.tk .ball { opacity: 0; transform: scale(.2); animation: appear .5s cubic-bezier(.2, 1.4, .4, 1) forwards; animation-delay: var(--d, 0s); }
.tk .pos { font-size: 11.5px; line-height: 1.15; color: var(--dim); }
.tk.gold .pos { color: #ffd86b; font-weight: 500; }
.tk.gold .ball { box-shadow: 0 0 14px #ffd86b99; }
@media (prefers-reduced-motion: reduce) { .tk-g, .tk .ball { animation-duration: .01s; animation-delay: 0s; } .logo .lw { animation: none; } }
.ticket.tarot .tc .pos { font-size: 12px; }

/* счётчики, кнопки «Воля случая» и Amor fati */
.m-made { flex: none; min-width: 24px; height: 24px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 12px; font: 600 12.5px var(--sans); font-variant-numeric: tabular-nums; color: var(--acc-ink); background: var(--gilt); }
.m-made.zero { background: transparent; color: var(--dim); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cast-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.btn.ghost { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 15px; color: var(--ivory); }
.btn.ghost:hover { background: color-mix(in srgb, var(--acc) 14%, transparent); }
.btn.ghost[disabled] { opacity: .6; cursor: progress; }
.b-ico { display: inline-grid; width: 20px; height: 20px; color: var(--gilt); }
.b-ico svg { width: 20px; height: 20px; }
.auto-note { margin: -8px 0 16px; color: var(--acc); font-size: 14.5px; }
@media (max-width: 640px) {
  .cast-sum { flex-basis: 100%; }
  .cast-btns { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .cast-btns .btn { flex: 1; justify-content: center; padding-inline: 8px; font-size: 14px; white-space: nowrap; }
  .cast-btns .btn.big { flex: 1.5; font-size: 15px; }
  .btn.ghost .b-ico { display: none; }
}

/* зодиак, фэн-шуй, каббала, «Керувати долею» */
.zseg { display: inline-flex; border: 1px solid var(--line-strong); }
.zseg button { background: none; border: 0; padding: 6px 12px; font-size: 14px; color: var(--dim); }
.zseg button[aria-checked="true"] { background: var(--acc); color: var(--acc-ink); font-weight: 500; }
.zinfo { flex: 1 1 100%; margin: 0; min-height: 1.3em; font-size: 14px; color: var(--acc); }
.zinfo:empty { display: none; }
.loshu { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; }
.loshu button { display: grid; place-items: center; width: 56px; height: 56px; padding: 0; background: transparent; border: 1px solid var(--line-strong); color: var(--dim); border-radius: 6px; }
.loshu button svg { width: 30px; height: 30px; }
.loshu button[aria-checked="true"] { border-color: var(--acc); color: var(--ivory); background: color-mix(in srgb, var(--acc) 16%, transparent); }
.quote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 2px solid var(--gilt); }
.quote p { margin: 0 0 6px; font: italic 400 clamp(19px, 2.4vw, 24px)/1.35 var(--serif); color: var(--ivory); max-width: 60ch; }
.quote footer { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; }
.quote cite { font-style: normal; font-size: 14px; color: var(--dim); }
.quote .he { font: 500 22px/1 "Noto Sans Hebrew", "Arial Hebrew", "David", var(--sans); color: var(--gilt); }
.btn.merge { border-color: var(--gilt); }
.btn.merge[hidden] { display: none; }
@media (max-width: 640px) {
  .cast-btns { flex-wrap: wrap; }
  .cast-btns .btn.merge { flex: 1 1 100%; order: 5; }
  .loshu { grid-template-columns: repeat(3, 52px); }
  .loshu button { width: 52px; height: 52px; }
}

/* история: календарь, копирование, выигрыш */
.hist-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin: 14px 0 8px; }
.hist-bar h4 { font-size: 19px; }
.hist-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.hist-wrap { display: grid; gap: 18px 32px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 760px) { .hist-wrap { grid-template-columns: minmax(0, 1fr) 300px; } .cal-box { order: 2; } }
.hist-main { min-width: 0; }
.cal-box { border: 1px solid var(--line); padding: 10px 12px 14px; background: color-mix(in srgb, var(--night) 40%, transparent); }
.cal-box summary { cursor: pointer; font-size: 15px; color: var(--dim); }
.cal-box[open] summary { margin-bottom: 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-head b { font: 500 17px var(--serif); }
.cal-head b::first-letter { text-transform: uppercase; }
.cal-head .btn { padding: 2px 11px; font-size: 18px; line-height: 1.3; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-wd span { text-align: center; font-size: 12px; color: var(--dim); text-transform: capitalize; }
.cal-day { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 0; border: 1px solid transparent; background: transparent; color: var(--dim); font-size: 14px; border-radius: 4px; cursor: default; }
.cal-day.has { color: var(--ivory); cursor: pointer; border-color: var(--line-strong); background: color-mix(in srgb, var(--acc) 14%, transparent); }
.cal-day.has i { position: absolute; right: 2px; top: 1px; font: 600 10px/1 var(--sans); font-style: normal; color: var(--acc); }
.cal-day.today span { text-decoration: underline; text-underline-offset: 3px; }
.cal-day.sel { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.cal-day.sel i { color: var(--acc-ink); }
.hist-item .win { margin-top: 2px; font: 500 15px var(--sans); color: #ffd86b; }
.hist-sum { margin: 14px 0 0; padding: 10px 12px; border: 1px solid var(--line-strong); font-size: 15px; }
.hist-sum b { color: #ffd86b; font-weight: 500; }

/* единая структура билета: заголовок, слева числа и кнопки, справа визуал и пояснение */
.ticket { grid-template-columns: minmax(0, 1fr); gap: 14px 32px; align-content: start; }
.ticket header { grid-column: 1 / -1; }
.tk-side, .tk-main { display: grid; gap: 14px; align-content: start; min-width: 0; }
.tk-main .note { max-width: 70ch; }
.tk-main:empty { display: none; }
@media (min-width: 900px) {
  .ticket { grid-template-columns: 340px minmax(0, 1fr); }
  .tk-side { position: sticky; top: 16px; }
}

/* сортировка последних тиражей */
.draw-big .meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sortbar { display: inline-flex; border: 1px solid var(--line-strong); }
.sortbar button { display: grid; place-items: center; width: 36px; height: 32px; padding: 0; background: none; border: 0; color: var(--dim); }
.sortbar button + button { border-left: 1px solid var(--line-strong); }
.sortbar button svg { width: 20px; height: 20px; }
.sortbar button:hover { color: var(--ivory); }
.sortbar button[aria-checked="true"] { background: var(--acc); color: var(--acc-ink); }

/* ---------- справка и обучение ---------- */
dialog.help { background: var(--plate); color: var(--ivory); border: 1px solid var(--line-strong); padding: 0; width: min(680px, calc(100vw - 24px)); max-height: min(86vh, 820px); margin: auto; flex-direction: column; overflow: hidden; }
dialog.help[open] { display: flex; }
dialog.help::backdrop { background: rgba(3, 5, 14, 0.72); backdrop-filter: blur(3px); }
.help-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.help-head h2 { margin: 0; font: 600 24px/1.2 var(--serif); }
.help-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--ivory); font-size: 15px; cursor: pointer; }
.help-tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.help-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--dim); font: 500 15px var(--sans); padding: 10px 12px; cursor: pointer; white-space: nowrap; }
.help-tabs button[aria-selected="true"] { color: var(--ivory); border-bottom-color: var(--acc); }
.help-body { padding: 16px 20px 22px; overflow-y: auto; min-height: 0; }
.help-lead { margin: 0 0 14px; color: var(--dim); }
.help-item { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: rgba(255, 255, 255, 0.02); }
.help-item summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; font: 600 16px var(--serif); list-style: none; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after { content: "▾"; margin-left: auto; color: var(--dim); transition: transform .2s; }
.help-item[open] summary::after { transform: rotate(180deg); }
.hi-ico { width: 28px; height: 28px; flex: none; color: var(--acc); display: inline-flex; }
.hi-ico svg { width: 100%; height: 100%; }
.hi-body { padding: 0 14px 12px; }
.hi-body p { margin: 0 0 8px; }
.hi-sees { color: var(--dim); font-size: 14px; }
.hi-sees b { color: var(--gilt); font-weight: 600; }
.help-switch { display: flex; gap: 10px; align-items: center; margin-top: 18px; cursor: pointer; }
.help-switch input { width: 20px; height: 20px; accent-color: var(--acc); }

.tour-block { position: fixed; inset: 0; z-index: 90; }
.tour-spot { position: fixed; z-index: 91; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(3, 5, 14, 0.78), 0 0 0 2px var(--acc); pointer-events: none; transition: left .25s, top .25s, width .25s, height .25s; }
.tour-pop { position: fixed; z-index: 92; width: min(340px, calc(100vw - 24px)); background: var(--plate-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 16px 18px 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55); }
.tour-pop h3 { margin: 2px 0 6px; font: 600 20px/1.25 var(--serif); }
.tour-pop p { margin: 0 0 12px; font-size: 15px; }
.tp-step { color: var(--gilt); font-size: 13px; }
.tp-btns { display: flex; gap: 8px; justify-content: space-between; }
.tp-foot { display: flex; justify-content: space-between; margin-top: 10px; }
.tp-foot button { background: none; border: 0; color: var(--dim); font: 13px var(--sans); text-decoration: underline; cursor: pointer; padding: 4px 0; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } }

/* тест случайности живёт в футере */
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px 48px; align-items: start; }
#foot-rand:empty { display: none; }
#foot-rand .verdict { margin: 0 0 8px; color: var(--ivory); font-size: 15px; }
#foot-rand .small { font-size: 13px; }
.foot-note { padding-top: 6px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- тарифы ---------- */
.method.locked { cursor: default; }
.method.locked .m-inner { display: flex; flex-direction: column; gap: 8px; opacity: .5; filter: saturate(.5); pointer-events: none; }
.m-unlock { position: absolute; inset: 0; width: 100%; background: transparent; border: 0; cursor: pointer; color: var(--gilt); font: 600 14px var(--sans); display: flex; align-items: flex-start; justify-content: flex-end; padding: 14px 16px; gap: 6px; }
.m-unlock span { font-size: 15px; }
.m-unlock:hover, .m-unlock:focus-visible { background: color-mix(in srgb, var(--gilt) 7%, transparent); outline: 1px solid var(--gilt); outline-offset: -1px; }
.btn.locked { opacity: .75; }
.lock-note { color: var(--dim); }
.plan-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 1px solid var(--gilt); border-radius: 13px; color: var(--gilt); font: 600 12px var(--sans); text-decoration: none; white-space: nowrap; }
.plan-chip:hover { background: color-mix(in srgb, var(--gilt) 14%, transparent); }
.tab-plan { flex: 0 0 auto; min-width: 130px; }
.plan-dot { background: var(--gilt) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gilt) 22%, transparent) !important; }
.tab-plan[aria-selected="true"] { border-bottom-color: var(--gilt); }
.upsell form { padding: 22px 24px; display: grid; gap: 12px; }
.upsell h2 { margin: 0; font: 600 22px/1.3 var(--serif); }
.upsell p { margin: 0; color: var(--dim); }
.auth-hint { margin: -4px 0 0; font-size: 13px; color: var(--gilt); }

.pricing { max-width: 920px; margin: 0 auto; padding: 36px var(--gutter) 24px; }
.pricing h2 { margin: 0 0 8px; font: 600 clamp(30px, 5vw, 44px)/1.1 var(--serif); }
.pr-lead { margin: 0 0 18px; max-width: 62ch; color: var(--dim); font-size: 17px; }
.pr-status { margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--line-strong); border-left: 3px solid var(--gilt); background: rgba(216, 182, 107, 0.06); }
.pr-trial { margin: 0 0 18px; padding: 12px 16px; border: 1px dashed var(--gilt); color: var(--ivory); display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.pr-h { margin: 30px 0 12px; font: 600 22px var(--serif); }
.pr-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.pr-table th, .pr-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.pr-table th[scope="row"], .pr-table thead th:first-child { text-align: left; font-weight: 400; }
.pr-table thead th { color: var(--dim); font-weight: 500; }
.pr-table .pro { color: var(--gilt); font-weight: 600; background: rgba(216, 182, 107, 0.05); }
.pr-table td { width: 110px; }
.prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.price { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 18px 18px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--plate) 60%, transparent); }
.price.best { border-color: var(--gilt); box-shadow: 0 0 0 1px var(--gilt) inset; }
.price.sel { outline: 2px solid var(--acc); outline-offset: 2px; }
.price h3 { margin: 0; font: 500 20px var(--serif); }
.price-sum { margin: 0; font: 400 15px var(--sans); color: var(--dim); }
.price-sum b { font: 600 42px/1 var(--serif); color: var(--ivory); }
.price-per { margin: 0 0 8px; color: var(--dim); font-size: 14px; }
.price-off { color: var(--gilt); font-weight: 600; }
.price-flag { position: absolute; top: -11px; left: 14px; padding: 2px 10px; background: var(--gilt); color: #231a05; font: 600 12px var(--sans); }
.price .btn { margin-top: auto; }
.pr-pay { margin-top: 22px; padding: 16px 18px; border: 1px solid var(--line); }
.pr-pay h3 { margin: 0 0 6px; font: 600 18px var(--serif); }
.pr-pay p { margin: 0 0 10px; }
.pr-pay a.btn { display: inline-block; text-decoration: none; }
.pr-pick, .pr-req { margin-top: 10px; }
.pr-code { margin-top: 22px; display: grid; gap: 8px; }
.pr-code label { font: 600 16px var(--serif); }
.pr-code-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pr-code input { flex: 1 1 220px; min-width: 0; padding: 11px 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong); color: var(--ivory); font: 500 17px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; }
.pr-msg { min-height: 1.4em; margin: 0; }
.pr-msg.ok { color: #8fd6a4; } .pr-msg.bad { color: #f08a7a; }
.pr-note { margin: 26px 0 0; color: var(--dim); font-size: 13px; max-width: 70ch; }
@media (max-width: 700px) {
  .prices { grid-template-columns: 1fr; }
  .pr-table td { width: 64px; padding: 8px 4px; }
  .pr-table th, .pr-table td { font-size: 14px; }
}
.pr-steps { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 4px; }
.pr-link { text-decoration: none; display: inline-block; margin-left: 6px; }

/* ---------- подвал, логотип, плашка ---------- */
a.brand { text-decoration: none; color: var(--gilt); cursor: pointer; }
a.brand:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; }
.foot-about { margin: 0 0 10px; color: var(--ivory); font-size: 14.5px; line-height: 1.5; max-width: 52ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0; }
.foot-links button, .foot-links a { background: none; border: 0; padding: 0; color: var(--gilt); font: 500 14px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.legal-h { margin: 18px 0 4px; font: 600 18px var(--serif); color: var(--gilt); }
.help-body p { margin: 0 0 10px; }

.plan-banner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 14px; padding: 9px var(--gutter); background: linear-gradient(90deg, rgba(216,182,107,.18), rgba(232,131,111,.16)); border-bottom: 1px solid var(--gilt); font-size: 15px; text-align: center; }
.plan-banner b { color: var(--gilt); }
.plan-banner .btn { padding: 4px 14px; border-color: var(--gilt); color: var(--ivory); text-decoration: none; display: inline-block; }
.plan-banner .x { background: none; border: 0; color: var(--dim); font-size: 18px; cursor: pointer; padding: 0 6px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--dim); }
.agree input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--acc); flex: none; }
.agree a { color: var(--gilt); }
.profile dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; }
.profile dt { color: var(--dim); }
.profile dd { margin: 0; word-break: break-all; }
.profile h3 { margin: 16px 0 6px; font: 600 18px var(--serif); }
.profile .note { color: #8fd6a4; min-height: 1.3em; margin: 4px 0 0; }

/* компактная форма входа и регистрации */
.auth form { gap: 9px; padding: 16px 18px 14px; }
.auth h2 { font-size: 22px; line-height: 1.1; }
.auth label { gap: 3px; font-size: 13px; }
.auth input:not([type=checkbox]) { padding: 7px 9px; }
.auth .two { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.auth .two label { min-width: 0; }
.auth .two input { width: 100%; box-sizing: border-box; }
.auth .auth-hint { margin: -2px 0 0; font-size: 12px; line-height: 1.35; }
.auth .agree { font-size: 12.5px; line-height: 1.35; }
.auth .err { min-height: 0; }
.auth .err:empty { display: none; }
@media (max-width: 400px) { .auth .two { grid-template-columns: 1fr; } }
.pr-steps a, .pr-msg a { color: var(--gilt); text-decoration: underline; text-underline-offset: 2px; }

/* блок «Ваші прогнози»: компактные подсказки в одну строку, пустая история без календаря */
.sync-row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin: 0 0 12px; }
.sync-row .sync-note { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sync-row .btn { padding: 3px 11px; font-size: 13px; }
.sync-row:empty { display: none; }
.hist-wrap + .empty, #history > .empty { margin: 4px 0 2px; }
.auth label.agree { display: flex; gap: 10px; align-items: center; }
.auth label.agree input { margin: 0; flex: none; }

.auth .g-or { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.auth .g-or::before, .auth .g-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth .g-btn { display: flex; justify-content: center; min-height: 40px; color-scheme: light; }

/* профиль */
.auth .profile { padding: 20px 22px 18px; display: grid; gap: 12px; }
.auth .profile form, .auth .profile details form { padding: 0; display: grid; gap: 10px; }
.prof-head { display: flex; gap: 14px; align-items: center; }
.prof-head h2 { margin: 0; font-size: 24px; line-height: 1.1; word-break: break-word; }
.prof-ava { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font: 600 22px var(--serif); color: #1b1405; background: linear-gradient(135deg, #f0d28a, #c79a4a); }
.prof-plan { margin: 4px 0 0; color: var(--dim); font-size: 13.5px; line-height: 1.35; }
.prof-card { border: 1px solid var(--line); background: rgba(255,255,255,.03); padding: 12px 14px; }
.prof-card h3, .prof-card summary { margin: 0 0 8px; font: 600 15px var(--sans); color: var(--ivory); }
.prof-card summary { margin: 0; cursor: pointer; }
.prof-card[open] summary { margin-bottom: 10px; }
.prof-line { display: flex; gap: 8px; }
.prof-line input { flex: 1; min-width: 0; }
.prof-card .hint { margin: 8px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--dim); }
.auth .profile .row { margin: 0; }
.auth .profile .note, .auth .profile .err { margin: 0; min-height: 0; }
.auth .profile .note:empty, .auth .profile .err:empty { display: none; }
@media (max-width: 400px) { .prof-line { flex-direction: column; } }

/* форма входа и регистрации: просторнее, кнопки на всю ширину */
.auth form { gap: 12px; padding: 22px 24px 20px; }
.auth h2 { font-size: 26px; margin: 0 0 2px; }
.auth label { font-size: 13px; gap: 5px; }
.auth input:not([type=checkbox]) { padding: 10px 12px; }
.auth form > .row { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 4px; }
.auth form > .row .btn { padding: 11px 16px; }
.auth form > .row .btn.primary { font-weight: 600; }
.auth .auth-hint { margin: 0; padding: 9px 12px; border-left: 2px solid var(--gilt); background: rgba(240,210,138,.07); color: var(--ivory); font-size: 13px; line-height: 1.4; }
.auth .agree { font-size: 13px; line-height: 1.4; align-items: flex-start; }
.auth .agree input { margin-top: 2px; }
.auth .g-btn { margin-top: 2px; }

/* справка: шапка и вкладки не сжимаются, тело прокручивается */
.help-head, .help-tabs { flex: none; }
.help-tabs { overflow-y: hidden; scrollbar-width: thin; }
.help-body { flex: 1 1 auto; }
/* история: отступ подписи от шаров */
.hist-item .balls + .meta, .hist-item .meta { margin-top: 10px; }
.plan-chip { max-width: 100%; }
dialog.help { height: min(86vh, 760px); max-height: none; }
.auth .profile form.prof-card { padding: 12px 14px; }
.auth .profile { box-sizing: border-box; min-width: 0; }
.auth .profile .row { justify-content: flex-end; }
.auth .profile, .auth .profile form, .auth .profile details form { grid-template-columns: minmax(0, 1fr); }
.prof-card input { width: 100%; box-sizing: border-box; min-width: 0; }

/* Годинник: мигаючі двокрапки замість підписів год/хв/с */
.clock { align-items: flex-start; gap: clamp(4px, 1vw, 10px); }
.clock .u { min-width: 0; }
.clock .sep { font: 500 clamp(40px, 6vw, 72px)/1 var(--sans); color: var(--gilt); font-style: normal; animation: sepBlink 1s ease-in-out infinite; position: relative; top: -0.05em; }
.clock .u.days { margin-right: clamp(8px, 1.6vw, 18px); }
@keyframes sepBlink { 0%, 40% { opacity: 1; } 60%, 100% { opacity: 0.12; } }

/* Рейтинг способів (Pro) */
.rank { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.rank-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 8px; }
.rank h4 { margin: 0; font: 600 17px/1.3 var(--serif); color: var(--ivory); }
.rank-scroll { overflow-x: auto; }
.rank-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.rank-t th, .rank-t td { padding: 6px 10px 6px 0; text-align: left; border-bottom: 1px solid var(--line); }
.rank-t th { color: var(--dim); font-weight: 500; font-size: 13px; }
.rank .small { color: var(--dim); margin: 8px 0 0; }

/* Подвал v1.27 */
.foot { max-width: 1280px; padding-top: 36px; }
.foot-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px clamp(24px, 5vw, 64px); align-items: start; padding-bottom: 28px; }
.foot-name { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 600 22px/1 var(--serif); color: var(--ivory); }
.foot-name img { display: block; border-radius: 8px; }
.foot-about { margin: 0; max-width: 46ch; color: var(--dim); font-size: 14.5px; line-height: 1.6; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; margin: 0; }
.foot-col h3 { margin: 0 0 4px; font: 600 15px/1.3 var(--sans); color: var(--ivory); letter-spacing: 0.01em; }
.foot-col a, .foot-col button { background: none; border: 0; padding: 0; color: var(--dim); font: 400 14.5px/1.4 var(--sans); text-decoration: none; cursor: pointer; text-align: left; }
.foot-col a:hover, .foot-col button:hover { color: var(--gilt); }
.foot-col a:focus-visible, .foot-col button:focus-visible { outline: 2px solid var(--gilt); outline-offset: 3px; border-radius: 3px; }
.foot-bottom { border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 6px; }
.foot-bottom p { margin: 0; max-width: 110ch; }
.foot-legal { font-size: 13px; line-height: 1.6; color: var(--dim); }
.foot-bottom .foot-sub { font-size: 13px; }
.foot-bottom .foot-sub:empty { display: none; }
@media (max-width: 760px) { .foot-top { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .foot-top { grid-template-columns: 1fr; } }

/* Правило игры («5 із 45») стоит в конце названия */
.gname .rule { display: inline-block; margin: 0 0 0 clamp(8px, 1.2vw, 16px); font: italic 500 clamp(18px, 2.3vw, 26px)/1 var(--serif); letter-spacing: 0; text-shadow: none; vertical-align: top; position: relative; top: 0.45em; white-space: nowrap; }
.hero .when + .gname { margin-bottom: 22px; }
.cal-day.today { border-color: var(--gilt); }
/* Блокнот админки/общие мелочи подвала */

/* Реферальная карточка в профиле */
.ref-share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ref-share .btn { text-decoration: none; }
#ref-link { min-width: 0; text-overflow: ellipsis; }
.ref-stats { margin-top: 10px; color: var(--gilt); }
.auth-hint.ref-friend { color: var(--gilt); }
@media (max-width: 640px) { .gname .rule { display: block; margin: 8px 0 0; top: 0; white-space: normal; font-size: 20px; } }

/* v1.31: мобильная версия */
.method.locked .m-made, .method.locked .m-top input[type="checkbox"] { visibility: hidden; }
.m-unlock { border-radius: inherit; }
.tabs-arr.l { background: linear-gradient(90deg, color-mix(in srgb, var(--night) 92%, transparent) 30%, transparent); }
.tabs-arr.r { background: linear-gradient(270deg, color-mix(in srgb, var(--night) 92%, transparent) 30%, transparent); }

/* v1.34: блоки под способами сворачиваются и переставляются */
.plates { grid-auto-flow: row dense; align-items: start; }
.plate > h3[role="button"] { cursor: pointer; }
.plate > h3[role="button"]:focus-visible { outline: 2px solid var(--gilt); outline-offset: 2px; }
.pl-ctl { position: absolute; top: -17px; right: 12px; display: flex; gap: 2px; z-index: 2; padding: 0 4px; background: color-mix(in srgb, var(--night) 92%, transparent); }
.pl-ctl button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--dim); cursor: pointer; }
.pl-ctl button:hover, .pl-ctl button:focus-visible { color: var(--ivory); border-color: var(--line-strong); }
.pl-ctl .ico { width: 16px; height: 16px; }
.pl-ctl .pl-drag { cursor: grab; } .pl-ctl .pl-drag .ico { fill: currentColor; stroke: none; }
.pl-tgl[aria-expanded="true"] .vbar { display: none; }
.plate.collapsed { padding-bottom: 14px; }
.plate.collapsed > :not(h3):not(.pl-ctl) { display: none !important; }
.plate.dragging { opacity: .45; outline: 1px dashed var(--gilt); }
#pl-reset { display: block; margin: 22px auto 0; }
@media (hover: none), (max-width: 640px) { .pl-ctl .pl-drag { display: none; } .pl-ctl button { width: 36px; height: 36px; } }

/* v1.36: картка прогнозу */
dialog.card-dlg { background: var(--plate); color: var(--ivory); border: 1px solid var(--line-strong); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: 94vh; margin: auto; }
dialog.card-dlg::backdrop { background: rgba(3, 5, 14, 0.78); backdrop-filter: blur(3px); }
.cd-in { padding: 20px; display: grid; gap: 14px; justify-items: center; }
.cd-in h2 { margin: 0; font: 600 22px var(--serif); justify-self: start; }
.cd-in canvas { width: 100%; max-height: 62vh; aspect-ratio: 1080 / 1350; object-fit: contain; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.45); background: #0a0d1f; }
.cd-styles button { padding: 8px 16px; }
.cd-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ticket footer .btn.card-btn { display: inline-flex; align-items: center; gap: 6px; }

/* v1.37: очистка выбора, крестик профиля */
.pick-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.profile { position: relative; }
.prof-x { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--dim); cursor: pointer; z-index: 2; }
.prof-x:hover, .prof-x:focus-visible { color: var(--ivory); background: rgba(255,255,255,.08); }
.prof-x .ico { width: 22px; height: 22px; stroke-width: 2; }
.prof-head { padding-right: 36px; }

/* ---------- общие правила шапки/подвала для всех страниц ---------- */
.brand div.logo { margin: 0; font-family: var(--serif); }
.foot-theme-x { justify-self: start; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-top: 6px; font: 400 13px var(--sans); color: var(--dim); }
.foot-theme:hover { color: var(--gilt); border-color: var(--gilt); }
html[data-theme="light"] .logo .lw { filter: none; }
.plan-chip { margin: 0; }
html[data-pro] .ad-nopro { display: none !important; }
.ad-slot { margin: 22px auto; max-width: 100%; overflow: hidden; text-align: center; }
.ad-host { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.ad-host:empty { display: none; }
@media (max-width: 760px) { .ad-d-desk { display: none !important; } }
@media (min-width: 761px) { .ad-d-mob { display: none !important; } }
.theme-btn .i-moon { display: none; }
html[data-theme="light"] .theme-btn .i-sun { display: none; }
html[data-theme="light"] .theme-btn .i-moon { display: block; }
html[data-theme="light"] .logo .lw[data-w="Space"] { background-image: linear-gradient(100deg, #2d3f8f 0%, #4a5fb0 50%, #2d3f8f 100%); }
html[data-theme="light"] .logo .lw[data-w="Oracle"] { background-image: linear-gradient(100deg, #8a5a08 0%, #c98a1f 35%, #b8541f 60%, #8a5a08 100%); }
.theme-btn, .theme-btn[aria-pressed] { color: var(--ivory); }
@media (max-width: 480px) { .top-tools { gap: 6px; } .top-tools .sound { width: 36px; height: 36px; } .top-tools .lang button { padding-inline: 10px; } }

/* ---------- светлая тема «Дневное небо» ---------- */
html[data-theme="light"] { color-scheme: light; --night: #f1eef8; --plate: #ffffff; --plate-2: #f8f6fd; --ivory: #1c1940; --dim: #5a5778; --gilt: #8a5d0b; --line: rgba(60, 48, 130, 0.15); --line-strong: rgba(60, 48, 130, 0.34); --acc: #cb4d38; --acc-ink: #ffffff; }
html[data-theme="light"] body[data-game="maxima"] { --acc: #cb4d38; --acc-ink: #fff; }
html[data-theme="light"] body[data-game="superloto"] { --acc: #b4730f; --acc-ink: #fff; }
html[data-theme="light"] body[data-game="keno"] { --acc: #17806f; --acc-ink: #fff; }
html[data-theme="light"] body[data-game="loto636"] { --acc: #6550c8; --acc-ink: #fff; }
html[data-theme="light"] body { background: radial-gradient(1000px 520px at 8% -6%, rgba(142, 120, 226, 0.20), transparent 62%), radial-gradient(900px 500px at 100% 2%, rgba(232, 168, 84, 0.18), transparent 60%), var(--night); background-attachment: fixed; }
html[data-theme="light"] #sky { filter: invert(1) opacity(0.22); }
html[data-theme="light"] .plate, html[data-theme="light"] .bl-card, html[data-theme="light"] .bl-cta, html[data-theme="light"] .pt-card { box-shadow: 0 1px 2px rgba(60, 48, 130, 0.06), 0 10px 28px -12px rgba(60, 48, 130, 0.18); }
html[data-theme="light"] .gname, html[data-theme="light"] .gname .rule { text-shadow: none; }
html[data-theme="light"] .method.locked .m-inner { opacity: .72; filter: none; }
html[data-theme="light"] .clock .sep { color: var(--acc); }
a.btn { display: inline-block; text-decoration: none; color: var(--ivory); }
a.btn:hover { color: var(--ivory); }
.lock-note a.btn { margin-top: 6px; }
