:root {
  --bg: #000;
  --text: #fff;
  --text-2: rgba(235, 235, 245, .62);
  --text-3: rgba(235, 235, 245, .34);
  --accent: #f5f5f7;
  --accent-soft: rgba(255, 255, 255, .1);
  --good: #9ccfa9;
  --good-soft: rgba(156, 207, 169, .14);
  --danger: #e8918a;
  --warn: #e3c58f;
  --flame: #e8a57c;
  --line: rgba(255, 255, 255, .08);
  --tint: #2a2a2e;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  font-size: 15px;
}

input, textarea { font: inherit; color: inherit; user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
#app { position: fixed; inset: 0; z-index: 1; }

/* ---------- ambient background ---------- */
.bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.o1 { width: 90vmax; height: 90vmax; left: -45vmax; top: -50vmax; background: var(--tint); opacity: .22; animation: drift1 24s ease-in-out infinite alternate; transition: background-color 1.4s var(--ease); }
.o2 { width: 70vmax; height: 70vmax; right: -45vmax; top: 30vh; background: #1f2126; opacity: .45; animation: drift2 28s ease-in-out infinite alternate; }
.o3 { width: 80vmax; height: 80vmax; left: -20vmax; bottom: -65vmax; background: #25232a; opacity: .4; animation: drift3 32s ease-in-out infinite alternate; }
.grain { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, transparent 35%, rgba(0, 0, 0, .55)); }
@keyframes drift1 { to { transform: translate(14vw, 10vh) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-16vw, -12vh) scale(1.15); } }
@keyframes drift3 { to { transform: translate(18vw, -8vh) scale(.95); } }

/* ---------- glass ---------- */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .035));
  border: 1px solid rgba(255, 255, 255, .085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.glass-blur {
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 20px 40px -20px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
}

/* ---------- shared bits ---------- */
.eyebrow { font-size: 12.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--text-2); }
.title-xl { font-size: 34px; font-weight: 750; letter-spacing: -.025em; line-height: 1.08; margin-top: 3px; }
.muted { color: var(--text-2); }
.section-title { font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: 26px 6px 9px; }
.up { color: var(--good); }
.down { color: var(--warn); }
.same { color: var(--text-3); }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none;
  display: inline-grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #3a3a3c, #1c1c1e);
  border: 1px solid rgba(255, 255, 255, .16);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-empty[data-name="Gustav"] { background: linear-gradient(135deg, #7d8ea6, #3a4250); }
.avatar-empty[data-name="Oliver"] { background: linear-gradient(135deg, #b09383, #54453d); }
.avatar.sm { width: 36px; height: 36px; font-size: 15px; }
.avatar.md { width: 44px; height: 44px; font-size: 18px; }
.avatar.lg { width: 76px; height: 76px; font-size: 30px; }
.avatar.xl { width: 96px; height: 96px; font-size: 40px; }

.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 14px; background: rgba(255, 255, 255, .12); font-size: 13px; font-weight: 650; }
.chip-sm { height: 22px; padding: 0 8px; font-size: 11px; background: var(--accent-soft); color: var(--accent); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .09); transition: transform .3s var(--spring), background .2s; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { transform: scale(.88); background: rgba(255, 255, 255, .16); }

.btn {
  width: 100%; height: 54px; border-radius: 18px; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .3s var(--spring), background .3s, color .3s, box-shadow .3s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); color: #0a0a0a; }
.btn-ghost { background: rgba(255, 255, 255, .08); }
.btn-glass { background: rgba(255, 255, 255, .1); }
.btn-danger { background: #c9736b; color: #fff; }
.btn-sm { width: auto; height: 40px; padding: 0 16px; border-radius: 13px; font-size: 14px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn.is-done { background: var(--good-soft); color: var(--good); box-shadow: none; }

.ring { width: 38px; height: 38px; flex: none; }
.ring circle { fill: none; stroke-width: 3.5; }
.ring-bg { stroke: rgba(255, 255, 255, .12); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dasharray .6s var(--ease); }

.empty { text-align: center; padding: 28px 22px; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.empty svg { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--text-3); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.6); } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(5px); } 30%, 50%, 70% { transform: translateX(-10px); } 40%, 60% { transform: translateX(10px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes floaty { 50% { transform: translateY(-4px); } }
@keyframes shine { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes flicker { 50% { transform: scale(1.08) rotate(-3deg); } }

/* ---------- shell & nav ---------- */
.shell { position: absolute; inset: 0; }
.view {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior-y: contain;
  padding: calc(var(--safe-t) + 14px) 18px calc(var(--safe-b) + 112px);
}
.page { max-width: 520px; margin: 0 auto; }
.view, .s-scroll, .sheet-body { scrollbar-width: none; }
.view::-webkit-scrollbar, .s-scroll::-webkit-scrollbar, .sheet-body::-webkit-scrollbar { display: none; width: 0; height: 0; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 2px 18px; }

.tabbar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: max(14px, calc(var(--safe-b) - 6px));
  width: min(calc(100% - 32px), 400px); height: 66px; padding: 6px; border-radius: 33px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(28, 28, 30, .55);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 20px 50px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  transition: transform .5s var(--ease), opacity .4s;
}
body.session-open .tabbar { transform: translate(-50%, 160%); opacity: 0; }
.tab-ind {
  position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 4); border-radius: 27px;
  background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  transform: translateX(calc(var(--i) * 100%)); transition: transform .6s var(--spring);
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); transition: color .3s; }
.tab svg { width: 23px; height: 23px; transition: transform .5s var(--spring), color .3s; }
.tab span { font-size: 10.5px; font-weight: 650; letter-spacing: .01em; }
.tab.on { color: #fff; }
.tab.on svg { color: #fff; transform: translateY(-1px) scale(1.08); }
.tab:active svg { transform: scale(.82); }

/* ---------- lock ---------- */
.lock { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 16px) 22px calc(var(--safe-b) + 22px); max-width: 520px; margin: 0 auto; }
.lock.leaving { animation: lockOut .42s var(--ease) forwards; }
@keyframes lockOut { to { opacity: 0; transform: scale(1.08); filter: blur(10px); } }
.lock-pick { flex: 1; display: flex; flex-direction: column; justify-content: center; }
/* The tiger, the same picture as the app icon on the Home Screen. */
.brand-mark { width: 64px; height: 64px; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); margin-bottom: 26px; animation: popIn .8s var(--spring) backwards; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.lock-title { font-size: 40px; font-weight: 800; letter-spacing: -.035em; animation: fadeUp .7s var(--ease) .06s backwards; }
.lock-sub { color: var(--text-2); font-size: 17px; margin: 6px 0 30px; animation: fadeUp .7s var(--ease) .12s backwards; }
.profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile {
  border-radius: 30px; padding: 24px 12px 20px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: fadeUp .8s var(--ease) calc(.2s + var(--d)) backwards;
  transition: transform .45s var(--spring), opacity .35s, filter .35s;
}
.profile .avatar { margin-bottom: 10px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7); }
.profile:active { transform: scale(.95); }
.profile-name { font-size: 19px; font-weight: 700; }
.profile-hint { font-size: 12.5px; color: var(--text-3); }
.lock.picked .profile:not(.chosen) { opacity: 0; transform: scale(.88); filter: blur(6px); }
.lock.picked .profile.chosen { transform: scale(1.05); }
.lock-foot { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 26px; }

.lock-code, .code-overlay .lock-code { flex: 1; display: flex; flex-direction: column; animation: pcIn .5s var(--ease); }
.lock-code.out, .code-overlay.out { animation: pcOut .28s var(--ease) forwards; }
@keyframes pcIn { from { opacity: 0; transform: translateY(26px) scale(.98); } }
@keyframes pcOut { to { opacity: 0; transform: translateY(20px); } }
.code-overlay { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: rgba(0, 0, 0, .82); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); padding: calc(var(--safe-t) + 16px) 22px calc(var(--safe-b) + 22px); animation: fadeIn .3s; }
.pc-back { align-self: flex-start; display: flex; align-items: center; gap: 2px; height: 40px; padding-right: 10px; color: var(--text-2); font-size: 16px; font-weight: 500; }
.pc-back svg { width: 22px; height: 22px; }
.pc { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 380px; margin: 0 auto; }
.pc-head { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 190px; }
.pc-av .avatar { box-shadow: 0 12px 36px -10px rgba(0, 0, 0, .8); }
.pc-title { font-size: 21px; font-weight: 600; margin: 16px 0 6px; }
.pc-sub { font-size: 14px; color: var(--text-2); min-height: 20px; padding: 0 12px; }
.pc-sub.err { color: var(--danger); }
.pc-dots { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 26px; height: 16px; }
.pc-dots.many { gap: 10px; }
.pc-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .85); transition: background .12s, border-color .3s, transform .3s var(--spring); }
.pc-dots.many i { width: 11px; height: 11px; }
.pc-dots i.on { background: #fff; }
.pc-dots i.pop { animation: dotPop .3s var(--spring); }
@keyframes dotPop { 0% { transform: scale(.4); } }
.pc-dots.shake { animation: shake .5s; }
.pc-dots.ok i { background: var(--good); border-color: var(--good); transform: scale(1.2); }

.pad { display: grid; grid-template-columns: repeat(3, 78px); justify-content: center; gap: 16px 26px; padding: 12px 0 8px; }
.key {
  width: 78px; height: 78px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .13);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: background .55s ease-out;
  touch-action: none;
}
.key.down { background: rgba(255, 255, 255, .45); transition: none; }
.key b { font-size: 36px; font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.key small { font-size: 10px; font-weight: 700; letter-spacing: .2em; margin-top: 2px; min-height: 12px; padding-left: .2em; }
.key-text { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; font-size: 17px; font-weight: 500; }
.key-text.down { background: none; opacity: .4; }
.key-ok { color: #fff; font-weight: 700; opacity: 0; pointer-events: none; transform: scale(.7); transition: opacity .25s, transform .4s var(--spring); }
.key-ok.show { opacity: 1; pointer-events: auto; transform: none; }
.key-ok.key-bio svg { width: 34px; height: 34px; color: #fff; }
@media (max-height: 720px) {
  .pad { grid-template-columns: repeat(3, 70px); gap: 12px 24px; }
  .key { width: 70px; height: 70px; }
  .key b { font-size: 32px; }
  .pc-head { min-height: 150px; }
  .pc-av .avatar.lg { width: 60px; height: 60px; }
}

/* ---------- home ---------- */
.top-me { display: flex; align-items: center; gap: 8px; transition: transform .3s var(--spring); }
.top-me:active { transform: scale(.94); }
.streak-pill { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 11px 0 9px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08); font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums; }
.streak-pill svg { width: 15px; height: 15px; color: var(--flame); }

.week-strip { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0 0 16px; }
.wd-ind { position: absolute; top: 0; bottom: 0; left: 0; width: calc((100% - 24px) / 7); border-radius: 16px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); transform: translateX(calc(var(--i, 0) * (100% + 4px))); transition: transform .55s var(--spring); }
.wd { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 16px; }
.wd span { font-size: 11px; font-weight: 650; color: var(--text-3); }
.wd b { font-size: 16px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; transition: color .3s; }
.wd i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.wd.sel b { color: #fff; }
.wd.is-today span { color: #fff; }
.wd.st-done i { background: var(--good); }
.wd.st-early i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--good); }
.wd.st-missed i { background: var(--danger); }
.wd.st-partial i, .wd.st-active i { background: var(--warn); }
.wd.st-rest i { width: 8px; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .25); margin-top: 1.5px; }
.wd.st-today i, .wd.st-upcoming i { background: rgba(255, 255, 255, .3); }

