:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --surface-2: #efece8;
  --ink: #1d1c1a;
  --ink-2: #5f5b55;
  --ink-3: #8e8981;
  --line: #e2ded8;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #fbe7dc;
  --good: #15803d;
  --good-soft: #dcf2e3;
  --warn: #b45309;
  --warn-soft: #fdf0d5;
  --bad: #b91c1c;
  --act: #0284c7;
  --chart-str: #c2410c;
  --act-soft: #d9eff4;
  --fig: #2b2925;
  --fig-2: #b3ada4;
  --prop: #d8d3cc;
  --radius: 16px;
  --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141416;
    --surface: #1e1e21;
    --surface-2: #2a2a2e;
    --ink: #f2f0ed;
    --ink-2: #b4afa8;
    --ink-3: #85807a;
    --line: #34343a;
    --accent: #fb7d45;
    --accent-ink: #1a0e07;
    --accent-soft: #3d2216;
    --good: #4ade80;
    --good-soft: #173323;
    --warn: #fbbf24;
    --warn-soft: #3a2e12;
    --bad: #f87171;
    --act: #1593d6;
    --chart-str: #e2622a;
    --act-soft: #13303d;
    --fig: #ece9e4;
    --fig-2: #6b6760;
    --prop: #3d3d43;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141416; --surface: #1e1e21; --surface-2: #2a2a2e; --ink: #f2f0ed; --ink-2: #b4afa8; --ink-3: #85807a;
  --line: #34343a; --accent: #fb7d45; --accent-ink: #1a0e07; --accent-soft: #3d2216; --good: #4ade80; --good-soft: #173323;
  --warn: #fbbf24; --warn-soft: #3a2e12; --bad: #f87171; --act: #1593d6; --chart-str: #e2622a; --act-soft: #13303d; --fig: #ece9e4; --fig-2: #6b6760; --prop: #3d3d43; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.modal-open { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.2; }
h3 { font-size: 15px; color: var(--ink-2); font-weight: 600; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.hint { color: var(--ink-3); font-size: 13px; margin: 10px 0; }
.loading { text-align: center; color: var(--ink-3); padding: 40px; }

.main {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 12px) 16px calc(var(--tabs-h) + var(--safe-b) + 96px);
}
.page-title { font-size: 28px; margin: 8px 0 14px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 12px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .04);
}

/* Knappar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border: 0; border-radius: 12px;
  background: var(--surface-2); color: var(--ink);
  font-weight: 600; text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-block { width: 100%; margin-top: 8px; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-small { min-height: 38px; padding: 0 14px; border-radius: 10px; }
.danger { color: var(--bad); }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-row .btn { flex: 1; font-size: 15px; padding: 0 8px; }
.btn svg.yt { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn svg.yt path { fill: currentColor; stroke: none; }

.tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2);
  vertical-align: 2px; margin-left: 4px;
}
.tag-up { background: var(--good-soft); color: var(--good); }

/* Hem */
.week { display: flex; align-items: center; gap: 12px; margin: 4px 2px 14px; }
.week-label { font-weight: 700; font-size: 20px; }
.week-dots { display: flex; gap: 6px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--accent); }
.week-text { margin-left: auto; color: var(--ink-2); font-size: 14px; }

.pass-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 12px; }
.pass-pick button {
  border: 0; background: transparent; border-radius: 9px; min-height: 44px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
}
.pass-pick button small { font-size: 11px; font-weight: 500; color: var(--accent); }
.pass-pick button[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }

