/* tgcatalog — «частный банк» для Telegram-каналов.
   Полночный синий, латунь и слоновая кость. Гильош как фирменный знак. */

:root {
  --ink: #0C1322;
  --ink-2: #0F1829;
  --vault: #141E33;
  --vault-2: #1A2641;
  --vault-3: #22304F;
  --brass: #C8A464;
  --brass-hi: #ECD9A8;
  --brass-lo: #8C6B35;
  --ivory: #EFE8D8;
  --text: #D9D4C7;
  --mist: #8D96AB;
  --mist-2: #626C83;
  --line: rgba(200, 164, 100, .16);
  --line-2: rgba(200, 164, 100, .32);
  --hair: rgba(239, 232, 216, .07);
  --emerald: #5BBE9F;
  --garnet: #E0737A;
  --sky: #7FB2E5;

  --gold: linear-gradient(135deg, #F4E4B8 0%, #D5B273 38%, #B08A47 64%, #E3CB8E 100%);
  --gold-text: linear-gradient(100deg, #F4E4B8, #C8A464 55%, #E9D3A1);

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --r-pill: 999px;

  --f-display: "Prata", "Times New Roman", serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --shadow-1: 0 1px 0 rgba(255,255,255,.03) inset, 0 18px 40px -24px rgba(0,0,0,.7);
  --shadow-2: 0 1px 0 rgba(255,255,255,.05) inset, 0 30px 60px -30px rgba(0,0,0,.85);
  --ease: cubic-bezier(.2,.7,.2,1);
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(200,164,100,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(63, 98, 170, .12), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--brass-hi); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ivory); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(200,164,100,.35); color: var(--ivory); }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; color: var(--ivory); margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.08; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.15rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.25; }
p { margin: 0 0 1em; }

.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--mist); }
.gold-text { background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ───────────── шапка ───────────── */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 19, 34, .78);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--hair);
}
.top .wrap { display: flex; align-items: center; gap: 22px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ivory); flex: none; }
.brand .ic { width: 36px; height: 36px; }
.brand b { font: 400 1.35rem/1 var(--f-display); letter-spacing: .02em; }
.brand small { display: block; font-size: .7rem; color: var(--mist); letter-spacing: .04em; margin-top: 4px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--text); padding: 8px 14px; border-radius: var(--r-pill); font-size: .93rem; font-weight: 500; }
.nav a:hover, .nav a.on { color: var(--ivory); background: rgba(239,232,216,.06); }
.top-search { flex: 1; min-width: 190px; max-width: 360px; margin-left: auto; position: relative; }
.top-search input { width: 100%; height: 42px; padding: 0 16px 0 42px; border-radius: var(--r-pill); background: rgba(239,232,216,.05); border: 1px solid var(--hair); color: var(--ivory); font: inherit; font-size: .93rem; transition: border-color .2s, background .2s; }
.top-search input:focus { outline: none; border-color: var(--line-2); background: rgba(239,232,216,.08); }
.top-search .ic { position: absolute; left: 14px; top: 11px; color: var(--mist); }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.balance-pill { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--brass-hi); font-weight: 600; font-size: .9rem; }
.balance-pill:hover { border-color: var(--line-2); color: var(--ivory); }

