/* BaoSpeak — стиль сайта. Цвета и шрифт — из remotion/src/theme.ts (единый стиль с видеоуроками).
   «Кафе в Сайгоне утром»: тёплый крем, коралловый бренд, бирюза, солнечно-жёлтый акцент. Mobile-first. */

:root {
  --bg: #FFF4E6;
  --bg-deep: #FFE7CC;
  --ink: #1F1B33;
  --ink-soft: #5B5670;
  --ink-mute: #8E89A3;
  --card: #FFFFFF;
  --coral: #FF5A3C;
  --coral-dark: #E8432A;
  --coral-soft: #FFE1D9;
  --teal: #0FA394;
  --teal-soft: #D5F3EF;
  --sun: #FFC83D;
  --sun-soft: #FFF1C7;
  --green: #22A45D;
  --green-soft: #DDF5E7;
  --red: #E5484D;
  --red-soft: #FDE2E3;
  --violet: #6B5CE7;
  --violet-soft: #E8E5FF;
  --shadow: 0 10px 30px rgba(60, 35, 10, 0.10);
  --shadow-lg: 0 18px 50px rgba(60, 35, 10, 0.14);
  --r: 22px;
  --r-lg: 30px;
  --font: "Be Vietnam Pro", "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; display: block; }
a { color: var(--coral-dark); text-underline-offset: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -0.01em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.pad-y { padding-top: 32px; padding-bottom: 48px; }
.muted { color: var(--ink-soft); }
.small { font-size: 15px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; }
.en { font-style: italic; }

.h1 { font-size: clamp(36px, 9vw, 64px); font-weight: 800; line-height: 1.08; }
.h2 { font-size: clamp(28px, 6.4vw, 42px); font-weight: 800; }
.h3 { font-size: clamp(22px, 5vw, 28px); font-weight: 700; margin-top: 1.4em; }
.h4 { font-size: 20px; font-weight: 700; }
.lead { font-size: clamp(18px, 4.6vw, 21px); color: var(--ink-soft); }
.eyebrow { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); margin-bottom: .6em; }
.hl { white-space: nowrap; color: var(--coral); background: linear-gradient(transparent 62%, var(--sun-soft) 62%); }

/* ---------- Кнопки: крупные, удобно нажимать пальцем ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px;
  border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 17px; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  background: var(--card); color: var(--ink);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 8px 22px rgba(255, 90, 60, .32); }
.btn-primary:hover { background: var(--coral-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #35304f; }
.btn-ghost { background: transparent; border-color: rgba(31, 27, 51, .18); color: var(--ink); }
.btn-ghost:hover { background: rgba(255, 255, 255, .7); }
.btn-done { background: var(--green-soft); color: var(--green); border-color: transparent; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--coral-dark); text-decoration: underline; font-weight: 600; }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: 15px; }
.btn-lg { min-height: 56px; padding: 12px 26px; font-size: 18px; }
.btn-xl { min-height: 64px; padding: 14px 30px; font-size: 20px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ---------- Шапка ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 244, 230, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(31, 27, 51, .06); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.logo-mark { width: 36px; height: 36px; flex: none; }
.topnav { display: flex; align-items: center; gap: 12px; }
.navlink { font-weight: 600; color: var(--ink-soft); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { padding: 28px 0 48px; overflow: hidden; }
.hero-in { display: grid; gap: 32px; align-items: center; }
.cta-row { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 12px; }
.hero-media { position: relative; padding: 18px 8px 26px; }
.bubble { position: absolute; padding: 10px 18px; border-radius: 22px; font-weight: 700; font-size: 16px; box-shadow: var(--shadow); white-space: nowrap; }
.bubble-a { top: 0; left: 0; background: var(--card); border-bottom-left-radius: 6px; }
.bubble-b { bottom: 0; right: 0; background: var(--teal); color: #fff; border-bottom-right-radius: 6px; }

/* ---------- Заглушки (PLACEHOLDER) ---------- */
.ph {
  display: grid; place-items: center; text-align: center; padding: 20px;
  border: 3px dashed rgba(255, 90, 60, .45); border-radius: var(--r-lg);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .55) 0 14px, rgba(255, 231, 204, .55) 14px 28px);
  color: var(--ink-soft); font-weight: 600; font-size: 16px;
}
.ph span { background: rgba(255, 255, 255, .85); padding: 6px 14px; border-radius: 999px; }
.ph-video { aspect-ratio: 16 / 9; width: 100%; }
.ph-photo { aspect-ratio: 4 / 5; width: 100%; max-width: 240px; margin: 0 auto; }
@media (min-width: 980px) { .ph-photo { max-width: 340px; } }
.ph-review { min-height: 160px; }
.ph-text { border: 2px dashed rgba(255, 90, 60, .45); border-radius: 14px; padding: 10px 14px; color: var(--ink-mute); font-size: 16px; }

