/* =========================================================================
   Volley Ballers — Volleyball Performance App
   Design system v2: premium athletic SaaS — aurora bg, glass, glow, motion.
   Edytuj zmienne w :root, żeby zmienić kolory / odstępy / typografię.
   ========================================================================= */

:root {
  /* --- Kolory tła --- */
  --bg:            #07080A;   /* główne tło (graphite/black) */
  --bg-2:          #0C0E12;   /* tło sekcji / wnętrza pierścieni */
  --bg-3:          #101218;
  --surface:       rgba(255,255,255,0.045);  /* karty */
  --surface-2:     rgba(255,255,255,0.075);  /* karty hover / aktywne */
  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);

  /* --- Typografia --- */
  --text:    #F5F7FA;          /* mocna biała */
  --text-2:  rgba(244,246,248,0.60);
  --text-3:  rgba(244,246,248,0.36);

  /* --- Akcent (gradient: blue → cyan, z fioletem w tle) --- */
  --accent:        #4EA8FF;
  --accent-2:      #76E4FF;
  --accent-3:      #9D7BFF;   /* tylko ambient/akcenty głębi */
  --accent-grad:   linear-gradient(135deg, #4EA8FF 0%, #76E4FF 100%);
  --accent-grad-3: linear-gradient(135deg, #4EA8FF 0%, #76E4FF 55%, #9D7BFF 120%);
  --accent-glow:   rgba(78,168,255,0.45);
  --accent-soft:   rgba(78,168,255,0.12);
  --on-accent:     #03101D;   /* tekst na akcencie */

  /* --- Semantyczne (tylko readiness/statusy) --- */
  --good:   #34E2A0;
  --mid:    #FFCB57;
  --bad:    #FF6B6B;

  /* --- Promienie --- */
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --r-xl: 34px;

  /* --- Cienie (warstwowe, głębokie) --- */
  --shadow:      0 12px 40px rgba(0,0,0,0.55);
  --shadow-lg:   0 24px 70px -20px rgba(0,0,0,0.75);
  --hairline:    inset 0 1px 0 rgba(255,255,255,0.07);
  --shadow-glow: 0 0 0 1px var(--border), 0 18px 50px rgba(0,0,0,0.55);

  /* --- Easing --- */
  --ease:        cubic-bezier(.22,.7,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);

  --pad: 20px;
  --maxw: 480px; /* mobile-first kontener */

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.5;
  letter-spacing: -0.011em;
}
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: rgba(118,228,255,0.22); }

/* Ukryj scrollbary w całej aplikacji — czysty, appowy wygląd (przewijanie działa) */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Aurora tła — wolno dryfujące pola światła */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% -10%;
  background:
    radial-gradient(42% 38% at 50% -8%, rgba(78,168,255,0.22), transparent 70%),
    radial-gradient(38% 34% at 100% 8%, rgba(157,123,255,0.14), transparent 72%),
    radial-gradient(46% 42% at 0% 100%, rgba(52,226,160,0.08), transparent 70%),
    radial-gradient(40% 40% at 90% 100%, rgba(118,228,255,0.08), transparent 72%);
  pointer-events: none;
  z-index: 0;
  filter: saturate(120%);
  animation: aurora 26s var(--ease) infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(0,-2.5%,0) scale(1.08); }
}
/* Delikatne ziarno — premium "film grain" */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------- Aplikacja shell */
#app {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen { display: none; flex: 1; flex-direction: column; }
.screen.active { display: flex; }

/* --- ANIMACJE WEJŚCIA (staggerowane) --- */
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.screen.active > .top { animation: dropIn .5s var(--ease) backwards; }
.screen.active > .progress-track { animation: fadeIn .5s var(--ease) backwards; }

.screen.active .scroll > *,
.screen.active .hero > *:not(.hero-glow),
.screen.active .ready-wrap > *,
.screen.active .ob-step > * {
  animation: riseIn .55s var(--ease) backwards;
}
/* Stagger — kolejne elementy wchodzą z opóźnieniem */
.screen.active .scroll > *:nth-child(1),  .screen.active .hero > *:nth-child(2),  .screen.active .ready-wrap > *:nth-child(1),  .screen.active .ob-step > *:nth-child(1) { animation-delay: .04s; }
.screen.active .scroll > *:nth-child(2),  .screen.active .hero > *:nth-child(3),  .screen.active .ready-wrap > *:nth-child(2),  .screen.active .ob-step > *:nth-child(2) { animation-delay: .09s; }
.screen.active .scroll > *:nth-child(3),  .screen.active .hero > *:nth-child(4),  .screen.active .ready-wrap > *:nth-child(3),  .screen.active .ob-step > *:nth-child(3) { animation-delay: .14s; }
.screen.active .scroll > *:nth-child(4),  .screen.active .hero > *:nth-child(5),  .screen.active .ready-wrap > *:nth-child(4),  .screen.active .ob-step > *:nth-child(4) { animation-delay: .19s; }
.screen.active .scroll > *:nth-child(5),  .screen.active .hero > *:nth-child(6),  .screen.active .ready-wrap > *:nth-child(5),  .screen.active .ob-step > *:nth-child(5) { animation-delay: .24s; }
.screen.active .scroll > *:nth-child(6),  .screen.active .ready-wrap > *:nth-child(6),  .screen.active .ob-step > *:nth-child(6) { animation-delay: .29s; }
.screen.active .scroll > *:nth-child(7)  { animation-delay: .34s; }
.screen.active .scroll > *:nth-child(8)  { animation-delay: .39s; }
.screen.active .scroll > *:nth-child(9)  { animation-delay: .44s; }
.screen.active .scroll > *:nth-child(n+10) { animation-delay: .48s; }

.scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--pad) 124px;
  -webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------- Typografia */
.eyebrow {
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.muted { color: var(--text-2); }
.dim   { color: var(--text-3); }
.big-num {
  font-size: 54px; font-weight: 800; letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------- Karty */
.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  box-shadow: var(--hairline), 0 10px 34px -16px rgba(0,0,0,0.7);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
/* Górny rozświetlony hairline (gradientowa ramka) */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.card + .card { margin-top: 14px; }
.card.glow {
  border-color: var(--border-strong);
  box-shadow: var(--hairline), 0 0 50px -18px var(--accent-glow), 0 20px 50px -22px rgba(0,0,0,0.8);
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: var(--hairline), 0 22px 50px -24px rgba(0,0,0,0.85); }
  .card.glow:hover { box-shadow: var(--hairline), 0 0 64px -16px var(--accent-glow), 0 24px 56px -22px rgba(0,0,0,0.85); }
}

/* ------------------------------------------------------------------ Buttony */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 17px 22px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  overflow: hidden;
  transition: transform .14s var(--ease), box-shadow .3s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--accent-grad);
  color: var(--on-accent);
  box-shadow: 0 10px 30px -8px var(--accent-glow), var(--hairline);
}
.btn-primary:hover { box-shadow: 0 16px 44px -8px var(--accent-glow), var(--hairline); }
/* Shine — przesuwający się błysk (hover + okresowo, by przyciągał wzrok na mobile) */
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -75%; width: 55%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  animation: shine 5.5s var(--ease) infinite;
}
.btn-primary:hover::after { animation: shine .9s var(--ease); }
@keyframes shine { 0% { left: -75%; } 18%, 100% { left: 135%; } }
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.24); }
.btn-sm { padding: 12px 18px; font-size: 14px; width: auto; }

