/* xiuxianhanyu.com — эскиз дизайна 19.10.2026.
   Цвета и шрифты — токены приложения (app/lib/design/r6_tokens.dart).
   Размеры текста в rem: системный масштаб текста увеличивает текст, но не отступы. */

@font-face{font-family:XHSans;src:url('fonts/NotoSansSC-400.woff') format('woff');font-weight:400;font-display:swap}
@font-face{font-family:XHSans;src:url('fonts/NotoSansSC-600.woff') format('woff');font-weight:600;font-display:swap}
@font-face{font-family:XHSerif;src:url('fonts/NotoSerifSC-500.woff') format('woff');font-weight:500;font-display:swap}
@font-face{font-family:XHSerif;src:url('fonts/NotoSerifSC-600.woff') format('woff');font-weight:600;font-display:swap}

:root{
  --canvas:#F2E9DA;--ink:#382B23;--muted:#6F5C49;
  --surface:rgba(246,236,218,.91);--surface-solid:#F6ECDA;--edge:rgba(102,75,47,.24);
  --accent:#7A5C3E;--primary-ink:#FBEFD8;--wash:rgba(143,112,69,.141);--focus:#BA965E;
  --skeleton:rgba(111,92,73,.16);
  --gutter:16px;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --canvas:#241D18;--ink:#F0E2CA;--muted:#C7B499;
    --surface:rgba(42,33,26,.91);--surface-solid:#2A211A;--edge:rgba(222,195,156,.25);
    --accent:#C6A77C;--primary-ink:#2C2016;--skeleton:rgba(199,180,153,.16);
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --canvas:#241D18;--ink:#F0E2CA;--muted:#C7B499;
  --surface:rgba(42,33,26,.91);--surface-solid:#2A211A;--edge:rgba(222,195,156,.25);
  --accent:#C6A77C;--primary-ink:#2C2016;--skeleton:rgba(199,180,153,.16);
  color-scheme:dark;
}
@media (min-width:600px){:root{--gutter:24px}}
@media (min-width:1024px){:root{--gutter:32px}}

/* Языки: оба текста лежат в разметке, виден один. Без скрипта — русский. */
html[data-lang="ru"] body [lang="en"],
html[data-lang="en"] body [lang="ru"]{display:none !important}

*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none !important}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--canvas);color:var(--ink);font:400 1rem/1.6 XHSans,"Noto Sans SC",system-ui,sans-serif;overflow-wrap:break-word}
img,svg,video{display:block;max-width:100%}
a{color:var(--accent);text-decoration-thickness:1px;text-underline-offset:3px}
a:hover{text-decoration-thickness:2px}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:6px}
h1,h2,h3,p,ol,ul{margin:0}
.wrap{width:100%;max-width:1120px;margin:0 auto;padding:0 var(--gutter)}
.muted{color:var(--muted)}
.small{font-size:.875rem;line-height:1.5}
.skip{position:absolute;left:8px;top:-60px;z-index:20;padding:10px 14px;border-radius:12px;background:var(--accent);color:var(--primary-ink)}
.skip:focus{top:8px}

/* Типографика: заголовки — Serif, как screenTitle / sectionTitle приложения */
/* На узком экране заголовок не растёт шире строки. Слово длиннее строки
   («конфиденциальности») размечено мягким переносом &shy; прямо в тексте. */
.h1{font:600 min(2rem,13vw)/1.16 XHSerif,"Noto Serif SC",serif;letter-spacing:.2px;text-wrap:balance}
.doc-head .h1{font-size:min(2rem,10vw)}
.h2{font:500 min(1.6875rem,9.5vw)/1.25 XHSerif,"Noto Serif SC",serif;text-wrap:balance}
.h3{font:500 1.25rem/1.3 XHSerif,"Noto Serif SC",serif;text-wrap:balance}
@media (max-width:480px){body{-webkit-hyphens:auto;hyphens:auto}}
.eyebrow{font:600 .8125rem/1.4 XHSans,sans-serif;letter-spacing:1.6px;text-transform:uppercase;color:var(--muted)}
.lead{font-size:1.0625rem;line-height:1.6;color:var(--muted)}
@media (min-width:900px){
  .h1,.doc-head .h1{font-size:2.75rem}
  .h2{font-size:2rem}
}

