/* Athlete check-in page */

.app { max-width: 600px; margin: 0 auto; padding: 0 16px calc(150px + env(safe-area-inset-bottom)); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 22px 4px 26px; overflow: hidden; }
.hero__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.hero__hello { margin: 34px 0 6px; font-size: 18px; font-weight: 500; color: var(--ink-2); position: relative; z-index: 1; }
.hero__name {
  margin: 0; font-size: clamp(58px, 17vw, 92px); position: relative; z-index: 1;
  word-break: break-word;
}
.hero__name .dot { color: var(--signal); }
.hero__date { margin: 12px 0 0; font-weight: 600; color: var(--ink-3); position: relative; z-index: 1; }
.hero__date::first-letter { text-transform: uppercase; }
.hero__track {
  position: absolute; right: -150px; top: -40px; width: 380px; height: 380px;
  color: var(--line-2); opacity: .9; pointer-events: none;
}
.streak-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line);
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
.streak-pill b { font: 800 18px/1 var(--font-display); }
@media (max-width: 420px) { .streak-long { display: none; } .hero__top .wordmark small { font-size: 10px; letter-spacing: .1em; } }

/* ---------- question cards ---------- */
.q { padding: 20px 18px 20px; margin-bottom: 12px; scroll-margin-top: 16px; scroll-margin-bottom: 140px; }
.q__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.q__meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.q__num { font: 800 15px/1 var(--font-display); color: var(--ink-3); letter-spacing: .06em; }
.q__title { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.q__title small { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.q__value { text-align: right; flex-shrink: 0; min-width: 76px; }
.q__value b { display: block; font: 800 38px/.9 var(--font-display); transition: color .2s; }
.q__value span { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; }
.q__value.is-empty b { color: var(--line-2); }

.q.is-missing { animation: nudge .5s ease; box-shadow: 0 0 0 2px var(--bad), var(--shadow); }
@keyframes nudge { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.q.is-done .q__num::before { content: '✓ '; color: var(--good); }

/* enter animation */
.q, .hero > * { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- sleep slider ---------- */
.sleep { display: grid; grid-template-columns: var(--tap) 1fr var(--tap); align-items: start; gap: 12px; }
.sleep .step-btn { margin-top: -2px; }
.step-btn {
  width: var(--tap); height: var(--tap); border-radius: 14px;
  border: 1.5px solid var(--line-2); background: var(--surface-2);
  font: 700 26px/1 var(--font-body); color: var(--ink);
  display: grid; place-items: center;
}
.step-btn:active { transform: scale(.94); }
.range { position: relative; height: 68px; }
.range input {
  -webkit-appearance: none; appearance: none; width: 100%; height: 48px; margin: 0;
  background: transparent; position: relative; z-index: 2; touch-action: pan-y;
}
.range input::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; background: transparent; }
.range input::-moz-range-track { height: 10px; border-radius: 99px; background: transparent; }
.range input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 34px; height: 34px; margin-top: -12px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--ink); box-shadow: 0 4px 12px -4px rgba(0,0,0,.4);
}
.range input::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--ink); box-shadow: 0 4px 12px -4px rgba(0,0,0,.4);
}
.range__track {
  position: absolute; left: 0; right: 0; top: 19px; height: 10px; border-radius: 99px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
}
.range__fill { height: 100%; width: var(--p, 50%); background: var(--sleep-color, var(--line-2)); transition: background .2s; }
.range__ticks {
  position: absolute; left: 17px; right: 17px; top: 52px;
  display: flex; justify-content: space-between;
  font: 700 11px/1 var(--font-body); color: var(--ink-3);
}
.range__ticks span { width: 0; display: flex; justify-content: center; }
.q--sleep.is-untouched .range input::-webkit-slider-thumb { border-color: var(--ink-3); }
.hint { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); font-weight: 500; }