/* ───────────── кнопки ───────────── */
.btn {
  --h: 46px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: var(--h); padding: 0 22px; border-radius: var(--r-pill);
  font: 600 .95rem/1 var(--f-body); letter-spacing: .01em; color: var(--ivory);
  border: 1px solid transparent; background: transparent; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn .ic { width: 18px; height: 18px; }
.btn-gold {
  color: #1B1407; background: var(--gold); background-size: 160% 160%; background-position: 0% 50%;
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 -1px 0 rgba(0,0,0,.25) inset, 0 10px 28px -12px rgba(200,164,100,.7);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.btn-gold:hover { color: #1B1407; background-position: 100% 50%; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 -1px 0 rgba(0,0,0,.25) inset, 0 16px 36px -12px rgba(200,164,100,.85); }
.btn-line { border-color: var(--line-2); color: var(--brass-hi); background: rgba(200,164,100,.04); }
.btn-line:hover { border-color: var(--brass); color: var(--ivory); background: rgba(200,164,100,.1); }
.btn-quiet { color: var(--text); background: rgba(239,232,216,.05); border-color: var(--hair); }
.btn-quiet:hover { background: rgba(239,232,216,.09); color: var(--ivory); }
.btn-danger { color: var(--garnet); border-color: rgba(224,115,122,.3); background: rgba(224,115,122,.05); }
.btn-danger:hover { color: #fff; background: rgba(224,115,122,.2); }
.btn-sm { --h: 36px; padding: 0 14px; font-size: .85rem; }
.btn-lg { --h: 56px; padding: 0 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ───────────── герой и гильош ───────────── */
.hero { position: relative; overflow: hidden; padding: 72px 0 64px; border-bottom: 1px solid var(--hair); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { max-width: 20ch; margin-bottom: 20px; }
.hero .lead { font-size: 1.12rem; color: var(--mist); max-width: 46ch; margin-bottom: 30px; }
.hero-search { display: flex; gap: 8px; padding: 7px; border-radius: var(--r-pill); background: rgba(20,30,51,.8); border: 1px solid var(--line); max-width: 560px; box-shadow: var(--shadow-2); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ivory); font: inherit; font-size: 1rem; padding: 0 16px; }
.hero-search input:focus { outline: none; }
.hero-stats { display: flex; gap: 36px; margin-top: 34px; }
.hero-stats div { border-left: 1px solid var(--line-2); padding-left: 14px; }
.hero-stats b { display: block; font: 400 1.65rem/1.1 var(--f-display); color: var(--ivory); }
.hero-stats span { font-size: .84rem; color: var(--mist); }

.guilloche { position: relative; aspect-ratio: 1; width: 100%; max-width: 470px; justify-self: end; }
.guilloche > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.guilloche .g-rot { transform-origin: 50% 50%; animation: g-spin 140s linear infinite; }
.guilloche .g-rot-r { transform-origin: 50% 50%; animation: g-spin 200s linear infinite reverse; }
.guilloche .seal { position: absolute; inset: 31%; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 35% 30%, #22304F, #0F1829 70%); border: 1px solid var(--line-2);
  box-shadow: 0 0 0 8px rgba(12,19,34,.85), 0 0 0 9px var(--line), 0 30px 60px -20px rgba(0,0,0,.9); }
.seal > div { display: flex; flex-direction: column; align-items: center; }
.seal .ic { width: 64px; height: 64px; }
.seal small { display: block; margin-top: 8px; font-size: .72rem; color: var(--mist); letter-spacing: .06em; }
@keyframes g-spin { to { transform: rotate(360deg); } }
.guilloche > svg { animation: g-in 2.2s var(--ease) both; }
@keyframes g-in { from { opacity: 0; transform: scale(.86) rotate(-12deg); } }

/* ───────────── секции ───────────── */
.section { padding: 64px 0 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--mist); }
.section-head .link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; white-space: nowrap; }

/* ───────────── категории ───────────── */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cat {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-m);
  background: linear-gradient(180deg, rgba(26,38,65,.7), rgba(20,30,51,.7)); border: 1px solid var(--hair);
  color: var(--text); transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.cat:hover { border-color: var(--line-2); color: var(--ivory); transform: translateY(-2px); }
.cat-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 30% 25%, rgba(236,217,168,.18), rgba(200,164,100,.05)); border: 1px solid var(--line); color: var(--brass-hi); }
.cat-ic .ic { width: 22px; height: 22px; }
.cat b { display: block; font-weight: 600; font-size: .94rem; line-height: 1.25; }
.cat span { font-size: .8rem; color: var(--mist); }
.cats-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.cats-strip::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: rgba(239,232,216,.03); color: var(--text); font-size: .88rem; white-space: nowrap; }
.chip .ic { width: 17px; height: 17px; color: var(--brass); }
.chip:hover { border-color: var(--line-2); color: var(--ivory); }
.chip.on { border-color: var(--brass); color: var(--ivory); background: rgba(200,164,100,.1); }