/* --------------------------------------------------------- Header ekranu */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--pad) 18px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; font-size: 17px; }
.brand .logo {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent-grad);
  display: grid; place-items: center; color: var(--on-accent); font-weight: 900; font-size: 17px;
  box-shadow: 0 0 24px -4px var(--accent-glow), var(--hairline);
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  box-shadow: var(--hairline);
  transition: transform .2s var(--ease);
}
.avatar:active { transform: scale(.92); }

/* ===================================================================== */
/*  LANDING / SPLASH                                                     */
/* ===================================================================== */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px var(--pad) 44px;
  position: relative;
  overflow: hidden;
}
.hero-glow {
  position: absolute; top: -8%; left: 50%; transform: translateX(-50%);
  width: 140%; height: 62%;
  background:
    radial-gradient(circle, var(--accent-glow), transparent 62%),
    radial-gradient(circle at 70% 40%, rgba(157,123,255,0.3), transparent 60%);
  filter: blur(46px); opacity: .55; pointer-events: none;
  animation: heroPulse 7s ease-in-out infinite alternate;
}
@keyframes heroPulse { from { opacity: .42; transform: translateX(-50%) scale(1); } to { opacity: .62; transform: translateX(-50%) scale(1.08); } }
.hero h1 { font-size: 46px; margin: 16px 0 14px; letter-spacing: -.035em; }
.hero h1 span {
  background: var(--accent-grad-3);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .sub { font-size: 17px; color: var(--text-2); max-width: 92%; margin-bottom: 30px; line-height: 1.55; }
.hero .badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.pill {
  font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  backdrop-filter: blur(12px); box-shadow: var(--hairline);
}

/* ===================================================================== */
/*  ONBOARDING                                                           */
/* ===================================================================== */
.progress-track { height: 5px; background: rgba(255,255,255,0.06); border-radius: 999px; margin: 0 var(--pad); overflow: hidden; }
.progress-fill {
  height: 100%; width: 0; background: var(--accent-grad); border-radius: 999px;
  transition: width .5s var(--ease); box-shadow: 0 0 14px var(--accent-glow);
  position: relative; overflow: hidden;
}
.progress-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  animation: shine 2.2s var(--ease) infinite;
}

.ob-step { padding: 24px var(--pad) 0; }
.ob-step h2 { margin-bottom: 6px; }
.ob-step .q-sub { color: var(--text-2); margin-bottom: 26px; }

/* Opcje wyboru */
.options { display: grid; gap: 10px; }
.options.grid-2 { grid-template-columns: 1fr 1fr; }
.opt {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 18px; border-radius: var(--r);
  background: var(--surface); border: 1.5px solid var(--border);
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease), box-shadow .25s var(--ease);
  text-align: left; width: 100%;
  box-shadow: var(--hairline);
}
.opt:active { transform: scale(.98); }
@media (hover: hover) { .opt:hover { border-color: var(--border-strong); background: var(--surface-2); } }
.opt.sel {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 34px -12px var(--accent-glow), var(--hairline);
  animation: pop .34s var(--ease-spring);
}
@keyframes pop { 0% { transform: scale(.96); } 55% { transform: scale(1.03); } 100% { transform: scale(1); } }
.opt .opt-ico { font-size: 22px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.opt .opt-t { font-weight: 700; font-size: 15px; }
.opt .opt-d { font-size: 12.5px; color: var(--text-2); }
.opt .check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex-shrink: 0; transition: all .2s var(--ease-spring); }
.opt.sel .check { background: var(--accent-grad); border-color: transparent; color: var(--on-accent); box-shadow: 0 0 14px var(--accent-glow); }
.opt.sel .check::after { content: "✓"; font-size: 13px; font-weight: 900; }
.opt.compact { flex-direction: column; align-items: flex-start; gap: 6px; }
.opt.compact .check { position: absolute; }

/* Slidery / inputy liczbowe */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; font-weight: 600; }
.range-val { font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.range-val small { font-size: 16px; color: var(--text-2); font-weight: 600; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 7px; border-radius: 999px;
  background: rgba(255,255,255,0.08); margin-top: 14px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-grad); cursor: pointer; box-shadow: 0 0 0 5px rgba(78,168,255,0.16), 0 4px 14px var(--accent-glow);
  border: 3px solid var(--bg);
  transition: transform .12s var(--ease);
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.18); }
input[type="range"]::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%; background: #4EA8FF;
  cursor: pointer; border: 3px solid var(--bg); box-shadow: 0 0 0 5px rgba(78,168,255,0.16);
}

.text-input {
  width: 100%; padding: 16px; border-radius: 14px;
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: 16px; color: var(--text); transition: border .2s var(--ease), box-shadow .2s var(--ease);
  box-shadow: var(--hairline);
}
.text-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.text-input::placeholder { color: var(--text-3); }

/* Zgoda na regulamin / politykę prywatności (rejestracja) */
.consent { display: flex; align-items: flex-start; gap: 12px; margin: 2px 2px 4px; }
.consent input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid var(--border-strong); background: var(--surface); cursor: pointer; position: relative;
  transition: background .18s var(--ease), border-color .18s var(--ease), box-shadow .2s var(--ease), transform .12s var(--ease-spring);
}
.consent input[type="checkbox"]:active { transform: scale(.86); }
.consent input[type="checkbox"]:checked { background: var(--accent-grad); border-color: transparent; box-shadow: 0 0 16px -4px var(--accent-glow); }
.consent input[type="checkbox"]:checked::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--on-accent); font-weight: 900; font-size: 13px; }
.consent-txt { font-size: 13px; line-height: 1.45; color: var(--text-2); cursor: pointer; }
.consent-txt a { color: var(--accent-2); font-weight: 600; }
.consent-txt a:hover { text-decoration: underline; }

/* Stała stopka onboardingu */
.ob-footer {
  padding: 14px var(--pad) calc(20px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 32%);
  position: sticky; bottom: 0;
}

