/* math.by.alina
   Бренд з Instagram: пудрово-рожеве поле, кремовий, глибокий темно-синій текст, червоний акцент.
   Кольори редагуються в панелі (views/partials/head.ejs перевизначає --cream, --pink, --ink, --red, --blue).
   Форми: кнопки й чіпи — повна «пігулка»; панелі, обкладинки, поля — 22px; поля вводу — 14px. */
:root {
  --cream: #FBF6F1;
  --pink: #F2DDD5;
  --pink-deep: #E8C8BC;
  --ink: #1E2A47;
  --red: #E63B3B;
  --red-btn: #D63232;
  --blue: #3D74D6;
  --blue-text: #2F62C0;
  --muted: #5B6274;
  --surface: #FFFCFA;
  --radius: 22px;

  /* сумісність зі сторінками панелі керування */
  --navy: var(--ink); --graphite: var(--ink); --white: var(--surface); --beige: #F6ECE6; --sand: var(--pink-deep);
  --line: #EADBD3; --rose: var(--pink); --rose-soft: var(--pink); --sky: #E4ECFA; --terracotta: var(--red-btn);
  --shadow: 0 18px 40px rgba(30, 42, 71, .14);

  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Segoe Print', cursive;
  --t-display: clamp(40px, 4.9vw, 76px);
  --t-h2: clamp(30px, 3.4vw, 50px);
  --t-lead: clamp(19px, 1.5vw, 21px);
  --t-body: 17px;
  --t-small: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 var(--t-body)/1.6 var(--sans); overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: var(--blue-text); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.08; margin: 0 0 .45em; font-weight: 800; letter-spacing: -.015em; }
