/* Стилі вкладки «Прогрес». Спираються на токени сторінки (--accent, --surface…),
   шрифт успадковують, тому кожна програма лишається у своєму характері. */

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 9px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r, 14px);
  padding: 14px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px;
}
.tile b {
  font: 700 26px/1 inherit; font-family: inherit; color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.tile span { font-size: 11.5px; line-height: 1.25; color: var(--ink-2); }
.tile em { font-style: normal; font-size: 11px; line-height: 1.3; color: var(--ink-3); margin-top: 3px; }

.chart { position: relative; height: 132px; margin: 4px 0 0; }
.chart .bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 3px; }
.wk {
  flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; gap: 4px; cursor: default; border-radius: 5px;
}
.wk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wk .bar {
  width: 100%; background: var(--accent); border-radius: 4px 4px 0 0;
  box-shadow: 0 0 0 2px var(--surface);
}
.wk .bar.zero { height: 2px; background: var(--line-2); border-radius: 2px; box-shadow: none; }
.wkstar { font-size: 12px; line-height: 1; color: var(--accent); height: 13px; }
.wkstar.off { visibility: hidden; }

.chart .target {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 1px dashed var(--line-2); pointer-events: none;
}
.cap { margin: 2px 0 10px; font-size: 11.5px; line-height: 1.45; color: var(--ink-3); }
.cap b { color: var(--accent); font-weight: 700; }
.chart .tip {
  position: absolute; bottom: 100%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font-size: 11.5px; line-height: 1;
  padding: 7px 9px; border-radius: 7px; white-space: nowrap; pointer-events: none; z-index: 5;
}
.xax {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}

.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.rows .row:first-child { border-top: 0; padding-top: 0; }
.row > div:first-child { min-width: 0; }
.row b { display: block; font-weight: 700; font-size: 13.5px; color: var(--ink); }
.row span { font-size: 11.5px; color: var(--ink-3); }
.row .rr {
  flex: none; text-align: right; font-size: 13px; color: var(--ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.row .rr b { display: inline; color: var(--accent); }

.st { color: color-mix(in srgb, var(--ink-3) 30%, transparent); font-size: 13px; letter-spacing: 1px; }
.st.on { color: var(--accent); }
.starline { font-size: 14px; color: var(--ink-2); }
.starline b { color: var(--accent); font-size: 18px; font-variant-numeric: tabular-nums; }

#gym-star {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 95; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 13px 20px; box-shadow: 0 8px 28px rgba(0,0,0,.14);
  font-size: 12.5px; color: var(--ink-2); animation: starIn .28s ease-out;
}
#gym-star .starburst { display: flex; gap: 2px; }
#gym-star.out { opacity: 0; transition: opacity .45s ease; }
@keyframes starIn {
  from { opacity: 0; transform: translate(-50%, 10px) scale(.94); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #gym-star { animation: none; }
}
@media (max-width: 380px) {
  .tiles { gap: 6px; }
  .tile { padding: 12px 10px; }
  .tile b { font-size: 22px; }
}
