/* ==========================================================================
   MyGym (стиль Pinly Travels) — iOS «Liquid Glass» (стиль і анімації з ROTONS)
   Акцент: --accent / --accent-rgb / --accent-ink, прозорість меню: --menu-a
   (виставляє ранній скрипт PTUI і налаштування застосунку).
   ========================================================================== */
@property --accent { syntax: '<color>'; inherits: true; initial-value: #af52de; }
:root {
  --accent: #af52de; --accent-rgb: 175, 82, 222; --accent-ink: #fff;
  --accent-text: color-mix(in srgb, var(--accent) 70%, #000);
  --menu-a: .52;
  --bg: #e8eef7; --ink: #0c1320; --ink-rgb: 12, 19, 32; --muted: #475467; --panel-rgb: 255, 255, 255;
  --g1: rgba(255,255,255,.62); --g2: rgba(255,255,255,.24); --rim: rgba(255,255,255,.85);
  --glass-shadow: 0 1px 2px rgba(20,40,80,.06), 0 14px 44px rgba(20,40,80,.13);
  --thumb: #fff;
  --blob-1: rgba(var(--accent-rgb), .6); --blob-2: rgba(56,189,248,.5); --blob-3: rgba(129,140,248,.42);
  --land: rgba(var(--ink-rgb), .15); --land-hover: rgba(var(--ink-rgb), .27); --land-line: rgba(255,255,255,.7);
  --spring: cubic-bezier(.34, 1.45, .5, 1); --ease: cubic-bezier(.2, .8, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light; transition: --accent .5s ease;
}
[data-theme="dark"] {
  --accent-text: color-mix(in srgb, var(--accent) 66%, #fff);
  --bg: #05070c; --ink: #f3f6fb; --ink-rgb: 243,246,251; --muted: #a4afc0; --panel-rgb: 20,25,35;
  --g1: rgba(255,255,255,.13); --g2: rgba(255,255,255,.04); --rim: rgba(255,255,255,.34);
  --glass-shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 50px rgba(0,0,0,.55);
  --thumb: rgba(255,255,255,.2);
  --blob-1: rgba(var(--accent-rgb), .48); --blob-2: rgba(14,116,220,.48); --blob-3: rgba(99,102,241,.36);
  --land: rgba(255,255,255,.14); --land-hover: rgba(255,255,255,.26); --land-line: rgba(5,7,12,.7);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color .5s ease, color .5s ease; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(var(--accent-rgb), .75); outline-offset: 3px; border-radius: 12px; }
html.is-loading { overflow: hidden; }

/* ---------- Скло ---------- */
.glass { position: relative; background: linear-gradient(135deg, var(--g1), var(--g2)); -webkit-backdrop-filter: blur(24px) saturate(190%); backdrop-filter: blur(24px) saturate(190%); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--rim), inset 0 -1px 0 rgba(255,255,255,.06); }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, var(--rim), rgba(255,255,255,0) 32%, rgba(255,255,255,0) 68%, rgba(255,255,255,.5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); pointer-events: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: rgba(var(--panel-rgb), .92); } }

/* ---------- Фон ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(120% 80% at 50% -10%, rgba(255,255,255,.3), transparent 60%), var(--bg); transition: background-color .5s ease; }
.aurora .b { position: absolute; border-radius: 50%; width: 62vmax; height: 62vmax; will-change: transform; transform: translate3d(calc(var(--px,0) * var(--k,20px)), calc(var(--py,0) * var(--k,20px) + var(--sy,0px) * var(--s,-.08)), 0); }
.aurora .b i { display: block; width: 100%; height: 100%; border-radius: 50%; animation: drift 26s ease-in-out infinite alternate; }
.aurora .b1 { left: -18vmax; top: -22vmax; --k: 34px; --s: -.05; }
.aurora .b2 { right: -24vmax; top: 6vmax; --k: -26px; --s: -.12; width: 70vmax; height: 70vmax; }
.aurora .b3 { left: 12vmax; bottom: -34vmax; --k: 18px; --s: -.16; }
.aurora .b4 { right: 8vmax; bottom: -26vmax; --k: -40px; --s: -.1; width: 44vmax; height: 44vmax; }
.aurora .b1 i { background: radial-gradient(circle, var(--blob-1) 0, transparent 66%); }
.aurora .b2 i { background: radial-gradient(circle, var(--blob-2) 0, transparent 66%); animation-duration: 32s; animation-delay: -9s; }
.aurora .b3 i { background: radial-gradient(circle, var(--blob-3) 0, transparent 66%); animation-duration: 38s; animation-delay: -4s; }
.aurora .b4 i { background: radial-gradient(circle, var(--blob-1) 0, transparent 66%); animation-duration: 29s; animation-delay: -15s; opacity: .8; }
@keyframes drift { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(5vmax,-4vmax,0) scale(1.12); } 100% { transform: translate3d(-4vmax,5vmax,0) scale(.94); } }

/* ---------- Прелоадер ---------- */
.preloader { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: var(--bg); transition: opacity .8s ease, visibility .8s ease; }
.preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__inner { display: grid; justify-items: center; gap: 22px; }
.pre-orb { position: relative; width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; animation: pre-in .9s var(--spring) .1s both; }
.pre-orb svg.ring { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); animation: spin 2.4s linear infinite; }
.pre-orb svg.ring circle { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 90 400; }
.pre-orb .pin { width: 46px; height: 46px; animation: pre-drop 1.8s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(var(--accent-rgb), .45)); }
.preloader__name { font-weight: 800; font-size: 18px; letter-spacing: .32em; margin-right: -.32em; animation: pre-text .9s ease .5s both; }
@keyframes pre-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes pre-text { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pre-drop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px) scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Кнопки ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px; font-weight: 650; font-size: 1rem; cursor: pointer; overflow: hidden; isolation: isolate; transition: transform .5s var(--spring), box-shadow .3s ease, background-color .3s ease; will-change: transform; }
.btn:active { transform: scale(.95) !important; transition-duration: .12s; }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.5) 50%, transparent 65%); transform: translateX(-120%); }
.btn:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
.btn--primary { background: linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,0) 55%), var(--accent); color: var(--accent-ink); box-shadow: 0 10px 28px rgba(var(--accent-rgb), .42), inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 6px rgba(0,0,0,.12); }
.btn--ghost { background: rgba(var(--ink-rgb), .07); min-height: 46px; padding: 0 20px; font-size: .95rem; }
.btn--ghost:hover { background: rgba(var(--ink-rgb), .12); }
.btn--google, .btn--soft { width: 100%; background: rgba(var(--ink-rgb), .07); }
.btn--google:hover, .btn--soft:hover { background: rgba(var(--ink-rgb), .12); }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 16px; border: 0; border-radius: 999px; background: rgba(var(--accent-rgb), .16); color: var(--accent-text); font-weight: 650; font-size: .88rem; cursor: pointer; transition: transform .5s var(--spring), background-color .25s; }
.chip:hover { background: rgba(var(--accent-rgb), .26); } .chip:active { transform: scale(.94); }
.ibtn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(var(--ink-rgb), .07); cursor: pointer; transition: transform .5s var(--spring), background-color .25s; }
.ibtn:hover { background: rgba(var(--ink-rgb), .13); } .ibtn:active { transform: scale(.88); transition-duration: .1s; }