/* pan-y: vertical drags on the card scroll the page, horizontal ones swipe between days. */
.deck { position: relative; height: clamp(350px, 47dvh, 450px); touch-action: pan-y; }
.deck-ghost { position: absolute; inset: 0; border-radius: 32px; pointer-events: none; }
.deck-ghost.g1 { transform: translateY(20px) scale(.93); background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .05); }
.deck-ghost.g2 { transform: translateY(38px) scale(.86); background: rgba(255, 255, 255, .025); border: 1px solid rgba(255, 255, 255, .035); }

.card {
  position: absolute; inset: 0; border-radius: 32px; padding: 20px 22px 18px;
  display: flex; flex-direction: column; overflow: hidden; cursor: pointer; will-change: transform;
  touch-action: pan-y;
  background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04) 55%, rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 40px 70px -30px rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: blur(34px) saturate(170%);
  backdrop-filter: blur(34px) saturate(170%);
}
.card-glow { position: absolute; width: 280px; height: 280px; right: -100px; top: -120px; border-radius: 50%; background: var(--c); filter: blur(70px); opacity: .22; pointer-events: none; }
.card.st-rest .card-glow { opacity: .12; }
.rest-moon { position: absolute; right: -30px; bottom: 40px; color: rgba(255, 255, 255, .05); pointer-events: none; }
.rest-moon svg { width: 210px; height: 210px; stroke-width: 1.2; }
.card-row { position: relative; display: flex; justify-content: space-between; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.badge svg { width: 14px; height: 14px; }
.b-done, .b-early { color: var(--good); }
.b-missed { color: var(--danger); }
.b-active, .b-partial { color: var(--warn); }
.b-today { color: #fff; }
.card-date { position: relative; margin-top: 14px; font-size: 14px; color: var(--text-2); font-weight: 550; }
.card-title { position: relative; font-size: 48px; line-height: 1.02; font-weight: 800; letter-spacing: -.04em; margin: 2px 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.st-rest .card-title { color: rgba(255, 255, 255, .8); }
.tags { position: relative; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12.5px; font-weight: 650; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, transparent); color: color-mix(in srgb, var(--c) 55%, #fff); }
.rest-copy { position: relative; color: var(--text-2); font-size: 15px; line-height: 1.5; max-width: 250px; }
.card-stats { position: relative; margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card-stats b { display: block; font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.card-stats span { font-size: 12px; color: var(--text-3); font-weight: 550; }
.card-list { position: relative; font-size: 13px; color: var(--text-2); margin-top: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-list em { font-style: normal; color: var(--text-3); }
.card-foot { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 13px; min-height: 42px; }
.card.st-rest .card-foot { margin-top: auto; }
.foot-text { min-width: 0; }
.foot-text b { display: block; font-size: 15px; font-weight: 650; }
.foot-text span { font-size: 13px; color: var(--text-2); }
.foot-go { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #000; display: grid; place-items: center; flex: none; }
.foot-go svg { width: 20px; height: 20px; stroke-width: 2.6; }
.foot-go.ghost { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; }
.card-move { margin-left: auto; flex: none; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px 0 11px; border-radius: 18px; background: rgba(255, 255, 255, .1); font-size: 13.5px; font-weight: 650; transition: transform .3s var(--spring), background .2s; }
.card-move svg { width: 16px; height: 16px; }
.card-move:active { transform: scale(.92); background: rgba(255, 255, 255, .18); }
.card-move + .foot-go { margin-left: 0; }

.deck-foot { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 46px; height: 36px; }
.deck-rel { min-width: 104px; text-align: center; font-size: 13.5px; font-weight: 650; color: var(--text-2); }
.nav-arrow { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); transition: transform .3s var(--spring), color .2s; }
.nav-arrow svg { width: 18px; height: 18px; }
.nav-arrow:active { transform: scale(.85); color: #fff; }
.today-btn { position: absolute; right: 0; height: 30px; padding: 0 13px; border-radius: 15px; background: var(--accent-soft); color: #fff; font-size: 13px; font-weight: 650; animation: popIn .45s var(--spring); }

.friend { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 24px; margin-top: 14px; animation: fadeUp .6s var(--ease) backwards; }
.friend-info { flex: 1; min-width: 0; }
.friend-info b { display: block; font-size: 15px; }
.friend-info span { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-info span.ok { color: var(--good); }
.friend-info svg { width: 13px; height: 13px; flex: none; }
.friend-streak { display: flex; align-items: center; gap: 4px; font-weight: 750; font-variant-numeric: tabular-nums; }
.friend-streak svg { width: 16px; height: 16px; color: var(--flame); }

.wk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wk-reset { font-size: 13px; font-weight: 650; color: var(--text-2); padding: 4px 6px; margin-bottom: 9px; }
.wk-reset:active { opacity: .6; }
.wk-list { border-radius: 22px; overflow: hidden; animation: fadeUp .6s var(--ease) .1s backwards; }
.wk-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 16px; text-align: left; transition: background .2s; }
.wk-row + .wk-row { border-top: 1px solid var(--line); }
.wk-row:active { background: rgba(255, 255, 255, .05); }
.wk-row.sel { background: rgba(255, 255, 255, .06); }
.wk-row.is-today .day-dow { color: #fff; }
.wk-row .day-info b { font-size: 16px; }
.wk-st { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 650; color: var(--text-3); }
.wk-st svg { width: 14px; height: 14px; }
.wk-st.st-done, .wk-st.st-early { color: var(--good); }
.wk-st.st-missed { color: var(--danger); }
.wk-st.st-active, .wk-st.st-partial { color: var(--warn); }
.wk-st.st-today { color: #fff; }

.move h3 { font-size: 20px; font-weight: 750; text-align: center; margin: 4px 0 6px; }
.move > p { color: var(--text-2); text-align: center; margin: 0 8px 16px; line-height: 1.45; font-size: 14px; }
.move > .btn { margin-top: 12px; }
.mv-list { border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .05); }
.mv-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 9px 16px; text-align: left; transition: background .2s; }
.mv-opt + .mv-opt { border-top: 1px solid var(--line); }
.mv-opt:active { background: rgba(255, 255, 255, .07); }
.mv-opt:disabled { opacity: .4; cursor: default; }
.mv-when b { display: block; font-size: 16px; font-weight: 650; }
.mv-when small { font-size: 12.5px; color: var(--text-2); }
.mv-what { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); text-align: right; }
.mv-what i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }

/* ---------- session ---------- */
.session { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: rgba(4, 4, 6, .8); -webkit-backdrop-filter: blur(40px) saturate(150%); backdrop-filter: blur(40px) saturate(150%); }
.session-bg { position: absolute; left: -30%; right: -30%; top: -35%; height: 70%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 14%, transparent), transparent); pointer-events: none; }
.s-head { position: relative; display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; padding: calc(var(--safe-t) + 8px) 14px 12px; }
.s-title { text-align: center; min-width: 0; }
.s-title b { display: block; font-size: 17px; font-weight: 700; }
.s-title span { font-size: 12.5px; color: var(--text-2); }
.s-count { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 15px; padding-right: 4px; }
.s-progress { position: relative; height: 3px; margin: 0 20px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.s-progress i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .6s var(--ease); }
.s-scroll { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px calc(var(--safe-b) + 110px); }
.s-list { display: flex; flex-direction: column; gap: 10px; max-width: 520px; margin: 0 auto; }
.notice { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; font-size: 13.5px; color: var(--text-2); background: rgba(255, 255, 255, .05); max-width: 520px; margin: 0 auto 12px; }
.notice svg { width: 18px; height: 18px; flex: none; }
.notice span { flex: 1; min-width: 0; line-height: 1.4; }
.notice-btn { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--accent); color: #000; font-size: 13.5px; font-weight: 700; transition: transform .3s var(--spring); }
.notice-btn:active { transform: scale(.94); }

.ex {
  border-radius: 24px; padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035));
  border: 1px solid rgba(255, 255, 255, .085);
  animation: fadeUp .55s var(--ease) var(--d) backwards;
  transition: background .4s, border-color .4s;
}
.ex-head { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.ex-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .08); color: var(--text-2); flex: none; }
.ex-info { flex: 1; min-width: 0; }
.ex-name { display: block; font-size: 16px; font-weight: 650; transition: color .3s; }
.ex-meta { display: block; font-size: 13px; color: var(--text-2); margin-top: 1px; }
.ex-check { width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .18); display: grid; place-items: center; color: transparent; flex: none; transition: background .3s, border-color .3s, color .3s; }
.ex-check svg { width: 20px; height: 20px; transform: scale(.3); transition: transform .45s var(--spring); }
.ex.done { background: rgba(156, 207, 169, .05); border-color: rgba(156, 207, 169, .18); }
.ex.done .ex-name { color: var(--text-2); }
.ex.done .ex-check { background: var(--good); border-color: var(--good); color: #000; }
.ex.done .ex-check svg { transform: scale(1); }
.ex-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s var(--ease); }
.ex-inner { overflow: hidden; min-height: 0; }
.ex.done:not(.open) .ex-body, .ex.closed .ex-body { grid-template-rows: 0fr; }
.ex-controls { display: flex; gap: 8px; padding-top: 14px; }
.stepper { flex: 1.35; min-width: 0; display: flex; align-items: center; height: 54px; border-radius: 17px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .06); }
.stepper-sm { flex: 1; }
.stepper button { width: 42px; height: 100%; flex: none; display: grid; place-items: center; color: var(--text-2); transition: transform .25s var(--spring), color .2s; }
.stepper button svg { width: 17px; height: 17px; }
.stepper button:active { transform: scale(.8); color: #fff; }
.stepper label { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 3px; cursor: text; }
.stepper-sm button { width: 34px; }
.stepper input { flex: none; min-width: 1.4ch; background: transparent; border: 0; outline: 0; padding: 0; text-align: center; font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stepper-sm input { font-size: 19px; }
.stepper input::placeholder { color: var(--text-3); }
.stepper input:disabled { opacity: 1; -webkit-text-fill-color: #fff; }
.stepper small { font-size: 12px; color: var(--text-3); font-weight: 650; }
.ex-sets { display: flex; gap: 6px; margin-top: 8px; }
.set { flex: 1; height: 44px; border-radius: 15px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 650; color: var(--text-2); transition: background .3s, color .3s, border-color .3s, transform .35s var(--spring); }
.set svg { width: 0; height: 15px; opacity: 0; transition: width .35s var(--spring), opacity .2s; stroke-width: 3; }
.set.on { background: var(--accent); color: #000; border-color: transparent; }
.set.on svg { width: 15px; opacity: 1; }
.set:active { transform: scale(.93); }
.ex-delta { display: flex; gap: 8px; align-items: center; min-height: 18px; margin-top: 9px; font-size: 12.5px; font-weight: 650; }
.ex-delta span { display: inline-flex; align-items: center; gap: 3px; }
.ex-delta svg { width: 13px; height: 13px; }
.pr { background: var(--warn); color: #000; border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.s-foot { max-width: 520px; margin: 18px auto 0; }

.rest-timer {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 45;
  bottom: calc(var(--safe-b) + 18px);
  display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 8px 0 10px; border-radius: 29px;
  background: rgba(34, 34, 38, .78); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .55);
  animation: pillIn .55s var(--spring);
  transition: background .3s, color .3s;
}
@keyframes pillIn { from { opacity: 0; transform: translate(-50%, 30px) scale(.9); } }
.rest-timer .ring { width: 38px; height: 38px; }
.rest-timer .ring-fg { transition: none; }
.rest-timer > span { font-size: 13px; color: var(--text-2); font-weight: 650; }
.rest-timer b { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; min-width: 50px; }
.rest-timer button { height: 42px; padding: 0 13px; border-radius: 21px; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 700; }
.rest-timer .rt-x { width: 42px; padding: 0; display: grid; place-items: center; }
.rest-timer .rt-x svg { width: 16px; height: 16px; }
.rest-timer.ending { background: var(--accent); color: #000; animation: pulse 1s ease-in-out infinite; }
.rest-timer.ending > span { color: rgba(0, 0, 0, .55); }
.rest-timer.ending button { background: rgba(0, 0, 0, .12); }
.rest-timer.ending .ring-bg { stroke: rgba(0, 0, 0, .15); }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.04); } }

.done-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; transition: opacity .35s; }
.done-overlay.show { opacity: 1; }
.done-card {
  width: min(100%, 360px); border-radius: 34px; padding: 28px 20px 20px; text-align: center;
  background: rgba(28, 28, 30, .72); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .6);
  transform: scale(.85) translateY(24px); transition: transform .65s var(--spring);
}
.done-overlay.show .done-card { transform: none; }
.done-ring svg { width: 86px; height: 86px; margin: 0 auto 10px; }
.done-ring circle { fill: var(--good-soft); stroke: var(--good); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: 50% 50%; animation: draw .7s var(--ease) .15s forwards; }
.done-ring path { fill: none; stroke: var(--good); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .45s var(--ease) .65s forwards; }
.done-card h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0; }
.done-card p { color: var(--text-2); margin-bottom: 18px; font-size: 15px; }
.done-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.done-stats div { background: rgba(255, 255, 255, .06); border-radius: 16px; padding: 12px 4px; }
.done-stats b { display: block; font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.done-stats span { font-size: 12px; color: var(--text-3); }
.done-overload { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--good); font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.done-overload svg { width: 16px; height: 16px; }
.done-trophies { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 16px; }
.done-trophy { display: flex; align-items: center; gap: 6px; padding: 5px 11px 5px 5px; border-radius: 13px; background: rgba(255, 255, 255, .08); font-size: 13px; font-weight: 650; animation: popIn .5s var(--spring) .9s backwards; }
.done-trophy svg { width: 28px; height: 28px; }

.burst { position: fixed; inset: 0; pointer-events: none; z-index: 70; }
.burst i { position: absolute; width: 8px; height: 12px; border-radius: 2px; animation: burst 1.2s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes burst {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 140px)) rotate(var(--r)) scale(1); opacity: 0; }
}

