/* Единый дизайн сайта: «Повелитель мысли» и клуб в стиле эскизов «RE:CLUB» (Роман выбрал его как общий).
   Природная палитра, светлая и тёмная темы. */
:root, [data-theme="light"] {
  --bg: #f4f1e9; --surface: #fffdf8; --surface-2: #ece7dc;
  --text: #1d2820; --muted: #566056; --line: rgba(29, 40, 32, .1); --line-strong: rgba(29, 40, 32, .22);
  --accent: #2f5a40; --accent-ink: #2a5139; --accent-soft: #e1e9dc; --focus: #2f5a40;
  --btn-bg: #22392b; --btn-ink: #fff; --btn-shadow: 0 10px 24px -14px rgba(20, 40, 28, .6);
  --track: rgba(29, 40, 32, .14); --danger: #c2412d; --toast-bg: #1d2820; --toast-ink: #fff;
  --chat-bg: #e9e3fb; --chat-ink: #48309f; --new-bg: #f6dcc6; --new-ink: #833b0f; --live: #c2412d;
  --nav-bg: rgba(255, 253, 248, .9); --header-bg: rgba(244, 241, 233, .86); --fade: rgba(250, 247, 240, .96);
  --t-peach: #f2e1d3; --t-blue: #dde6ee; --t-sand: #f0e6c8; --t-forest: #dfe8d8;
  --hover: rgba(29, 40, 32, .05); --grain-o: .05; --grain-blend: multiply;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0d1310; --surface: #151d18; --surface-2: #1d2721;
  --text: #edf1ea; --muted: #a3afa4; --line: rgba(255, 255, 255, .08); --line-strong: rgba(255, 255, 255, .2);
  --accent: #9fd1ae; --accent-ink: #a9d8b6; --accent-soft: rgba(159, 209, 174, .14); --focus: #9fd1ae;
  --btn-bg: #e4ede0; --btn-ink: #132018; --btn-shadow: none;
  --track: rgba(255, 255, 255, .14); --toast-bg: #edf1ea; --toast-ink: #132018;
  --chat-bg: rgba(139, 92, 246, .24); --chat-ink: #dccfff; --new-bg: rgba(240, 160, 100, .18); --new-ink: #f5c7a3; --live: #ff7b66;
  --nav-bg: rgba(13, 19, 16, .88); --header-bg: rgba(13, 19, 16, .84); --fade: rgba(13, 19, 16, .93);
  --t-peach: #2a201d; --t-blue: #18212e; --t-sand: #26221a; --t-forest: #17221c;
  --hover: rgba(255, 255, 255, .06); --grain-o: .07; --grain-blend: overlay;
  color-scheme: dark;
}

/* ---------- картинки ---------- */
:is(.feature, .tile, .thumb, .mini-art, .stream-art, .docview, .pl-screen, .pl-cover, .media) { isolation: isolate; }
:is(.feature, .tile, .thumb, .mini-art, .stream-art, .docview, .pl-screen, .pl-cover, .media) > :is(svg.scene, img.art) {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
[data-theme="dark"] img.art-l, [data-theme="light"] img.art-d { display: none; }
.media { position: relative; overflow: hidden; background: var(--surface-2); }

/* ---------- каркас ---------- */
.c-crumb { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: calc(2px + var(--safe-t)) 16px 2px; font-size: 13px; font-weight: 600; color: var(--chat-ink); background: var(--chat-bg); }
.c-crumb .ic { width: 15px; height: 15px; }
.c-top { position: sticky; top: 0; z-index: 20; background: var(--header-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.c-top.scrolled { box-shadow: 0 1px 0 var(--line); }
.c-top-in { max-width: 560px; margin: 0 auto; padding: 8px 16px; min-height: 64px; display: flex; align-items: center; gap: 8px; }
.logo { flex: 1; display: grid; line-height: 1.05; }
.logo b { font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.logo span { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.c-title { flex: 1; text-align: center; font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-top .icon-btn { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.chat-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; line-height: 1.1; color: var(--chat-ink); background: var(--chat-bg); }
.chat-pill .ic { width: 18px; height: 18px; }
.c-main { max-width: 560px; margin: 0 auto; padding: 0 16px calc(104px + var(--safe-b)); }

/* ---------- нижнее меню ---------- */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--nav-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 -1px 0 var(--line); padding-bottom: var(--safe-b); }
.bnav-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.bnav a { display: grid; justify-items: center; gap: 3px; padding: 8px 0 10px; min-height: 60px; font-size: 11.5px; font-weight: 600; color: var(--muted); transition: color .2s; }
.bnav a .ib { width: 52px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background-color .25s var(--ease); }
.bnav a[aria-current="page"] { color: var(--text); }
.bnav a[aria-current="page"] .ib { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- главная ---------- */
.c-hero { padding: 12px 2px 20px; }
.c-hero h1 { font-size: 38px; line-height: 1.04; font-weight: 700; letter-spacing: -.035em; }
.c-hero p { margin-top: 8px; color: var(--muted); }
.feature { position: relative; display: block; min-height: 372px; border-radius: var(--r-lg); overflow: hidden; isolation: isolate; background: var(--surface-2); box-shadow: 0 24px 50px -30px rgba(20, 30, 24, .55); }
.feature > :is(svg, img) { transition: transform 1.2s var(--ease); }
.feature:hover > :is(svg, img) { transform: scale(1.04); }
.feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--fade) 26%, transparent 62%); }
.feature-in { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; display: grid; gap: 8px; }
.feature-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text); background: var(--fade); backdrop-filter: blur(6px); }
.tag .ic { width: 14px; height: 14px; }
.feature h2 { font-size: 24px; line-height: 1.15; letter-spacing: -.015em; }
.feature p { color: var(--muted); font-size: 15px; }
.feature .btn { justify-self: start; margin-top: 6px; }

.sec { margin-top: 32px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-size: 21px; letter-spacing: -.01em; }
.sec-head a { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--accent-ink); min-height: 44px; }
.sec-head a .ic { width: 16px; height: 16px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; aspect-ratio: 1 / 1.06; border-radius: 20px; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; padding: 14px; transition: transform .25s var(--ease); }
.tile:active { transform: scale(.98); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--fade) 38%, transparent 78%); }
.tile .ti { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); color: var(--accent-ink); box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .3); }
.tile .ti .ic { width: 19px; height: 19px; }
.tile b { margin-top: 10px; font-size: 16px; line-height: 1.2; }
.tile > span:not(.ti):not(.go) { font-size: 12.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .go { position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--fade); color: var(--text); }
.tile .go .ic { width: 16px; height: 16px; }