.plan { list-style: none; margin: 0; padding: 0; }
.plan li { padding: 10px 0; border-top: 1px solid var(--line); }
.plan li:first-child { border-top: 0; }
.li-slot { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.li-name { font-weight: 600; }
.li-rec { color: var(--ink-2); font-size: 14px; text-align: right; white-space: nowrap; align-self: center; }

.recent { list-style: none; margin: 0; padding: 0; }
.recent li { display: grid; grid-template-columns: 7.5em 4.5em 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.recent li:first-child { border-top: 0; }
.intro p { color: var(--ink-2); margin: 6px 0; }
.done-card { background: var(--good-soft); }
.done-card p { margin: 0; }

.guide summary { font-weight: 700; font-size: 17px; cursor: pointer; min-height: 28px; }
.guide-body p { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.guide-body b { color: var(--ink); }
/* Andra pass */
.act-cta {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border: 0; cursor: pointer;
  min-height: 64px;
}
.act-cta b { display: block; font-size: 16px; }
.act-cta small { display: block; color: var(--ink-2); font-size: 13px; }
.act-cta-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--act-soft); color: var(--act); font-size: 22px; font-weight: 700; }
.act-form fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.act-form legend, .act-form label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.act-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.act-types legend { margin-bottom: 8px; }
.act-types label { display: block; }
.act-types input, .act-int input { position: absolute; opacity: 0; pointer-events: none; }
.act-types label > span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink); font-size: 14px;
}
.act-ico { font-size: 22px; line-height: 1; }
.act-types input:checked + span { border-color: var(--act); background: var(--act-soft); }
.act-types input:focus-visible + span, .act-int input:focus-visible + span { outline: 2px solid var(--act); }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.act-grid label, .act-note { display: flex; flex-direction: column; gap: 4px; }
.act-dist { grid-column: 1 / -1; }
.act-dist[hidden] { display: none; }
.act-form input[type="text"], .act-form input[type="date"] {
  min-height: 46px; border: 1.5px solid var(--ink-3); border-radius: 10px; background: var(--surface);
  padding: 0 10px; font-size: 17px; font-weight: 600; color: var(--ink); width: 100%; -webkit-appearance: none; appearance: none;
}
.act-form input:focus { outline: none; border-color: var(--act); }
.act-int { margin-top: 4px !important; }
.act-int legend { margin-bottom: 6px; }
.act-int label { display: block; }
.act-int label > span { display: grid; place-items: center; min-height: 42px; border-radius: 9px; font-size: 15px; color: var(--ink); }
.act-int input:checked + span { background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .12); color: var(--act); }
.act-note { margin-bottom: 6px; }
.recent li { grid-template-columns: 6.6em 6.4em 1fr 28px !important; align-items: center; }
.recent .note { display: block; font-size: 12px; color: var(--ink-3); }
.del { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 18px; line-height: 1; }

.settings summary { font-weight: 600; cursor: pointer; min-height: 28px; }
.settings .row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.settings select { min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 10px; }
.settings input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--accent); }