/* Шапка */
.site-head{border-bottom:1px solid var(--edge)}
.site-head .wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;min-height:64px;padding-top:8px;padding-bottom:8px}
.brand{display:flex;align-items:center;gap:10px;min-height:44px;color:var(--ink);text-decoration:none;min-width:0}
.brand img{width:36px;height:36px;border-radius:9px;flex:none;box-shadow:0 0 0 1px var(--edge)}
.brand-text{display:flex;flex-direction:column;min-width:0}
.brand-han{font:600 1.0625rem/1.25 XHSans,sans-serif;letter-spacing:4px}
.brand-name{font-size:.8125rem;line-height:1.35;color:var(--muted)}
.lang-switch{display:flex;border:1px solid var(--edge);border-radius:15px;padding:2px;background:var(--surface)}
.lang-switch button{font:600 .875rem/1 XHSans,sans-serif;color:var(--muted);background:none;border:0;margin:0;min-width:46px;min-height:44px;padding:0 10px;border-radius:12px;cursor:pointer}
.lang-switch button[aria-pressed="true"]{background:var(--wash);color:var(--ink);box-shadow:inset 0 0 0 1px var(--accent)}

/* Кнопки — R6PrimaryAction / R6SecondaryAction */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:54px;padding:12px 22px;border-radius:16px;font:600 1rem/1.35 XHSans,sans-serif;letter-spacing:.2px;text-align:center;text-decoration:none;cursor:pointer;border:0}
.btn svg{width:20px;height:20px;flex:none}
.btn-pri{background:var(--accent);color:var(--primary-ink)}
.btn-sec{min-height:48px;background:var(--surface);color:var(--ink);border:1px solid var(--edge);border-radius:14px}
.btn[disabled],.btn[aria-disabled="true"]{opacity:.55;cursor:default}
.btn-block{display:flex;width:100%}

/* Рамка ленты снимков */
.hero{padding:0 0 40px}
.video-wrap{width:100%;max-width:1120px;margin:0 auto}
.video-frame{position:relative;width:100%;aspect-ratio:var(--video-ratio,16/9);background:var(--surface-solid);overflow:hidden}
@media (min-width:600px){
  .hero{padding-top:24px}
  .video-wrap{padding:0 var(--gutter)}
  .video-frame{border-radius:20px;box-shadow:0 0 0 1px var(--edge),0 14px 36px rgba(56,43,35,.14)}
}
/* Перелистывание (22.10.2026; с 01.11.2026 — 8 кадров телефона, без ролика).
   Рамка не меняет высоту при листании: телефон 4:5, планшет 4:3, компьютер 16:9.
   --shot-w — ширина вертикального кадра 9:16 в долях ширины рамки (9/16 : пропорция рамки). */
.g-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.video-frame.gallery{--video-ratio:4/5;--shot-w:70.3125%;--g-gap:12px;--g-pad:14px;background:var(--surface-solid)}
.g-track{position:relative;display:flex;align-items:stretch;gap:var(--g-gap);height:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none}
.g-track::-webkit-scrollbar{display:none}
.g-track::after{content:"";flex:0 0 max(0px,calc((100% - var(--shot-w)) / 2 - var(--g-gap)))}
.g-track:focus-visible{outline-offset:-3px}
.g-slide{flex:0 0 auto;height:100%;display:flex;align-items:center;justify-content:center;scroll-snap-align:center;scroll-snap-stop:always;transition:opacity .3s ease}
.g-slide:not(.is-current){opacity:.55;cursor:pointer}
.g-slide.shot{width:var(--shot-w);padding:var(--g-pad) 0}
.g-slide.shot img:not([src]){display:none}
.g-slide.shot img{height:100%;width:auto;aspect-ratio:9/16;border-radius:10px;box-shadow:0 0 0 1px var(--edge),0 10px 28px rgba(36,29,24,.26);background:var(--surface-solid)}
.g-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px var(--gutter) 0}
.g-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;border:1px solid var(--edge);background:var(--surface);color:var(--ink);cursor:pointer;padding:0}
.g-btn:hover:not(:disabled){background:var(--wash)}
.g-btn:disabled{opacity:.38;cursor:default}
.g-status{margin:0;min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;column-gap:8px;row-gap:4px;text-align:center}
.g-name{font:600 .9375rem/1.3 XHSans,sans-serif;color:var(--ink)}
.g-count{font-size:.8125rem;color:var(--muted);font-variant-numeric:tabular-nums}
.g-dots{flex-basis:100%;display:flex;justify-content:center;gap:6px}
.g-dots i{width:6px;height:6px;border-radius:50%;background:var(--edge);transition:background .2s,transform .2s}
.g-dots i.on{background:var(--accent);transform:scale(1.35)}
@media (min-width:600px){
  .video-frame.gallery{--video-ratio:4/3;--shot-w:42.1875%;--g-pad:18px}
  .g-bar{padding:12px 0 0}
}
@media (min-width:900px){
  .video-frame.gallery{--video-ratio:16/9;--shot-w:31.640625%;--g-gap:16px;--g-pad:20px}
}
@media (prefers-reduced-motion:reduce){.g-slide,.g-dots i{transition:none}}
.hero-text{display:flex;flex-direction:column;gap:14px;padding-top:24px}
.hero-text .btn{align-self:flex-start;margin-top:6px}
@media (max-width:420px){.hero-text .btn{align-self:stretch}}
/* Главная уже документов: на экране 1280 × 800 видео, заголовок и кнопка помещаются в первый экран. */
.home .wrap,.home .video-wrap{max-width:calc(960px + 2 * var(--gutter))}
@media (min-width:900px){
  .hero-text{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:48px;row-gap:12px;align-items:end;padding-top:32px}
  .hero-text .eyebrow,.hero-text .h1,.hero-text .lead{grid-column:1}
  .hero-text .btn{grid-column:2;grid-row:1 / span 3;align-self:end;margin:0}
}