.next { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.datebox { flex: none; width: 60px; height: 64px; border-radius: 16px; display: grid; place-content: center; text-align: center; background: var(--t-sand); }
.datebox b { font-size: 22px; line-height: 1; }
.datebox span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.next-body { flex: 1; min-width: 0; }
.next-body small { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--live); text-transform: uppercase; letter-spacing: .06em; }
.next-body small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.next-body b { display: block; font-size: 15px; line-height: 1.3; margin-top: 2px; }
.next-body span { font-size: 13px; color: var(--muted); }

.hrow { display: grid; grid-auto-flow: column; grid-auto-columns: 216px; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
.hrow::-webkit-scrollbar { display: none; }
.mini { scroll-snap-align: start; display: grid; gap: 8px; }
.mini-art { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.mini-art .tag { position: absolute; left: 8px; top: 8px; padding: 4px 9px; font-size: 11px; }
.mini b { font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini span { font-size: 12.5px; color: var(--muted); }
.bar { height: 3px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.mini-art .bar { position: absolute; left: 8px; right: 8px; bottom: 6px; }

/* ---------- списки разделов ---------- */
.s-head { padding: 8px 2px 16px; }
.s-head h1 { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.s-head p { color: var(--muted); margin-top: 6px; }
.search { position: relative; margin-bottom: 14px; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 50px; padding: 0 16px 0 44px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); outline: none; transition: box-shadow .2s; }
.search input::placeholder { color: var(--muted); }
.search input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); transition: all .2s var(--ease); }
.chip[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-ink); box-shadow: none; }
.rows { display: grid; gap: 10px; }
.row { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .18s var(--ease), box-shadow .2s; }
.row:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.row:active { transform: scale(.99); }
.thumb { position: relative; flex: none; width: 68px; height: 68px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
.thumb .ti { position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--fade); color: var(--text); }
.thumb .ti .ic { width: 16px; height: 16px; }
.thumb.file { background: var(--t-forest); color: var(--accent-ink); }
.thumb.file .ic { width: 28px; height: 28px; }
.thumb.date { flex-direction: column; background: var(--t-sand); display: grid; place-content: center; text-align: center; }
.thumb.date b { font-size: 22px; line-height: 1; }
.thumb.date span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 3px; }
.row-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.row-body b { font-size: 15.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-body .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.meta .live { color: var(--live); font-weight: 700; }
.meta .bar { flex: 1; max-width: 90px; }
.new { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--new-bg); color: var(--new-ink); }
.row > .ic { color: var(--muted); width: 18px; height: 18px; }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .ic { width: 36px; height: 36px; }
.empty b { color: var(--text); font-size: 17px; }

