/* ToneExpert — общий стиль. Мобильный первым, без сборки. */
:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --soft: #f3eee6;
  --ink: #1d1b2e;
  --body: #3b3848;
  --muted: #7a7588;
  --line: #e9e2d8;
  --accent: #e4572e;
  --accent-h: #cc4520;
  --teal: #13897f;
  --good: #2f9e5b;
  --okay: #d99a1e;
  --bad: #d64545;
  --t1: #e53935;   /* цвета тонов: красный, оранжевый, зелёный, синий */
  --t2: #f08c00;
  --t3: #2e9d4a;
  --t4: #1e6fd9;
  --t5: #8d8a99;
  --ref: #e4572e;  /* кривая эталона */
  --usr: #1e6fd9;  /* кривая ученика */
  --r: 16px;
  --shadow: 0 1px 2px rgba(29,27,46,.04), 0 6px 20px rgba(29,27,46,.07);
  --head: 'Nunito', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--body);
  font: 16px/1.55 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--head); color: var(--ink); line-height: 1.15; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 13px 22px; font-weight: 700; font-size: 1rem;
  text-decoration: none; transition: transform .08s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-main { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(228,87,46,.28); }
.btn-main:hover { background: var(--accent-h); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-aud { background: var(--teal); color: #fff; }
.btn-aud:hover { background: #0e7068; }
.btn-wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(250,247,242,.92);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); }
.top-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink);
  font: 800 1.22rem var(--head); flex-shrink: 0; }
.brand b, .foot-brand b { color: var(--accent); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--body); text-decoration: none; font-weight: 600; font-size: .94rem;
  padding: 7px 11px; border-radius: 9px; white-space: nowrap; }
