/* MyGym — компоненти застосунку поверх стилю Pinly Travels («Liquid Glass») */
:root { --sk: rgba(var(--ink-rgb), .2); --warn: #ff9f0a; --danger: #ff453a; }
[data-theme="dark"] { --danger: #ff6961; }
.field--s { width: 110px; height: 44px; text-align: center; padding: 0 10px; border-radius: 14px; }
.sel { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b93a1' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.sel option { color: #111; }
.mini { font-size: .82rem; color: var(--muted); font-weight: 600; }
.tag { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: rgba(var(--accent-rgb), .16); color: var(--accent-text); white-space: nowrap; }
.tag--n { background: rgba(var(--ink-rgb), .08); color: var(--muted); }
.dg { color: var(--danger) !important; }
.link--l { justify-self: start; padding-left: 2px; }
.sp { flex: 1; min-width: 0; }
.rowc { display: flex; align-items: center; gap: 10px; }
.mut { color: var(--muted); }
.stitle { display: flex; align-items: center; gap: 10px; margin: 28px 2px 12px; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.stitle .count-pill { font-size: .8rem; padding: 2px 12px; }

/* ---------- Головна ---------- */
.cta-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin: 0 0 18px; }
.cta-row .btn { min-height: 56px; padding: 0 16px; }
.cta-row svg { flex: none; }
.next { padding: 20px; margin-bottom: 16px; display: grid; gap: 12px; }
.next__lbl { font-size: .74rem; font-weight: 800; letter-spacing: .12em; color: var(--accent-text); }
.next__title { font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.next__ex { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.week { padding: 16px 14px 14px; margin-bottom: 16px; }
.week__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px 12px; font-weight: 700; }
.week__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wd1 { display: grid; justify-items: center; gap: 6px; padding: 8px 0 10px; border-radius: 18px; font-size: .74rem; font-weight: 650; color: var(--muted); }
.wd1 i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 750; font-size: .85rem; color: var(--ink); background: rgba(var(--ink-rgb), .07); }
.wd1.has i { background: var(--accent); color: var(--accent-ink); box-shadow: 0 5px 14px rgba(var(--accent-rgb), .4); }
.wd1.today { background: rgba(var(--ink-rgb), .06); color: var(--ink); }
.wd1.today:not(.has) i { box-shadow: 0 0 0 2px var(--accent); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pcard { display: grid; gap: 10px; text-align: left; width: 100%; border: 0; padding: 18px; border-radius: 28px; cursor: pointer; color: inherit; transition: transform .5s var(--spring); }
.pcard:active { transform: scale(.97); }
.pcard__top { display: flex; align-items: center; gap: 10px; }
.pcard__top b { flex: 1; min-width: 0; font-size: 1.1rem; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard__days { display: flex; flex-wrap: wrap; gap: 6px; }
.pcard__days span { padding: 3px 10px; border-radius: 999px; background: rgba(var(--ink-rgb), .07); font-size: .78rem; font-weight: 600; color: var(--muted); }
.pcard__meta { font-size: .82rem; color: var(--muted); }
.empty { text-align: center; padding: 34px 20px; display: grid; justify-items: center; gap: 10px; }
.empty__ic { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--accent-rgb), .16); color: var(--accent-text); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-7px); } }
.empty b { font-size: 1.1rem; }
.empty p { margin: 0; color: var(--muted); font-size: .92rem; max-width: 26em; }
.rec { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; margin-bottom: 8px; border: 0; border-radius: 22px; text-align: left; cursor: pointer; color: inherit; transition: transform .5s var(--spring); }
.rec:active { transform: scale(.97); }
.rec b { display: block; font-size: .98rem; }
.rec small { color: var(--muted); font-size: .8rem; }
.rec .v { font-weight: 750; font-variant-numeric: tabular-nums; font-size: .9rem; white-space: nowrap; }

/* ---------- Плаваюча зона ---------- */
.float { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 55; width: min(520px, 100% - 24px); display: grid; gap: 8px; pointer-events: none; }
.float > * { pointer-events: auto; }
.live, .restbar { position: relative; overflow: hidden; border-radius: 26px; padding: 10px 12px 10px 18px; display: flex; align-items: center; gap: 10px; animation: vin .4s var(--ease); }
.live::after, .restbar::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgba(var(--panel-rgb), calc(var(--menu-a) * .5 + .5)); -webkit-backdrop-filter: blur(26px) saturate(190%); backdrop-filter: blur(26px) saturate(190%); }
.live__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }
.live__t { flex: 1; min-width: 0; font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live__t small { display: block; color: var(--muted); font-weight: 600; font-size: .78rem; font-variant-numeric: tabular-nums; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .88rem; }
.rp { position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 0; background: rgba(var(--accent-rgb), .24); transition: width .25s linear; }
.restbar > *:not(.rp) { position: relative; z-index: 1; }
.restbar b { flex: 1; font-size: 1.15rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.restbar b { display: grid; line-height: 1.1; }
.restbar b small { color: var(--muted); font-size: .64rem; font-weight: 750; letter-spacing: .1em; }
.restbar button { border: 0; border-radius: 999px; padding: 0 12px; flex: none; height: 38px; font-weight: 700; font-size: .85rem; background: rgba(var(--ink-rgb), .09); cursor: pointer; transition: transform .4s var(--spring); }
.restbar button:active { transform: scale(.9); }
.restbar button.pri { background: var(--accent); color: var(--accent-ink); }
.restbar.ok { justify-content: center; color: var(--accent-text); font-weight: 800; padding: 16px; }

/* ---------- Поля для чисел ---------- */
.num { width: 100%; height: 44px; padding: 0 4px; border: 1.5px solid transparent; border-radius: 14px; background: rgba(var(--ink-rgb), .07); color: var(--ink); text-align: center; font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; outline: 0; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.num:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18); }
.num::placeholder { color: var(--muted); opacity: .5; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(var(--ink-rgb), .07); }
.stepper button { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(var(--ink-rgb), .08); font-size: 1.25rem; font-weight: 700; cursor: pointer; line-height: 1; transition: transform .4s var(--spring); }
.stepper button:active { transform: scale(.82); }
.stepper b { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Тренування ---------- */
.wk-head { display: flex; align-items: center; gap: 10px; margin: 14px 0 14px; }
.wtitle { flex: 1; min-width: 0; height: 52px; padding: 0 6px; border: 0; background: transparent; color: var(--ink); text-overflow: ellipsis; font-size: clamp(1.15rem, 5vw, 1.9rem); font-weight: 800; letter-spacing: -.035em; outline: 0; border-radius: 14px; }
.wtitle:focus { background: rgba(var(--ink-rgb), .06); }
.wstats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 16px 8px; margin-bottom: 14px; text-align: center; }
.wstats div { display: grid; gap: 2px; }
.wstats b { font-size: 1.5rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wstats span { font-size: .76rem; color: var(--muted); font-weight: 650; }
.wex { padding: 16px 14px 14px; margin-bottom: 12px; border-radius: 28px; animation: vin .45s var(--ease) both; }
.wex__head { display: flex; align-items: center; gap: 8px; }
.wex__name { flex: 1; min-width: 0; text-align: left; padding: 4px 6px; border: 0; background: none; color: var(--accent-text); font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; cursor: pointer; line-height: 1.25; }
.wex__meta { padding: 0 6px; font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.hint { margin: 4px 0 8px; padding: 8px 12px; border-radius: 14px; background: rgba(var(--accent-rgb), .12); color: var(--accent-text); font-size: .82rem; font-weight: 600; line-height: 1.35; }
.srow { display: grid; grid-template-columns: 38px minmax(50px, .9fr) 1fr 1fr 46px; gap: 8px; align-items: center; margin-top: 8px; padding: 3px; border-radius: 18px; transition: background-color .3s; }
.srow.shd { margin-top: 4px; font-size: .7rem; font-weight: 750; letter-spacing: .06em; color: var(--muted); text-align: center; text-transform: uppercase; }
.srow.done { background: rgba(var(--accent-rgb), .14); }
.sno { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(var(--ink-rgb), .08); color: var(--muted); font-weight: 800; font-size: .88rem; cursor: pointer; justify-self: center; }
.sno.w { background: rgba(255,159,10,.22); color: var(--warn); }
.prev { text-align: center; font-size: .82rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.chk { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--ink-rgb), .08); color: var(--muted); cursor: pointer; transition: transform .45s var(--spring), background-color .25s; justify-self: center; }
.chk svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chk:active { transform: scale(.82); }
.srow.done .chk { background: var(--accent); color: var(--accent-ink); animation: pop .5s var(--spring); box-shadow: 0 4px 14px rgba(var(--accent-rgb), .45); }
@keyframes pop { 40% { transform: scale(1.25); } }
.pr { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: linear-gradient(135deg, #ffd60a, #ff9f0a); color: #3b2a00; font-size: .68rem; font-weight: 850; letter-spacing: .04em; vertical-align: 2px; }
.addset { width: 100%; margin-top: 10px; min-height: 46px; border: 0; border-radius: 16px; background: rgba(var(--ink-rgb), .07); font-weight: 650; cursor: pointer; transition: background-color .2s, transform .4s var(--spring); }
.addset:hover { background: rgba(var(--ink-rgb), .12); } .addset:active { transform: scale(.97); }
.wk-foot { display: grid; gap: 10px; margin-top: 14px; }
.ibtn--s { width: 38px; height: 38px; }
.ibtn.dg svg { stroke: var(--danger); }

/* ---------- Вправи ---------- */
.tools { display: flex; gap: 10px; margin: 0 0 10px; }
.tools .field { flex: 1; min-width: 0; }
.tools--2 { margin-bottom: 14px; }
.vhead .count-pill { margin-right: auto; }
.vhead__btn { min-height: 42px; padding: 0 18px; }
.list { display: grid; gap: 8px; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; border: 0; border-radius: 22px; text-align: left; cursor: pointer; color: inherit; background: rgba(var(--ink-rgb), .055); transition: background-color .25s, transform .5s var(--spring); }
.lrow:hover { background: rgba(var(--ink-rgb), .09); } .lrow:active { transform: scale(.97); }
.lrow b { display: block; font-size: .96rem; line-height: 1.25; }
.lrow small { color: var(--muted); font-size: .8rem; }
.lrow .chkm, .prow .chkm { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(var(--ink-rgb), .22); flex: none; display: grid; place-items: center; transition: all .3s var(--spring); }
.lrow .chkm svg, .prow .chkm svg { width: 14px; height: 14px; fill: none; stroke: var(--accent-ink); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.4); transition: all .3s var(--spring); }
.lrow.on, .prow.on { background: rgba(var(--accent-rgb), .16); box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .6); }
.lrow.on .chkm, .prow.on .chkm { background: var(--accent); border-color: var(--accent); } .lrow.on .chkm svg, .prow.on .chkm svg { opacity: 1; transform: none; }
.noresult { text-align: center; color: var(--muted); padding: 40px 10px; }
.demo { display: flex; justify-content: center; align-items: flex-end; gap: 6px; margin: 14px 0 10px; padding: 12px 8px; border-radius: 24px; background: rgba(var(--ink-rgb), .06); }
.demo figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.demo__mv { flex: 1.7 1 0; } .demo__bd { flex: 1 1 0; }
.demo figcaption { font-size: .76rem; color: var(--muted); }
.demo svg { width: 100%; height: auto; max-height: 260px; }
.demo__pl { min-height: 38px; padding: 0 16px; font-size: .85rem; margin: 0 0 10px; }
.steps { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-radius: 18px; background: rgba(var(--ink-rgb), .055); font-size: .93rem; line-height: 1.4; }
.steps li b { flex: none; width: 48px; color: var(--accent-text); }
.thumb { width: 58px; height: 58px; flex: none; border-radius: 16px; background: rgba(var(--ink-rgb), .07); display: grid; place-items: center; overflow: hidden; }
.thumb svg { width: 100%; height: 100%; }
.prow { display: flex; align-items: center; border-radius: 22px; background: rgba(var(--ink-rgb), .055); transition: background-color .25s, box-shadow .25s; }
.prow__main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 8px 4px 8px 8px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 22px; }
.prow__main b { display: block; font-size: .96rem; line-height: 1.25; } .prow__main small { color: var(--muted); font-size: .8rem; }
.prow__chk { flex: none; width: 60px; align-self: stretch; border: 0; background: none; color: inherit; display: grid; place-items: center; cursor: pointer; }
.mv path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sk { fill: var(--sk); stroke: var(--sk); stroke-linecap: round; }
.z { fill: rgba(var(--ink-rgb), .1); } .z.p { fill: var(--accent); animation: glow 1.4s infinite ease-in-out; } .z.s { fill: #f59e0b; opacity: .8; }
@keyframes glow { 50% { opacity: .45; } }
.lg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; margin: 6px 0 10px; }
.lg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.tile { padding: 12px 8px; border-radius: 18px; text-align: center; background: rgba(var(--ink-rgb), .06); }
.tile b { display: block; font-size: 1.15rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile span { font-size: .72rem; color: var(--muted); font-weight: 650; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 10px; font-weight: 600; }
.chart .ax { stroke: rgba(var(--ink-rgb), .12); stroke-width: 1; }
.chart .bar { fill: var(--accent); }
.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.chart .val { fill: var(--ink); font-weight: 750; }

/* ---------- Історія ---------- */
.hsum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.hsum .card { padding: 16px 8px; text-align: center; border-radius: 24px; }
.hsum b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.hsum span { font-size: .74rem; color: var(--muted); font-weight: 650; }
.chartcard { padding: 16px 16px 10px; margin-bottom: 8px; }
.chartcard h3 { margin: 0 0 8px; font-size: .95rem; }
.mhead { margin: 22px 4px 10px; font-size: .8rem; letter-spacing: .1em; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.hitem { margin-bottom: 10px; padding: 0; border-radius: 26px; overflow: hidden; }
.hitem__top { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 18px; border: 0; background: none; text-align: left; color: inherit; cursor: pointer; }
.hitem__top b { display: block; font-size: 1.02rem; letter-spacing: -.01em; }
.hitem__top small { color: var(--muted); font-size: .8rem; }
.hitem__top svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--spring); }
.hitem.open .hitem__top svg { transform: rotate(180deg); }
.hitem__body { display: none; padding: 0 18px 16px; }
.hitem.open .hitem__body { display: block; animation: vin .4s var(--ease); }
.hx { padding: 10px 0; border-top: 1px solid rgba(var(--ink-rgb), .09); }
.hx b { font-size: .94rem; }
.hx div { color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; line-height: 1.6; }
.hx .w { color: var(--warn); }
.hbtns { display: flex; gap: 8px; padding-top: 10px; }
.hbtns .btn { flex: 1; min-height: 44px; padding: 0 12px; font-size: .9rem; }

/* ---------- Редактор програм і листи ---------- */
.sheet--wide { width: min(600px, 100% - 24px); }
.sheet__foot { position: sticky; bottom: -24px; margin: 14px -22px -24px; padding: 14px 22px 22px; background: linear-gradient(to top, rgba(var(--panel-rgb), .98) 60%, rgba(var(--panel-rgb), 0)); display: grid; gap: 8px; }
.sheet__body > .stack { gap: 12px; }
.tpl { display: block; width: 100%; padding: 16px 18px; border: 0; border-radius: 22px; text-align: left; background: rgba(var(--ink-rgb), .06); color: inherit; cursor: pointer; transition: background-color .25s, transform .5s var(--spring); }
.tpl:hover { background: rgba(var(--ink-rgb), .1); } .tpl:active { transform: scale(.97); }
.tpl b { display: block; font-size: 1.02rem; margin-bottom: 2px; }
.tpl small { color: var(--muted); line-height: 1.4; display: block; }
.tpl--a { background: rgba(var(--accent-rgb), .16); box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .55); }
.eday { padding: 14px; margin-top: 10px; border-radius: 24px; background: rgba(var(--ink-rgb), .05); }
.eday__h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.eday__h .field { height: 44px; border-radius: 14px; font-weight: 700; }
.eex { padding: 10px 4px; border-top: 1px solid rgba(var(--ink-rgb), .09); }
.eex__n { display: flex; align-items: center; gap: 4px; font-weight: 650; font-size: .94rem; line-height: 1.25; }
.eex__n span { flex: 1; min-width: 0; padding: 2px 0; }
.eex__c { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.eex__c label { font-size: .72rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; display: flex; align-items: center; gap: 6px; }
.eex__c .num { width: 58px; height: 38px; border-radius: 12px; }
.eex__c .dash { color: var(--muted); }
.addrow { width: 100%; margin-top: 8px; min-height: 44px; border: 1.5px dashed rgba(var(--accent-rgb), .55); border-radius: 16px; background: transparent; color: var(--accent-text); font-weight: 700; cursor: pointer; transition: background-color .2s; }
.addrow:hover { background: rgba(var(--accent-rgb), .1); }
.pdn { padding: 14px; margin-bottom: 10px; border-radius: 22px; background: rgba(var(--ink-rgb), .05); }
.pdn.next { background: rgba(var(--accent-rgb), .12); box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .5); }
.pdn__h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pdn__h b { flex: 1; font-size: 1.02rem; }
.pdn ul { margin: 0 0 12px; padding: 0 0 0 4px; list-style: none; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.pdn li { display: flex; justify-content: space-between; gap: 10px; }
.pdn li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sumbig { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.sumbig .tile { padding: 16px 6px; } .sumbig .tile b { font-size: 1.4rem; }
.prl { display: grid; gap: 6px; margin: 8px 0 4px; }
.prl div { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px; background: rgba(255,214,10,.14); font-size: .9rem; font-weight: 650; }
.dlg__t { margin: 0 0 16px; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.dlg { display: grid; gap: 8px; }
textarea.field { height: auto; min-height: 84px; padding: 12px 16px; resize: vertical; line-height: 1.4; }
.err { min-height: 1.2em; }

/* ---------- Профіль і налаштування ---------- */
.prof { display: flex; align-items: center; gap: 16px; padding: 4px 0 2px; }
.prof__f { flex: 1; min-width: 0; display: grid; gap: 6px; }
.avabtn { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; flex: none; transition: transform .5s var(--spring); }
.avabtn:active { transform: scale(.93); }
.avabtn .ava { width: 84px; height: 84px; font-size: 2rem; }
.avabtn__cam { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.presets button { height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(var(--ink-rgb), .07); font-weight: 700; font-size: .9rem; cursor: pointer; transition: background-color .25s, transform .4s var(--spring); }
.presets button:active { transform: scale(.9); }
.presets button.on { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px rgba(var(--accent-rgb), .38); }
.row2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet__body { display: block; }

@media (min-width: 900px) {
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  main { width: min(860px, 100% - 32px); }
  .top { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
}
@media (max-width: 420px) {
  .cta-row { grid-template-columns: 1fr; }
  .srow { grid-template-columns: 32px minmax(44px, .8fr) 1fr 1fr 44px; gap: 6px; }
  .tiles, .sumbig { gap: 6px; }
}
.hero__title { font-size: clamp(2.3rem, 9.5vw, 5rem); }
.hero__title .wd { white-space: nowrap; }
.hdr__tools { margin-left: auto; }
.dock__ind.hide { opacity: 0; }

#v-wk { padding-bottom: 110px; }
.next .next__title { margin-bottom: 4px; }


/* ===== Друзі, ChatGPT-імпорт ===== */
.dock button.has::after { content: ""; position: absolute; top: 9px; right: 18px; width: 10px; height: 10px; border-radius: 50%; background: #ff453a; box-shadow: 0 0 0 2px rgba(var(--panel-rgb), .9); }
.frcode { padding: 18px 20px; border-radius: 28px; display: grid; gap: 10px; margin-bottom: 14px; }
.frcode__v { font-size: 2rem; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.frnote { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 18px; margin-bottom: 14px; border-radius: 22px; font-size: .88rem; }
.frnote .link { justify-self: auto; padding: 4px 0; }
.frrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; margin-bottom: 8px; border: 0; border-radius: 22px; text-align: left; color: inherit; background: rgba(var(--ink-rgb), .055); }
button.frrow { cursor: pointer; transition: background-color .25s, transform .5s var(--spring); }
button.frrow:hover { background: rgba(var(--ink-rgb), .09); } button.frrow:active { transform: scale(.97); }
.frrow .sp { flex: 1; min-width: 0; } .frrow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .frrow small { color: var(--muted); font-size: .8rem; }
.frrow__a { display: flex; align-items: center; gap: 6px; flex: none; }
.fday { display: block; margin: 12px 0 2px; font-size: .9rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; line-height: 1.45; }
textarea.field.mono { min-height: 140px; }
.rules { width: 100%; margin: 4px 0 0; padding: 12px; max-height: 240px; overflow: auto; border-radius: 16px; background: rgba(var(--ink-rgb), .06); text-align: left; white-space: pre; font: .72rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.imnote { margin: 8px 2px 10px; }
.imrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(var(--ink-rgb), .07); }
.imrow:first-of-type { border-top: 0; }
.imrow .thumb { width: 50px; height: 50px; border-radius: 14px; }
button.thumb { border: 0; padding: 0; cursor: pointer; color: inherit; }
.thumb--q { font-weight: 800; font-size: 1.2rem; color: #ff453a; }
.imrow__t { flex: 1; min-width: 0; text-align: left; }
.imrow__t b { display: block; font-size: .92rem; line-height: 1.25; }
.imrow__t small { color: var(--muted); font-size: .78rem; line-height: 1.3; display: block; }
.imrow.fz .imrow__t small { color: #f59e0b; }
.imrow.bad .imrow__t b { color: #ff453a; } .imrow.bad .imrow__t small { color: #ff453a; }
@media (max-width: 420px) { .dock button { width: 56px; } .frrow__a .btn--sm { padding-inline: 12px; } }

textarea.field.mono.mini { min-height: 64px; height: 64px; overflow: hidden; opacity: .75; }

/* ===== Анімації перегляду вправи, списків і вибору (v1.2) ===== */
@keyframes mgUp { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes mgPop { 0% { transform: scale(1); } 40% { transform: scale(1.035); } 100% { transform: scale(1); } }
@keyframes mgChk { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes mgStep { 0%, 46% { box-shadow: inset 0 0 0 0 transparent; background: rgba(var(--ink-rgb), .055); } 6%, 40% { box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .65); background: rgba(var(--accent-rgb), .14); } }
@keyframes mgStepB { 0%, 46%, 100% { box-shadow: inset 0 0 0 0 transparent; background: rgba(var(--ink-rgb), .055); } 50%, 94% { box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .65); background: rgba(var(--accent-rgb), .14); } }
@keyframes mgHalo { 0%, 100% { opacity: .35; transform: scale(.92); } 40%, 54% { opacity: .9; transform: scale(1.04); } }

/* Списки: поступова поява рядків */
.list.stg > * { animation: mgUp .45s var(--spring, cubic-bezier(.2, .9, .3, 1.2)) backwards; animation-delay: calc(var(--i, 0) * 28ms); }

/* Вибір вправи: «пружина» рядка й галочки */
.prow.pop { animation: mgPop .38s var(--spring, ease-out); }
.prow.pop .chkm { animation: mgChk .38s var(--spring, ease-out); }
.prow__main:active .thumb, .lrow:active .thumb { transform: scale(.92); }
.thumb { transition: transform .25s var(--spring, ease-out); }
.prow__main:hover .thumb, .lrow:hover .thumb { transform: scale(1.06); }

/* Перегляд вправи: поетапна поява блоків */
[data-mvwrap] .demo { position: relative; isolation: isolate; }
[data-mvwrap] .demo figure { animation: mgUp .55s var(--spring, ease-out) backwards; }
[data-mvwrap] .demo figure:nth-child(1) { animation-delay: .05s; }
[data-mvwrap] .demo figure:nth-child(2) { animation-delay: .14s; }
[data-mvwrap] .demo figure:nth-child(3) { animation-delay: .22s; }
[data-mvwrap] .demo__mv::before { content: ""; position: absolute; left: 8px; top: 10px; width: 52%; bottom: 34px; border-radius: 22px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 60%, rgba(var(--accent-rgb), .26), transparent 70%); animation: mgHalo 2.8s ease-in-out infinite; }
[data-mvwrap] .demo__pl, [data-mvwrap] .lg, [data-mvwrap] .mut { animation: mgUp .5s ease backwards; animation-delay: .3s; }
[data-mvwrap] .steps li { animation: mgUp .5s var(--spring, ease-out) backwards, mgStep 2.8s ease-in-out .9s infinite; }
[data-mvwrap] .steps li:nth-child(1) { animation-delay: .34s, .9s; }
[data-mvwrap] .steps li:nth-child(2) { animation: mgUp .5s var(--spring, ease-out) .42s backwards, mgStepB 2.8s ease-in-out .9s infinite; }
[data-mvwrap].is-paused .steps li, [data-mvwrap].is-paused .demo__mv::before { animation-play-state: paused; }
[data-mvwrap] .tiles, [data-mvwrap] + .tiles { animation: mgUp .5s ease backwards; animation-delay: .4s; }

/* Кнопка «Додати до вибраних» і кнопки в листах */
.btn { transition: transform .25s var(--spring, ease-out), box-shadow .25s, background-color .25s, opacity .25s; }
.btn:active { transform: scale(.96); }
.sheet .dlg .btn--primary { animation: mgUp .5s var(--spring, ease-out) .45s backwards; }

/* ===== Виправлення відображення: кнопки й текст не вилазять за картку ===== */
.panel, .set, .set > * { min-width: 0; }
.set__hint { overflow-wrap: anywhere; }
.btnrow { flex-wrap: wrap; }
.btnrow .btn { flex: 1 1 150px; min-width: 0; white-space: normal; text-align: center; line-height: 1.25; padding-top: 10px; padding-bottom: 10px; }
.set__label > span { min-width: 0; }

/* ===== Про застосунок: список можливостей ===== */
.rel { display: grid; gap: 10px; margin-top: 4px; }
.rel__h { margin: 4px 0 0; font-size: .95rem; letter-spacing: -.01em; }
.rel__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rel__list li { position: relative; display: grid; gap: 2px; padding: 11px 14px 11px 40px; border-radius: 18px; background: rgba(var(--ink-rgb), .055); font-size: .88rem; line-height: 1.4; }
.rel__list li::before { content: ""; position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat; }
.rel__list li b { font-size: .92rem; }
.rel__list li span { color: var(--muted); }
.rel__list.in li { animation: mgUp .45s var(--spring, ease-out) backwards; animation-delay: calc(var(--i, 0) * 40ms); }

/* ===== Екран входу при відкритті ===== */
.welcome { position: fixed; inset: 0; z-index: 90; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: max(28px, env(safe-area-inset-top, 0px)) 18px max(28px, env(safe-area-inset-bottom, 0px));
  background: radial-gradient(120% 70% at 50% -10%, rgba(var(--accent-rgb), .22), transparent 60%), var(--bg);
  opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s .5s; }
.welcome[hidden] { display: none; }
.welcome.open { opacity: 1; visibility: visible; transition-delay: 0s; }
.welcome__in { width: min(440px, 100%); margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
html.has-gate .hdr, html.has-gate main, html.has-gate .dock, html.has-gate .float { visibility: hidden; }
html.has-gate { overflow: hidden; }
.welcome__logo { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; margin-bottom: 14px; }
.welcome__title { margin: 0; font-size: clamp(2.6rem, 13vw, 3.6rem); line-height: 1; letter-spacing: -.045em; font-weight: 800; }
.welcome__lead { margin: 12px 4px 20px; color: var(--muted); font-size: .98rem; line-height: 1.45; }
.wl-feats { list-style: none; margin: 0 0 20px; padding: 0; width: 100%; display: grid; gap: 14px; text-align: left; }
.wl-feats li { display: flex; align-items: center; gap: 14px; }
.wl-feats i { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(var(--ink-rgb), .07); box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .08); color: var(--accent); }
.wl-feats svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wl-feats b { display: block; font-size: .98rem; line-height: 1.25; }
.wl-feats span { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.welcome__card { width: 100%; border-radius: 30px; padding: 18px; text-align: left; }
#welcomeSkip { margin-top: 8px; }
.welcome.open .welcome__logo, .welcome.open .welcome__title, .welcome.open .welcome__lead, .welcome.open .wl-feats li, .welcome.open .welcome__card, .welcome.open #welcomeSkip { animation: mgUp .6s var(--spring, ease-out) backwards; }
.welcome.open .welcome__logo { animation-delay: .05s; } .welcome.open .welcome__title { animation-delay: .12s; } .welcome.open .welcome__lead { animation-delay: .18s; }
.welcome.open .wl-feats li:nth-child(1) { animation-delay: .24s; } .welcome.open .wl-feats li:nth-child(2) { animation-delay: .3s; } .welcome.open .wl-feats li:nth-child(3) { animation-delay: .36s; }
.welcome.open .wl-feats li:nth-child(4) { animation-delay: .42s; } .welcome.open .wl-feats li:nth-child(5) { animation-delay: .48s; }
.welcome.open .welcome__card { animation-delay: .56s; } .welcome.open #welcomeSkip { animation-delay: .66s; }
@media (max-height: 640px) { .wl-feats span { display: none; } }