/* ===================================================================== */
/*  PLAN READY                                                           */
/* ===================================================================== */
.ready-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px var(--pad); }
.ready-wrap .eyebrow { margin-bottom: 20px; }
.ready-wrap .muted { max-width: 300px; margin-left: auto; margin-right: auto; }
.ready-ring {
  width: 116px; height: 116px; border-radius: 50%; margin: 2px 0 24px; position: relative;
  background: conic-gradient(from -90deg, var(--accent), var(--accent-2) var(--p,0%), rgba(255,255,255,0.06) 0);
  display: grid; place-items: center;
  box-shadow: 0 0 70px -10px var(--accent-glow);
}
.ready-ring::before {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  background: conic-gradient(from -90deg, var(--accent-glow), transparent 70%);
  filter: blur(14px); opacity: .6; animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ready-ring::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--bg-2); box-shadow: var(--hairline); }
.ready-ring .pct { position: relative; z-index: 1; font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; display: grid; place-items: center; }
.plan-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; width: 100%; margin: 26px 0; transition: opacity .6s var(--ease); }
.stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 10px; box-shadow: var(--hairline); }
.stat-box .v { font-size: 24px; font-weight: 800; }
.stat-box .l { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }

/* ===================================================================== */
/*  PAYWALL                                                              */
/* ===================================================================== */
.price-tag { display: flex; align-items: baseline; gap: 6px; justify-content: center; margin: 6px 0 4px; }
.price-tag .amount { font-size: 50px; font-weight: 800; letter-spacing: -.04em; }
.price-tag .per { color: var(--text-2); font-size: 15px; }
.trial-badge {
  display: block; width: max-content; max-width: 100%; margin: 0 auto 12px;
  padding: 7px 15px; border-radius: 999px; text-align: center;
  font-size: 13px; font-weight: 800; letter-spacing: -.01em;
  background: linear-gradient(135deg, rgba(52,226,160,.18), rgba(118,228,255,.16));
  border: 1px solid rgba(52,226,160,.45); color: var(--good);
  box-shadow: 0 0 24px -10px rgba(52,226,160,.6);
}
.feature-list { display: grid; gap: 14px; margin: 24px 0; }
.feature-list li { list-style: none; display: flex; gap: 12px; align-items: flex-start; }
.feature-list .fi { width: 24px; height: 24px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; flex-shrink: 0; font-size: 13px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(118,228,255,0.25); }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--text-3); font-size: 12.5px; margin-top: 14px; }

/* Popup płatności (modal) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: none; align-items: flex-end; justify-content: center;
  background: rgba(4,5,7,0.7);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.modal-overlay.show { display: flex; animation: fadeIn .28s var(--ease); }
.modal-card {
  width: 100%; max-width: var(--maxw);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -30px 80px rgba(0,0,0,0.7), var(--hairline);
  max-height: 92dvh; overflow-y: auto;
  animation: sheetUp .42s var(--ease-spring);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 15px; display: grid; place-items: center;
  transition: background .2s var(--ease), transform .15s var(--ease);
}
.modal-close:hover { background: var(--surface-2); }
.modal-close:active { transform: scale(.9); }
#checkoutMount { min-height: 200px; }

@media (min-width: 481px) {
  .modal-overlay { align-items: center; }
  .modal-card { border-radius: var(--r-xl); margin: 0 16px; }
}

/* ===================================================================== */
/*  DASHBOARD                                                            */
/* ===================================================================== */
.hello { padding: 4px var(--pad) 20px; }
.hello .eyebrow { margin-bottom: 4px; }

/* Streak hero */
.streak-card { display: flex; align-items: center; gap: 18px; overflow: hidden; }
.streak-flame { font-size: 42px; filter: drop-shadow(0 0 16px rgba(255,150,60,.7)); animation: flameFlicker 2.4s ease-in-out infinite; }
@keyframes flameFlicker { 0%,100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08) rotate(2deg); } }
.streak-card .big-num {
  line-height: .9;
  background: linear-gradient(135deg, #FFB347, #FF7847);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* Pierścienie postępu (wspólne) */
.week-ring-wrap { display: flex; align-items: center; gap: 20px; }
.ring {
  --p: 0%;
  width: 96px; height: 96px; border-radius: 50%; flex-shrink: 0; position: relative;
  background: conic-gradient(from -90deg, var(--accent), var(--accent-2) calc(var(--p)*1%), rgba(255,255,255,0.06) 0);
  display: grid; place-items: center;
  filter: drop-shadow(0 0 16px rgba(78,168,255,0.25));
}
.ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--bg-2); box-shadow: var(--hairline); }
.ring .ring-txt { position: relative; z-index: 1; font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }

/* Mini statystyki rzędem */
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; grid-auto-rows: 1fr; align-items: stretch; }
.stat-row .card { margin-top: 0; height: 100%; }
.mini-stat .v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mini-stat .l { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* Wykres progresu (słupki) */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 124px; margin-top: 16px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar {
  width: 100%; border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent) 60%, rgba(78,168,255,.2));
  min-height: 6px; transition: height .7s var(--ease);
  box-shadow: 0 0 18px -4px var(--accent-glow);
}
.bar.empty { background: rgba(255,255,255,0.06); box-shadow: none; }
.bar-col .lbl { font-size: 11px; color: var(--text-3); font-weight: 600; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 12px; }
.section-title a { font-size: 13px; color: var(--accent-2); font-weight: 600; }

/* Karta dzisiejszego treningu (CTA) */
.today-cta { position: relative; overflow: hidden; }
.today-cta::before {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%); filter: blur(12px);
  animation: heroPulse 5s ease-in-out infinite alternate;
}
.today-cta > * { position: relative; }
.today-cta.rest-day::before { background: radial-gradient(circle, rgba(52,226,160,0.28), transparent 70%); }
.today-cta.rest-day { border-color: rgba(52,226,160,.25); }
.today-cta.rest-day .ex-tag { color: var(--good); }
.today-cta .meta { display: flex; gap: 16px; color: var(--text-2); font-size: 13px; margin: 10px 0 18px; }
.today-cta .meta span { display: flex; align-items: center; gap: 5px; }

/* ===================================================================== */
/*  READINESS CHECK-IN                                                   */
/* ===================================================================== */
.checkin-q { margin-bottom: 24px; }
.checkin-q .q-label { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 14px; }
.checkin-q .q-label .ico { font-size: 20px; }
.scale { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.scale button {
  aspect-ratio: 1; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--border);
  font-size: 18px; font-weight: 700; transition: transform .14s var(--ease-spring), background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); color: var(--text-2);
  box-shadow: var(--hairline);
}
.scale button:active { transform: scale(.9); }
.scale button.sel { background: var(--accent-soft); border-color: var(--accent); color: var(--text); box-shadow: 0 0 24px -8px var(--accent-glow); transform: translateY(-2px); }