/* Pågående pass */
.wo-head {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  margin: calc(-12px - var(--safe-t)) -16px 12px; padding: calc(var(--safe-t) + 10px) 16px 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.wo-title { font-weight: 700; font-size: 18px; }
.wo-sub { color: var(--ink-2); font-size: 13px; }
.wo-timer { font-variant-numeric: tabular-nums; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.wo-timer.warn { color: var(--warn); }
.wo-timer.over { color: var(--bad); }
.wo-progress { grid-column: 1 / -1; position: relative; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.wo-sets { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 3px; transition: width .3s; }
.wo-time { position: absolute; top: 0; bottom: 0; width: 0; border-right: 2px solid var(--ink); opacity: .45; }

.ex-top { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.ex-thumb {
  flex: none; width: 72px; height: 68px; padding: 2px; border: 0; border-radius: 12px; background: var(--surface-2);
}
.ex-thumb svg, .plan-thumb svg { width: 100%; height: 100%; }
.ex-thumb .fig, .ex-thumb .fig-back, .plan-thumb .fig, .plan-thumb .fig-back { stroke-width: 9; }
.ex-title { min-width: 0; }
.ex-name { display: block; border: 0; background: none; padding: 0 0 2px; font-size: 19px; font-weight: 700; text-align: left; line-height: 1.2; }
.ex-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  min-height: 38px; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.pill-how { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico .fill { fill: currentColor; stroke: none; }
.log-hint { font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
.cues-title { margin-top: 4px; }

/* Plan på startsidan */
.plan-row { width: 100%; display: flex; gap: 12px; align-items: center; border: 0; background: none; padding: 0; text-align: left; }
.plan-thumb { flex: none; width: 56px; height: 54px; border-radius: 10px; background: var(--surface-2); padding: 2px; }
.plan-body { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; }
.li-how { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--accent); margin-top: 2px; }
.li-how .ico { width: 15px; height: 15px; }
.ex-meta { color: var(--ink-3); font-size: 13px; }
.ex-meta em { color: var(--accent); font-style: normal; font-weight: 600; }
.swap {
  display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 4px;
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  min-height: 36px; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.swap svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rec { margin: 8px 0 10px; padding: 8px 12px; border-radius: 10px; font-size: 14px; background: var(--surface-2); color: var(--ink-2); }
.rec-increase, .rec-top { background: var(--good-soft); color: var(--good); font-weight: 600; }
.rec-hold { background: var(--accent-soft); color: var(--ink); }
.rec-decrease, .rec-below { background: var(--warn-soft); color: var(--ink); }

.set-head, .set-row { display: grid; grid-template-columns: 1fr 76px 64px 52px; gap: 8px; align-items: center; }
.set-head { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 0 2px 4px; }
.set-head span:nth-child(2), .set-head span:nth-child(3) { text-align: center; }
.set-row { padding: 6px 0; border-top: 1px solid var(--line); }
.set-label { display: flex; align-items: center; gap: 10px; min-width: 0; }
.set-label b { font-size: 17px; width: 14px; flex: none; }
.last { display: flex; flex-direction: column; color: var(--ink-3); font-size: 13px; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; }
.last small { font-size: 11px; }
.in {
  width: 100%; min-height: 46px; border: 1.5px solid var(--ink-3); border-radius: 10px;
  background: var(--surface); text-align: center; font-size: 18px; font-weight: 600;
  font-variant-numeric: tabular-nums; padding: 0 4px; -webkit-appearance: none; appearance: none;
}
.in:focus { outline: none; border-color: var(--accent); }
.check {
  width: 52px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2);
  display: grid; place-items: center;
}
.check svg { width: 24px; height: 24px; fill: none; stroke: var(--ink-3); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.set-row.done .check { background: var(--good); border-color: var(--good); }
.set-row.done .check svg { stroke: var(--surface); }
.set-row.done .in { background: var(--good-soft); border-color: transparent; }
.ex-done .ex-name { color: var(--ink-2); }

@keyframes shake { 0%,100% { transform: none } 25% { transform: translateX(-4px) } 75% { transform: translateX(4px) } }
.shake { animation: shake .25s 2; border-color: var(--bad) !important; }

.feel { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.feel > span { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; }
.seg button { border: 0; background: transparent; min-height: 42px; border-radius: 9px; font-weight: 600; font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .12); color: var(--accent); }
.seg-small button { min-height: 34px; font-size: 13px; padding: 0 10px; }

.superset { border: 2px dashed var(--line); border-radius: calc(var(--radius) + 6px); padding: 10px 6px 0; margin-bottom: 12px; }
.superset.on { border-color: var(--accent); border-style: solid; }
.superset .card { margin-bottom: 6px; }
.ss-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 8px 10px; }
.ss-head small { display: block; color: var(--ink-3); font-size: 12px; }
.switch {
  -webkit-appearance: none; appearance: none; flex: none; width: 50px; height: 30px; border-radius: 15px;
  background: var(--line); position: relative; transition: background .2s; margin: 0;
}
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .2s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }

/* Vilotimer */
.rest {
  position: fixed; z-index: 20; left: 12px; right: 12px;
  bottom: calc(var(--tabs-h) + var(--safe-b) + 10px);
  max-width: 536px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px;
  background: var(--ink); color: var(--bg); border-radius: 18px; overflow: hidden;
  box-shadow: 0 8px 24px rgb(0 0 0 / .25);
}
.rest[hidden] { display: none; }
.rest-bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); transition: width 1s linear; }
.rest-main { flex: 1; display: flex; align-items: baseline; gap: 10px; }
.rest-label { font-size: 14px; opacity: .75; }
.rest-time { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rest-btn { border: 0; background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); border-radius: 10px; min-height: 42px; padding: 0 12px; font-weight: 600; font-size: 14px; }
.rest-go { background: var(--good); color: #fff; }
.rest-go .rest-time { font-size: 22px; }
.rest-go .rest-btn { color: #fff; background: rgb(255 255 255 / .2); }

.toast {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  top: calc(var(--safe-t) + 70px); max-width: calc(100% - 32px);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: 0 6px 20px rgb(0 0 0 / .2);
}
.toast[hidden] { display: none; }

/* Flikar */
.tabs {
  position: fixed; z-index: 10; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabs button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.tabs svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-current="page"] { color: var(--accent); }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 30; background: rgb(0 0 0 / .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal[hidden] { display: none; }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 22px 16px calc(var(--safe-b) + 20px);
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet h2 { padding-right: 40px; font-size: 22px; }
.close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 24px; line-height: 1; }
.anim { background: var(--surface-2); border-radius: 14px; padding: 8px; margin: 8px 0 12px; }
.exercise-svg { width: 100%; max-height: 230px; }
.exercise-svg .fig, .exercise-svg .fig-back { stroke: var(--fig); stroke-width: 7; stroke-linecap: round; fill: none; }
.exercise-svg .fig-back { stroke: var(--fig-2); }
.exercise-svg .fig-head { fill: var(--fig); }
.exercise-svg .ground { stroke: var(--prop); stroke-width: 3; }
.exercise-svg .prop { fill: var(--prop); }
.exercise-svg .prop-line { stroke: var(--prop); stroke-width: 4; }
.exercise-svg .eq { fill: var(--accent); }
.exercise-svg .eq-line { stroke: var(--accent); stroke-width: 7; stroke-linecap: round; }
.exercise-svg .cable { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 3 3; }
@media (prefers-reduced-motion: reduce) { .exercise-svg animate { display: none; } }
.cues { margin: 0 0 8px; padding-left: 22px; }
.cues li { margin: 6px 0; }
.alts { list-style: none; margin: 10px 0 0; padding: 0; }
.alts button {
  width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px;
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; min-height: 56px;
}
.alt-name { font-weight: 700; }

.dialog-wrap { align-items: center; z-index: 50; padding: 16px; }
.dialog {
  width: 100%; max-width: 360px; background: var(--surface); border-radius: 18px; padding: 20px 16px 16px;
  box-shadow: 0 12px 40px rgb(0 0 0 / .3); animation: up .18s ease-out;
}
.dialog p { margin: 0 0 16px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.dialog-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-danger { background: var(--bad); color: #fff; }

/* Utveckling */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.tile { background: var(--surface); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.tile-label { font-size: 13px; color: var(--ink-2); }
.tile-num { font-size: 32px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile-num small { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.tile-foot { font-size: 12px; color: var(--ink-3); }
.tile-foot.good { color: var(--good); font-weight: 600; }

.weekbars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; align-items: end; }
.wb { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wb-seg.wb-act { background: var(--act); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin: -2px 0 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw-str { background: var(--chart-str); }
.sw-act { background: var(--act); }
.tile-wide { grid-column: 1 / -1; }
.wb-col { position: relative; width: 100%; max-width: 30px; height: 94px; display: flex; flex-direction: column-reverse; gap: 2px; }
.wb-goal { position: absolute; left: -3px; right: -3px; bottom: 32px; height: 16px; border: 1.5px dashed var(--ink-3); border-radius: 4px; opacity: .5; }
.wb-seg { height: 14px; background: var(--chart-str); border-radius: 4px; }
.wb-n { font-size: 12px; font-weight: 600; min-height: 16px; }
.wb-l { font-size: 11px; color: var(--ink-3); }

.chart-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.chart-controls select { flex: 1 1 160px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 10px; min-width: 0; }
.chart { position: relative; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-size: 11px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .crosshair { stroke: var(--ink-3); stroke-width: 1; }
.chart .hit { fill: transparent; }
.tip { position: absolute; top: 0; width: 110px; background: var(--ink); color: var(--bg); border-radius: 8px; padding: 6px 8px; font-size: 12px; pointer-events: none; display: flex; flex-direction: column; }
.tip[hidden] { display: none; }
.table-view summary { color: var(--ink-2); font-size: 13px; cursor: pointer; margin-top: 6px; }
.table-view table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.table-view td, .table-view th { text-align: left; padding: 4px 0; border-bottom: 1px solid var(--line); }

.ex-list { list-style: none; margin: 0; padding: 0; }
.ex-list button { width: 100%; display: grid; grid-template-columns: 1fr auto 56px; gap: 8px; align-items: center; border: 0; background: none; padding: 10px 0; border-top: 1px solid var(--line); text-align: left; font-size: 15px; }
.ex-list li:first-child button { border-top: 0; }
.ex-list .muted { font-size: 13px; font-variant-numeric: tabular-nums; }
.pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pct.good { color: var(--good); }

@media (max-width: 360px) {
  .set-head, .set-row { grid-template-columns: 1fr 66px 56px 48px; gap: 6px; }
  .last { font-size: 12px; }
}

/* Senaste passen (styrka + andra pass) */
.recent li { display: flex !important; align-items: center; gap: 12px; padding: 10px 0; }
.r-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 18px; }
.r-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.r-main b { font-size: 15px; }
.r-main .muted { font-size: 13px; }
.del { flex: none; }
.week { flex-wrap: wrap; row-gap: 4px; }
.week-text { flex-basis: 100%; margin-left: 0; }
.recent li .r-main, .recent li .r-main span { text-align: left; }
.act-custom { display: flex; flex-direction: column; gap: 4px; margin: -4px 0 14px; }
.act-custom[hidden] { display: none; }

/* Övningsbibliotek */
.sheet-tall { height: 92vh; max-height: 92vh; }
.back { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 15px; padding: 0 0 8px; min-height: 32px; }
.lib-ico { background: var(--accent-soft); color: var(--accent); }
.lib-ico .ico { width: 22px; height: 22px; }
.add-ex { color: var(--accent); margin-top: 4px; }
.add-ex-wo { margin: 4px 0 4px; border: 1.5px dashed var(--line); background: transparent; color: var(--accent); }
.lib-intro { margin: 0 0 10px; }
.lib-search {
  width: 100%; min-height: 46px; border: 1.5px solid var(--ink-3); border-radius: 12px; background: var(--surface);
  padding: 0 14px; font-size: 17px; color: var(--ink); -webkit-appearance: none; appearance: none;
}
.lib-search:focus { outline: none; border-color: var(--accent); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; min-height: 36px;
  padding: 0 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lib-keep { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; padding: 8px 0 0; }
.lib-keep input { width: 22px; height: 22px; accent-color: var(--accent); }
.lib-count { margin: 6px 0 4px; }
.lib-list { list-style: none; margin: 0; padding: 0; }
.lib-list li { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.lib-list li[hidden] { display: none; }
.lib-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 8px 0; text-align: left; }
.lib-thumb { flex: none; width: 64px; height: 62px; border-radius: 10px; background: var(--surface-2); padding: 2px; }
.lib-thumb svg { width: 100%; height: 100%; }
.lib-thumb .fig, .lib-thumb .fig-back { stroke-width: 9; }
.lib-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lib-text b { font-size: 15px; }
.lib-text small { font-size: 12.5px; color: var(--ink-2); }
.lib-text small.muted { color: var(--ink-3); }
.lib-pass { color: var(--accent); font-weight: 600; }
.lib-in { flex: none; }
.lib-list .btn-small { flex: none; min-height: 36px; padding: 0 12px; font-size: 14px; }
.plan-extra { display: flex; align-items: center; gap: 8px; }
.plan-extra .plan-row { flex: 1; min-width: 0; }

/* Uppvärmning, viktskivor, anteckning, rekord */
.ex-note { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; font-size: 15px; }
.note-in {
  flex: 1; min-width: 0; min-height: 36px; border: 0; border-bottom: 1px dashed var(--line); background: transparent;
  font-size: 16px; color: var(--ink); padding: 0 2px; border-radius: 0;
}
.note-in:focus { outline: none; border-bottom-color: var(--accent); }
.note-in::placeholder { color: var(--ink-3); }
.warmup { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; }
.warmup summary { font-size: 14px; font-weight: 600; cursor: pointer; min-height: 28px; display: flex; align-items: center; }
.warmup ul { list-style: none; margin: 4px 0 0; padding: 0; }
.warmup li { padding: 4px 0; font-size: 15px; }
.warmup li small { display: block; font-size: 12px; color: var(--ink-3); }
.warmup .hint { margin: 4px 0 0; }
.plates { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pr { font-size: 12px; margin-left: 1px; }
.set-label b { width: auto; min-width: 14px; white-space: nowrap; }
.pr-line { font-weight: 700; margin: 0 0 6px !important; }

/* Redigera pass */
.r-edit { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.edit-mark { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.edit-ex { border-top: 1px solid var(--line); padding: 10px 0 6px; }
.edit-ex h3 { color: var(--ink); font-size: 16px; margin: 0 0 6px; }
.edit-head, .edit-row { display: grid; grid-template-columns: 28px 1fr 1fr 32px; gap: 8px; align-items: center; }
.edit-head { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.edit-row { padding: 4px 0; }
.in-edit {
  width: 100%; min-height: 42px; border: 1.5px solid var(--ink-3); border-radius: 10px; background: var(--surface);
  text-align: center; font-size: 17px; font-weight: 600; color: var(--ink); -webkit-appearance: none; appearance: none;
}
.in-edit:focus { outline: none; border-color: var(--accent); }