.sec-tiles { display: grid; gap: 10px; }
.sec-link { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.sec-link .thumb { width: 60px; height: 60px; }
.sec-link b { display: block; font-size: 16px; }
.sec-link span { font-size: 13px; color: var(--muted); }
.sec-link .row-body + .ic { color: var(--muted); }

/* ---------- страница выпуска ---------- */
.it { padding-top: 8px; }
.it-head { display: grid; gap: 10px; margin-top: 18px; }
.it-head h1 { font-size: 26px; line-height: 1.15; letter-spacing: -.015em; }
.pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.pill .ic { width: 15px; height: 15px; }
.it-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.it-actions .btn { min-height: 48px; font-size: 15px; }
.btn.chat { background: var(--chat-bg); color: var(--chat-ink); box-shadow: none; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-top: 24px; border-radius: 14px; background: var(--surface-2); }
.tabs button { min-height: 42px; border-radius: 11px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .25); }
.panel { padding-top: 16px; }
.prose { display: grid; gap: 14px; font-size: 16.5px; line-height: 1.65; }
.prose.muted { color: var(--muted); font-size: 15.5px; }
.att { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.att .ic { color: var(--accent-ink); }
.att div { flex: 1; min-width: 0; }
.att b { display: block; font-size: 14.5px; }
.att span { font-size: 12.5px; color: var(--muted); }
.docview { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--surface-2); isolation: isolate; }
.docview > :is(svg, img) { opacity: .55; }
.paper { width: 46%; aspect-ratio: 1 / 1.35; border-radius: 10px; background: var(--surface); box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .45); padding: 14% 10%; display: grid; align-content: start; gap: 8px; }
.paper i { display: block; height: 6px; border-radius: 4px; background: var(--line-strong); }
.paper i:first-child { width: 60%; height: 9px; background: var(--accent-soft); }
.paper i:nth-child(3n) { width: 80%; }
.countdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.countdown div { padding: 14px 8px; border-radius: 16px; text-align: center; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.countdown b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown span { font-size: 12px; color: var(--muted); }
.stream-art { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; }
.stream-art .tag { position: absolute; left: 12px; top: 12px; color: var(--live); }

/* ---------- профиль ---------- */
.me { display: flex; align-items: center; gap: 14px; padding: 8px 2px 20px; }
.avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #5d8a6b, #2a4a37); }
.me h1 { font-size: 24px; line-height: 1.15; }
.me div > span { font-size: 14px; color: var(--muted); }
.box { padding: 18px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.box + .box { margin-top: 10px; }
.box-row { display: flex; align-items: center; gap: 12px; }
.box-row .bi { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.box-row .bi.pm { background: rgba(139, 92, 246, .14); color: #7a52e6; }
[data-theme="dark"] .box-row .bi.pm { color: #cbb9ff; }
.box-row div { flex: 1; min-width: 0; }
.box-row b { display: block; font-size: 16px; }
.box-row span { font-size: 13.5px; color: var(--muted); }
.state { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap; }
.state.off { background: var(--new-bg); color: var(--new-ink); }
.kv { display: grid; gap: 8px; margin: 16px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14.5px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; }
.kv span:first-child { color: var(--muted); }
.box .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.pay:last-child { border-bottom: 0; padding-bottom: 0; }
.pay:first-child { padding-top: 0; }
.pay span { display: block; font-size: 12.5px; color: var(--muted); }
.pay b { white-space: nowrap; }
.menu { border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.menu a, .menu button { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px; text-align: left; font-size: 15.5px; border-bottom: 1px solid var(--line); }
.menu > :last-child { border-bottom: 0; }
.menu .ic { color: var(--muted); }
.menu span { flex: 1; }
.menu .danger, .menu .danger .ic { color: var(--danger); }
.switch { position: relative; width: 50px; height: 30px; border-radius: 99px; background: var(--track); transition: background-color .25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
[aria-checked="true"] > .switch { background: var(--accent); }
[aria-checked="true"] > .switch::after { transform: translateX(20px); }

/* ---------- вступление в клуб и окончание подписки ---------- */
.join-hero { position: relative; margin-top: 8px; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 24px 50px -34px rgba(20, 30, 24, .55); }
.join-hero > .media { height: 230px; }
.join-hero::after { content: ""; position: absolute; left: 0; right: 0; top: 160px; height: 72px; background: linear-gradient(0deg, var(--surface), transparent); pointer-events: none; }
.join-hero-in { position: relative; z-index: 1; margin-top: -30px; padding: 0 22px 22px; display: grid; gap: 8px; }
.join-hero h1 { font-size: 32px; line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
.join-hero p { color: var(--muted); }
.perks { display: grid; gap: 10px; }
.perk { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.perk .bi { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.perk b { display: block; font-size: 15.5px; }
.perk span { font-size: 13.5px; color: var(--muted); }
.price-card { padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent-soft), 0 24px 50px -32px rgba(20, 40, 28, .6); display: grid; gap: 14px; }
.price-card .price { font-size: 36px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.price-card .price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-card .fine { font-size: 13px; color: var(--muted); text-align: center; }
.price-card li .ic { width: 18px; height: 18px; color: var(--accent-ink); stroke-width: 2.2; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.fine { font-size: 13px; color: var(--muted); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 0; min-height: 44px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--muted); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 0 16px; color: var(--muted); font-size: 15px; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 12px 16px calc(12px + var(--safe-b)); background: linear-gradient(180deg, transparent, var(--bg) 35%); }
.sticky-cta .btn { display: flex; max-width: 528px; margin: 0 auto; }

/* ---------- компьютер: меню слева ---------- */
@media (min-width: 1024px) {
  body.has-nav { padding-left: 104px; }
  .bnav { top: 0; right: auto; width: 104px; padding: 24px 0; box-shadow: 1px 0 0 var(--line); }
  .bnav-in { grid-template-columns: 1fr; gap: 6px; }
  .c-main, .c-top-in { max-width: 760px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tile { aspect-ratio: 1 / 1.2; }
  .rows.grid2 { grid-template-columns: 1fr 1fr; }
  .toasts { bottom: 32px; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .c-main, .c-top-in, .bnav-in { max-width: 680px; }
}

/* =====================  «Повелитель мысли» в том же стиле  ===================== */
.logo .dot { display: inline-block; width: 7px; height: 7px; margin-left: 4px; border-radius: 50%; background: #8b6cf0; vertical-align: 3px; }
/* шапка «Повелителя мысли»: название мелко капсом, под ним автор — заметно */
.logo.pm-logo { gap: 3px; }
.logo.pm-logo b, .logo.pm-logo b span { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
.logo.pm-logo b .dot { width: 9px; height: 9px; margin-left: 7px; vertical-align: 0; background: #7b4dff; }
.logo.pm-logo > span { padding-left: 1px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; text-transform: none; color: var(--muted); }
/* видео-обзор: фото темнее, по нажатию играет само видео */
.preview.dim::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .42)); pointer-events: none; }
.preview .play, .preview .tag { z-index: 1; }
.preview .play { border: 0; cursor: pointer; }
.preview-video { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; background: #000; object-fit: contain; }
.preview.playing .play, .preview.playing .tag { display: none; }
.preview.playing::after { display: none; }
/* вход: две платформы рядом */
.login-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-pick .btn { padding-inline: 10px; }
/* чаты программы: «Вступайте в наш чат» и две кнопки в одну строку */
.chat-join { margin: 20px 0 0; padding: 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 10px; }
.chat-join b { font-size: 15px; }
.chat-join .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chat-join .btn { min-height: 46px; padding-inline: 10px; }
.payhelp { display: flex; width: 100%; margin-top: 2px; }
/* цена: пункты с подписью */
.ticks.rich li { align-items: flex-start; }
.ticks.rich li .ic { margin-top: 2px; }
.ticks.rich b { display: block; font-size: 15.5px; font-weight: 600; }
.ticks.rich li div > span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
/* закреплённая кнопка покупки на странице программы */
.buybar { transform: translateY(110%); transition: transform .3s var(--ease); pointer-events: none; }
.buybar.on { transform: none; pointer-events: auto; }
.cta-bar .buybar-in { max-width: 528px; display: flex; align-items: center; gap: 14px; text-align: left; padding: 10px 10px 10px 18px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -18px rgba(0, 0, 0, .55); }
.buybar-txt { flex: 1; min-width: 0; display: grid; }
.buybar-txt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar-txt > span { font-size: 13px; color: var(--muted); }
.buybar .btn { flex: none; }
@media (prefers-reduced-motion: reduce) { .buybar { transition: none; } }
/* урок: переключатель видео / аудио */
.media-tabs { margin: 0 0 12px; }
.media-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.media-tabs .ic { width: 18px; height: 18px; }
.c-top .btn.sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.lead { color: var(--muted); font-size: 16.5px; }
.muted { color: var(--muted); }

/* ---------- экран 1: вход в пространство ---------- */
.hint { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--muted); }
.hint .ic { width: 16px; height: 16px; }

/* ---------- экран 2: знакомство ---------- */
.preview { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; }
.preview .play { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: var(--fade); backdrop-filter: blur(6px); }
.preview .play .ic { width: 24px; height: 24px; margin-left: 3px; }
.preview .tag { position: absolute; left: 14px; bottom: 14px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.cta-row small { font-size: 14px; color: var(--muted); }
.dayrows { display: grid; gap: 10px; }
.dayrow { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.dayrow .datebox { width: 56px; height: 56px; }
.dayrow b { display: block; font-size: 16px; }
.dayrow span { font-size: 13px; color: var(--muted); }
.fmts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fmts .perk { padding: 12px; }
.fmts .perk .bi { width: 40px; height: 40px; }
.author { display: flex; gap: 14px; align-items: center; }
.author p { color: var(--muted); font-size: 15px; }
.plans { display: grid; gap: 12px; }
.price-card h3 { font-size: 19px; line-height: 1.25; }
.price-card.alt { box-shadow: inset 0 0 0 1px var(--line); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.ticks .ic { width: 18px; height: 18px; color: var(--accent-ink); stroke-width: 2.2; }
.foot { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0 20px; font-size: 13px; color: var(--muted); }
.foot a, .foot span { padding: 8px 0; }
.have { text-align: center; margin-top: 28px; color: var(--muted); }
.have a { color: var(--accent-ink); font-weight: 600; margin-left: 6px; padding: 10px 2px; }
.rv { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ---------- вход и оплата ---------- */
.narrow { max-width: 460px; margin: 0 auto; padding: 8px 16px calc(32px + var(--safe-b)); }
.auth-art { height: 150px; border-radius: var(--r-lg); margin-top: 6px; }
.auth-hero { display: grid; gap: 8px; padding: 18px 2px 22px; }
.auth-hero h1 { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }
.auth-hero p { color: var(--muted); }
.stack { display: grid; gap: 12px; }
.or { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; margin: 4px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; padding: 4px 0; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.check a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.err { color: var(--danger); font-size: 14px; font-weight: 500; }
[data-theme="dark"] .err { color: #ff9b8a; }
.err:empty { display: none; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.input { width: 100%; height: 54px; padding: 0 16px; border-radius: 14px; background: var(--surface); border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); outline: none; transition: box-shadow .2s; }
.input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--danger); }
.input.code { text-align: center; font-size: 26px; font-weight: 600; letter-spacing: .5em; padding-left: calc(16px + .5em); font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; }
.steps li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); }
.steps li.done::before { content: "\2713"; background: var(--btn-bg); color: var(--btn-ink); }
.waiting { display: inline-flex; align-items: center; gap: 10px; justify-content: center; color: var(--muted); font-size: 14px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: dot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.textlink { color: var(--muted); font-size: 15px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.card { padding: 18px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.order { display: flex; gap: 14px; align-items: center; }
.order .thumb { width: 64px; height: 64px; }
.order h2 { font-size: 17px; line-height: 1.3; }
.order p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.lines { display: grid; gap: 10px; padding: 16px 0; margin: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14.5px; }
.lines div { display: flex; justify-content: space-between; gap: 12px; }
.lines span:first-child { color: var(--muted); }
.total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.total span:first-child { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.secure { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.secure .ic { width: 17px; height: 17px; margin-top: 1px; color: var(--accent-ink); }
.ok-hero { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 20px 0 28px; }
.ok-art { width: 168px; height: 168px; border-radius: 50%; display: grid; place-items: center; }
.ok-art .tick { position: relative; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--btn-bg); color: var(--btn-ink); animation: pop .6s var(--ease) both .15s; }
.ok-art .tick .ic { width: 26px; height: 26px; stroke-width: 2.2; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.ok-hero h1 { font-size: 32px; line-height: 1.08; font-weight: 700; letter-spacing: -.03em; }
.ok-hero p { color: var(--muted); max-width: 340px; }

/* ---------- путь из 5 дней ---------- */
.prog { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.segs { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.segs i { height: 4px; border-radius: 4px; background: var(--track); transition: background-color .4s var(--ease); }
.segs i.on { background: var(--accent); }
.prog b { color: var(--text); font-variant-numeric: tabular-nums; }
.dchips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 14px; }
.dchip { position: relative; min-height: 44px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); transition: all .2s var(--ease); }
.dchip[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-ink); box-shadow: none; }
.dchip .seen { position: absolute; top: 4px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.dchip[aria-selected="true"] .seen { background: var(--btn-ink); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; align-items: start; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.dcard { scroll-snap-align: start; scroll-snap-stop: always; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.dcard .media { aspect-ratio: 16 / 10; }
.dcard .media .tags { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; gap: 8px; }
.dcard-body { padding: 18px; display: grid; gap: 12px; }
.dcard h2 { font-size: 25px; line-height: 1.12; letter-spacing: -.025em; }
.dcard p { color: var(--muted); font-size: 15.5px; }
.mday { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--bg); }
.mday .mi { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.mday div { flex: 1; }
.mday b { display: block; font-size: 15px; }
.mday span { font-size: 13px; color: var(--muted); }
.mday > .ic { color: var(--muted); width: 18px; height: 18px; }
.dcard .note { font-size: 13px; color: var(--muted); text-align: center; }
.swipe-hint { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.swipe-hint i { width: 6px; height: 6px; border-radius: 99px; background: var(--track); transition: all .3s var(--ease); }
.swipe-hint i.on { width: 18px; background: var(--text); }
.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 16px 16px calc(14px + var(--safe-b)); background: linear-gradient(180deg, transparent, var(--bg) 34%); }
.cta-bar-in { max-width: 528px; margin: 0 auto; display: grid; gap: 6px; text-align: center; }
.cta-bar small { font-size: 12.5px; color: var(--muted); }

/* ---------- материал дня ---------- */
.block { margin-top: 26px; }
.block > h2 { font-size: 19px; letter-spacing: -.01em; margin-bottom: 12px; }
.todo { display: grid; gap: 8px; }
.todo label { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-size: 15px; }
.todo input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.todo input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.pager a { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pager a.next { text-align: right; }
.pager small { font-size: 12px; color: var(--muted); }
.pager b { font-size: 14.5px; line-height: 1.3; }
.pager .empty { visibility: hidden; padding: 0; }
.finish { display: grid; gap: 10px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent-soft); }
.finish h2 { font-size: 23px; line-height: 1.15; letter-spacing: -.02em; }
.finish p { color: var(--muted); }
.doc { display: grid; gap: 14px; padding-top: 16px; }
.doc h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; }
.doc p { color: var(--muted); }

@media (min-width: 640px) {
  .plans { grid-template-columns: 1fr 1fr; }
  .fmts { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

.btn.glass { background: var(--fade); color: var(--text); backdrop-filter: blur(8px); }
.box.author { display: flex; }

/* ---------- планшет и компьютер ---------- */
@media (min-width: 900px) {
  /* картинки не растягиваются на пол-экрана */
  .preview { max-height: 380px; }
  .dcard .media { max-height: 300px; aspect-ratio: auto; height: 300px; }
  .pl-screen { max-height: 420px; }
  .c-hero h1 { font-size: 44px; }
}

/* ---------- узкие телефоны (360 px): ничего не переносится и не наезжает ---------- */
.logo { min-width: 0; }
.logo b, .logo span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-head h2 { flex: 1; min-width: 0; }
.sec-head a { flex: none; white-space: nowrap; }
.dchip { font-size: 13.5px; padding: 0; white-space: nowrap; }
.dchip .seen { top: auto; right: auto; bottom: 5px; left: 50%; width: 5px; height: 5px; transform: translateX(-50%); }
@media (max-width: 430px) {
  .logo b { font-size: 19px; letter-spacing: -.035em; }
  .c-top-in { gap: 6px; }
}
@media (max-width: 380px) {
  .logo b { font-size: 17px; }
  .logo span { font-size: 9.5px; letter-spacing: .1em; }
  .chat-pill { padding: 0 12px 0 10px; font-size: 12.5px; }
  .sec-head h2 { font-size: 19px; }
  .c-hero h1 { font-size: 34px; }
  .dchips { gap: 4px; }
  .dchip { font-size: 12.5px; }
}

/* ---------- списки в стиле iOS: один блок на секцию, строки через тонкие линии ---------- */
:root, [data-theme="light"] { --sep: rgba(29, 40, 32, .11); --group: #fffdf9; }
[data-theme="dark"] { --sep: rgba(255, 255, 255, .09); --group: #161e19; }

.perks, .dayrows, .qa { display: block; border-radius: 18px; background: var(--group); overflow: hidden; }
.perk, .dayrow {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 0; background: none; box-shadow: none;
}
/* разделитель начинается после иконки, как в «Настройках» */
.perk + .perk::before, .dayrow + .dayrow::before {
  content: ""; position: absolute; top: 0; right: 0; left: 58px; height: 1px; background: var(--sep);
}
.perk .bi { width: 28px; height: 28px; border-radius: 0; background: none; color: var(--accent-ink); }
.perk .bi .ic { width: 24px; height: 24px; stroke-width: 1.6; }
.perk b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.perk div > span, .perk > div > span { display: block; margin-top: 1px; font-size: 14.5px; line-height: 1.4; color: var(--muted); }

.dayrow .dn { flex: none; width: 28px; font-size: 17px; font-weight: 600; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.dayrow b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.dayrow div > span { display: block; margin-top: 1px; font-size: 14px; color: var(--muted); }

/* форматы: один блок, четыре колонки через вертикальные линии */
.fmts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-radius: 18px; background: var(--group); overflow: hidden; }
.fmts .perk { flex-direction: column; justify-content: center; gap: 8px; padding: 16px 4px; text-align: center; }
.fmts .perk .bi { width: auto; height: auto; }
.fmts .perk b { font-size: 13.5px; font-weight: 500; }
.fmts .perk + .perk::before { top: 16px; bottom: 16px; left: 0; right: auto; width: 1px; height: auto; }

/* вопросы: одним блоком, строки раскрываются */
.qa details { position: relative; border: 0; }
.qa details + details::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
.qa summary { padding: 15px 16px; min-height: 52px; font-size: 16px; font-weight: 500; }
.qa summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s var(--ease); font-size: 0; }
.qa details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.qa p { padding: 0 16px 16px; font-size: 15px; }
.faq details { border-bottom: 0; }

/* автор и тарифы — те же спокойные поверхности без рамок */
.box.author { background: var(--group); box-shadow: none; border-radius: 18px; }
.price-card.alt { background: var(--group); box-shadow: none; }
.sec-head { margin-bottom: 10px; }

@media (min-width: 640px) {
  .fmts { grid-template-columns: repeat(4, 1fr); }
  .fmts .perk { flex-direction: row; gap: 10px; padding: 18px 8px; }
}

/* заглушка фото автора, как пустой контакт в iOS */
.avatar.ph { background: var(--surface-2); color: var(--muted); overflow: hidden; align-items: end; }
.avatar.ph svg { width: 78%; height: 78%; fill: currentColor; opacity: .55; }

/* ---------- конструктор: подсветка редактируемого, панель, выбор картинки ---------- */
[data-edit].edited { white-space: pre-line; }
body.editing { padding-bottom: 96px; }
body.editing [data-edit] { cursor: text; outline: 1.5px dashed transparent; outline-offset: 3px; border-radius: 4px; transition: outline-color .15s; }
body.editing [data-edit]:hover { outline-color: rgba(139, 108, 240, .9); }
body.editing [data-edit][contenteditable="true"], body.editing [data-edit][contenteditable="plaintext-only"] { outline: 2px solid #8b6cf0; background: rgba(139, 108, 240, .1); }
body.editing [data-edit-img] { cursor: pointer; outline: 2px dashed transparent; outline-offset: -2px; }
body.editing [data-edit-img]:hover { outline-color: rgba(139, 108, 240, .95); }
body.editing .changed { outline: 2px solid #e8a04f !important; }
body.editing .bnav, body.editing .cta-bar, body.editing .sticky-cta { bottom: 72px; }

.ed-bar {
  position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); z-index: 300;
  display: flex; align-items: center; gap: 6px; max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none;
  padding: 8px; border-radius: 16px; font-size: 13px; color: #fff; background: rgba(22, 22, 28, .94);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .6); backdrop-filter: blur(10px);
}
.ed-bar::-webkit-scrollbar { display: none; }
.ed-bar .ed-name { padding: 0 6px; white-space: nowrap; }
.ed-bar select, .ed-bar button, .ed-bar a {
  flex: none; height: 36px; padding: 0 12px; border-radius: 10px; font: inherit; font-size: 13px;
  color: #fff; background: rgba(255, 255, 255, .1); border: 0; display: inline-flex; align-items: center; white-space: nowrap;
}
.ed-bar select { max-width: 190px; }
.ed-bar select option { color: #111; }
.ed-bar button:disabled { opacity: .45; }
.ed-bar .ed-save { background: #8b6cf0; }
.ed-bar .ed-count { padding: 0 6px; white-space: nowrap; color: rgba(255, 255, 255, .75); }

dialog.sheet.ed-picker { width: min(100%, 640px); }
.ed-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.ed-thumb { aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; }
.ed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-thumb:hover, .ed-thumb:focus-visible { outline: 2px solid #8b6cf0; outline-offset: 1px; }
.ed-upload { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-upload label { cursor: pointer; }
@media (max-width: 480px) { .ed-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- админка сайта ---------- */
.adm { max-width: 860px; }
.adm-login { max-width: 420px; margin: 40px auto; display: grid; gap: 12px; }
.adm-login h1 { font-size: 28px; letter-spacing: -.02em; }
.adm-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: none; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-note { font-size: 14.5px; margin: -2px 0 12px; }
.group-list { border-radius: 18px; background: var(--group); overflow: hidden; }
.adm-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; width: 100%; padding: 12px 16px; text-align: left; }
.adm-row + .adm-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
button.adm-row:hover { background: var(--hover); }
.adm-row .thumb { width: 56px; height: 56px; border-radius: 12px; }
.adm-row-main { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.adm-row-main b { font-size: 15.5px; font-weight: 600; }
.adm-row-main span { font-size: 13.5px; color: var(--muted); }
.adm-row-main .adm-status { color: var(--accent-ink); font-weight: 500; }
.adm-status:empty { display: none; }
.adm-act { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.adm-act .ic { width: 16px; height: 16px; }
.adm-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.adm-acts label { cursor: pointer; }
.adm-row.off { opacity: .6; }
select.input { appearance: auto; }

/* админка: видео и аудиоверсия у дня программы */
.adm-day { align-items: flex-start; }
.adm-slot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--sep); }
.adm-slot > span:first-child { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.adm-slot .ic { width: 18px; height: 18px; color: var(--muted); }
.adm-slot b { font-weight: 600; color: var(--text); }
.adm-slot em { font-style: normal; color: var(--muted); }
.adm-note.err { color: var(--danger, #d0533f); }
.adm-slot > span:first-child { flex-wrap: wrap; }
@media (max-width: 640px) {
  .adm-day { flex-direction: column; align-items: stretch; }
  .adm-day > .thumb { display: none; }
  .adm-day > .adm-acts { align-self: flex-start; }
  .adm-day .adm-row-main { min-width: 0; }
}


/* =====================  главная (30.10, по просьбе Романа)  =====================
   Картинка сверху на всю ширину, текст под ней, а не поверх: в светлой теме тёмные буквы на тёмной картинке не читались. */
.home-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding-top: var(--safe-t); }
.home-top .logo.pm-logo b, .home-top .logo.pm-logo b span { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .55); }
.home-top .logo.pm-logo > span { color: rgba(255, 255, 255, .8); text-shadow: 0 1px 8px rgba(0, 0, 0, .55); }
.home-top #login.glass { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6); background: rgba(0, 0, 0, .22); backdrop-filter: blur(8px); }
.home-top .icon-btn { color: #fff; background: rgba(0, 0, 0, .35); box-shadow: none; }
.home-art { height: min(64svh, 600px); min-height: 380px; }
.home-art img { object-position: 60% 0%; }
/* сверху затемнение под шапку, снизу картинка мягко уходит в цвет страницы */
.home-art::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .5), transparent 22%), linear-gradient(0deg, var(--bg) 0%, transparent 26%); }
.home-main { padding-bottom: calc(120px + var(--safe-b)); }
.home-copy { position: relative; margin-top: -26px; display: grid; gap: 12px; padding: 0 2px 6px; }
.home-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.home-tags .tag { padding: 8px 13px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.home-tags .tag.start { color: var(--accent-ink); background: var(--accent-soft); box-shadow: none; }
.home-tags .tag .ic { width: 15px; height: 15px; }
.home-copy h1 { font-size: clamp(40px, 11.5vw, 54px); line-height: 1.02; font-weight: 700; letter-spacing: -.04em; }
.home-sub { font-size: clamp(23px, 6.6vw, 29px); line-height: 1.18; letter-spacing: -.02em; }
.home-copy .lead { font-size: 17px; line-height: 1.5; }
.home-main .preview { margin-top: 14px; }
/* цена со скидкой */
.price-card .price s.old { font-size: 20px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-card .sale { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--accent-ink); }
.price-card .anywhere { margin-top: -8px; font-size: 14px; color: var(--muted); }
/* нижняя кнопка: цена со скидкой одной строкой, дата старта второй — без обрезки */
.buybar-txt b { font-size: 17px; font-weight: 700; }
.buybar-txt b s { font-size: 14px; font-weight: 500; color: var(--muted); }
.buybar-txt > span { white-space: nowrap; }
.total s.old { font-size: 16px; font-weight: 500; color: var(--muted); }
@media (min-width: 900px) {
  .home-art { max-width: 1100px; height: 520px; margin: 0 auto; border-radius: 0 0 28px 28px; }
  .home-top .c-top-in { max-width: 1100px; padding-inline: 28px; }
  .home-copy { margin-top: -40px; }
  .home-copy h1 { font-size: 64px; }
}

/* админка → клиенты: счётчики, теги, переписка с ботом */
.cstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cstat { padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 2px; }
.cstat b { font-size: 24px; letter-spacing: -.02em; }
.cstat span { font-size: 13px; color: var(--muted); line-height: 1.3; }
.cbadge { min-width: 24px; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; text-align: center; background: var(--live); color: #fff; }
.ctags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.adm-row-main .ctag, .ctag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text); background: var(--surface-2); }
.adm-row-main .ctag.buy, .ctag.buy { color: var(--accent-ink); background: var(--accent-soft); }
.adm-row-main .ctag.off, .ctag.off { color: var(--muted); }
.adm-row-main .ctag.own, .ctag.own { color: var(--chat-ink); background: var(--chat-bg); }
.ctag button { margin-right: -4px; padding: 0 4px; font-size: 15px; line-height: 1; color: inherit; background: none; border: 0; cursor: pointer; }
.cback { display: inline-flex; align-items: center; gap: 6px; }
.cback .ic { width: 18px; height: 18px; }
.ccard { margin-top: 12px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 10px; }
.ccard h2 { font-size: 22px; }
.ctag-add { display: flex; gap: 8px; }
.ctag-add .input { flex: 1; min-width: 0; }
.cchat { display: flex; flex-direction: column; gap: 8px; height: min(52vh, 460px); overflow-y: auto; padding: 14px; border-radius: var(--r-lg); background: var(--surface-2); }
.cmsg { max-width: 80%; padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: var(--surface); align-self: flex-start; }
.cmsg.out { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--btn-bg); color: var(--btn-ink); }
.cmsg.bot { align-self: center; max-width: 90%; background: none; padding: 2px 8px; text-align: center; }
.cmsg.bot p { font-size: 13px; color: var(--muted); }
.cmsg p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.cmsg small { display: block; margin-top: 3px; font-size: 11.5px; opacity: .7; }
.csend { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.csend textarea { flex: 1; min-height: 52px; resize: vertical; }
.csend .btn { flex: none; width: 52px; padding: 0; }

/* «Не пропустите эфиры»: привязка бота для напоминаний (после оплаты и в профиле) */
.remind { margin-top: 22px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 8px; }
.remind h2 { font-size: 20px; }
.remind p { color: var(--muted); line-height: 1.45; }
.remind-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.remind-btns .btn { gap: 8px; }
.remind.on { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.remind.on .ic { width: 20px; height: 20px; color: var(--accent-ink); }
.remind.on p { color: var(--text); }