/* ───────────── карточки каналов ───────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 16px; }
.tcard {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 18px 18px 14px;
  border-radius: var(--r-l); isolation: isolate; overflow: hidden;
  background:
    radial-gradient(240px 140px at 100% 0%, rgba(200,164,100,.07), transparent 70%),
    linear-gradient(180deg, var(--vault-2), var(--vault));
  border: 1px solid var(--hair); box-shadow: var(--shadow-1);
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.tcard::after { /* тонкая гравировка в углу — как на ценной бумаге */
  content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; z-index: -1; pointer-events: none; opacity: .5;
  background: repeating-radial-gradient(circle at center, transparent 0 6px, rgba(200,164,100,.07) 6px 7px);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%);
}
.tcard:hover { border-color: var(--line); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.tcard-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; min-width: 0; }
.medal { position: relative; width: 56px; height: 56px; flex: none; border-radius: 50%; padding: 2px; background: conic-gradient(from 210deg, #8C6B35, #ECD9A8, #C8A464, #8C6B35, #ECD9A8, #8C6B35); }
.medal img, .medal .ini { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--vault); background: var(--vault-3); }
.medal .ini { display: grid; place-items: center; font: 400 1.2rem/1 var(--f-display); color: var(--brass-hi); }
.medal .lock { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); border: 1px solid var(--line-2); color: var(--brass-hi); }
.medal .lock .ic { width: 12px; height: 12px; }
.tcard-title { min-width: 0; flex: 1; }
.tcard-title a { color: var(--ivory); font-weight: 700; font-size: 1rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tcard-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tcard-title small { display: block; color: var(--mist); font-size: .8rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard .crown { flex: none; align-self: flex-start; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--gold); color: #1B1407; box-shadow: 0 6px 16px -6px rgba(200,164,100,.8); }
.tcard .crown .ic { width: 16px; height: 16px; }
.tcard-desc { color: var(--mist); font-size: .88rem; line-height: 1.55; margin: 0 0 14px; min-height: calc(1.55em * 3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; flex: 1; }
.tcard-desc.is-empty { font-style: italic; opacity: .6; }
.tcard-foot { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--hair); min-width: 0; }
.tcard-foot .stat { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--ivory); font-size: .88rem; }
.tcard-foot .stat .ic { width: 16px; height: 16px; color: var(--brass); }
.tcard-cat { flex: 1; min-width: 0; font-size: .78rem; color: var(--mist); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.tcard-go { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--brass-hi); transition: background .25s, color .25s, transform .25s var(--ease); }
.tcard-go .ic { width: 15px; height: 15px; }
.tcard:hover .tcard-go { background: var(--gold); color: #1B1407; border-color: transparent; transform: translateX(2px); }
.metric { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; font-size: .9rem; }
.metric .ic { width: 17px; height: 17px; color: var(--brass); }
.metric span { color: var(--mist); font-weight: 500; }
.tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: .74rem; font-weight: 600; color: var(--mist); background: rgba(239,232,216,.05); vertical-align: middle; }
.tag .ic { width: 13px; height: 13px; flex: none; }
.tag-gold { color: #1B1407; background: var(--gold); }
.tag-ok { color: var(--emerald); background: rgba(91,190,159,.1); }
.tag-wait { color: var(--brass-hi); background: rgba(200,164,100,.12); }
.tag-off { color: var(--garnet); background: rgba(224,115,122,.1); }
.tcard .rank { flex: none; font: 400 .85rem/1 var(--f-display); color: #1B1407; padding: 5px 8px; border-radius: 8px; background: var(--gold); }

/* Топ и выделение: латунная рамка и один медленный блик */
.tcard.is-hl, .tcard.is-top { background: radial-gradient(240px 140px at 100% 0%, rgba(200,164,100,.12), transparent 70%) padding-box, linear-gradient(180deg, var(--vault-2), var(--vault)) padding-box, var(--gold) border-box; border: 1px solid transparent; }
.tcard.is-hl::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(236,217,168,.10) 45%, transparent 60%);
  background-size: 250% 100%; animation: sheen 6s var(--ease) infinite;
}
.tcard.is-hl { box-shadow: 0 0 0 4px rgba(200,164,100,.06), 0 24px 50px -28px rgba(200,164,100,.55); }
@keyframes sheen { 0%, 60% { background-position: 120% 0; } 100% { background-position: -120% 0; } }

/* Витрина на главной: вертикальные карточки */
.showcase { position: relative; }
.vcards { display: grid; grid-auto-flow: column; grid-auto-columns: 218px; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px; padding: 6px 2px 14px; scrollbar-width: none; overscroll-behavior-x: contain; }
.vcards::-webkit-scrollbar { display: none; }
.vcards > * { scroll-snap-align: start; }
.show-nav { display: flex; gap: 8px; }
.show-nav button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(200,164,100,.05); color: var(--brass-hi); cursor: pointer; transition: background .2s, opacity .2s; }
.show-nav button:hover { background: rgba(200,164,100,.15); }
.show-nav button[disabled] { opacity: .3; cursor: default; }
.showcase::after { content: ""; position: absolute; right: 0; top: 0; bottom: 14px; width: 60px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--ink)); opacity: var(--fade, 1); transition: opacity .3s; }
.vcard {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0;
  padding: 26px 16px 16px; border-radius: 26px;
  background:
    radial-gradient(180px 120px at 50% 0%, rgba(236,217,168,.16), transparent 70%) padding-box,
    linear-gradient(180deg, #1E2B49, #131C30) padding-box,
    linear-gradient(160deg, #F4E4B8, #8C6B35 40%, #3A3020 60%, #C8A464) border-box;
  border: 1px solid transparent;
  box-shadow: 0 30px 60px -34px rgba(0,0,0,.9), 0 0 0 4px rgba(200,164,100,.04);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.vcard::before { /* гильош-веер за аватаром */
  content: ""; position: absolute; left: 50%; top: -60px; width: 260px; height: 260px; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(200,164,100,.10) 0 1deg, transparent 1deg 7deg);
  -webkit-mask: radial-gradient(circle, transparent 28%, #000 30%, transparent 62%); mask: radial-gradient(circle, transparent 28%, #000 30%, transparent 62%);
}
.vcard:hover { transform: translateY(-4px); box-shadow: 0 36px 70px -30px rgba(0,0,0,.95), 0 0 0 4px rgba(200,164,100,.08), 0 20px 50px -30px rgba(200,164,100,.5); }
.vcard-gem { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(200,164,100,.12); border: 1px solid var(--line-2); color: var(--brass-hi); }
.vcard-gem .ic { width: 15px; height: 15px; }
.vcard-halo { padding: 6px; border-radius: 50%; background: radial-gradient(circle, rgba(236,217,168,.18), transparent 70%); margin-bottom: 14px; }
.vcard .medal { width: 92px; height: 92px; padding: 3px; box-shadow: 0 14px 30px -10px rgba(0,0,0,.8); }
.vcard .medal .ini { font-size: 1.9rem; }
.vcard-title { color: var(--ivory); font-weight: 700; font-size: 1rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 2.6em; }
.vcard-title::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.vcard-handle { display: block; max-width: 100%; color: var(--mist); font-size: .78rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard-desc { margin: 12px 0 14px; color: var(--mist); font-size: .84rem; line-height: 1.5; min-height: 3em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.vcard-meta { width: 100%; display: flex; justify-content: center; gap: 8px; align-items: center; margin-top: auto; margin-bottom: 14px; min-width: 0; }
.vcard-meta .metric { font-size: .86rem; flex: none; }
.vcard-meta .tag { min-width: 0; }
.vcard-go { pointer-events: none; }
.vcard:hover .vcard-go { background: var(--gold); color: #1B1407; border-color: transparent; }

/* 18+: размытие до подтверждения возраста */
.adult-veil { display: none; }
body.age-gate .tcard.adult .medal img, body.age-gate .vcard.adult .medal img,
body.age-gate .tcard.adult .tcard-desc, body.age-gate .vcard.adult .vcard-desc,
body.age-gate .tcard.adult .tcard-title, body.age-gate .vcard.adult .vcard-title,
body.age-gate .tcard.adult .tcard-head .medal, body.age-gate .vcard.adult .medal { filter: blur(9px) saturate(.6); }
body.age-gate .adult-veil {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  position: absolute; inset: 0; z-index: 3; border: 0; border-radius: inherit; cursor: pointer; color: var(--ivory);
  background: linear-gradient(180deg, rgba(12,19,34,.25), rgba(12,19,34,.7)); font: 600 .82rem var(--f-body);
}
.adult-veil b { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 400 1.1rem/1 var(--f-display); color: #1B1407; background: var(--gold); box-shadow: 0 10px 26px -8px rgba(200,164,100,.8); }
body.age-gate .adult-zone > * { filter: blur(14px); pointer-events: none; user-select: none; }

.age-modal { display: none; position: fixed; inset: 0; z-index: 100; place-items: center; padding: 20px; background: rgba(6,10,19,.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
body.age-gate .age-modal.open { display: grid; animation: fade-in .3s var(--ease); }
.age-card { width: 100%; max-width: 440px; text-align: center; padding: 34px 28px 28px; border-radius: 28px; background: radial-gradient(300px 160px at 50% 0, rgba(200,164,100,.2), transparent 70%), linear-gradient(180deg, #1D2A47, #111A2D); border: 1px solid var(--line-2); box-shadow: 0 40px 80px -30px #000; }
.age-seal { display: inline-grid; place-items: center; width: 84px; height: 84px; margin-bottom: 16px; border-radius: 50%; font: 400 1.7rem/1 var(--f-display); color: #1B1407; background: var(--gold); box-shadow: 0 0 0 6px rgba(200,164,100,.12), 0 16px 34px -10px rgba(200,164,100,.8); }
.age-card h2 { font-size: 1.6rem; margin-bottom: 10px; }
.age-card p { color: var(--mist); font-size: .94rem; margin-bottom: 22px; }
.age-actions { display: grid; gap: 10px; }
@keyframes fade-in { from { opacity: 0; } }

/* ───────────── хлебные крошки, пагинация ───────────── */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 22px 0 0; margin: 0; list-style: none; font-size: .85rem; color: var(--mist); }
.crumbs a { color: var(--mist); }
.crumbs a:hover { color: var(--ivory); }
.crumbs .ic { width: 14px; height: 14px; opacity: .6; }
.pager { display: flex; justify-content: center; gap: 6px; margin: 40px 0 10px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 44px; height: 44px; padding: 0 12px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--hair); color: var(--text); font-weight: 600; }
.pager a:hover { border-color: var(--line-2); color: var(--ivory); }
.pager .on { background: var(--gold); color: #1B1407; border-color: transparent; }

.page-head { padding: 26px 0 30px; }
.page-head .lead { color: var(--mist); max-width: 64ch; font-size: 1.05rem; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 22px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--r-pill); background: rgba(239,232,216,.04); border: 1px solid var(--hair); }
.seg a, .seg label { padding: 8px 16px; border-radius: var(--r-pill); color: var(--mist); font-size: .87rem; font-weight: 600; cursor: pointer; }
.seg a.on, .seg input:checked + span { background: rgba(200,164,100,.16); color: var(--ivory); }
.seg label { padding: 0; }
.seg label span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: var(--r-pill); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

.seo-text { margin: 56px 0 0; padding: 30px; border-radius: var(--r-l); border: 1px solid var(--hair); background: rgba(20,30,51,.5); color: var(--mist); max-width: 860px; }
.seo-text h2 { font-size: 1.4rem; }

/* ───────────── страница канала ───────────── */
.channel { display: grid; grid-template-columns: 1fr 360px; gap: 28px; padding: 26px 0 0; align-items: start; }
.channel-main { padding: 34px; border-radius: var(--r-l); background: linear-gradient(180deg, var(--vault-2), var(--vault)); border: 1px solid var(--hair); box-shadow: var(--shadow-1); }
.channel-id { display: flex; gap: 22px; align-items: center; margin-bottom: 24px; }
.channel-id .medal { width: 104px; height: 104px; padding: 3px; }
.channel-id .medal .ini { font-size: 2.2rem; }
.channel-id h1 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); margin: 0 0 8px; }
.channel-id .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.channel-desc { white-space: pre-line; color: var(--text); font-size: 1.02rem; line-height: 1.75; }
.channel-side { position: sticky; top: 92px; display: grid; gap: 14px; }
.panel { padding: 22px; border-radius: var(--r-l); background: var(--vault); border: 1px solid var(--hair); }
.panel h3 { font-size: 1.05rem; margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 18px; }
.facts div { padding: 14px; border-radius: var(--r-m); background: rgba(239,232,216,.03); border: 1px solid var(--hair); }
.facts b { display: block; font: 400 1.4rem/1.1 var(--f-display); color: var(--ivory); }
.facts span { font-size: .8rem; color: var(--mist); }
.copy-link { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.2); border: 1px dashed var(--line); font-size: .86rem; color: var(--mist); margin-top: 12px; }
.copy-link code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-family: inherit; }
.copy-link button { border: 0; background: none; color: var(--brass-hi); cursor: pointer; padding: 4px; }

/* ───────────── формы ───────────── */
.form-card { padding: 32px; border-radius: var(--r-l); background: linear-gradient(180deg, var(--vault-2), var(--vault)); border: 1px solid var(--hair); box-shadow: var(--shadow-2); }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field > label, .field > .label { font-size: .88rem; font-weight: 600; color: var(--ivory); }
.field .hint { font-size: .8rem; color: var(--mist); }
.input, .field input[type=text], .field input[type=password], .field input[type=email], .field input[type=url], .field input[type=number], .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 13px 16px; border-radius: 14px; border: 1px solid rgba(239,232,216,.1);
  background: rgba(8,13,24,.55); color: var(--ivory); font: inherit; font-size: .98rem; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23C8A464' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field select option { background: var(--vault); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 4px rgba(200,164,100,.12); background: rgba(8,13,24,.75); }
.input-ic { position: relative; }
.input-ic .ic { position: absolute; left: 15px; top: 15px; color: var(--mist); pointer-events: none; }
.input-ic input { padding-left: 46px !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brass); margin-top: 1px; flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.link-detect { display: none; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; }
.link-detect.show { display: flex; }

/* Загрузка изображения */
.dropzone { position: relative; display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: var(--r-m); border: 1.5px dashed var(--line-2); background: rgba(200,164,100,.03); cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brass); background: rgba(200,164,100,.08); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .preview { width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--vault-3); border: 2px solid var(--line-2); overflow: hidden; color: var(--brass); }
.dropzone .preview img { width: 100%; height: 100%; object-fit: cover; }
.dropzone .preview .ic { width: 30px; height: 30px; }
.dropzone b { display: block; color: var(--ivory); font-size: .95rem; }
.dropzone span { font-size: .82rem; color: var(--mist); }

/* Живое превью карточки */
.add-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.add-layout aside { position: sticky; top: 92px; }
.add-layout aside .label { font-size: .8rem; color: var(--mist); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }

/* ───────────── уведомления ───────────── */
.toast { position: fixed; left: 50%; top: 86px; transform: translate(-50%, -16px); z-index: 80; display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100% - 32px)); padding: 14px 18px 14px 16px; border-radius: 16px; background: rgba(20,30,51,.96); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -20px rgba(0,0,0,.9); color: var(--ivory); font-size: .93rem; opacity: 0; animation: toast-in .45s var(--ease) forwards; }
.toast .ic { color: var(--emerald); }
.toast.err { border-color: rgba(224,115,122,.45); }
.toast.err .ic { color: var(--garnet); }
.toast.info .ic { color: var(--brass-hi); }
.toast button { margin-left: auto; background: none; border: 0; color: var(--mist); cursor: pointer; padding: 2px; }
.toast.hide { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, -12px); } }

/* ───────────── авторизация ───────────── */
.auth { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 40px 20px 100px; }
.auth .form-card { width: 100%; max-width: 440px; }
.auth h1 { font-size: 2.1rem; margin-bottom: 6px; }
.auth .sub { color: var(--mist); margin-bottom: 26px; }
.auth .alt { text-align: center; margin-top: 20px; color: var(--mist); font-size: .92rem; }
.pass-wrap { position: relative; }
.pass-wrap button { position: absolute; right: 8px; top: 8px; height: 34px; width: 34px; border: 0; border-radius: 10px; background: none; color: var(--mist); cursor: pointer; }
.pass-wrap button:hover { color: var(--ivory); }

/* ───────────── кабинет ───────────── */
.cab { display: grid; grid-template-columns: 250px 1fr; gap: 28px; padding: 30px 0 0; align-items: start; }
.cab-nav { position: sticky; top: 92px; display: grid; gap: 4px; padding: 12px; border-radius: var(--r-l); background: var(--vault); border: 1px solid var(--hair); }
.cab-nav .who { padding: 10px 12px 16px; border-bottom: 1px solid var(--hair); margin-bottom: 8px; }
.cab-nav .who b { display: block; color: var(--ivory); font-size: 1rem; }
.cab-nav .who span { font-size: .82rem; color: var(--mist); }
.cab-nav a, .cab-nav button { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text); font: 500 .93rem var(--f-body); background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.cab-nav a:hover, .cab-nav button:hover { background: rgba(239,232,216,.05); color: var(--ivory); }
.cab-nav a.on { background: rgba(200,164,100,.12); color: var(--ivory); }
.cab-nav a.on .ic { color: var(--brass-hi); }
.cab-nav .ic { color: var(--mist); }
.cab-nav .amount { margin-left: auto; color: var(--brass-hi); font-weight: 700; font-size: .85rem; }
.cab-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.cab-head h1 { font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem); margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.kpi { padding: 18px; border-radius: var(--r-m); background: var(--vault); border: 1px solid var(--hair); }
.kpi span { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--mist); }
.kpi span .ic { width: 16px; height: 16px; color: var(--brass); }
.kpi b { display: block; font: 400 1.7rem/1.15 var(--f-display); color: var(--ivory); margin-top: 6px; }

