/* praktika-os.ru — ночная тема в цветах группы. Mobile-first, без фреймворков. */

@font-face { font-family: "Montserrat"; src: url("/assets/fonts/montserrat.woff2") format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/assets/fonts/lora.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/assets/fonts/lora-italic.woff2") format("woff2"); font-weight: 400 500; font-style: italic; font-display: swap; }

:root {
  --bg0: #0b0e20; --bg1: #141432; --bg2: #1d2350;
  --violet: #4b2e83; --gold: #e8c872; --teal: #4fd1c5; --lav: #8d84a2; --milk: #f3efe6;
  --text: #f3efe6;
  --muted: #b9b2cc;
  --link: #e8c872;
  --link-hover: #f5dea0;
  --surface: rgba(75, 46, 131, .22);
  --surface-2: rgba(29, 35, 80, .72);
  --line: rgba(232, 200, 114, .16);
  --line-2: rgba(243, 239, 230, .1);
  --btn-text: #0b0e20;
  --page-bg: linear-gradient(180deg, #0b0e20 0, #141432 520px, #1d2350 100%);
  --shadow: 0 10px 30px rgba(3, 4, 14, .45);
  --radius: 18px;
  --head: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Lora", Georgia, "Times New Roman", serif;
  --ui: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --text: #1d2350;
  --muted: #4e4866;
  --link: #6b4a00;
  --link-hover: #4b2e83;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --line: rgba(75, 46, 131, .16);
  --line-2: rgba(29, 35, 80, .1);
  --page-bg: linear-gradient(180deg, #f7f2e7 0, #f3efe6 100%);
  --shadow: 0 8px 24px rgba(29, 35, 80, .1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg0); background-image: var(--page-bg); background-repeat: no-repeat;
  color: var(--text); font: 400 1.125rem/1.7 var(--body);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
:root[data-theme="light"] body { background-color: #f3efe6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--btn-text); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wrap--text { max-width: 760px; }
.wrap--wide { max-width: 1000px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }

.kicker { font: 700 .78rem/1.3 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0 0 .8em; }
:root[data-theme="light"] .kicker { color: var(--violet); }
.lead { font-size: 1.2rem; color: var(--muted); }
.more { font: 700 .95rem/1.3 var(--ui); text-decoration: none; }
.empty { color: var(--muted); }

/* кнопки */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font: 700 1rem/1.2 var(--ui); text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: var(--btn-text); box-shadow: 0 6px 20px rgba(232, 200, 114, .25); }
.btn--gold:hover { background: #f1d78f; color: var(--btn-text); }
.btn--violet { background: var(--violet); color: #f3efe6; }
.btn--violet:hover { background: #5b3a9b; color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--gold); color: var(--text); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: .9rem; }
.btn--lg { min-height: 54px; padding: 14px 26px; font-size: 1.05rem; }
:root[data-theme="light"] .btn--gold { background: #e2bb4f; }

.vk-badge { display: inline-grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 10px; background: #0077ff; color: #fff; font: 800 .8rem/1 var(--ui); letter-spacing: .02em; flex: none; }
.vk-badge--sm { width: 1.9em; height: 1.9em; font-size: .72rem; border-radius: 8px; }
.vk-badge--lg { width: 3em; height: 3em; font-size: 1rem; border-radius: 14px; }

/* шапка */
.hdr { position: sticky; top: 0; z-index: 30; background: rgba(11, 14, 32, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-2); }
:root[data-theme="light"] .hdr { background: rgba(247, 242, 231, .9); }
.hdr__in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.logo:hover { color: var(--text); }
.logo__moon { width: 32px; height: 32px; color: var(--gold); flex: none; }
.logo__moon .spark { fill: var(--teal); }
.logo__txt { display: flex; flex-direction: column; line-height: 1.1; }
.logo__txt b { font: 800 1.05rem/1.1 var(--head); }
.logo__txt small { font: 600 .72rem/1.3 var(--ui); color: var(--muted); }
.nav { display: none; }
.hdr__act { display: flex; align-items: center; gap: 8px; }
.hdr__vk { display: none; }
.theme-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-btn .i-moon { fill: currentColor; stroke: none; display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
.menu { position: relative; }
.menu summary { list-style: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-content: center; gap: 5px; cursor: pointer; border: 1px solid var(--line); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; }
.menu__panel { position: absolute; right: 0; top: 54px; width: min(86vw, 320px); background: var(--bg1); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
:root[data-theme="light"] .menu__panel { background: #fff; }
.menu__panel a { padding: 12px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font: 600 1rem/1.3 var(--ui); }
.menu__panel a:hover { background: var(--surface); }
.menu__panel .btn { margin-top: 8px; color: var(--btn-text); }
@media (min-width: 1040px) {
  .nav { display: flex; gap: 2px; }
  .nav a { padding: 8px 12px; border-radius: 999px; color: var(--text); text-decoration: none; font: 600 .92rem/1.2 var(--ui); }
  .nav a:hover, .nav a[aria-current] { background: var(--surface); color: var(--gold); }
  :root[data-theme="light"] .nav a:hover, :root[data-theme="light"] .nav a[aria-current] { color: var(--violet); }
  .hdr__vk { display: inline-flex; }
  .menu { display: none; }
}

/* хлебные крошки */
.crumbs ol { list-style: none; margin: 18px auto 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font: 600 .85rem/1.4 var(--ui); color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--lav); }
.crumbs a { color: var(--muted); text-decoration: none; }
@media (max-width: 699px) {
  .crumbs ol { flex-wrap: nowrap; white-space: nowrap; }
  .crumbs li:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
.crumbs a:hover { color: var(--gold); }

/* первый экран: картинка художника. Телефон и планшет — текст сверху, герои ниже; десктоп — текст слева поверх тёмной части */
.hero { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; background: #0b0e20; }
.hero__in { order: 1; position: relative; z-index: 1; padding-top: 26px; padding-bottom: 0; color: #f3efe6; }
.hero__art { order: 2; display: block; position: relative; z-index: -2; margin-top: -34vw; }
@media (max-width: 699px) {
  .hero .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero .btn--lg { padding: 13px 10px; font-size: .95rem; justify-content: center; }
  .hero .btns .btn--ghost { grid-column: 1 / -1; }
  .hero__lead { font-size: 1.05rem; line-height: 1.6; }
}
.hero__art img { width: 100%; height: auto; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%); mask-image: linear-gradient(180deg, transparent 0, #000 16%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18%; z-index: -1; background: linear-gradient(180deg, rgba(11, 14, 32, 0) 0, #0b0e20 100%); pointer-events: none; }
.hero h1 { max-width: 14em; color: #f3efe6; text-shadow: 0 2px 18px rgba(11, 14, 32, .7); }
:root .hero .kicker { color: var(--gold); }
.hero__lead { max-width: 34em; font-size: 1.15rem; color: #ddd6ea; text-shadow: 0 1px 12px rgba(11, 14, 32, .8); }
.hero .btn--ghost { color: #f3efe6; border-color: rgba(243, 239, 230, .3); background: rgba(11, 14, 32, .35); }
@media (min-width: 700px) and (max-width: 1099px) {
  .hero__in { padding-top: 48px; }
  .hero__art { margin-top: 8px; }
}
@media (min-width: 1100px) {
  .hero { width: 100%; height: min(56.25vw, 960px); min-height: 560px; justify-content: center; }
  .hero__art { position: absolute; inset: 0; margin: 0; }
  .hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 35%; -webkit-mask-image: none; mask-image: none; }
  .hero::after { inset: 0; height: auto; background: linear-gradient(90deg, rgba(11, 14, 32, .78) 0, rgba(11, 14, 32, .35) 34%, rgba(11, 14, 32, 0) 46%), linear-gradient(0deg, rgba(11, 14, 32, .9) 0, rgba(11, 14, 32, 0) 22%); }
  .hero__in { max-width: none; margin: 0; width: min(43vw, 640px); padding: 40px 0 56px max(28px, 5vw); }
  .hero__lead { max-width: 28em; }
  .hero h1 { font-size: clamp(2.3rem, 3.1vw, 3.4rem); }
}
/* звёзды — чистый CSS: три слоя точек, мягкое мерцание */
.stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stars i { position: absolute; inset: 0; background-repeat: repeat; }
.stars i:nth-child(1) { background-image: radial-gradient(1.2px 1.2px at 20px 30px, #f3efe6 50%, transparent 51%), radial-gradient(1px 1px at 140px 90px, #f3efe6 50%, transparent 51%), radial-gradient(1.4px 1.4px at 260px 160px, #e8c872 50%, transparent 51%), radial-gradient(1px 1px at 90px 220px, #f3efe6 50%, transparent 51%); background-size: 300px 260px; animation: tw 6s ease-in-out infinite; opacity: .7; }
.stars i:nth-child(2) { background-image: radial-gradient(1px 1px at 60px 120px, #f3efe6 50%, transparent 51%), radial-gradient(1.6px 1.6px at 210px 40px, #f3efe6 50%, transparent 51%), radial-gradient(1px 1px at 330px 200px, #e8c872 50%, transparent 51%); background-size: 380px 300px; animation: tw 8s ease-in-out -3s infinite; opacity: .5; }
.stars i:nth-child(3) { background-image: radial-gradient(2px 2px at 100px 60px, #4fd1c5 50%, transparent 51%), radial-gradient(1.6px 1.6px at 420px 260px, #4fd1c5 50%, transparent 51%); background-size: 560px 420px; animation: tw 5s ease-in-out -1s infinite; opacity: .55; }
@keyframes tw { 0%, 100% { opacity: .25; } 50% { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .stars i { animation: none; } .btn, .card { transition: none; } }

/* блоки главной */
.block { padding-top: 48px; padding-bottom: 8px; }
.h-sec { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }
.start { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s; }
.start:hover { transform: translateY(-2px); border-color: var(--gold); color: var(--text); }
.start b { font: 700 1.2rem/1.25 var(--head); }
.start span:last-child { color: var(--muted); }
.start__n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--btn-text); font: 800 1rem/1 var(--ui); margin-bottom: 6px; }

.week { display: grid; gap: 24px; align-items: center; }
.week__video { max-width: 300px; width: 100%; margin: 0 auto; }
.week h2 a { color: var(--text); text-decoration: none; }
.week h2 a:hover { color: var(--gold); }
@media (min-width: 760px) { .week { grid-template-columns: 300px 1fr; gap: 40px; } .week__video { margin: 0; } }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips a { display: inline-block; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font: 600 .95rem/1.2 var(--ui); background: var(--surface); }
.chips a:hover { border-color: var(--gold); color: var(--gold); }

.tg { display: grid; gap: 20px; margin-top: 48px; margin-bottom: 8px; padding: 28px 20px; border-radius: 24px; background: radial-gradient(120% 140% at 0% 0%, rgba(75, 46, 131, .55), rgba(29, 35, 80, .6)); border: 1px solid var(--line); }
:root[data-theme="light"] .tg { background: #ece4f7; }
@media (min-width: 860px) { .tg { grid-template-columns: 1.5fr 1fr; align-items: center; padding: 40px; } }

/* карточки */
.card { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line-2); overflow: hidden; transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--line); }
.card__img { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg2); }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card--sign .card__img img, .card--term .card__img img, .card--tool .card__img img { object-fit: cover; }
.card__img--v { object-position: 50% 62%; }
.card__play { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: var(--btn-text); display: grid; place-items: center; font-size: 1rem; padding-left: 3px; }
.card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card__body .kicker { font-size: .7rem; margin-bottom: .6em; }
.card h3 { font-size: 1.15rem; margin: 0 0 .5em; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card h3 a:hover { color: var(--gold); }
.card p { color: var(--muted); font-size: 1rem; line-height: 1.55; margin: 0; }

/* статья */
.post { padding-bottom: 24px; }
.post__head { padding-top: 24px; }
.post__cover { margin: 8px auto 28px; }
.post__cover img { border-radius: var(--radius); width: 100%; }
@media (max-width: 699px) { .post__cover { padding: 0; } .post__cover img { border-radius: 0; } }
.toc details { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 20px; margin-bottom: 28px; }
.toc summary { font: 700 1rem/1.4 var(--ui); cursor: pointer; }
.toc ol { margin: 10px 0 2px; padding-left: 1.3em; font: 600 .98rem/1.5 var(--ui); }
.toc li { margin: 6px 0; }
.toc a { text-decoration: none; }

.prose { font-size: 1.125rem; }
@media (min-width: 700px) { .prose { font-size: 1.1875rem; } }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .45em 0; }
.prose li::marker { color: var(--gold); font-family: var(--ui); font-weight: 700; }
:root[data-theme="light"] .prose li::marker { color: var(--violet); }
.prose blockquote { margin: 1.5em 0; padding: 14px 20px; border-left: 3px solid var(--gold); background: var(--surface); border-radius: 0 12px 12px 0; }
.prose strong, .prose b { font-weight: 700; }
.prose .note { font-size: 1rem; color: var(--muted); font-style: italic; }
.prose .table-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line-2); padding: 8px 10px; text-align: left; }
.term-link { text-decoration-style: dotted; text-decoration-thickness: 1.5px; }
.try { margin-top: 28px; margin-bottom: 8px; padding: 20px 22px; border-radius: var(--radius); background: rgba(79, 209, 197, .08); border: 1px solid rgba(79, 209, 197, .35); }
.try b { font: 700 1rem/1.3 var(--ui); color: var(--teal); display: block; margin-bottom: 6px; }
:root[data-theme="light"] .try b { color: #1d7f77; }
.try p { margin: 0; }

/* блоки ВК */
.vk-cta { border-radius: 22px; border: 1px solid var(--line); }
.vk-cta--inline { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; margin: 2em 0; padding: 18px; background: linear-gradient(135deg, rgba(75, 46, 131, .55), rgba(29, 35, 80, .7)); font-family: var(--ui); }
:root[data-theme="light"] .vk-cta--inline, :root[data-theme="light"] .vk-cta--big { background: #ece4f7; }
.vk-cta--inline .vk-cta__txt { display: flex; flex-direction: column; gap: 4px; }
.vk-cta--inline b { font-size: 1.02rem; line-height: 1.35; }
.vk-cta--inline span:not(.vk-badge) { font-size: .92rem; color: var(--muted); line-height: 1.45; }
.vk-cta--inline .btn { grid-column: 1 / -1; }
@media (min-width: 640px) { .vk-cta--inline { grid-template-columns: auto 1fr auto; } .vk-cta--inline .btn { grid-column: auto; } }
.prose .vk-cta--inline .btn { color: var(--btn-text); }
.vk-cta--big { display: grid; gap: 24px; margin: 48px 0 24px; padding: 28px 20px; background: radial-gradient(130% 120% at 100% 0%, rgba(75, 46, 131, .75), rgba(20, 20, 50, .85)); }
.vk-cta--big h2 { margin-top: 14px; }
.vk-cta--big p { color: var(--muted); }
@media (min-width: 860px) { .vk-cta--big { grid-template-columns: 1.3fr 1fr; padding: 40px; align-items: center; } .wrap--text .vk-cta--big { grid-template-columns: 1fr; } }
.vk-sticky { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 8px 18px; border-radius: 999px; background: #0077ff; color: #fff; text-decoration: none; font: 700 1rem/1.2 var(--ui); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transform: translateY(160%); transition: transform .25s ease; }
.vk-sticky .vk-badge { background: #fff; color: #0077ff; width: 1.9em; height: 1.9em; }
.vk-sticky:hover { color: #fff; }
.vk-sticky.is-on { transform: none; }
@media (min-width: 900px) { .vk-sticky { display: none; } }
body { padding-bottom: 0; }

/* ролики */
.facade { position: relative; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: var(--bg2); box-shadow: var(--shadow); }
.facade img, .facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.facade__btn { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.facade__btn span { width: 76px; height: 76px; border-radius: 50%; background: var(--gold); color: var(--btn-text); display: grid; place-items: center; font-size: 1.6rem; padding-left: 5px; box-shadow: 0 0 0 10px rgba(232, 200, 114, .22), 0 12px 30px rgba(0, 0, 0, .4); transition: transform .15s; }
.facade__btn:hover span { transform: scale(1.06); }
.facade__note { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(11, 14, 32, .78); color: #f3efe6; font: 600 .8rem/1 var(--ui); pointer-events: none; }
.facade.is-playing .facade__note, .facade.is-playing .facade__btn, .facade.is-playing img { display: none; }
.vpage { display: grid; gap: 24px; padding-top: 20px; padding-bottom: 8px; grid-template-areas: "head" "player" "txt"; }
.vpage__head { grid-area: head; max-width: 720px; }
.vpage__head .lead { margin-bottom: 0; }
.vpage__player { grid-area: player; max-width: 300px; width: 100%; margin: 0 auto; text-align: center; }
.vpage__txt { grid-area: txt; }
.vpage__vk { display: inline-block; margin-top: 14px; }
.vpage__txt { max-width: 720px; }
.transcript { margin: 8px 0 24px; padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-2); }
.transcript h2 { font-size: 1.2rem; }
.transcript ol { padding-left: 1.3em; }
@media (min-width: 900px) {
  .vpage { grid-template-columns: 360px 1fr; grid-template-areas: "player head" "player txt"; gap: 8px 56px; align-items: start; }
  .vpage__player { position: sticky; top: 90px; margin: 0; max-width: 360px; text-align: left; grid-row: 1 / span 2; }
}

/* знак сна, словарь */
.sign-box { display: grid; gap: 18px; grid-template-columns: 1fr; padding: 22px; margin-bottom: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-family: var(--ui); }
.sign-box__icon { width: 120px; height: 120px; border-radius: 22px; }
.sign-box b { display: block; font-size: 1.05rem; margin-bottom: 8px; color: var(--gold); }
:root[data-theme="light"] .sign-box b { color: var(--violet); }
.sign-box ul { margin: 0; padding-left: 1.2em; font-size: 1rem; line-height: 1.5; }
.sign-box li { margin: 6px 0; }
@media (min-width: 600px) { .sign-box { grid-template-columns: 120px 1fr; align-items: start; } }
.defbox { margin: 0 0 28px; padding: 22px 24px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(75, 46, 131, .45), rgba(29, 35, 80, .6)); border: 1px solid var(--line); }
:root[data-theme="light"] .defbox { background: #ece4f7; }
.defbox dt { font: 800 1.2rem/1.3 var(--head); margin-bottom: 8px; }
.defbox dfn { font-style: normal; color: var(--gold); }
:root[data-theme="light"] .defbox dfn { color: var(--violet); }
.defbox dd { margin: 0; font-size: 1.12rem; }
.defbox dd p:last-child { margin: 0; }
.also { font: 600 .9rem/1.3 var(--ui); color: var(--muted); }
.az__l { font-size: 1.6rem; color: var(--gold); margin: 1.4em 0 .4em; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
:root[data-theme="light"] .az__l { color: var(--violet); }
.az__list dt { font: 700 1.1rem/1.3 var(--head); margin-top: 18px; }
.az__list dd { margin: 4px 0 0; color: var(--muted); }
.az__list dd p { margin: 0; }

/* вопросы */
.faq__item { border-bottom: 1px solid var(--line-2); }
.faq__item summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 600 1.6rem/1 var(--ui); color: var(--gold); transition: transform .15s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary h2 { font-size: 1.15rem; margin: 0; line-height: 1.35; }
.faq__item .prose { padding-bottom: 10px; }

/* дневник */
.diary { margin-bottom: 24px; }
.diary__form { display: grid; gap: 14px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-family: var(--ui); }
.diary label { display: grid; gap: 6px; font: 700 .9rem/1.3 var(--ui); }
.diary label small { font-weight: 500; color: var(--muted); }
.diary .row { display: grid; gap: 14px; }
@media (min-width: 600px) { .diary .row { grid-template-columns: 200px 1fr; } }
.diary input[type="text"], .diary input[type="date"], .diary input[type="search"], .diary textarea {
  width: 100%; font: 400 1.05rem/1.5 var(--body); color: var(--text); background: rgba(11, 14, 32, .45);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
:root[data-theme="light"] .diary input, :root[data-theme="light"] .diary textarea { background: #fbf8f2; }
.diary textarea { resize: vertical; min-height: 140px; }
.diary input::placeholder, .diary textarea::placeholder { color: var(--muted); opacity: .8; }
.tags { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags legend { font: 700 .9rem/1.3 var(--ui); margin-bottom: 6px; padding: 0; }
.tag { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600 !important; }
.tag input { accent-color: var(--gold); width: 18px; height: 18px; }
.diary__msg { margin: 0; min-height: 1.4em; color: var(--teal); font: 600 .95rem/1.4 var(--ui); }
:root[data-theme="light"] .diary__msg { color: #1d7f77; }
.diary__bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 26px 0 8px; }
.diary__bar input[type="search"] { max-width: 280px; font-family: var(--ui); font-size: 1rem; }
.chip { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font: 600 .9rem/1 var(--ui); cursor: pointer; }
.chip.is-on { background: var(--gold); color: var(--btn-text); border-color: var(--gold); }
.diary__filter { display: flex; gap: 8px; flex-wrap: wrap; }
.diary__stats { color: var(--muted); font: 600 .9rem/1.4 var(--ui); }
.diary__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.entry { padding: 18px 20px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); }
.entry__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-family: var(--ui); }
.entry__date { font: 700 .82rem/1.3 var(--ui); color: var(--gold); letter-spacing: .04em; }
:root[data-theme="light"] .entry__date { color: var(--violet); }
.entry h3 { margin: 0; font-size: 1.1rem; }
.entry__text { white-space: pre-wrap; margin: 10px 0 8px; }
.entry__signs { font-size: .98rem; color: var(--muted); margin: 0 0 8px; }
.entry__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.entry__tags span { font: 700 .75rem/1 var(--ui); padding: 6px 10px; border-radius: 999px; background: rgba(79, 209, 197, .14); color: var(--teal); }
:root[data-theme="light"] .entry__tags span { color: #1d6f68; }
.entry__act { display: flex; gap: 8px; margin-top: 12px; }
.entry__act button { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font: 600 .85rem/1 var(--ui); cursor: pointer; }
.diary__io { margin-top: 28px; padding: 20px 22px; border-radius: var(--radius); border: 1px dashed var(--line); font-family: var(--ui); }
.diary__io p { color: var(--muted); font-size: .98rem; }

/* подвал */
.ftr { margin-top: 56px; padding: 44px 0 100px; background: rgba(11, 14, 32, .55); border-top: 1px solid var(--line-2); font-family: var(--ui); font-size: 1rem; }
:root[data-theme="light"] .ftr { background: #ebe4d6; }
.ftr__in { display: grid; gap: 28px; }
.ftr__brand p { color: var(--muted); max-width: 30em; }
.ftr__col { display: flex; flex-direction: column; gap: 8px; }
.ftr__col b { margin-bottom: 4px; }
.ftr__col a { color: var(--text); text-decoration: none; opacity: .85; }
.ftr__col a:hover { color: var(--gold); opacity: 1; }
.ftr__brand .btn { color: var(--btn-text); }
.ftr__note { margin-top: 32px; font-size: .88rem; color: var(--muted); }
.ftr__copy { font-size: .85rem; color: var(--muted); margin: 0 auto; }
@media (min-width: 760px) { .ftr__in { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .ftr { padding-bottom: 44px; } }

/* 404 */
.nf__code { font: 800 5rem/1 var(--head); color: var(--gold); margin: 0 0 8px; opacity: .9; }

.related { padding-top: 24px; }

/* знак сна, термин, инструмент: иконка 512×512 по центру градиентной плашки */
.card--term .card__img, .card--sign .card__img, .card--tool .card__img { display: grid; place-items: center; background: radial-gradient(90% 120% at 50% 0%, rgba(75, 46, 131, .9), rgba(20, 20, 50, .9)); }
.card--term .card__img img, .card--sign .card__img img, .card--tool .card__img img { width: 112px; height: 112px; border-radius: 24px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.card p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* баннер раздела и рубрики — обложка художника */
.banner { position: relative; margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; background: var(--bg2); }
.banner img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: 70% 40%; }
.banner__txt { position: absolute; left: 0; bottom: 0; top: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px 24px; width: min(100%, 500px); background: linear-gradient(90deg, rgba(11, 14, 32, .9) 0, rgba(11, 14, 32, .6) 75%, rgba(11, 14, 32, 0) 100%); color: #f3efe6; }
.banner__txt h1 { color: #f3efe6; margin-bottom: .3em; }
.banner__txt .lead { color: #ddd6ea; margin: 0; font-size: 1.05rem; }
@media (max-width: 699px) {
  .banner { border-radius: 0; margin: 0 -16px 22px; }
  .banner img { aspect-ratio: 16 / 9; }
  .banner__txt { position: static; width: auto; background: none; color: inherit; padding: 16px 16px 0; }
  .banner__txt h1 { color: var(--text); }
  .banner__txt .lead { color: var(--muted); }
}
/* плитки рубрик на странице «Статьи» */
.rubrics { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin: 0 0 34px; padding: 0; list-style: none; }
@media (min-width: 760px) { .rubrics { grid-template-columns: repeat(4, 1fr); } }
.rubric { position: relative; display: block; border-radius: 14px; overflow: hidden; color: #f3efe6; text-decoration: none; background: var(--bg2); }
.rubric img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 72% 40%; transition: transform .3s; }
.rubric:hover img { transform: scale(1.04); }
.rubric span { position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px; font: 700 .95rem/1.25 var(--ui); background: linear-gradient(0deg, rgba(11, 14, 32, .92) 0, rgba(11, 14, 32, 0) 100%); }
.rubric small { display: block; font-weight: 600; color: var(--gold); font-size: .78rem; }
.page-cover { margin: 0 auto 26px; }
.page-cover img { border-radius: var(--radius); width: 100%; }
@media (max-width: 699px) { .page-cover { padding: 0; } .page-cover img { border-radius: 0; } }
.defbox--icon { position: relative; padding-right: 128px; }
.defbox__icon { position: absolute; right: 18px; top: 18px; }
.defbox__icon img { width: 96px; height: 96px; border-radius: 20px; }
@media (max-width: 520px) { .defbox--icon { padding-right: 18px; } .defbox__icon { position: static; margin-bottom: 10px; } .defbox__icon img { width: 72px; height: 72px; } }
.tool-icon img { width: 88px; height: 88px; border-radius: 20px; margin-bottom: 14px; }
@media (max-width: 599px) { .sign-box { gap: 12px; } .sign-box__icon { width: 72px; height: 72px; border-radius: 16px; } }

/* Карточка группы ВК (вместо стороннего виджета — грузится всегда и быстро) */
.vk-card { display: block; border-radius: 16px; overflow: hidden; background: #141432; border: 1px solid var(--line); text-decoration: none; color: #f3efe6; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .2s ease, box-shadow .2s ease; }
.vk-card:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0,0,0,.45); }
.vk-card__cover img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; }
.vk-card__body { position: relative; display: grid; gap: 4px; padding: 40px 20px 20px; }
.vk-card__ava { position: absolute; top: -32px; left: 20px; width: 64px; height: 64px; border-radius: 50%; border: 3px solid #141432; }
.vk-card__name { font: 700 1.05rem/1.3 var(--ui); }
.vk-card__meta { color: #b9b2c9; font: 500 .85rem/1.4 var(--ui); }
.vk-card__btn { margin-top: 12px; display: block; text-align: center; padding: 11px 16px; border-radius: 10px; background: #0077FF; color: #fff; font: 600 .95rem/1.2 var(--ui); }
.vk-card:hover .vk-card__btn { background: #1a85ff; }

/* Дневник в ВК — блок над дневником в браузере */
.vkdiary { margin-top: 8px; margin-bottom: 28px; }
.vkdiary__box { border-radius: 18px; padding: 24px; background: linear-gradient(135deg, rgba(0,119,255,.16), rgba(75,46,131,.35)); border: 1px solid rgba(0,119,255,.35); }
.vkdiary__box h2 { margin: 10px 0 8px; }
.vkdiary__list { margin: 12px 0 18px; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.vkdiary__note { margin: 14px 0 0; color: var(--muted); font-size: .95rem; }