.readiness-result { text-align: center; }
.readiness-ring {
  --p: 0; width: 180px; height: 180px; margin: 12px auto 24px; border-radius: 50%; position: relative;
  background: conic-gradient(from -90deg, var(--rc, var(--accent)) calc(var(--p)*1%), rgba(255,255,255,0.06) 0);
  display: grid; place-items: center; transition: background .9s var(--ease);
  filter: drop-shadow(0 0 26px rgba(78,168,255,0.3));
}
.readiness-ring::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--bg-2); box-shadow: var(--hairline); }
.readiness-ring .inner { position: relative; z-index: 1; }
.readiness-ring .inner .n { font-size: 50px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.readiness-ring .inner .u { font-size: 14px; color: var(--text-2); }
.reco { padding: 18px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); text-align: left; display: flex; gap: 14px; box-shadow: var(--hairline); }
.reco .reco-ico { font-size: 28px; }
.reco .reco-t { font-weight: 700; margin-bottom: 3px; }
.reco .reco-d { font-size: 13.5px; color: var(--text-2); }

/* ===================================================================== */
/*  DAILY VIEW (trening)                                                 */
/* ===================================================================== */
.train-head { padding: 24px var(--pad) 8px; }
.train-head .session-type {
  font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* Przełącznik planu: siłownia / dom */
.plan-switch { display: flex; gap: 6px; margin: 6px var(--pad) 0; padding: 5px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--hairline); }
.ps-opt { flex: 1; padding: 10px 8px; border-radius: 10px; font-size: 12.5px; font-weight: 700; color: var(--text-2); white-space: nowrap; transition: background .2s var(--ease), color .2s var(--ease), transform .12s var(--ease); }
.ps-opt.active { background: var(--accent-grad); color: var(--on-accent); box-shadow: 0 6px 18px -8px var(--accent-glow); }
.ps-opt:not(.active):active { transform: scale(.97); }

/* Wybór dnia planu — poziomy scroll */
.day-tabs { display: flex; gap: 8px; padding: 10px var(--pad) 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.day-tab { flex-shrink: 0; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; transition: all .2s var(--ease); box-shadow: var(--hairline); }
.day-tab:active { transform: scale(.95); }
.day-tab.active { background: var(--accent-grad); border-color: transparent; color: var(--on-accent); box-shadow: 0 6px 20px -8px var(--accent-glow); }
.day-tab .opt-dot { font-size: 10px; opacity: .7; font-weight: 600; }

.ex-note { font-size: 13px; color: var(--text-2); margin: 10px 0 0; line-height: 1.5; }

.block-tabs { display: flex; gap: 8px; padding: 14px var(--pad); position: sticky; top: 0; background: linear-gradient(180deg, var(--bg) 72%, transparent); z-index: 5; }
.block-tab { flex: 1; padding: 12px; border-radius: 13px; font-size: 13px; font-weight: 700; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); transition: all .2s var(--ease); box-shadow: var(--hairline); }
.block-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--text); box-shadow: 0 0 22px -10px var(--accent-glow); }

.exercise {
  position: relative;
  border: 1px solid var(--border); border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018));
  padding: 18px; margin-bottom: 12px;
  box-shadow: var(--hairline);
  transition: opacity .3s var(--ease), border-color .25s var(--ease), transform .15s var(--ease), box-shadow .25s var(--ease);
}
@media (hover: hover) { .exercise:hover { border-color: var(--border-strong); } }
.exercise.done { opacity: .5; }
.ex-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ex-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.ex-tag { font-size: 11px; color: var(--accent-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.ex-stats { display: flex; gap: 18px; margin: 12px 0; }
.ex-stats .es { font-size: 13px; color: var(--text-2); }
.ex-stats .es b { display: block; color: var(--text); font-size: 18px; font-weight: 800; margin-top: 2px; }
.ex-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.yt-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text); padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); transition: background .2s var(--ease), transform .14s var(--ease); }
.yt-link:active { transform: scale(.95); }
.yt-link:hover { background: rgba(255,255,255,0.1); }
.yt-link .yt-ico { color: #ff4d4d; font-size: 16px; }
.ex-check { margin-left: auto; width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--border-strong); display: grid; place-items: center; flex-shrink: 0; transition: all .2s var(--ease-spring); }
.ex-check:active { transform: scale(.85); }
.exercise.done .ex-check { background: var(--good); border-color: var(--good); color: var(--on-accent); box-shadow: 0 0 18px -4px rgba(52,226,160,.6); }
.exercise.done .ex-check::after { content: "✓"; font-weight: 900; }

/* Timer przerw — floating */
.rest-timer {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px);
  width: calc(var(--maxw) - 40px); max-width: calc(100% - 24px);
  background: rgba(12,14,18,.82); backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--border-strong); border-radius: var(--r);
  padding: 14px 16px; display: none; align-items: center; gap: 12px; z-index: 30;
  box-shadow: var(--shadow-lg), var(--hairline);
  opacity: 0; transition: opacity .3s var(--ease), transform .35s var(--ease-spring);
}
.rest-timer.show { display: flex; opacity: 1; transform: translateX(-50%) translateY(0); }
.rest-timer .rt-num { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 58px; flex-shrink: 0; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.rest-timer > div:nth-child(2) { flex: 1; min-width: 0; }
.rest-timer .rt-label { font-size: 12px; color: var(--text-2); }
.rest-timer .rt-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.rt-btn { padding: 9px 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: 13px; white-space: nowrap; transition: transform .14s var(--ease), background .2s var(--ease); }
.rt-btn:active { transform: scale(.92); }

/* ===================================================================== */
/*  CHAT                                                                 */
/* ===================================================================== */
.chat-screen { display: flex; flex-direction: column; height: calc(100dvh - 71px); }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 18px var(--pad); border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent); }
.chat-header .coach-av { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-grad); display: grid; place-items: center; font-weight: 800; color: var(--on-accent); box-shadow: 0 0 22px -6px var(--accent-glow), var(--hairline); }
.chat-header .status { font-size: 12px; color: var(--good); display: flex; align-items: center; gap: 5px; }
.chat-header .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.8); } }
.chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px var(--pad); display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 80%; padding: 13px 16px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; animation: msgIn .35s var(--ease-spring) backwards; box-shadow: 0 4px 16px -8px rgba(0,0,0,.6); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.msg.in  { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 6px; backdrop-filter: blur(10px); }
.msg.out { align-self: flex-end; background: var(--accent-grad); color: var(--on-accent); border-bottom-right-radius: 6px; font-weight: 500; }
.msg .t { font-size: 10px; opacity: .6; margin-top: 4px; display: block; }
.chat-input { display: flex; gap: 10px; padding: 14px var(--pad) calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: rgba(7,8,10,.85); backdrop-filter: blur(20px); }
.chat-input input { flex: 1; padding: 14px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 15px; transition: border .2s var(--ease), box-shadow .2s var(--ease); }
.chat-input input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chat-input .send { width: 50px; height: 50px; border-radius: 50%; background: var(--accent-grad); color: var(--on-accent); display: grid; place-items: center; font-size: 19px; flex-shrink: 0; box-shadow: 0 6px 20px -6px var(--accent-glow); transition: transform .14s var(--ease-spring); }
.chat-input .send:active { transform: scale(.88); }