/* Бета-тест */
.beta{padding:40px 0 56px;border-top:1px solid var(--edge)}
.beta-grid{display:grid;gap:28px}
.beta-intro{display:flex;flex-direction:column;gap:14px}
.steps{list-style:none;padding:0;display:flex;flex-direction:column;gap:12px;margin-top:6px}
.steps li{display:grid;grid-template-columns:36px minmax(0,1fr);gap:12px;align-items:start}
.steps .num{width:36px;height:36px;border-radius:50%;border:1px solid var(--edge);background:var(--surface);display:flex;align-items:center;justify-content:center;font:500 1.0625rem/1 XHSerif,serif;color:var(--accent)}
.steps b{display:block;font-weight:600}
.need{display:flex;gap:10px;align-items:flex-start;padding:10px 14px;border-left:2px solid var(--accent);background:var(--wash);border-radius:0 12px 12px 0}
.need svg{width:20px;height:20px;flex:none;margin-top:3px;color:var(--accent)}
@media (min-width:900px){
  .beta{padding:64px 0 80px}
  .beta-grid{grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:56px;align-items:start}
  .beta-intro{position:sticky;top:24px}
}

/* Карточка — R6Surface */
.card{background:var(--surface);border:1px solid var(--edge);border-radius:16px;padding:20px 16px}
@media (min-width:600px){.card{padding:24px}}