.mycards { display: grid; gap: 12px; }
.mycard { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px; border-radius: var(--r-l); background: linear-gradient(180deg, var(--vault-2), var(--vault)); border: 1px solid var(--hair); }
.mycard .medal { width: 64px; height: 64px; }
.mycard h3 { font-family: var(--f-body); font-weight: 700; font-size: 1.02rem; margin: 0 0 6px; }
.mycard h3 a { color: var(--ivory); }
.mycard .row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .85rem; color: var(--mist); }
.mycard .row .metric { font-size: .85rem; }
.mycard .acts { display: flex; gap: 8px; }
.empty { text-align: center; padding: 60px 24px; border-radius: var(--r-l); border: 1px dashed var(--line-2); background: rgba(200,164,100,.03); }
.empty .ic { width: 46px; height: 46px; color: var(--brass); margin-bottom: 14px; }
.empty p { color: var(--mist); max-width: 40ch; margin: 0 auto 22px; }

/* Продвижение */
.promo-page { min-width: 0; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; margin-bottom: 20px; border-radius: var(--r-m); background: rgba(91,190,159,.08); border: 1px solid rgba(91,190,159,.25); font-size: .92rem; }
.notice .ic { color: var(--emerald); margin-top: 2px; }
.notice b { color: var(--ivory); }
.promo-stage { display: grid; grid-template-columns: 1fr 230px; gap: 16px; margin-bottom: 30px; padding: 18px; border-radius: var(--r-l); border: 1px solid var(--line); background: radial-gradient(500px 220px at 30% 0%, rgba(200,164,100,.10), transparent 70%), rgba(15,24,41,.7); }
.stage-label { display: flex; align-items: center; gap: 8px; color: var(--mist); font-size: .84rem; margin-bottom: 12px; }
.stage-label .ic { width: 16px; height: 16px; color: var(--brass); }
.stage-card { display: grid; place-items: center; min-height: 300px; padding: 16px; border-radius: var(--r-m); background: repeating-linear-gradient(135deg, rgba(239,232,216,.02) 0 10px, transparent 10px 20px); }
.stage-card .stage-v { display: none; width: 220px; }
.stage-card .stage-h { width: 100%; max-width: 360px; }
.stage-card[data-mode=home] .stage-v { display: block; }
.stage-card[data-mode=home] .stage-h { display: none; }
.stage-card .tcard, .stage-card .vcard { pointer-events: none; }
.stage-facts { display: grid; gap: 10px; align-content: start; }
.stage-facts div { padding: 14px 16px; border-radius: var(--r-m); background: var(--vault); border: 1px solid var(--hair); }
.stage-facts b { display: block; font: 400 1.5rem/1.1 var(--f-display); color: var(--ivory); }
.stage-facts span { font-size: .8rem; color: var(--mist); }
.promo-step { font-size: 1.3rem; margin: 0 0 14px; }
.promos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.promo-opt { position: relative; display: block; cursor: pointer; min-width: 0; }
.promo-opt.static { cursor: default; }
.promo-opt input { position: absolute; opacity: 0; pointer-events: none; }
.promo-opt .box { position: relative; height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 20px; border-radius: var(--r-l); background: linear-gradient(180deg, var(--vault-2), var(--vault)); border: 1px solid var(--hair); transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.promo-opt:not(.static):hover .box { border-color: var(--line-2); transform: translateY(-2px); }
.promo-opt input:checked + .box { border-color: var(--brass); box-shadow: 0 0 0 4px rgba(200,164,100,.12), 0 24px 50px -28px rgba(200,164,100,.6); }
.promo-opt input:focus-visible + .box { outline: 2px solid var(--brass); outline-offset: 3px; }
.promo-opt .sketch { width: auto; height: 108px; max-width: 100%; display: block; margin-bottom: 6px; align-self: flex-start; }
.promo-opt .sketch .hot { animation: hot 2.4s ease-in-out infinite; }
@keyframes hot { 50% { opacity: .65; } }
.opt-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.opt-tier { flex: 1; min-width: 0; font-size: .8rem; color: var(--brass-hi); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-opt .pi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--gold); color: #1B1407; box-shadow: 0 10px 24px -10px rgba(200,164,100,.7); }
.promo-opt .pi .ic { width: 20px; height: 20px; }
.promo-opt h3 { font-family: var(--f-body); font-weight: 700; font-size: 1.05rem; margin: 2px 0 0; }
.promo-opt p { margin: 0; color: var(--mist); font-size: .88rem; line-height: 1.5; flex: 1; }
.promo-opt .price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--hair); }
.promo-opt .price b { font: 400 1.5rem/1 var(--f-display); color: var(--ivory); }
.promo-opt .price span { color: var(--mist); font-size: .84rem; }
.opt-check { position: absolute; right: 16px; bottom: 18px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: transparent; transition: background .25s, color .25s; }
.opt-check .ic { width: 16px; height: 16px; }
.promo-opt input:checked + .box .opt-check { background: var(--gold); color: #1B1407; border-color: transparent; }
.periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.period { position: relative; cursor: pointer; }
.period input { position: absolute; opacity: 0; }
.period span { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r-m); border: 1px solid var(--hair); background: var(--vault); transition: border-color .2s, background .2s; text-align: center; }
.period b { color: var(--ivory); font-size: 1rem; }
.period small { color: var(--mist); font-size: .78rem; }
.period input:checked + span { border-color: var(--brass); background: rgba(200,164,100,.1); }
.period input:checked + span small { color: var(--brass-hi); }
.period input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.paybar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 26px; padding: 12px 12px 12px 22px; border-radius: var(--r-pill); background: rgba(20,30,51,.95); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px rgba(0,0,0,.9); backdrop-filter: blur(10px); }
.paybar .sum { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; font-size: .9rem; }
.paybar .sum b { color: var(--ivory); font: 400 1.4rem/1 var(--f-display); }
.paybar .sum s { font-size: .86rem; }
.promo-hero-x { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; }
.promo-hero-x h1 { margin-bottom: 14px; }
.promo-hero-x .lead { color: var(--mist); max-width: 52ch; }
.promo-hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.promo-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.promo-points li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-m); background: rgba(12,19,34,.5); border: 1px solid var(--hair); }
.promo-points .ic { width: 22px; height: 22px; color: var(--brass-hi); flex: none; }
.promo-points b { display: block; color: var(--ivory); font-size: .94rem; }
.promo-points span { color: var(--mist); font-size: .84rem; }

