/* =====================================================================
   FZ Performance – vzhľad
   Farby brandu zmeníš tu (--accent atď.).
   ===================================================================== */
:root {
  /* FZ Performance – primárna paleta z brand manuálu */
  --orange: #ff501a;   /* Performance Orange */
  --teal: #084e53;     /* Deep Teal */
  --graphite: #16222b; /* Graphite Black */
  --ice: #dbe4e8;      /* Ice Gray */

  --bg: var(--graphite);
  --surface: #1c2a34;
  --surface-2: #233540;
  --line: #2e4351;
  --text: #eef3f5;
  --muted: #93a7b1;
  --accent: var(--orange);
  --accent-ink: #ffffff;
  --danger: #ff6b6b;
  --ok: #3ecf8e;
  --radius: 14px;
  --font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Lexend Giga", "Lexend", system-ui, sans-serif;
  --tabbar-h: 64px;
  --teal-light: #1d6a70;
  --warn: #ffb84d;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }

/* ---------- layout ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: calc(10px + env(safe-area-inset-top)) 20px 10px; background: rgba(22,34,43,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand img { height: 22px; width: auto; display: block; }
.brand .word { font-family: var(--font-display); font-size: 10px; font-weight: 500; letter-spacing: .32em; color: var(--ice); opacity: .85; }
.brand.big { flex-direction: column; gap: 12px; margin: 6px 0 10px; }
.brand.big img { height: 54px; }
.brand.big .word { font-size: 12px; letter-spacing: .45em; margin-right: -.45em; }
.nav { display: flex; gap: 4px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.nav a { color: var(--muted); text-decoration: none; padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.nav a.active { background: var(--accent); color: var(--accent-ink); }
.topbar .who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
main { max-width: 1040px; margin: 0 auto; padding: 22px 20px 60px; }
.tabbar { display: none; }
.demo-banner a { color: #fff; }
.demo-banner { background: var(--teal); color: var(--ice); text-align: center; font-size: 12.5px; padding: 6px 12px; }

@media (max-width: 760px) {
  .topbar { padding-left: 14px; padding-right: 14px; }
  .topbar .nav, .topbar .who .name { display: none; }
  .topbar .who { margin-left: auto; }
  main { padding: 16px 14px calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(28,42,52,.97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600; }
  .tabbar a .ico { font-size: 19px; line-height: 1; }
  .tabbar a.active { color: var(--accent); }
}

/* ---------- typography ---------- */
h1 { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.2; margin: 0 0 6px; letter-spacing: .01em; text-transform: uppercase; }
h2 { font-family: var(--font-display); font-weight: 500; font-size: 13.5px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
h3 { font-size: 15.5px; margin: 0; }
.sub { color: var(--muted); margin: 0 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { margin: 0; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 10px; }

/* ---------- components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 12px; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.section { margin-top: 28px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; text-decoration: none; color: inherit; }
.list-item:hover { border-color: #3a3f48; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 650; }
.thumb { width: 64px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; display: grid; place-items: center; color: var(--muted); font-size: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 9px 14px; font-weight: 600; cursor: pointer; text-decoration: none; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: #444a54; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 6px 9px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.ok { color: var(--ok); border-color: rgba(74,222,128,.3); background: rgba(74,222,128,.08); }
.badge.accent { color: #ff7a4f; border-color: rgba(255,80,26,.4); background: rgba(255,80,26,.1); }
.badge.warn { color: #ffd76a; border-color: rgba(255,215,106,.3); background: rgba(255,215,106,.07); }

label.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 600; }
input, select, textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; outline: none; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
.form { display: flex; flex-direction: column; gap: 12px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 650; font-size: 13.5px; cursor: pointer; }
.tab.active { background: var(--ice); color: var(--graphite); border-color: var(--ice); }
.tab.current:not(.active) { border-color: var(--accent); color: var(--accent); }

.empty { text-align: center; color: var(--muted); padding: 34px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(120% 80% at 50% 0%, rgba(8,78,83,.95) 0%, rgba(8,78,83,.35) 45%, var(--graphite) 80%); }
.auth .card { background: rgba(22,34,43,.82); backdrop-filter: blur(10px); }
.auth .card { width: 100%; max-width: 380px; padding: 26px; }
.auth .sub { text-align: center; }
.auth .switch { text-align: center; margin-top: 14px; font-size: 14px; color: var(--muted); }
.auth .switch button { background: none; border: 0; color: var(--accent); cursor: pointer; font-weight: 650; padding: 0; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0 12px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.error { color: var(--danger); font-size: 13.5px; }

/* ---------- video ---------- */
.video { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; display: block; }
.video .play { position: absolute; inset: 0; display: grid; place-items: center; }
.video .play span { width: 58px; height: 40px; border-radius: 12px; background: rgba(0,0,0,.7); display: grid; place-items: center; font-size: 18px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; text-decoration: none; }

/* ---------- program editor ---------- */
.day-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.day-card + .day-card { margin-top: 12px; }
.day-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.day-head .dnum { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--accent); white-space: nowrap; }
.day-head input { font-weight: 650; }
/* ---------- workout ---------- */
.ex-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.ex-card + .ex-card { margin-top: 12px; }
.ex-top { display: flex; gap: 10px; align-items: flex-start; }
.ex-top .blk { flex: none; min-width: 34px; height: 26px; padding: 0 7px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--accent); }
.presc { font-weight: 700; font-size: 15px; margin-top: 2px; }
.presc .calc { color: var(--accent); }
.cues { color: var(--muted); font-size: 13.5px; white-space: pre-wrap; margin-top: 6px; }
.prev { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.sets { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.set-row { display: grid; grid-template-columns: 34px 1fr 1fr 1fr 38px; gap: 6px; align-items: center; }
.set-row.head { font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.set-row .n { color: var(--muted); font-weight: 700; text-align: center; }
.set-row input { text-align: center; padding: 9px 6px; }
.set-row .done { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: transparent; cursor: pointer; font-weight: 900; }
.set-row .done.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.save-bar { position: sticky; bottom: 12px; margin-top: 16px; display: flex; gap: 8px; }
@media (max-width: 760px) { .save-bar { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); } }
.save-bar .btn.primary { flex: 1; padding: 13px; font-size: 15px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }

/* ---------- chart / tables ---------- */
.chart { width: 100%; max-width: 760px; height: auto; display: block; }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat .v { font-family: var(--font-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--muted); }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; animation: fade .12s ease; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.modal h2 { margin-bottom: 14px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.modal .actions .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); background: var(--ice); color: var(--graphite); padding: 10px 16px; border-radius: 12px; font-weight: 650; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: calc(100vw - 32px); }
@media (max-width: 760px) { .toast { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); } }
.toast.err { background: var(--danger); color: #fff; }

/* =====================================================================
   v2 – nové komponenty
   ===================================================================== */
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-head h2 { margin: 0; }
.modal.wide { max-width: 680px; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: rgba(255,255,255,.025); }
.tbl tr.sel td { background: rgba(255,80,26,.08); }
.tbl.dash td, .tbl.dash th { white-space: nowrap; }
.pos { color: var(--ok); font-weight: 650; white-space: nowrap; }
.neg { color: var(--danger); font-weight: 650; white-space: nowrap; }
.warn-t { color: var(--warn); font-weight: 650; }
.stat .v.warn { color: var(--warn); }
.stat .v.bad { color: var(--danger); }
.stat .v.ok { color: var(--ok); }
.badge.warn { color: var(--warn); border-color: rgba(255,184,77,.35); background: rgba(255,184,77,.08); }
.badge.tiny { font-size: 10.5px; padding: 1px 7px; margin-left: 6px; vertical-align: 2px; }
.score { display: inline-block; min-width: 54px; text-align: center; padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.score.ok { color: var(--ok); border-color: rgba(62,207,142,.35); }
.score.warn { color: var(--warn); border-color: rgba(255,184,77,.35); }
.score.bad { color: #fff; background: var(--danger); border-color: var(--danger); }
.hint { margin: -4px 0 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two-col > .card + .card { margin-top: 0; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 10px; }
.pending-card { margin-bottom: 18px; border-color: rgba(255,184,77,.35); }
.thumb.avatar { width: 40px; height: 40px; border-radius: 999px; font-weight: 700; color: var(--ice); background: var(--teal); font-size: 13px; }
.thumb.daynum { width: 44px; font-weight: 800; font-size: 14px; color: var(--text); }
.thumb.daynum.done { background: var(--accent); color: #fff; }
.feed-note { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.list-item .grow { overflow: hidden; }
.prog-card { display: block; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips select { width: auto; padding: 5px 10px; font-size: 13px; border-radius: 999px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.chip.toggle { cursor: pointer; padding: 5px 12px; color: var(--muted); }
.chip.toggle.on { background: rgba(255,80,26,.12); border-color: rgba(255,80,26,.5); color: var(--text); }

/* program editor – položka cviku */
.item { padding: 10px 0; border-top: 1px solid var(--line); }
.item-main { display: grid; grid-template-columns: 50px minmax(170px, 2.6fr) 54px 66px 92px 64px 74px 54px auto; gap: 6px; align-items: end; }
.item-sub { display: grid; grid-template-columns: 50px 70px 74px 58px 70px 74px 1fr; gap: 6px; margin-top: 6px; align-items: end; }
.item-sub > :first-child { grid-column: 2; }
.item input, .item select { padding: 7px 8px; font-size: 13.5px; }
.item .mlabel { display: block; font-size: 10.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.item .acts { display: flex; gap: 2px; }
@media (max-width: 900px) {
  .item-main { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .item-main .ex { grid-column: 2 / -1; }
  .item-main .acts { grid-column: 1 / -1; justify-content: flex-end; }
  .item-sub { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .item-sub > :first-child { grid-column: auto; }
  .item-sub .note { grid-column: 1 / -1; }
}
select.ex-pick { padding: 4px; }
select.ex-pick option { padding: 5px 6px; }

/* readiness */
.readiness-card { display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 6px; border-color: rgba(255,80,26,.45); background: linear-gradient(135deg, rgba(255,80,26,.12), rgba(8,78,83,.18)); }
.readiness-card.done { border-color: var(--line); background: var(--surface); }
.readiness-card .grow { flex: 1; }
.rq { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rq-l { display: flex; flex-direction: column; }
.rq-b { display: flex; gap: 6px; }
.rq-b.wrap { flex-wrap: wrap; }
.rb { width: 42px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-weight: 700; cursor: pointer; }
.rb.sm { width: 36px; height: 36px; }
.rb.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.rq-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.rq-mini .stat { padding: 8px; }
.rq-mini .stat .v { font-size: 16px; }
.rq-mini .stat .l { font-size: 10.5px; }
@media (max-width: 520px) { .rq-mini { grid-template-columns: repeat(3, 1fr); } }

/* workout */
.superset { border: 1px solid rgba(255,80,26,.35); border-radius: calc(var(--radius) + 4px); padding: 8px; background: rgba(255,80,26,.04); }
.superset + .ex-card, .ex-card + .superset, .superset + .superset { margin-top: 12px; }
.superset .ss-head { font-family: var(--font-display); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); padding: 2px 6px 8px; }
.set-row { grid-template-columns: none; }
.rest-timer { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-radius: 16px; background: var(--teal); border: 1px solid #0d6970; box-shadow: 0 12px 30px rgba(0,0,0,.5); max-width: calc(100vw - 20px); }
.rest-timer .l { font-size: 12px; color: var(--ice); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rest-timer .t { font-family: var(--font-display); font-weight: 700; font-size: 22px; min-width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
.rest-timer.done { background: var(--accent); border-color: var(--accent); }
@media (max-width: 760px) { .rest-timer { bottom: calc(var(--tabbar-h) + 76px + env(safe-area-inset-bottom)); } }

/* komentáre */
.comments-box { border-top: 1px solid var(--line); padding-top: 10px; }
.comments { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.comment { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; max-width: 85%; font-size: 14px; }
.comment.mine { align-self: flex-end; background: rgba(255,80,26,.14); }
.comment .who { font-size: 11.5px; color: var(--muted); font-weight: 650; margin-bottom: 2px; }
.note-box { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.wd-ex { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* diagnostika */
.diag-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .diag-grid { grid-template-columns: 1fr; } }
.radar-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.chart.radar { max-width: 520px; margin: 0 auto; }
.chart.radar text { font-size: 13px; fill: var(--ice); }
.entry-row { display: grid; grid-template-columns: minmax(120px, 1.3fr) 1fr 1.4fr; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.entry-row.bi { grid-template-columns: minmax(120px, 1.3fr) 1fr 1fr 1.4fr; }
.entry-row .nm { font-weight: 600; }
@media (max-width: 600px) { .entry-row, .entry-row.bi { grid-template-columns: 1fr 1fr; } .entry-row .nm { grid-column: 1 / -1; } }
.map-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.map-row { display: grid; grid-template-columns: 1fr minmax(180px, 1fr); gap: 10px; align-items: center; }
input[type=file] { padding: 7px; }

/* =====================================================================
   v3 – kalendár, šablóny, zdravie, tonnage
   ===================================================================== */
.lbl { font-weight: 650; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; margin-bottom: 6px; }
.cal-head { margin-bottom: 10px; }
.cal-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 11px; font-weight: 650; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.cal-cell { min-height: 92px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 5px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; color: var(--text); overflow: hidden; }
.cal-cell:hover { border-color: #456273; }
.cal-cell.out { opacity: .38; }
.cal-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-cell .dn { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-cell.today .dn { color: var(--accent); }
.chips-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cchip { display: inline-block; font-size: 11px; line-height: 1.25; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; background: var(--surface-2); border: 1px solid var(--line); }
.cchip.done { background: rgba(255,80,26,.18); border-color: rgba(255,80,26,.5); }
.cchip.plan { border-color: #4b6575; color: var(--ice); }
.cchip.plan.loose, .cchip.missed.loose { border-style: dashed; }
.cchip.missed { border-color: rgba(255,107,107,.6); color: #ff9b9b; background: rgba(255,107,107,.08); }
.cchip.ev { background: var(--teal); border-color: #0d6970; color: #fff; }
.cchip.ev.race { background: #3b2f6b; border-color: #574a96; }
.cchip.ev.test { background: #5a4a12; border-color: #8a7420; }
.cchip.pain { background: rgba(255,184,77,.1); border-color: rgba(255,184,77,.45); color: var(--warn); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.upcoming { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.up-date { min-width: 62px; font-weight: 700; font-size: 13px; color: var(--muted); }
.day-row { padding: 7px 4px; border-bottom: 1px solid var(--line); flex-wrap: nowrap; color: inherit; text-decoration: none; }
.day-row.click { cursor: pointer; }
.day-row.click:hover { background: rgba(255,255,255,.03); }
.add-ev { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.add-ev select { max-width: 150px; }
@media (max-width: 760px) {
  .cal-grid { gap: 2px; }
  .cal-cell { min-height: 62px; padding: 3px; border-radius: 7px; }
  .cchip { font-size: 9.5px; padding: 1px 3px; border-radius: 4px; }
  .cal-legend span:last-child { width: 100%; }
}
.wd-sel { width: auto !important; max-width: 120px; padding: 7px 8px; font-size: 13px; }
.tpl-pick { max-height: 340px; overflow: auto; }
.tpl-pick .list-item.sel { border-color: var(--accent); background: rgba(255,80,26,.08); }
.suggest { background: rgba(255,80,26,.08); border: 1px solid rgba(255,80,26,.35); border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.suggest .row + .row { margin-top: 6px; }
.backup-card { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; border-color: rgba(255,184,77,.4); }
.draft-card { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; border-color: rgba(255,184,77,.45); background: rgba(255,184,77,.06); }
.status-card { border-left: 4px solid var(--warn); }
.status-card.bad { border-left-color: var(--danger); }
.today-card { border-color: rgba(255,80,26,.45); }
.ton-pill { display: flex; align-items: center; gap: 4px; padding: 0 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; white-space: nowrap; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.ton { font-variant-numeric: tabular-nums; font-weight: 700; }
.pain-row { padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: nowrap; }
.pain-row.resolved { opacity: .55; }
.pain-int { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; flex: none; background: var(--surface-2); }
.pain-int.i1 { color: var(--warn); border: 1px solid rgba(255,184,77,.5); }
.pain-int.i2 { color: #ff8a4c; border: 1px solid rgba(255,138,76,.6); }
.pain-int.i3 { color: #fff; background: var(--danger); }
.note-box.pain { background: rgba(255,184,77,.08); border: 1px solid rgba(255,184,77,.35); }
details summary { cursor: pointer; margin-top: 8px; }
@media (max-width: 760px) { .nav a { padding: 7px 10px; } }