/* ---------- Шапка ---------- */
.hdr { position: fixed; top: max(12px, env(safe-area-inset-top, 0px)); left: 50%; z-index: 50; width: min(1120px, 100% - 24px); height: 64px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 32px; transition: height .45s var(--spring), top .45s var(--spring); }
.hdr::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgba(var(--panel-rgb), var(--menu-a)); -webkit-backdrop-filter: blur(26px) saturate(190%); backdrop-filter: blur(26px) saturate(190%); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--rim); }
.hdr::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, var(--rim), rgba(255,255,255,0) 30%, rgba(255,255,255,0) 70%, rgba(255,255,255,.45)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); pointer-events: none; }
.hdr.is-scrolled { height: 56px; top: max(8px, env(safe-area-inset-top, 0px)); }
html.is-loading .hdr { opacity: 0; transform: translate(-50%, -30px); }
html.is-revealing .hdr { transition: opacity .9s ease .4s, transform .9s var(--spring) .4s, height .45s var(--spring); }
.logo { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 14px; border-radius: 22px; flex: none; background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 60%), var(--accent); box-shadow: 0 6px 18px rgba(var(--accent-rgb), .38), inset 0 1px 0 rgba(255,255,255,.55); color: var(--accent-ink); font-weight: 800; letter-spacing: .04em; transition: transform .5s var(--spring); }
.logo:hover { transform: scale(1.05) rotate(-1.5deg); } .logo:active { transform: scale(.95); }
.logo svg path { fill: var(--accent-ink); } .logo svg circle { fill: var(--accent); }
.hdr__count { margin-inline: auto; display: flex; align-items: baseline; gap: 2px; font-weight: 800; font-variant-numeric: tabular-nums; opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .5s var(--spring); }
.hdr__count span { color: var(--muted); font-weight: 600; font-size: .85em; }
.hdr.is-scrolled .hdr__count.show { opacity: 1; transform: none; }
.hdr__tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.hdr__count.show ~ .hdr__tools { margin-left: 0; }
.acct { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 14px; border: 0; border-radius: 22px; background: var(--ink); color: var(--bg); font-weight: 650; font-size: .9rem; white-space: nowrap; cursor: pointer; transition: transform .5s var(--spring); }
.acct:hover { transform: scale(1.04); } .acct:active { transform: scale(.94); transition-duration: .1s; }
.acct.is-user { padding: 0 8px 0 5px; background: rgba(var(--ink-rgb), .07); color: var(--ink); }
.acct .chev { opacity: .6; transition: transform .4s var(--spring); } .acct[aria-expanded="true"] .chev { transform: rotate(180deg); }
.ava { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden; background: linear-gradient(160deg, rgba(255,255,255,.4), rgba(255,255,255,0) 60%), var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .95rem; text-transform: uppercase; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ava--lg { width: 56px; height: 56px; font-size: 1.4rem; }
.pop { position: absolute; top: calc(100% + 10px); right: 0; width: min(300px, 100vw - 24px); padding: 8px; border-radius: 28px; background: rgba(var(--panel-rgb), calc(var(--menu-a) * .5 + .46)); -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--rim); transform-origin: 85% 0; opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.9); transition: opacity .25s ease, transform .5s var(--spring), visibility 0s .5s; }
.pop.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.pop__head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px; }
.pop__who { min-width: 0; } .pop__name { font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop__mail { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop__item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: 20px; background: none; text-align: left; font-weight: 600; font-size: .95rem; cursor: pointer; transition: background-color .2s, transform .4s var(--spring); }
.pop__item:hover { background: rgba(var(--ink-rgb), .07); } .pop__item:active { transform: scale(.97); } .pop__item svg { flex: none; opacity: .75; }

/* ---------- Сегмент з «рідким» повзунком ---------- */
.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(var(--ink-rgb), .07); box-shadow: inset 0 1px 2px rgba(var(--ink-rgb), .08); }
.seg button { position: relative; z-index: 1; padding: 8px 15px; border: 0; border-radius: 999px; background: none; font-size: .86rem; font-weight: 620; color: var(--muted); white-space: nowrap; cursor: pointer; transition: color .25s; }
.seg button.on { color: var(--ink); }
.seg__thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--thumb); box-shadow: 0 2px 8px rgba(var(--ink-rgb), .16), inset 0 1px 0 rgba(255,255,255,.6); transition: transform .5s var(--spring), width .5s var(--spring); }
.seg--block { display: flex; width: 100%; } .seg--block button { flex: 1; text-align: center; }