.nav a:hover { background: var(--soft); }
.nav a.is-on { background: var(--ink); color: #fff; }
.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.aud-link { font-weight: 800; font-size: .82rem; letter-spacing: .02em; color: var(--teal);
  text-decoration: none; border: 1.5px solid currentColor; border-radius: 9px; padding: 6px 10px; white-space: nowrap; }
.aud-link:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.trial-chip { font-size: .8rem; font-weight: 700; background: #fff3e8; color: #9a4a12;
  border: 1px solid #f6d3b4; border-radius: 99px; padding: 5px 10px; white-space: nowrap; cursor: pointer; }
.trial-chip.is-over { background: var(--accent); color: #fff; border-color: var(--accent); }
.burger { display: none; width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px;
  flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
@media (max-width: 920px) {
  .burger { display: flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 12px; }
}
@media (max-width: 520px) {
  .aud-link { display: none; }
  .brand span { font-size: 1.08rem; }
}

/* ---------- подвал ---------- */
.foot { margin-top: 64px; padding: 40px 0 28px; background: #f2ede5; border-top: 1px solid var(--line); text-align: center; }
.foot-in { max-width: 760px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; align-items: center; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.foot-brand span { font: 900 1.45rem var(--head); color: var(--ink); }
.foot-brand b { color: var(--accent); }
.foot-tag { color: var(--muted); font-size: .95rem; margin-top: 6px; }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px 0; }
.foot-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem;
  background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 8px 15px; transition: border-color .15s, color .15s; }
.foot-nav a:hover { border-color: var(--accent); color: var(--accent); }
.foot-aud { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none;
  background: linear-gradient(135deg, #e8f6f4, #fdf3ea); border: 1.5px solid #cfe9e5; border-radius: 16px; padding: 12px 22px; transition: border-color .15s; }
.foot-aud:hover { border-color: var(--teal); }
.foot-aud-k { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.foot-aud-n { font: 800 1rem var(--head); color: var(--teal); }
.foot-install { margin-top: 16px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); border-radius: 12px; padding: 10px 18px; font-weight: 700; }
.foot-install:hover { background: var(--ink); color: #fff; }
/* Установленное приложение: отступы под вырез и «полоску» жестов. */
@media (display-mode: standalone) {
  .top { padding-top: env(safe-area-inset-top); }
  .foot { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--line); width: 100%; font-size: .85rem; color: var(--muted); }
.foot-bottom a { color: var(--muted); text-decoration: none; }
.foot-bottom a:hover { color: var(--accent); text-decoration: underline; }
.foot-bottom i { font-style: normal; opacity: .5; }
@media (max-width: 520px) { .foot-bottom i { display: none; } .foot-bottom { flex-direction: column; } }

/* ---------- главная ---------- */
.hero { padding: 54px 0 34px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.kicker { display: inline-block; font-weight: 700; font-size: .82rem; color: var(--accent);
  background: #fde9e2; border-radius: 99px; padding: 5px 12px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.3rem); font-weight: 900; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: 1.12rem; margin: 18px 0 26px; max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: .86rem; color: var(--muted); margin-top: 12px; }
.hero-demo { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 22px; }
.demo-word { text-align: center; }
.demo-word .zh { font: 700 3.1rem/1.1 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif; color: var(--ink); }
.demo-word .py { font-size: 1.3rem; font-weight: 600; margin-top: 6px; }
.demo-chart { width: 100%; height: auto; display: block; margin: 12px 0 6px; }
.demo-legend { display: flex; justify-content: center; gap: 16px; font-size: .84rem; color: var(--muted); }
.demo-legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.demo-verdict { margin-top: 12px; background: #fff6e5; color: #8a5a00; border-radius: 10px; padding: 9px 12px; font-size: .9rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 30px; } }

.section { padding: 34px 0; }
.section h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 900; margin-bottom: 8px; }
.section-lead { color: var(--muted); margin-bottom: 22px; max-width: 40em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.tcard { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 20px; text-decoration: none; color: var(--body); border: 1.5px solid transparent; transition: border-color .15s, transform .15s; }
.tcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.tcard-ico { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 12px; }
.tcard h3 { font-size: 1.18rem; margin-bottom: 4px; }
.tcard p { font-size: .93rem; flex: 1; }
.tcard .tag { margin-top: 12px; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: st; }
.step { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.step::before { counter-increment: st; content: counter(st); display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--ink); color: #fff; font: 800 1rem var(--head); margin-bottom: 10px; }
.step h3 { font-size: 1.05rem; margin-bottom: 4px; }
.step p { font-size: .93rem; }
.tones4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tone4 { background: var(--card); border-radius: var(--r); padding: 16px 10px; text-align: center; box-shadow: var(--shadow);
  border: 0; color: var(--body); }
.tone4:hover { outline: 2px solid var(--line); }
.tone4 .syl { font: 800 1.7rem var(--head); }
.tone4 svg { width: 54px; height: 40px; margin: 6px auto 2px; display: block; }
.tone4 .nm { font-size: .82rem; color: var(--muted); }
@media (max-width: 560px) { .tones4 { grid-template-columns: repeat(2, 1fr); } }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.faq summary { font-weight: 700; color: var(--ink); cursor: pointer; }
.faq details p { margin-top: 8px; font-size: .95rem; }

/* ---------- блок «АУДИРОВАНИЕ» ---------- */
.aud-cta { display: flex; gap: 18px; align-items: center; background: linear-gradient(135deg, #e8f6f4, #fdf3ea);
  border: 1.5px solid #cfe9e5; border-radius: 20px; padding: 20px; margin: 26px 0; }
.aud-cta img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #f1e7da; }
.aud-cta-kicker { font: 800 .75rem var(--head); letter-spacing: .06em; color: var(--teal); text-transform: uppercase; }
.aud-cta h3 { font-size: 1.2rem; margin: 4px 0 6px; }
.aud-cta p { font-size: .94rem; margin-bottom: 12px; }
@media (max-width: 560px) { .aud-cta { flex-direction: column; text-align: center; } }
.aud-mini { display: block; margin-top: 14px; background: #eef8f6; border-radius: 12px; padding: 10px 14px;
  font-size: .9rem; color: var(--body); text-decoration: none; border: 1px solid #d3ece8; }
.aud-mini b { color: var(--teal); }
.aud-mini:hover { border-color: var(--teal); }

/* ---------- страницы тренажёров ---------- */
.page-head { padding: 28px 0 8px; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 900; }
.page-head p { color: var(--muted); margin-top: 6px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.tabs button { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 14px;
  font-weight: 600; font-size: .92rem; color: var(--body); }
.tabs button.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.card { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 22px; position: relative; }
.card-meta { font-size: .84rem; color: var(--muted); display: flex; justify-content: space-between; }
.task { text-align: center; padding: 10px 0 4px; }
.task .zh { font: 700 clamp(2.4rem, 9vw, 3.4rem)/1.15 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif; color: var(--ink); }
.task .py { margin-top: 6px; font-size: 1.35rem; font-weight: 600; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.task .py .syl { display: inline-flex; flex-direction: column; align-items: center; }
.task .py .syl svg { width: 30px; height: 20px; }
.task .ru { color: var(--muted); margin-top: 4px; }
.t1 { color: var(--t1); } .t2 { color: var(--t2); } .t3 { color: var(--t3); } .t4 { color: var(--t4); } .t5 { color: var(--t5); }
.sandhi { margin: 10px auto 0; max-width: 520px; background: #fff6e5; color: #7a5200; border-radius: 10px; padding: 8px 12px; font-size: .86rem; }
.ref-btn { display: inline-flex; align-items: center; gap: 8px; margin: 14px auto 0; border: 1.5px solid var(--line);
  background: #fff; border-radius: 99px; padding: 8px 16px; font-weight: 600; color: var(--ink); }
.ref-btn.is-playing { border-color: var(--accent); color: var(--accent); }
.ref-btn svg { width: 18px; height: 18px; }
.mic-row { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 18px; }
.mic-btn { width: 86px; height: 86px; border-radius: 50%; border: 0; background: var(--accent); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 22px rgba(228,87,46,.35); transition: transform .1s; position: relative; }
.mic-btn svg { width: 36px; height: 36px; }
.mic-btn .ico-stop { display: none; }
.mic-btn.is-rec { background: var(--bad); animation: pulse 1.2s infinite; }
.mic-btn.is-rec .ico-mic { display: none; } .mic-btn.is-rec .ico-stop { display: block; }
.mic-btn.is-wait { background: var(--muted); box-shadow: none; pointer-events: none; }
.mic-btn.is-wait::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid transparent;
  border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(214,69,69,.45); } 50% { box-shadow: 0 0 0 14px rgba(214,69,69,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.mic-hint { font-size: .92rem; color: var(--muted); text-align: center; }
.rec-time { font: 700 .95rem ui-monospace, monospace; color: var(--bad); min-height: 1.2em; }
.my-audio { width: 100%; max-width: 360px; height: 38px; }
.err { background: #fdecec; color: #8b1d1d; border-radius: 10px; padding: 10px 14px; margin-top: 14px; font-size: .93rem; }
.nav-row { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; gap: 10px; }
.nav-row .pos { color: var(--muted); font-size: .9rem; }

/* результат разбора */
.result { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.verdict { border-radius: 12px; padding: 11px 14px; font-weight: 600; font-size: .96rem; }
.verdict.match { background: #e7f6ec; color: #1d6b3a; }
.verdict.wrong-tone { background: #fff4e0; color: #8a5600; }
.verdict.mismatch { background: #fdecec; color: #8b1d1d; }
.scores { display: flex; gap: 12px; margin: 16px 0; flex-wrap: wrap; justify-content: center; }
.score-box { flex: 1; min-width: 92px; max-width: 160px; background: var(--soft); border-radius: 14px; padding: 12px; text-align: center; }
.score-box .v { font: 900 1.9rem var(--head); color: var(--ink); }
.score-box .k { font-size: .8rem; color: var(--muted); }
.score-box.main .v { font-size: 2.3rem; }
.s-good { color: var(--good) !important; } .s-okay { color: var(--okay) !important; } .s-bad { color: var(--bad) !important; }
.tv { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.tv-chip { border-radius: 14px; padding: 10px 10px 8px; text-align: center; min-width: 116px; border: 1.5px solid; background: #fff; }
.tv-chip.ok { border-color: #bfe5cb; } .tv-chip.bad { border-color: #f3c1c1; }
.tv-zh { font: 700 1.5rem 'Noto Sans SC', 'PingFang SC', sans-serif; color: var(--ink); }
.tv-zh .p { display: block; font: 600 .9rem 'Inter', sans-serif; color: var(--muted); }
.tv-chip svg { display: block; margin: 4px auto; }
.tv-v { font-size: .82rem; font-weight: 700; }
.tv-v.ok { color: var(--good); } .tv-v.bad { color: var(--bad); }
.f0 { margin-top: 16px; background: var(--soft); border-radius: 14px; padding: 12px; }
.f0-head { display: flex; justify-content: space-between; font-size: .84rem; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; gap: 6px; }
.f0-head i { display: inline-block; width: 16px; height: 4px; border-radius: 2px; vertical-align: middle; margin: 0 4px 0 10px; }
.f0 canvas { width: 100%; display: block; }
.f0-x { display: flex; }
.f0-x div { flex: 1; text-align: center; font-size: .85rem; color: var(--ink); }
.f0-x div span { display: block; font-size: .78rem; color: var(--muted); }
.tips { margin: 16px 0 0 0; list-style: none; display: grid; gap: 8px; }
.tips li { background: #f7f5ff; border-left: 3px solid #8b7ff0; border-radius: 8px; padding: 9px 12px; font-size: .93rem; }
.disclaimer { font-size: .8rem; color: var(--muted); margin-top: 12px; text-align: center; }

/* итоговая карточка */
.finish { text-align: center; }
.finish .big { font: 900 3.4rem var(--head); color: var(--accent); }
.finish h2 { font-size: 1.6rem; margin-bottom: 4px; }
.finish-stats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.finish-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* ---------- игры ---------- */
.game { max-width: 620px; margin: 0 auto; }
.hud { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.hud .lives { color: var(--bad); letter-spacing: 2px; font-size: 1.1rem; }
.hud .lives .lost { color: #e6dede; }
.timebar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.timebar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--good), var(--okay), var(--bad)); background-size: 300% 100%; transition: width .1s linear; }
.play-big { width: 74px; height: 74px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; margin: 0 auto; }
.play-big svg { width: 32px; height: 32px; }
.play-big.is-playing { background: var(--accent); }
.tp { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 6px; }
.tp-tok { text-align: center; padding: 4px 6px; border-radius: 10px; }
.tp-tok .h { display: block; font: 700 2rem 'Noto Sans SC', 'PingFang SC', sans-serif; color: var(--ink); }
.tp-tok .p { font-weight: 600; color: var(--muted); }
.tp-tok.is-target { background: #fde9e2; outline: 2px dashed var(--accent); }
.tp-tok.is-target .p { color: var(--accent); }
.tone-tr { text-align: center; color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.tone-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tone-btn { border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 12px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink); }
.tone-btn .n { font: 900 1.3rem var(--head); }
.tone-btn .s { font-weight: 600; font-size: 1rem; }
.tone-btn svg { width: 40px; height: 30px; }
.tone-btn:hover:not(:disabled) { border-color: var(--ink); }
.tone-btn.ok { border-color: var(--good); background: #e7f6ec; }
.tone-btn.bad { border-color: var(--bad); background: #fdecec; }
.opts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.opt { border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 16px 8px; text-align: center; }
.opt .zh { display: block; font: 700 2.2rem 'Noto Sans SC', 'PingFang SC', sans-serif; color: var(--ink); }
.opt .py { display: block; font-weight: 700; font-size: 1.15rem; margin-top: 2px; }
.opt .gl { display: block; font-size: .85rem; color: var(--muted); margin-top: 2px; }
.opt:hover:not(:disabled) { border-color: var(--ink); }
.opt.ok { border-color: var(--good); background: #e7f6ec; } .opt.bad { border-color: var(--bad); background: #fdecec; }
.feedback { margin-top: 16px; border-radius: 14px; padding: 12px 14px; text-align: center; }
.feedback.ok { background: #e7f6ec; color: #1d6b3a; } .feedback.bad { background: #fdecec; color: #8b1d1d; }
.feedback .rv { font-size: 1.1rem; margin-top: 4px; color: var(--ink); }
.feedback .rv b { font-family: 'Noto Sans SC', 'PingFang SC', sans-serif; }
.intro { text-align: center; }
.intro .ico { font-size: 3rem; }
.intro ol { text-align: left; max-width: 440px; margin: 14px auto; padding-left: 22px; }
.intro ol li { margin: 6px 0; }
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 6px; }
.mode-pick button { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 10px; text-align: center; color: var(--ink); }
.mode-pick button b { display: block; font: 800 1.1rem var(--head); }
.mode-pick button span { font-size: .85rem; color: var(--muted); }
.mode-pick button:hover { border-color: var(--accent); }
.best { font-size: .88rem; color: var(--muted); margin-top: 6px; }

/* ---------- опиши картинку ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.photo-card { display: block; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); border: 1.5px solid transparent; }
.photo-card:hover { border-color: var(--accent); }
.photo-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--soft); }
.photo-card div { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.photo-card small { font-weight: 700; font-size: .75rem; color: var(--teal); background: #e6f4f2; border-radius: 99px; padding: 3px 8px; }
.photo-main { width: 100%; border-radius: 16px; display: block; aspect-ratio: 4/3; object-fit: cover; background: var(--soft); }
.hints { margin-top: 14px; }
.hints summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.hint-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hint { background: var(--soft); border-radius: 10px; padding: 6px 10px; font-size: .9rem; }
.hint b { font-family: 'Noto Sans SC', 'PingFang SC', sans-serif; color: var(--ink); }
.transcript { background: var(--soft); border-radius: 12px; padding: 12px 14px; margin-top: 14px; }
.transcript .zh { font: 600 1.35rem 'Noto Sans SC', 'PingFang SC', sans-serif; color: var(--ink); }
.transcript .py { color: var(--muted); margin-top: 2px; }
.eval h3 { font-size: 1.05rem; margin: 16px 0 6px; }
.eval ul { padding-left: 20px; }
.eval li { margin: 4px 0; }
.mist { background: #fff6f0; border-radius: 10px; padding: 8px 12px; margin: 6px 0; font-size: .94rem; }
.mist s { color: var(--bad); } .mist b { color: var(--good); }

/* ---------- окно «оставь почту» ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(29,27,46,.55); display: grid; place-items: center; padding: 16px; }
.modal-card { background: #fff; border-radius: 22px; padding: 28px 24px 24px; max-width: 430px; width: 100%; position: relative; text-align: center;
  max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-x { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; font-size: 1.7rem; color: var(--muted); width: 40px; height: 40px; }
.gate-icon { font-size: 2.6rem; }
.modal-card h2 { font-size: 1.45rem; margin: 6px 0 8px; }
.gate-lead { font-size: .97rem; margin-bottom: 16px; }
#gateForm input[type=email] { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px; font: inherit; font-size: 1.05rem; }
#gateForm input[type=email]:focus { outline: none; border-color: var(--accent); }
.chk { display: flex; gap: 9px; text-align: left; font-size: .84rem; margin: 10px 0; align-items: flex-start; color: var(--body); }
.chk input { margin-top: 3px; width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--accent); }
.gate-err { color: var(--bad); font-size: .88rem; margin: 6px 0; }

/* ---------- текстовые страницы ---------- */
.prose { padding: 28px 0; }
.prose h1 { font-size: 2rem; margin-bottom: 14px; }
.prose h2 { font-size: 1.25rem; margin: 22px 0 8px; }
.prose p, .prose li { margin: 8px 0; }
.prose ul { padding-left: 22px; }

/* ---------- админка ---------- */
.adm table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; font-size: .9rem; }
.adm th, .adm td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.adm th { background: var(--soft); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.kpi { background: #fff; border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.kpi .v { font: 900 1.7rem var(--head); color: var(--ink); }
.kpi .k { font-size: .8rem; color: var(--muted); }