/* ---------- Секции ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--card); }
.author { display: grid; gap: 28px; align-items: center; }
.steps { display: grid; gap: 16px; margin-top: 28px; }
.step { background: var(--bg); border-radius: var(--r); padding: 22px; }
.step-ico { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.step h3 { font-size: 20px; margin-bottom: .3em; }
.step p { margin: 0; color: var(--ink-soft); }
.reviews { display: grid; gap: 16px; margin-top: 24px; }
.final-cta { background: linear-gradient(160deg, var(--coral-soft), var(--sun-soft)); }

/* ---------- Программа ---------- */
.modules { display: grid; gap: 12px; margin-top: 24px; text-align: left; }
.module { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.module summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; min-height: 72px; }
.module summary::-webkit-details-marker { display: none; }
.module-no { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--coral-soft); color: var(--coral-dark); font-weight: 800; font-size: 20px; }
.module-title { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.module-title small { color: var(--ink-mute); font-size: 14px; }
.module-prog { font-weight: 700; color: var(--teal); font-size: 15px; }
.chev { width: 12px; height: 12px; border-right: 3px solid var(--ink-mute); border-bottom: 3px solid var(--ink-mute); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; flex: none; }
.module[open] .chev { transform: rotate(-135deg); }
.module-goal { padding: 0 18px; color: var(--ink-soft); font-size: 16px; }
.lessons { list-style: none; margin: 0; padding: 0 10px 12px; }
.lesson > a, .lesson > div { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 14px; text-decoration: none; color: var(--ink); min-height: 60px; }
.lesson > a:hover { background: var(--bg); }
.lesson + .lesson { border-top: 1px solid rgba(31, 27, 51, .06); }
.lesson-id { flex: none; font-weight: 800; color: var(--coral); width: 34px; }
.lesson-t { flex: 1; display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.lesson-t b { font-weight: 600; font-size: 17px; }
.lesson-t small { color: var(--ink-mute); font-size: 14px; }
.lesson-soon .lesson-t b { color: var(--ink-soft); }
.lesson-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; max-width: 40%; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--bg-deep); }
.tag-sun { background: var(--sun); color: var(--ink); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-mute { background: #EEEAF5; color: var(--ink-soft); }
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-lock { background: transparent; padding: 0 4px; }

/* ---------- Тарифы ---------- */
.plans { display: grid; gap: 18px; margin-top: 28px; align-items: start; }
.plan { position: relative; background: var(--card); border-radius: var(--r-lg); padding: 26px 22px 22px; box-shadow: var(--shadow); border: 2px solid transparent; }
.section-alt .plan { background: var(--bg); box-shadow: none; }
.plan-hl { border-color: var(--coral); box-shadow: var(--shadow-lg); }
.section-alt .plan-hl { background: var(--card); box-shadow: var(--shadow-lg); }
.plan-out { opacity: .75; }
.plan-badge { position: absolute; top: -14px; left: 22px; background: var(--coral); color: #fff; font-weight: 700; font-size: 14px; padding: 4px 14px; border-radius: 999px; }
.plan-name { font-size: 24px; font-weight: 800; margin: 0; }
.plan-tag { color: var(--ink-soft); font-size: 16px; margin: 4px 0 14px; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 14px; }
.plan-price b { font-size: 38px; font-weight: 800; letter-spacing: -.02em; }
.plan-price span { color: var(--ink-soft); font-size: 16px; }
.plan-old { color: var(--ink-mute); font-size: 18px; width: 100%; }
.seats { margin-bottom: 14px; }
.seats-bar { height: 10px; border-radius: 99px; background: var(--coral-soft); overflow: hidden; }
.seats-bar i { display: block; height: 100%; background: var(--coral); border-radius: 99px; }
.seats p { margin: 6px 0 0; font-size: 15px; color: var(--ink-soft); }
.ticks { list-style: none; padding: 0; margin: 0 0 20px; }
.ticks li { position: relative; padding-left: 30px; margin: 8px 0; font-size: 16px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-weight: 800; font-size: 13px; display: grid; place-items: center; margin-top: 2px; }
.plans-compact .plan { padding: 22px 18px 18px; }
.plans-compact .plan-price b { font-size: 30px; }
.plans-compact .plan-price span { white-space: nowrap; }
@media (min-width: 720px) and (max-width: 979px) { .plans-compact { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; margin-top: 20px; }
.faq details { background: var(--bg); border-radius: 18px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 26px; color: var(--coral); font-weight: 600; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--ink-soft); padding-bottom: 6px; }

/* ---------- Карточки, формы ---------- */
.card { background: var(--card); border-radius: var(--r-lg); padding: 24px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card-sun { background: var(--sun-soft); box-shadow: none; }
.auth-card { padding: 28px 20px; }
.form { display: grid; gap: 16px; margin-top: 8px; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 16px; }
.field input {
  width: 100%; min-height: 58px; padding: 12px 16px; font-size: 19px;
  border: 2px solid rgba(31, 27, 51, .15); border-radius: 16px; background: #fff;
}
.field input:focus { border-color: var(--coral); outline: none; box-shadow: 0 0 0 4px var(--coral-soft); }
.code-input { text-align: center; font-size: 30px !important; letter-spacing: .4em; font-weight: 700; }
.optional summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; padding: 6px 0; }
.optional .field { margin-top: 10px; }
.resend { margin-top: 18px; color: var(--ink-mute); text-align: center; }
.alert { background: var(--sun-soft); border-radius: 14px; padding: 12px 16px; font-weight: 500; }
.alert-err { background: var(--red-soft); color: #a1262b; }
.alert-ok { background: var(--green-soft); color: #17703f; }

/* ---------- Кабинет ---------- */
.status { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 20px; border-radius: var(--r); background: var(--violet-soft); margin: 18px 0; text-decoration: none; color: var(--ink); }
.status span { color: var(--ink-soft); font-size: 16px; }
.status .btn { margin-top: 8px; }
.status-ok { background: var(--green-soft); }
.status-warn { background: var(--red-soft); }
.status-pend { background: var(--sun-soft); }
.progress-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.progress-head span { color: var(--ink-soft); font-size: 16px; }
.bar { height: 12px; border-radius: 99px; background: var(--bg-deep); overflow: hidden; margin-bottom: 18px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--green)); border-radius: 99px; min-width: 6px; }

/* ---------- Урок ---------- */
.lesson-page { padding-top: 12px; padding-bottom: 48px; max-width: 900px; }
.crumbs { font-size: 15px; color: var(--ink-mute); margin-bottom: 12px; }
.crumbs a { color: var(--ink-soft); }
.player { position: relative; aspect-ratio: 16 / 9; background: #1F1B33; border-radius: 18px; overflow: hidden; margin: 0 -16px 18px; border-radius: 0; box-shadow: var(--shadow-lg); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; text-align: center; padding: 16px; font-size: 17px; }
.player-msg span { color: rgba(255, 255, 255, .75); font-size: 15px; }
.player-locked { background: linear-gradient(160deg, #2b2547, #1F1B33); }
.player-locked .lock { font-size: 38px; color: #fff; }
.player-locked .btn { margin-top: 8px; }
.lesson-head { margin-bottom: 12px; }
.lesson-head .h2 { margin-bottom: .2em; }
.watch-row { margin-bottom: 18px; }
.buy-box { background: linear-gradient(160deg, var(--coral-soft), var(--sun-soft)); border-radius: var(--r-lg); padding: 24px 18px; margin: 24px 0; }
.buy-box .h3 { margin-top: 0; }
.next-row { margin-top: 24px; }

/* ---------- Оплата ---------- */
.order-sum { background: var(--bg); border-radius: 18px; padding: 6px 16px; margin: 16px 0 20px; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(31, 27, 51, .12); }
.sum-row:last-child { border-bottom: 0; }
.sum-row span { color: var(--ink-soft); }
.sum-row .big, .sum-total b { font-size: 28px; font-weight: 800; color: var(--coral-dark); }
.pay-wait { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; padding: 14px 16px; border-radius: 16px; background: var(--teal-soft); color: #0b6b61; font-weight: 600; font-size: 16px; }
.pay-wait:empty { display: none; }
.spinner { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(15, 163, 148, .25); border-top-color: var(--teal); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } html { scroll-behavior: auto; } }
.howto { padding-left: 22px; margin: 0 0 10px; }
.howto li { margin: 10px 0; padding-left: 4px; }
.success-ico { width: 96px; height: 96px; margin: 8px auto 18px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 54px; font-weight: 800; box-shadow: 0 12px 30px rgba(34, 164, 93, .35); }

/* ---------- Тексты (политика) ---------- */
.prose h2 { margin-top: 1.6em; }
.prose li { margin: 6px 0; }

/* ---------- Подвал ---------- */
.footer { background: var(--ink); color: rgba(255, 255, 255, .8); padding: 36px 0 28px; font-size: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-brand .logo-mark { width: 28px; height: 28px; }
.footer-brand b { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.footer a { color: #fff; text-decoration: none; padding: 6px 0; }
.footer .muted { color: rgba(255, 255, 255, .5); }

/* ---------- Админка ---------- */
.admin main { font-size: 16px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.admin-tabs a, .filters a { padding: 8px 16px; border-radius: 999px; background: var(--card); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.admin-tabs a.on, .filters a.on { background: var(--ink); color: #fff; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat { background: var(--card); border-radius: 16px; padding: 14px; }
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--ink-soft); font-size: 14px; }
.checks { list-style: none; padding: 0; }
.checks .ok { color: var(--green); } .checks .no { color: var(--red); font-weight: 600; }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: 16px; margin-bottom: 24px; }
.tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid #f0e8de; text-align: left; vertical-align: top; }
.tbl th { background: #fbf6ef; font-weight: 700; white-space: nowrap; }
.tbl td.ok { color: var(--green); font-weight: 600; }
.tbl .actions { white-space: nowrap; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 2px 0; }
.inline .num { width: 60px; } .inline .note { width: 110px; }
.inline input, .search input, .lesson-admin input, .lesson-admin textarea { border: 1px solid #ddd3c6; border-radius: 10px; padding: 6px 10px; background: #fff; font-size: 15px; }
.search { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.search input { flex: 1; min-width: 200px; min-height: 44px; }
.lesson-admin { display: grid; gap: 10px; }
.la-row { background: var(--card); border-radius: 16px; padding: 14px; display: grid; gap: 10px; border-left: 6px solid #ddd3c6; }
.la-row.pub { border-left-color: var(--green); }
.la-row label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.la-row label.chk { display: flex; align-items: center; gap: 8px; }
.la-row .vid { font-family: ui-monospace, Menlo, monospace; width: 100%; }
.la-row textarea { width: 100%; }
.la-row details { font-size: 14px; } .la-row details label { margin-top: 8px; }
.la-title small { color: var(--ink-mute); }
.la-title a { font-size: 13px; margin-left: 6px; }
code { background: var(--bg-deep); padding: 2px 6px; border-radius: 6px; font-size: .9em; word-break: break-all; }

/* ---------- Планшет и десктоп ---------- */
@media (min-width: 720px) {
  .wrap { padding-left: 28px; padding-right: 28px; }
  .cta-row { flex-direction: row; flex-wrap: wrap; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .plans-compact { grid-template-columns: repeat(3, 1fr); }
  .player { margin: 0 0 22px; border-radius: 22px; }
  .card { padding: 32px 30px; }
  .la-row { grid-template-columns: 1fr; }
}
@media (min-width: 980px) {
  .hero { padding: 56px 0 72px; }
  .hero-in { grid-template-columns: 1.05fr 1fr; gap: 56px; }
  .author { grid-template-columns: 340px 1fr; gap: 48px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .section { padding: 80px 0; }
  .bubble { font-size: 18px; }
}