/* ===================================================================== */
/*  PROFILE                                                              */
/* ===================================================================== */
.profile-hero { text-align: center; padding: 20px 0 10px; }
.profile-hero .big-av { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 14px; background: var(--accent-grad); display: grid; place-items: center; font-size: 34px; font-weight: 800; color: var(--on-accent); box-shadow: 0 0 44px -8px var(--accent-glow), var(--hairline); }
.info-list { display: grid; gap: 1px; background: var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--hairline); }
.info-row { display: flex; justify-content: space-between; padding: 16px 18px; background: var(--bg-2); font-size: 14.5px; transition: background .2s var(--ease); }
.info-row:hover { background: var(--bg-3); }
.info-row .k { color: var(--text-2); }
.info-row .v { font-weight: 600; }
.goal-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.goal-chip { font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px; background: var(--accent-soft); border: 1px solid rgba(78,168,255,0.4); color: var(--accent-2); }
.sub-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; background: var(--accent-grad); color: var(--on-accent); font-weight: 700; font-size: 13px; box-shadow: 0 6px 20px -8px var(--accent-glow), var(--hairline); }

/* ===================================================================== */
/*  PANEL TRENERA — lista rozmów                                         */
/* ===================================================================== */
.convo {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 14px; border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018));
  border: 1px solid var(--border); margin-bottom: 10px;
  transition: transform .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
  box-shadow: var(--hairline);
}
.convo:active { transform: scale(.985); }
@media (hover: hover) { .convo:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-2px); } }
.convo-av {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-grad); color: var(--on-accent);
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
  box-shadow: 0 0 20px -8px var(--accent-glow), var(--hairline);
}
.convo-main { flex: 1; min-width: 0; }
.convo-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.convo-name { font-weight: 700; font-size: 15px; }
.convo-time { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.convo-last { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* ===================================================================== */
/*  BOTTOM NAV                                                           */
/* ===================================================================== */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw);
  display: none; align-items: center; justify-content: space-around;
  padding: 12px 8px calc(12px + env(safe-area-inset-bottom));
  background: rgba(7,8,10,.72); backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%);
  border-top: 1px solid var(--border); z-index: 20;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
}
.tabbar.show { display: flex; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-3); font-size: 10.5px; font-weight: 600; padding: 4px 12px; transition: color .2s var(--ease); position: relative; }
.tab .tab-ico { font-size: 21px; line-height: 1; transition: transform .25s var(--ease-spring); }
.tab:active .tab-ico { transform: scale(.85); }
.tab.active { color: var(--text); }
.tab.active .tab-ico { filter: drop-shadow(0 0 10px var(--accent-glow)); transform: translateY(-1px); }
/* Świecąca kropka aktywnej zakładki */
.tab.active:not(.fab)::after {
  content: ""; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent); animation: pop .3s var(--ease-spring);
}
.tab.fab .tab-ico {
  width: 54px; height: 54px; border-radius: 50%; margin-top: -24px;
  background: var(--accent-grad); color: var(--on-accent);
  display: grid; place-items: center; font-size: 25px;
  box-shadow: 0 10px 28px -6px var(--accent-glow), var(--hairline);
  position: relative;
}
/* Pulsujący pierścień wokół FAB */
.tab.fab .tab-ico::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: fabPulse 2.6s var(--ease) infinite;
}
@keyframes fabPulse { 0% { box-shadow: 0 0 0 0 rgba(78,168,255,0.5); } 70%,100% { box-shadow: 0 0 0 16px rgba(78,168,255,0); } }
.tab.fab:active .tab-ico { transform: scale(.92); }

/* ===================================================================== */
/*  Helpers / Toast                                                      */
/* ===================================================================== */
.spacer-8  { height: 8px; }
.spacer-16 { height: 16px; }
.spacer-24 { height: 24px; }
.center { text-align: center; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

.toast {
  position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(16,18,24,.92); border: 1px solid var(--border-strong); backdrop-filter: blur(24px);
  color: var(--text); padding: 14px 22px; border-radius: 14px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .35s var(--ease-spring); z-index: 100; box-shadow: var(--shadow-lg), var(--hairline);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.back-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; font-size: 18px; transition: background .2s var(--ease), transform .14s var(--ease); box-shadow: var(--hairline); }
.back-btn:hover { background: var(--surface-2); }
.back-btn:active { transform: scale(.9); }

/* Loader (kropki) */
.loading-dots { display: inline-flex; gap: 6px; }
.loading-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s infinite ease-in-out; box-shadow: 0 0 10px var(--accent-glow); }
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%,100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

/* ===================================================================== */
/*  MODUŁY ROZSZERZONE                                                   */
/* ===================================================================== */

/* Checklista dnia */
.checklist { display: grid; gap: 8px; }
.cl-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); text-align: left; transition: all .18s var(--ease); box-shadow: var(--hairline); }
.cl-item .cl-box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-strong); flex-shrink: 0; display: grid; place-items: center; transition: all .2s var(--ease-spring); }
.cl-item.on { background: var(--accent-soft); border-color: var(--accent); }
.cl-item.on .cl-box { background: var(--accent-grad); border-color: transparent; }
.cl-item.on .cl-box::after { content: "✓"; color: var(--on-accent); font-weight: 900; font-size: 12px; }
.cl-ico { font-size: 18px; }
.cl-label { font-size: 14.5px; font-weight: 600; }
.cl-item.on .cl-label { color: var(--text); }