/* ---------- Розмітка сторінки ---------- */
main { width: min(1120px, 100% - 32px); margin-inline: auto; padding: calc(96px + env(safe-area-inset-top, 0px)) 0 calc(130px + env(safe-area-inset-bottom, 0px)); }
.view { animation: vin .55s var(--ease); }
@keyframes vin { from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.vhead { display: flex; align-items: center; gap: 14px; margin: 18px 0 22px; }
.vtitle { margin: 0; font-size: clamp(2.1rem, 7vw, 3.4rem); line-height: 1.02; letter-spacing: -.04em; font-weight: 800; }
.count-pill { padding: 4px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: 0 6px 16px rgba(var(--accent-rgb), .35); }
.count-pill:empty { display: none; }

.top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: center; margin: 8px 0 28px; }
.hero__title { margin: 0 0 16px; font-size: clamp(2.6rem, 10.5vw, 6rem); line-height: .96; font-weight: 800; letter-spacing: -.045em; perspective: 700px; }
.hero__title span { display: inline-block; transform-origin: 50% 100%; }
.hero__text { max-width: 28em; margin: 0; font-size: clamp(1rem, 2.2vw, 1.2rem); color: var(--muted); }
.js .hero__title span { opacity: 0; transform: translateY(.45em) rotateX(-55deg) scale(.88); filter: blur(14px); }
.js .hero__fade { opacity: 0; transform: translateY(22px); filter: blur(6px); }
.is-ready .hero__title span { opacity: 1; transform: none; filter: none; transition: opacity .8s ease, transform 1.1s var(--spring), filter .9s ease; transition-delay: calc(var(--i) * 70ms + 150ms); }
.is-ready .hero__fade { opacity: 1; transform: none; filter: none; transition: opacity .8s ease, transform .9s var(--ease), filter .8s ease; transition-delay: calc(var(--d, 0) * 110ms + 650ms); }