/* ---------- workout (plan) ---------- */
.split { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 12px; border-radius: 24px; margin-bottom: 14px; }
.split-d { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; color: var(--text-3); transition: transform .3s var(--spring); }
.split-d:active { transform: scale(.9); }
.split-d i { width: 100%; height: 40px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 800; background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); color: color-mix(in srgb, var(--c) 60%, #fff); }
.split-d.rest i { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .06); color: var(--text-3); }
.split-d.today span { color: #fff; }
.days { display: flex; flex-direction: column; gap: 10px; }
.day { border-radius: 22px; overflow: hidden; animation: fadeUp .55s var(--ease) var(--d) backwards; }
.day.is-today { border-color: rgba(255, 255, 255, .22); }
.day-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; }
.day-dow { width: 32px; font-size: 12.5px; font-weight: 750; color: var(--text-3); text-transform: uppercase; flex: none; }
.day-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.day-info { flex: 1; min-width: 0; }
.day-info b { display: block; font-size: 17px; font-weight: 650; }
.day-info small { display: block; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.day-chev svg { width: 18px; height: 18px; color: var(--text-3); transition: transform .45s var(--spring); }
.day.open .day-chev svg { transform: rotate(180deg); }
.day-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.day.open .day-body { grid-template-rows: 1fr; }
.day-inner { overflow: hidden; min-height: 0; }
.day-content { padding: 0 16px 16px; }
.day-content > .muted { font-size: 14px; margin-bottom: 12px; }
.ex-list { list-style: none; margin: 0 0 12px; padding: 0; }
.ex-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.ex-list li em { font-style: normal; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-btns { display: flex; gap: 8px; justify-content: flex-end; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 11.5px; font-weight: 650; color: var(--text-3); margin: 0 0 6px 4px; text-transform: uppercase; letter-spacing: .06em; }
.field input { width: 100%; display: block; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .2s, background .2s; }
.field input:focus { border-color: rgba(255, 255, 255, .32); background: rgba(255, 255, 255, .08); }
.hint { font-size: 13px; color: var(--text-3); line-height: 1.55; margin: 18px 6px 14px; }
.workout [data-hint] { margin: 0 6px 12px; }
.reset-plan { margin: 22px auto 0; display: flex; color: var(--text-2); }

.edit-toggle { flex: none; height: 34px; padding: 0 16px; border-radius: 17px; background: var(--accent-soft); font-size: 15px; font-weight: 650; margin-bottom: 4px; transition: transform .3s var(--spring), background .25s, color .25s; }
.edit-toggle:active { transform: scale(.94); }
.edit-toggle.on { background: var(--accent); color: #000; }
.ed-icon { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: rgba(255, 255, 255, .07); color: var(--text-2); transition: transform .25s var(--spring), background .2s, opacity .2s; }
.ed-icon svg { width: 17px; height: 17px; }
.ed-icon:active { transform: scale(.86); background: rgba(255, 255, 255, .15); }
.ed-icon:disabled { opacity: .25; }
.day.is-editing { display: flex; align-items: center; padding-right: 10px; }
.day.is-editing .day-head { flex: 1; min-width: 0; padding-right: 8px; }
.day-pen svg { width: 16px; height: 16px; color: var(--text-3); }
.day-move { display: flex; gap: 6px; flex: none; }

/* day editor (full screen, reuses the session layout) */
.editor .s-head { grid-template-columns: 84px 1fr 84px; }
.ed-head-btn { height: 38px; padding: 0 6px; font-size: 16px; color: var(--text-2); justify-self: start; }
.ed-save { justify-self: end; padding: 0 16px; border-radius: 19px; background: var(--accent); color: #000; font-weight: 700; transition: transform .3s var(--spring); }
.ed-save:active { transform: scale(.94); }
.editor .s-list { gap: 0; }
.editor .group { margin-bottom: 16px; }
.editor .section-title { margin-top: 10px; }
.ed-list { display: flex; flex-direction: column; gap: 8px; }
.ed-list .empty { padding: 14px; }
.ed-ex { border-radius: 20px; padding: 12px; background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035)); border: 1px solid rgba(255, 255, 255, .085); }
.ed-top, .ed-bottom { display: flex; align-items: center; gap: 8px; }
.ed-bottom { margin-top: 8px; }
.ed-input, .ed-reps { height: 44px; border-radius: 13px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07); }
.ed-name { flex: 1; min-width: 0; padding: 0 12px; font-size: 16px; font-weight: 600; outline: none; }
.ed-name:focus, .ed-reps:focus-within { border-color: rgba(255, 255, 255, .3); }
.ed-del { color: var(--danger); }
.ed-sets { display: flex; align-items: center; height: 44px; border-radius: 13px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07); flex: none; }
.ed-sets button { width: 30px; height: 100%; display: grid; place-items: center; color: var(--text-2); }
.ed-sets button svg { width: 15px; height: 15px; }
.ed-sets button:active { color: #fff; }
.ed-sets span { min-width: 46px; text-align: center; font-size: 13px; color: var(--text-3); font-weight: 650; }
.ed-sets b { font-size: 17px; color: #fff; font-variant-numeric: tabular-nums; }
.ed-reps { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; padding: 0 10px; cursor: text; }
.ed-reps input { flex: 1; min-width: 0; width: 100%; background: transparent; border: 0; outline: 0; padding: 0; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ed-reps small { font-size: 12px; color: var(--text-3); font-weight: 650; }
.ed-add { margin-top: 10px; }
.ed-bottom .ed-icon { width: 32px; height: 32px; }
.ed-bottom .ed-icon svg { width: 15px; height: 15px; }

/* ---------- segmented ---------- */
.seg { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); padding: 3px; border-radius: 13px; background: rgba(118, 118, 128, .2); width: 100%; }
.seg-ind { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); border-radius: 10px; background: rgba(255, 255, 255, .2); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); transform: translateX(calc(var(--i) * 100%)); transition: transform .5s var(--spring); }
.seg button { position: relative; height: 32px; font-size: 13.5px; font-weight: 650; color: var(--text-2); transition: color .25s; white-space: nowrap; }
.seg button.on { color: #fff; }
.page > .seg { margin-bottom: 16px; }
.page > .seg button { height: 36px; font-size: 14px; }

/* ---------- progress ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { border-radius: 22px; padding: 14px 16px; animation: fadeUp .5s var(--ease) backwards; }
.stat:nth-child(2) { animation-delay: .04s; }
.stat:nth-child(3) { animation-delay: .08s; }
.stat:nth-child(4) { animation-delay: .12s; }
.stat > span { font-size: 12.5px; color: var(--text-2); font-weight: 650; }
.stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat em { font-style: normal; }
.stat small { font-size: 13px; color: var(--text-3); font-weight: 650; letter-spacing: 0; }
.chart-card { margin-top: 12px; border-radius: 26px; padding: 14px 0 14px; overflow: hidden; }
.chips-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 14px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip-sel { flex: none; height: 32px; padding: 0 13px; border-radius: 16px; background: rgba(255, 255, 255, .07); font-size: 13px; font-weight: 650; color: var(--text-2); white-space: nowrap; transition: background .3s, color .3s, transform .3s var(--spring); }
.chip-sel:active { transform: scale(.94); }
.chip-sel.on { background: #fff; color: #000; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 0 18px; }
.chart-head .muted { font-size: 13px; }
.big { display: block; font-size: 38px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.big small { font-size: 17px; color: var(--text-3); font-weight: 650; letter-spacing: 0; }
.delta-box { text-align: right; font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; }
.delta-box small { display: block; font-weight: 550; color: var(--text-3); font-size: 12px; }
.chart { padding: 6px 6px 0; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) forwards; }
.chart .area { fill: url(#chart-fill); opacity: 0; animation: fadeIn .8s .45s forwards; }
.chart .grid { stroke: rgba(255, 255, 255, .07); stroke-dasharray: 3 5; }
.chart text { fill: rgba(235, 235, 245, .35); font-size: 10px; font-family: inherit; }
.chart .dot { fill: #0b0b0c; stroke: var(--accent); stroke-width: 2; opacity: 0; animation: fadeIn .3s forwards; }
.chart .dot.last { fill: var(--accent); }
.chart-foot { display: flex; gap: 18px; padding: 8px 18px 0; font-size: 13px; color: var(--text-3); }
.chart-foot b { color: var(--text); font-weight: 650; }
.bars-card { border-radius: 24px; padding-bottom: 12px; }
.bars-head { display: flex; justify-content: space-between; padding: 14px 16px 0; font-size: 13px; color: var(--text-2); }
.bars-head b { color: #fff; font-weight: 700; margin-left: 3px; }
.bars { display: flex; gap: 8px; height: 140px; padding: 16px 16px 0; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bar-track i { display: block; width: 100%; border-radius: 8px 8px 4px 4px; background: rgba(255, 255, 255, .15); transform-origin: bottom; animation: grow .8s var(--ease) var(--d) backwards; }
.bar.cur .bar-track i { background: var(--accent); }
.bar span { font-size: 10px; color: var(--text-3); font-variant-numeric: tabular-nums; }
@keyframes grow { from { transform: scaleY(0); } }
.lifts { border-radius: 22px; overflow: hidden; }
.lift { display: flex; align-items: center; gap: 12px; padding: 12px 16px; width: 100%; text-align: left; transition: background .2s; }
.lift + .lift { border-top: 1px solid var(--line); }
.lift:active { background: rgba(255, 255, 255, .05); }
.lift-name { flex: 1; min-width: 0; }
.lift-name b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lift-name small { font-size: 12px; color: var(--text-3); }
.spark { width: 56px; height: 24px; flex: none; }
.spark path { fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.spark.up path { stroke: var(--good); }
.lift-val { text-align: right; min-width: 66px; }
.lift-val b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.lift-val small { font-size: 12px; font-weight: 650; }

.trophy-summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 24px; margin-bottom: 12px; }
.ts-ring { position: relative; width: 56px; height: 56px; flex: none; }
.ts-ring .ring { width: 56px; height: 56px; }
.ts-ring > svg:last-child { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; color: var(--accent); }
.trophy-summary b { display: block; font-size: 20px; font-weight: 750; }
.trophy-summary span { font-size: 13px; color: var(--text-2); }
.trophy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.trophy {
  position: relative; overflow: hidden; border-radius: 22px; padding: 16px 8px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06);
  animation: fadeUp .5s var(--ease) var(--d) backwards; transition: transform .35s var(--spring);
}
.trophy:active { transform: scale(.94); }
.trophy .trophy-svg { width: 54px; height: 54px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.trophy.unlocked .trophy-svg { animation: floaty 4s ease-in-out infinite; }
.trophy.unlocked::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .13) 48%, transparent 62%); transform: translateX(-100%); animation: shine 6s ease-in-out infinite; pointer-events: none; }
.trophy b { font-size: 12px; font-weight: 650; line-height: 1.25; min-height: 30px; display: flex; align-items: center; justify-content: center; }
.trophy.locked b { color: var(--text-3); }
.trophy small { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 750; color: var(--text-3); }
.tier-bronze.unlocked { background: radial-gradient(circle at 50% 25%, rgba(198, 158, 130, .12), rgba(255, 255, 255, .03) 70%); border-color: rgba(198, 158, 130, .18); }
.tier-silver.unlocked { background: radial-gradient(circle at 50% 25%, rgba(201, 204, 209, .1), rgba(255, 255, 255, .03) 70%); border-color: rgba(201, 204, 209, .16); }
.tier-gold.unlocked { background: radial-gradient(circle at 50% 25%, rgba(214, 192, 142, .12), rgba(255, 255, 255, .03) 70%); border-color: rgba(214, 192, 142, .2); }
.tier-platinum.unlocked { background: radial-gradient(circle at 50% 25%, rgba(200, 212, 220, .12), rgba(255, 255, 255, .03) 70%); border-color: rgba(200, 212, 220, .2); }
.tp { display: block; width: 64%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 4px; }
.tp i { display: block; height: 100%; background: rgba(255, 255, 255, .4); border-radius: 2px; }

.trophy-detail { text-align: center; padding: 4px 4px 8px; }
.trophy-detail .trophy-svg { width: 128px; height: 128px; margin: 4px auto 12px; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .6)); animation: floaty 4s ease-in-out infinite, popIn .6s var(--spring); }
.td-tier { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; color: var(--text-3); margin-bottom: 4px; }
.tier-gold.unlocked .td-tier { color: #d6c08e; }
.tier-silver.unlocked .td-tier { color: #c9ccd1; }
.tier-bronze.unlocked .td-tier { color: #c69e82; }
.tier-platinum.unlocked .td-tier { color: #c8d4dc; }
.trophy-detail h3 { font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.trophy-detail p { color: var(--text-2); margin: 6px 0 18px; }
.td-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: 0 20px; }
.td-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transform-origin: left; animation: growX .9s var(--ease) .2s backwards; }
@keyframes growX { from { transform: scaleX(0); } }
.td-val { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 10px; font-size: 14px; font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; }
.td-val svg { width: 15px; height: 15px; color: var(--good); }

/* ---------- settings ---------- */
.profile-card { display: flex; flex-direction: column; align-items: center; padding: 26px 16px 22px; border-radius: 30px; text-align: center; animation: fadeUp .5s var(--ease) backwards; }
.av-edit { position: relative; border-radius: 50%; transition: transform .35s var(--spring); }
.av-edit:active { transform: scale(.94); }
.av-badge { position: absolute; right: -2px; bottom: -2px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #000; display: grid; place-items: center; border: 3px solid #111; }
.av-badge svg { width: 16px; height: 16px; stroke-width: 2.4; }
.p-name { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 12px; }
.p-since { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.streak-card { margin-top: 12px; padding: 18px; border-radius: 26px; animation: fadeUp .5s var(--ease) .06s backwards; }
.streak-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.flame-big { width: 48px; height: 48px; border-radius: 15px; background: rgba(232, 165, 124, .12); display: grid; place-items: center; color: var(--flame); flex: none; }
.flame-big svg { width: 26px; height: 26px; animation: flicker 2.4s ease-in-out infinite; }
.streak-main { flex: 1; min-width: 0; }
.streak-main b { display: block; font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.streak-main span, .streak-side span { font-size: 12.5px; color: var(--text-2); }
.streak-side { text-align: right; margin-left: 12px; }
.streak-side b { display: block; font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
/* 12 week columns that share the card's width, so the squares shrink instead of overflowing. */
.heat { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(7, auto); grid-auto-flow: column; gap: 4px; }
.heat i { width: 100%; aspect-ratio: 1; border-radius: 4px; background: rgba(255, 255, 255, .06); animation: popIn .35s var(--ease) var(--d) backwards; }
.heat i.done { background: var(--good); }
.heat i.partial { background: rgba(227, 197, 143, .5); }
.heat i.rest { background: rgba(255, 255, 255, .12); }
.heat i.missed { background: rgba(232, 145, 138, .3); }
.heat i.future { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.heat i.today { outline: 1.5px solid #fff; outline-offset: 1px; }
.heat-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11.5px; color: var(--text-3); }
.heat-legend span { display: flex; align-items: center; gap: 5px; }
.heat-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.heat-legend i.done { background: var(--good); }
.heat-legend i.rest { background: rgba(255, 255, 255, .2); }
.heat-legend i.missed { background: rgba(232, 145, 138, .5); }

.group { border-radius: 22px; overflow: hidden; }
.group-gap { margin-top: 24px; }
.row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; width: 100%; text-align: left; }
.group > .row:not(:first-child)::before, .row-sub > .row::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; height: 1px; background: var(--line); }
.row.col::before { left: 14px !important; }
.row.col { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; }
.row-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .09); flex: none; }
.row-ic svg { width: 17px; height: 17px; }
.row-label { flex: 1; font-size: 16px; min-width: 0; }
.row.col .row-label { font-size: 14px; color: var(--text-2); }
.row-btn { transition: background .2s; }
.row-btn:active { background: rgba(255, 255, 255, .06); }
.row-btn > svg:last-child { width: 18px; height: 18px; color: var(--text-3); }
.row.danger { color: var(--danger); }
.row.danger .row-ic { background: rgba(232, 145, 138, .14); }
.time-input { background: rgba(255, 255, 255, .09); border: 0; border-radius: 10px; height: 34px; padding: 0 10px; color: #fff; font-size: 15px; font-weight: 650; outline: none; color-scheme: dark; }
.group-note { font-size: 13px; color: var(--text-3); margin: 8px 8px 0; line-height: 1.45; }
.footnote { display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; font-size: 12px; color: var(--text-3); margin-top: 22px; min-height: 16px; }
.footnote svg { width: 13px; height: 13px; }

.switch { position: relative; width: 51px; height: 31px; border-radius: 16px; background: rgba(120, 120, 128, .32); flex: none; transition: background .3s; }
.switch i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); transition: transform .45s var(--spring), width .25s var(--ease); }
.switch.on { background: var(--good); }
.switch.on i { transform: translateX(20px); }
.switch:active i { width: 32px; }
.switch.on:active i { transform: translateX(15px); }

/* ---------- sheet, toast ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 80; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .35s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 88dvh;
  display: flex; flex-direction: column; border-radius: 32px 32px 0 0;
  padding: 8px 20px calc(var(--safe-b) + 20px);
  background: rgba(26, 26, 28, .78); border: 1px solid rgba(255, 255, 255, .1); border-bottom: 0;
  -webkit-backdrop-filter: blur(34px) saturate(180%); backdrop-filter: blur(34px) saturate(180%);
  transform: translateY(105%); transition: transform .55s var(--ease);
}
.sheet-wrap.open .sheet-scrim { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grab { width: 38px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .25); margin: 0 auto 14px; flex: none; }
.sheet-body { overflow-y: auto; }
.confirm h3 { font-size: 20px; font-weight: 750; text-align: center; margin: 4px 0 6px; }
.confirm p { color: var(--text-2); text-align: center; margin: 0 8px 20px; line-height: 1.45; }
.confirm .btn + .btn { margin-top: 8px; }

.toast {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 12px); z-index: 100;
  display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 22px; max-width: 90vw;
  font-size: 14px; font-weight: 650; white-space: nowrap;
  background: rgba(44, 44, 48, .78); border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  transform: translate(-50%, -160%); opacity: 0;
  transition: transform .55s var(--spring), opacity .3s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast svg { width: 16px; height: 16px; color: var(--good); flex: none; }
.toast span { overflow: hidden; text-overflow: ellipsis; }

/* ---------- music: mini player ---------- */
.mp {
  --mp-bottom: calc(max(14px, calc(var(--safe-b) - 6px)) + 76px);
  position: fixed; z-index: 46; left: 50%; transform: translateX(-50%);
  bottom: var(--mp-bottom); width: min(calc(100% - 32px), 400px);
  display: flex; justify-content: flex-end; pointer-events: none;
  transition: bottom .5s var(--ease);
}
body:not(.in-app) .mp { display: none; }
body.session-open .mp { --mp-bottom: calc(var(--safe-b) + 86px); }
.mp > * { pointer-events: auto; }
.mp-fab, .mp-bar {
  background: rgba(28, 28, 30, .62); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 16px 40px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
}
.mp-fab { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); transition: transform .35s var(--spring), opacity .3s; }
.mp-fab svg { width: 21px; height: 21px; }
.mp-fab:active { transform: scale(.88); }
.mp-bar { position: relative; display: none; align-items: center; gap: 2px; width: 100%; height: 60px; padding: 0 6px 0 7px; border-radius: 30px; overflow: hidden; }
.mp.on .mp-fab { display: none; }
.mp.on .mp-bar { display: flex; animation: pillIn .55s var(--spring); }
@keyframes mpIn { from { opacity: 0; transform: translateY(20px) scale(.92); } }
.mp.on .mp-bar { animation-name: mpIn; }
.mp-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; height: 100%; text-align: left; }
.mp-art { flex: none; width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); overflow: hidden; }
.mp-art .pl-art { width: 44px; height: 44px; border-radius: 22px; }
.mp-text { min-width: 0; display: flex; flex-direction: column; }
.mp-text b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-text span { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: transform .3s var(--spring), background .2s; }
.mp-btn svg { width: 21px; height: 21px; }
.mp-btn:active { transform: scale(.86); background: rgba(255, 255, 255, .1); }
.mp-prog { position: absolute; left: 22px; right: 22px; bottom: 0; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.mp-prog i { display: block; height: 100%; background: rgba(255, 255, 255, .7); transform-origin: left; transform: scaleX(0); }

/* room for the music button under the last card */
body.in-app .view { padding-bottom: calc(var(--safe-b) + 176px); }
body.session-open .s-scroll { padding-bottom: calc(var(--safe-b) + 176px); }

/* equalizer bars: the only "picture" a sound gets */
.eq { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 16px; }
.eq i { width: 3px; height: 30%; border-radius: 2px; background: currentColor; }
.playing .eq i, .eq.playing i { animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.45s !important; }
.eq i:nth-child(3) { animation-delay: -.2s !important; }
.eq i:nth-child(4) { animation-delay: -.7s !important; }
.eq i:nth-child(5) { animation-delay: -.35s !important; }
.eq:not(.playing) i { height: 35%; }
.eq i:nth-child(2n) { height: 60%; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.eq-lg { height: 44px; gap: 5px; }
.eq-lg i { width: 6px; border-radius: 3px; }

/* ---------- music: sheet ---------- */
.music-sheet .sheet { height: 92dvh; max-height: 92dvh; padding-left: 18px; padding-right: 18px; }
.music-sheet .sheet-body { flex: 1; margin: 0 -18px; padding: 0 18px 10px; }
.mus-view { padding-bottom: 8px; }
.mus-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 16px; }
.mus-head .title-xl { margin: 0; }
.mus-add-btn { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 11px; border-radius: 19px; background: var(--accent); color: #000; font-size: 14px; font-weight: 700; transition: transform .3s var(--spring); }
.mus-add-btn svg { width: 16px; height: 16px; }
.mus-add-btn:active { transform: scale(.93); }
.mus-seg { margin-bottom: 14px; }
.mus-sub { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin: 0 0 10px; }
.mus-sub-title { text-align: center; font-size: 16px; font-weight: 700; }
.mus-sub .icon-btn { width: 40px; height: 40px; }
.mus-sub .icon-btn svg { width: 20px; height: 20px; }

.mus-empty { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 26px; border-radius: 24px; text-align: center; transition: transform .3s var(--spring); }
.mus-empty:active { transform: scale(.98); }
.mus-empty b { font-size: 18px; font-weight: 750; }
.mus-empty > span:last-child { color: var(--text-2); font-size: 14px; line-height: 1.45; }
.mus-empty-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); margin-bottom: 4px; }
.mus-empty-ic svg { width: 26px; height: 26px; }

