/* Strikers Strength — dark red / white / black theme (mobile-first) */
:root {
  --bg: #101012;
  --card: #1b1b1e;
  --card-2: #222226;
  --line: #333338;
  --ink: #f4f4f5;
  --muted: #a1a1aa;
  --red: #dc2626;
  --red-bright: #ef4444;
  --red-deep: #7f1d1d;
  --red-soft: rgba(220, 38, 38, .16);
  --white: #ffffff;
  --green: #4ade80;
  --amber: #fbbf24;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
.wrap { max-width: 760px; margin: 0 auto; padding-left: 14px; padding-right: 14px; }
a { color: var(--red-bright); }

/* ---------- Acknowledgment gate ---------- */
.gate { position: fixed; inset: 0; z-index: 999; background: rgba(5, 5, 7, .92); overflow: auto; padding: 24px 14px; display: flex; align-items: flex-start; justify-content: center; }
.gate[hidden] { display: none; }
.gate-card { background: var(--card); border: 1px solid var(--red-deep); border-top: 6px solid var(--red); border-radius: var(--radius); max-width: 620px; padding: 22px 20px 18px; margin: auto; }
.gate-card h2 { margin: 0 0 10px; font-size: 1.35rem; }
.gate-card p { font-size: .93rem; margin: 8px 0; }
.gate-card ul { margin: 8px 0; padding-left: 20px; font-size: .9rem; }
.gate-card li { margin: 6px 0; }
.gate-check { display: flex; gap: 10px; align-items: flex-start; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 14px 0; font-size: .9rem; cursor: pointer; }
.gate-check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--red); flex: 0 0 auto; }
.btn-primary {
  width: 100%; border: 0; border-radius: 10px; background: var(--red); color: #fff;
  font-size: 1.05rem; font-weight: 800; padding: 14px; cursor: pointer; min-height: 48px;
}
.btn-primary:disabled { background: #3a3a3e; color: #77777e; cursor: not-allowed; }
.btn-primary:not(:disabled):active { background: var(--red-bright); }
.btn-ghost { width: 100%; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 10px; font-size: .95rem; font-weight: 700; padding: 12px; margin-top: 10px; cursor: pointer; min-height: 44px; }
.btn-ghost:active { color: var(--ink); border-color: var(--muted); }
.gate-note { color: var(--muted); font-size: .78rem; }
.ob-input { width: 100%; font-size: 16px; padding: 13px 12px; border-radius: 10px; border: 1px solid var(--line); background: #141416; color: var(--ink); }
.ob-input:focus { outline: 2px solid var(--red); border-color: transparent; }
.ob-names { display: flex; gap: 10px; margin: 12px 0 2px; }
.ob-names .ob-input:first-child { flex: 1; }
.ob-names .ob-last { width: 64px; text-align: center; text-transform: uppercase; font-weight: 800; }
.ob-err { color: #fca5a5; font-size: .85rem; margin: 8px 0 0; }
#ob-netnote { background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .35); color: #fde68a; border-radius: 10px; padding: 9px 11px; font-size: .8rem; margin-top: 12px; }
body.blurred #workout-root, body.blurred .sticky-top, body.blurred .tab-bar, body.blurred .site-footer { filter: blur(7px); pointer-events: none; user-select: none; }

/* ---------- Header ---------- */
.site-header { background: linear-gradient(135deg, #000 0%, #2b0707 70%, var(--red-deep) 100%); border-bottom: 2px solid var(--red); padding: 18px 0 16px; }
.site-header h1 { margin: 0; font-size: 1.5rem; letter-spacing: .3px; color: var(--white); }
.site-header .tagline { margin: 5px 0 0; font-size: .88rem; opacity: .85; color: #e9d5d5; }
.whoami { margin: 8px 0 0; font-size: .8rem; color: #f1d7d7; }
.linklike { all: unset; cursor: pointer; color: #fff; text-decoration: underline; font-weight: 700; }
.sync-pill { flex: 0 0 auto; font-size: .68rem; font-weight: 800; color: #fde68a; background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .3); padding: 5px 8px; border-radius: 999px; white-space: nowrap; }
.whoami .sync-pill { display: inline-block; }

/* ---------- Sticky bar ---------- */
.sticky-top { position: sticky; top: 0; z-index: 30; background: #141416; border-bottom: 1px solid var(--line); }
.date-row { display: flex; align-items: center; gap: 6px; padding-top: 8px; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 22px; line-height: 1; color: var(--white); cursor: pointer; flex: 0 0 auto; }
.icon-btn:active { background: var(--card-2); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.date-pick { position: relative; flex: 1 1 auto; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 1rem; font-weight: 600; color: var(--ink); cursor: pointer; padding: 0 10px; display: flex; align-items: center; justify-content: center; }
.date-pick input[type="date"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; color-scheme: dark; }
.day-progress { flex: 0 0 auto; font-size: .8rem; font-weight: 700; color: #fecaca; background: var(--red-soft); border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.day-progress.none { color: var(--muted); background: var(--card-2); }

/* Desktop tab strip (hidden on phones; bottom bar covers mobile) */
.big-tabs { display: none; gap: 8px; padding-top: 10px; padding-bottom: 12px; }
.big-tabs button {
  flex: 1; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 12px; padding: 12px 8px; font-size: 1rem; font-weight: 800; cursor: pointer;
}
.big-tabs button.on { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 16px rgba(220,38,38,.35); }

/* ---------- Day intro & info cards ---------- */
.day-intro { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 14px 0 4px; }
.day-intro h2 { margin: 0 0 2px; font-size: 1.2rem; }
.day-intro p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.rest-note { display: inline-block; margin-top: 8px; background: var(--red-soft); color: #fca5a5; font-weight: 700; font-size: .8rem; border-radius: 8px; padding: 5px 10px; }
details.fold { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); }
details.fold summary { cursor: pointer; font-weight: 700; font-size: .9rem; padding: 10px 12px; color: var(--ink); }
details.fold summary::marker { color: var(--red-bright); }
details.fold .fold-body { padding: 0 12px 12px; }
details.fold ul, details.fold ol { margin: 0; padding-left: 20px; font-size: .86rem; }
details.fold li { margin: 4px 0; }
.wm-h { margin: 10px 0 2px; font-size: .76rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 800; }
.wm-hint { margin: 0 0 6px; font-size: .8rem; line-height: 1.45; color: var(--muted); }

/* Warm-up card (always expanded) */
.warmup-card { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); padding: 4px 12px 12px; }
.wu-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.wu-title { margin: 10px 0 2px; font-size: 1rem; }
.wu-top .linklike { font-size: .76rem; color: #fca5a5; }
.wu-note { margin: 2px 0 8px; font-size: .76rem; color: var(--muted); }
.wm-tag { float: right; font-weight: 600; font-size: .68rem; color: var(--muted); text-transform: none; letter-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
label.wu-item { cursor: pointer; }
.wu-pick { width: 20px; height: 20px; accent-color: var(--red); flex: 0 0 auto; }
.wu-box { width: 20px; flex: 0 0 auto; text-align: center; }
.wu-box::before { content: "•"; color: var(--muted); }
.wu-item { display: flex; align-items: center; gap: 8px; border-top: 1px solid #2c2c31; padding: 7px 0; }
.wu-item:first-child { border-top: 0; }
.wu-item .wu-n { flex: 1; font-size: .88rem; }
.wu-item .wu-x { color: var(--muted); font-size: .78rem; }
.demo-btn { all: unset; cursor: pointer; font-size: .76rem; font-weight: 800; color: #fff; background: var(--red-deep); padding: 6px 10px; border-radius: 8px; }
.demo-btn:active { background: var(--red); }

/* Info / hack / RPE cards at top */
.info-card { background: linear-gradient(135deg, var(--card), #241214); border: 1px solid var(--red-deep); border-radius: var(--radius); padding: 14px; margin: 12px 0; }
.info-card h3 { margin: 0 0 6px; font-size: 1rem; }
.info-card p { margin: 6px 0; font-size: .88rem; color: #d6c8c8; }
.info-card .howto { margin: 6px 0 2px; padding-left: 20px; font-size: .86rem; }
.info-card .howto li { margin: 5px 0; }
.rpe-list-inline { list-style: none; margin: 6px 0 4px; padding: 0; }
.rpe-list-inline li { display: flex; gap: 8px; align-items: baseline; margin: 4px 0; }
.rpe-list-inline b { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; text-align: center; line-height: 22px; font-size: .78rem; }
.rpe-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 10px 0 6px; }
.rpe-scale span { text-align: center; font-size: .72rem; font-weight: 800; padding: 6px 0; border-radius: 6px; background: var(--card-2); color: var(--muted); }
.rpe-scale span.hot { background: var(--red-deep); color: #fff; }
@media (max-width: 480px) {
  .sync-pill:not([hidden]) ~ .day-progress { display: none; }
}

/* ---------- Supersets & exercises ---------- */
.group-h { display: flex; align-items: baseline; gap: 8px; margin: 22px 2px 8px; }
.group-h .tag { background: var(--red); color: #fff; font-weight: 800; font-size: .75rem; border-radius: 6px; padding: 3px 8px; letter-spacing: .4px; }
.group-h .name { font-weight: 800; font-size: .95rem; }
.group-h .sub { color: var(--muted); font-size: .78rem; }

.ex { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.ex.done { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.ex-head { display: flex; align-items: flex-start; gap: 8px; }
.ex-title { margin: 0; font-size: 1.02rem; font-weight: 800; flex: 1; }
.ex-title .variant { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); }
.warn { display: inline-block; margin-top: 4px; font-size: .72rem; font-weight: 800; color: var(--amber); background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .35); border-radius: 6px; padding: 2px 7px; cursor: pointer; }
.ex-check { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; font-weight: 900; }
.ex.done .ex-check { background: var(--red); border-color: var(--red); }
.reps-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: .78rem; font-weight: 700; color: #fecaca; background: var(--red-soft); border-radius: 8px; padding: 4px 9px; }
.chip small { color: var(--red-bright); font-weight: 800; }

/* per-exercise level toggle */
.ex .segmented { margin-top: 10px; width: 100%; display: inline-flex; background: var(--card-2); border-radius: 999px; padding: 3px; }
.ex .segmented button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 7px 10px; font-size: .86rem; font-weight: 700; color: var(--muted); cursor: pointer; min-height: 34px; }
.ex .segmented button.on { background: var(--red); color: #fff; }

/* Video */
.video-box { margin-top: 10px; border-radius: 10px; overflow: hidden; background: #000; }
.video-box .thumb { all: unset; display: block; width: 100%; cursor: pointer; position: relative; }
.video-box .thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-box .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(0,0,0,.35); color: #fff; font-weight: 800; font-size: .95rem; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.video-box .play::before { content: "▶"; width: 52px; height: 52px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; font-size: 20px; padding-left: 4px; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-meta { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px 8px; background: #0c0c0e; color: #b9b3b3; font-size: .74rem; }
.video-meta a { color: #e5e7eb; text-decoration: none; font-weight: 700; }
.variant-pill { margin-top: 8px; font-size: .76rem; color: #fecaca; background: var(--red-soft); border-radius: 8px; padding: 5px 9px; display: inline-block; }

/* Log form */
.log { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.log-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.log-h .t { font-size: .8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.log-h .clear { all: unset; cursor: pointer; font-size: .76rem; font-weight: 700; color: var(--red-bright); padding: 6px 8px; }
.saved-flag { font-size: .72rem; color: var(--green); font-weight: 800; opacity: 0; transition: opacity .25s; }
.saved-flag.on { opacity: 1; }
table.log-table { width: 100%; border-collapse: collapse; }
.log-table th { font-size: .72rem; color: var(--muted); text-align: left; font-weight: 700; padding: 2px 4px; }
.log-table td { padding: 3px 4px; }
.log-table .setnum { font-weight: 800; color: var(--red-bright); font-size: .85rem; width: 34px; }
.log-table input, .log-table select { width: 100%; font-size: 16px; padding: 9px 8px; border: 1px solid var(--line); border-radius: 8px; background: #141416; color: var(--ink); min-height: 40px; }
.log-table input:focus, .log-table select:focus { outline: 2px solid var(--red); border-color: transparent; }
.log-table .reps-col { width: 30%; } .log-table .wt-col { width: 32%; } .log-table .rpe-col { width: 30%; }
.log-note { margin-top: 8px; }
.log-note textarea { width: 100%; font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-height: 40px; background: #141416; color: var(--ink); resize: vertical; }

/* Circuits */
.circuit { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--red); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.circuit h3 { margin: 0; font-size: 1rem; }
.circuit .c-reps { font-size: .8rem; color: var(--muted); font-weight: 700; }
.circuit ul { list-style: none; margin: 10px 0 0; padding: 0; }
.circuit li { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-top: 1px solid #26262b; }
.circuit li:first-child { border-top: 0; }
.circuit .cname { font-size: .92rem; font-weight: 600; flex: 1; }
.circuit .cname small { color: var(--muted); font-weight: 600; }
.circuit .rounds { display: flex; gap: 6px; margin-top: 10px; align-items: center; }
.circuit .rounds .rl { font-size: .8rem; font-weight: 800; color: var(--muted); margin-right: 2px; }
.circuit .rounds button { width: 44px; height: 40px; border-radius: 10px; border: 2px solid var(--line); background: var(--card-2); font-weight: 800; color: var(--muted); cursor: pointer; font-size: .9rem; }
.circuit .rounds button.on { border-color: var(--red); background: var(--red-soft); color: #fff; }

/* ---------- Rehab tab ---------- */
.rehab-hero { background: linear-gradient(135deg, var(--red-deep), #3b0d0d); border: 1px solid var(--red); border-radius: var(--radius); padding: 14px; margin: 14px 0; }
.rehab-hero h2 { margin: 0; font-size: 1.2rem; }
.rehab-hero p { font-size: .9rem; margin: 6px 0 0; color: #f0dcdc; }
.rehab-zone { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.rehab-zone h3 { margin: 2px 0 2px; font-size: 1.05rem; }
.rehab-zone .zone-sub { color: var(--muted); font-size: .82rem; margin: 0 0 8px; }
.rehab-item { display: flex; align-items: center; gap: 8px; border-top: 1px solid #26262b; padding: 9px 0; }
.rehab-item:first-of-type { border-top: 0; }
.rehab-item .ri-n { flex: 1; font-size: .92rem; font-weight: 600; }
.rehab-item .ri-n small { display: block; color: var(--muted); font-weight: 500; font-size: .76rem; }
.rehab-note { background: var(--red-soft); border: 1px solid var(--red-deep); color: #fecaca; border-radius: 10px; padding: 10px 12px; font-size: .82rem; margin: 10px 0 2px; }

/* Bottom tabs (mobile) */
.tab-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: #17171a; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 12px rgba(0,0,0,.6); }
.tab-bar button { all: unset; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 9px; cursor: pointer; font-size: .74rem; font-weight: 800; color: var(--muted); text-align: center; }
.tab-bar button .tab-ico { font-size: 20px; }
.tab-bar button[aria-selected="true"] { color: var(--red-bright); background: var(--red-soft); }

/* Footer */
.site-footer { margin-top: 26px; padding: 8px 0 30px; }
.site-footer details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px; margin-bottom: 10px; }
.site-footer summary { cursor: pointer; font-weight: 800; padding: 10px 0; font-size: .95rem; }
.site-footer ul, .site-footer ol { padding-left: 20px; font-size: .88rem; }
.site-footer li { margin: 5px 0; }
.rpe-list { list-style: none; margin: 6px 0 10px; padding: 0 !important; }
.rpe-list li { display: flex; gap: 8px; align-items: baseline; }
.rpe-list b { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; text-align: center; line-height: 22px; font-size: .78rem; }
.credits { color: var(--muted); font-size: .78rem; }

/* Video modal */
.vmodal { position: fixed; inset: 0; background: rgba(3,3,4,.85); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 14px; }
.vmodal .vm-inner { width: 100%; max-width: 720px; background: #000; border-radius: 12px; overflow: hidden; }
.vmodal .vm-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px; color: #d4d4d8; font-size: .85rem; }
.vmodal .vm-bar button { all: unset; cursor: pointer; font-weight: 800; color: #fff; padding: 6px 10px; }

/* Desktop layout: replace bottom tab bar with top workout switcher */
@media (min-width: 640px) {
  .big-tabs { display: flex; }
  .tab-bar { display: none; }
  body { padding-bottom: 24px; }
}