.card { --rx: 0deg; --ry: 0deg; position: relative; border-radius: 32px; padding: 16px; }
.stat { display: flex; align-items: center; gap: 22px; padding: 22px; transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; }
.is-ready .stat { transition: opacity .8s ease, transform .5s var(--ease), filter .8s ease, box-shadow .4s; }
.card__glare { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(260px circle at var(--gx,50%) var(--gy,0%), rgba(255,255,255,.45), transparent 60%); opacity: 0; transition: opacity .35s; pointer-events: none; mix-blend-mode: soft-light; }
[data-theme="dark"] .card__glare { background: radial-gradient(260px circle at var(--gx,50%) var(--gy,0%), rgba(255,255,255,.2), transparent 60%); mix-blend-mode: normal; }
.stat:hover .card__glare { opacity: 1; }
.ringbox { position: relative; width: 124px; height: 124px; flex: none; }
.ringbox svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ringbox circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ringbox .trk { stroke: rgba(var(--ink-rgb), .1); }
.ringbox .val { stroke: var(--accent); stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset 1s var(--spring); filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .55)); }
.ringbox__pct { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat__num { display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.stat__num b { font-size: clamp(2.6rem, 8vw, 3.6rem); line-height: 1; letter-spacing: -.045em; font-weight: 800; }
.stat__num b.bump { animation: bump .5s var(--spring); }
@keyframes bump { 40% { transform: scale(1.18); color: var(--accent-text); } }
.stat__num span { color: var(--muted); font-weight: 650; font-size: 1.15rem; }
.stat__lbl { color: var(--muted); font-weight: 600; }
.field { width: 100%; height: 52px; padding: 0 18px; border: 1.5px solid transparent; border-radius: 18px; background: rgba(var(--ink-rgb), .06); color: var(--ink); font-size: 1rem; outline: 0; transition: border-color .25s, box-shadow .25s, background-color .25s; }
.field::placeholder { color: var(--muted); opacity: .8; }
.field:focus { border-color: var(--accent); background: rgba(var(--panel-rgb), .6); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .2); }
.field--code { text-align: center; letter-spacing: .5em; font-weight: 700; font-size: 1.2rem; }
/* ---------- Налаштування ---------- */
.panel { border-radius: 32px; padding: 8px 22px; margin-bottom: 16px; }
.set { display: grid; gap: 12px; padding: 16px 0; border-top: 1px solid rgba(var(--ink-rgb), .09); }
.panel > .set:first-child { border-top: 0; }
.set--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set__label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-weight: 700; font-size: .98rem; }
.set__label output { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.set__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set__hint { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.swl { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--c); box-shadow: inset 0 2px 3px rgba(255,255,255,.55), inset 0 -3px 6px rgba(0,0,0,.15), 0 3px 10px rgba(0,0,0,.14); transition: transform .5s var(--spring), outline-color .2s; outline: 2.5px solid transparent; outline-offset: 3px; }
.swatch:hover { transform: scale(1.14); } .swatch:active { transform: scale(.9); }
.swatch.on { outline-color: var(--ink); transform: scale(1.04); }
.swatch--wheel { background: conic-gradient(#ff3b30, #ffcc00, #30d158, #00c7ff, #0a84ff, #af52de, #ff2d78, #ff3b30); overflow: hidden; }
.swatch--wheel input { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); opacity: 0; cursor: pointer; }
.swatch--wheel.on::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2.5px #fff; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer; --p: 45%; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--accent) var(--p), rgba(var(--ink-rgb), .14) var(--p)); }
.range::-moz-range-track { height: 8px; border-radius: 8px; background: rgba(var(--ink-rgb), .14); }
.range::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--accent); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 3px 12px rgba(0,0,0,.3), inset 0 -3px 5px rgba(0,0,0,.08); transition: transform .3s var(--spring); }
.range::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 3px 12px rgba(0,0,0,.3); }
.range:active::-webkit-slider-thumb { transform: scale(1.18); }
.tgl { position: relative; width: 56px; height: 34px; padding: 0; border: 0; border-radius: 17px; background: rgba(var(--ink-rgb), .16); cursor: pointer; flex: none; transition: background-color .3s; }
.tgl i { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); transition: transform .5s var(--spring); }
.tgl[aria-checked="true"] { background: var(--accent); } .tgl[aria-checked="true"] i { transform: translateX(22px); }
.btnrow { display: flex; gap: 10px; } .btnrow .btn { flex: 1; }
.lnk { display: block; padding: 4px 0; color: var(--accent-text); font-weight: 650; }
.lnk:hover { text-decoration: underline; text-underline-offset: 3px; }
.accrow { display: flex; align-items: center; gap: 14px; padding: 14px 0 6px; }
.accrow__who { min-width: 0; flex: 1; } .accrow__name { font-weight: 750; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accrow__sub { color: var(--muted); font-size: .85rem; }
.accbtns { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 0 14px; }
.warn { margin: 0 0 12px; padding: 10px 14px; border-radius: 16px; background: rgba(255,170,0,.16); font-size: .85rem; }
.warn button { display: block; margin-top: 4px; padding: 0; border: 0; background: none; font-weight: 700; color: var(--accent-text); cursor: pointer; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #30d158; vertical-align: 1px; } .dot.off { background: rgba(var(--ink-rgb), .3); } .dot.err { background: #ff453a; }
/* ---------- Нижнє меню ---------- */
.dock { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; gap: 2px; padding: 6px; border-radius: 34px; }
.dock::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgba(var(--panel-rgb), var(--menu-a)); -webkit-backdrop-filter: blur(26px) saturate(190%); backdrop-filter: blur(26px) saturate(190%); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--rim); }
.dock::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, var(--rim), rgba(255,255,255,0) 30%, rgba(255,255,255,0) 70%, rgba(255,255,255,.45)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); pointer-events: none; }
html.is-loading .dock { opacity: 0; transform: translate(-50%, 40px); }
html.is-revealing .dock { transition: opacity .9s ease .6s, transform .9s var(--spring) .6s; }
.dock button { position: relative; z-index: 1; width: 66px; height: 50px; border: 0; border-radius: 28px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: color .25s, transform .5s var(--spring); }
.dock button:active { transform: scale(.86); transition-duration: .1s; }
.dock button.on { color: var(--accent-text); }
.dock svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dock__ind { position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 0; width: 66px; border-radius: 28px; background: rgba(var(--accent-rgb), .2); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .35), inset 0 1px 0 rgba(255,255,255,.4); transition: transform .55s var(--spring), width .55s var(--spring); }

