:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #efefec;
  --border: #dcdcd7;
  --text: #16181c;
  --text-2: #52514e;
  --muted: #7a7973;
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --accent-soft: #e3eefb;
  --good: #1a7f37;
  --good-soft: #dcf2e3;
  --amber: #a3560a;
  --amber-soft: #fcefdc;
  --violet: #6d44c2;
  --violet-soft: #eee7fa;
  --danger: #c93a39;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --grid: #e6e6e1;
  --radius: 14px;
  --tabbar-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #16181c;
    --surface: #1f2226;
    --surface-2: #2a2e33;
    --border: #363b41;
    --text: #f3f3f1;
    --text-2: #c3c2b7;
    --muted: #8e8d86;
    --accent: #3987e5;
    --accent-ink: #ffffff;
    --accent-soft: #1d3350;
    --good: #3fb865;
    --good-soft: #1b3a26;
    --amber: #f0a54a;
    --amber-soft: #3b2b16;
    --violet: #b99af2;
    --violet-soft: #30264a;
    --danger: #e66767;
    --series-1: #3987e5;
    --series-2: #d95926;
    --grid: #2c3035;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16181c;
  --surface: #1f2226;
  --surface-2: #2a2e33;
  --border: #363b41;
  --text: #f3f3f1;
  --text-2: #c3c2b7;
  --muted: #8e8d86;
  --accent: #3987e5;
  --accent-ink: #ffffff;
  --accent-soft: #1d3350;
  --good: #3fb865;
  --good-soft: #1b3a26;
  --amber: #f0a54a;
  --amber-soft: #3b2b16;
  --violet: #b99af2;
  --violet-soft: #30264a;
  --danger: #e66767;
  --series-1: #3987e5;
  --series-2: #d95926;
  --grid: #2c3035;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  -webkit-tap-highlight-color: transparent;
}
body.no-tabs { padding-bottom: 24px; }

.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; background: var(--bg);
  border-bottom: 1px solid var(--border); min-height: 56px;
}
.topbar h1 { font-size: 19px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#topActions { display: flex; gap: 6px; }

main { max-width: 720px; margin: 0 auto; padding: 16px; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex;
  background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 500;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--accent); }

h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); margin: 24px 0 10px; font-weight: 600; }
h2:first-child { margin-top: 4px; }
h3 { margin: 0 0 4px; font-size: 17px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 10px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
}
a.card, button.card { display: block; width: 100%; text-align: left; color: inherit; text-decoration: none; font: inherit; cursor: pointer; }
a.card:active, button.card:active { background: var(--surface-2); }
.card-title { display: flex; align-items: center; gap: 8px; }
.card-title h3 { flex: 1; }
.chev { color: var(--muted); }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: .5; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 10px; border: 0; background: transparent; color: var(--text); cursor: pointer; font: inherit;
}
.icon-btn:active { background: var(--surface-2); }
.link-btn { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; padding: 8px 0; cursor: pointer; }

label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 4px; font-weight: 500; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

/* Ohjelman näkymä */
.day-block { margin-bottom: 18px; }
.ex-list { list-style: none; padding: 0; margin: 0; }
.ex-list li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.ex-list li:first-child { border-top: 0; }
.ex-list .ex-name { flex: 1; font-weight: 600; }
.ex-list .ex-dose { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.ex-list .ex-note { font-size: 13.5px; color: var(--muted); font-weight: 400; }

/* Editori */
.editor-day { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 12px; margin-bottom: 14px; }
.editor-day > .row input { font-weight: 600; }
.editor-ex { border-top: 1px dashed var(--border); padding: 12px 0 4px; }
.editor-ex .grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; margin-top: 8px; }
.editor-ex .grid label span { font-size: 12px; color: var(--muted); display: block; margin-bottom: 2px; }
.editor-ex .grid input { padding: 8px; text-align: center; }
.editor-ex .note { margin-top: 8px; }