/* now playing */
.now { border-radius: 24px; padding: 14px 16px 12px; margin-bottom: 18px; }
.now-top { display: flex; align-items: center; gap: 12px; }
.now-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.now-text b { font-size: 16.5px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-text span { font-size: 13px; color: var(--text-2); }
.now-x { width: 36px; height: 36px; flex: none; }
.now-x svg { width: 16px; height: 16px; }
.now-eq { color: #fff; }
.seek { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 12px 0 0; background: none; --p: 0%; }
.seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, #fff var(--p), rgba(255, 255, 255, .16) var(--p)); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.seek::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .16); }
.seek::-moz-range-progress { height: 4px; border-radius: 2px; background: #fff; }
.seek::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.now-times { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; margin-top: 1px; }
.now-ctrl { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 4px; }
.now-ctrl button { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; transition: transform .3s var(--spring); }
.now-ctrl button svg { width: 24px; height: 24px; }
.now-ctrl button:active { transform: scale(.85); }
.now-ctrl .now-play { width: 60px; height: 60px; background: #fff; color: #000; }
.now-ctrl .now-play svg { width: 26px; height: 26px; }

/* playlist art */
.pl-art { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 20px; overflow: hidden; flex: none; background: rgba(255, 255, 255, .08); }
.pl-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-ph { background: linear-gradient(145deg, color-mix(in srgb, var(--c) 55%, #1c1c1e), color-mix(in srgb, var(--c) 18%, #0c0c0e)); color: rgba(255, 255, 255, .7); }
.pl-ph svg { width: 34%; height: 34%; }
.pl-art.xs { width: 30px; height: 30px; border-radius: 9px; }
.pl-art.sm { width: 44px; height: 44px; border-radius: 22px; }
.pl-art.md { width: 50px; height: 50px; border-radius: 14px; }
.pl-art.lg { width: 112px; height: 112px; border-radius: 26px; }
.pl-art.xl { width: 168px; height: 168px; border-radius: 34px; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .8); }

.pl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 14px; }
.pl-tile { display: flex; flex-direction: column; gap: 3px; text-align: left; min-width: 0; transition: transform .35s var(--spring); }
.pl-tile:active { transform: scale(.96); }
.pl-tile .pl-art { margin-bottom: 7px; }
.pl-tile b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-tile > span:last-child { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.pl-tile .eq { height: 11px; gap: 2px; color: var(--good); }
.pl-tile .eq i { width: 2.5px; }
.pl-tile.is-on .pl-art { box-shadow: 0 0 0 2px var(--good); }
.pl-tile.is-on .eq i { animation: eq 1s ease-in-out infinite; }
.pl-add { border: 1.5px dashed rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .03); color: var(--text-2); }
.pl-add svg { width: 30px; height: 30px; }

/* sounds list */
.snd-list { border-radius: 22px; }
.snd { position: relative; display: flex; align-items: center; gap: 4px; padding: 0 6px 0 10px; min-height: 62px; }
.snd + .snd::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: var(--line); }
.snd-play { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); transition: transform .3s var(--spring); }
.snd-play svg { width: 15px; height: 15px; margin-left: 2px; }
.snd-play .eq { height: 13px; gap: 2px; }
.snd-play .eq i { width: 2.5px; }
.snd-play:active { transform: scale(.88); }
.snd.is-on .snd-play { background: #fff; color: #000; }
.snd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 6px 10px 8px; text-align: left; }
.snd-main b { font-size: 15.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snd-main span { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snd.is-on .snd-main b { color: #fff; }
.snd-more { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.snd-more svg { width: 20px; height: 20px; }
.snd-more:active { background: rgba(255, 255, 255, .08); }

/* menus + pickers */
.menu-head { text-align: center; margin: 0 10px 16px; }
.menu-head b { display: block; font-size: 18px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-head span { font-size: 13px; color: var(--text-2); }
.pick .group { max-height: 52dvh; overflow-y: auto; }
.pick-row .row-label small { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }
.pick-row .row-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-row > .pl-art { margin: 0; }
.tick { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid rgba(255, 255, 255, .22); color: transparent; transition: background .25s, border-color .25s, color .25s, transform .35s var(--spring); }
.tick svg { width: 14px; height: 14px; }
.tick.on { background: #fff; border-color: #fff; color: #000; transform: scale(1.06); }
.pick-done { margin-top: 14px; }
.prompt .field { margin: 4px 0 16px; }
.new-pl-art { position: relative; display: block; margin: 6px auto 18px; transition: transform .35s var(--spring); }
.new-pl-art:active { transform: scale(.95); }

/* playlist page */
.pl-hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 20px; }
.pl-hero-art { position: relative; border-radius: 34px; transition: transform .35s var(--spring); }
.pl-hero-art:active { transform: scale(.96); }
.pl-hero-art .av-badge { right: -6px; bottom: -6px; }
.pl-name { margin-top: 16px; width: 100%; background: none; border: 0; outline: none; text-align: center; font-size: 26px; font-weight: 800; letter-spacing: -.02em; border-radius: 12px; padding: 4px 8px; }
.pl-name:focus { background: rgba(255, 255, 255, .07); }
.pl-meta { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.pl-meta svg { width: 14px; height: 14px; }
.pl-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 16px; }
.pl-actions .btn { height: 50px; font-size: 15px; }
.pl-actions .btn[disabled] { opacity: .4; }
.pli-list { display: flex; flex-direction: column; gap: 8px; }
.pli { position: relative; display: flex; align-items: center; gap: 2px; min-height: 64px; padding: 0 8px 0 2px; border-radius: 18px; transition: transform .25s var(--ease), box-shadow .25s; }
.pli.lift { transition: none; z-index: 2; background: rgba(60, 60, 66, .92); box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.pli.is-on { box-shadow: inset 0 0 0 1.5px rgba(156, 207, 169, .5); }
.pli-grip { flex: none; width: 38px; align-self: stretch; display: grid; place-items: center; color: var(--text-3); touch-action: none; cursor: grab; }
.pli-grip svg { width: 18px; height: 18px; }
.pli-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 4px; text-align: left; }
.pli-main b { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pli-main b .eq { flex: none; height: 12px; gap: 2px; color: var(--good); }
.pli-main b .eq i { width: 2.5px; animation: eq 1s ease-in-out infinite; }
.pli-main span { font-size: 12.5px; color: var(--text-3); }
.times { flex: none; display: flex; align-items: center; height: 36px; border-radius: 18px; background: rgba(255, 255, 255, .08); }
.times button { width: 34px; height: 36px; display: grid; place-items: center; color: var(--text-2); }
.times button svg { width: 14px; height: 14px; }
.times button[disabled] { opacity: .3; }
.times b { min-width: 28px; text-align: center; font-size: 14.5px; font-weight: 750; font-variant-numeric: tabular-nums; }

/* editor */
.ed-intro { display: flex; gap: 12px; align-items: flex-start; margin: 4px 2px 16px; }
.ed-intro-ic { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 255, 255, .09); }
.ed-intro-ic svg { width: 19px; height: 19px; }
.ed-intro p { font-size: 14.5px; color: var(--text-2); line-height: 1.45; }
.ed-intro b { color: #fff; font-weight: 650; }
.ed-url { display: flex; gap: 8px; margin-bottom: 12px; }
.ed-url input { flex: 1; min-width: 0; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: 13px 14px; font-size: 16px; outline: none; }
.ed-url input:focus { border-color: rgba(255, 255, 255, .32); }
.ed-paste { flex: none; padding: 0 16px; border-radius: 14px; background: rgba(255, 255, 255, .12); font-size: 14.5px; font-weight: 700; }
.ed-paste:active { background: rgba(255, 255, 255, .2); }
.ed-err { color: var(--danger); font-size: 14px; margin: -2px 4px 12px; line-height: 1.4; }
.ed-loading { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 70px 20px; }
.ed-loading .eq { margin-bottom: 18px; }
.ed-loading b { font-size: 18px; font-weight: 750; }
.ed-loading > span:last-child { font-size: 14px; color: var(--text-2); }
.ed .section-title { margin-top: 20px; }

.wave { position: relative; height: 112px; border-radius: 20px; overflow: hidden; touch-action: none; padding: 0 14px; }
.wv-in { position: relative; height: 100%; --s: 0%; --e: 100%; }
.wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wv-shade { position: absolute; top: 0; bottom: 0; background: rgba(0, 0, 0, .35); pointer-events: none; }
.wv-shade-l { left: 0; width: var(--s); }
.wv-shade-r { right: 0; left: var(--e); }
.wv-h { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; }
.wv-s { left: var(--s); }
.wv-e { left: var(--e); }
.wv-h b { position: absolute; top: 50%; left: 50%; width: 16px; height: 34px; margin: -17px 0 0 -8px; border-radius: 8px; background: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .4); }
.wv-h b::after { content: ""; position: absolute; left: 6.5px; top: 10px; bottom: 10px; width: 3px; border-left: 1px solid rgba(0, 0, 0, .35); border-right: 1px solid rgba(0, 0, 0, .35); }
.wave.dragging .wv-h b { transform: scale(1.12); }
.wv-play { position: absolute; top: 8px; bottom: 8px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--good); box-shadow: 0 0 10px var(--good); pointer-events: none; }
.cut-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 12px; }
.cut-t { display: flex; flex-direction: column; gap: 4px; }
.cut-t:last-child { align-items: flex-end; }
.cut-t > span { font-size: 11.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin: 0 4px; }
.cut-t > div { display: flex; align-items: center; gap: 2px; height: 38px; border-radius: 19px; background: rgba(255, 255, 255, .07); }
.cut-t button { width: 32px; height: 38px; display: grid; place-items: center; color: var(--text-2); }
.cut-t button svg { width: 15px; height: 15px; }
.cut-t button:active { color: #fff; }
.cut-t b { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 50px; text-align: center; }
.cut-play { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000; transition: transform .3s var(--spring), background .3s, color .3s; }
.cut-play svg { width: 24px; height: 24px; }
.cut-play:not(.on) svg { margin-left: 3px; }
.cut-play:active { transform: scale(.9); }
.cut-play.on { background: var(--good); }
.cut-len { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 10px; font-variant-numeric: tabular-nums; }

.presets { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.fx { padding: 4px 0; }
.fx-row { position: relative; padding: 12px 16px 8px; }
.fx-row + .fx-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
.fx-top { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 4px; }
.fx-top b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.fx input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: none; }
.fx input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); }
.fx input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.fx input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); }
.fx input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; }
.ed-save { margin-top: 22px; }
.ed-save[disabled] { opacity: .6; }

.ed-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 40px 4px 10px; }
.ed-done-ic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--good-soft); color: var(--good); margin-bottom: 12px; animation: popIn .5s var(--spring); }
.ed-done-ic svg { width: 34px; height: 34px; }
.ed-done-name { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.ed-done > span:not(.ed-done-ic) { color: var(--text-2); font-size: 14.5px; }
.ed-done-btns { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 26px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===================== Phase 1: sign in, install guide, start guide, makkere ===================== */

/* sign in */
.login, .install, .onb { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.login-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 12px; }
.login .lock-sub { margin-bottom: 22px; }
.login-welcome, .inst-welcome { align-self: flex-start; font-size: 14px; font-weight: 650; padding: 7px 12px; border-radius: 12px; background: var(--good-soft); color: var(--good); margin: -10px 0 14px; animation: fadeUp .5s var(--ease) backwards; }
.login-step { animation: fadeUp .7s var(--ease) .18s backwards; }
.login-form { display: flex; flex-direction: column; gap: 4px; }
.login-form .btn { margin-top: 6px; }
.login-form .btn:disabled { opacity: .6; }
.code-input { font-size: 26px !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.onetime-input { font-size: 22px !important; letter-spacing: .12em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.onetime-input::placeholder { letter-spacing: .12em; }
.login-sent { font-size: 15px; color: var(--text-2); line-height: 1.5; margin: 0 4px 14px; }
.login-sent b { color: var(--text); font-weight: 650; }
.dev-note { font-size: 12.5px; color: var(--warn); margin: 0 4px 6px; }
.form-err { color: var(--danger); font-size: 14px; margin: 10px 4px 0; line-height: 1.4; }
.login-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.login-links button, .login-legacy { font-size: 14px; color: var(--text-2); font-weight: 600; padding: 8px 4px; }
.login-links button:disabled { opacity: .45; }
.login-legacy { display: block; margin: 18px auto 0; text-align: center; }
.login-legal { font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.5; margin-top: 22px; padding: 0 8px; }
.login-legal a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.legacy .profiles { margin: 4px 0 0; }
.legacy .profile { animation: fadeUp .6s var(--ease) var(--d) backwards; }

/* install guide */
.inst { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.inst-title { font-size: 34px; line-height: 1.08; }
.inst .lock-sub { margin-bottom: 22px; }
.inst-go { margin-bottom: 18px; animation: fadeUp .5s var(--ease) backwards; }
.inst-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.inst-steps li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07); font-size: 15.5px; line-height: 1.4; animation: fadeUp .6s var(--ease) calc(.18s + var(--d)) backwards; }
.inst-steps li > b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #000; font-size: 14px; }
.inst-steps li span { flex: 1; min-width: 0; }
.inst-steps li svg { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; margin: 0 2px; color: #4da3ff; }
.inst-copy { margin-top: 14px; }
.inst-note { font-size: 13px; color: var(--text-3); line-height: 1.5; margin: 16px 4px 0; }
.inst-skip { display: block; margin: 18px auto 0; font-size: 15px; font-weight: 600; color: var(--text-2); padding: 10px; }
.inst-arrow { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 6px); transform: translateX(-50%); color: #4da3ff; animation: nudge 1.4s ease-in-out infinite; pointer-events: none; }
.inst-arrow svg { width: 30px; height: 30px; stroke-width: 2.6; }
@keyframes nudge { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }
.lock-out { margin-top: 8px; }

/* start guide */
.onb-top { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.onb-back { width: 36px; height: 36px; display: grid; place-items: center; color: var(--text-2); }
.onb-back svg { width: 24px; height: 24px; }
.onb-bar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.onb-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width .5s var(--ease); }
.onb-body { flex: 1; display: flex; flex-direction: column; }
.onb-page { display: flex; flex-direction: column; }
.onb-title { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.onb-sub { color: var(--text-2); font-size: 16px; line-height: 1.45; margin: 8px 0 0; }
.onb-page > :nth-child(2) { margin-top: 22px; }
.onb-page .onb-sub + * { margin-top: 22px; }
.onb-form .btn { margin-top: 8px; }
.onb-opts { display: flex; flex-direction: column; gap: 10px; }
.onb-opt { text-align: left; padding: 16px 18px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1.5px solid rgba(255, 255, 255, .08); transition: border-color .25s, background .25s, transform .3s var(--spring); }
.onb-opt b { display: block; font-size: 17px; font-weight: 700; }
.onb-opt small { display: block; font-size: 13.5px; color: var(--text-2); margin-top: 3px; }
.onb-opt:active, .prog:active { transform: scale(.98); }
.onb-opt.on, .prog.on { border-color: var(--accent); background: rgba(255, 255, 255, .11); }
.onb-days { flex-direction: row; flex-wrap: wrap; }
.onb-days .onb-opt { flex: 1 1 28%; text-align: center; }
.onb-progs { display: flex; flex-direction: column; gap: 10px; }
.prog { position: relative; text-align: left; padding: 16px 18px; border-radius: 22px; background: rgba(255, 255, 255, .06); border: 1.5px solid rgba(255, 255, 255, .08); transition: border-color .25s, background .25s, transform .3s var(--spring); }
.prog b { display: block; font-size: 16.5px; font-weight: 700; padding-right: 90px; }
.prog small { display: block; font-size: 13.5px; color: var(--text-2); margin-top: 4px; line-height: 1.4; }
.prog .chip-sm { position: absolute; top: 14px; right: 14px; background: var(--good-soft); color: var(--good); }
.prog-own b { padding-right: 0; }
.prog-week { display: flex; gap: 5px; margin-top: 12px; }
.prog-week i { flex: 1; height: 26px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 750; color: #000; background: var(--c); }
.prog-week i.rest { background: rgba(255, 255, 255, .08); color: var(--text-3); }
.onb-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.onb-done .btn { margin-top: 18px; }
.onb-done .onb-sub { margin-top: 0; }
.prog-sheet .onb-progs { margin-top: 14px; }
.prog-sheet h3, .fr-sheet h3, .picker h3 { font-size: 21px; font-weight: 750; margin: 6px 0 4px; }
.fr-sub { font-size: 14px; color: var(--text-2); line-height: 1.45; margin: 0 0 6px; }

/* makkere */
.friend-slot { display: flex; flex-direction: column; }
.friend-slot .friend { cursor: pointer; }
.friend-invite { width: 100%; text-align: left; }
.friend-invite .avatar svg { width: 20px; height: 20px; }
.friend-go { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); }
.friend-go svg { width: 16px; height: 16px; }
.fr-list { display: flex; flex-direction: column; margin: 12px 0 16px; }
.fr-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fr-row:last-child { border-bottom: 0; }
.fr-name { flex: 1; min-width: 0; }
.fr-name b { display: block; font-size: 15px; }
.fr-name small { display: block; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invite-url { user-select: text; -webkit-user-select: text; word-break: break-all; font-size: 15px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); }

/* exercise picker */
.sheet-tall .sheet { height: 88dvh; }
.picker { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sheet-tall .sheet-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.pick-search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; margin: 10px 0 8px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); }
.pick-search svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.pick-search input { flex: 1; min-width: 0; font-size: 16px; background: none; border: 0; outline: none; color: inherit; }
.pick-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 0 -6px; padding: 0 6px 12px; }
.pick-head { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin: 16px 4px 6px; }
.pick-ex { display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 14px; transition: background .2s; }
.pick-ex:active { background: rgba(255, 255, 255, .08); }
.pick-ex b { display: block; font-size: 16px; font-weight: 600; }
.pick-ex small { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.pick-new { display: flex; align-items: center; gap: 8px; margin-top: 8px; background: rgba(255, 255, 255, .06); }
.pick-new svg { width: 18px; height: 18px; }
.ed-pick { text-align: left; display: flex; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* sets with their own weight and reps, notes */
.set small { font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.set.on svg { width: 0; opacity: 0; }
.ex-note { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ex-lastnote { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--text-2); line-height: 1.4; margin: 0; }
.ex-lastnote svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--text-3); }
.note-add { align-self: flex-start; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: var(--text-2); padding: 4px 2px; }
.note-add svg { width: 14px; height: 14px; }
.note-input { width: 100%; resize: none; font: inherit; font-size: 15px; color: inherit; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 13px; padding: 10px 12px; outline: none; }
.note-input:focus { border-color: rgba(255, 255, 255, .3); }

/* settings */
.p-name { display: inline-flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin-top: 12px; }
.p-pen svg { width: 15px; height: 15px; color: var(--text-3); }
.row-val { font-size: 14px; color: var(--text-2); max-width: 46%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.row { color: inherit; text-decoration: none; }
.prompt h3 { font-size: 21px; font-weight: 750; margin: 6px 0 10px; }
.prompt .field input { font-size: 17px; }
.prompt .btn { margin-top: 4px; }

/* ---------- your centre: challenge and leaderboard ---------- */
.centre-card { margin-top: 14px; padding: 16px 16px 14px; border-radius: 24px; animation: fadeUp .6s var(--ease) backwards; }
.cc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.cc-gym { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-left { flex: none; color: var(--text-2); text-transform: none; letter-spacing: 0; font-weight: 600; }
.cc-title { font-size: 19px; font-weight: 750; letter-spacing: -.01em; margin: 6px 0 12px; line-height: 1.2; }
.cc-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.cc-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .8s var(--ease); }
.cc-bar.done i { background: var(--good); }
.cc-prog { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cc-streak { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 750; }
.cc-streak svg { width: 15px; height: 15px; color: var(--flame); }
.cc-prize { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; background: rgba(227, 197, 143, .1); color: var(--warn); font-size: 14px; font-weight: 600; line-height: 1.35; }
.cc-prize svg { width: 17px; height: 17px; flex: none; }
.cc-ask { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cc-ask b { font-size: 15px; }
.cc-ask p { font-size: 13.5px; color: var(--text-2); line-height: 1.45; margin: 4px 0 12px; }
.cc-btns { display: flex; gap: 8px; }
.cc-btns .btn { flex: 1; }
.cc-note { font-size: 13.5px; color: var(--text-2); margin: 14px 0 0; line-height: 1.45; }
.cc-link { color: var(--text); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; padding: 8px 2px; }
.cc-top { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.cc-top li, .lb-list li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.cc-top li b, .lb-list li b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cc-top li.me b, .lb-list li.me b { color: var(--good); }
.cc-rank, .lb-rank { width: 22px; flex: none; text-align: center; font-weight: 750; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cc-av { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 750; }
.cc-n, .lb-val { flex: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 750; font-variant-numeric: tabular-nums; }
.lb-val svg { width: 15px; height: 15px; color: var(--flame); }
.cc-all { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; margin-top: 12px; padding: 10px 0 0; border-top: 1px solid var(--line); font-size: 14px; font-weight: 650; color: var(--text-2); }
.cc-all svg { width: 16px; height: 16px; }
.lb-sheet h3 { font-size: 20px; font-weight: 750; margin: 0 0 4px; }
.lb-sheet .seg { margin: 14px 0 6px; }
.lb-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 2px; max-height: 52vh; overflow-y: auto; }
.lb-list li { padding: 8px 6px; border-radius: 12px; }
.lb-list li.me { background: var(--good-soft); }

/* ---------- share buttons ---------- */
.top-share, .cc-share, .streak-share { flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--text-2); transition: transform .3s var(--spring), background .2s; }
.top-share { width: 44px; height: 44px; margin-bottom: 4px; }
.cc-share { width: 36px; height: 36px; margin: -6px -6px -6px 0; background: none; }
.streak-share { width: 36px; height: 36px; margin-left: 10px; }
.top-share svg, .streak-share svg { width: 19px; height: 19px; }
.cc-share svg { width: 17px; height: 17px; }
.top-share:active, .cc-share:active, .streak-share:active { transform: scale(.9); }
.td-share { margin: 18px auto 0; gap: 7px; }
.cc-head .cc-left { margin-left: auto; }
.cc-web { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 6px; font-size: 14px; font-weight: 650; color: var(--text-2); }
.cc-web svg { width: 15px; height: 15px; }

/* ---------- cardio ---------- */
.cardio-controls { flex-wrap: wrap; }
.cardio-controls .stepper { flex: 1 1 100%; }
.cardio-field { flex: 1 1 0; min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 4px; height: 50px; padding: 0 10px; border-radius: 15px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .06); cursor: text; }
.cardio-field input { flex: none; min-width: 1.4ch; background: transparent; border: 0; outline: 0; padding: 0; text-align: center; font-size: 19px; font-weight: 750; font-variant-numeric: tabular-nums; color: #fff; line-height: 50px; }
.cardio-field input::placeholder { color: var(--text-3); }
.cardio-field small { font-size: 12px; color: var(--text-3); font-weight: 650; white-space: nowrap; }
.s-foot { display: grid; gap: 10px; }
.s-add-cardio { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.s-add-cardio svg { width: 18px; height: 18px; }
.cardio-bars .bar-track { position: relative; }
.bar-goal { position: absolute; left: -4px; right: -4px; height: 0; border-top: 1px dashed rgba(255, 255, 255, .34); pointer-events: none; }
.bar.goal i { background: #9ccfa9; }
.bars-note { margin: 10px 16px 0; font-size: 12px; color: var(--text-3); }

/* ---------- new at a centre: 5 workouts in the first 30 days ---------- */
.cc-welcome { margin: 4px 0 14px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07); }
.cc-welcome b { display: block; font-size: 15px; }
.cc-welcome p { margin: 3px 0 0; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.cc-welcome.done b { color: #9ccfa9; }
.cc-dots { display: flex; gap: 6px; margin-top: 10px; }
.cc-dots i { flex: 1; max-width: 40px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .14); }
.cc-dots i.on { background: #9ccfa9; }
