@font-face { font-family: 'Cormorant'; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant.woff?v=2) format('woff'); }
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-cyr.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-lat.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #09080f;
  --bg-2: #0d0b15;
  --surface: #13111c;
  --surface-2: #1a1726;
  --surface-3: #231f33;
  --line: rgba(200, 182, 255, 0.10);
  --line-2: rgba(200, 182, 255, 0.20);
  --text: #efeaf9;
  --muted: #a49db9;
  --faint: #6e6787;
  --accent: #b69aff;
  --accent-2: #8f68f5;
  --accent-ink: #120c20;
  --accent-soft: rgba(182, 154, 255, 0.13);
  --gold: #e8c77d;
  --ok: #7fdcb1;
  --warn: #f2c36b;
  --danger: #ff7c95;
  --r: 18px;
  --r-sm: 12px;
  --serif: 'Cormorant', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
html { font-variant-numeric: lining-nums; }
body { font: 15px/1.45 var(--sans); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); text-decoration: none; }
img { display: block; max-width: 100%; }
.icon { flex: none; display: block; }
[hidden] { display: none !important; }

/* ---------- загрузка ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.sigil { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-2); border-top-color: var(--accent); animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- шапка ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 34px var(--pad) 22px;
  background: radial-gradient(ellipse at 50% 50%, rgba(9, 8, 15, 0.55), rgba(9, 8, 15, 0.1) 70%), url(/img/smoke.jpg) center 40% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 40px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.wordmark { position: relative; z-index: 1; font-family: var(--serif); line-height: 0.9; }
.wordmark b {
  display: block; font-weight: 600; font-size: clamp(40px, 13vw, 58px); letter-spacing: 0.06em;
  background: linear-gradient(180deg, #f6f0ff 10%, #c9b4f5 60%, #9d84d6); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 28px rgba(182, 154, 255, 0.25);
}
.wordmark span { display: block; margin-top: 8px; font-weight: 500; font-size: clamp(15px, 4.6vw, 20px); letter-spacing: 0.62em; padding-left: 0.62em; color: #d6c9f4; }
.wordmark .star { font-family: var(--sans); font-size: 12px; color: var(--accent); letter-spacing: 0; padding: 0 2px; vertical-align: 3px; }
.tagline { position: relative; z-index: 1; margin: 14px auto 0; max-width: 300px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.status-pill {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(9, 8, 15, 0.55);
  font-size: 12px; color: var(--muted); backdrop-filter: blur(6px);
}
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status-pill.off i { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

.notice {
  margin: 14px var(--pad) 0; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--accent-soft); border: 1px solid var(--line-2); color: var(--text); font-size: 13px;
  display: flex; gap: 10px; align-items: flex-start;
}
.notice .icon { color: var(--accent); margin-top: 1px; }
.notice.warn { background: rgba(242, 195, 107, 0.09); border-color: rgba(242, 195, 107, 0.25); }
.notice.warn .icon { color: var(--warn); }

/* ---------- категории ---------- */
.catbar {
  position: sticky; top: 0; z-index: 20; display: flex; gap: 8px; align-items: center;
  padding: 12px var(--pad); background: rgba(9, 8, 15, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.catbar.stuck { border-bottom-color: var(--line); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; margin: -2px; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted);
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.chip.on { background: var(--text); color: var(--accent-ink); border-color: var(--text); }
.chip:disabled { opacity: .4; text-decoration: line-through; }
.icon-btn {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
}
.searchbox { display: flex; align-items: center; gap: 8px; flex: 1; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); }
.searchbox input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 14px; }
.searchbox .icon { color: var(--muted); }