/* Treenin kirjaus */
.log-ex { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 12px 8px; margin-bottom: 14px; }
.log-ex-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.log-ex-head h3 { flex: 1; }
.target { font-size: 14px; color: var(--text-2); }
.prev { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.set-grid { display: grid; grid-template-columns: 34px 1fr 1fr 52px; gap: 8px; align-items: center; }
.set-grid .hdr { font-size: 12px; color: var(--muted); text-align: center; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.set-grid .no { text-align: center; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.set-grid input { text-align: center; font-size: 18px; font-weight: 600; padding: 8px 4px; font-variant-numeric: tabular-nums; }
.set-grid .done-btn {
  height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.set-grid .done-btn.on { background: var(--good); border-color: var(--good); color: #fff; }
input.set-row-done { background: var(--good-soft); border-color: transparent; }
.log-actions { display: flex; gap: 8px; margin-top: 8px; }

.rest-timer {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  z-index: 30; max-width: 688px; margin: 0 auto; background: var(--text); color: var(--bg);
  border-radius: 14px; padding: 10px 14px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
body.no-tabs .rest-timer { bottom: 16px; }
.rest-timer .time { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; flex: 1; }
.rest-timer button { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 8px; padding: 6px 10px; font: inherit; font-weight: 600; cursor: pointer; }

/* Historia */
.hist-sets { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.hist-sets div { display: flex; gap: 8px; }
.hist-sets b { font-weight: 600; color: var(--text); min-width: 0; flex: 1; }

/* Raportit */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.tile .v { white-space: nowrap; font-size: clamp(20px, 6.5vw, 26px); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile .l { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart-tip {
  position: absolute; pointer-events: none; background: var(--text); color: var(--bg); font-size: 13px;
  padding: 6px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -8px; display: none;
}
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); margin: 4px 0 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.seg { display: flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 3px; margin-bottom: 10px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 600; padding: 7px 4px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: right; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data th { color: var(--muted); font-weight: 600; font-size: 12.5px; }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty .btn { margin-top: 14px; }

.auth-wrap { max-width: 380px; margin: 8vh auto 0; }
.auth-logo { width: 72px; height: 72px; border-radius: 18px; display: block; margin: 0 auto 12px; }
.auth-wrap h1 { text-align: center; font-size: 26px; margin: 0 0 4px; }
.auth-wrap .sub { text-align: center; color: var(--muted); margin-bottom: 24px; }
.error { color: var(--danger); font-size: 14px; margin: 4px 0 10px; min-height: 1em; }

#toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 12px); transform: translateX(-50%) translateY(-120%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600;
  transition: transform .25s; z-index: 50; max-width: calc(100% - 32px);
}
#toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 380px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .editor-ex .grid { grid-template-columns: 1fr 1fr; }
}

/* Vahvistusikkuna */
.dialog-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
.dialog {
  background: var(--surface); color: var(--text); border-radius: 18px; padding: 20px;
  width: 100%; max-width: 420px; box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.dialog p { font-size: 17px; margin: 0 0 18px; }
.dialog-actions { display: flex; gap: 10px; }
.dialog-actions .btn { flex: 1; }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (min-width: 600px) { .dialog-backdrop { align-items: center; } }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* Profiilipainike yläpalkissa */
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid var(--border);
}
.avatar-btn.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Kytkin */
.switch-row { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.switch-row > span { flex: 1; }
input.switch {
  appearance: none; -webkit-appearance: none; width: 50px; min-width: 50px; height: 30px; min-height: 0; padding: 0;
  border-radius: 99px; background: var(--border); border: 0; position: relative; cursor: pointer; transition: background .15s;
}
input.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s;
}
input.switch:checked { background: var(--good); }
input.switch:checked::after { transform: translateX(20px); }

/* Ylläpito */
.user-card { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; }
.user-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none;
}
.user-info { flex: 1; min-width: 0; }
.user-info h3 { font-size: 16px; margin: 0; overflow-wrap: anywhere; }

/* Top 10 */
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; font-weight: 600;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.seg-small button { font-size: 13px; padding: 5px 4px; }
.rank-list { list-style: none; margin: 0 0 12px; padding: 4px 12px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--border); }
.rank-row:first-child { border-top: 0; }
.rank-row.me { background: var(--accent-soft); margin: 0 -8px; padding: 10px 12px; border-radius: 10px; border-top-color: transparent; }
.rank-row.me + .rank-row { border-top-color: transparent; }
.rank-no {
  width: 30px; height: 30px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; background: var(--surface-2);
}
.rank-no.r1 { background: #e0ae2a; color: #2b2105; }
.rank-no.r2 { background: #b7bfc8; color: #1f2429; }
.rank-no.r3 { background: #c07a45; color: #fff; }
.rank-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.rank-detail { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.rank-val { font-weight: 700; font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-val small { font-size: 12px; font-weight: 500; color: var(--muted); }
.rank-gap { text-align: center; color: var(--muted); margin: -6px 0 6px; letter-spacing: .2em; }

/* Kehonpaino */
.bw-card .row input { font-size: 18px; font-weight: 600; text-align: center; }
.bw-line { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.bw-line b { font-size: 22px; font-variant-numeric: tabular-nums; }

/* Ylläpitäjän raportit */
.tiles-2 { grid-template-columns: 1fr 1fr; }
.tile-of { font-size: 15px; color: var(--muted); font-weight: 600; }
.card.highlight { background: var(--accent-soft); border-color: transparent; }
.hl-name { font-size: 24px; font-weight: 700; margin: 2px 0 4px; }
.table-wrap { overflow-x: auto; padding-left: 10px; padding-right: 10px; }

/* Liikevalitsin */
.ex-pick {
  flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.ex-pick .chev-down { color: var(--muted); display: flex; flex: none; }
body.sheet-open { overflow: hidden; }
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--bg); width: 100%; max-width: 560px; height: 88vh; height: 88dvh; border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column; padding: 14px 16px 0; box-shadow: 0 -8px 30px rgba(0,0,0,.3);
}
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sheet-head h3 { flex: 1; margin: 0; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; flex: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.chips button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sheet-list { overflow-y: auto; flex: 1; padding-bottom: calc(16px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.pick-group { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 14px 4px 6px; }
.pick-row {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 12px; text-align: left;
  background: var(--surface); color: var(--text); border: 0; border-bottom: 1px solid var(--border); font: inherit; cursor: pointer;
}
.pick-row span { flex: 1; }
.pick-row small { color: var(--muted); }
.pick-row:active { background: var(--surface-2); }
.pick-custom { color: var(--accent); border: 1px dashed var(--accent); border-radius: 10px; margin: 4px 0 8px; }
.pick-custom b { color: var(--text); }
@media (min-width: 600px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 18px; height: 80vh; } }

/* Kielivalinta kirjautumissivulla */
.lang-switch { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.lang-switch button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.lang-switch button.on { color: var(--text); font-weight: 700; background: var(--surface-2); }

/* Ryhmät */
.invite { text-align: center; }
.invite-code { font-size: 34px; font-weight: 800; letter-spacing: .18em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.invite-link { overflow-wrap: anywhere; }
.invite .row { justify-content: center; }
.member-list { padding: 4px 14px; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.member-row:first-child { border-top: 0; }
.group-avatar svg { width: 20px; height: 20px; }
.rank-link { color: inherit; text-decoration: none; }
.rank-link:hover { text-decoration: underline; }
a.user-info h3 { color: var(--text); }

/* Ryhmän jaetut harjoitukset */
.gw-card .card-title { gap: 10px; }
.gw-badge { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.gw-badge svg { width: 18px; height: 18px; }
.gw-ex { color: var(--text-2); margin-top: 4px; }

/* painonpudotusryhmät */
.badge.wl { background: var(--good-soft); color: var(--good); margin-right: 6px; }
.wl-card { border-color: var(--good); }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }

/* ryhmän tiedotteet */
.ann-list { padding-top: 6px; padding-bottom: 6px; }
.ann { position: relative; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ann:last-of-type { border-bottom: 0; }
.ann-meta a { color: var(--accent); font-weight: 600; text-decoration: none; }
.ann-text { margin-top: 2px; overflow-wrap: anywhere; }
.ann:has(.ann-del) { padding-right: 40px; }
.ann-del { position: absolute; top: 6px; right: -6px; }
#annText { width: 100%; resize: vertical; min-height: 60px; }
.admin-avatar svg { width: 20px; height: 20px; }

/* Android-sovelluksen lataus */
.apk-help { margin-top: 12px; }
.apk-help summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; }
.apk-help ol { margin: 8px 0 0; padding-left: 20px; }
.apk-help li { margin: 4px 0; }

/* ohjelmakirjasto */
.lib-link { border-color: var(--accent); }
.lib-desc { margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-2); }
.warn-card { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.lib-maxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lib-maxes label span { font-size: 13px; color: var(--muted); display: block; margin-bottom: 3px; }
details.day-block > summary { list-style: none; cursor: pointer; }
details.day-block > summary::-webkit-details-marker { display: none; }
details.day-block > summary::after { content: '▾'; color: var(--text-2); margin-left: auto; }
details.day-block[open] > summary::after { content: '▴'; }

/* ryhmän harjoituksen voimassaolo */
.gw-card.gw-expired { opacity: .6; }
.gw-card.gw-upcoming { border-style: dashed; }
.gw-validity { padding-top: 12px; padding-bottom: 12px; }

.ex-list .ex-dose { max-width: 60%; white-space: normal; overflow-wrap: anywhere; }
.ex-list .ex-name { min-width: 0; }
.ex-sw { display: block; white-space: normal; overflow-wrap: anywhere; font-size: 13px; color: var(--text-2); }
.gw-validity .row > label { min-width: 0; }
.gw-validity input[type=date] { width: 100%; min-width: 0; }

/* kestävyysliikunta */
.cardio-row { gap: 8px; }
.cardio-row .btn { flex: none; }
.cardio-one { font-weight: 600; margin: 0 0 10px; color: var(--accent); }
/* Lajin valinta: kuvake ja nimi painikkeessa */
.sport-chips { display: grid; gap: 6px; margin: 2px 0 10px; }
.sport-chip { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 8px 1px 7px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text-2);
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: -.1px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sport-chip span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sport-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.sport-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sport-lbl { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.sport-lbl svg { flex: none; }
.seg .sport-lbl { justify-content: center; }
/* Kenttä, jonka yksikkö näkyy kentän sisällä (km, min) */
.unit-field { flex: 1; min-width: 0; position: relative; display: block; margin: 0; }
.unit-field input { width: 100%; text-align: center; padding-right: 34px; }
.unit-field span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); pointer-events: none; }

/* profiilikuvat */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; vertical-align: middle; }
.av img, .user-avatar img, .avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.av-sm { width: 24px; height: 24px; font-size: 12px; margin-right: 8px; position: relative; top: -1px; }
.av-xs { width: 16px; height: 16px; font-size: 9px; margin-right: 4px; position: relative; top: -1px; }
.av-lg { width: 72px; height: 72px; font-size: 28px; }
.profile-card { display: flex; gap: 14px; align-items: center; }
.user-avatar.has-img, .avatar-btn.has-img { padding: 0; overflow: hidden; background: none; }
.avatar-btn { overflow: hidden; }
.avatar-btn.has-img.active { box-shadow: 0 0 0 2px var(--accent); }

/* alapalkki kuudella kohdalla */
#tabbar.tabs-6 a span { font-size: 10.5px; letter-spacing: -.1px; }
#tabbar.tabs-6 a svg { width: 22px; height: 22px; }
/* palautuskoodi, muistutuskortti, tietosuoja */
.recovery-code { font: 700 22px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-align: center;
  padding: 14px; margin: 4px 0 10px; border-radius: 10px; background: var(--surface-2); user-select: all; }
.nudge { border-color: var(--accent); }
.danger-text { color: var(--danger); }
.privacy h2 { margin-top: 20px; }
.privacy p { line-height: 1.55; }
.tabbar a { min-width: 0; }
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 1px; }
/* automaattinen eteneminen */
.inc-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.inc-row > span:first-child { color: var(--muted); }
.inc-row input { width: 64px; padding: 6px; text-align: center; }
.prog { font-size: 13px; margin-top: 3px; font-weight: 600; }
.prog-up { color: var(--good); }
.prog-deload { color: var(--danger); }
.prog-repeat { color: var(--muted); }
/* ryhmähaku */
.pub-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.pub-row:first-child { border-top: 0; }
.pub-code { flex: none; max-width: 90px; text-align: right; }
/* haasteet */
.ch-bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 10px 0 6px; }
.ch-bar > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.ch-done .ch-bar > div { background: var(--good); }
.ch-ended { opacity: .65; }
.ch-members summary { cursor: pointer; color: var(--accent); margin-top: 6px; }
.ch-members .rank-list { padding: 0; border: 0; margin: 4px 0 0; }
/* tapahtumat ja kannustukset */
.feed-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.feed-row:first-child { border-top: 0; padding-top: 2px; }
.feed-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.feed-pr { font-size: 13px; color: var(--good); font-weight: 600; margin-top: 2px; }
.av-md { width: 34px; height: 34px; font-size: 14px; }
.kudos-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 10px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); font-size: 16px; cursor: pointer; filter: grayscale(1); }
.kudos-btn span { font-size: 13px; font-weight: 700; color: var(--text-2); min-width: 6px; }
.kudos-btn.on { filter: none; border-color: var(--accent); background: var(--accent-soft); }
.kudos-btn:disabled { cursor: default; opacity: .7; }

/* 2.2: ylläpito, salit ja profiili-ikkuna */
.tiles-3 { grid-template-columns: repeat(3, 1fr) !important; }
.tiles-4 { grid-template-columns: repeat(4, 1fr); }
.tiles-4 .tile, .tiles-3 .tile { padding: 10px 8px; }
.tiles-4 .tile .v { font-size: clamp(18px, 5.5vw, 24px); }
@media (max-width: 420px) { .tiles-4 { grid-template-columns: 1fr 1fr; } }
.badge.danger { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.badge.good { background: var(--good-soft); color: var(--good); }
a.card.user-link { display: flex; color: inherit; text-decoration: none; }
.user-link .chev { color: var(--muted); flex: none; }
.user-card.frozen { opacity: .65; }
.user-card .user-info { min-width: 0; flex: 1; }
.user-card h3 .badge { vertical-align: 2px; margin-left: 2px; }
dl.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0 0 12px; }
dl.facts dt { font-size: 12.5px; color: var(--muted); }
dl.facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.audit-list { padding-top: 4px; padding-bottom: 4px; }
.audit-row { padding: 9px 0; border-top: 1px solid var(--border); font-size: 14.5px; }
.audit-row:first-child { border-top: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.gym-logo { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; background: var(--surface-2); flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--accent); }
.gym-logo-lg { width: 64px; height: 64px; border-radius: 16px; }
.gym-logo svg { width: 24px; height: 24px; }
.card.gym-head { display: flex; gap: 14px; align-items: center; }
.card.gym-strip { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; padding: 10px 12px; }
.gym-strip > span:nth-child(2) { flex: 1; min-width: 0; }
.gym-strip img, .gym-strip-icon { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; flex: none; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.gym-strip .chev { color: var(--muted); }
.ann-site { background: var(--accent-soft); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 10px; }
.ok-card { border-color: var(--good); background: var(--good-soft); }
.radio-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.radio-row input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); min-height: 0; }
.inv-card .card-title h3 { font-size: 17px; }
.qr-box { background: #fff; border-radius: 12px; padding: 8px; max-width: 260px; margin: 0 auto 10px; }
.qr-box svg { display: block; width: 100%; height: auto; }
.invite-banner { border-color: var(--accent); background: var(--accent-soft); margin-bottom: 12px; }
.auth-logo.brand-logo { object-fit: contain; background: var(--surface); }
.color-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.swatch.on { box-shadow: 0 0 0 3px var(--text); }
.swatch-custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; min-height: 0; }
.brand-preview { display: flex; align-items: center; gap: 12px; }
.brand-preview img { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; }
.brand-preview > div { flex: 1; min-width: 0; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.av-tile { border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: inherit; font: inherit; min-width: 0; }
.av-tile img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.av-tile span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat { display: grid; grid-template-columns: 22px repeat(24, 1fr); gap: 2px; font-size: 10.5px; color: var(--muted); }
.heat-c { aspect-ratio: 1; background: var(--accent); border-radius: 2px; min-width: 0; }
.heat-h { text-align: left; }
.heat-d { line-height: 1; align-self: center; }
.member-open { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.member-open:hover b { text-decoration: underline; }
.profile-dialog { text-align: center; }
.profile-dialog h3 { margin: 10px 0 6px; }
.profile-bio { font-size: 16px !important; margin: 0 0 10px !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.av-xl { width: 96px; height: 96px; font-size: 38px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.badge.gymb { background: var(--accent-soft); color: var(--accent); }

/* 2.2: treenipohjat (EMOM, AMRAP, HIIT, kuntopiiri) */
.block-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); vertical-align: 1px; }
.editor-block { border-left: 3px solid var(--accent); }
.block-grid { grid-template-columns: repeat(3, 1fr) !important; margin-top: 8px; }
.block-items { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.block-item { background: var(--surface-2); border-radius: 10px; padding: 8px; }
.block-item .row { margin-top: 6px; align-items: flex-end; }
.bi-field { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); gap: 3px; }
.block-choice { flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; white-space: normal; height: auto; padding: 10px 12px; }
.li-block { border-left: 3px solid var(--accent); padding-left: 10px !important; }
.li-block .ex-dose div { white-space: normal; }
.log-block { border-left: 3px solid var(--accent); }
.block-log-items { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.bl-item { display: flex; align-items: center; gap: 6px; }
.bl-item .bl-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.bl-item input { width: 64px; flex: none; text-align: center; }
.bt { background: var(--surface-2); border-radius: 14px; padding: 12px; text-align: center; margin: 8px 0; }
.bt.on { background: var(--accent-soft); }
.bt.on.rest { background: var(--good-soft); }
.bt-phase { font-size: 13px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.bt-clock { font: 800 48px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; margin: 4px 0; }
.bt-info { min-height: 1.3em; font-weight: 600; }
.bt-actions { justify-content: center; margin-top: 8px; }
.block-result { gap: 10px; }
.wb-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.wb-row + .wb-row { border-top: 1px solid var(--border); }
.hx-sug { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 4px 10px 4px 4px; font: inherit; font-size: 14px; cursor: pointer; color: inherit; }
.hx-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.hx-row + .hx-row { border-top: 1px solid var(--border); }
.hx-row > div { flex: 1; display: flex; flex-direction: column; }
#rankMode button { padding-left: 2px; padding-right: 2px; }

/* Kirjautuneet laitteet */
.sess-list { display: flex; flex-direction: column; }
.sess-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.sess-row:first-child { border-top: 0; padding-top: 0; }
.sess-row > div { min-width: 0; overflow-wrap: anywhere; }

/* Ilmoitukset ja estot */
.ann-rep { color: var(--muted); font-size: 15px; }
.profile-mod { justify-content: center; gap: 16px; margin-top: 10px; }
.report-dialog .rep-reasons .check-row { margin-top: 8px; }
.report-dialog textarea { width: 100%; }
.report-card .report-body { margin: 8px 0; overflow-wrap: anywhere; }
.report-card .btn.small { margin: 0; }
.licenses { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.45; max-height: none; }
.lib-tm { margin-top: 14px; }
.notice b { display: block; margin-bottom: 2px; }

/* Ryhmän merkit: oma väri ja kuvake jokaiselle, rivittyvät nimen alle */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 8px 4px 7px;
  border-radius: 99px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.tag svg { flex: none; }
.tag-own { background: var(--amber-soft); color: var(--amber); }
.tag-wl { background: var(--good-soft); color: var(--good); }
.tag-pub { background: var(--violet-soft); color: var(--violet); }
.tag-gym { background: var(--accent-soft); color: var(--accent); }
.tag-me { background: var(--accent-soft); color: var(--accent); }

/* ================================================================ 3.0: yhteiset listarivit ja kuvakeruudut */
.list-card { padding: 0; overflow: hidden; }
.row-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; color: inherit; text-decoration: none;
  background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.row-link + .row-link, .list-card > * + .row-link { border-top: 1px solid var(--border); }
.row-link .grow { flex: 1; min-width: 0; }
.row-link .grow > b, .row-link .grow .t2, .row-link .grow .sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-link .val { color: var(--muted); font-size: 14px; white-space: nowrap; }
.row-link > .chev, .row-link > .chev-rot { color: var(--muted); flex: none; }
.ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.ico-orange { background: var(--amber-soft); color: var(--amber); }
.ico-green { background: var(--good-soft); color: var(--good); }
.ico-violet { background: var(--violet-soft); color: var(--violet); }
.ico-red { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.ico-grey { background: var(--surface-2); color: var(--text-2); }
.mini-bar { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.mini-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.eyebrow.muted { color: var(--muted); }
.cnt-badge { font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--danger); color: #fff; flex: none; }

/* Treenaa-sivu */
.hero-card { border: 2px solid var(--accent); padding: 16px; }
.hero-card h3 { font-size: 22px; margin: 0 0 6px; }
.hero-card .hero-ex { font-size: 14px; color: var(--text-2); margin: 0 0 4px; line-height: 1.5; }
.hero-card .hero-meta { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.hero-card .hero-go { font-size: 17px; padding: 14px; margin-top: 10px; }
.hero-more > summary { list-style: none; text-align: center; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer; }
.hero-more > summary::-webkit-details-marker { display: none; }
.hero-more > summary::after { content: ' ▾'; }
.hero-more[open] > summary::after { content: ' ▴'; }
.hero-more[open] > summary { margin-bottom: 10px; }
.hero-more .card { box-shadow: none; }
.ann-strip .t2 { font-size: 13px; color: var(--muted); font-weight: 400; }
.new-dot { display: inline-block; background: #eb6834; color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 2px 7px; margin-left: 4px; vertical-align: 1px; }
.ann-strip .row-link .grow > b { display: inline; }
.chev-rot svg { transition: transform .15s; }
[aria-expanded="true"] .chev-rot svg { transform: rotate(90deg); }
.ann-body { padding: 0 14px 4px; border-top: 1px solid var(--border); }
.ch-row { display: block; padding: 11px 14px; color: inherit; text-decoration: none; }
.ch-row + .ch-row, .list-card > div > .ch-row:first-child { border-top: 1px solid var(--border); }
.ch-row .top { display: flex; gap: 8px; font-size: 14px; }
.ch-row .top b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row .top span { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch-row .ch-num { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Treenin kirjaus: edistyminen, valmiit liikkeet tiiviinä, meneillään oleva korostettuna */
.wo-top { position: sticky; top: calc(env(safe-area-inset-top) + 57px); z-index: 5; background: var(--bg); margin: -16px -16px 12px; padding: 10px 16px 10px; border-bottom: 1px solid var(--border); }
.wo-r { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; }
.wo-clock { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wo-clock svg { width: 15px; height: 15px; }
.log-ex-done { display: flex; align-items: center; gap: 10px; color: var(--text-2); padding: 12px 14px; }
.log-ex-done .grow { flex: 1; min-width: 0; }
.log-ex-done .grow b { color: var(--text); }
.ok-dot { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; background: var(--good-soft); color: var(--good); flex: none; }
.ok-dot svg { width: 16px; height: 16px; }
.log-ex-cur { border: 2px solid var(--accent) !important; }
.log-actions { flex-wrap: wrap; }
.rest-timer .rt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rest-timer .rt-note { opacity: .8; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Profiili: valikko */
a.card.profile-head, .profile-head { display: flex; gap: 14px; align-items: center; color: inherit; text-decoration: none; }
.profile-head .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile-head .grow b { font-size: 18px; }
.profile-head .link { color: var(--accent); font-weight: 600; }
.warn-dot { width: 8px; height: 8px; border-radius: 99px; background: #eb6834; display: inline-block; margin-left: 6px; vertical-align: middle; }
.row-link .grow > b .warn-dot { vertical-align: 2px; }

/* Treenipohja ohjelman listassa: tyyppi, ohje ja numeroidut liikkeet allekkain */
.ex-list li.li-block-v { display: block; }
.blk-head { display: flex; align-items: center; gap: 8px; }
.blk-chip { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.blk-rule { font-size: 13px; color: var(--muted); margin: 5px 0 4px; }
.blk-items { margin: 0; padding: 0; list-style: none; counter-reset: blk; }
.ex-list .blk-items li { display: flex; gap: 8px; padding: 5px 0; border: 0; counter-increment: blk; font-size: 15px; }
.blk-items li::before { content: counter(blk); width: 20px; height: 20px; border-radius: 99px; background: var(--surface-2); color: var(--text-2);
  font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; margin-top: 1px; }
.blk-items li > span:first-child { flex: 1; min-width: 0; font-weight: 600; }
.blk-items .w { color: var(--muted); white-space: nowrap; }

/* 3.0 Top 10: suodatinrivi ja podium */
.filter-row { display: flex; gap: 8px; overflow-x: auto; margin: 10px -16px 14px; padding: 2px 16px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-grp { display: contents; }
.filter-grp[hidden] { display: none; }
.pill-sel { position: relative; flex: none; display: inline-flex; }
.pill-sel select { appearance: none; -webkit-appearance: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 8px 30px 8px 13px; max-width: 62vw;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden; min-height: 38px; cursor: pointer; }
.pill-sel::after { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; color: var(--text-2); }
.pill-sel.main select { background: var(--accent); color: #fff; border-color: transparent; }
.pill-sel.main::after { color: #fff; }
.pill-sel select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 8px; text-align: center; margin: 4px 0 12px; }
.podium .pd { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.podium .av { width: 44px; height: 44px; font-size: 18px; }
.podium .pd1 .av { width: 56px; height: 56px; font-size: 22px; }
.podium .pd.me .av { box-shadow: 0 0 0 3px var(--accent); }
.podium .pd-n { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .pd.me .pd-n { color: var(--accent); }
.podium .pd-v { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.podium .pd-v small { font-size: 11px; }
.podium .pd-b { width: 100%; border-radius: 10px 10px 0 0; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; }
.podium .pd1 .pd-b { height: 70px; background: #c9960f; }
.podium .pd2 .pd-b { height: 50px; background: #8a939d; }
.podium .pd3 .pd-b { height: 38px; background: #b0692f; }

/* 3.0 ylläpito: etusivu */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.kpi .v { font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .v small { font-size: 14px; color: var(--muted); font-weight: 600; }
.kpi .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi .tr { font-size: 12px; font-weight: 700; margin-top: 4px; }
.tr.up { color: var(--good); } .tr.down { color: var(--danger); } .tr.muted { color: var(--muted); }
.qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.qa a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text); text-decoration: none; }
.qa .ico { width: 48px; height: 48px; border-radius: 14px; }
.qa .ico svg { width: 22px; height: 22px; }
/* jäsenlista */
.search-box { position: relative; }
.search-box input { width: 100%; padding-left: 38px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.chips button b { font-weight: 800; margin-left: 2px; opacity: .75; }
.status-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin: -2px 2px 10px; }
.status-legend span { display: inline-flex; align-items: center; gap: 5px; }
.status-legend .sdot { position: static; border: 0; width: 9px; height: 9px; }
.uav { position: relative; flex: none; display: inline-flex; }
.uav .av { width: 38px; height: 38px; font-size: 16px; }
.uav .admin-avatar { background: var(--surface-2); color: var(--text-2); }
.uav .admin-avatar svg { width: 18px; height: 18px; }
.sdot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 99px; border: 2px solid var(--surface); display: inline-block; }
.s-active, .s-new { background: var(--good); }
.s-quiet { background: #e0a100; }
.s-passive { background: #b9b8b2; }
.s-frozen { background: #5b8def; }
.urow { display: flex; align-items: center; gap: 11px; padding: 9px 14px; color: inherit; text-decoration: none; }
.urow + .urow { border-top: 1px solid var(--border); }
.urow .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.urow .n { display: flex; gap: 6px; align-items: center; min-width: 0; }
.urow .n b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.urow .n .tag { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urow .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow .w { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }
.urow .w b { display: block; color: var(--text); font-size: 15px; }
/* jäsenkortti */
.ucard-head { display: flex; gap: 14px; align-items: center; }
.ucard-head .grow { flex: 1; min-width: 0; }
.ucard-head .uname { font-size: 18px; display: block; overflow: hidden; text-overflow: ellipsis; }
.uav-lg .av { width: 58px; height: 58px; font-size: 22px; }
.uav-lg .sdot { width: 15px; height: 15px; }
.ucard-acts { display: grid; gap: 6px; margin-bottom: 12px; }
.ucard-acts button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 2px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); font: inherit; font-size: 11.5px; font-weight: 600; color: var(--text); text-align: center; cursor: pointer; min-width: 0; }
.ucard-acts button span { overflow-wrap: anywhere; hyphens: manual; }
.ucard-acts button svg { color: var(--accent); }
.ucard-acts button.warn svg { color: var(--text-2); }
.ucard-acts button:disabled { opacity: .55; cursor: default; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 56px; margin: 10px 0 4px; }
.spark i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.spark i.z { background: var(--surface-2); height: 4px; }
.spark-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.act-note { font-size: 13.5px; font-weight: 600; margin-top: 8px; color: var(--good); background: none !important; }
.act-note.s-quiet, .act-note.s-passive { color: var(--amber); }
.act-note.s-new { color: var(--text-2); }
.facts3 { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.facts3 b { display: block; font-size: 18px; }
.facts3 span { font-size: 12px; color: var(--muted); }
.wk-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14px; }
.wk-row + .wk-row { border-top: 1px solid var(--border); }
.wk-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-row span { color: var(--muted); white-space: nowrap; }
.facts-details summary { cursor: pointer; font-weight: 700; }
.facts-details[open] summary { margin-bottom: 8px; }
/* hiljentyneet */
.quiet-hero { background: linear-gradient(135deg, var(--amber-soft), var(--surface)); }
.quiet-hero .big { font-size: 26px; display: block; }
.qrow { display: flex; align-items: center; gap: 11px; padding: 10px 14px; }
.qrow + .qrow { border-top: 1px solid var(--border); }
.qrow .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.qrow .grow .small { line-height: 1.3; }
.btn.sent { background: var(--good-soft); color: var(--good); border-color: transparent; white-space: nowrap; cursor: default; }
/* tiedotteen kirjoitus */
.when-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.when-pick button { text-align: left; border: 1px solid var(--border); border-radius: 12px; padding: 9px 11px; background: var(--surface); font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; }
.when-pick button b { display: block; font-size: 14px; color: var(--text); }
.when-pick button.on { border: 2px solid var(--accent); padding: 8px 10px; }
.push-pv { display: flex; gap: 10px; background: #2b2e33; color: #fff; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.push-pv[hidden] { display: none; }
.push-pv .pi { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); flex: none; display: grid; place-items: center; }
.push-pv .pi svg { width: 16px; height: 16px; }
.push-pv .grow { min-width: 0; }
.push-pv .ap { font-size: 11px; opacity: .7; }
.push-pv .pt { font-size: 13px; font-weight: 700; }
.push-pv .pb { font-size: 13px; opacity: .9; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ann-pv { border-radius: 12px; background: var(--accent-soft); padding: 10px 12px; font-size: 14px; overflow-wrap: anywhere; }
.ann-pv .m { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.sched-tag { display: flex; align-items: center; gap: 6px; color: var(--amber); font-weight: 600; padding-top: 8px; }
.sched-tag svg { width: 15px; height: 15px; }
/* muistutus jäsenen Treenaa-sivulla */
.nudge-card { background: var(--accent-soft); border-color: transparent; }
.nudge-card .m { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.nudge-card .m svg { width: 16px; height: 16px; }
.row-link .sub2 { display: block; }
.chips.chips-wrap { flex-wrap: wrap; overflow: visible; }
.qrow .btn { flex: none; }

/* 3.1 kestävyyslajit */
.sport-chips.scroll { display: flex; overflow-x: auto; position: relative; margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; scrollbar-width: none; }
.card .sport-chips.scroll { margin-left: -16px; margin-right: -16px; }
.sport-chips.scroll::-webkit-scrollbar { display: none; }
.sport-chips.scroll .sport-chip { flex: none; width: 72px; }
.cardio-fields { display: flex; gap: 8px; }
.uf { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; margin: 0; }
.uf small { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uf-in { position: relative; display: block; }
.uf-in input { width: 100%; text-align: center; padding-right: 44px; font-variant-numeric: tabular-nums; }
.uf-in span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); pointer-events: none; }
.pace-box { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-top: 10px; }
.pace-box[hidden] { display: none; }
.pace-box b { font-variant-numeric: tabular-nums; }
.pr-badge { margin-left: auto; font-size: 11.5px; font-weight: 800; color: #fff; background: #c9960f; border-radius: 99px; padding: 2px 8px; }
.sp-group { margin: 14px 2px 8px !important; }
.sp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sp-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 1px 7px; border: 1px solid var(--border);
  border-radius: 14px; background: var(--surface); text-align: center; cursor: pointer; color: var(--text-2); min-width: 0; }
.sp-tile b { font-size: 11.5px; line-height: 1.15; color: var(--text); overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.sp-tile .u { font-size: 11px; color: var(--muted); font-weight: 600; }
.sp-check { position: absolute; opacity: 0; pointer-events: none; }
.sp-ck { position: absolute; top: 4px; right: 4px; width: 17px; height: 17px; border-radius: 99px; background: var(--accent); color: #fff; display: none; place-items: center; }
.sp-ck svg { width: 12px; height: 12px; }
.sp-tile:has(.sp-check:checked) { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); padding: 8px 0 6px; }
.sp-tile:has(.sp-check:checked) b { color: var(--accent); }
.sp-tile:has(.sp-check:checked) .sp-ck { display: grid; }
.sp-tile:has(.sp-check:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.stack-chart { display: flex; align-items: flex-end; gap: 8px; height: 118px; padding: 6px 2px 0; }
.stack-chart .sb { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; min-height: 2px; }
.stack-chart .sb i { display: block; border-radius: 3px; }
.stack-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-2); margin-top: 10px; }
.stack-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.sr { display: flex; align-items: center; gap: 11px; padding: 10px 14px; width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.sr + .sr { border-top: 1px solid var(--border); }
.sr .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.sr .grow { flex: 1; min-width: 0; } .sr .grow .small { display: block; }
.sr .v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .sr .v b { display: block; } .sr .v span { font-size: 12px; color: var(--muted); }
.sr > svg:last-child { color: var(--muted); flex: none; }

/* 3.2 oma sali ylläpitoon */
.gr-intro h3 { margin: 0 0 8px; }
.gr-list { margin: 0 0 10px; padding-left: 20px; font-size: 14px; line-height: 1.55; }
.gr-status h3 { margin: 8px 0 2px; }
.gr-badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 3px 10px; }
.gr-badge.open { background: var(--amber-soft); color: var(--amber); }
.gr-badge.ok { background: var(--good-soft); color: var(--good); }
.gr-badge.no { background: var(--surface-2); color: var(--text-2); }
.gr-reply { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.gr-user { display: flex; align-items: center; gap: 10px; }
.gr-req .field { margin-top: 10px; }

/* ---------------------------------------------------------------- 3.3: treenaaja */
.sheet-body { overflow-y: auto; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.goal-card .goal-top { display: flex; gap: 14px; align-items: center; }
.goal-ring { flex: none; color: var(--text); }
.goal-card .grow { flex: 1; min-width: 0; } .goal-card .grow b { display: block; font-size: 17px; } .goal-card .grow > .small { display: block; }
.streak-tag { display: inline-flex; gap: 4px; align-items: center; margin-top: 6px; background: var(--amber-soft); color: var(--amber); font-weight: 800; border-radius: 99px; padding: 3px 10px; font-size: 13px; }
.wk-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.wk-dots i { display: grid; place-items: center; width: 30px; height: 30px; margin: 4px auto 0; border-radius: 99px; background: var(--surface-2); color: #fff; font-style: normal; }
.wk-dots i svg { width: 16px; height: 16px; }
.wk-dots i.on { background: var(--good); } .wk-dots i.today:not(.on) { box-shadow: inset 0 0 0 2px var(--accent); }
.next-badge { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13.5px; }
.next-badge > span:first-child { font-size: 20px; }
.coach-strip { margin-bottom: 12px; }
.welcome-card { position: relative; background: linear-gradient(160deg, var(--amber-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--amber) 30%, var(--border)); }
.welcome-card p { margin: 6px 0; font-size: 14.5px; line-height: 1.5; }
.wc-head { display: flex; gap: 8px; align-items: center; padding-right: 32px; } .wc-head b { font-size: 16px; } .wc-ic { font-size: 22px; }
.wc-x { position: absolute; top: 6px; right: 6px; }
.wc-prog, .wc-ch { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); } .wc-prog b, .wc-ch b { display: block; font-size: 16px; margin: 2px 0; }
.eb { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; color: var(--accent); }
.good-text { color: var(--good); } .warn-text { color: var(--amber); }
/* aloitusopas */
.onb-steps { display: flex; gap: 6px; margin: 2px 0 16px; } .onb-steps i { flex: 1; height: 5px; border-radius: 9px; background: var(--border); } .onb-steps i.on { background: var(--accent); }
.onb-q { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.onb-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.onb-opt { text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 14px; padding: 12px; font: inherit; cursor: pointer; }
.onb-opt b { display: block; font-size: 15px; } .onb-opt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.onb-opt.on { border: 2px solid var(--accent); background: var(--accent-soft); padding: 11px; }
.onb-chips button { min-width: 52px; font-size: 15px; }
.onb-sugg { border-radius: 16px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000)); color: #fff; padding: 16px; }
.onb-sugg .k { font-size: 12px; font-weight: 800; opacity: .85; letter-spacing: .05em; } .onb-sugg > b { font-size: 20px; display: block; margin: 4px 0; }
.onb-sugg p { margin: 0 0 8px; font-size: 13.5px; opacity: .95; }
.onb-sugg .onb-use { background: #fff; color: #16181c; border-color: #fff; font-weight: 800; margin-top: 4px; }
/* levylaskuri */
.plate-btn svg { width: 20px; height: 20px; }
.bar-vis { display: flex; align-items: center; justify-content: center; height: 104px; margin: 4px 0; }
.bar-vis .plate { border-radius: 4px; margin: 0 1px; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; writing-mode: vertical-rl; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.bar-vis .rod { width: 64px; height: 10px; background: #9aa3ad; } .bar-vis .sleeve { width: 16px; height: 16px; background: #7b848e; border-radius: 3px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; } .pchip { border-radius: 99px; padding: 4px 10px; font-weight: 800; font-size: 14px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.warm { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; font-size: 14px; }
.warm .r { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.wu-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.wu { border: 1px dashed var(--border); background: var(--surface); color: var(--text-2); border-radius: 99px; padding: 5px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.wu.on { border-style: solid; background: var(--good-soft); color: var(--good); border-color: transparent; }
/* treenin yhteenveto */
.done-hero { text-align: center; padding: 18px 14px; } .done-hero.has-pr { background: linear-gradient(160deg, #fff6e0, var(--surface)); border-color: #f2d493; }
.done-hero .t { font-size: 42px; line-height: 1.1; } .done-hero > b { display: block; font-size: 20px; margin: 4px 0; } .done-hero > .small { display: block; }
.sum3 { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin: 12px 0 0; } .sum3 b { display: block; font-size: 18px; } .sum3 span { font-size: 12px; color: var(--muted); }
.badge-ic { font-size: 22px; width: 34px; text-align: center; }
.share-card { border-radius: 18px; color: #fff; padding: 16px; margin-top: 4px; }
.share-card .lg { font-size: 12px; font-weight: 800; opacity: .9; letter-spacing: .04em; } .share-card .big { font-size: 28px; font-weight: 900; margin: 8px 0 0; line-height: 1.08; }
.share-card .sub { font-size: 14px; opacity: .92; margin-top: 4px; } .share-card .row2 { display: flex; gap: 18px; margin-top: 12px; font-size: 13px; } .share-card .row2 b { display: block; font-size: 17px; }
/* kooste */
.recap-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.recap-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; position: relative; background: linear-gradient(150deg, var(--accent-soft), var(--surface)); }
.recap-card.yr { background: linear-gradient(150deg, var(--amber-soft), var(--surface)); }
.recap-card .k { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--muted); } .recap-card b { font-size: 18px; margin-top: 2px; }
.recap-card .chev { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.recap-hero { background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 75%, #000), var(--accent)); color: #fff; border: 0; }
.recap-hero .k { font-size: 12px; font-weight: 800; letter-spacing: .06em; opacity: .9; }
.recap-big { font-size: 44px; font-weight: 900; line-height: 1.1; margin: 4px 0 10px; } .recap-big small { font-size: 18px; font-weight: 700; opacity: .9; }
.recap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 10px; } .recap-grid b { display: block; font-size: 20px; } .recap-grid span { font-size: 12.5px; opacity: .9; }
.recap-hero .up, .recap-hero .dn { font-weight: 800; color: #fff; }
.up { color: var(--good); } .dn { color: var(--danger); }
.facts { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.75; }
/* lihasryhmät */
.mg-r { display: grid; grid-template-columns: 96px 1fr 38px; gap: 8px; align-items: center; padding: 5px 0; font-size: 13.5px; }
.mg-r b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-tr { position: relative; height: 14px; border-radius: 7px; background: var(--surface-2); }
.mg-tr .z { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--good) 18%, transparent); border-left: 1.5px dashed var(--good); border-right: 1.5px dashed var(--good); }
.mg-tr i { position: absolute; left: 0; top: 3px; height: 8px; border-radius: 4px; }
.mg-r .n { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.tip-box { border-radius: 12px; background: var(--amber-soft); color: var(--amber); padding: 9px 12px; font-size: 13.5px; margin-top: 8px; line-height: 1.45; }
/* oma sali */
.busy-tag { font-weight: 800; border-radius: 99px; padding: 3px 9px; font-size: 12.5px; } .busy-tag.quiet { background: var(--good-soft); color: var(--good); }
.busy-tag.normal { background: var(--accent-soft); color: var(--accent); } .busy-tag.busy { background: var(--amber-soft); color: var(--amber); }
.busy-bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; margin: 10px 0 4px; } .busy-bars i { flex: 1; border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.busy-bars i.now { background: var(--accent); }
.busy-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.ev { display: flex; gap: 12px; align-items: center; } .ev .grow { flex: 1; min-width: 0; } .ev .grow > * { display: block; }
.evd { width: 50px; flex: none; text-align: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); padding: 6px 0; line-height: 1.1; }
.evd b { display: block; font-size: 19px; } .evd span { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.ev-off { opacity: .6; } .ev-people { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; } .ev-people span { display: inline-flex; gap: 5px; align-items: center; }
.poll-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.poll-opt { text-align: left; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; font-weight: 600; background: var(--surface); color: var(--text); cursor: pointer; }
.poll-res { position: relative; display: flex; justify-content: space-between; gap: 10px; border-radius: 10px; padding: 8px 12px; font-size: 14px; background: var(--surface-2); overflow: hidden; }
.poll-res .bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 22%, transparent); } .poll-res > *:not(.bar) { position: relative; }
.poll-res.mine { box-shadow: inset 0 0 0 2px var(--accent); }
/* valmennus */
.coach-head { display: flex; gap: 12px; align-items: center; } .coach-head .ch-ic { font-size: 26px; } .coach-head .grow { flex: 1; min-width: 0; }
.adh { display: inline-flex; gap: 3px; flex: none; } .adh i { width: 9px; height: 18px; border-radius: 3px; background: var(--surface-2); }
.adh i.full { background: var(--good); } .adh i.part { background: #e0a100; } .adh i.open { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--border); }
.flag { font-size: 11px; font-weight: 800; border-radius: 99px; padding: 1px 7px; background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); vertical-align: 1px; }
.cl-row .grow > b { display: inline !important; }
.sheet:has(.sheet-body) { height: auto; max-height: 88vh; max-height: 88dvh; }

/* ---------------------------------------------------------------- 3.3: ylläpito */
.ico-pink { background: #fde7ef; color: #b8325f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ico-pink { background: #45202e; color: #f08fb0; } }
:root[data-theme="dark"] .ico-pink { background: #45202e; color: #f08fb0; }
.pulse { border-radius: 18px; padding: 14px 16px; color: #fff; background: linear-gradient(135deg, #2a78d6, #1b4f9a); margin-bottom: 14px; }
.pulse.good { background: linear-gradient(135deg, #1a9e6b, #0f6e4a); } .pulse.bad { background: linear-gradient(135deg, #b8561b, #8a3d10); }
.pulse .k { font-size: 12px; font-weight: 800; opacity: .9; letter-spacing: .05em; } .pulse > b { display: block; font-size: 20px; margin: 4px 0 2px; }
.pulse p { margin: 0; font-size: 13.5px; opacity: .95; } .pulse .m3 { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 10px; font-size: 12px; opacity: .95; gap: 6px; }
.pulse .m3 b { display: block; font-size: 19px; } .pulse .m3 small { font-size: 12px; opacity: .8; }
.qa.qa-8 { gap: 14px 6px; } .qa .ico { position: relative; }
.qa-b { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--bg); }
.pills-row { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 10px; padding: 2px 16px; scrollbar-width: none; }
.pills-row button { flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 99px; padding: 7px 13px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pills-row button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.tabsx { display: flex; gap: 18px; border-bottom: 1px solid var(--border); margin: 0 -16px 12px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabsx button { flex: none; border: 0; background: none; padding: 8px 0; font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; }
.tabsx button.on { color: var(--accent); border-bottom-color: var(--accent); }
.hl-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hlc { flex: none; width: 250px; scroll-snap-align: start; border-radius: 18px; padding: 14px 16px; color: #fff; }
.hlc .k { font-size: 12px; font-weight: 800; opacity: .9; letter-spacing: .03em; } .hlc .big { font-size: 36px; font-weight: 800; line-height: 1.05; margin: 6px 0 2px; }
.hlc .what { font-size: 14.5px; font-weight: 600; line-height: 1.3; } .hlc .cmp { font-size: 12.5px; opacity: .92; margin-top: 6px; }
.hlc .btnx { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; background: rgba(255,255,255,.2); border: 0; color: #fff; border-radius: 99px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.g1 { background: linear-gradient(135deg, #2a78d6, #1b4f9a); } .g2 { background: linear-gradient(135deg, #e0892b, #b8561b); }
.g3 { background: linear-gradient(135deg, #1a9e6b, #0f6e4a); } .g4 { background: linear-gradient(135deg, #8a5cd6, #5a37a0); }
.bars .r { display: grid; grid-template-columns: 118px 1fr 62px; gap: 8px; align-items: center; padding: 6px 0; font-size: 13.5px; }
.bars .r b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars .tr2 { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; } .bars .tr2 i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.bars .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; } .bars .n small { display: block; font-size: 11px; font-weight: 700; }
.idea { border: 1px dashed var(--accent); background: var(--accent-soft); border-radius: 14px; padding: 10px 12px; font-size: 14px; margin-top: 10px; }
.idea .m { font-size: 12px; font-weight: 800; color: var(--accent); margin-bottom: 3px; }
.pr-line { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; } .pr-line + .pr-line { border-top: 1px solid var(--border); } .pr-line .grow { flex: 1; }
.leg { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); margin-top: 4px; } .leg i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.ins { font-size: 13.5px; line-height: 1.6; margin-top: 10px; }
.cmp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; margin: 4px 0 8px; } .cmp-grid b { display: block; font-size: 17px; } .cmp-grid span { font-size: 11.5px; color: var(--muted); }
.cmp-grid .best b { color: var(--good); }
.gym-cmp .card-title { gap: 10px; }
.recap-row .recap-card { display: flex; flex-direction: column; padding-right: 30px; }
#mgSeg { flex: none; } #mgSeg button { white-space: nowrap; padding: 5px 10px; }
.coach-strip { margin-bottom: 12px; }

/* ===== 3.4: ohjelmien teko ja treenin kirjaus ===== */
.new-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 18px; }
.new-main { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 16.5px; text-decoration: none; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.new-main:active { transform: translateY(1px); }
.new-sec { display: flex; flex-direction: column; gap: 5px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.new-sec b { font-size: 15px; } .new-sec .small { line-height: 1.35; }
.new-sec .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.pcard .pc-top { display: flex; align-items: center; gap: 8px; } .pcard .pc-top h3 { flex: 1; margin: 0; }
.pcard .pc-top svg { color: var(--muted); flex: none; }
.tag-good { font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 2px 8px; background: var(--good-soft); color: var(--good); white-space: nowrap; }
.nextday { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 10px; background: var(--surface-2); padding: 8px 10px; font-size: 13.5px; }
.nextday b { color: var(--accent); }
details.arch > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--text-2); cursor: pointer; }
details.arch > summary::-webkit-details-marker { display: none; }
details.arch[open] > summary svg { transform: rotate(180deg); }
.wiz-steps { display: flex; gap: 6px; margin: 0 0 14px; } .wiz-steps i { flex: 1; height: 5px; border-radius: 9px; background: var(--border); } .wiz-steps i.on { background: var(--accent); }
.lbl { font-size: 13px; font-weight: 700; color: var(--muted); margin: 14px 0 6px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding: 0; }
.chips.wrap button { min-width: 44px; padding: 8px 14px; font-weight: 700; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tpl { text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 13px; padding: 10px 11px; font: inherit; cursor: pointer; }
.tpl b { font-size: 14.5px; display: block; } .tpl small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.tpl.on { border: 2px solid var(--accent); background: var(--accent-soft); padding: 9px 10px; }
.tpl-preview { margin: 14px 0 90px; border-radius: 13px; background: var(--surface); border: 1px dashed var(--border); padding: 10px 12px; font-size: 13.5px; line-height: 1.6; }
.tpl-preview .muted { margin-top: 4px; font-size: 12.5px; }
.sticky-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 94%, transparent); border-top: 1px solid var(--border); }
.sticky-actions .btn { max-width: 688px; margin: 0 auto; }
details.prog-more { margin: -4px 0 12px; } details.prog-more > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; font-size: 14px; cursor: pointer; padding: 4px 0; }
details.prog-more > summary::-webkit-details-marker { display: none; } details.prog-more > summary svg { width: 16px; height: 16px; }
details.prog-more[open] > summary { margin-bottom: 8px; } details.prog-more[open] > summary svg { transform: rotate(180deg); }
.daytabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px; scrollbar-width: none; }
.daytabs::-webkit-scrollbar { display: none; }
.daytabs button { flex: none; max-width: 170px; text-align: left; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.daytabs button b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daytabs button small { display: block; font-size: 11.5px; color: var(--muted); }
.daytabs button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; } .daytabs button.on small { color: color-mix(in srgb, var(--accent-ink) 80%, transparent); }
.daytabs button.add { display: grid; place-items: center; width: 46px; color: var(--accent); border-style: dashed; }
.dayhead { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.dayhead input { flex: 1; min-width: 0; font-size: 19px; font-weight: 800; border-color: transparent; background: transparent; padding: 6px 4px; }
.dayhead input:focus { border-color: var(--border); background: var(--surface); }
.exl { padding: 0; overflow: hidden; }
.exr { display: flex; align-items: center; gap: 4px; padding: 4px 10px 4px 2px; background: var(--surface); position: relative; transition: transform .15s; }
.exr + .exr, .editor-block + .exr, .exr + .editor-block { border-top: 1px solid var(--border); }
.exr.dragging { z-index: 3; transition: none; box-shadow: 0 8px 24px rgba(0,0,0,.18); border-radius: 12px; }
.exr.linked { box-shadow: inset 3px 0 0 var(--violet); }
.exr .grip { flex: none; width: 36px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); opacity: .7; touch-action: none; cursor: grab; }
.exr-main { flex: 1; min-width: 0; text-align: left; border: 0; background: none; color: var(--text); font: inherit; padding: 8px 0; cursor: pointer; }
.exr-main b { display: block; font-size: 15.5px; } .exr-main > span { font-size: 13px; color: var(--text-2); }
.exr .chev { color: var(--muted); display: flex; }
.exl .editor-block { margin: 0; border-radius: 0; border: 0; border-top: 1px solid var(--border); background: var(--surface-2); }
.ss-chip { display: inline-block; font-size: 11px; font-weight: 800; color: var(--violet); background: var(--violet-soft); border-radius: 6px; padding: 1px 5px; margin-right: 6px; vertical-align: 2px; }
.exr-main .blk-chip, .log-row .blk-chip { margin-right: 6px; font-size: 11px; padding: 2px 6px; vertical-align: 1px; }
.add-row { display: flex; gap: 8px; margin-top: 10px; } .add-row .btn { flex: 1; white-space: nowrap; } .add-row .btn.primary { flex: 1.5; }
.hint { font-size: 12.5px; color: var(--muted); text-align: center; margin: 10px 0 0; }
.exs-sub { margin: -6px 0 6px; }
.stp { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 8px; margin: 10px 0; }
.stp > span { font-weight: 700; font-size: 14px; color: var(--text-2); }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; height: 46px; background: var(--surface); }
.stepper button { width: 52px; flex: none; border: 0; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; cursor: pointer; }
.stepper b, .stepper input { flex: 1; min-width: 0; text-align: center; font-size: 19px; font-weight: 800; align-self: center; border: 0; background: none; font-variant-numeric: tabular-nums; }
.mini { display: flex; gap: 5px; flex-wrap: wrap; }
.mini button { padding: 7px 10px; border-radius: 99px; border: 1px solid var(--border); font: inherit; font-weight: 700; font-size: 13.5px; background: var(--surface); color: var(--text); cursor: pointer; min-width: 40px; }
.mini button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tog { display: flex; align-items: center; gap: 10px; border-radius: 12px; background: var(--surface-2); padding: 10px 12px; margin-top: 10px; font-size: 14px; cursor: pointer; }
.tog input[type=checkbox] { width: 22px; height: 22px; min-height: 0; flex: none; }
.tog .grow { flex: 1; } .tog .grow span { display: block; font-size: 12.5px; color: var(--muted); }
.linkrow { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.menu-list { list-style: none; padding: 0; margin: 0; }
.menu-list li + li { border-top: 1px solid var(--border); }
.menu-list li > button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: var(--text); font: inherit; font-size: 15.5px; font-weight: 600; text-align: left; padding: 13px 2px; cursor: pointer; }
.menu-list li > button:disabled { opacity: .4; }
.menu-list li > button svg { color: var(--accent); flex: none; width: 22px; height: 22px; }
.menu-list li > button.danger-text, .menu-list li > button.danger-text svg { color: var(--danger); }
.menu-list li > button span { flex: 1; } .menu-list small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.alt-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px 34px; }
.alt-chips button { border: 0; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font: inherit; font-weight: 700; font-size: 13px; padding: 6px 11px; cursor: pointer; }
/* monivalinta */
.pick-multi .sheet-list { padding-bottom: 8px; }
.pick-row .cb { width: 24px; height: 24px; flex: none !important; border-radius: 7px; border: 2px solid var(--border); display: grid; place-items: center; color: #fff; }
.pick-row .cb svg { width: 16px; height: 16px; }
.pick-row.on .cb { background: var(--accent); border-color: var(--accent); }
.pick-row .ord { color: var(--accent); font-size: 13px; }
.pick-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.pick-bar { display: flex; align-items: center; gap: 10px; padding: 10px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.pick-bar span { flex: 1; }
/* kirjaus */
.wo-r { gap: 10px; } .wo-r .mini-bar { flex: 1; margin: 0; }
.set-head, .set-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr) 48px; gap: 6px; align-items: center; }
.set-head { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; text-align: center; margin: 4px 0 2px; }
.set-head span:nth-child(2) { line-height: 1.1; overflow-wrap: anywhere; }
.set-wrap { position: relative; border-radius: 12px; margin: 5px 0; }
.set-wrap.swiping { background: var(--danger); }
.set-wrap.swiping::after { content: '🗑'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #fff; font-size: 18px; }
.set-row { position: relative; z-index: 1; background: var(--surface); touch-action: pan-y; }
.set-row .no { text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.set-row .prev { text-align: center; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-row input { text-align: center; font-size: 18px; font-weight: 700; padding: 9px 2px; min-height: 46px; font-variant-numeric: tabular-nums; }
.set-row input[readonly] { cursor: pointer; }
.set-row input.kp-on { border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.set-row .done-btn { width: 48px; height: 46px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.set-row .done-btn.on { background: var(--good); border-color: var(--good); color: #fff; }
.set-row.ss { grid-template-columns: 30px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .8fr) 46px; }
.set-row .ss-no { color: var(--violet); font-size: 12px; }
.ss-name { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-name small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.log-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.log-foot .link-btn { display: inline-flex; align-items: center; gap: 4px; } .log-foot .link-btn svg { width: 16px; height: 16px; }
.swapped { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--violet); background: var(--violet-soft); border-radius: 8px; padding: 4px 8px; }
.swapped svg { width: 16px; height: 16px; flex: none; }
.exnote { margin-top: 6px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: 13.5px; padding: 7px 10px; }
.log-ss { border-color: var(--violet) !important; }
.ss-head { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--violet); margin-bottom: 6px; }
.ss-member { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 0; } .ss-member > b { flex: 1; font-size: 15.5px; }
.ss-member > .small { width: 100%; order: 3; margin-top: -4px; } .ss-member .swapped, .ss-member .exnote { order: 4; width: 100%; }
.rnd { font-size: 11.5px; font-weight: 800; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin: 10px 0 0; }
.log-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius);
  padding: 11px 12px; margin-bottom: 8px; font: inherit; cursor: pointer; }
.log-row .st { width: 28px; height: 28px; flex: none; border-radius: 99px; background: var(--surface-2); display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.log-row.done .st { background: var(--good); color: #fff; } .log-row.done .st svg { width: 16px; height: 16px; }
.log-row .grow { flex: 1; min-width: 0; } .log-row .grow b { display: block; font-size: 15px; } .log-row .grow .small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row > svg { color: var(--muted); flex: none; width: 18px; height: 18px; }
.log-row.done { background: color-mix(in srgb, var(--good-soft) 40%, var(--surface)); }
.log-ex.log-block.log-ex-cur .bt-clock { font-size: 64px; }
.bt-bars { display: flex; gap: 3px; margin: 10px 0 2px; } .bt-bars i { flex: 1; height: 8px; border-radius: 4px; background: var(--border); }
.bt-bars i.d { background: var(--good); } .bt-bars i.n { background: var(--accent); }
.bt-next { font-size: 13.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
/* numeronäppäimistö */
body.kp-open main { padding-bottom: 330px; }
body.kp-open .rest-timer { display: none; }
.keypad { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface-2); border-top: 1px solid var(--border);
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0,0,0,.12); }
.keypad > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.kp-acc { display: grid; grid-template-columns: 1fr 1fr 1.6fr 1.2fr; gap: 6px; margin-bottom: 8px; }
.kp-acc button, .kp-keys button { border: 0; border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; box-shadow: 0 1px 0 var(--border); }
.kp-acc button { padding: 10px 4px; font-weight: 800; font-size: 15px; color: var(--accent); }
.kp-acc .kp-all { font-size: 13px; line-height: 1.15; } .kp-acc .kp-ok { background: var(--accent); color: var(--accent-ink); }
.kp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kp-keys button { padding: 12px 0; font-size: 22px; font-weight: 600; } .kp-keys button.g { background: transparent; box-shadow: none; } .kp-keys button:disabled { opacity: .3; }
.kp-keys button:active, .kp-acc button:active { filter: brightness(.92); }
/* lepoajastin */
.rest-timer { padding: 10px 10px 12px 16px; overflow: hidden; }
.rest-timer .time { flex: none; font-size: 28px; font-weight: 900; }
.rest-timer .rt-main b { display: block; font-size: 13px; }
.rest-timer button { padding: 7px 9px; border: 0; background: color-mix(in srgb, var(--bg) 18%, transparent); font-weight: 800; }
.rest-timer .rt-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; } .rest-timer .rt-bar i { display: block; height: 100%; background: #4ea1ff; transition: width .5s linear; }
.undo-toast { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; max-width: 560px; margin: 0 auto; background: var(--text); color: var(--bg);
  border-radius: 14px; padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-weight: 600; }
.undo-toast span { flex: 1; } .undo-toast button { border: 0; background: none; color: #8cc2ff; font: inherit; font-weight: 800; padding: 6px 8px; cursor: pointer; }
body.kp-open .undo-toast { bottom: 330px; }
.meta-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border); font-size: 15px; } .meta-row span { color: var(--muted); } .meta-row b { text-align: right; }
.warnbox { border-radius: 14px; background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); padding: 12px; }
.warnbox > b { display: block; color: var(--danger); margin-bottom: 4px; } .warnbox .r { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 3px 0; }
.fin-sum { background: var(--surface-2); border-radius: 14px; padding: 10px 4px; margin: 0 0 12px; }
.upd { border-radius: 14px; border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); background: var(--amber-soft); padding: 12px; }
.upd > b { display: block; font-size: 15px; } .upd > .small { display: block; margin-bottom: 4px; }
.upd-r { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--amber) 20%, transparent); font-size: 14px; cursor: pointer; }
.upd-r input { width: 22px; height: 22px; min-height: 0; flex: none; } .upd-r .grow { flex: 1; min-width: 0; } .upd-r small { display: block; color: var(--muted); font-size: 12.5px; }
.upd-r em { font-style: normal; font-weight: 800; color: var(--good); }
.nowrap { white-space: nowrap; }
.btn.link-like { border: 0; background: none; color: var(--accent); box-shadow: none; }
.set-wrap { overflow: hidden; }
.log-ex-cur, .log-row { scroll-margin-top: 120px; }
.rest-timer { flex-wrap: wrap; row-gap: 2px; }
.rest-timer .rt-note { order: 9; flex-basis: 100%; font-size: 13px; opacity: .8; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset; }
.rest-timer button { white-space: nowrap; }
.rest-timer { gap: 8px; }
.rest-timer .time { font-size: 26px; margin-right: 2px; }
.rest-timer .rt-main { min-width: 0; }
.rest-timer button { padding: 7px 8px; }
.draft-card .draft-open { color: inherit; text-decoration: none; display: block; }
.btn.link-like.danger-text { color: var(--danger); }

/* Historia: sali ja kestävyys väreillä eroteltuina */
:root { --hist-gym: var(--accent); --hist-cardio: var(--good); }
.hist-filter { display: flex; gap: 6px; margin: 0 0 6px; }
.hist-filter button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border-radius: 99px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.hist-filter button.on { background: var(--text); color: var(--bg); border-color: transparent; }
.dot { width: 10px; height: 10px; border-radius: 99px; display: inline-block; flex: none; }
.dot-gym { background: var(--hist-gym); } .dot-cardio { background: var(--hist-cardio); }
.hist-card { display: block; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; position: relative; padding-left: 16px; }
.hist-card::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; }
.hist-gym::before { background: var(--hist-gym); } .hist-cardio::before { background: var(--hist-cardio); }
.hist-card .card-title { gap: 8px; }
.hist-ic { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.hist-gym .hist-ic { background: var(--accent-soft); color: var(--hist-gym); }
.hist-ic svg { width: 19px; height: 19px; }
.hist-cardio .hist-sets b { font-weight: 700; }
.hist-card h3 { white-space: nowrap; }
.hist-card .card-title .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }

/* 3.5: nimimerkki */
.nick-field .nick-help { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.35; }
.nick-status { font-size: 13.5px; font-weight: 700; margin-top: 5px; min-height: 0; }
.nick-status.ok { color: var(--good); } .nick-status.bad { color: var(--danger); }
.nick-sugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.nick-sugg:empty { display: none; }
.nick-sugg button { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 5px 11px; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.nick-page { max-width: 460px; margin: 10px auto 0; text-align: center; }
.nick-page .nick-hero { font-size: 44px; } .nick-page h2 { margin: 6px 0 8px; font-size: 22px; text-transform: none; letter-spacing: 0; color: var(--text); }
.nick-page p { color: var(--text-2); } .nick-page form { text-align: left; }
.user-info h3 .link-btn { font-size: 13px; padding: 0 0 0 6px; vertical-align: 1px; }
.cardio-fields .uf-s { flex: .75; }
.cardio-fields .uf-s .uf-in input { padding-right: 34px; }

/* 3.5: tunnuksen vaihto */
.acc-switch { position: relative; overflow: visible !important; opacity: .85; }
.acc-switch img { border-radius: 50%; }
.acc-switch i { position: absolute; right: -4px; bottom: -4px; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-style: normal; font-size: 11px; line-height: 17px; text-align: center; border: 2px solid var(--bg); }
.acc-admin .topbar { box-shadow: inset 0 -3px 0 var(--amber); }
.acc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.acc-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.acc-row.cur { border-color: var(--accent); }
.acc-row .grow { flex: 1; min-width: 0; }
.acc-row .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-form h3 { margin: 4px 0 6px; }
.acc-btn { margin-top: 8px; }

/* 3.6: Treenaa-sivu */
.card.goal-mini { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; text-decoration: none; }
.goal-mini .grow { flex: 1; min-width: 0; display: block; }
.goal-mini .gm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.goal-mini .gm-top b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-mini .streak-tag { margin: 0; white-space: nowrap; flex: none; }
.goal-mini .gm-badge { display: block; font-size: 12.5px; color: var(--muted); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.d7 span { display: grid; place-items: center; height: 26px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); }
.d7 span.on { background: var(--good); color: #fff; }
.d7 span.t { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); background: var(--surface); }
.d7 span.on.t { background: var(--good); color: #fff; }
.qtiles { display: grid; gap: 8px; margin: 0 0 4px; }
.qtile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 10px 10px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; min-width: 0; }
.qtile .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--good-soft); color: var(--good); margin-bottom: 3px; }
.qtile.q-bw .ic { background: var(--violet-soft); color: var(--violet); }
.qtile.q-free .ic { background: var(--accent-soft); color: var(--accent); }
.qtile b { font-size: 14px; } .qtile .qok { color: var(--good); }
.qtile small { font-size: 11.5px; color: var(--muted); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.qtile:active { background: var(--surface-2); }
.now-card .row-link .t2 { font-size: 13px; color: var(--muted); font-weight: 400; }
.now-card .row-link > a.grow { color: inherit; text-decoration: none; min-width: 0; }
.now-card .row-link > a.grow > b, .now-card .row-link > a.grow .t2 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-card .row-link .grow > b { display: inline; }
.now-card .mini-bar i { background: var(--good); }
.now-card .ann-body { border-top: 1px solid var(--border); padding: 4px 14px; }
.mini-go { flex: none; font: inherit; font-weight: 800; font-size: 13.5px; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 99px; padding: 7px 13px; cursor: pointer; }
.more-link { color: var(--accent) !important; font-weight: 700; font-size: 14px; }
.more-link .chev { color: var(--accent) !important; }
.soft-nudge { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; margin-top: 14px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--border); font-size: 13.5px; color: var(--text-2); }
.soft-nudge a { flex: 1; color: inherit; text-decoration: none; } .soft-nudge b { color: var(--text); }
.soft-nudge .sn-ic { color: var(--violet); display: grid; }
.cardio-card.in-sheet { border: 0; padding: 0; margin: 0; background: none; box-shadow: none; }
.sheet-foot { text-align: center; margin: 12px 0 0; } .sheet-foot a { color: var(--accent); font-weight: 700; text-decoration: none; }
.bw-sheet .row { gap: 8px; align-items: center; }

/* 3.6: ryhmät */
.tabbar a { position: relative; }
.tbadge { position: absolute; top: 3px; left: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; border-radius: 99px;
  background: #eb6834; color: #fff; font-size: 10.5px; font-weight: 800; line-height: 14px; text-align: center; border: 2px solid var(--surface); }
.hscroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.ch-mini { flex: none; width: 212px; scroll-snap-align: start; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); padding: 11px 12px; color: inherit; text-decoration: none; display: block; }
.ch-mini .k { display: flex; gap: 5px; align-items: center; font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-mini .k svg { width: 13px; height: 13px; flex: none; }
.ch-mini b { display: block; font-size: 15px; margin: 3px 0 2px; line-height: 1.25; }
.ch-mini .n { display: block; font-size: 13px; color: var(--text-2); }
.ch-mini .mini-bar i { background: var(--good); }
.ch-mini .me { display: block; font-size: 12px; color: var(--good); font-weight: 700; margin-top: 5px; }
.row-link > a.grow { color: inherit; text-decoration: none; min-width: 0; }
.row-link > a.grow > b, .row-link > a.grow .t2 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-link > a.grow .t2 { font-size: 12.5px; color: var(--muted); }
.gcard { display: block; padding: 12px 14px; color: inherit; text-decoration: none; }
.gcard .gc-top { display: flex; align-items: center; gap: 8px; } .gcard .gc-top b { font-size: 16.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard .gc-top .chev { color: var(--muted); flex: none; }
.gc-new { flex: none; font-size: 12px; font-weight: 800; color: #fff; background: #eb6834; border-radius: 99px; padding: 2px 8px; }
.gcard .gc-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 13px; color: var(--muted); }
.gcard .gc-last { display: flex; align-items: center; gap: 7px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text-2); }
.gcard .gc-last > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard .gc-last b { color: var(--text); }
.av-stack { display: inline-flex; flex: none; } .av-stack .av { border: 2px solid var(--surface); margin-left: -8px; } .av-stack .av:first-child { margin-left: 0; }
.av-xs { width: 22px; height: 22px; font-size: 10px; }
.two-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; }
.two-btn .btn { justify-content: center; white-space: nowrap; }
.card.find-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-top: 10px; color: inherit; text-decoration: none; }
.find-card .grow { flex: 1; min-width: 0; } .find-card .grow span { display: block; }
.find-card > .chev { color: var(--muted); }
.ghead { padding: 14px; }
.ghead .gh-top { display: flex; align-items: center; gap: 10px; }
.ghead .gh-sub { font-size: 13px; color: var(--muted); line-height: 1.4; min-width: 0; }
.ghead .gh-acts { display: grid; grid-template-columns: 1.05fr 1fr 1.15fr; gap: 6px; margin-top: 12px; }
.ghead .gh-acts .btn { justify-content: center; gap: 5px; padding-left: 6px; padding-right: 6px; font-size: 14px; white-space: nowrap; }
.ghead .gh-acts .btn svg { width: 17px; height: 17px; flex: none; }
.pinned { margin: 0 0 12px; border-radius: 14px; background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); padding: 10px 12px; }
.pinned .pm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--amber); }
.pinned .pm svg { width: 14px; height: 14px; }
.pinned .pm .link-btn { margin-left: auto; font-size: 12.5px; } .pinned .pm .link-btn + .link-btn { margin-left: 8px; }
.pinned .pt { font-size: 14.5px; margin-top: 3px; white-space: pre-wrap; }
.pinned-empty { display: flex; align-items: center; gap: 8px; width: 100%; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; text-align: left; }
.gtabs { display: flex; gap: 5px; margin: 4px -16px 12px; padding: 8px 16px; position: sticky; top: calc(env(safe-area-inset-top) + 56px); z-index: 5; background: var(--bg); overflow-x: auto; scrollbar-width: none; }
.gtabs::-webkit-scrollbar { display: none; }
.gtabs button { flex: none; padding: 8px 11px; border-radius: 99px; font: inherit; font-weight: 700; font-size: 14px; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.gtabs button.on { background: var(--text); color: var(--bg); border-color: transparent; }
.gtabs button i { font-style: normal; font-weight: 800; margin-left: 5px; color: var(--muted); }
.gtabs button i.new { color: #eb6834; } .gtabs button.on i { color: color-mix(in srgb, var(--bg) 70%, transparent); } .gtabs button.on i.new { color: #ffb38a; }
.dayh { font-size: 12px; font-weight: 800; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; margin: 14px 2px 6px; }
#gtabBody > .dayh:first-child { margin-top: 0; }
.seen-line { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 800; color: #eb6834; margin: 2px 0; }
.seen-line::before, .seen-line::after { content: ""; flex: 1; height: 1px; background: #f4b894; }
.seen-line + .feed-row { border-top: 0; }
.invite-sheet { text-align: center; } .invite-sheet .invite-code { margin: 4px 0; }
.invite-sheet .two-btn { margin-top: 12px; }
.set-list { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.set-row-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; font: inherit; text-align: left; background: var(--surface); border: 0; color: inherit; cursor: pointer; }
.set-row-btn + .set-row-btn { border-top: 1px solid var(--border); }
.set-row-btn .grow { flex: 1; min-width: 0; } .set-row-btn .grow span { display: block; font-size: 13px; color: var(--muted); }
.set-row-btn .chev { color: var(--muted); }
.danger-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 16px; align-items: center; }
.danger-link { color: var(--danger) !important; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.danger-link svg { width: 16px; height: 16px; }

/* 3.7: palvelimen tila – virheet ja hitaus */
.ops-list { margin-top: 8px; }
.ops-row { padding: 8px 0; border-top: 1px solid var(--border); }
.ops-row.error b { color: var(--danger); } .ops-row.slow b { color: var(--amber); }
.ops-row .mono { word-break: break-all; }

/* ---------------------------------------------------------------- 3.9 */
/* painotavoite ja painoindeksi */
.wgoal .wg-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; text-align: center; }
.wgoal .wg-row span { display: block; font-size: 12px; color: var(--muted); }
.wgoal .wg-row b { font-size: 18px; }
.wg-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.wg-bar i { display: block; height: 100%; border-radius: 99px; background: var(--good); }
.wg-status { margin: 10px 0 4px; font-weight: 700; }
.wg-calm { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.bmi-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.bmi-top { display: flex; justify-content: space-between; align-items: baseline; }
.bmi-top b { font-size: 20px; }
.bmi-scale { position: relative; display: flex; height: 8px; border-radius: 99px; overflow: visible; margin: 8px 0 2px; }
.bmi-scale i { display: block; height: 100%; }
.bmi-scale i:nth-child(1) { background: color-mix(in srgb, var(--accent) 35%, var(--surface-2)); border-radius: 99px 0 0 99px; }
.bmi-scale i:nth-child(2) { background: color-mix(in srgb, var(--good) 45%, var(--surface-2)); }
.bmi-scale i:nth-child(3) { background: color-mix(in srgb, var(--amber) 40%, var(--surface-2)); }
.bmi-scale i:nth-child(4) { background: color-mix(in srgb, var(--amber) 70%, var(--surface-2)); border-radius: 0 99px 99px 0; }
.bmi-scale span { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 3px; background: var(--text); }
.bmi-axis { position: relative; height: 14px; font-size: 11px; color: var(--muted); }
.bmi-axis span { position: absolute; transform: translateX(-50%); }
.bmi-axis span:nth-child(1) { left: 14%; } .bmi-axis span:nth-child(2) { left: 40%; } .bmi-axis span:nth-child(3) { left: 60%; }
.wg-line { margin: 6px 0 0; }
.wg-set { margin: 10px -16px -16px; border-top: 1px solid var(--border); }
/* aloitusopas */
.onb-opts.two { grid-template-columns: 1fr 1fr; }
.onb-bw { margin-top: 12px; }
.onb-sp { grid-template-columns: repeat(3, 1fr); }
.onb-sp .sp-tile { font: inherit; cursor: pointer; }
.onb-sp .sp-tile.on { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); padding: 8px 0 6px; }
.onb-sp .sp-tile.on b { color: var(--accent); }
.onb-sp .sp-tile.on .sp-ck { display: grid; }
.onb-push { display: flex; gap: 12px; align-items: flex-start; }
.onb-push-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
/* palaute ja ominaisuudet */
.fb-shot { cursor: pointer; }
.fb-prev { display: block; max-width: 100%; max-height: 220px; margin: 10px auto 0; border-radius: 10px; border: 1px solid var(--border); }
.fb-item.done { opacity: .62; }
.fb-text { white-space: pre-wrap; margin: 6px 0 8px; }
.fb-img img { display: block; max-width: 100%; border-radius: 10px; margin-top: 8px; border: 1px solid var(--border); }
.feat-seg { margin-top: 4px; }
/* Top 10: ilmoitettu tulos */
.rep-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; border-radius: 99px; padding: 0 6px; background: var(--amber-soft); color: var(--amber); vertical-align: 1px; }
.pd .rep-tag { margin-top: 2px; }
.rank-row .rm-rec { margin-left: 4px; color: var(--danger); }
/* valmennus */
.tag-sched { font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 2px 8px; background: var(--violet-soft); color: var(--violet); white-space: nowrap; }
.sched-card { display: flex; gap: 10px; align-items: center; border: 1px dashed var(--violet); }
.sched-card .grow > * { display: block; }
.sched-card .eyebrow { font-size: 11px; font-weight: 800; color: var(--violet); letter-spacing: .06em; }

/* ---------------------------------------------------------------- 4.0 */
.days { display: flex; gap: 6px; margin: 0 -16px 12px; padding: 2px 16px; overflow: hidden; }
.days span { flex: none; width: 46px; text-align: center; padding: 7px 0 6px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; font-weight: 700; color: var(--text-2); }
.days span b { display: block; font-size: 17px; color: var(--text); }
.days span.on { background: var(--accent); border-color: transparent; color: #dbe9fb; } .days span.on b { color: #fff; }
.days span.has::after { content: ""; display: block; width: 5px; height: 5px; border-radius: 9px; background: var(--good); margin: 3px auto 0; }
.days span.on.has::after { background: #fff; }
.daylbl { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 2px 8px; } .daylbl b { font-size: 17px; } .daylbl span { font-size: 12.5px; color: var(--muted); }
.cls { padding: 12px 14px; display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; }
.cls + .cls { margin-top: 8px; }
.cls .tm { text-align: center; } .cls .tm b { display: block; font-size: 17px; } .cls .tm span { font-size: 11.5px; color: var(--muted); }
.cls .info b { display: block; font-size: 15.5px; } .cls .info .sub { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-top: 2px; flex-wrap: wrap; }
.cls .info .sub span { display: inline-flex; gap: 3px; align-items: center; }
.fill { height: 5px; border-radius: 9px; background: var(--surface-2); margin-top: 7px; overflow: hidden; } .fill i { display: block; height: 100%; background: var(--good); border-radius: 9px; }
.fill.full i { background: #eb6834; }
.cls .act { font: inherit; font-weight: 800; font-size: 14px; border-radius: 99px; padding: 8px 14px; border: 0; white-space: nowrap; }
.act.book { background: var(--accent); color: #fff; } .act.queue { background: var(--amber-soft); color: var(--amber); } .act.mine { background: var(--good-soft); color: var(--good); }
.act.ghost { background: var(--surface-2); color: var(--muted); }
.cls.booked { border: 2px solid var(--good); padding: 11px 13px; }
.cls .note { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border-radius: 9px; padding: 6px 9px; display: flex; gap: 6px; align-items: center; margin-top: 2px; }
.cls.dimmed { opacity: .55; }
.pill2 { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 2px 8px; }
.p-good { background: var(--good-soft); color: var(--good); } .p-amber { background: var(--amber-soft); color: var(--amber); } .p-red { background: #fdecec; color: #b42323; } .p-blue { background: var(--accent-soft); color: var(--accent); } .p-grey { background: var(--surface-2); color: var(--muted); } .p-violet { background: var(--violet-soft); color: var(--violet); }
.kv { list-style: none; padding: 0; margin: 4px 0 0; } .kv li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14.5px; }
.kv li:first-child { border-top: 0; } .kv li span { color: var(--muted); } .kv li b { text-align: right; }
.desc { font-size: 14px; color: var(--text-2); margin: 6px 0 4px; line-height: 1.45; }
.lockline { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.btnrow .btn, .bigbtn { justify-content: center; gap: 6px; white-space: nowrap; }
.bigbtn { width: 100%; margin-top: 12px; }
.countdown { text-align: center; padding: 8px 0 2px; } .countdown b { font-size: 34px; font-variant-numeric: tabular-nums; display: block; } .countdown span { font-size: 13px; color: var(--muted); }
.task { border: 2px solid var(--accent); }
.task .k { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--accent); text-transform: uppercase; }
.task h3 { margin: 4px 0 2px; font-size: 19px; }
.checkin { display: flex; align-items: center; gap: 10px; background: var(--good-soft); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.checkin .grow { flex: 1; } .checkin b { color: var(--good); display: block; } .checkin span { font-size: 12.5px; color: var(--text-2); }
.checkin .qrbtn { color: #fff; font-size: 14px; }
.qrbtn { display: inline-flex; gap: 6px; align-items: center; background: var(--good); color: #fff; border-radius: 99px; padding: 8px 13px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.today { padding: 0; overflow: hidden; }
.trow { display: grid; grid-template-columns: 48px 1fr 70px; gap: 10px; align-items: center; padding: 10px 14px; }
.trow + .trow { border-top: 1px solid var(--border); }
.trow .t { font-weight: 800; font-size: 15px; } .trow .n b { display: block; font-size: 14.5px; } .trow .n span { font-size: 12px; color: var(--muted); }
.trow .r { text-align: right; font-size: 13px; font-weight: 800; } .trow .r small { display: block; font-weight: 600; color: var(--muted); font-size: 11.5px; }
.cnt-badge { min-width: 22px; height: 22px; border-radius: 99px; background: #c93a39; color: #fff; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; padding: 0 6px; }
.cnt-badge.amber { background: #e0892b; }
.seg2 { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; margin: 6px 0 10px; }
.seg2 span { flex: 1; text-align: center; padding: 8px 0; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--text-2); } .seg2 span.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.fld { margin: 8px 0; } .fld > span { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 4px; }
.inp { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 15px; background: var(--surface); display: flex; justify-content: space-between; align-items: center; }
.inp.ph { color: var(--muted); }
.two2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; } .wd span { text-align: center; padding: 8px 0; border-radius: 9px; border: 1px solid var(--border); font-weight: 700; font-size: 13px; }
.wd span.on { background: var(--accent); color: #fff; border-color: transparent; }
.memb { padding: 14px; }
.punch { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 12px 0 4px; } .punch i { height: 22px; border-radius: 6px; background: var(--good); } .punch i.u { background: var(--surface-2); border: 1px solid var(--border); position: relative; } .punch i.u::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--muted); font-style: normal; }
.hist { list-style: none; margin: 0; padding: 0; } .hist li { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; align-items: center; } .hist li:first-child { border-top: 0; }
.hist li .grow { flex: 1; } .hist li .grow span { display: block; font-size: 12px; color: var(--muted); } .hist li .amt { font-weight: 800; }
.amt.minus { color: var(--danger); } .amt.plus { color: var(--good); }
.req { display: flex; gap: 10px; align-items: center; padding: 11px 14px; } .req + .req { border-top: 1px solid var(--border); }
.req .grow { flex: 1; min-width: 0; } .req .grow b { display: block; } .req .grow span { font-size: 12.5px; color: var(--muted); }
.ib { width: 38px; height: 38px; border-radius: 99px; display: grid; place-items: center; border: 0; }
.ib.ok { background: var(--good); color: #fff; } .ib.no { background: var(--surface-2); color: var(--muted); }
.att { display: flex; align-items: center; gap: 10px; padding: 9px 14px; } .att + .att { border-top: 1px solid var(--border); }
.att .grow { flex: 1; min-width: 0; } .att .grow b { display: block; font-size: 15px; } .att .grow span { font-size: 12px; color: var(--muted); }

/* 4.0: vuorot, jäsenyydet, valmentaja, perehdytys ja chat (lähtökohtana havainnekuvat 3–5) */
.days { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.days::-webkit-scrollbar { display: none; }
.days span { cursor: pointer; user-select: none; }
.cls { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; margin: 0; }
.cls + .cls, .cls-day-lbl + .cls { margin-top: 8px; }
.cls .info { min-width: 0; }
.cls .note svg { flex: none; }
.cls-day-lbl { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 14px 2px 6px; }
.cls-day-lbl.today { color: var(--accent); }
.cls-none { margin: 0 2px 4px; }
.cls-member { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.cls-rules { margin: 8px 2px 0; line-height: 1.5; }
.cls-prog { margin: 6px 0 2px; padding-left: 18px; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.cls-prog-card { margin: 8px 0; }
.cls-row { margin-top: 12px; }
.cls-offer { border-color: var(--amber); }
.cls-offer .k { color: var(--amber); }
.task .row .link-btn { padding: 4px 0; }
.checkin.miss { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.checkin.miss b { color: var(--danger); }
.qrbtn { border: 0; cursor: pointer; }
.coach-today .list-card { margin: 8px 0 0; box-shadow: none; }
.ct-t { min-width: 46px; font-size: 15px; }
.p-blue { background: var(--accent-soft); color: var(--accent); }
.p-red { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.ico-blue { background: var(--accent-soft); color: var(--accent); }
.cls-head .m3, .qr-screen .m3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; margin: 10px 0 4px; }
.cls-head .m3 div, .qr-screen .m3 div { background: var(--surface-2); border-radius: 12px; padding: 8px 4px; font-size: 12px; color: var(--muted); }
.cls-head .m3 b, .qr-screen .m3 b { display: block; font-size: 20px; color: var(--text); }
.btnrow .btn { display: inline-flex; align-items: center; }
.att .av-wrap { flex: none; }
.att .grow > b { display: block; }
.att .grow > span { display: block; }
.att .rn { color: var(--text-2); font-weight: 700; }
.att .ib { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: #b9b8b2; cursor: pointer; flex: none; }
.att .ib.on.att-present { background: var(--good); color: #fff; border-color: transparent; }
.att .ib.on.att-late { background: #e0892b; color: #fff; border-color: transparent; }
.att .ib.on.att-absent { background: var(--danger); color: #fff; border-color: transparent; }
.att .ib svg { width: 16px; height: 16px; }
.ib { cursor: pointer; flex: none; }
.req .req-msg { display: block; font-style: italic; color: var(--text-2); margin-top: 2px; }
.qr-screen { text-align: center; padding: 6px 0; }
.qr-big { display: grid; place-items: center; margin: 0 auto 14px; width: min(78vw, 300px); aspect-ratio: 1; background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.qr-big svg { width: 100%; height: 100%; }
.prog-period { align-items: center; }
.prog-period.active { box-shadow: inset 4px 0 0 var(--good); }
.prog-period.scheduled { box-shadow: inset 4px 0 0 var(--violet); }
.prog-period.past { opacity: .7; }
.acls.cancelled .grow b { text-decoration: line-through; color: var(--muted); }
.acnt { font-weight: 800; font-size: 14px; margin-right: 4px; white-space: nowrap; }
.acnt small { color: var(--amber); margin-left: 3px; font-size: 12px; }
.acnt.full { color: #c2551f; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 10px 2px 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.today .trow { color: inherit; text-decoration: none; }
.trow.now { background: var(--accent-soft); }
.trow .r.full { color: #c2551f; }
.kpis-2 { grid-template-columns: 1fr 1fr; }
.tour-card { border: 2px solid var(--accent); }
.tour-card .list-card { box-shadow: none; margin: 8px -16px 0; border-radius: 0; }
.tour-card .row-link.done b { color: var(--muted); text-decoration: line-through; }
.tour-n { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px; flex: none; }
.row-link.done .tour-n { background: var(--good); color: #fff; }
.tour-n svg { width: 14px; height: 14px; }
.seg2 span { cursor: pointer; user-select: none; }
.wd span { cursor: pointer; user-select: none; }
.desc { white-space: pre-wrap; }
.act.ghost { background: var(--surface-2); color: var(--muted); }
.memb .btnrow { margin-top: 10px; }
/* chat */
.chat-log { display: flex; flex-direction: column; gap: 8px; padding-bottom: 86px; }
.msg { max-width: 82%; align-self: flex-start; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg .bubble { display: inline-block; text-align: left; padding: 9px 12px; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.msg.mine .bubble { background: var(--accent); color: #fff; border-color: transparent; border-radius: 16px 16px 4px 16px; }
.msg.removed .bubble { color: var(--muted); background: var(--surface-2); }
.msg .meta { font-size: 11.5px; color: var(--muted); margin: 3px 4px 0; }
.msg .meta .link-btn { font-size: 11.5px; padding: 0; }
.chat-form { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); display: flex; gap: 8px; padding: 8px 12px; background: var(--bg); border-top: 1px solid var(--border); z-index: 15; max-width: 640px; margin: 0 auto; }
.chat-form textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; border-radius: 21px; padding: 10px 14px; }
.chat-form .btn { border-radius: 21px; }
.card.cls { display: grid; }
.cls .info, .cls .tm { display: block; }
.cls .fill { display: block; }
.cls .act { display: inline-block; }
.att .grow span b.rn { display: inline; }

/* 4.1: Top 10 -sarja (sukupuoli) asetuksissa */
.gender-set{display:grid;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid var(--border)}
.gender-set .seg{margin:0}

/* 4.2: kaksivaiheinen tunnistus, pääsyloki, valmentajan palaute, kalenteri ja poissaolosääntö */
.backup-codes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.backup-codes code{display:block;text-align:center;font:600 17px/1.2 ui-monospace,Menlo,Consolas,monospace;letter-spacing:1px;padding:10px 6px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}
.mfa-qr{max-width:220px;margin:8px auto}
.mfa-qr svg{width:100%;height:auto;display:block;background:#fff;border-radius:10px}
.mfa-secret{text-align:center;font:600 16px/1.4 ui-monospace,Menlo,Consolas,monospace;letter-spacing:1px;word-break:break-all;margin:2px 0 6px}
.steps-list{margin:0 0 8px;padding-left:20px}
.steps-list li{margin:4px 0}
.fb-card{border-left:4px solid var(--accent)}
.fb-head{font-size:14px}
.fb-text{margin:6px 0 0;white-space:pre-wrap}
.cl-w{margin-bottom:10px}
.cl-w>.card{margin-bottom:6px}
.cl-fb{display:grid;gap:6px;justify-items:start;margin:0 2px 4px}
.cl-fb .fb-card{width:100%;margin:0}
.gm-list{max-height:40vh;overflow:auto}
.gm-list .row-link{gap:10px}
.noshow-row{display:grid;grid-template-columns:1fr;gap:6px;margin-top:6px}
.noshow-row select{width:100%;min-width:0}
.outbox-card{display:block;width:100%;text-align:left;cursor:pointer}
.cal-card .row{align-items:flex-start}
.al-row{cursor:default}
.mfa-nudge{display:block;text-decoration:none;color:inherit}
.rep-dates{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rep-dates .field{margin:0;min-width:0}
.rep-dates input{width:100%;min-width:0;box-sizing:border-box}

/* ------------------------------------------------------------------ 4.3: salin ja valmentajan työtilat */
.gh-tabs { display: flex; }
.gh-tabs a { flex: 1; text-align: center; white-space: nowrap; color: var(--text-2); font-size: 13.5px; font-weight: 700; padding: 7px 4px; border-radius: 8px; text-decoration: none; }
.gh-tabs a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.gh-row .grow { min-width: 0; }
.gh-row .t2 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.gh-row { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.gh-saved { display: flex; gap: 6px; align-items: center; justify-content: center; color: var(--good); font-weight: 700; margin: 10px 0 4px; }
.gh-saved svg { width: 16px; height: 16px; }
.gym-head .grow { min-width: 0; flex: 1; }
.gs-sheet .field { margin-bottom: 10px; }
/* + Uusi */
.staff-fab { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; gap: 6px; align-items: center;
  border: 0; border-radius: 99px; padding: 12px 18px 12px 14px; background: var(--accent); color: #fff; font: inherit; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 18px rgba(0,0,0,.22); cursor: pointer; }
.staff-fab[hidden] { display: none; }
body.no-tabs .staff-fab { display: none; }
.new-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.new-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; border-radius: 14px; border: 0; background: var(--surface-2);
  color: var(--text); font: inherit; font-weight: 700; font-size: 13px; text-align: center; cursor: pointer; }
.new-tile .ico { width: 40px; height: 40px; border-radius: 12px; }
/* ohjelmat */
.prog-card { display: block; color: inherit; text-decoration: none; }
.prog-card .card-title h3 { margin: 0; font-size: 15.5px; }
.prog-card .tags { display: flex; flex-wrap: wrap; gap: 5px; }
.prog-card .pill2 svg, .msg-row .pill2 svg { width: 13px; height: 13px; }
.act-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 12px; }
.act-row .act { display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; font-size: 12px; font-weight: 700; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 9px 2px; text-align: center; text-decoration: none; cursor: pointer; }
.act-row .act svg { color: var(--accent); width: 20px; height: 20px; }
.check-list { margin: 4px 0 10px; }
.check-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14.5px; cursor: pointer; }
.check-row:first-child { border-top: 0; }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.pcal { overflow: hidden; }
.pcal-row { display: grid; grid-template-columns: 84px 1fr; gap: 6px; align-items: center; margin-top: 6px; }
.pcal-head { margin-top: 0; } .pcal-head span { text-align: center; font-weight: 800; }
.pcal-name { line-height: 1.2; min-width: 0; } .pcal-name b { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcal-name .small { font-size: 11px; }
.pcal-cells { display: grid; gap: 3px; }
.pc { display: block; min-height: 24px; border-radius: 7px; padding: 4px 6px; font-size: 11px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 0; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-family: inherit; text-align: left; }
.pc1 { background: var(--violet-soft); color: var(--violet); border-color: var(--violet); }
.pc2 { background: var(--good-soft); color: var(--good); border-color: var(--good); }
.pc3 { background: var(--amber-soft); color: var(--amber); border-color: var(--amber); }
.pc4 { background: #fde9f1; color: #b0306a; border-color: #d24b8a; }
.pc5 { background: var(--surface-2); color: var(--text-2); border-color: var(--text-2); }
.pc-none { background: transparent; border: 0; }
.pc-miss { background: transparent; color: var(--danger); border: 1.5px dashed var(--danger); text-align: center; cursor: pointer; }
span.pc-miss { cursor: default; }
.pcal-legend { display: flex; gap: 12px; margin-top: 10px; } .pcal-legend i { display: inline-block; width: 14px; min-height: 10px; padding: 0; vertical-align: middle; margin-right: 4px; }
/* viestit */
.msg-row { display: block; padding: 11px 14px; }
.msg-row + .msg-row { border-top: 1px solid var(--border); }
.msg-row .card-title { margin: 0; gap: 8px; } .msg-row .card-title b { font-size: 14.5px; }
.msg-text { font-size: 14px; margin: 4px 0 6px; white-space: pre-line; overflow-wrap: anywhere; }
.msg-row .tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.msg-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#cmpText, #cmText { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px;
  background: var(--surface); color: var(--text); resize: vertical; }
.tpl-chips { margin-top: 8px; }
.tpl-chips button { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.cmp-sum { display: flex; gap: 8px; align-items: center; margin: 12px 0; background: var(--surface-2); box-shadow: none; }
.cmp-sum svg { width: 16px; height: 16px; flex: none; }
.seg2 span { cursor: pointer; } .seg2 span.off { opacity: .45; }
/* jäsenlista: monivalinta */
.sel-row { cursor: pointer; }
.sel-cb { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin-left: 8px; }
.sel-bar { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 20; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: #16181c; color: #fff; border-radius: 16px; padding: 10px 12px; margin-top: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.sel-bar[hidden] { display: none; }
.sel-bar b { flex: 1; } .sel-bar .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.ureq { margin-bottom: 10px; }
/* valmentajan jono */
.cq-head { border: 2px solid var(--accent); }
.cq-head .eyebrow { color: var(--accent); display: block; }
.cq-n { display: block; font-size: 20px; margin: 2px 0; }
.cq-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; }
.cq-item + .cq-item { border-top: 1px solid var(--border); }
.cq-item .grow { flex: 1; min-width: 0; }
.cq-sum { background: var(--surface-2); border-radius: 10px; padding: 7px 10px; margin-top: 8px; color: var(--text-2); }
.cq-acts { margin-top: 8px; gap: 6px; }
.cq-acts svg { width: 15px; height: 15px; }
/* kisasimulaatio */
.bl-nokg { width: 64px; flex: none; text-align: center; color: var(--muted); }
.bl-sets { width: 136px; flex: none; text-align: right; }
.wb-items { margin: 6px 0 4px; font-size: 13.5px; }
.wb-items td:first-child { width: 22px; text-align: right; }
.log-block-edit .card-title h3 { margin: 0; }
.log-block-edit .block-log-items { display: flex; flex-direction: column; gap: 6px; }
body.has-fab #view { padding-bottom: 72px; }
.msg-row .link-btn { font-size: 13px; margin-left: auto; }
.pcal-row { grid-template-columns: 92px 1fr; }
.pc-miss { padding: 4px 0; }
.btnrow:has(> :nth-child(3)) { grid-template-columns: repeat(3, 1fr); }
.btnrow .btn { min-width: 0; padding-left: 8px; padding-right: 8px; }
.btnrow .btn svg { flex: none; }
.bl-item input[data-bif="reps"], .bl-item input[data-ebi$=":reps"] { width: 78px; }
.bl-item input[data-bif="weight"], .bl-item input[data-ebi$=":weight"] { width: 58px; }
.bl-item .bl-nokg { width: 58px; }
.bl-item { gap: 5px; }
.wb-items td { text-align: left; padding: 5px 4px; }
.wb-items td:nth-child(3), .wb-items td:nth-child(4) { white-space: nowrap; text-align: right; }