/* Siatka narzędzi */
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
#histRow { margin-top: 14px; }
.tool-tile { text-align: left; padding: 16px; border-radius: var(--r); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018)); border: 1px solid var(--border); box-shadow: var(--hairline); transition: transform .15s var(--ease), border-color .2s var(--ease); }
.tool-tile:active { transform: scale(.97); }
@media (hover: hover) { .tool-tile:hover { transform: translateY(-2px); border-color: var(--border-strong); } }
.tool-ico { font-size: 26px; margin-bottom: 8px; }
.tool-t { font-weight: 700; font-size: 15px; }
.tool-d { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* Pop-up YouTube */
.yt-modal { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(4,5,7,.8); backdrop-filter: blur(10px); }
.yt-modal.show { display: flex; animation: fadeIn .25s var(--ease); }
.yt-card { width: 100%; max-width: 560px; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.yt-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.yt-title { font-weight: 800; }
.yt-frame { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-fallback { padding: 16px 20px 28px; text-align: center; }
.yt-fallback-ico { font-size: 44px; }

/* Odżywianie — kalkulator */
.kcal-big { margin: 8px 0 16px; }
.kcal-big small { color: var(--text-2); font-size: 14px; font-weight: 600; }
.macro-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.macro { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 8px; text-align: center; box-shadow: var(--hairline); }
.macro .m-v { font-size: 19px; font-weight: 800; }
.macro .m-l { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }

/* Segmentowane przełączniki (płeć, cel) */
.seg { display: flex; gap: 6px; padding: 5px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); }
.seg-opt { flex: 1; padding: 9px 6px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--text-2); transition: all .2s var(--ease); }
.seg-opt.active { background: var(--accent-grad); color: var(--on-accent); }

/* Nawodnienie */
.water-cups { display: flex; flex-wrap: wrap; gap: 6px; font-size: 20px; }
.water-cups .cup { opacity: .25; filter: grayscale(1); transition: all .2s var(--ease-spring); }
.water-cups .cup.on { opacity: 1; filter: none; transform: scale(1.05); }
.tips { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.tips li { font-size: 13px; color: var(--text-2); padding-left: 20px; position: relative; }
.tips li::before { content: "💧"; position: absolute; left: 0; font-size: 12px; }

/* Jadłospisy */
.meal-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.meal-tab { flex: 1; padding: 10px; border-radius: 12px; font-size: 12.5px; font-weight: 700; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.meal-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.meal { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); margin-bottom: 10px; overflow: hidden; box-shadow: var(--hairline); }
.meal-head { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 16px; text-align: left; }
.meal-toggle { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; transition: transform .25s var(--ease); }
.meal.open .meal-toggle { transform: rotate(45deg); }
.meal-body { display: none; padding: 0 16px 16px; }
.meal.open .meal-body { display: block; animation: riseIn .35s var(--ease); }
.meal-macros { display: flex; gap: 8px; margin-bottom: 12px; }
.meal-macros span { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); border: 1px solid rgba(78,168,255,0.3); }
.meal-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); font-weight: 700; margin: 10px 0 6px; }
.meal-ing { list-style: none; padding: 0; margin: 0; }
.meal-ing li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.meal-ing li b { font-weight: 700; }
.meal-steps { margin: 6px 0 0 18px; padding: 0; }
.meal-steps li { font-size: 13.5px; color: var(--text-2); margin: 6px 0; line-height: 1.45; }

/* Akordeon (mental) */
.accordion { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); margin-bottom: 10px; overflow: hidden; box-shadow: var(--hairline); }
.acc-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px; text-align: left; }
.acc-ico { font-size: 22px; }
.acc-title { font-weight: 700; font-size: 15px; flex: 1; }
.acc-toggle { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; transition: transform .25s var(--ease); }
.accordion.open .acc-toggle { transform: rotate(45deg); }
.acc-body { display: none; padding: 0 16px 16px; }
.accordion.open .acc-body { display: block; animation: riseIn .35s var(--ease); }

/* Wiersze-kafelki (programy techniczne) */
.tile-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018)); border: 1px solid var(--border); margin-bottom: 10px; text-align: left; box-shadow: var(--hairline); transition: transform .15s var(--ease), border-color .2s var(--ease); }
.tile-row:active { transform: scale(.985); }
@media (hover: hover) { .tile-row:hover { border-color: var(--border-strong); transform: translateY(-2px); } }
.tile-ico { font-size: 26px; flex-shrink: 0; }
.tile-t { font-weight: 700; font-size: 15px; }
.tile-d { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.tile-arrow { margin-left: auto; color: var(--text-3); font-size: 18px; }

/* Kalendarz */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-month { font-weight: 800; font-size: 17px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.cal-head { margin-bottom: 6px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--text-3); font-weight: 700; }
.cal-cell { aspect-ratio: 1; display: grid; place-items: center; border-radius: 11px; font-size: 13.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.cal-cell.empty { background: transparent; border: 0; }
.cal-cell.done { background: var(--accent-grad); color: var(--on-accent); border-color: transparent; box-shadow: 0 4px 14px -6px var(--accent-glow); }
.cal-cell.missed { border-color: rgba(255,107,107,.5); color: var(--bad); }
.cal-cell.upcoming { border-color: rgba(78,168,255,.4); color: var(--accent-2); }
.cal-cell.today { outline: 2px solid var(--text); outline-offset: 1px; }
.cal-cell.next { border-color: var(--accent); color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent), 0 0 18px -6px var(--accent-glow); position: relative; }
.cal-cell.next::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.cal-legend .dot.next { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 18px; font-size: 12.5px; color: var(--text-2); }
.cal-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.cal-legend .dot.done { background: var(--accent); }
.cal-legend .dot.missed { background: var(--bad); }
.cal-legend .dot.upcoming { background: rgba(78,168,255,.4); border: 1px solid var(--accent-2); }

/* Ranking / społeczność */
.rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); margin-bottom: 8px; box-shadow: var(--hairline); }
.rank-row.me { border-color: var(--accent); background: var(--accent-soft); }
.rank-pos { width: 26px; text-align: center; font-weight: 800; color: var(--text-3); flex-shrink: 0; }
.rank-pos.top { color: var(--mid); }
.rank-av { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-grad); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-weight: 700; font-size: 14.5px; }
.rank-sub { font-size: 12px; color: var(--text-2); }
.rank-jump { font-weight: 800; font-size: 15px; }

/* Historia — wywiad */
.hist-survey { display: flex; gap: 14px; margin-top: 8px; font-size: 13px; color: var(--text-2); font-weight: 600; }

