/* Plan Builder. Phone first; light and dark; one accent (the default look; a brand may add its own stylesheet, app/brands/<id>/brand.css). No external fonts. */
:root {
  --bg: #f4f3ef;
  --card: #ffffff;
  --card-2: #f8f7f4;
  --ink: #131316;
  --ink-2: #3c3c43;
  --muted: #4a4a52;
  --line: #e3e1db;
  --line-2: #d3d0c8;
  --accent: #e8480c;
  --accent-ink: #b8370a;      /* accent used as text on light surfaces (contrast 5.4:1 on white) */
  --accent-soft: #fde9df;
  --on-accent: #ffffff;
  --ok: #1d7a46;
  --warn-bg: #fff4d6;
  --warn-ink: #6b4a00;
  --warn-line: #f0d48a;
  --heat-0: #f1efea;
  --heat-rgb: 232, 72, 12;
  --shadow: 0 1px 2px rgba(20, 20, 20, .06), 0 4px 16px rgba(20, 20, 20, .06);
  --radius: 14px;
  --radius-sm: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0e;
    --card: #17171b;
    --card-2: #1e1e23;
    --ink: #f5f5f6;
    --ink-2: #d9d9de;
    --muted: #a3a3ad;
    --line: #2a2a31;
    --line-2: #3a3a42;
    --accent: #ff6a2b;
    --accent-ink: #ff8a55;
    --accent-soft: #3a1d10;
    --on-accent: #140a05;
    --ok: #4ccf86;
    --warn-bg: #2d2410;
    --warn-ink: #f3d590;
    --warn-line: #5a4716;
    --heat-0: #222228;
    --heat-rgb: 255, 106, 43;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c0e; --card: #17171b; --card-2: #1e1e23; --ink: #f5f5f6; --ink-2: #d9d9de; --muted: #a3a3ad; --line: #2a2a31; --line-2: #3a3a42;
  --accent: #ff6a2b; --accent-ink: #ff8a55; --accent-soft: #3a1d10; --on-accent: #140a05; --ok: #4ccf86;
  --warn-bg: #2d2410; --warn-ink: #f3d590; --warn-line: #5a4716; --heat-0: #222228; --heat-rgb: 255, 106, 43;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); background: #0e0e10; color: #fff; min-height: 52px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-word { font-weight: 900; font-style: italic; letter-spacing: .04em; font-size: 18px; line-height: 1; white-space: nowrap; }
.brand-sub { display: block; font-size: 12px; font-style: normal; font-weight: 600; letter-spacing: .02em; color: #b9b9c0; margin-top: 2px; }
.lang { display: inline-flex; border: 1px solid #3a3a42; border-radius: 999px; padding: 2px; flex: none; }
.lang button { border: 0; background: transparent; color: #cfcfd6; font-weight: 800; font-size: 14px; padding: 7px 12px; border-radius: 999px; min-width: 44px; min-height: 36px; }
.lang button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- layout */
main { max-width: 760px; margin: 0 auto; padding: 0 16px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
main.plan-main { padding-bottom: 32px; }
.center { text-align: center; }
.loading { padding: 64px 0; text-align: center; color: var(--muted); }
.building { padding: 72px 8px 32px; text-align: center; max-width: 420px; margin: 0 auto; }
.building h1.step-title { font-size: 24px; margin-bottom: 18px; }
.building .bar { position: relative; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.building .bar span { position: absolute; top: 0; bottom: 0; left: 0; width: 38%; border-radius: 4px; background: var(--accent); animation: slide 1.8s ease-in-out infinite; }
.building .build-msg { font-size: 17px; font-weight: 750; color: var(--ink); margin: 16px 0 6px; min-height: 1.4em; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(265%); } }
@media (prefers-reduced-motion: reduce) { .building .bar span { animation-duration: 4s; } }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); margin: 0 auto 16px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* ---------------------------------------------------------------- wizard */
.wiz-head { padding: 10px 0 2px; }
.dots { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.wiz-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dot { height: 6px; flex: 1; border-radius: 3px; background: var(--line); }
.dot.done { background: var(--accent); opacity: .45; }
.dot.on { background: var(--accent); }
.step-count { font-size: 14px; color: var(--muted); font-weight: 600; }
h1.step-title { font-size: 25px; line-height: 1.15; margin: 0 0 2px; font-weight: 850; letter-spacing: -.01em; }
.lead { color: var(--ink-2); margin: 0 0 10px; font-size: 16px; }
.field { margin: 12px 0; }
.field > .label, .label { display: block; font-weight: 750; font-size: 16px; margin-bottom: 6px; }
.label-sub { font-weight: 650; color: var(--ink-2); font-size: 15px; margin-left: 4px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 6px 8px; margin-bottom: 6px; flex-wrap: wrap; }
.label-row .label { margin: 0; }
.small-text { font-size: 14px; color: var(--ink-2); margin: 0 0 6px; line-height: 1.35; }
.hint { color: var(--ink-2); font-size: 15px; margin: 6px 0 0; }
.note { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 15px; color: var(--ink-2); margin: 10px 0; }
.note.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.chips.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.chips.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); }
.chips.grid8 { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.chips.grid8 .chip { padding: 8px 0; }
.chips.two { display: grid; grid-template-columns: 1fr 1fr; }
.chips.small { gap: 6px; }
.chips.small .chip { min-height: 44px; padding: 6px 10px; font-size: 14.5px; border-radius: 11px; }
.chips.pain .chip { min-height: 40px; padding: 4px 10px; font-size: 14px; border-width: 1.5px; }
.chips.grid4.small .chip { padding: 8px 3px; font-size: 14px; }
.chips.grid7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.chip {
  border: 2px solid var(--line-2); background: var(--card); border-radius: 12px; padding: 10px 14px; min-height: 48px; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; line-height: 1.2;
}
.chips.grid7 .chip { padding: 8px 2px; font-size: 15px; flex-direction: column; gap: 0; }
.chip small { font-size: 12px; font-weight: 700; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .03em; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.chip[aria-pressed="true"] small { color: inherit; }
.chip:disabled { opacity: .45; cursor: default; }

.seg { display: flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; min-height: 44px; font-weight: 750; font-size: 16px; padding: 6px 8px; color: var(--ink-2); }
.seg.small button { min-height: 44px; font-size: 15px; }
.seg.tiny { padding: 2px; border-radius: 9px; }
.seg.tiny button { min-height: 32px; min-width: 44px; font-size: 14px; padding: 2px 8px; border-radius: 7px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); outline: 2px solid var(--accent); outline-offset: -2px; }

.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 44px; height: 52px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--card); font-size: 26px; font-weight: 800; line-height: 1; flex: none; }
.stepper input { width: 100%; min-width: 0; height: 52px; text-align: center; font-size: 22px; font-weight: 850; padding: 0 2px; -moz-appearance: textfield; border: 2px solid var(--line-2); border-radius: 12px; background: var(--card); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.unit-seg { margin-top: 8px; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cards.one { grid-template-columns: 1fr; }
.card-btn {
  text-align: left; border: 2px solid var(--line-2); background: var(--card); border-radius: var(--radius); padding: 14px 12px; min-height: 84px;
  display: flex; flex-direction: column; justify-content: center; gap: 3px; box-shadow: var(--shadow);
}
.card-btn .t { font-weight: 850; font-size: 17px; line-height: 1.2; }
.card-btn .s { color: var(--muted); font-size: 14px; line-height: 1.3; }
.card-btn .ic { font-size: 22px; line-height: 1; margin-bottom: 4px; color: var(--accent-ink); }
.card-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.cards.compact .card-btn { min-height: 64px; padding: 10px 12px; }
.cards.mini { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cards.mini .card-btn { min-height: 52px; padding: 6px 8px; flex-direction: row; align-items: center; gap: 6px; box-shadow: none; border-radius: 12px; }
.cards.mini .card-btn .ic { font-size: 15px; margin: 0; }
.cards.mini .card-btn .t { font-size: 14px; font-weight: 800; }
.cards.kit { grid-template-columns: 1fr 1fr; gap: 6px; }
.cards.kit .card-btn { min-height: 58px; padding: 7px 10px; box-shadow: none; border-radius: 12px; gap: 1px; }
.cards.kit .card-btn .t { font-size: 14.5px; font-weight: 800; line-height: 1.2; }
.cards.kit .card-btn .s { font-size: 12.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.detail { margin-top: 12px; }
.detail > .label { margin-top: 2px; }
.sels { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.sel .label { font-size: 15px; margin-bottom: 4px; }
.sel select { width: 100%; height: 48px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--card); padding: 0 12px; font-size: 16px; font-weight: 650; }
details.more { margin: 12px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
details.more > summary { list-style: none; padding: 6px 14px; font-weight: 800; font-size: 15px; display: flex; gap: 8px; align-items: center; min-height: 50px; cursor: pointer; }
details.more > summary .st { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
details.more > summary .cur { color: var(--muted); font-weight: 650; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.more > summary::after { content: "+"; font-weight: 900; font-size: 20px; color: var(--accent-ink); flex: none; }
details[open].more > summary::after { content: "–"; }
details.more > .body { padding: 0 14px 10px; }
details.more > .body .field:first-child { margin-top: 2px; }
.sum-line { font-size: 14px; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; margin: 8px 0 0; }
.sum-line span { color: var(--muted); font-weight: 700; }
.qlist { margin: 0 0 8px; padding-left: 18px; font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.qlist li { margin: 2px 0; }
.hint.small { font-size: 13px; }
.cards.compact .card-btn .t { font-size: 16px; }

.search { width: 100%; height: 50px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--card); padding: 0 14px; font-size: 17px; }
.pick-list { margin-top: 8px; max-height: max(220px, calc(100vh - 470px)); max-height: max(220px, calc(100dvh - 470px)); overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); -webkit-overflow-scrolling: touch; }
.pick-group { position: sticky; top: 0; background: var(--card-2); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 8px 14px; border-bottom: 1px solid var(--line); }
.pick-item { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 13px 14px; font-size: 17px; font-weight: 650; min-height: 50px; }
.pick-item:last-child { border-bottom: 0; }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 2px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 2px 6px 2px 14px; min-height: 50px; }
.picked .t { font-weight: 850; font-size: 18px; }
.link-btn { border: 0; background: none; color: var(--accent-ink); font-weight: 800; padding: 8px; min-height: 44px; text-decoration: underline; }
.date { height: 50px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--card); padding: 0 12px; font-size: 17px; width: 100%; max-width: 260px; }

.qa { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qa .q { font-size: 16px; }
.qa .seg { flex: none; width: 128px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 2px solid var(--line-2); border-radius: var(--radius); background: var(--card); margin: 10px 0; font-size: 16px; font-weight: 650; cursor: pointer; }
.check input { width: 26px; height: 26px; flex: none; accent-color: var(--accent); margin: 1px 0 0; }
.check.on { border-color: var(--accent); }
.release-text { font-size: 14px; line-height: 1.4; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; max-height: 118px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.release-text p { margin: 0 0 8px; }
.release-text p:last-child { margin: 0; }
.sum { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.sum li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 16px; }
.sum li:last-child { border-bottom: 0; }
.sum li span:first-child { color: var(--muted); }
.sum li span:last-child { font-weight: 750; text-align: right; }
.pain-row { display: flex; align-items: center; gap: 6px 10px; margin-top: 8px; flex-wrap: wrap; }
.pain-row .name { font-weight: 750; min-width: 96px; font-size: 15px; }
.pain-row .seg { flex: 1 1 210px; min-width: 0; }
.pain-row .seg button { font-size: 14px; min-height: 40px; padding: 4px 4px; min-width: 0; }

.wiz-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line);
  padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.wiz-nav-inner { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.btn { border: 2px solid var(--line-2); background: var(--card); border-radius: 14px; min-height: 54px; padding: 0 18px; font-weight: 850; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); flex: 1; }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 44px; font-size: 15px; padding: 0 14px; border-radius: 12px; }
.wiz-why { font-size: 15px; font-weight: 700; color: var(--accent-ink); text-align: center; margin: 6px 0 0; min-height: 0; }

.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 14px 0 6px; }
.foot p { margin: 4px 0; }

/* ---------------------------------------------------------------- plan */
.plan-bar { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 0 8px; }
.plan-sum { min-width: 0; }
.plan-bar .btn.small { min-height: 40px; font-size: 14px; padding: 0 12px; }
.plan-sum .p { font-weight: 850; font-size: 16px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-sum .s { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 3px; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; flex: none; }
.tabs button { flex: 1; border: 0; background: transparent; border-radius: 9px; min-height: 40px; min-width: 70px; padding: 0 10px; font-weight: 800; font-size: 15px; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }

.weekbar { display: flex; align-items: center; gap: 8px; }
.weekbar .arrow { width: 46px; height: 46px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--card); font-size: 22px; font-weight: 900; flex: none; display: flex; align-items: center; justify-content: center; }
.weekbar .arrow:disabled { opacity: .3; cursor: default; }
.weekbar .mid { flex: 1; text-align: center; min-width: 0; }
.weekbar .wk { font-weight: 900; font-size: 18px; line-height: 1.15; }
.weekbar .ph { color: var(--muted); font-size: 13px; font-weight: 650; display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px; font-size: 13px; font-weight: 800; line-height: 1.5; white-space: nowrap; }
.badge.test { background: var(--ink); color: var(--bg); }
.badge.accel { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.badge.plus { background: var(--accent); color: var(--on-accent); }
.badge.minus { background: var(--card-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.badge.new { border: 1.5px solid var(--accent); color: var(--accent-ink); }
.badge.tag { background: var(--card-2); color: var(--ink-2); border: 1px solid var(--line); }

.daytabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; margin: 8px 0; }
.daytab { border: 2px solid var(--line-2); background: var(--card); border-radius: 12px; min-height: 46px; padding: 4px 2px; font-weight: 850; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.daytab small { font-size: 11px; font-weight: 750; color: var(--muted); text-transform: lowercase; margin-top: 2px; }
.daytab.opt { border-style: dashed; }
.daytab.play, .daytab.sport { background: var(--card-2); }
.daytab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.daytab[aria-selected="true"] small { color: inherit; }

details.week-notes { margin: 0 0 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
details.week-notes > summary { list-style: none; padding: 10px 14px; font-weight: 800; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; cursor: pointer; min-height: 44px; align-items: center; }
details > summary::-webkit-details-marker { display: none; }
details.week-notes > summary::after, details.sec > summary::after { content: "+"; font-weight: 900; font-size: 20px; color: var(--accent-ink); }
details[open].week-notes > summary::after, details[open].sec > summary::after { content: "–"; }
.week-notes .body { padding: 0 14px 12px; font-size: 15px; }
.md p { margin: 6px 0; }
.md ul, .md ol { padding-left: 20px; margin: 6px 0; }
.md li { margin: 3px 0; }
.md blockquote { margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--accent); background: var(--card-2); border-radius: 0 8px 8px 0; }
.md h3, .md h4 { font-size: 16px; margin: 12px 0 6px; }
.md code { font-family: var(--mono); font-size: 14px; background: var(--card-2); padding: 1px 5px; border-radius: 5px; word-break: break-word; }
.table-wrap { overflow-x: auto; }
.md table { border-collapse: collapse; font-size: 14px; width: 100%; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 6px 6px; text-align: left; vertical-align: top; }

/* the day card: the screenshot */
.daycard { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; touch-action: pan-y; }
.dc-head { padding: 8px 14px 7px; border-bottom: 3px solid var(--accent); }
.dc-r1, .dc-r2 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dc-r2 { align-items: center; margin-top: 1px; }
.dc-head .est { flex: none; font-size: 12.5px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.dc-head .est small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.tips-btn { flex: none; border: 1px solid var(--line-2); background: var(--card-2); color: var(--ink-2); border-radius: 999px; font-size: 12.5px; font-weight: 800; padding: 0 10px; min-height: 32px; }
.tips-btn span { color: var(--accent-ink); font-weight: 900; margin-left: 2px; }
.tips-btn[aria-expanded="true"] { border-color: var(--accent); }
.nowrap { white-space: nowrap; flex: none; }
.dc-head .wd { font-size: 12px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.dc-head .tt { font-size: 19px; font-weight: 900; line-height: 1.15; letter-spacing: -.01em; }
.dc-head .meta { text-align: right; flex: none; font-size: 14px; color: var(--muted); font-weight: 700; max-width: 40%; }
.dc-head .meta .w { display: block; color: var(--ink); font-weight: 850; }
.dc-brand { margin-right: 4px; font-size: 11px; font-weight: 900; font-style: italic; letter-spacing: .06em; color: var(--muted); }
.dc-tips { border-bottom: 1px solid var(--line); background: var(--card-2); padding-top: 6px; }
.dc-tips > summary { list-style: none; padding: 4px 14px; font-size: 13.5px; font-weight: 800; color: var(--muted); cursor: pointer; min-height: 34px; display: flex; align-items: center; gap: 6px; }
.dc-tips > summary::after { content: "+"; margin-left: auto; color: var(--accent-ink); font-size: 18px; }
.dc-tips[open] > summary::after { content: "–"; }
.dc-tips ul { margin: 0; padding: 0 14px 8px 30px; font-size: 14px; color: var(--ink-2); }
.dc-tips li { margin: 4px 0; }
.blk { padding: 3px 0 2px; }
.blk + .blk { border-top: 1px solid var(--line); }
.blk-line > summary { list-style: none; display: flex; align-items: center; gap: 5px; padding: 6px 14px; min-height: 38px; font-size: 14.5px; cursor: pointer; color: var(--ink-2); }
.blk-line > summary b { flex: none; color: var(--ink); font-weight: 850; }
.blk-line > summary .lw { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk-line > summary::after { content: "+"; margin-left: auto; padding-left: 6px; color: var(--accent-ink); font-weight: 900; font-size: 18px; flex: none; }
.blk-line[open] > summary::after { content: "–"; }
.blk-line[open] { padding-bottom: 4px; }
.blk-h { padding: 4px 14px 1px; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.blk-h .opt { text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 12px; }
.blk-intro { padding: 0 14px 3px; font-size: 13.5px; color: var(--ink-2); }
.row { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 3px 14px; font: inherit; color: inherit; position: relative; min-height: 44px; }
.row:hover { background: var(--card-2); }
.row .r1 { display: flex; align-items: baseline; gap: 6px; }
.row .nm { flex: 1; min-width: 0; font-weight: 800; font-size: 15.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .num { flex: none; color: var(--accent-ink); font-weight: 900; font-size: 13px; min-width: 10px; }
.row .bdg { flex: none; display: flex; gap: 4px; }
.row .bdg .badge { font-size: 12px; padding: 0 7px; }
.row .r2 { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.3; padding-left: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .nb { white-space: nowrap; }
.row .dose { font-weight: 850; color: var(--ink); }
.row .ss { color: var(--accent-ink); font-weight: 800; font-size: 13px; }
.row[aria-expanded="true"] { background: var(--card-2); }
.row[aria-expanded="true"] .nm, .row[aria-expanded="true"] .r2 { white-space: normal; }
details.week-notes.side { display: none; }
details.week-notes.main { margin-top: 10px; }
.row.plain .nm { font-weight: 650; }
.det { padding: 2px 16px 12px 16px; background: var(--card-2); font-size: 15px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.det p { margin: 6px 0; }
.det .k { font-weight: 850; color: var(--ink); }
.det .prog { border-left: 4px solid var(--accent); padding: 6px 10px; background: var(--card); border-radius: 0 8px 8px 0; color: var(--ink); }
.det ul { margin: 4px 0; padding-left: 18px; }
.det li { margin: 4px 0; }
.det .swap-k { color: var(--muted); font-size: 14px; display: block; }
.vid { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.vid code { font-family: var(--mono); font-size: 13px; background: var(--card); border: 1px solid var(--line); padding: 4px 6px; border-radius: 6px; word-break: break-word; }
.dc-foot { padding: 7px 14px 9px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); line-height: 1.4; }
.dc-foot a { color: var(--muted); }
.dc-foot .hw { color: var(--warn-ink); background: var(--warn-bg); border-radius: 6px; padding: 4px 6px; display: block; margin-bottom: 6px; font-weight: 700; }
.simple-day { padding: 26px 16px; text-align: center; font-size: 18px; font-weight: 800; }
.simple-day small { display: block; color: var(--muted); font-weight: 600; font-size: 15px; margin-top: 6px; }

.actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 12px 0 4px; }
.actions .btn { min-width: 0; min-height: 64px; padding: 8px 6px; font-size: 14.5px; line-height: 1.15; flex-direction: column; gap: 3px; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.actions .btn .bi { font-size: 18px; line-height: 1; }
.hint-line { color: var(--muted); font-size: 14px; text-align: center; margin: 8px 0 0; }
.print-line { text-align: center; margin: 2px 0 0; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; padding: 6px 8px; cursor: pointer; }
.dayview .print-line { text-align: left; }

/* Things to do today, each lightly boxed: a straight exercise is one card; a superset / triset / giant set / circuit / WOD is one card
   with a coloured rail, a plain-words header and lighter inner boxes A1 -> A2 ... (brand colours through the CSS variables) */
.things { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 2px 8px 6px; }
.grp-b { grid-template-columns: minmax(0, 1fr); }
.grp, .thing { min-width: 0; }
.thing { border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.thing > .row-wrap > .row, .thing > .row { padding-left: 8px; }
.thing .row .r2 { padding-left: 16px; }
.grp { border: 1px solid var(--line-2); border-left: 4px solid var(--accent); border-radius: 10px; background: var(--accent-soft); padding: 4px 5px 5px 5px; }
.grp-h { padding: 1px 4px 4px; font-size: 13px; line-height: 1.3; color: var(--ink); }
.grp-k { font-weight: 900; letter-spacing: .04em; color: var(--accent-ink); font-size: 12px; }
.grp-l { font-weight: 700; }
.grp-n { display: block; font-size: 12px; color: var(--ink-2); }
.grp-b { display: grid; gap: 0; }
.thing.in { border-color: var(--line); border-radius: 8px; position: relative; overflow: visible; }
.thing.in + .thing.in { margin-top: 11px; }
.thing.in + .thing.in::before { content: "↓"; position: absolute; top: -12px; left: 14px; font-size: 11px; line-height: 12px; font-weight: 900; color: var(--accent-ink); }
.thing.wod-row .r2 { white-space: normal; }
.thing.in .num { min-width: 20px; }
.thing.wod-row { margin-bottom: 6px; }
.thing.wod-row .num { display: none; }
.thing .det { border-bottom: 0; border-top: 1px solid var(--line); }
.blk + .blk { border-top: 0; }
.blk { padding: 2px 0 0; }

/* ▶ beside each exercise: the YouTube search for its name (R4-LIB-05); a 44px tap target that looks small */
.row-wrap { display: flex; align-items: center; }
.row-wrap > .row { flex: 1; min-width: 0; padding-right: 2px; }
.row-wrap.open { background: var(--card-2); }
.play { flex: none; width: 44px; height: 44px; margin-right: 6px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 50%; }
.play span { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--card); color: var(--accent-ink); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; padding-left: 2px; }
.play:hover span, .play:focus-visible span { border-color: var(--accent); background: var(--accent-soft); }

/* Editing (app/edit-ui.js): the row's edit bar, block switches, Add exercise, the Edited strip. Never in the saved image or print. */
.badge.edited { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent); font-size: 12px; vertical-align: middle; }
.row .bdg .badge.ed { color: var(--accent-ink); border: 1px solid var(--line-2); padding: 0 5px; }
.edit-bar { margin: 8px 0 6px; padding: 8px 10px; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.eb-sets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eb-sets .k { font-weight: 850; color: var(--ink); min-width: 44px; }
.eb-step { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--card); font-size: 24px; font-weight: 800; line-height: 1; color: var(--ink); }
.eb-step:disabled { opacity: .4; }
.eb-n { min-width: 26px; text-align: center; font-size: 20px; font-weight: 900; color: var(--ink); }
.eb-sets small { color: var(--muted); font-size: 13px; }
.eb-btns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.eb-btns .btn { flex: 1; min-width: 120px; }
.eb-rm { color: var(--ink-2); }
.eb-swaps { margin-top: 8px; display: grid; gap: 6px; }
.eb-swaps .k { margin: 0; }
.swap-opt { text-align: left; border: 2px solid var(--line-2); background: var(--card-2); border-radius: 12px; padding: 8px 12px; min-height: 48px; font: inherit; color: var(--ink); }
.swap-opt b { display: block; font-weight: 850; font-size: 15px; }
.swap-opt .swap-k { color: var(--muted); font-size: 13.5px; display: block; }
.swap-opt:hover, .add-opt:hover { border-color: var(--accent); }
.blk-h .blk-t { flex: 1 1 0; min-width: 0; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.blk-h .blk-sw { margin-left: auto; flex: none; align-self: center; }
.blk-sw { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 2px 9px 2px 3px; min-height: 28px; position: relative; font: inherit; font-size: 12px; font-weight: 800; color: var(--ink-2); text-transform: none; letter-spacing: 0; cursor: pointer; }
.blk-sw::before { content: ""; position: absolute; inset: -8px 0; }   /* a bigger tap area than it looks */
.blk-sw .knob { width: 20px; height: 20px; border-radius: 50%; background: var(--line-2); transition: background .15s; }
.blk-sw[aria-checked="true"] .knob { background: var(--accent); }
.blk-sw[aria-checked="true"] { border-color: var(--accent); color: var(--accent-ink); }
.blk-off .row { opacity: .5; }
.add-line { margin: 10px 0 0; }
.add-line .add-btn { width: 100%; border-style: dashed; }
.add-panel { margin: 10px 0 0; padding: 12px; background: var(--card); border: 2px solid var(--accent); border-radius: var(--radius); }
.ap-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ap-l { display: block; font-weight: 800; font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }
.ap-opts { margin: 4px 0 10px; display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; }
.ap-blk { display: flex; align-items: center; gap: 8px; flex: 1 1 180px; }
.ap-blk .k, .ap-opts .k { font-weight: 850; font-size: 14px; color: var(--ink); }
.ap-blk select { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; padding: 0 8px; }
.ap-opts .eb-sets .k { min-width: 0; }
.ap-sub { color: var(--muted); font-size: 14px; margin: 8px 0 4px; }
.add-list { display: grid; gap: 6px; margin-top: 6px; }
.add-opt { display: flex; align-items: center; gap: 8px; text-align: left; border: 2px solid var(--line-2); background: var(--card-2); border-radius: 12px; padding: 8px 12px; min-height: 48px; font: inherit; font-weight: 750; color: var(--ink); }
.add-opt .an { flex: 1; min-width: 0; }
.add-opt .plus { color: var(--accent-ink); font-weight: 900; font-size: 18px; }
.edit-strip { margin: 0 0 10px; padding: 8px 12px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius-sm); font-size: 14px; color: var(--ink); }
.es-r1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.es-btns { margin-left: auto; display: flex; gap: 6px; }
.es-btns .btn.small { min-height: 40px; font-size: 14px; padding: 0 10px; }
.es-busy { color: var(--accent-ink); font-weight: 800; }
.es-info { margin-top: 6px; }
.es-info p { margin: 2px 0; font-weight: 700; }
.es-info ul { margin: 2px 0; padding-left: 18px; }
.es-note { margin: 6px 0 0; color: var(--ink-2); font-size: 12.5px; }

/* Download PDF / Save image: the toast and the sheet (deliver.js) */
.toast { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 520px); background: var(--ink); color: var(--card); padding: 12px 16px; border-radius: 12px; font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); transition: opacity .2s, transform .2s; z-index: 60; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="error"] { background: #b3261e; color: #fff; }
.sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; padding: 12px; }
.sheet { background: var(--card); color: var(--ink); width: 100%; max-width: 520px; max-height: calc(100vh - 24px); overflow: auto; border-radius: 18px;
  padding: 18px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.sheet h2 { margin: 0; font-size: 20px; }
.sheet .btn { width: 100%; }
.sheet .btn.primary { flex: none; }
.sheet-note { margin: 0; color: #b3261e; font-weight: 700; font-size: 14px; }
.sheet-hint { margin: 0; color: var(--muted); font-size: 15px; }
.sheet-img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; -webkit-touch-callout: default; user-select: auto; }
.sheet-row { display: flex; gap: 8px; }
.sheet-row .btn { flex: 1; }
.sheet-file { margin: 0; color: var(--muted); font-size: 12px; text-align: center; word-break: break-all; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } }

.banner { border-radius: var(--radius); padding: 12px 14px; margin: 8px 0 12px; font-size: 15px; }
.banner.health { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); }
.banner.release { background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.banner b { color: inherit; }

/* progress tab */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 12px; box-shadow: var(--shadow); }
.panel h2 { font-size: 18px; margin: 2px 0 6px; font-weight: 900; }
.panel .sub { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.heat-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
table.heat { border-collapse: separate; border-spacing: 2px; font-size: 12px; min-width: 100%; }
table.heat th { font-weight: 800; color: var(--muted); font-size: 12px; padding: 0 2px; text-align: center; }
table.heat th.g, table.heat td.g { text-align: left; font-weight: 800; color: var(--ink); font-size: 14px; white-space: nowrap; padding-right: 6px; position: sticky; left: 0; background: var(--card); z-index: 1; max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
table.heat td.c { width: 24px; min-width: 24px; height: 26px; text-align: center; border-radius: 6px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
table.heat td.c.hi { color: #fff; }
table.heat td.c.eff { font-weight: 700; color: var(--muted); white-space: nowrap; font-size: 11px; background: transparent; }
table.heat td.f { font-weight: 900; padding-left: 6px; white-space: nowrap; color: var(--accent-ink); }
table.heat tr.tot td { border-top: 2px solid var(--line-2); }
table.heat td.sep, table.heat th.sep { width: 2px; min-width: 2px; padding: 0; background: var(--line-2); }
table.heat td.cur, table.heat th.cur { outline: 2px solid var(--ink); outline-offset: -1px; }
details.sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 10px; box-shadow: var(--shadow); }
details.sec > summary { list-style: none; padding: 12px 14px; font-weight: 900; font-size: 17px; display: flex; justify-content: space-between; align-items: center; min-height: 50px; cursor: pointer; }
details.sec .md { padding: 0 14px 12px; font-size: 15px; }

/* print root hidden on screen */
#print-root { display: none; }

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  h1.step-title { font-size: 32px; }
  .daycard { max-width: 640px; margin: 0 auto; }
  .daytabs, .weekbar, .actions { max-width: 640px; margin-left: auto; margin-right: auto; }
  details.week-notes { max-width: 640px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 360px) {
  .brand-sub { display: none; }
  .chips.grid3 { grid-template-columns: repeat(2, 1fr); }
  .daytab { font-size: 14px; }
}

@media (min-width: 1000px) {
  main.plan-main { max-width: 1120px; }
  .dayview { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
  .dv-side { position: sticky; top: 64px; }
  .dv-side .daytabs { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
  .dayview .daycard, .dayview .actions { max-width: 680px; margin-left: 0; margin-right: 0; }
  .dv-side .daytabs, .dv-side .weekbar, .dv-side details.week-notes { max-width: none; margin-left: 0; margin-right: 0; }
  details.week-notes.side { display: block; }
  details.week-notes.main { display: none; }
  .dayview .hint-line { text-align: left; }
  .dayview details.week-notes .body { max-height: 46vh; overflow: auto; }
}

/* ---------------------------------------------------------------- print: the whole plan, one week per page */
@media print {
  @page { margin: 12mm; }
  :root { --bg: #fff; --card: #fff; --card-2: #f5f5f5; --ink: #000; --ink-2: #222; --muted: #444; --line: #ccc; --line-2: #aaa; --accent: #d9430b; --accent-ink: #a8330a; --shadow: none; color-scheme: light; }
  body { background: #fff; font-size: 11pt; }
  .topbar, main, .wiz-nav, .toast, .sheet-wrap { display: none !important; }
  #print-root { display: block; }
  .pr-cover h1 { font-size: 22pt; margin: 0 0 4pt; }
  .pr-week { break-before: page; }
  .pr-week h2 { font-size: 15pt; margin: 0 0 6pt; border-bottom: 2pt solid #d9430b; padding-bottom: 3pt; }
  .pr-day { break-inside: avoid; border: 1px solid #bbb; border-radius: 6pt; margin: 0 0 8pt; padding: 6pt 8pt; }
  .pr-day h3 { font-size: 12pt; margin: 0 0 3pt; }
  .pr-day .est { color: #444; font-size: 9pt; }
  .pr-day table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .pr-day td { border-top: 1px solid #ddd; padding: 2pt 3pt; vertical-align: top; }
  .pr-day tr.pr-g td { background: #fbe6db; border-left: 3pt solid #d9430b; font-size: 9pt; padding-top: 3pt; }
  .pr-day tr.pr-in td:first-child { border-left: 3pt solid #d9430b; padding-left: 6pt; }
  .pr-day td.b { font-weight: 700; color: #555; font-size: 8.5pt; text-transform: uppercase; padding-top: 5pt; }
  .pr-legal { font-size: 9pt; color: #333; border-top: 1px solid #999; margin-top: 8pt; padding-top: 4pt; }
  .pr-sec { break-inside: auto; font-size: 10pt; }
  .pr-sec h2 { font-size: 13pt; }
  table.heat td.c.hi { color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.heat td.c { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* the safety screen: tighter, so the release box and the accept box come up quickly */
[data-screen="safety"] .field { margin: 10px 0; }
[data-screen="safety"] .chips.two .chip { min-height: 48px; font-size: 15px; padding: 6px 8px; }
[data-screen="safety"] .hint.small { font-size: 12.5px; margin-top: 4px; }
[data-screen="safety"] .check { padding: 10px 12px; margin: 8px 0; font-size: 15px; }
[data-screen="safety"] .release-text { max-height: 104px; }

/* a question not answered yet pulses softly until the person answers it (coach, 2026-10-13) */
.field.needs, .cards.needs, .detail.needs, .check.needs { border-radius: 14px; animation: needs 1.8s ease-in-out infinite; }
/* every question on the wizard sits in the same box, answered or not, so nothing moves or overlaps when the pulse stops */
.wiz-body .field, .wiz-body > .cards, .wiz-body > .detail { padding: 10px; border-radius: 14px; margin: 0 0 14px; }
.wiz-body .row2 { gap: 14px; margin: 0 0 14px; }
.wiz-body .row2 > .field { margin: 0; min-width: 0; }
.wiz-body .detail .field, .wiz-body details .field { padding: 0; margin: 12px 0 0; }
.wiz-body .detail .field.needs, .wiz-body details .field.needs { padding: 8px; }
@keyframes needs {
  0%, 100% { box-shadow: 0 0 0 2px rgba(var(--heat-rgb), .18); background-color: rgba(var(--heat-rgb), .03); }
  50% { box-shadow: 0 0 0 3px rgba(var(--heat-rgb), .55); background-color: rgba(var(--heat-rgb), .09); }
}
@media (prefers-reduced-motion: reduce) {
  .field.needs, .cards.needs, .detail.needs, .check.needs { animation: none; box-shadow: 0 0 0 2px rgba(var(--heat-rgb), .5); }
}
@media print { .needs { animation: none !important; box-shadow: none !important; background: none !important; } }
/* Link (G-314): pick the exercises to do one after the other; the bar stays at the bottom of the screen */
.eb-btns .btn.eb-link { border-color: var(--accent); color: var(--accent-ink); }
.dv-main.linking .daycard { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.row.link-pick { cursor: pointer; border-radius: var(--radius-sm); }
.row.link-pick:hover { background: var(--accent-soft); }
.row.link-pick.picked { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.row.link-pick .nm { white-space: normal; }
.row.link-no { opacity: .45; }
.row .bdg .badge.pick { background: var(--accent); color: var(--on-accent); font-weight: 900; }
.link-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--card); border-top: 2px solid var(--accent);
  box-shadow: 0 -4px 16px rgba(20, 20, 20, .12); }
.link-bar .lb-t { flex: 1; min-width: 150px; display: flex; flex-direction: column; line-height: 1.25; }
.link-bar .lb-t span { font-size: 13px; color: var(--muted); }
.link-bar .lb-b { display: flex; gap: 8px; }
.link-bar .btn { min-width: 88px; }
@media (min-width: 761px) { .link-bar { left: 50%; right: auto; width: 728px; transform: translateX(-50%); border: 2px solid var(--accent); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; } }
@media print { .link-bar { display: none !important; } }

/* nothing is wider than a small phone (320 px): boxes may shrink, long words wrap inside their own box */
.card-btn, .chip, .seg button, .btn { min-width: 0; }
.card-btn .t, .card-btn .s, .chip, .seg button { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 400px) {
  .cards.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* age and weight side by side need about 380 px; below that each gets the full width so its number shows whole */
@media (max-width: 379px) {
  .wiz-body .row2 { grid-template-columns: 1fr; }
}
