/* Оболочка «Вдвоём» — направление A «Тёплое стекло»: песок, Onest, шапка, стеклянное нижнее меню, кнопки, вход, заглушка.
   Токены — tokens.css. Лист и тост — ui.css. Раздел «Тренировки» — training*.css, онбординг — onboard.css, плеер — player.css.

   УТИЛИТЫ ДЛЯ ДРУГИХ CSS
     .display     40/1.02/800, -.04em: заголовок экрана; .display.lg 44
     .title       22/1.15/800, -.025em
     .card-title  19/1.2/800, -.02em
     .num         36/1/800 tabular; .num.lg 56; .num.sm 28
     .unit        14/700 --ink-2
     .meta        13/600 --ink-3
     .micro       12/700
     .lead        16/1.4/500 --ink-2
     .sr          визуально скрытый текст
     .btn         вторичная кнопка (52px капсула, --tint); .btn.pri чёрная 56px (--ink/--on-ink, --sh-btn); .btn.sm высота 44
     .btns        ряд кнопок; .empty — пустое состояние; .round — круглая кнопка 44px (--tint)
     .dot-pill    пилюля-метка nowrap; .card — карточка --surface + --sh-card, --r-xl; .grain — пустышка */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;background:var(--bg)}
body{margin:0;min-height:100dvh;background:radial-gradient(120% 420px at 0% 0%,rgba(255,233,207,.85) 0%,rgba(255,233,207,0) 70%) no-repeat,radial-gradient(90% 360px at 100% 0%,rgba(243,223,203,.6) 0%,rgba(243,223,203,0) 75%) no-repeat,var(--bg);color:var(--ink);font-family:var(--font);font-size:16px;font-weight:500;line-height:1.4;font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-webkit-tap-highlight-color:transparent}
button,a{font:inherit;color:inherit;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button{background:none;border:0;padding:0;cursor:pointer}
a{text-decoration:none}
svg{display:block}
::selection{background:var(--accent-soft);color:var(--ink)}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:12px}
h1,h2,h3{margin:0;text-wrap:balance}
p{margin:0}
[hidden]{display:none!important}
.wrap{max-width:560px;margin:0 auto;padding-left:max(20px,var(--safe-l));padding-right:max(20px,var(--safe-r))}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* типографика */
.display{font-size:40px;line-height:1.02;font-weight:800;letter-spacing:-.04em}
.display.lg{font-size:44px}
.title{font-size:22px;line-height:1.15;font-weight:800;letter-spacing:-.025em}
.card-title{font-size:19px;line-height:1.2;font-weight:800;letter-spacing:-.02em}
.num{font-size:36px;line-height:1;font-weight:800;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.num.lg{font-size:56px} .num.sm{font-size:28px}
.unit{font-size:14px;font-weight:700;color:var(--ink-2)}
.meta{font-size:13px;line-height:1.3;font-weight:600;color:var(--ink-3)}
.micro{font-size:12px;line-height:1.2;font-weight:700}
.lead{font-size:16px;line-height:1.4;font-weight:500;color:var(--ink-2);text-wrap:balance}

.card{border-radius:var(--r-xl);padding:18px;background:var(--surface);box-shadow:var(--sh-card)}
.glass,.glass-strong{border-radius:var(--r-xl);padding:18px;background:var(--surface);box-shadow:var(--sh-card)}
.dot-pill{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px;border-radius:999px;background:var(--tint);font-size:14px;font-weight:700;white-space:nowrap}
.dot-pill i{width:8px;height:8px;border-radius:50%;background:var(--accent);flex:none}

/* шапка: слева заголовок раздела, справа аккаунт; прокручивается со страницей */
.top{position:relative;z-index:20;padding-top:var(--safe-t)}
.top-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:var(--top-h)}
.top-title{font-weight:800;font-size:17px;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.top-left{display:flex;align-items:center;min-width:0;flex:1}

/* аккаунт: круглая кнопка 44 на молоке с тенью-предметом; .round — на подложке --tint */
.av,.round{width:44px;height:44px;display:grid;place-items:center;border-radius:50%;flex:none;user-select:none;-webkit-user-select:none;transition:transform .16s var(--ease),box-shadow .22s var(--ease)}
.av{background:var(--surface);box-shadow:var(--sh-card)}
.round{background:var(--tint)}
.av span{font-weight:700;font-size:17px;color:var(--ink)}
.av:active,.round:active{transform:scale(.97)}
.round svg{width:20px;height:20px;stroke:var(--ink);fill:none;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
.av:focus-visible,.round:focus-visible{border-radius:50%}

/* подменю раздела: вкладки с чёрной чертой */
.subtabs{display:flex;gap:4px;border-bottom:1px solid var(--line)}
.subtabs a{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;position:relative;flex:1;display:grid;place-items:center;min-height:44px;padding:0 4px;font-weight:600;font-size:15px;color:var(--ink-3);white-space:nowrap;transition:color .2s}
.subtabs a[aria-current="page"]{color:var(--ink);font-weight:700}
.subtabs a[aria-current="page"]::after{content:"";position:absolute;left:22%;right:22%;bottom:-1px;height:2px;border-radius:2px;background:var(--ink)}

main{padding-block:8px calc(var(--tabs-h) + 24px)}
.view{display:grid;gap:22px}

/* загрузка */
.skel{gap:12px}
.skel i{display:block;height:72px;border-radius:var(--r-xl);background:var(--bg2);animation:skel 1.2s ease-in-out infinite alternate}
.skel i:first-child{height:140px}
@keyframes skel{to{opacity:.5}}

/* нижнее меню: стекло, иконка и подпись, активный — чернила */
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:25;height:var(--tabs-h);padding-bottom:var(--safe-b);background:var(--glass-bar);-webkit-backdrop-filter:blur(22px) saturate(1.5);backdrop-filter:blur(22px) saturate(1.5);box-shadow:0 -1px 0 rgba(70,45,20,.08),0 -12px 24px -18px rgba(70,45,20,.25)}
.tabs .wrap{display:grid;grid-template-columns:repeat(5,1fr);height:100%;max-width:560px;padding:0 4px}
.tabs a{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:100%;min-width:0;color:var(--ink-3);font-size:11px;font-weight:600;white-space:nowrap;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;transition:color .2s}
.tabs a span{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.tabs a.soon{opacity:.5}
.tabs a[aria-current="page"]{color:var(--ink);opacity:1}
.tabs svg{width:25px;height:25px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;transition:transform .16s var(--ease)}
.tabs a[aria-current="page"] svg{stroke-width:2.2}
.tabs a:active svg{transform:scale(.94)}
.tabs a:focus-visible{outline-offset:-4px}

/* заглушка раздела */
.stub{display:grid;gap:20px;align-content:start}
.stub-card{display:grid;justify-items:start;align-content:end;gap:18px;min-height:280px;padding:24px 22px;border-radius:var(--r-xl);background:var(--g-hero);box-shadow:var(--sh-card)}
.stub .ic{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:var(--surface);box-shadow:var(--sh-card)}
.stub .ic svg{width:30px;height:30px;stroke:var(--ink);fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* кнопки */
.btns{display:flex;flex-wrap:wrap;gap:8px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:0 26px;border-radius:999px;background:var(--tint);color:var(--ink);font-weight:700;font-size:16px;letter-spacing:-.005em;white-space:nowrap;user-select:none;-webkit-user-select:none;transition:transform .16s var(--ease),box-shadow .22s var(--ease),background-color .2s}
.btn.sm{min-height:44px;padding:0 18px;font-size:15px}
.btn.pri{min-height:56px;background:var(--ink);color:var(--on-ink);font-weight:650;font-size:17px;box-shadow:var(--sh-btn)}
.btn.pri.sm{min-height:44px;font-size:15px}
.btn.red{background:var(--mark);color:#fff}
.btn:active{transform:scale(.97)}
.btn:disabled{opacity:.45;cursor:default}

/* пустое состояние */
.empty{display:grid;justify-items:center;gap:8px;text-align:center;padding:32px 16px;border-radius:var(--r-xl);background:var(--surface);box-shadow:var(--sh-card)}
.empty b{font-size:19px;font-weight:800;letter-spacing:-.02em}
.empty span{font-size:15px;color:var(--ink-2)}
.empty .btns{justify-content:center;margin-top:8px}

/* полоса «нет связи» */
.offline{padding:10px 20px;background:var(--ink);color:var(--on-ink);font-size:14px;font-weight:650;text-align:center}

/* знак «Вдвоём»: два пересекающихся кольца */
.logo{display:inline-block;width:30px;height:22px;flex:none}
.logo circle{fill:none;stroke-width:2.6;stroke:var(--ink)}

/* вход */
.login{position:relative;overflow:hidden;min-height:100dvh;display:grid;place-items:center;padding:24px max(20px,var(--safe-r)) calc(24px + var(--safe-b)) max(20px,var(--safe-l))}
.login .blob{position:absolute;top:-160px;right:-180px;width:460px;height:460px;border-radius:50%;background:var(--glow);pointer-events:none}
.login .blob.b2{top:auto;right:auto;bottom:-190px;left:-170px;width:380px;height:380px;opacity:.7}
.login form{position:relative;width:100%;max-width:360px;display:grid;gap:16px}
.login .brand{display:grid;justify-items:start;gap:16px;margin-bottom:16px}
.login .brand .logo{width:66px;height:48px}
.login h1{font-size:56px;line-height:1;font-weight:800;letter-spacing:-.045em}
.login label{display:grid;gap:8px;font-size:13px;font-weight:650;color:var(--ink-3)}
.login input{width:100%;min-height:56px;padding:0 18px;border-radius:var(--r-m);border:0;background:var(--surface);color:var(--ink);font:inherit;font-size:17px;font-weight:600;box-shadow:var(--sh-card);transition:box-shadow .22s var(--ease)}
.login input:focus-visible{outline:0;box-shadow:var(--sh-card),0 0 0 2px var(--ink)}
.login button{min-height:56px;border-radius:999px;background:var(--ink);color:var(--on-ink);font-weight:650;font-size:17px;letter-spacing:-.005em;margin-top:4px;box-shadow:var(--sh-btn);transition:transform .16s var(--ease)}
.login button:active{transform:scale(.97)}
.login button:disabled{opacity:.6}
.login .err{min-height:20px;color:var(--mark-ink);font-size:14px;font-weight:650}

@media (hover:hover){
  .btn:hover{background:#EBDAC8} .btn.pri:hover{background:#2A231D}
}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation:none!important;transition-duration:.01ms!important;transition-delay:0s!important}
  .btn:active,.av:active,.round:active,.tabs a:active svg,.login button:active{transform:none}
}