/* ---------- сетка товаров ---------- */
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px var(--pad) 12px; font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: .01em; }
.section-title small { font-family: var(--sans); font-size: 12px; color: var(--faint); font-weight: 600; letter-spacing: .08em; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 var(--pad); }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { position: relative; display: flex; flex-direction: column; text-align: left; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .15s; }
.card:active { transform: scale(.98); }
.card .art { aspect-ratio: 4 / 5; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.brand { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.card-title { font-weight: 700; font-size: 14px; line-height: 1.25; }
.card-meta { font-size: 12px; color: var(--muted); }
.price-row { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1; }
.price s { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--faint); margin-left: 6px; }
.add-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.card.out .art { filter: grayscale(.8) brightness(.55); }
.card.out .price { color: var(--muted); }

.badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 5px; flex-wrap: wrap; z-index: 2; }
.badge { padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; background: rgba(9, 8, 15, .78); border: 1px solid var(--line-2); color: var(--text); backdrop-filter: blur(4px); }
.badge.new { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.badge.hit { background: var(--gold); color: #231a05; border-color: transparent; }
.badge.sale { background: var(--danger); color: #2a0610; border-color: transparent; }
.badge.low { color: var(--warn); border-color: rgba(242, 195, 107, .4); }
.badge.out { color: var(--muted); }

/* Арт-заглушка: карта таро */
.art { position: relative; overflow: hidden; background: var(--surface-2); }
.art img { width: 100%; height: 100%; object-fit: cover; }
.product-art .art, .thumb .art { position: absolute; inset: 0; }
.tarot {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 18px 10px 14px; color: #d8cdf6;
  background:
    radial-gradient(circle at 50% 46%, rgba(182, 154, 255, .28), transparent 55%),
    radial-gradient(ellipse at 20% 100%, rgba(143, 104, 245, .25), transparent 60%),
    linear-gradient(160deg, #1d1830, #0e0c17 70%);
}
.tarot::before { content: ''; position: absolute; inset: 7px; border: 1px solid rgba(214, 200, 255, .28); border-radius: 10px; }
.tarot::after { content: ''; position: absolute; inset: 11px; border: 1px solid rgba(214, 200, 255, .12); border-radius: 7px; }
.tarot .num { position: relative; font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: .06em; color: #cbbcf0; }
.card .tarot { padding-top: 38px; }
.tarot .glyph { position: relative; width: 44%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(214, 200, 255, .22); box-shadow: 0 0 40px rgba(182, 154, 255, .22) inset; }
.tarot .glyph .icon { width: 58%; height: 58%; }
.tarot .name { position: relative; font-family: var(--serif); font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #bfb1e6; text-align: center; }
.tarot .stars { position: absolute; font-size: 9px; color: rgba(214, 200, 255, .5); }

/* ---------- инфоблоки ---------- */
.info { margin: 32px var(--pad) 0; display: grid; gap: 12px; }
.info-card { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.info-card h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 22px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.info-card h3 .icon { color: var(--accent); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: s; }
.steps li { display: flex; gap: 12px; color: var(--muted); font-size: 14px; }
.steps li::before { counter-increment: s; content: counter(s, upper-roman); flex: none; width: 28px; font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 6px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.point { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.point:first-of-type { border-top: 0; padding-top: 0; }
.point .icon { color: var(--accent); margin-top: 2px; }
.point b { display: block; }
.point p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.footer { padding: 28px var(--pad) calc(120px + var(--safe-b)); text-align: center; color: var(--faint); font-size: 12px; }
.footer .wordmark-sm { font-family: var(--serif); font-size: 18px; letter-spacing: .3em; color: var(--muted); margin-bottom: 6px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px;
  border-radius: 14px; font-weight: 700; font-size: 15px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
  transition: transform .12s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, #c8b2ff, #9c78f7); border-color: transparent; color: var(--accent-ink); box-shadow: 0 8px 28px rgba(143, 104, 245, .35); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255, 124, 149, .3); background: rgba(255, 124, 149, .06); }
.btn.block { width: 100%; }
.btn.sm { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

/* плашка корзины */
.cartbar {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 10px 0 18px; border-radius: 18px;
  background: linear-gradient(135deg, #c8b2ff, #9c78f7); color: var(--accent-ink); font-weight: 700;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .12) inset; animation: rise .25s ease-out;
}
.cartbar .count { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--accent-ink); color: var(--accent); font-size: 13px; }
.cartbar .sum { margin-left: auto; font-family: var(--serif); font-size: 22px; }
.cartbar .go { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(18, 12, 32, .12); }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }

/* ---------- экраны поверх ---------- */
.screen { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; animation: slide .22s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px var(--pad);
  background: rgba(9, 8, 15, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.topbar h2 { flex: 1; margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.1; }
.content { padding: 16px var(--pad) calc(120px + var(--safe-b)); max-width: 640px; margin: 0 auto; }
.bottom-cta { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; padding: 12px var(--pad) calc(12px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); }
.bottom-cta > * { max-width: 608px; margin: 0 auto; }

/* товар */
.product-art { position: relative; max-width: 420px; margin: 0 auto; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; }
.product-art .tarot .name { font-size: 16px; }
.product-art .tarot .num { font-size: 19px; }
.product-head { margin-top: 18px; }
.product-head h1 { margin: 4px 0 4px; font-family: var(--serif); font-size: 32px; line-height: 1.05; font-weight: 600; }
.product-head .specs { color: var(--muted); font-size: 14px; }
.product-price { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; font-family: var(--serif); font-size: 34px; font-weight: 700; }
.product-price s { font-family: var(--sans); font-size: 15px; color: var(--faint); font-weight: 500; }
.desc { margin-top: 14px; color: var(--muted); font-size: 14px; white-space: pre-line; }
.label { display: block; margin: 22px 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.variants { display: flex; flex-wrap: wrap; gap: 8px; }
.variant { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text); }
.variant.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.variant.out { color: var(--faint); }
.variant.out span { text-decoration: line-through; }
.variant .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.stepper { display: inline-flex; align-items: center; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; color: var(--text); }
.stepper button:disabled { opacity: .3; }
.stepper b { min-width: 30px; text-align: center; font-size: 16px; }
.stepper.sm button { width: 34px; height: 34px; }
.stepper.sm b { min-width: 22px; font-size: 14px; }

/* корзина */
.line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.thumb { position: relative; width: 58px; height: 72px; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumb .tarot { padding: 6px; justify-content: center; }
.thumb .tarot .num, .thumb .tarot .name, .thumb .tarot .stars { display: none; }
.thumb .tarot .glyph { width: 70%; }
.line-main { flex: 1; min-width: 0; }
.line-main b { display: block; font-size: 14px; line-height: 1.25; }
.line-main span { color: var(--muted); font-size: 13px; }
.line-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.line-side .price { font-size: 19px; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 4px; font-weight: 700; }
.total .price { font-size: 30px; }

/* оформление */
.step-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.step-title:first-child { margin-top: 4px; }
.step-title em { font-style: normal; font-size: 16px; color: var(--accent); min-width: 22px; }
.options { display: grid; gap: 8px; }
.option { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 13px 14px; text-align: left; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); }
.option.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.option .radio { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; }
.option.on .radio { border-color: var(--accent); }
.option.on .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.option b { display: block; font-size: 14.5px; }
.option p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.option a { font-size: 13px; }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--surface);
  outline: 0; font-size: 15px; transition: border-color .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); }
.textarea { resize: vertical; min-height: 88px; line-height: 1.45; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.hint { margin-top: 8px; color: var(--faint); font-size: 12.5px; }
.summary { margin-top: 26px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.summary .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); padding: 3px 0; }
.summary .row b { color: var(--text); text-align: right; }

/* заявка отправлена */
.done { text-align: center; padding-top: 40px; }
.done-sigil { position: relative; width: 120px; height: 120px; margin: 0 auto 24px; display: grid; place-items: center; color: var(--accent); }
.done-sigil::before, .done-sigil::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-2); }
.done-sigil::after { inset: 12px; border-color: var(--accent); border-style: dashed; animation: spin 14s linear infinite; }
.done h1 { margin: 0; font-family: var(--serif); font-size: 36px; font-weight: 600; }
.done p { color: var(--muted); max-width: 340px; margin: 12px auto 0; }

/* мои заявки */
.order { padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; }
.order-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.order-head b { font-family: var(--serif); font-size: 21px; }
.order-head time { color: var(--faint); font-size: 12.5px; }
.st { margin-left: auto; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.st.new { background: var(--accent-soft); color: var(--accent); }
.st.confirmed { background: rgba(127, 220, 177, .12); color: var(--ok); }
.st.done { background: rgba(232, 199, 125, .12); color: var(--gold); }
.st.cancelled { background: rgba(255, 255, 255, .06); color: var(--faint); }
.order ul { margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.order .meta { margin-top: 8px; font-size: 13px; color: var(--muted); display: grid; gap: 3px; }
.order .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty .icon { margin: 0 auto 12px; color: var(--faint); }

/* возрастной гейт */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; text-align: center;
  background: radial-gradient(ellipse at 50% 50%, rgba(9, 8, 15, .35), rgba(9, 8, 15, .95) 70%), url(/img/smoke.jpg) center / cover; }
.gate-box { max-width: 340px; }
.gate .big { font-family: var(--serif); font-size: 96px; line-height: 1; font-weight: 600; background: linear-gradient(180deg, #f6f0ff, #9d84d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gate p { color: var(--muted); margin: 12px 0 26px; }
.gate .btn { width: 100%; margin-top: 10px; }

/* уведомления */
.toast { position: fixed; z-index: 200; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 12px 16px; border-radius: 14px; background: #f3eefc; color: var(--accent-ink); font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: rise .2s ease-out; }
.toast.err { background: var(--danger); color: #2a0610; }

/* =================== админка =================== */
.admin { min-height: 100vh; }
.admin-head { display: flex; align-items: center; gap: 10px; padding: 14px var(--pad) 6px; max-width: 900px; margin: 0 auto; }
.admin-head h1 { margin: 0; flex: 1; font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1; }
.admin-head h1 small { display: block; font-family: var(--sans); font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--faint); text-transform: uppercase; margin-bottom: 4px; }
.tabs { position: sticky; top: 0; z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px var(--pad); background: rgba(9, 8, 15, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs-inner { display: flex; gap: 6px; max-width: 900px; margin: 0 auto; width: 100%; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 12px; color: var(--muted); font-weight: 700; font-size: 14px; }
.tab.on { background: var(--surface-3); color: var(--text); }
.tab .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; display: grid; place-items: center; }
.admin-body { max-width: 900px; margin: 0 auto; padding: 14px var(--pad) calc(100px + var(--safe-b)); }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; min-width: 160px; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.seg button { flex: none; height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.panel { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.panel h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.panel h3 .icon { color: var(--accent); }
.panel > p { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.rows { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; margin-bottom: 12px; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.row-item:first-child { border-top: 0; }
.row-item.dim > .grow { opacity: .45; }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .grow b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .grow span { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .thumb { width: 44px; height: 54px; border-radius: 8px; }
.row-actions { display: flex; gap: 2px; align-items: center; }
.row-actions button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.row-actions button:disabled { opacity: .25; }
.row-actions button.on { color: var(--accent); }
.group-title { margin: 22px 2px 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); display: flex; justify-content: space-between; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.stat { padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.switch-row .grow { flex: 1; }
.switch-row b { display: block; font-size: 14.5px; }
.switch-row span { display: block; font-size: 12.5px; color: var(--muted); }
.switch { position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .18s, background .15s; }
.switch.on { background: var(--accent-2); border-color: transparent; }
.switch.on::after { transform: translateX(20px); background: #fff; }
.var-row { display: grid; grid-template-columns: 1fr 86px 34px 34px; gap: 6px; align-items: center; margin-bottom: 6px; }
.var-row .input { min-height: 42px; padding: 8px 12px; font-size: 14px; }
.var-row button { height: 42px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.var-row button.on { color: var(--ok); }
.photo-pick { display: flex; gap: 12px; align-items: center; }
.photo-pick .thumb { width: 84px; height: 104px; border-radius: 12px; }
.photo-pick .btns { display: flex; flex-direction: column; gap: 8px; }
.sheet { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto; animation: slide .2s ease-out; }
.sheet .content { padding-bottom: calc(40px + var(--safe-b)); }
.tg-preview { padding: 12px 14px; border-radius: 16px 16px 16px 4px; background: #1f1b2e; border: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.tg-preview img { border-radius: 10px; margin: -4px -6px 10px; max-width: calc(100% + 12px); }
.tg-preview .tg-btn { display: block; margin-top: 10px; padding: 9px; text-align: center; border-radius: 10px; background: rgba(182, 154, 255, .16); color: var(--accent); font-weight: 700; font-size: 13.5px; }
.tg-preview tg-spoiler { background: var(--faint); color: transparent; border-radius: 3px; }
.kbd-hint { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--faint); margin-top: 8px; }
.kbd-hint code { white-space: nowrap; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; color: var(--muted); }
.post-status { font-size: 12px; font-weight: 800; }
.post-status.scheduled { color: var(--accent); }
.post-status.sent { color: var(--ok); }
.post-status.failed { color: var(--danger); }
.post-status.draft { color: var(--faint); }
.login-box { max-width: 380px; margin: 14vh auto 0; padding: 0 24px; text-align: center; }
.login-box h1 { font-family: var(--serif); font-size: 34px; font-weight: 600; margin: 0 0 10px; }
.login-box p { color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; font-size: 14px; }
.check-list li { display: flex; gap: 8px; align-items: center; }
.check-list .ok { color: var(--ok); }
.check-list .bad { color: var(--warn); }