h1 { font-size: var(--t-display); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-lead); line-height: 1.25; font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.muted, .note { color: var(--muted); }
.note { font-size: var(--t-small); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.hand { font-family: var(--hand); font-weight: 600; color: var(--red-btn); font-size: 34px; line-height: 1; letter-spacing: 0; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border-radius: 999px; border: 0; background: var(--ink); color: var(--cream); font: 600 var(--t-body)/1.15 var(--sans); text-decoration: none; cursor: pointer; min-height: 52px; white-space: nowrap; transition: transform .35s var(--ease), background-color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.warm, .btn.red { background: var(--red-btn); color: #FFFCFA; }
.btn.warm:hover, .btn.red:hover { background: #C42B2B; }
.btn.alt { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.alt:hover { background: var(--ink); color: var(--cream); }
.btn.small { padding: 10px 18px; min-height: 42px; font-size: var(--t-small); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.quiet { font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--red); padding: 14px 4px; }
.quiet:hover { color: var(--red-btn); }

/* Шапка */
.top { position: sticky; top: 0; z-index: 20; background: var(--cream); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { font: 800 22px/1 var(--serif); color: var(--ink); text-decoration: none; white-space: nowrap; letter-spacing: -.01em; }
.logo span { color: var(--red); }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; padding: 9px 14px; border-radius: 999px; font-weight: 500; font-size: 16px; transition: background-color .2s; }
.nav a:hover, .nav a.on { background: var(--pink); }
.cart-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--cream); text-decoration: none; font-weight: 600; font-size: 16px; }
.cart-count { background: var(--pink); color: var(--ink); border-radius: 999px; min-width: 24px; height: 24px; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; padding: 0 7px; }
.burger { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink); font: 600 16px var(--sans); }
.admin-bar { background: var(--ink); color: var(--cream); font-size: 14px; }
.admin-bar .wrap { display: flex; gap: 16px; align-items: center; min-height: 36px; flex-wrap: wrap; }
.admin-bar a { color: var(--cream); }
.testbar { background: #FFF1C2; color: #5A4300; font-size: 14px; text-align: center; padding: 7px 16px; }

/* Перший екран */
.hero { background: var(--pink); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: end; gap: 24px; min-height: min(720px, calc(100dvh - 68px)); }
.hero-text { align-self: center; padding: 56px 0 64px; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(42px, 4.6vw, 72px); line-height: 1.04; margin-bottom: 22px; width: 125%; max-width: 21ch; padding-bottom: 4px; }
.hero h1 em { font-style: italic; color: var(--red-btn); }
.hero .lead { font-size: var(--t-lead); max-width: 34ch; margin-bottom: 30px; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.hero-photo { position: relative; align-self: end; justify-self: center; width: 100%; max-width: 520px; }
.hero-photo img { width: 100%; height: auto; position: relative; z-index: 1; }
.hero-photo::before { content: ''; position: absolute; left: 6%; right: 6%; bottom: 0; aspect-ratio: 1; border-radius: 50%; background: var(--pink-deep); }
.doodle { position: absolute; display: block; color: var(--ink); opacity: .16; pointer-events: none; z-index: 0; }
.doodle svg { display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Секції */
.section { padding-block: 96px; }
.section.tight { padding-block: 64px; }
.section.pink { background: var(--pink); }
.section.ink { background: var(--ink); color: var(--cream); }
.section.ink h2, .section.ink h3 { color: var(--cream); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 40px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; max-width: 18ch; }
.sec-head a { font-weight: 600; white-space: nowrap; color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; }

/* Для кого */
.who { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.who-head { position: sticky; top: 100px; }
.who-head p { font-size: var(--t-lead); color: var(--muted); max-width: 30ch; }
.who-list { display: grid; gap: 14px; }
.who-row { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 28px 30px; border-radius: var(--radius); background: var(--surface); transition: background-color .3s, transform .4s var(--ease); }
.who-row:nth-child(2) { background: var(--pink); }
.who-row:nth-child(4) { background: #F6ECE6; }
.who-row:hover { transform: translateX(6px); }
.who-row h3 { font-size: clamp(24px, 2.2vw, 30px); margin: 0; }
.who-row p { margin: 0; font-size: var(--t-body); }

/* Обкладинки та картки товарів */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 40px 24px; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card .thumb { display: block; aspect-ratio: 4/5; background: var(--pink); border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden; }
.card:nth-child(3n+2) .thumb { background: #F6ECE6; }
.card:nth-child(3n) .thumb { background: #E4ECFA; }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s var(--ease); }
.card:hover .thumb img { transform: translateY(-6px) rotate(-1.2deg); }
.card .noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: var(--t-small); }
.card .body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .meta { font-size: var(--t-small); color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.card h3 { font-size: 20px; margin: 0; line-height: 1.22; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--red-btn); }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 6px; }
.price { font: 700 20px/1 var(--sans); color: var(--ink); }
.price.free { color: #B42525; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #FFF1C2; color: #5A4300; }
.tag.free { background: var(--red-btn); color: #FFFCFA; }
.tag.kit { background: #E4ECFA; color: var(--ink); }

/* Категорії: великий список */
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 22px 0; color: var(--cream); text-decoration: none; font: 800 clamp(30px, 4.6vw, 64px)/1.05 var(--serif); letter-spacing: -.02em; transition: color .25s, transform .45s var(--ease); }
.cat-list li + li a { box-shadow: inset 0 2px 0 rgba(251, 246, 241, .12); }
.cat-list a small { display: block; font: 400 var(--t-small)/1.4 var(--sans); letter-spacing: 0; color: rgba(251, 246, 241, .72); margin-top: 8px; }
.cat-list .go { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(251, 246, 241, .1); font: 400 26px var(--sans); transition: background-color .25s, transform .45s var(--ease); }
.cat-list a:hover { color: var(--pink); transform: translateX(10px); }
.cat-list a:hover .go { background: var(--red-btn); transform: rotate(-45deg); }

/* Про авторку */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.about .photo { position: relative; max-width: 460px; justify-self: center; width: 100%; }
.about .photo::before { content: ''; position: absolute; inset: 14% 0 0; border-radius: 240px 240px var(--radius) var(--radius); background: var(--cream); }
.about .photo img { position: relative; width: 100%; height: auto; }
.about .text p { font-size: var(--t-lead); max-width: 40ch; }
.about .hand { display: block; margin-bottom: 8px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* Як це працює: панелі різної ширини */
.steps { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 14px; }
.step { border-radius: var(--radius); padding: 34px 30px 38px; min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.step:nth-child(1) { background: var(--pink); }
.step:nth-child(2) { background: var(--ink); color: var(--cream); }
.step:nth-child(3) { background: var(--red-btn); color: #FFFCFA; }
.step h3 { font-size: clamp(30px, 3vw, 44px); line-height: 1.02; margin: 0; color: inherit; font-weight: 800; }
.step p { margin: 0; max-width: 30ch; }

/* Заклик */
.cta-band { background: var(--red); color: #FFFCFA; border-radius: calc(var(--radius) * 1.6); padding: 56px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center; }
.cta-band h2 { color: #FFFCFA; margin: 0; max-width: 20ch; }
.cta-band .btn { background: var(--ink); color: var(--cream); }

/* Відгуки (заготовка, прихована) */
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.reviews img { border-radius: var(--radius); width: 100%; height: auto; }

/* Загальні сторінки */
.page-head { padding-block: 56px 28px; }
.page-head h1 { margin: 0; }
.page-head p { font-size: var(--t-lead); color: var(--muted); max-width: 52ch; margin: 14px 0 0; }
.box { background: var(--surface); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 16px; }
.box h2 { font-size: 26px; }
.box ul { padding-left: 20px; margin: 0; }
.box li { margin: 6px 0; }
.text { max-width: 68ch; }
.text h3 { margin-top: 1.3em; }
.empty { text-align: center; padding: 56px 24px; background: var(--surface); border-radius: var(--radius); }
.placeholder { background: #FFF1C2; color: #5A4300; padding: 20px 22px; border-radius: var(--radius); }
.alert { padding: 14px 18px; border-radius: 14px; background: #FBE0DE; color: #7A1D1D; margin-bottom: 14px; }
.success { padding: 14px 18px; border-radius: 14px; background: #E2F1E6; color: #1E4D2B; margin-bottom: 14px; }

/* Каталог */
.catalog { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; align-items: start; padding-bottom: 96px; }
.filters { background: var(--pink); border-radius: var(--radius); padding: 24px 22px; position: sticky; top: 88px; }
.filters h3 { font: 700 15px/1.3 var(--sans); margin: 20px 0 10px; color: var(--ink); }
.filters h3:first-of-type { margin-top: 0; }
.filters select { background-color: var(--cream); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 7px 13px; border-radius: 999px; background: var(--cream); font-size: var(--t-small); cursor: pointer; transition: background-color .2s, color .2s; }
.chip:hover span { background: var(--surface); }
.chip input:checked + span { background: var(--ink); color: var(--cream); }
.chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search { flex: 1; min-width: 220px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 13px 16px; border: 2px solid transparent; border-radius: 14px; background: var(--surface); font: inherit; color: var(--ink); min-height: 52px; transition: border-color .2s;
}
input::placeholder, textarea::placeholder { color: #6B7184; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231E2A47' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-position: calc(100% - 16px) 50%; background-repeat: no-repeat; padding-right: 40px; }
.found { color: var(--muted); font-size: var(--t-small); margin-bottom: 22px; }
.filter-toggle { display: none; }
.filters .close-filters { display: none; position: fixed; left: 16px; right: 16px; bottom: 16px; }
.filters .fhead { display: none; }

/* Сторінка товару */
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; padding: 36px 0 64px; align-items: start; }
.gallery .main { background: var(--pink); border-radius: var(--radius); padding: 28px; display: grid; place-items: center; cursor: zoom-in; }
.gallery .main img { max-height: 640px; width: auto; max-width: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x mandatory; }
.thumbs button { flex: 0 0 auto; width: 84px; height: 106px; padding: 6px; border-radius: 14px; border: 0; background: #F6ECE6; cursor: pointer; scroll-snap-align: start; transition: transform .3s var(--ease); }
.thumbs button:hover { transform: translateY(-3px); }
.thumbs button.on { box-shadow: inset 0 0 0 3px var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.crumbs { font-size: var(--t-small); color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.product h1 { font-size: clamp(32px, 3.6vw, 50px); }
.inside { font-size: var(--t-lead); margin: 0 0 4px; }
.inside b { color: var(--red-btn); font-weight: 700; }
.buybar { display: none; }
.buybox { background: var(--surface); border-radius: var(--radius); padding: 26px; margin: 20px 0; }
.buybox .price { font-size: 34px; font-family: var(--serif); font-weight: 800; }
.buybox .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.digital { display: block; background: var(--pink); border-radius: 14px; padding: 14px 18px; font-size: 15px; margin-top: 16px; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; margin: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }

/* Кошик і замовлення */
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 12px 16px 12px 12px; }
.cart-item img, .cart-item .ph { width: 76px; height: 95px; object-fit: contain; background: var(--pink); border-radius: 12px; padding: 4px; }
.cart-item a { color: var(--ink); font-weight: 700; text-decoration: none; }
.link-btn { background: none; border: 0; color: var(--red-btn); cursor: pointer; font: inherit; font-size: var(--t-small); font-weight: 600; padding: 8px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; padding-bottom: 96px; }
.two .box { background: var(--pink); }
.two .box input[type=email] { background: var(--cream); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-small); margin: 14px 0; }
.check input { margin-top: 3px; width: 19px; height: 19px; accent-color: var(--ink); flex: 0 0 auto; }
.status { border-radius: var(--radius); padding: 26px; margin: 18px 0; background: var(--surface); }
.status.ok { background: #E2F1E6; }
.status.wait { background: #E4ECFA; }
.status.bad { background: #FBE0DE; }
.files { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.files a { display: flex; justify-content: space-between; gap: 12px; padding: 15px 18px; background: var(--surface); border-radius: 14px; text-decoration: none; color: var(--ink); font-weight: 600; transition: background-color .2s; }
.files a:hover { background: var(--pink); }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(30, 42, 71, .2); border-top-color: var(--ink); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Питання */
details.qa { background: var(--surface); border-radius: var(--radius); padding: 4px 24px; margin-bottom: 10px; transition: background-color .25s; }
details.qa[open] { background: var(--pink); }
details.qa summary { cursor: pointer; padding: 20px 0; font: 700 19px/1.35 var(--sans); color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.qa summary::after { content: '+'; font-size: 28px; line-height: .8; color: var(--red-btn); transition: transform .3s var(--ease); }
details.qa[open] summary::after { transform: rotate(45deg); }
details.qa summary::-webkit-details-marker { display: none; }

/* Футер */
.foot { background: var(--ink); color: var(--cream); padding: 80px 0 32px; }
.foot a { color: var(--cream); text-decoration: none; }
.foot a:hover { color: var(--pink); }
.foot .bigname { font: 800 clamp(48px, 11.5vw, 170px)/.9 var(--serif); letter-spacing: -.035em; color: var(--pink); margin: 0 0 48px; display: block; }
.foot .bigname span { color: var(--red); }
.foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot h4 { margin: 0 0 12px; font: 700 15px var(--sans); color: rgba(251, 246, 241, .7); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot .social a { font: 700 22px var(--serif); }
.foot .copy { margin-top: 56px; font-size: 14px; max-width: 70ch; color: rgba(251, 246, 241, .72); }

/* Лайтбокс і тостер */
.lightbox { position: fixed; inset: 0; background: rgba(20, 26, 44, .9); z-index: 100; display: none; place-items: center; padding: 20px; }
.lightbox.on { display: grid; }
.lightbox img { max-height: 92vh; max-width: 100%; border-radius: 10px; background: var(--surface); }
.lightbox button { position: absolute; top: 16px; right: 16px; background: var(--cream); border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 24px; cursor: pointer; color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140px); background: var(--ink); color: var(--cream); padding: 14px 20px; border-radius: 999px; z-index: 50; transition: transform .45s var(--ease); font-size: 15px; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.on { transform: translate(-50%, 0); }
.toast a { color: var(--pink); font-weight: 700; margin-left: 8px; }

/* Поява блоків */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero .rise { opacity: 0; transform: translateY(30px); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .hero .rise { opacity: 1; transform: none; transition: none; animation: none; }
  .btn, .card .thumb img, .who-row, .cat-list a, .cat-list .go, .thumbs button { transition: none; }
  .btn:hover, .who-row:hover, .cat-list a:hover, .card:hover .thumb img { transform: none; }
}

/* Планшет */
@media (max-width: 1024px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .hero-text { padding: 48px 0 8px; }
  .hero h1 { width: 100%; max-width: 21ch; }
  .hero-photo { max-width: 420px; margin-top: 18px; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--cream); flex-direction: column; padding: 8px 24px 18px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; font-size: 17px; }
  .burger { display: block; }
  .who { grid-template-columns: 1fr; gap: 28px; }
  .who-head { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { grid-column: 1 / -1; min-height: 0; }
  .product, .two, .about { grid-template-columns: minmax(0, 1fr); }
  .about .photo { max-width: 360px; }
  .catalog { grid-template-columns: 1fr; }
  .filters { display: none; }
  .filters.open { display: block; position: fixed; inset: 0; z-index: 60; border-radius: 0; overflow-y: auto; padding: 22px 18px 100px; }
  .filters .close-filters, .filter-toggle { display: inline-flex; }
  .filters .close-filters { display: flex; }
  .filters .fhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
  body.no-scroll { overflow: hidden; }
  .foot .cols { grid-template-columns: 1fr 1fr; }
}

/* Телефон */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav { padding: 8px 16px 18px; }
  .top .wrap { gap: 8px; }
  .cart-link .lbl { display: none; }
  .hero-text { padding: 28px 0 8px; }
  .hero h1 { font-size: clamp(36px, 10.4vw, 48px); max-width: none; }
  .hero .lead { font-size: 18px; margin-bottom: 22px; }
  .hero .actions .btn { flex: 1 1 100%; }
  .hero .actions .quiet { margin: 0 auto; }
  .hero-photo { max-width: 340px; margin-top: 18px; }
  .section { padding-block: 64px; }
  .sec-head { margin-bottom: 28px; }
  .who-row { grid-template-columns: 1fr; gap: 8px; padding: 22px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .card .thumb { padding: 10px; }
  .card h3 { font-size: 17px; }
  .card .row { flex-direction: column; align-items: stretch; gap: 10px; }
  .card .row .btn { width: 100%; }
  .price { font-size: 18px; }
  .cat-list a { padding: 18px 0; }
  .cat-list .go { width: 44px; height: 44px; font-size: 20px; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; padding: 26px 22px 28px; gap: 18px; }
  .cta-band { grid-template-columns: 1fr; padding: 36px 24px; }
  .cta-band .btn { width: 100%; }
  .foot { padding-top: 56px; }
  .foot .cols { grid-template-columns: 1fr; }
  .product { padding-top: 20px; gap: 28px; }
  .gallery .main { padding: 16px; }
  .gallery .main img { max-height: 64vh; }
  .buybox .actions .btn { width: 100%; }
  .box { padding: 22px 20px; }
  .page-head { padding-block: 36px 20px; }
}
@media (max-width: 360px) { .grid { grid-template-columns: 1fr; } }

@media (max-width: 760px) { .doodle { display: none; } .doodle:first-of-type { display: block; left: auto !important; right: 4%; top: 4% !important; transform: scale(.7); } }

@media (max-width: 760px) {
  .buybar { display: flex; align-items: center; justify-content: space-between; gap: 14px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--cream); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(30, 42, 71, .12); }
  .buybar .btn { flex: 1; }
  body:has(.buybar) .foot { padding-bottom: 110px; }
}

/* ===================================================================
   ТЕМНА «КОСМІЧНА» ТЕМА САЙТУ (body.site). Панель керування лишається світлою.
   Кольори предметів: --c-math, --c-algebra, --c-geometry, --c-physics, --c-teachers.
   =================================================================== */
body.site {
  --cream: #0A0F24;        /* фон сторінки */
  --surface: #131B3D;      /* картки, поля */
  --pink: #1A2552;         /* панелі */
  --pink-deep: #24306A;
  --ink: #F5EFF2;          /* текст */
  --muted: #AEB5CF;
  --red: #FF5A5F; --red-btn: #FF5A5F;   /* головна дія */
  --rose: #FF9EC4; --blue: #5B9BFF; --blue-text: #8DB8FF; --yellow: #FFD447; --mint: #3DDC97; --orange: #FF9F43;
  --c-math: #FF9EC4; --c-algebra: #FF9F43; --c-geometry: #FFD447; --c-physics: #5B9BFF; --c-teachers: #3DDC97;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  background: var(--cream);
  color: var(--ink);
}
body.site .s-math { --c: var(--c-math); } body.site .s-algebra { --c: var(--c-algebra); } body.site .s-geometry { --c: var(--c-geometry); }
body.site .s-physics { --c: var(--c-physics); } body.site .s-teachers { --c: var(--c-teachers); } body.site .s-free { --c: var(--red); }

body.site .btn.red, body.site .btn.warm { color: #0A0F24; }
body.site .btn.red:hover, body.site .btn.warm:hover { background: #FF7A7E; box-shadow: 0 10px 30px -6px rgba(255, 90, 95, .65); }
body.site .quiet { color: var(--ink); }
body.site .quiet:hover { color: var(--rose); }
body.site .logo span, body.site .foot .bigname span { color: var(--red); }
body.site .section.ink { background: #060A1A; color: var(--ink); }
body.site .section.ink h2 { color: var(--ink); }
body.site .who-row:nth-child(4), body.site .card:nth-child(3n+2) .thumb, body.site .thumbs button { background: #18214A; }
body.site .card:nth-child(3n) .thumb { background: #152048; }
body.site .who-row h3 { color: var(--c, var(--ink)); }
body.site .who-row:nth-child(1) { --c: var(--c-physics); } body.site .who-row:nth-child(2) { --c: var(--c-teachers); }
body.site .who-row:nth-child(3) { --c: var(--c-math); } body.site .who-row:nth-child(4) { --c: var(--c-geometry); }
body.site .price.free { color: var(--red); }
body.site .tag.kit { background: #24306A; color: var(--ink); }
body.site .subj { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--c); }
body.site .subj::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); transform: rotate(45deg); }
body.site .card .thumb { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); transition: box-shadow .3s; }
body.site .card:hover .thumb { box-shadow: inset 0 0 0 2px var(--c, var(--blue)); }
body.site input::placeholder, body.site textarea::placeholder { color: #8C93AD; }
body.site select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23F5EFF2' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
body.site .status.ok, body.site .success { background: #10392C; color: #CFF5E2; }
body.site .status.wait { background: #14284F; }
body.site .status.bad, body.site .alert { background: #44161D; color: #FFD9DB; }
body.site .toast { background: var(--ink); color: #0A0F24; }
body.site .toast a { color: #C0262C; }
body.site .step:nth-child(1) { background: var(--pink); }
body.site .step:nth-child(2) { background: var(--blue); color: #0A0F24; }
body.site .step:nth-child(3) { background: var(--yellow); color: #0A0F24; }
body.site .cta-band { background: var(--red); color: #0A0F24; }
body.site .cta-band h2 { color: #0A0F24; }
body.site .cta-band .btn { background: #0A0F24; color: var(--ink); }
body.site .foot { background: #060A1A; color: var(--ink); }
body.site .foot a { color: var(--ink); }
body.site .foot a:hover { color: var(--rose); }
body.site .foot .bigname { color: var(--rose); }
body.site .foot h4, body.site .foot .copy { color: var(--muted); }
body.site .hand { color: var(--rose); }
body.site .inside b { color: var(--yellow); }

/* Перший екран: космос */
body.site .hero { background: radial-gradient(1200px 600px at 75% 30%, #1B2B6B 0%, transparent 60%), radial-gradient(900px 500px at 10% 90%, #3A1A4A 0%, transparent 60%), #0A0F24; isolation: isolate; }
body.site .hero h1 { color: var(--ink); }
body.site .hero h1 em { color: var(--rose); }
body.site .hero .lead { color: #D5D9EA; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.hero .wrap { position: relative; z-index: 1; }
.hero-photo .orbits { position: absolute; left: 50%; top: 46%; width: 128%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 0; pointer-events: none; overflow: visible; }
.orbits ellipse { fill: none; stroke-width: 1.6; opacity: .6; }
.orbits .spin { transform-origin: 200px 200px; animation: spin 30s linear infinite; }
body.site .hero-photo::before { background: radial-gradient(circle at 50% 55%, rgba(255, 158, 196, .55) 0%, rgba(91, 155, 255, .25) 45%, transparent 70%); left: -6%; right: -6%; }
.hero-photo img { filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .45)); }

/* Категорії: живі плитки */
.lab { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; perspective: 1200px; }
.tile { grid-column: span 2; position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-height: 340px; padding: 24px; border-radius: 26px; background: #121A3B; color: var(--ink); text-decoration: none; overflow: hidden; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease), box-shadow .4s; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.tile::after { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 80%; background: radial-gradient(closest-side, var(--c), transparent); opacity: .18; transition: opacity .4s; pointer-events: none; }
.tile:hover { box-shadow: inset 0 0 0 2px var(--c), 0 24px 60px -20px var(--c); }
.tile:hover::after { opacity: .32; }
.tile.small { min-height: 0; flex-direction: row; align-items: center; padding: 18px 22px; }
.tile.small svg { width: 120px; flex: 0 0 auto; }
.tile.small .t-text { flex: 1; min-width: 0; }
.tile.small .t-name { font-size: clamp(22px, 1.9vw, 28px); }
.tile.small .go { display: none; }
body.site .hero h1, body.site .hero .lead, body.site .hero .actions { text-shadow: 0 2px 18px rgba(10, 15, 36, .9); }
.hero-photo img { -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); }
.tile svg { width: 100%; height: auto; max-height: 210px; overflow: visible; }
.tile .t-name { font: 800 clamp(26px, 2.6vw, 38px)/1.05 var(--serif); color: var(--c); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tile .go { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #0A0F24; font: 600 22px var(--sans); transition: transform .45s var(--ease); }
.tile:hover .go { transform: rotate(-45deg); }
.tile .t-sub { color: var(--muted); font-size: var(--t-small); margin-top: 6px; }
.lab svg .stroke { fill: none; stroke: var(--c); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lab svg .soft { fill: none; stroke: rgba(245, 239, 242, .25); stroke-width: 1.5; }
.lab svg .fillc { fill: var(--c); }
.lab svg text { fill: var(--ink); font-family: var(--serif); font-style: italic; font-weight: 700; }
.draw { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); animation: draw 4.5s var(--ease) infinite; }
.draw.d2 { animation-delay: .5s; } .draw.d3 { animation-delay: 1s; }
@keyframes draw { 0% { stroke-dashoffset: var(--len, 400); } 45%, 75% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: calc(var(--len, 400) * -1); } }
.pendulum { transform-origin: 70px 14px; animation: swing 2.2s ease-in-out infinite alternate; }
@keyframes swing { from { transform: rotate(-26deg); } to { transform: rotate(26deg); } }
.spin-slow { transform-box: fill-box; transform-origin: center; animation: spin 9s linear infinite; }
.pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-in-out infinite; }
.pulse.p2 { animation-delay: .6s; } .pulse.p3 { animation-delay: 1.2s; } .pulse.p4 { animation-delay: 1.8s; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
.tile:hover .pendulum { animation-duration: 1.1s; }
.tile:hover .draw { animation-duration: 2.6s; }

@media (max-width: 1024px) {
  .lab { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { grid-column: span 1; min-height: 300px; }
  .tile.small { grid-column: span 2; }
}
@media (max-width: 760px) {
  .lab { grid-template-columns: 1fr; gap: 12px; }
  .tile, .tile.small { grid-column: auto; min-height: 0; }
  .tile svg { max-height: 170px; }
  .tile.small svg { width: 84px; }
  .hero-photo .orbits { width: 118%; }
}
@media (prefers-reduced-motion: reduce) {
  .draw { animation: none; stroke-dashoffset: 0; }
  .pendulum, .spin-slow, .pulse, .orbits .spin { animation: none; }
  .tile { transform: none; transition: none; }
}

/* ===================================================================
   ФОН ЯК В INSTAGRAM: пудрово-рожевий і кремовий, темно-синій текст.
   Те, на що натискають (плитки предметів, обкладинки, кнопки, футер), лишається темним.
   =================================================================== */
body.site {
  --cream: #F2DDD5;        /* фон сторінки (рожевий) */
  --pink: #FBF6F1;         /* панелі (кремові) */
  --surface: #FBF6F1;
  --pink-deep: #E8C8BC;
  --ink: #1E2A47;          /* текст */
  --muted: #5B6274;
  --dark: #121A3B;         /* темні клікабельні елементи */
  --on-dark: #F5EFF2;
  /* темніші відтінки кольорів предметів для тексту на світлому фоні */
  --t-math: #B0245F; --t-algebra: #B35400; --t-geometry: #8A6400; --t-physics: #2559B8; --t-teachers: #0F7A55;
}
body.site .s-math { --ct: var(--t-math); } body.site .s-algebra { --ct: var(--t-algebra); } body.site .s-geometry { --ct: var(--t-geometry); }
body.site .s-physics { --ct: var(--t-physics); } body.site .s-teachers { --ct: var(--t-teachers); } body.site .s-free { --ct: #B42525; }

/* світлі секції */
body.site .section.pink { background: var(--pink); }
body.site .section.ink { background: var(--pink); color: var(--ink); }
body.site .section.ink h2 { color: var(--ink); }
body.site .who-row, body.site .who-row:nth-child(4) { background: var(--pink); }
body.site .who-row:nth-child(2) { background: #FFFCFA; }
body.site .who-row h3 { color: var(--ct, var(--ink)); }
body.site .who-row:nth-child(1) { --ct: var(--t-physics); } body.site .who-row:nth-child(2) { --ct: var(--t-teachers); }
body.site .who-row:nth-child(3) { --ct: var(--t-math); } body.site .who-row:nth-child(4) { --ct: var(--t-geometry); }
body.site .subj { color: var(--ct, var(--ink)); }
body.site .subj::before { background: var(--c); }
body.site .price.free { color: #B42525; }
body.site .tag.kit { background: #E4ECFA; color: var(--ink); }
body.site .hand { color: #D63232; }
body.site .inside b { color: #D63232; }
body.site .quiet:hover { color: #D63232; }
body.site .digital { background: var(--cream); }
body.site input::placeholder, body.site textarea::placeholder { color: #6B7184; }
body.site select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231E2A47' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
body.site .status.ok, body.site .success { background: #E2F1E6; color: #1E4D2B; }
body.site .status.wait { background: #E4ECFA; }
body.site .status.bad, body.site .alert { background: #FBE0DE; color: #7A1D1D; }
body.site .toast { background: var(--dark); color: var(--on-dark); }
body.site .toast a { color: #FF9EC4; }
body.site .step:nth-child(1) { background: var(--pink); }

/* темне те, на що натискають */
body.site .btn { background: var(--dark); color: var(--on-dark); }
body.site .btn.alt { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
body.site .btn.alt:hover { background: var(--dark); color: var(--on-dark); }
body.site .btn.red, body.site .btn.warm { background: var(--red); color: #0A0F24; }
body.site .cart-link { background: var(--dark); color: var(--on-dark); }
body.site .cart-count { background: #FF9EC4; color: #0A0F24; }
body.site .card .thumb, body.site .card:nth-child(3n+2) .thumb, body.site .card:nth-child(3n) .thumb { background: var(--dark); }
body.site .thumbs button { background: var(--dark); }
body.site .gallery .main { background: var(--dark); }
body.site .cart-item img, body.site .cart-item .ph { background: var(--dark); }
body.site .chip input:checked + span { background: var(--dark); color: var(--on-dark); }
body.site .tile { background: var(--dark); color: var(--on-dark); }
body.site .tile .t-sub { color: #AEB5CF; }
body.site .lab svg text { fill: var(--on-dark); }
body.site .lab svg .soft { stroke: rgba(245, 239, 242, .28); }
body.site .foot { background: var(--dark); color: var(--on-dark); }
body.site .foot a { color: var(--on-dark); }
body.site .foot h4, body.site .foot .copy { color: #AEB5CF; }
body.site .admin-bar { background: var(--dark); }

/* перший екран на рожевому: анімації темні */
body.site .hero { background: var(--cream); }
body.site .hero h1 { color: var(--ink); }
body.site .hero h1 em { color: #D63232; }
body.site .hero .lead { color: var(--ink); }
body.site .hero h1, body.site .hero .lead, body.site .hero .actions { text-shadow: 0 0 22px rgba(242, 221, 213, .95); }
body.site .hero-photo::before { background: radial-gradient(circle at 50% 55%, #FBF6F1 0%, rgba(251, 246, 241, .6) 40%, transparent 70%); }
body.site .hero-photo img { filter: drop-shadow(0 18px 30px rgba(30, 42, 71, .18)); }
body.site .cta-band .btn { background: var(--dark); color: var(--on-dark); }

/* ===================================================================
   ГАРМОНІЯ: одна гама з Instagram.
   Рожевий + кремовий фон, фірмовий темно-синій для темних блоків, червоний для кнопок.
   Кольори предметів м'які й однакові за яскравістю.
   =================================================================== */
body.site {
  --dark: #1E2A47;
  --on-dark: #FBF6F1;
  --red: #D63232; --red-btn: #D63232;
  --t-math: #A3204F; --t-algebra: #9A4A00; --t-geometry: #7A5A00; --t-physics: #2559B8; --t-teachers: #0F6E4D;
}
body.site .btn.red, body.site .btn.warm { background: var(--red); color: #FFFCFA; }
body.site .btn.red:hover, body.site .btn.warm:hover { background: #BE2626; box-shadow: 0 10px 26px -8px rgba(214, 50, 50, .55); }
body.site .cart-count { background: var(--cream); color: var(--ink); }
body.site .toast a { color: var(--cream); }

/* кроки й заклик у фірмових кольорах */
body.site .step:nth-child(1) { background: var(--pink); color: var(--ink); }
body.site .step:nth-child(2) { background: var(--dark); color: var(--on-dark); }
body.site .step:nth-child(3) { background: var(--red); color: #FFFCFA; }
body.site .cta-band { background: var(--dark); color: var(--on-dark); }
body.site .cta-band h2 { color: var(--on-dark); }
body.site .cta-band .btn { background: var(--red); color: #FFFCFA; }

/* плитки й обкладинки: темно-синій, м'яке світіння кольором предмета */
body.site .tile::after { opacity: .14; }
body.site .tile:hover::after { opacity: .24; }
body.site .tile:hover { box-shadow: inset 0 0 0 2px var(--c), 0 20px 50px -24px rgba(30, 42, 71, .6); }
body.site .tile .t-sub { color: rgba(251, 246, 241, .72); }
body.site .tile .go { color: var(--dark); }
body.site .foot .bigname { color: var(--cream); }
body.site .foot .bigname span { color: var(--red); }

/* перший екран: без білої плями за фото */
body.site .hero-photo::before { background: var(--pink-deep); left: 8%; right: 8%; opacity: .7; }
body.site .hero h1, body.site .hero .lead, body.site .hero .actions { text-shadow: 0 0 18px rgba(242, 221, 213, .9); }
.orbits ellipse { opacity: .45; }

/* плашка тестового режиму в тій же гамі */
body.site .testbar { background: var(--pink-deep); color: var(--ink); }
body.site .tag { background: var(--pink-deep); color: var(--ink); }

/* ===================================================================
   ПАСТЕЛЬ: світлі блоки замість темно-синіх.
   Кожен предмет має свій ніжний фон (--bg-*), лінії анімацій темно-сині, акцент предмета — насичений тон (--t-*).
   Темні лише кнопки й текст.
   =================================================================== */
body.site {
  --bg-math: #F9D3DE; --bg-algebra: #FCDDC2; --bg-geometry: #F8EBB8; --bg-physics: #D4E2FA; --bg-teachers: #CFEEDF; --bg-free: #FBD3CF;
}
body.site .s-math { --bg: var(--bg-math); } body.site .s-algebra { --bg: var(--bg-algebra); } body.site .s-geometry { --bg: var(--bg-geometry); }
body.site .s-physics { --bg: var(--bg-physics); } body.site .s-teachers { --bg: var(--bg-teachers); } body.site .s-free { --bg: var(--bg-free); }

/* плитки предметів */
body.site .tile { background: var(--bg); color: var(--ink); box-shadow: none; }
body.site .tile::after { display: none; }
body.site .tile:hover { box-shadow: inset 0 0 0 2px var(--ct); }
body.site .tile .t-name { color: var(--ink); }
body.site .tile .t-sub { color: rgba(30, 42, 71, .72); }
body.site .tile .go { background: var(--ink); color: var(--cream); }
body.site .lab svg .stroke { stroke: var(--ct); }
body.site .lab svg .fillc { fill: var(--ct); }
body.site .lab svg .soft { stroke: rgba(30, 42, 71, .3); }
body.site .lab svg text { fill: var(--ink); }
body.site .lab svg circle[fill="#F5EFF2"] { fill: var(--ink); }

/* обкладинки товарів: світлий фон предмета */
body.site .card .thumb, body.site .card:nth-child(3n+2) .thumb, body.site .card:nth-child(3n) .thumb { background: var(--bg, var(--pink)); }
body.site .card:hover .thumb { box-shadow: inset 0 0 0 2px var(--ct, var(--ink)); }
body.site .product .gallery .main, body.site .product .thumbs button { background: var(--bg, var(--pink)); }
body.site .cart-item img, body.site .cart-item .ph { background: var(--pink); }

/* кроки й заклик: світлі */
body.site .step:nth-child(1) { background: var(--bg-physics); color: var(--ink); }
body.site .step:nth-child(2) { background: var(--bg-algebra); color: var(--ink); }
body.site .step:nth-child(3) { background: var(--bg-teachers); color: var(--ink); }
body.site .cta-band { background: var(--bg-math); color: var(--ink); }
body.site .cta-band h2 { color: var(--ink); }
body.site .cta-band .btn { background: var(--red); color: #FFFCFA; }

/* футер у тон фону */
body.site .foot { background: var(--pink-deep); color: var(--ink); }
body.site .foot a { color: var(--ink); }
body.site .foot a:hover { color: var(--red); }
body.site .foot .bigname { color: var(--ink); }
body.site .foot h4, body.site .foot .copy { color: var(--muted); }

/* перший екран */
body.site .hero-photo::before { background: var(--bg-math); opacity: .9; }

/* ===================================================================
   СПОКІЙНА ПАЛІТРА (остаточна).
   Теплий нейтральний фон, один темно-синій для тексту й кнопок, приглушений кораловий акцент.
   Кольори предметів підібрані в OKLCH з однаковою світлістю: насичений тон (--c-*) і світлий відтінок (--bg-*).
   Тони предметів і фон змінюються в панелі; відтінки рахуються автоматично.
   =================================================================== */
body.site {
  --cream: #F8F5F1; --pink: #FFFDFB; --surface: #FFFDFB; --pink-deep: #EEE6E0;
  --ink: #1E2A47; --muted: #555E6F; --dark: #1E2A47; --on-dark: #FFFDFB;
  --red: #C44037; --red-btn: #C44037; --hero-bg: #F9E9E4;
  --c-math: #9A3E67; --c-algebra: #994A00; --c-geometry: #7B6000; --c-physics: #1666AA; --c-teachers: #007950;
  --t-math: var(--c-math); --t-algebra: var(--c-algebra); --t-geometry: var(--c-geometry); --t-physics: var(--c-physics); --t-teachers: var(--c-teachers);
  --bg-math: #FFE2EC; --bg-algebra: #FFE6D6; --bg-geometry: #F2EBD1; --bg-physics: #DAEEFF; --bg-teachers: #D7F3E5; --bg-free: #FFE3DF;
}
@supports (color: color-mix(in oklch, red 10%, white)) {
  body.site {
    --bg-math: color-mix(in oklch, var(--c-math) 14%, #FFFDFB); --bg-algebra: color-mix(in oklch, var(--c-algebra) 14%, #FFFDFB);
    --bg-geometry: color-mix(in oklch, var(--c-geometry) 14%, #FFFDFB); --bg-physics: color-mix(in oklch, var(--c-physics) 14%, #FFFDFB);
    --bg-teachers: color-mix(in oklch, var(--c-teachers) 14%, #FFFDFB); --bg-free: color-mix(in oklch, var(--red) 14%, #FFFDFB);
  }
}
body.site .s-free { --c: var(--red); --ct: var(--red); }

/* кнопки: один темно-синій */
body.site .btn, body.site .btn.red, body.site .btn.warm { background: var(--dark); color: var(--on-dark); }
body.site .btn.red:hover, body.site .btn.warm:hover, body.site .btn:hover { background: #2B3A5F; box-shadow: none; }
body.site .btn.alt { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
body.site .btn.alt:hover { background: var(--dark); color: var(--on-dark); }
body.site .cart-link { background: var(--dark); color: var(--on-dark); }
body.site .cart-count { background: var(--bg-math); color: var(--ink); }
body.site .quiet { text-decoration-color: var(--red); }

/* поверхні */
body.site .section.pink { background: var(--surface); }
body.site .who-row, body.site .who-row:nth-child(4) { background: var(--surface); }
body.site .who-row:nth-child(2), body.site .who-row:nth-child(3) { background: var(--surface); }
body.site .filters { background: var(--surface); }
body.site .chip span { background: var(--cream); }
body.site .box, body.site .buybox, body.site details.qa, body.site .cart-item, body.site .empty, body.site .files a { background: var(--surface); }
body.site .two .box { background: var(--surface); }
body.site .two .box input[type=email] { background: var(--cream); }
body.site details.qa[open] { background: var(--surface); box-shadow: inset 0 0 0 2px var(--pink-deep); }
body.site .digital { background: var(--bg-physics); }
body.site .testbar, body.site .tag { background: var(--pink-deep); color: var(--ink); }
body.site .hand, body.site .inside b, body.site .hero h1 em { color: var(--red); }
body.site .price.free { color: var(--red); }

/* перший екран: ніжний рожевий відтінок з Instagram */
body.site .hero { background: var(--hero-bg); }
body.site .hero-photo::before { background: #FFFDFB; opacity: .55; }
body.site .hero h1, body.site .hero .lead, body.site .hero .actions { text-shadow: 0 0 18px rgba(249, 233, 228, .9); }

/* плитки предметів і обкладинки: світлий відтінок предмета */
body.site .tile { background: var(--bg); }
body.site .card .thumb, body.site .card:nth-child(3n+2) .thumb, body.site .card:nth-child(3n) .thumb { background: var(--bg, var(--surface)); }

/* кроки, заклик, футер */
body.site .step:nth-child(1) { background: var(--bg-physics); }
body.site .step:nth-child(2) { background: var(--bg-algebra); }
body.site .step:nth-child(3) { background: var(--bg-teachers); }
body.site .cta-band { background: var(--hero-bg); }
body.site .cta-band .btn { background: var(--dark); color: var(--on-dark); }
body.site .foot { background: var(--pink-deep); }
body.site .foot .bigname span, body.site .logo span { color: var(--red); }
body.site .hero .actions { text-shadow: none; }

/* Юридична інформація */
.legal-list { display: grid; gap: 12px; margin-top: 24px; }
.legal-item { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .2s, transform .3s var(--ease); }
.legal-item:hover { box-shadow: inset 0 0 0 2px var(--ink); transform: translateY(-2px); }
.legal-item b { font: 700 20px/1.3 var(--serif); }
.legal-item span { color: var(--muted); font-size: 15px; }

/* Кнопки завантаження безкоштовних файлів */
.dl-list { gap: 10px; }
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: var(--cream); }
.dl-name { display: flex; flex-direction: column; gap: 2px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.dl-name small { color: var(--muted); font-weight: 400; font-size: 14px; }
.dl-btn { flex: 0 0 auto; }
@media (max-width: 760px) { .dl-row .dl-btn { width: 100%; } }
body.site .files a.dl-btn { display: inline-flex; justify-content: center; background: var(--dark); color: var(--on-dark); padding: 12px 20px; border-radius: 999px; font-weight: 600; box-shadow: none; }
body.site .files a.dl-btn:hover { background: #2B3A5F; }