/* Czat — załącznik wideo */
.chat-attach { width: 44px; height: 48px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 18px; flex-shrink: 0; display: grid; place-items: center; transition: background .2s var(--ease), transform .14s var(--ease); }
.chat-attach:active { transform: scale(.9); }
.chat-attach:hover { background: var(--surface-2); }
.chat-video { width: 220px; max-width: 60vw; border-radius: 12px; display: block; background: #000; }

/* ===================================================================== */
/*  ATHLETEMAXXING — nowe komponenty                                     */
/* ===================================================================== */
.avatar.lg { width: 52px; height: 52px; font-size: 20px; background: var(--accent-grad); color: var(--on-accent); border: 0; box-shadow: 0 0 22px -6px var(--accent-glow), var(--hairline); }

/* Kafelki sportów (onboarding) */
.sport-opt { position: relative; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 22px 12px; }
.sport-opt .check { position: absolute; top: 10px; right: 10px; margin-left: 0; }
.sport-opt .opt-t { font-size: 14px; }

/* Athlete Score */
.score-card { display: flex; align-items: center; gap: 18px; }
.score-ring { --p: 0; width: 100px; height: 100px; border-radius: 50%; flex-shrink: 0; position: relative; display: grid; place-items: center;
  background: conic-gradient(from -90deg, var(--accent), var(--accent-2) calc(var(--p)*1%), rgba(255,255,255,.06) 0); filter: drop-shadow(0 0 18px rgba(78,168,255,.3)); }
.score-ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg-2); box-shadow: var(--hairline); }
.score-ring .inner { position: relative; z-index: 1; text-align: center; }
.score-ring .inner .n { font-size: 32px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score-ring .inner .u { font-size: 11px; color: var(--text-2); margin-top: -2px; }

/* Today CTA jako przycisk */
.today-cta.full { width: 100%; text-align: left; display: block; }
.card-go { display: inline-block; margin-top: 8px; color: var(--accent-2); font-weight: 700; font-size: 14px; }

/* Readiness mini */
.readiness-mini { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; }
.ring.sm { width: 60px; height: 60px; }
.ring.sm::after { inset: 7px; }
.ring.sm .ring-txt { font-size: 15px; }
.ring.empty-ring { background: rgba(255,255,255,.06); filter: none; }
.readiness-mini .card-go { margin-left: auto; margin-top: 0; font-size: 20px; color: var(--text-3); }
.section-title a { cursor: pointer; }

/* Cele z paskiem postępu */
.goal-card { padding: 16px 18px; }
.goal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.goal-name { font-weight: 700; font-size: 15px; }
.goal-vals { font-weight: 700; font-size: 13px; color: var(--accent-2); white-space: nowrap; }
.goal-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.goal-fill { height: 100%; border-radius: 999px; background: var(--accent-grad); box-shadow: 0 0 12px var(--accent-glow); transition: width .8s var(--ease); }
.goal-foot { margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.goal-foot b { color: var(--text); }
.goal-measure { color: var(--accent-2); font-weight: 600; }

/* Kafelki programów (TRAIN) */
.prog-tile { text-align: left; padding: 16px; border-radius: var(--r); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018)); border: 1px solid var(--border); box-shadow: var(--hairline); transition: transform .15s var(--ease), border-color .2s var(--ease); }
.prog-tile:active { transform: scale(.97); }
@media (hover: hover) { .prog-tile:hover { transform: translateY(-2px); border-color: var(--border-strong); } }
.prog-tile .tool-ico { font-size: 26px; margin-bottom: 8px; }
.prog-tile .tool-t { font-weight: 700; font-size: 15px; }
.prog-tile .tool-d { font-size: 11.5px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }

/* Biblioteka ćwiczeń */
.lib-cat { margin-bottom: 16px; }
.lib-head { font-size: 13px; font-weight: 700; color: var(--accent-2); margin-bottom: 8px; }
.lib-items { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-chip { font-size: 13px; font-weight: 600; padding: 9px 13px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--hairline); }
.lib-chip:hover { background: var(--surface-2); }

/* Rekordy / testy (PERFORMANCE) */
.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rec-card { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018)); border: 1px solid var(--border); text-align: left; box-shadow: var(--hairline); transition: transform .15s var(--ease); }
.rec-card:active { transform: scale(.97); }
.rec-ico { font-size: 24px; flex-shrink: 0; }
.rec-main { flex: 1; min-width: 0; }
.rec-name { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-val { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.rec-add { color: var(--accent-2); font-weight: 800; font-size: 16px; flex-shrink: 0; }
.report-box { flex: 1; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 8px; box-shadow: var(--hairline); }
.rb-v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rb-l { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.hist-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 8px; font-size: 14px; box-shadow: var(--hairline); }
.hist-line b { font-weight: 800; }

/* VIDEO */
.upload-card { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border-style: dashed !important; }
.upload-ico { font-size: 28px; color: var(--accent-2); line-height: 0; }
.vid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.vid-tile { border-radius: var(--r); overflow: hidden; background: #000; border: 1px solid var(--border); cursor: pointer; }
.vid-tile video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #000; }
.vid-meta { padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; font-weight: 600; }

/* Dostępność — szanuj wyłączone animacje */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Ramka desktopowa (podgląd na szerokim ekranie) */
@media (min-width: 481px) {
  body { padding: 0; }
  #app {
    box-shadow: 0 40px 120px rgba(0,0,0,.7);
    border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  }
}

/* ===================================================================== */
/*  PRO-UPGRADE — ikony SVG, plan tygodnia, log serii, wykresy, ranking   */
/* ===================================================================== */

/* Ikony SVG */
.ic { display: inline-block; vertical-align: -2px; flex-shrink: 0; }
.tab .tab-ico { width: 23px; height: 23px; font-size: 0; }
.tool-ico, .prog-tile .tool-ico { color: var(--accent-2); line-height: 0; }
.acc-ico { color: var(--accent-2); display: grid; place-items: center; width: 26px; }
.tile-ico .ic { vertical-align: middle; }

/* Building — tytuł (lepsze skalowanie, bez ścisku) */
.build-title { font-size: 27px; line-height: 1.12; letter-spacing: -.02em; margin: 2px 0 8px; }

/* Chip-row (przewijane kategorie) */
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px var(--pad) 12px; margin: 0 calc(-1 * var(--pad)); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); white-space: nowrap; transition: all .18s var(--ease); }
.chip.on { background: var(--accent-grad); color: var(--on-accent); border-color: transparent; box-shadow: 0 6px 18px -8px var(--accent-glow); }

/* Select */
.select { width: 100%; appearance: none; -webkit-appearance: none; padding: 12px 40px 12px 14px; border-radius: 13px; font-size: 14px; font-weight: 700; color: var(--text); background-color: var(--surface); border: 1px solid var(--border); box-shadow: var(--hairline); margin-bottom: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2376E4FF' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.select:focus { outline: none; border-color: var(--accent); }
/* Czytelne opcje natywnej listy (kontrast) */
.select option { background: #14161c; color: #F5F7FA; font-weight: 600; }
.select option:checked { background: #1d3a5f; color: #fff; }

/* Przełącznik miejsca (dom / siłownia) */
.place-seg { margin-bottom: 4px; }
.place-seg .seg-opt { display: flex; align-items: center; justify-content: center; gap: 7px; }

/* Plan tygodnia */
.week-chip { font-size: 12px; font-weight: 700; color: var(--accent-2); background: var(--accent-soft); border: 1px solid rgba(78,168,255,.3); padding: 4px 10px; border-radius: 999px; }
.week-list { display: grid; gap: 8px; }
.week-row { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-radius: var(--r); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018)); border: 1px solid var(--border); text-align: left; box-shadow: var(--hairline); transition: transform .15s var(--ease), border-color .2s var(--ease); }
.week-row:active { transform: scale(.985); }
@media (hover: hover) { .week-row:hover { border-color: var(--border-strong); } }
.week-row.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 22px -10px var(--accent-glow); }
.week-row.done { opacity: .6; }
.wr-day { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--text-2); flex-shrink: 0; }
.week-row.today .wr-day { background: var(--accent-grad); color: var(--on-accent); }
.week-row.done .wr-day { background: rgba(52,226,160,.16); color: var(--good); }
.wr-main { flex: 1; min-width: 0; }
.wr-name { font-weight: 700; font-size: 15px; }
.wr-sub { font-size: 12px; color: var(--text-2); margin-top: 1px; }
.wr-go { margin-left: auto; color: var(--text-3); display: grid; place-items: center; flex-shrink: 0; }
.week-row.done .wr-go { color: var(--good); }
.wr-now { font-size: 11px; font-weight: 800; color: var(--accent-2); text-transform: uppercase; letter-spacing: .05em; }