/* ---------- Листи ---------- */
.sheets { position: fixed; inset: 0; z-index: 100; display: grid; pointer-events: none; }
.sheets.open { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(8,14,26,.4); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); opacity: 0; transition: opacity .4s, backdrop-filter .4s, -webkit-backdrop-filter .4s; }
.sheets.open .scrim { opacity: 1; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sheet { position: absolute; left: 50%; top: 50%; width: min(440px, 100% - 24px); max-height: calc(100svh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 22px 22px 24px; border-radius: 36px; background: rgba(var(--panel-rgb), .82); -webkit-backdrop-filter: blur(40px) saturate(200%); backdrop-filter: blur(40px) saturate(200%); box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 40px 90px rgba(10,20,50,.35), inset 0 1px 0 var(--rim); opacity: 0; visibility: hidden; transform: translate(-50%, calc(-50% + 36px)) scale(.92); transition: opacity .3s, transform .55s var(--spring), visibility 0s .55s; }
.sheet.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition-delay: 0s; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.sheet__title { margin: 0; font-size: 1.5rem; letter-spacing: -.03em; font-weight: 800; }
.sheet__lead { margin: 0 0 18px; color: var(--muted); font-size: .93rem; }
.sheet__close { width: 38px; height: 38px; }
.sheet .grab { display: none; width: 40px; height: 5px; margin: -8px auto 12px; border-radius: 3px; background: rgba(var(--ink-rgb), .22); }
.stack { display: grid; gap: 12px; }
.reveal-row { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .5s var(--spring), opacity .3s; }
.reveal-row > div { overflow: hidden; } .reveal-row.open { grid-template-rows: 1fr; opacity: 1; } .reveal-row.open > div { padding: 2px 0 0; }
.err { min-height: 1.2em; margin: 0; color: #d93025; font-size: .88rem; font-weight: 560; }
[data-theme="dark"] .err { color: #ff8a80; }
.link { justify-self: center; padding: 6px; border: 0; background: none; color: var(--accent-text); font-weight: 650; font-size: .92rem; cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.or { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: rgba(var(--ink-rgb), .12); }
#recaptcha { position: fixed; left: 0; bottom: 0; }
.grecaptcha-badge { visibility: hidden; }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 200; max-width: calc(100% - 32px); padding: 13px 22px; border-radius: 999px; font-weight: 620; font-size: .93rem; text-align: center; background: rgba(var(--panel-rgb), .85); -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--rim); opacity: 0; transform: translate(-50%, 30px) scale(.9); transition: opacity .3s, transform .55s var(--spring); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Поява при прокрутці ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(30px) scale(.95); filter: blur(12px); }
.js [data-reveal].in { opacity: 1; transform: none; filter: none; transition: opacity .8s ease, transform 1s var(--spring), filter .8s ease; transition-delay: calc(var(--i, 0) * 70ms); }
/* ---------- Адаптація ---------- */
@media (max-width: 860px) {
  .top { grid-template-columns: 1fr; gap: 20px; }
  .hdr__count { display: none; }
}
@media (max-width: 640px) {
  .acct .acct__label { display: none; } .acct { padding: 0 14px; } .acct.is-user { padding: 0 5px; } .acct.is-user .chev { display: none; }
  .stat { padding: 18px; gap: 16px; } .ringbox { width: 104px; height: 104px; }
  .panel { padding: 6px 18px; border-radius: 28px; } .card { border-radius: 28px; }
  .mapctl { right: 14px; } .mapctl button { width: 38px; height: 38px; border-radius: 13px; }
  .sheet { left: 8px; right: 8px; top: auto; bottom: max(8px, env(safe-area-inset-bottom, 0px)); width: auto; max-height: 90svh; border-radius: 34px; transform: translateY(110%); padding-top: 14px; }
  .sheet.open { transform: none; } .sheet .grab { display: block; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .aurora .b i { animation: none !important; }
  .js [data-reveal], .js .hero__title span, .js .hero__fade { filter: none !important; transform: none !important; }
  .stat { transform: none !important; }
}
html.noanim *, html.noanim *::before, html.noanim *::after { animation: none !important; transition: none !important; }
html.noanim .aurora .b { transform: none; }
.hero__title .wd { display: inline-block; white-space: nowrap; }
.btn { white-space: nowrap; }