/* Форма */
.form{display:flex;flex-direction:column;gap:20px}
.field{display:flex;flex-direction:column;gap:6px}
.label{font-weight:600}
.opt-mark{font-weight:400;color:var(--muted)}
.hint{font-size:.875rem;line-height:1.5;color:var(--muted)}
.input{width:100%;min-height:52px;padding:12px 14px;border-radius:14px;border:1px solid var(--edge);background:var(--surface-solid);color:var(--ink);font:400 1rem/1.4 XHSans,sans-serif}
.input::placeholder{color:var(--muted);opacity:.75}
.input:focus{outline:none;border:2px solid var(--accent);padding:11px 13px}
.input[aria-invalid="true"]{border:2px solid var(--accent);padding:11px 13px}
.field-error{display:flex;gap:8px;align-items:flex-start;font-size:.875rem;line-height:1.5;color:var(--ink)}
.field-error svg{width:18px;height:18px;flex:none;margin-top:2px;color:var(--accent)}
.field-error[hidden]{display:none}
fieldset{border:0;margin:0;padding:0;min-width:0}
legend{padding:0;margin-bottom:8px}
.choices{display:flex;flex-direction:column;gap:8px}
.choice{display:flex;align-items:center;gap:12px;min-height:52px;padding:10px 14px;border-radius:14px;border:1px solid var(--edge);background:var(--surface-solid);cursor:pointer}
.choice input{appearance:none;-webkit-appearance:none;margin:0;flex:none;width:20px;height:20px;border-radius:50%;border:2px solid var(--muted);background:transparent;cursor:pointer}
.choice input:checked{border-color:var(--accent);box-shadow:inset 0 0 0 3px var(--surface-solid),inset 0 0 0 10px var(--accent)}
.choice:has(input:checked){background:var(--wash);border:2px solid var(--accent);padding:9px 13px}
.choice:has(input:focus-visible){outline:3px solid var(--focus);outline-offset:2px}
.choice input:focus-visible{outline:none}
@media (min-width:600px){.choices.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}
.check{display:grid;grid-template-columns:24px minmax(0,1fr);gap:12px;align-items:start;min-height:44px;padding:10px 0;cursor:pointer}
.check input{appearance:none;-webkit-appearance:none;margin:2px 0 0;width:24px;height:24px;border-radius:7px;border:2px solid var(--muted);background:var(--surface-solid);cursor:pointer;display:grid;place-content:center}
.check input:checked{background:var(--accent);border-color:var(--accent)}
.check input:checked::after{content:"";width:12px;height:7px;border-left:2.5px solid var(--primary-ink);border-bottom:2.5px solid var(--primary-ink);transform:translateY(-2px) rotate(-45deg)}
.check input[aria-invalid="true"]{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
.checks{display:flex;flex-direction:column;gap:2px}
.hp{position:absolute !important;left:-10000px;width:1px;height:1px;overflow:hidden}
.captcha-slot:empty{display:none}
.captcha-slot{max-width:100%;min-height:65px}
.form-note{display:flex;gap:10px;align-items:flex-start;padding:10px 14px;border-left:2px solid var(--accent);color:var(--ink)}
.form-note svg{width:20px;height:20px;flex:none;margin-top:3px;color:var(--accent)}
.form-note[hidden]{display:none}
.form-foot{font-size:.875rem;line-height:1.5;color:var(--muted)}
.spinner{width:18px;height:18px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:spin .9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spinner{animation:none;border-right-color:currentColor;opacity:.6}}
.form-done{display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.form-done[hidden]{display:none}
.done-icon{width:48px;height:48px;color:var(--accent)}
.form-done .email{font-weight:600;overflow-wrap:anywhere}
.form-done h3:focus{outline:none}

/* Документы: политика и удаление */
.doc-head{padding:28px 0 20px;display:flex;flex-direction:column;gap:12px}
.back{display:inline-flex;align-items:center;gap:6px;min-height:44px;align-self:flex-start;color:var(--muted);text-decoration:none}
.back svg{width:18px;height:18px}
.back:hover{color:var(--ink)}
.doc-meta{font-size:.875rem;color:var(--muted)}
.doc-grid{display:grid;gap:24px;padding-bottom:56px}
@media (min-width:1024px){
  .doc-grid{grid-template-columns:260px minmax(0,720px);gap:56px;align-items:start}
  .toc-wrap{position:sticky;top:24px}
}
.toc{background:var(--surface);border:1px solid var(--edge);border-radius:16px}
.toc summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:0 16px;font-weight:600;cursor:pointer}
.toc summary::-webkit-details-marker{display:none}
.toc summary svg{flex:none;width:20px;height:20px;color:var(--muted);transition:transform .2s}
.toc[open] summary svg{transform:rotate(180deg)}
.toc ol{list-style:none;padding:0 8px 10px;counter-reset:toc}
.toc li{counter-increment:toc}
.toc a{display:flex;gap:10px;min-height:44px;align-items:center;padding:6px 8px;border-radius:10px;color:var(--ink);text-decoration:none;line-height:1.35}
.toc a::before{content:counter(toc);flex:none;width:1.5em;color:var(--muted);font-variant-numeric:tabular-nums}
.toc a:hover{background:var(--wash)}
@media (min-width:1024px){
  .toc{background:none;border:0;border-radius:0}
  .toc summary{pointer-events:none;padding:0 8px;min-height:36px;color:var(--muted);font-size:.875rem}
  .toc summary svg{display:none}
  .toc ol{padding:0}
}
.doc{display:flex;flex-direction:column;gap:36px;min-width:0}
.doc section{display:flex;flex-direction:column;gap:14px;scroll-margin-top:16px}
.doc .h2{font-size:min(1.5rem,8.5vw)}
@media (min-width:900px){.doc .h2{font-size:1.75rem}}
.summary{display:flex;flex-direction:column;gap:12px}
.summary ul{padding-left:1.2em;display:flex;flex-direction:column;gap:6px}

/* Тексты пакета G: абзацы и списки внутри раздела (APP412) */
.prose{display:flex;flex-direction:column;gap:12px;min-width:0}
.prose ul{padding-left:1.2em;display:flex;flex-direction:column;gap:8px}
.prose b{font-weight:600}

/* Таблица данных: на телефоне — карточки */
.data-table{width:100%;border-collapse:collapse;font-size:.9375rem}
.data-table th,.data-table td{text-align:left;vertical-align:top;padding:10px 12px;border-bottom:1px solid var(--edge)}
.data-table th{font-weight:600;color:var(--muted);font-size:.8125rem;letter-spacing:.4px}
@media (max-width:719px){
  .data-table thead{position:absolute;left:-10000px}
  .data-table tr{display:block;border:1px solid var(--edge);border-radius:14px;background:var(--surface);padding:6px 14px;margin-bottom:10px}
  .data-table td{display:grid;grid-template-columns:minmax(0,9em) minmax(0,1fr);gap:10px;border:0;padding:6px 0}
  .data-table td+td{border-top:1px solid var(--edge)}
  html[data-lang="ru"] .data-table td::before{content:attr(data-ru)}
  html[data-lang="en"] .data-table td::before{content:attr(data-en)}
  .data-table td::before{color:var(--muted);font-size:.8125rem}
}
@media (max-width:359px){.data-table td{grid-template-columns:minmax(0,1fr)}}

/* Удаление аккаунта */
.routes{display:grid;gap:16px}
@media (min-width:900px){.routes{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}
.route{display:flex;flex-direction:column;gap:14px}
.route-head{display:flex;gap:12px;align-items:center}
.route-head svg{width:28px;height:28px;flex:none;color:var(--accent)}
.how{padding-left:0;list-style:none;display:flex;flex-direction:column;gap:12px;counter-reset:how}
.how li{counter-increment:how;display:grid;grid-template-columns:28px minmax(0,1fr);gap:10px}
.how li::before{content:counter(how);width:28px;height:28px;border-radius:50%;border:1px solid var(--edge);display:flex;align-items:center;justify-content:center;font:500 .9375rem/1 XHSerif,serif;color:var(--accent);background:var(--surface-solid)}
.ui{display:inline;padding:1px 7px;border-radius:8px;border:1px solid var(--edge);background:var(--surface-solid);font-weight:600;white-space:normal;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.mailto{overflow-wrap:anywhere}
.two-col{display:grid;gap:16px}
@media (min-width:720px){.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Подвал */
.site-foot{border-top:1px solid var(--edge);padding:28px 0 36px;font-size:.875rem;line-height:1.5;color:var(--muted)}
.site-foot .wrap{display:flex;flex-direction:column;gap:14px}
.foot-links{display:flex;flex-wrap:wrap;gap:4px 20px}
.foot-links a{display:inline-flex;align-items:center;min-height:44px;color:var(--ink)}
@media (min-width:900px){
  .site-foot .wrap{flex-direction:row;justify-content:space-between;align-items:center}
}
.sending{display:inline-flex;align-items:center;gap:10px}

/* === Дизайн 31.10: вход в веб-версию === */
.head-end{display:flex;align-items:center;gap:10px}
.btn-head{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:15px;border:1px solid var(--accent);background:var(--surface);color:var(--ink);font:600 .9375rem/1 XHSans,sans-serif;text-decoration:none}
.btn-head svg{width:18px;height:18px;flex:none;color:var(--accent)}
.btn-head:hover{background:var(--wash)}
.btn-head:focus-visible,.hero-acts .btn:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
.hero-acts{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:6px}
.hero-acts .btn{margin:0}
.hero-note{font:400 .875rem/1.5 XHSans,sans-serif;color:var(--muted);margin:0;max-width:34em}
@media (max-width:420px){.hero-acts{flex-direction:column;align-items:stretch}.btn-head{padding:0;width:44px;justify-content:center}.btn-head span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}
@media (min-width:900px){
  .hero-text .hero-acts{grid-column:2;grid-row:1 / span 3;align-self:end;flex-direction:column;align-items:stretch;margin:0}
  .hero-text .hero-note{grid-column:2;max-width:22em}
}
/* === Дизайн 31.10: лента без ролика === */
/* Первый слайд теперь узкий кадр, а не ролик во всю ширину: поле слева, как ::after справа, — чтобы он стоял по центру. */
.g-track::before{content:"";flex:0 0 max(0px,calc((100% - var(--shot-w)) / 2 - var(--g-gap)))}
