:root {
  --ink: #26262b; --paper: #fcfbf6; --grid: rgba(143,185,222,.35); --muted: #6b6a66;
  --green: #2f7d4f; --hl: #ffe14a; --card: #ffffff; --line: #e4e1d6;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink); font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
#app { max-width: 480px; margin: 0 auto; padding: 16px 16px 120px; }
.hand { font-family: "Caveat", cursive; font-weight: 700; }
h1 { font-family: "Caveat", cursive; font-size: 40px; line-height: 1; margin: 8px 0 4px; }
h1 .mark { background: linear-gradient(transparent 55%, rgba(255,225,74,.7) 55%); padding: 0 4px; }
.sub { color: var(--muted); margin: 0 0 18px; }
.back { background: none; border: 0; font-size: 16px; color: var(--muted); padding: 4px 0; cursor: pointer; }

.card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 2px solid var(--ink);
  border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.card.off { border-color: #c9c6bb; box-shadow: none; cursor: default; color: #9a988f; }
.card svg { flex: 0 0 52px; height: 58px; }
.card .t { font-weight: 600; }
.card .m { font-size: 14px; color: var(--muted); }
.badge { margin-left: auto; font-size: 12px; border: 1px solid #c9c6bb; border-radius: 99px; padding: 2px 8px; white-space: nowrap; }

.toggle { display: flex; background: #ebe8dd; border-radius: 12px; padding: 4px; margin: 14px 0; }
.toggle button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 9px; font-size: 15px; cursor: pointer; color: var(--muted); }
.toggle button small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.toggle button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.15); }

.where { background: rgba(255,225,74,.35); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.ex { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ex svg { flex: 0 0 48px; height: 52px; }
.ex .n { width: 22px; color: var(--muted); font-size: 14px; }
.ex .t { flex: 1; }
.ex .d { color: var(--muted); font-size: 14px; white-space: nowrap; }
.mine { font-size: 11px; color: var(--green); border: 1px solid var(--green); border-radius: 99px; padding: 0 6px; margin-left: 4px; vertical-align: 1px; }

.cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--paper) 30%); }
.cta button, .btn { display: block; width: 100%; max-width: 448px; margin: 0 auto; border: 0; border-radius: 14px; padding: 16px;
  background: var(--ink); color: #fff; font-size: 18px; font-weight: 600; cursor: pointer; }

/* плеер */
.player { display: flex; flex-direction: column; min-height: calc(100vh - 32px); }
.bar { display: flex; gap: 3px; margin: 6px 0 10px; }
.bar i { flex: 1; height: 5px; border-radius: 3px; background: #ddd9cc; }
.bar i.ok { background: var(--ink); }
.bar i.cur { background: var(--green); }
.top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; }
.top button { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.stage { width: 100%; aspect-ratio: 400 / 330; }
.stage.tall { aspect-ratio: 400 / 380; }
.stagebox { position: relative; }
.vw { position: absolute; top: 2px; left: 0; display: flex; background: var(--card); border: 2px solid var(--ink); border-radius: 99px; padding: 2px; box-shadow: 2px 2px 0 var(--ink); }
.vw[hidden] { display: none; }
.vw button { border: 0; background: none; border-radius: 99px; padding: 5px 13px; font-family: "Caveat", cursive; font-size: 19px; line-height: 1; color: var(--ink); cursor: pointer; }
.vw button.on { background: var(--ink); color: #fff; }
.info { display: flow-root; }
.cmap { position: absolute; top: 0; right: 0; width: 30%; max-width: 128px; background: var(--card); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); }
.label { font-size: 14px; color: var(--green); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; min-height: 20px; }
.name { font-family: "Caveat", cursive; font-size: 36px; line-height: 1.05; margin: 2px 0 6px; }
.hint { color: var(--muted); min-height: 44px; }
.dose { font-weight: 600; }
.goal { color: var(--green); font-weight: 600; min-height: 22px; margin-top: 4px; }
.timer { font-family: "Caveat", cursive; font-size: 88px; line-height: 1; text-align: center; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.tbar { height: 8px; background: #ddd9cc; border-radius: 4px; overflow: hidden; }
.tbar b { display: block; height: 100%; background: var(--green); width: 0; }
.ctrl { display: flex; justify-content: center; gap: 18px; margin-top: auto; padding-top: 16px; }
.ctrl button { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); font-size: 22px; cursor: pointer; }
.ctrl button.main { width: 80px; height: 80px; background: var(--ink); color: #fff; font-size: 28px; }
.rest .stage { opacity: .55; }

.done { text-align: center; padding-top: 30px; }
.done .big { font-family: "Caveat", cursive; font-size: 56px; line-height: 1; }
.stats { display: flex; gap: 10px; margin: 24px 0; }
.stats div { flex: 1; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 12px 6px; }
.stats b { display: block; font-family: "Caveat", cursive; font-size: 40px; line-height: 1; }
.stats span { font-size: 13px; color: var(--muted); }

.addon { display: flex; align-items: center; gap: 12px; background: var(--card); border: 2px dashed var(--green); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; cursor: pointer; }
.addon span { flex: 1; font-size: 15px; }
.addon small { display: block; color: var(--muted); font-size: 13px; }
.addon input { display: none; }
.addon i { flex: 0 0 46px; height: 28px; border-radius: 14px; background: #d6d2c4; position: relative; transition: .2s; }
.addon i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.addon input:checked + i { background: var(--green); }
.addon input:checked + i::after { left: 21px; }
.sep { font-size: 13px; font-weight: 600; color: var(--green); text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 2px; }
.ex.pre { opacity: .75; }

.ex .d2 { display: block; color: var(--muted); font-size: 13px; }
.swap { flex: 0 0 auto; border: 1.5px solid var(--green); color: var(--green); background: var(--card); border-radius: 10px; padding: 4px 10px; font-size: 16px; cursor: pointer; }
body.tg .back { display: none; }
.langs { float: right; display: flex; gap: 4px; margin-top: 6px; }
.langs button { border: 1.5px solid var(--ink); background: var(--card); border-radius: 8px; padding: 3px 8px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); }
.langs button.on { background: var(--ink); color: #fff; }
h2.sec { font-family: "Caveat", cursive; font-size: 30px; margin: 4px 0 10px; }
/* нижнее меню и главная в один экран */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; background: var(--card);
  border-top: 2px solid var(--ink); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabs button { flex: 1; max-width: 120px; border: 0; background: none; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 2px 0; cursor: pointer; }
.tabs button.on { color: var(--ink); font-weight: 700; }
body.fit { min-height: 0; overflow: hidden; }
body.fit #app { height: var(--tg-viewport-stable-height, 100dvh); display: flex; flex-direction: column; overflow: hidden;
  padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
.stub { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; color: var(--muted); padding: 0 12px; }
.stub .big { font-family: "Caveat", cursive; font-size: 44px; color: var(--ink); }
#app { position: relative; }
body.fit .langs { position: absolute; top: 18px; right: 16px; margin: 0; }
body.fit h1 { padding-right: 96px; }

/* конструктор: шаги-плитки */
body.fit .sub.how { font-size: 15px; margin: 2px 0 10px; }
.prog { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.steps { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: clamp(10px, 2.2vh, 26px); }
.step .pl { font-family: "Caveat", cursive; font-size: 27px; line-height: 1; margin: 0 0 7px; display: flex; align-items: center; gap: 8px; }
.step .pl b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff;
  font: 700 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1 1 0; min-width: 0; border: 2px solid var(--ink); background: var(--card); border-radius: 14px; padding: 12px 6px;
  font-size: 18px; font-weight: 600; color: var(--ink); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.seg button.on { background: var(--hl); box-shadow: 0 0 0 var(--ink); transform: translate(2px, 2px); }
.seg.tiles button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: clamp(84px, 13vh, 132px); padding: 8px 4px; font-size: 16px; line-height: 1.15; }
.seg.tiles svg { height: clamp(44px, 7.5vh, 80px); width: auto; flex: 0 0 auto; }
.prog .go { flex: 0 0 auto; display: block; width: 100%; margin: 14px 0 6px; border: 2px solid var(--ink); border-radius: 16px; padding: 18px;
  font-size: 20px; font-weight: 800; background: var(--ink); color: #fff; box-shadow: 0 4px 0 var(--hl); cursor: pointer; }
.prog .go:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--hl); }
.tabs svg.i { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.tabs svg.i .f { fill: currentColor; }
.tabs button { color: #9a988f; }
.tabs button.on { color: var(--ink); }
.tabs button.on svg.i { background: var(--hl); border-radius: 9px; }
@media (max-height: 700px) { body.fit h1 { font-size: 32px; } body.fit .sub.how { font-size: 13px; margin-bottom: 4px; }
  .step .pl { font-size: 23px; margin-bottom: 5px; } .seg button { padding: 9px 4px; font-size: 16px; } .seg.tiles button { font-size: 14px; }
  .prog .go { padding: 14px; font-size: 18px; margin-top: 10px; } }
/* плитки растут на высоких экранах */
.step { display: flex; flex-direction: column; }
.step.big { flex: 1 1 0; min-height: 0; max-height: 230px; }
.step.big .seg { flex: 1 1 auto; }
.seg.tiles button { min-height: 84px; }
.seg.tiles svg { height: auto; max-height: 62%; flex: 1 1 0; min-height: 40px; }
.seg-sub { flex-wrap: wrap; gap: 6px; }
.seg-sub button { flex: 1 1 auto; padding: 9px 7px; font-size: 14px; border-radius: 12px; white-space: nowrap; }
.steps.four .step.big { flex: 1 1 0; min-height: 104px; max-height: 190px; }
.steps.four .seg.tiles button { min-height: 70px; }
.steps.four .seg.tiles svg { min-height: 30px; }
.seg-min button { padding: clamp(10px, 1.8vh, 18px) 6px; }
/* раздел «Курсы» */
.subcard { background: var(--ink); color: #fff; border-radius: 16px; padding: 14px 16px 16px; margin: 4px 0 16px; box-shadow: 3px 3px 0 var(--hl); }
.subcard .st { font-family: "Caveat", cursive; font-size: 28px; line-height: 1.1; }
.subcard .sp { font-weight: 700; font-size: 17px; color: var(--hl); margin-top: 4px; }
.subn { font-size: 14px; color: var(--muted); margin: -6px 0 12px; }
.subcard ul { margin: 8px 0 12px; padding-left: 20px; font-size: 15px; line-height: 1.45; color: #e8e6df; }
.subcard .wait { width: 100%; border: 0; border-radius: 12px; padding: 12px; font-size: 16px; font-weight: 700; background: var(--hl); color: var(--ink); cursor: pointer; }
.subcard .wait.ok { background: #3c3c44; color: #cfe9b8; }
.course { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink); padding: 12px 14px; margin-bottom: 12px; }
.course svg { flex: 0 0 56px; height: 72px; }
.course .cb { flex: 1; min-width: 0; }
.course .t { font-weight: 700; font-size: 17px; }
.course .t::after { content: " 🔒"; font-size: 13px; }
.course .d { font-size: 14px; color: var(--muted); margin: 3px 0 10px; line-height: 1.35; }
.course button { border: 2px solid var(--ink); background: var(--hl); border-radius: 10px; padding: 8px 12px; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.course .fv { font-size: 12px; color: var(--muted); margin-left: 8px; }
/* 4 шага на маленьком экране: прячем подсказку, плитки ниже */
@media (max-height: 700px) { body.fit .sub.how { display: none; } .steps.four .step.big { min-height: 88px; } .steps.four .seg.tiles button { min-height: 60px; }
  .seg-sub button { padding: 7px 6px; } }
/* главная 15.11 (v=34): заголовок в строку, подписи-вопросы, «Какая» — список, кнопка над временем */
body.fit h1.one { text-align: center; white-space: nowrap; font-size: clamp(28px, 9.4vw, 42px); padding-right: 0; margin-top: 10px; }
.dd { position: relative; display: block; width: 100%; text-align: left; border: 2px solid var(--ink); background: var(--hl); border-radius: 14px;
  padding: 12px 44px 12px 14px; font-size: 17px; font-weight: 600; color: var(--ink); box-shadow: 2px 2px 0 var(--ink); cursor: pointer; }
.dd::after { content: ""; position: absolute; right: 18px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(28,28,32,0); display: flex; align-items: center; justify-content: center; padding: 16px; transition: background .2s; }
.sheet-bg.in { background: rgba(28,28,32,.45); }
.sheet { width: 100%; max-width: 440px; background: var(--paper); border: 2px solid var(--ink); border-radius: 20px;
  padding: 14px 16px 18px; transform: translateY(60px); opacity: 0; transition: transform .22s ease-out, opacity .22s; box-shadow: 4px 4px 0 var(--hl); }
.sheet-bg.in .sheet { transform: none; opacity: 1; }
.sh-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sh-h b { font-family: "Caveat", cursive; font-size: 28px; font-weight: 700; }
.sh-x { border: 2px solid var(--ink); background: var(--card); border-radius: 50%; width: 34px; height: 34px; font-size: 16px; cursor: pointer; color: var(--ink); }
.sh-o { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 8px; border: 2px solid var(--ink); background: var(--card);
  border-radius: 14px; padding: 14px 16px; font-size: 18px; font-weight: 600; color: var(--ink); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); text-align: left; }
.sh-o.on { background: var(--hl); }
.sh-o i { font-style: normal; font-weight: 800; }
.steps .go { margin: 4px 0 0; }
/* шапка главной на своём фоне (v=36) */
body.fit h1.one { margin: -16px -16px 14px; padding: calc(14px + env(safe-area-inset-top)) 16px 12px; background: var(--ink); color: #fff;
  border-bottom: 4px solid var(--hl); border-radius: 0 0 22px 22px; }
body.fit h1.one .mark { background: none; color: var(--hl); padding: 0; }
/* нижнее меню по ширине шапки/колонки (v=39): на компьютере — колонка 480 px, на телефоне — весь экран */
.tabs { left: 50%; right: auto; width: 100%; max-width: 480px; transform: translateX(-50%); }
@media (min-width: 481px) { .tabs { border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); border-radius: 22px 22px 0 0; } }
/* личный кабинет (15.11) */
.pf-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.ava { position: relative; flex: 0 0 84px; height: 84px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--hl); cursor: pointer;
  display: grid; place-items: center; box-shadow: 3px 3px 0 var(--ink); }
.ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ava span { font-family: "Caveat", cursive; font-size: 44px; font-weight: 700; }
.ava i { position: absolute; right: -4px; bottom: -2px; font-style: normal; font-size: 15px; background: var(--card); border: 2px solid var(--ink); border-radius: 50%;
  width: 30px; height: 30px; display: grid; place-items: center; }
.pf-n { min-width: 0; }
.pf-n .nm { font-family: "Caveat", cursive; font-size: 34px; line-height: 1; font-weight: 700; overflow-wrap: anywhere; }
.pf-n .mt { color: var(--muted); font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.subst { background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 16px 14px; box-shadow: 3px 3px 0 var(--hl); margin-bottom: 18px; }
.subst .sl { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #b9b7ae; }
.subst .sv { font-family: "Caveat", cursive; font-size: 28px; line-height: 1.1; color: var(--hl); }
.subst .sd { font-size: 14px; color: #e8e6df; }
.subst .sd2 { font-size: 14px; color: #b9b7ae; margin-top: 6px; }
.subst .sbtn { display: flex; gap: 8px; margin-top: 10px; }
.subst .sbtn button { flex: 1; border: 0; border-radius: 12px; padding: 10px 8px; font-size: 14px; font-weight: 700; cursor: pointer; }
.subst .wait { background: var(--hl); color: var(--ink); }
.subst .wait.ok { background: #3c3c44; color: #cfe9b8; }
.subst .more { background: transparent; color: #fff; border: 1.5px solid #6b6a72 !important; }
.form { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); padding: 4px 14px; margin-bottom: 18px; }
.form label, .form .fr { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.form > :last-child { border-bottom: 0; }
.form span { flex: 0 0 96px; font-size: 14px; color: var(--muted); }
.form input { flex: 1; min-width: 0; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: 17px; font-weight: 600; color: var(--ink); padding: 4px 0; outline: none; }
.form input:focus { border-bottom-color: var(--hl); }
.form .dd { flex: 1; min-width: 0; padding: 8px 36px 8px 12px; font-size: 15px; box-shadow: 1px 1px 0 var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form .seg { flex: 1; }
.form .seg button { padding: 8px 4px; font-size: 15px; }
.hist .sep { margin-top: 14px; }
.hi { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.hi .ok { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.hi.no .ok { background: #d6d2c4; color: var(--ink); }
.hi .hb { flex: 1; min-width: 0; }
.hi .t { font-weight: 600; }
.hi .m { font-size: 13px; color: var(--muted); }
.hi .rep { flex: 0 0 auto; border: 1.5px solid var(--ink); background: var(--card); border-radius: 10px; width: 38px; height: 34px; font-size: 18px; cursor: pointer; }
.empty { text-align: center; color: var(--muted); padding: 10px 0; }
.empty .btn { margin-top: 8px; }
.done .btn2 { display: block; width: 100%; max-width: 448px; margin: 10px auto 0; border: 2px solid var(--ink); border-radius: 14px; padding: 14px;
  background: var(--card); color: var(--ink); font-size: 16px; font-weight: 600; cursor: pointer; }
/* длинные списки в окне выбора — прокрутка */
.sheet { max-height: calc(100dvh - 32px); overflow-y: auto; }
.sh-o { padding: 12px 14px; font-size: 16px; }
.tabs button { font-size: 10.5px; }
.player .timer { clear: both; }
/* плеер: текст упражнения и таймер — отдельными карточками в стиле «бумага + маркер» (Владимир, 15.11) */
.player .txt { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); padding: 8px 14px 10px; margin-top: 12px; }
.player .label:empty { display: none; }
/* надпись (Приготовься / Отдых / Другая сторона / Нажми ▶) — поверх картинки внизу, картинка не прыгает (16.11) */
.player .stagebox .label { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 3; min-height: 0; white-space: nowrap; background: #fff; border: 2px solid var(--green); border-radius: 999px; padding: 3px 12px; pointer-events: none; }
.player .txt .hint { min-height: 0; }
.player .txt .goal:empty { display: none; }
.player .tm { margin-top: 2px; }
.player .tm .timer { margin: 0; }
/* бегунок: прямоугольник «корт» с рамкой, внутри зелёная заливка пройденного и катящийся мяч */
.player .trk { position: relative; height: 34px; border: 2.5px solid var(--ink); border-radius: 7px; background: #fff; overflow: hidden; }
.player .trk .ln { position: absolute; left: 10px; right: 10px; top: 50%; height: 2px; margin-top: -1px; background: var(--ink); opacity: .15; }
.player .trk .dn { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #9cc9a6; }
.player .trk .tb { position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.player.rest .trk .dn { background: #f3dc6b; }
/* таймер — вариант B (Владимир, 15.11): цифры и мяч в одном прямоугольнике */
.player.tmB .tm { display: flex; align-items: center; gap: 12px; border: 2.5px solid var(--ink); border-radius: 10px; background: #fff; box-shadow: 3px 3px 0 var(--ink); padding: 2px 14px 2px 16px; margin-top: 4px; }
.player.tmB .tm .timer { font-size: 52px; text-align: left; min-width: 2.1em; }
.player.tmB .trk { flex: 1; border-width: 2px; height: 26px; border-radius: 6px; }
.player.tmB .trk .tb { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
/* кнопка звука таймера */
.top .snd { margin-left: auto; margin-right: 10px; display: flex; align-items: center; color: var(--ink); padding: 2px; }
.top .snd.off { color: var(--muted); }

/* плеер с шапкой и меню + «Мой результат» (16.11) */
h1.one.phead { margin: -16px -16px 10px; padding: calc(12px + env(safe-area-inset-top)) 16px 10px; background: var(--ink); color: #fff; border-bottom: 4px solid var(--hl);
  border-radius: 0 0 22px 22px; text-align: center; white-space: nowrap; font-size: clamp(26px, 8.4vw, 36px); }
h1.one.phead .mark { background: none; color: var(--hl); padding: 0; }
.player { min-height: calc(100dvh - 190px); }
.player .gb { display: flex; gap: 10px; margin-top: 8px; }
.player .gb[hidden] { display: none; }
.player .gb > * { flex: 1; display: flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 12px; padding: 5px 10px; background: #fff; font: inherit; color: var(--ink); text-align: left; box-shadow: 2px 2px 0 var(--ink); }
.player .gb > * > div { display: flex; flex-direction: column; min-width: 0; }
.player .gb span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.player .gb b { font-family: "Caveat", cursive; font-size: 30px; line-height: .95; }
.player .gb small { font-size: 12px; color: var(--muted); line-height: 1.1; }
.gi { width: 32px; height: 32px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.gi .f { fill: currentColor; }
.player .gb .gr { cursor: pointer; background: var(--hl); }
.player .gb.ok .gt { background: #dff0e3; border-color: var(--green); box-shadow: 2px 2px 0 var(--green); color: var(--green); }
.toast .gi { width: 22px; height: 22px; vertical-align: -5px; margin-right: 6px; color: var(--hl); }
/* плеер на один экран (16.11): ⏮ ⏭ — вверху у счётчика, пауза — в полосе таймера, нижних кнопок нет */
.player { min-height: 0; }
.player .top { gap: 6px; }
.player .top .prev, .player .top .next { width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; }
.player .top .cnt { min-width: 44px; text-align: center; font-weight: 700; color: var(--ink); }
.player .top svg { width: 20px; height: 20px; }
.player.tmB .tm .play { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; margin-left: -6px; }
.player.tmB .tm .play svg { width: 22px; height: 22px; }
.player.tmB .tm .timer { font-size: 46px; min-width: 1.9em; }
.player .bar { margin: 6px 0 4px; }
.numgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-height: 60vh; overflow-y: auto; padding: 2px 3px 4px 0; }
.numgrid button { border: 2px solid var(--ink); background: var(--card); border-radius: 12px; font: 700 20px/1 -apple-system, sans-serif; padding: 12px 0; color: var(--ink); cursor: pointer; }
.numgrid button.on { background: var(--hl); }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; z-index: 60; background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 700; transition: .25s; white-space: nowrap; }
.toast.in { transform: translate(-50%, 0); opacity: 1; }
/* плеер = один экран: картинка занимает, сколько осталось, текст и кнопки видны целиком (16.11) */
body.pl #app { height: var(--tg-viewport-stable-height, 100dvh); display: flex; flex-direction: column; padding-bottom: calc(66px + env(safe-area-inset-bottom)); overflow: hidden; }
body.pl .player { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.pl .player .stagebox { flex: 1 1 0; min-height: 110px; }
body.pl .player .stage { width: 100%; height: 100%; aspect-ratio: auto; }
body.pl .player .tm, body.pl .player .top, body.pl .player .bar { flex: none; }
body.pl .player .txt { flex: 0 1 auto; min-height: 0; overflow-y: auto; margin-top: 8px; }
body.pl .player .name { font-size: 32px; line-height: 1; }

/* «Школа» (21.11) */
.stub.school p { color: var(--ink); margin: 6px 0 10px; }
.stub.school ul { list-style: none; padding: 0; margin: 0 0 22px; color: var(--ink); font-weight: 600; line-height: 1.9; }
.stub.school ul li::before { content: "🎾 "; }

/* главная: только уровни NTRP (21.11, v=97) */
.lvsteps { gap: clamp(10px, 2.4vh, 26px); }
.lvsteps .step .pl { justify-content: center; }
.lvhow { color: var(--muted); font-size: 15px; line-height: 1.35; text-align: center; margin: 0 6px; }
.lvrail { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 10px 0 14px; touch-action: none; }
.lvrail::before { content: ""; position: absolute; left: 18px; right: 18px; top: calc(50% - 2px); height: 3px; background: var(--ink); border-radius: 2px; }
.lvrail button { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 2.5px solid var(--ink); background: #fff;
  font: 700 18px/1 system-ui, sans-serif; color: var(--ink); padding: 0; transition: transform .12s; }
.lvrail button.pro { font-size: 15px; }
.lvrail button.pro::after { content: "PRO"; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 3px; font-size: 10px; letter-spacing: .5px; color: var(--muted); }
.lvrail button.on { background: var(--hl); transform: scale(1.25); box-shadow: 2px 3px 0 var(--ink); }
.lvrail button.on.pro::after { display: none; }
.lvrow { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 92px; }
.lvst { width: 80px; height: 112px; flex: none; } .lvst svg { width: 100%; height: 100%; }
.lvcap { text-align: left; line-height: 1.15; min-width: 170px; }
.gorow { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.gorow .side { flex: 1 1 0; max-width: 90px; } .gorow .side svg { width: 100%; height: auto; display: block; }
.gorow .go.gob { flex: 1 1 auto; }
.lvcap b { display: block; font-family: "Caveat", cursive; font-size: 28px; }
.lvcap span { color: var(--muted); font-size: 15px; }
/* большая кнопка — варианты */
.prog .go.goa { align-self: center; width: clamp(150px, 46vw, 200px); height: clamp(150px, 46vw, 200px); padding: 0; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 35% 30%, #f4ff7a, #d7ec2a 55%, #b5cc12); border: 3px solid var(--ink); box-shadow: 4px 6px 0 var(--ink);
  color: var(--ink); font: 800 19px/1.15 system-ui, sans-serif; margin: 6px auto 4px; }
.prog .go.goa .seam { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; opacity: .9; }
.prog .go.goa span { position: relative; text-shadow: 0 0 6px rgba(255,255,255,.7); }
.prog .go.goa:active { transform: translateY(3px); box-shadow: 2px 3px 0 var(--ink); }
.prog .go.gob { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px 16px; font-size: 22px; border-radius: 22px; }
.prog .go.gob .ball { width: 40px; height: 40px; flex: none; }
.prog .go.gob .ball circle { fill: #d7ec2a; stroke: var(--hl); stroke-width: 2; }
.prog .go.gob .ball path { fill: none; stroke: #fff; stroke-width: 2.5; }
.prog .go.goc { align-self: center; width: clamp(150px, 46vw, 196px); height: clamp(150px, 46vw, 196px); padding: 0; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 20px; line-height: 1.15; border: 4px solid var(--hl); margin: 6px auto 4px; }
.prog .go.goc i { font-style: normal; color: var(--hl); font-size: 28px; }
@media (max-height: 700px) { .lvhow { font-size: 13px; } .lvst { width: 64px; height: 88px; } .lvrow { min-height: 80px; }
  .prog .go.goa, .prog .go.goc { width: 140px; height: 140px; font-size: 17px; } .gorow .side { max-width: 70px; } }
.gorow:has(.gob) .side { display: none; }

/* главная v=100 (Владимир 21.11): крупнее подписи, зелёная кнопка, картинка сверху */
.lvsteps .step .pl { font-size: 36px; margin-bottom: 10px; }
.lvsteps .step .pl b { width: 32px; height: 32px; font-size: 18px; }
.lvcap b { font-size: 40px; line-height: 1; }
.lvcap span { font-size: 16px; }
.hero { flex: 1 1 0; min-height: 0; max-height: 240px; position: relative; overflow: hidden; }
.hero svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* v=101: кнопка снова чёрная; ?btn=y — жёлтая с чёрным мячом (идея) */
.prog .go.goy { background: var(--hl); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); }
.prog .go.goy:active { box-shadow: 0 2px 0 var(--ink); }
.prog .go.goy .ball circle { fill: var(--ink); stroke: var(--ink); }
.prog .go.goy .ball path { stroke: #fff; }
.lvcap { text-align: center; min-width: 0; }
.lvex { text-align: center; color: var(--muted); font-size: 14px; line-height: 1.25; min-height: 18px; margin-top: -6px; padding: 0 8px; }
.lvex b { color: var(--ink); font-weight: 600; }
@media (max-height: 700px) { .lvsteps .step .pl { font-size: 30px; } .lvcap b { font-size: 34px; } }
@media (max-height: 700px) { .prog .go.gob { padding: 13px 16px; font-size: 20px; } .lvcap b { font-size: 30px; } .lvsteps .step .pl { font-size: 28px; margin-bottom: 4px; } .lvsteps { gap: 8px; } }

/* v=102: уровень + описание + корт — в карточке на белом фоне */
.lvcard { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; background: #fff; border: 2.5px solid var(--ink); border-radius: 20px;
  box-shadow: 0 4px 0 var(--ink); padding: 12px 10px 8px; }
.lvcard .hero { border-radius: 12px; }
/* v=103: карточка не растягивается — корт фиксированной высоты, лишнего пустого места нет; на кружке «PRO» */
.lvcard { flex: 0 0 auto; }
.lvcard .hero { flex: 0 0 auto; height: clamp(110px, 25vh, 230px); max-height: none; }
.lvrail button.pro { font-size: 11px; letter-spacing: -.2px; }
.lvrail button.pro::after { display: none; }

/* v=104 (Владимир): три блока — уровень, время, кнопка. Отступ от шапки и от меню одинаковый (14 px),
   между блоками — одинаковые и крупнее (делят остаток экрана поровну, не меньше 18 px) */
.prog .lvsteps { justify-content: space-between; gap: 18px; padding: 14px 0; }
.lvsteps .lvtime { gap: 0; padding: 12px 10px 14px; }
.lvsteps .step .pl { margin-bottom: 10px; }
.prog .lvsteps .go { margin: 0; }
.lvcard .hero { height: clamp(110px, 27vh, 260px); }
/* v=104: корт сжимается, если экрану не хватает высоты; заголовки в одну строку */
.prog .lvsteps .lvcard { flex: 0 1 auto; min-height: 0; }
.prog .lvsteps .lvtime { flex: 0 0 auto; }
.lvcard .hero { flex: 0 1 auto; height: 240px; min-height: 100px; }
.lvsteps .step .pl { white-space: nowrap; font-size: clamp(26px, 8.4vw, 36px); }
.prog .lvsteps { min-height: 0; flex: 1 1 0; }
.prog .lvsteps { padding: 10px 0 17px; gap: 22px; justify-content: center; } /* 21.11: между блоками 22 px, свободное место — к шапке и меню */

@media (max-height: 700px) { .prog .lvsteps { gap: 14px; padding: 8px 0 12px; } .lvcard .hero { min-height: 70px; } } /* 21.11: маленький экран — корт не вылезает из карточки */