/* Sesja — karta ćwiczenia + log serii */
.ex-cat { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-2); background: var(--accent-soft); padding: 3px 8px; border-radius: 7px; margin-bottom: 7px; }
.ex-sub { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.ex-yt { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent-2); flex-shrink: 0; transition: transform .14s var(--ease); }
.ex-yt:active { transform: scale(.9); }
.set-table { margin-top: 13px; }
.set-head { display: grid; grid-template-columns: 42px 1fr 1fr 46px; gap: 8px; padding: 0 2px 7px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 700; }
.set-row { display: grid; grid-template-columns: 42px 1fr 1fr 46px; gap: 8px; align-items: center; margin-bottom: 8px; }
.set-n { height: 42px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; color: var(--text-2); }
.set-in { height: 42px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--border); color: var(--text); text-align: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; width: 100%; }
.set-in::placeholder { color: var(--text-3); font-weight: 600; }
.set-in:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.set-target { height: 42px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--text-2); padding: 0 4px; text-align: center; }
.set-done { height: 42px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-3); transition: all .18s var(--ease-spring); }
.set-done:active { transform: scale(.88); }
.set-row.done .set-done { background: var(--accent-grad); border-color: transparent; color: var(--on-accent); box-shadow: 0 6px 16px -6px var(--accent-glow); }
.set-row.done .set-in { border-color: rgba(52,226,160,.4); color: var(--good); }
.set-row.done .set-n { background: rgba(52,226,160,.14); color: var(--good); }
.rest-btn { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--accent-2); background: var(--surface); border: 1px solid var(--border); padding: 8px 13px; border-radius: 11px; }
.finish-wrap { margin-top: 16px; }
.finish-hint { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--text-2); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 13px; padding: 13px; text-align: center; }
.finish-hint .ic { color: var(--accent-2); }
.session-type { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 700; }
.simple-done { margin-top: 12px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-weight: 700; font-size: 14px; transition: all .18s var(--ease-spring); }
.simple-done:active { transform: scale(.98); }
.simple-done.done { background: var(--accent-grad); border-color: transparent; color: var(--on-accent); box-shadow: 0 6px 16px -6px var(--accent-glow); }

/* Today — warianty */
.ex-tag.ok { color: var(--good); }
.today-cta.done-day::before { background: radial-gradient(circle, rgba(52,226,160,0.24), transparent 70%); }
.today-cta.done-day { border-color: rgba(52,226,160,.22); }
.today-cta.done-day .ex-tag { color: var(--good); display: inline-flex; align-items: center; gap: 5px; }
.today-cta .meta .ic { color: var(--accent-2); }
.card-go { display: inline-flex; align-items: center; gap: 4px; }

/* Wykres liniowy progresu */
.chart-card { padding: 14px 16px 16px; }
.lchart { width: 100%; height: 132px; display: block; margin-top: 8px; overflow: visible; }
.lchart .cline { fill: none; stroke: var(--accent); stroke-width: 2.4; vector-effect: non-scaling-stroke; filter: drop-shadow(0 4px 10px var(--accent-glow)); }
.lchart.up .cline { stroke: var(--good); }
.lchart.down .cline { stroke: var(--bad); }
.lchart .carea { fill: var(--accent-soft); stroke: none; opacity: .5; }
.lchart .cdot { fill: var(--accent-2); stroke: var(--bg-2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.lchart.up .cdot { fill: var(--good); }
.lchart.down .cdot { fill: var(--bad); }
.chart-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.chart-legend .now { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.chart-legend .good { color: var(--good); }
.chart-legend .bad { color: var(--bad); }
.chart-empty { padding: 26px 12px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 1.5; }

/* Ranking — uzupełnienie */
.rank-card { padding: 14px 16px 8px; }
.rank-sport { font-size: 12px; color: var(--text-2); margin-top: 1px; }
.rank-val { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; margin-left: auto; flex-shrink: 0; }
.rank-main { display: flex; flex-direction: column; }
.rank-row:nth-child(1) .rank-pos { color: var(--mid); }
.rank-row:nth-child(2) .rank-pos { color: var(--text-2); }
.rank-row:nth-child(3) .rank-pos { color: #CD7F32; }
.rank-empty { padding: 16px 6px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 1.5; }

/* Historia treningów */
.hist-card { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); margin-bottom: 10px; overflow: hidden; box-shadow: var(--hairline); }
.hist-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 16px; text-align: left; }
.hist-name { font-weight: 700; font-size: 15px; }
.hist-meta { font-size: 12px; color: var(--text-2); margin-top: 2px; text-transform: capitalize; }
.hist-toggle { color: var(--text-3); transition: transform .25s var(--ease); flex-shrink: 0; display: grid; place-items: center; }
.hist-card.open .hist-toggle { transform: rotate(90deg); }
.hist-body { display: none; padding: 0 16px 14px; }
.hist-card.open .hist-body { display: block; animation: riseIn .35s var(--ease); }
.hist-ex { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.he-name { color: var(--text); font-weight: 600; font-size: 13.5px; min-width: 0; }
.he-sets { color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; font-size: 12.5px; white-space: nowrap; }
/* Klikalny wykonany dzień w kalendarzu → historia */
.cal-cell[data-day-ts] { cursor: pointer; transition: transform .14s var(--ease); }
.cal-cell[data-day-ts]:active { transform: scale(.88); }
@media (hover: hover) { .cal-cell[data-day-ts]:hover { box-shadow: 0 0 0 2px var(--accent-2), 0 6px 16px -6px var(--accent-glow); } }
/* Podświetlenie treningu po wejściu z kalendarza */
.hist-card.flash { animation: histFlash 1.7s var(--ease); }
@keyframes histFlash { 0%, 100% { box-shadow: var(--hairline); border-color: var(--border); } 12%, 45% { box-shadow: 0 0 0 2px var(--accent), 0 0 26px -6px var(--accent-glow); border-color: var(--accent); } }

/* Lepsze skalowanie na wąskich telefonach */
@media (max-width: 380px) {
  .score-ring { width: 88px; height: 88px; }
  .score-ring .inner .n { font-size: 27px; }
  .build-title { font-size: 26px; }
  .set-head, .set-row { grid-template-columns: 36px 1fr 1fr 42px; gap: 6px; }
  .set-in { font-size: 14px; }
  .today-cta .meta { gap: 12px; }
}