/* Баланс */
.vault-card { position: relative; overflow: hidden; padding: 30px; border-radius: var(--r-l); background: radial-gradient(600px 300px at 100% 0%, rgba(200,164,100,.22), transparent 60%), linear-gradient(135deg, #1D2A47, #111A2D); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); margin-bottom: 22px; }
.vault-card .big { font: 400 clamp(2.4rem, 1.8rem + 2vw, 3.4rem)/1 var(--f-display); color: var(--ivory); margin: 8px 0 4px; }
.vault-card .gl { position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; opacity: .5; pointer-events: none; }
.amounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.amounts button { height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: rgba(200,164,100,.05); color: var(--brass-hi); font: 600 .9rem var(--f-body); cursor: pointer; }
.amounts button:hover, .amounts button.on { border-color: var(--brass); color: var(--ivory); background: rgba(200,164,100,.14); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 600; color: var(--mist); font-size: .8rem; padding: 10px 12px; border-bottom: 1px solid var(--hair); }
.table td { padding: 12px; border-bottom: 1px solid var(--hair); color: var(--text); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.plus { color: var(--emerald); font-weight: 700; }
.minus { color: var(--garnet); font-weight: 700; }

/* ───────────── страница продвижения ───────────── */
.promo-hero { padding: 40px; border-radius: var(--r-l); background: radial-gradient(700px 300px at 0% 0%, rgba(200,164,100,.16), transparent 60%), var(--vault); border: 1px solid var(--line); margin: 24px 0 26px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.step { padding: 22px; border-radius: var(--r-l); background: var(--vault); border: 1px solid var(--hair); }
.step i { font: 400 1.6rem/1 var(--f-display); color: var(--brass); font-style: normal; display: block; margin-bottom: 10px; }

/* ───────────── подвал ───────────── */
.foot { margin-top: 90px; padding: 46px 0 34px; border-top: 1px solid var(--hair); background: rgba(8,13,24,.4); }
.foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.foot h4 { font: 700 .86rem var(--f-body); color: var(--ivory); margin: 0 0 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--mist); font-size: .9rem; }
.foot a:hover { color: var(--ivory); }
.foot .about { color: var(--mist); font-size: .9rem; max-width: 36ch; margin-top: 14px; }
.foot .copy { grid-column: 1 / -1; padding-top: 24px; margin-top: 10px; border-top: 1px solid var(--hair); font-size: .82rem; color: var(--mist-2); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ───────────── мобильный док ───────────── */
.dock { display: none; }
.menu-sheet { display: none; }

@media (max-width: 1380px) { .brand small { display: none; } }
@media (max-width: 1180px) { .top-search { display: none; } .top-actions { margin-left: auto; } }

@media (max-width: 1080px) {
  .nav { display: none; }
  .hero .wrap { grid-template-columns: 1fr; }
  .guilloche { display: none; }
  .channel, .add-layout { grid-template-columns: 1fr; }
  .channel-side, .add-layout aside { position: static; }
  .add-layout aside { order: -1; }
  .cab { grid-template-columns: 1fr; }
  .cab-nav { position: static; display: flex; overflow-x: auto; padding: 6px; gap: 4px; scrollbar-width: none; }
  .cab-nav::-webkit-scrollbar { display: none; }
  .cab-nav .who, .cab-nav form { display: none; }
  .cab-nav a { width: auto; white-space: nowrap; padding: 9px 14px; }
  .foot .wrap { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 15px; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .wrap { padding: 0 16px; }
  .top .wrap { height: 60px; gap: 12px; }
  .brand .ic { width: 30px; height: 30px; }
  .brand b { font-size: 1.15rem; }
  .brand small, .top-search, .top-actions .btn-gold, .top-actions .balance-pill { display: none; }
  .top-actions { margin-left: auto; }
  .hero { padding: 40px 0 36px; }
  .hero .lead { font-size: 1rem; }
  .hero-search { flex-direction: column; border-radius: 20px; padding: 6px; }
  .hero-search input { height: 48px; }
  .hero-stats { gap: 20px; }
  .hero-stats b { font-size: 1.3rem; }
  .section { padding-top: 46px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .cats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cat { padding: 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .cat-ic { width: 38px; height: 38px; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .tcard { padding: 16px; border-radius: 20px; }
  .channel-main, .form-card, .promo-hero { padding: 22px; border-radius: 20px; }
  .channel-id { flex-direction: column; align-items: flex-start; gap: 16px; }
  .channel-id .medal { width: 84px; height: 84px; }
  .grid-2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi b { font-size: 1.4rem; }
  .mycard { grid-template-columns: auto 1fr; padding: 14px; gap: 14px; }
  .mycard .acts { grid-column: 1 / -1; }
  .mycard .acts .btn { flex: 1; }
  .promos, .steps { grid-template-columns: 1fr; }
  .paybar { border-radius: 20px; bottom: calc(92px + env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; padding: 14px; }
  .foot { margin-top: 60px; }
  .foot .wrap { grid-template-columns: 1fr; gap: 24px; }
  .toast { top: 70px; }
  .table-wrap { overflow-x: auto; }

  .dock {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
    height: 66px; padding: 0 6px; border-radius: 22px;
    background: rgba(15, 24, 41, .92); border: 1px solid var(--line);
    backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,.8);
  }
  .dock a, .dock button { height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--mist); font: 600 .68rem var(--f-body); background: none; border: 0; -webkit-tap-highlight-color: transparent; }
  .dock .ic { width: 22px; height: 22px; }
  .dock a.on { color: var(--brass-hi); }
  .dock .add { position: relative; }
  .dock .add span.fab { width: 54px; height: 54px; margin-top: -26px; border-radius: 18px; display: grid; place-items: center; background: var(--gold); color: #1B1407; box-shadow: 0 0 0 6px var(--ink), 0 12px 24px -8px rgba(200,164,100,.8); transition: transform .2s var(--ease); }
  .dock .add:active span.fab { transform: scale(.94); }
  .dock .add span.fab .ic { width: 26px; height: 26px; }

  .menu-sheet { display: block; position: fixed; inset: 0; z-index: 70; pointer-events: none; }
  .menu-sheet .veil { position: absolute; inset: 0; background: rgba(5,8,15,.6); opacity: 0; transition: opacity .3s; }
  .menu-sheet .sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; overflow-y: auto; padding: 10px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--ink-2); border-top: 1px solid var(--line-2); transform: translateY(100%); transition: transform .42s var(--ease); }
  .menu-sheet .grab { width: 44px; height: 4px; border-radius: 4px; background: var(--vault-3); margin: 4px auto 16px; }
  .menu-sheet .sheet { visibility: hidden; transition: transform .42s var(--ease), visibility 0s .42s; }
  .menu-sheet.open .sheet { visibility: visible; transition: transform .42s var(--ease); }
  .menu-sheet.open { pointer-events: auto; }
  .menu-sheet.open .veil { opacity: 1; }
  .menu-sheet.open .sheet { transform: none; }
  .menu-sheet form.s { position: relative; margin-bottom: 16px; }
  .menu-sheet form.s input { width: 100%; height: 50px; border-radius: 16px; border: 1px solid var(--line); background: var(--vault); color: var(--ivory); padding: 0 16px 0 46px; font: inherit; }
  .menu-sheet form.s .ic { position: absolute; left: 15px; top: 15px; color: var(--mist); }
  .menu-sheet .links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
  .menu-sheet .links a { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; background: var(--vault); border: 1px solid var(--hair); color: var(--ivory); font-weight: 600; font-size: .9rem; }
  .menu-sheet .links .ic { color: var(--brass); }
  .menu-sheet h4 { font: 700 .82rem var(--f-body); color: var(--mist); margin: 0 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ───────────── общие утилиты выравнивания ───────────── */
.clamp-1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-box { padding: 16px; margin: 4px 0 18px; border-radius: var(--r-m); border: 1px solid var(--line); background: rgba(200,164,100,.04); }
.sub-box .field { margin-bottom: 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.checks { display: grid; gap: 10px; margin-bottom: 20px; }
.row-acts { display: flex; gap: 6px; justify-content: flex-end; }
h1, h2, h3 { overflow-wrap: anywhere; }
.channel-desc, .seo-text, .mycard h3 a { overflow-wrap: anywhere; }

@media (max-width: 1080px) {
  .promo-stage { grid-template-columns: 1fr; }
  .stage-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .promo-hero-x { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .vcards { grid-auto-columns: 66%; gap: 12px; margin: 0 -16px; padding: 4px 16px 12px; scroll-padding: 0 16px; }
  .show-nav, .showcase::after { display: none; }
  .promos { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stage-card { min-height: 0; padding: 10px; }
  .stage-facts { gap: 8px; }
  .stage-facts div { padding: 10px; }
  .stage-facts b { font-size: 1.15rem; }
  .periods { gap: 8px; }
  .period span { padding: 12px 8px; }
  .paybar { flex-direction: column; align-items: stretch; border-radius: 20px; padding: 14px; bottom: calc(92px + env(safe-area-inset-bottom)); }
  .paybar .sum { justify-content: space-between; }
  .tcard-desc { min-height: 0; }
}

.cat .pin { margin-left: auto; color: var(--brass); flex: none; }
.cat .pin .ic { width: 16px; height: 16px; }
.cat.pinned { border-color: var(--line); background: linear-gradient(180deg, rgba(200,164,100,.10), rgba(20,30,51,.7)); }
.cat.all { justify-content: center; border-style: dashed; border-color: var(--line-2); color: var(--brass-hi); font-weight: 600; }
.cat > span:nth-child(2) { min-width: 0; }
.cat b { overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .home-cats .cat:nth-child(n+8):not(.all) { display: none; }
  .hero-stats span { display: block; line-height: 1.3; }
}