/* ---------- body ---------- */
.nopain {
  width: 100%; min-height: 56px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 14px; border: 1.5px dashed var(--line-2); background: var(--surface-2);
  font-weight: 700; font-size: 16px; color: var(--ink-2);
  transition: all .18s ease;
}
.nopain[aria-pressed="true"] { border: 1.5px solid var(--good); background: color-mix(in srgb, var(--good) 12%, var(--surface)); color: var(--ink); }
.nopain .tick {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2);
  display: grid; place-items: center; font-size: 14px; color: transparent; transition: all .18s;
}
.nopain[aria-pressed="true"] .tick { background: var(--good); border-color: var(--good); color: #fff; }

.bm-box {
  border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  padding: 14px 10px 12px;
}
.bm-tip { margin: 0 0 8px; text-align: center; font-size: 13px; color: var(--ink-3); font-weight: 500; }

.picked { margin-top: 14px; display: grid; gap: 8px; }
.picked__row {
  display: grid; grid-template-columns: 1fr 44px; align-items: center; gap: 6px;
  padding: 4px 4px 4px 0; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  min-height: 60px; overflow: hidden;
}
.picked__main {
  display: grid; grid-template-columns: 6px 1fr auto; align-items: center; gap: 14px;
  border: 0; background: none; padding: 8px 0 8px 0; text-align: left; min-width: 0; height: 100%;
}
.picked__bar { width: 6px; align-self: stretch; border-radius: 0 6px 6px 0; margin: -8px 0; }
.picked__name { display: block; font-weight: 700; line-height: 1.2; }
.picked__kind { display: block; font-size: 13px; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.picked__lvl { font: 800 28px/1 var(--font-display); white-space: nowrap; }
.picked__lvl small { font: 700 13px/1 var(--font-body); color: var(--ink-3); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent;
  display: grid; place-items: center; color: var(--ink-3); font-size: 22px;
}
.icon-btn:hover { background: var(--surface); color: var(--ink); }

/* ---------- yesterday's training ---------- */
.q__sub { margin: -8px 0 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.act-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.act-chip[data-actchip="odmor"] { border-style: dashed; }
.acts { display: grid; gap: 10px; }
.acts:not(:empty) { margin-top: 14px; }
.act { padding: 14px 14px 12px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); animation: rise .35s ease both; }
.act__title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; margin-bottom: 8px; }
.act__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; font-weight: 600; color: var(--ink-2); }
.act__row--label { min-height: 36px; margin-top: 4px; }
.act__row b { font: 800 20px/1 var(--font-display); color: var(--ink); }
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper b { min-width: 74px; text-align: center; font: 800 24px/1 var(--font-display); color: var(--ink); }
.step-btn--sm { width: 46px; height: 46px; border-radius: 12px; font-size: 22px; background: var(--surface); }
.seg2 { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg2 button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.seg2 button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.meter--effort .meter__seg { height: 50px; font-size: 18px; background: var(--surface); }
.meter--effort .meter__seg.is-on { background: var(--effort); }

/* ---------- next 7 days ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 0; padding: 8px 0 7px; border: 0; border-radius: 12px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .15s, box-shadow .15s, transform .12s;
}
.day:active { transform: scale(.95); }
.day__name { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.day__icon { font-size: 22px; line-height: 30px; height: 30px; color: var(--ink-3); font-weight: 700; }
.day__date { font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
.day[data-kind="trening"] { background: color-mix(in srgb, var(--cat-1) 14%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--cat-1); }
.day[data-kind="utakmica"] { background: color-mix(in srgb, var(--cat-2) 16%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--cat-2); }
.day.is-today .day__name, .day.is-today .day__date { color: var(--signal); }
.week__ok { margin-top: 12px; width: 100%; }
.week__ok[aria-pressed="true"] { background: var(--good); color: #fff; box-shadow: none; }
@media (max-width: 380px) { .week { gap: 3px; } .day__date { font-size: 9.5px; } }

/* ---------- extras ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.notes {
  width: 100%; min-height: 96px; resize: vertical; padding: 14px;
  border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface-2);
  font-size: 16px; line-height: 1.4;
}
.notes:focus { outline: none; border-color: var(--ink); background: var(--surface); }

/* ---------- dock (sticky submit) ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.dock__inner { max-width: 568px; margin: 0 auto; }
.dock__progress { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 0 2px; }
.dock__segs { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dock__segs i { height: 6px; border-radius: 9px; background: var(--line-2); transition: background .25s ease; }
.dock__segs i.is-on { background: var(--signal); }
.dock__count { font: 800 16px/1 var(--font-display); letter-spacing: .04em; color: var(--ink-2); min-width: 34px; text-align: right; }
.dock .btn { width: 100%; min-height: 58px; font-size: 18px; border-radius: 16px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.45); }
.dock .btn.is-ready { background: var(--signal); color: var(--signal-ink); }

/* ---------- sheet content ---------- */
.sheet h3 { margin: 6px 0 2px; font: 800 34px/.95 var(--font-display); text-transform: uppercase; }
.sheet__hint { margin: 4px 0 0; font-size: 14px; color: var(--ink-3); font-weight: 500; }
.sheet__nearlabel { margin: 14px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sheet__near { display: flex; gap: 6px; overflow-x: auto; margin: 8px -20px 4px; padding: 2px 20px 6px; scrollbar-width: none; }
.sheet__near::-webkit-scrollbar { display: none; }
.sheet__near .chip { min-height: 36px; font-size: 13px; padding: 0 12px; flex-shrink: 0; }
.sheet__label { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 10px; font-weight: 700; }
.sheet__label b { font: 800 26px/1 var(--font-display); }
.sheet__kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet__kinds .chip { justify-content: center; padding: 0 6px; }
.sheet__impact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet__impact .chip { justify-content: center; padding: 0 8px; font-size: 14px; }
.sheet__actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 22px; }

/* ---------- full-screen states (done / error / loading) ---------- */
.screen {
  min-height: 100svh; max-width: 600px; margin: 0 auto; padding: 28px 20px 40px;
  display: flex; flex-direction: column;
}
.screen__body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 36px; }
.screen__center { flex: 1; display: grid; place-items: center; }
.done-badge {
  width: 112px; height: 112px; border-radius: 32px; margin-bottom: 28px;
  background: var(--signal); display: grid; place-items: center;
  animation: pop .6s cubic-bezier(.2, 1.4, .4, 1) both;
}
.done-badge svg { width: 60px; height: 60px; color: var(--signal-ink); }
.done-badge path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .25s ease forwards; }
@keyframes pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.screen h1 { margin: 0 0 12px; font-size: clamp(54px, 15vw, 84px); }
.screen p.lead { margin: 0; font-size: 19px; color: var(--ink-2); max-width: 30ch; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 28px 0 14px; }
.stat { padding: 16px; }
.stat b { display: block; font: 800 46px/.9 var(--font-display); }
.stat span { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.stat--streak b { color: var(--signal); }
.recap { padding: 6px 16px; }
.recap__row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.recap__row:last-child { border-bottom: 0; }
.recap__row { gap: 16px; }
.recap__row b { font: 800 20px/1 var(--font-display); }
.recap__row b.is-text { font: 700 14px/1.35 var(--font-body); text-align: right; }
.screen__actions { display: grid; gap: 10px; margin-top: 24px; }
/* ---------- consent + privacy ---------- */
.consent .lead { font-size: 18px; color: var(--ink-2); margin: 0; }
.consent__list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; max-width: 46ch; }
.consent__list li { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.consent__list b { color: var(--ink); }
.consent__check {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; margin-top: 20px; max-width: 46ch;
  font-weight: 700; font-size: 15.5px; line-height: 1.4; cursor: pointer;
}
.consent__check input { width: 26px; height: 26px; margin: 0; accent-color: var(--good); }
.privacy { margin: 6px 4px 0; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }

.contact { margin-top: 28px; display: grid; gap: 12px; max-width: 420px; }
.contact__label { font-weight: 700; color: var(--ink-2); }
.contact__label a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.contact__actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
