/* Sport screen (owner: Sport). Scope: [data-screen="sport"]; the Program and History sheets render outside #screen and use .sx- classes.
   Views: [data-view="main"] (today, steps, AI card, Program/History) and [data-view="workout"] (the open workout). */

/* ---------- header: optional "‹ Back" / "‹ Sport", then the large title ---------- */
[data-screen="sport"] .sx-top { margin-bottom: 18px; min-width: 0; }
[data-screen="sport"] .sx-top .title { overflow-wrap: anywhere; }
.sx-backlink { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 8px -6px; padding: 6px 10px 6px 4px; border-radius: 10px; transition: color var(--dur-fast), background var(--dur-fast); }
.sx-backlink svg { width: 18px; height: 18px; flex: none; transition: transform var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .sx-backlink:hover { background: var(--hover); } .sx-backlink:hover svg { transform: translateX(-2px); } }
.sx-backlink:active { opacity: 0.7; }

/* weekday · title · state — one even separator between parts. Every part brings its own "·" (20px wide); the row is
   pulled 20px left inside a clipping box, so the "·" of whichever part starts a line falls outside and is never seen. */
.sx-sub { --sx-sep: 20px; overflow: hidden; overflow: clip; color: var(--muted); font-size: var(--t-body); line-height: 1.35; overflow-wrap: anywhere; min-width: 0; }
.sx-sub__in { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 2px; margin-left: calc(-1 * var(--sx-sep)); min-width: 0; }
.sx-sub__in > * { min-width: 0; }
.sx-wd { color: var(--fg); font-weight: 650; }
.sx-sub__part::before { content: "·"; display: inline-block; width: var(--sx-sep); text-align: center; color: var(--faint); font-weight: 400; }
/* "✓ Done" sits on the text baseline like "Rest day" or a title: plain inline text, the icon nudged on its own */
.sx-done { color: var(--fg); font-weight: 600; }
.sx-done svg { display: inline-block; width: 16px; height: 16px; margin-right: 5px; vertical-align: -0.16em; color: var(--green); }
[data-screen="sport"] .sx-live { color: var(--fg); font-weight: 500; }

/* ---------- main view: the day on the left, steps / AI / Program / History beside it on a wide screen ---------- */
[data-screen="sport"] .sx-board { display: grid; gap: 34px; min-width: 0; }
[data-screen="sport"] .sx-day, [data-screen="sport"] .sx-side { min-width: 0; }
[data-screen="sport"] .sx-side { display: grid; gap: 14px; align-content: start; }
@media (min-width: 960px) {
  [data-screen="sport"][data-view="main"] .sx-board {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 64px; align-items: start;
  }
}

[data-screen="sport"] .sx-lead { margin-top: 18px; font-size: 22px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.25; overflow-wrap: anywhere; hyphens: manual; }
[data-screen="sport"] .sx-text { margin-top: 8px; max-width: 46ch; color: var(--muted); font-size: var(--t-body); line-height: 1.45; overflow-wrap: anywhere; }
[data-screen="sport"] .sx-sub + .sx-text { margin-top: 14px; }

/* the main action: the old Focus "Start focus" pill — accent glass, tall, an icon, a "Space" chip on desktop */
[data-screen="sport"] .sx-actions { display: grid; gap: 10px; margin-top: 22px; }
[data-screen="sport"] .sx-cta { width: 100%; min-height: 60px; gap: 10px; padding: 0 22px; font-size: 17px; letter-spacing: -0.01em; white-space: normal; text-align: center; line-height: 1.2; }
[data-screen="sport"] .sx-cta svg { width: 18px; height: 18px; flex: none; }
[data-screen="sport"] .sx-cta--play svg { fill: currentColor; stroke-width: 1.4; }
[data-screen="sport"] .sx-cta--ghost { min-height: 52px; font-size: 16px; }
[data-screen="sport"] .sx-actions .sx-cta--ghost:not(:first-child) { min-height: 48px; box-shadow: none; color: var(--muted); }
@media (hover: hover) { [data-screen="sport"] .sx-actions .sx-cta--ghost:not(:first-child):hover { color: var(--fg); background: var(--hover); opacity: 1; } }
/* Finish before any exercise: quieter, still pressable (it then points to the add field) */
[data-screen="sport"] .sx-cta.is-quiet { opacity: 0.5; filter: saturate(0.6); }
@media (hover: hover) { [data-screen="sport"] .sx-cta.is-quiet:hover { opacity: 0.62; } }
[data-screen="sport"] .sx-finish__hint { text-align: center; margin-top: 2px; }

/* in progress: a thin bar */
[data-screen="sport"] .sx-bar { position: relative; height: 4px; margin-top: 14px; border-radius: 4px; overflow: hidden; background: rgb(var(--fg-rgb) / 0.1); }
[data-screen="sport"] .sx-bar i { position: absolute; inset: 0; border-radius: inherit; background: var(--fg); transform-origin: left center; transition: transform 420ms var(--ease-out); }

/* ---------- what's coming (or how far the open workout is) ---------- */
[data-screen="sport"] .sx-preview { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
[data-screen="sport"] .sx-preview li { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 8px; row-gap: 3px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); counter-increment: ex; }
[data-screen="sport"] .sx-preview { counter-reset: ex; }
[data-screen="sport"] .sx-preview__mark { grid-row: 1; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
[data-screen="sport"] .sx-preview__mark:empty::before { content: counter(ex) "."; }
[data-screen="sport"] .sx-preview__mark svg { width: 15px; height: 15px; color: var(--green); vertical-align: -2px; }
[data-screen="sport"] .sx-preview__main { min-width: 0; overflow-wrap: anywhere; hyphens: manual; }
[data-screen="sport"] .sx-preview__n { font-weight: 600; }
[data-screen="sport"] .sx-preview__p { margin-left: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
[data-screen="sport"] .sx-preview__last { grid-column: 2; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
[data-screen="sport"] .sx-preview li.is-done .sx-preview__last { color: var(--fg); font-weight: 500; }

/* ---------- quiet cards: steps today, the AI prompt ---------- */
.sx-card { position: relative; min-width: 0; padding: 14px 14px 14px 16px; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--line); background: rgb(var(--fg-rgb) / 0.03); }
.sx-card__icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgb(var(--fg-rgb) / 0.07); color: var(--muted); }
.sx-card__icon svg { width: 18px; height: 18px; }

[data-screen="sport"] .sx-steps__row { display: flex; align-items: center; gap: 12px; min-width: 0; }
[data-screen="sport"] .sx-steps__l { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; overflow-wrap: anywhere; cursor: pointer; }
[data-screen="sport"] .sx-steps__in { flex: none; width: 128px; height: 44px; padding: 0 14px; text-align: right; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
[data-screen="sport"] .sx-steps .sx-ask { margin: 8px 0 0 46px; }

/* "Send steps from iPhone automatically": a disclosure */
[data-screen="sport"] .sx-help { margin-top: 10px; border-top: 1px solid var(--line); }
[data-screen="sport"] .sx-help__sum {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; margin: 4px -8px -6px; padding: 6px 8px; border-radius: 10px;
  list-style: none; cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 500; line-height: 1.3;
  transition: color var(--dur-fast), background var(--dur-fast); -webkit-tap-highlight-color: transparent;
}
[data-screen="sport"] .sx-help__sum::-webkit-details-marker { display: none; }
[data-screen="sport"] .sx-help__sum svg { width: 16px; height: 16px; flex: none; transition: transform var(--dur) var(--ease-out); }
[data-screen="sport"] .sx-help[open] .sx-help__sum { color: var(--fg); }
[data-screen="sport"] .sx-help[open] .sx-help__sum svg { transform: rotate(180deg); }
@media (hover: hover) { [data-screen="sport"] .sx-help__sum:hover { color: var(--fg); background: var(--hover); } }
[data-screen="sport"] .sx-help__body { padding: 12px 0 4px; font-size: 14px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; animation: sx-in var(--dur) var(--ease-out); }
[data-screen="sport"] .sx-help__steps { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: st; display: grid; gap: 8px; }
[data-screen="sport"] .sx-help__steps li { position: relative; padding-left: 28px; color: var(--fg); }
[data-screen="sport"] .sx-help__steps li:not(.sx-link) { counter-increment: st; }
[data-screen="sport"] .sx-help__steps li:not(.sx-link)::before {
  content: counter(st); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: rgb(var(--fg-rgb) / 0.08); color: var(--muted); font-size: 11px; font-weight: 600;
}
/* the link on its own full-width line ("Sum" marks where the number goes), "Copy link" under it */
[data-screen="sport"] .sx-link { display: grid; justify-items: start; gap: 8px; min-width: 0; padding-left: 28px; }
[data-screen="sport"] .sx-link__url { display: block; justify-self: stretch; min-width: 0; padding: 10px 12px; border-radius: 10px; background: rgb(var(--fg-rgb) / 0.06); font: 500 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--fg); overflow-wrap: anywhere; }
[data-screen="sport"] .sx-link__url code { font: inherit; }
[data-screen="sport"] .sx-link__var { display: inline-block; margin-left: 2px; padding: 0 6px; border-radius: 6px; background: var(--accent); color: var(--on-accent, #fff); font: 600 11.5px/1.6 var(--f-sans); word-break: normal; vertical-align: 1px; }
[data-screen="sport"] .sx-link__copy { flex: none; }
[data-screen="sport"] .sx-help__note { margin-top: 12px; font-size: 13px; color: var(--muted); }
@keyframes sx-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

[data-screen="sport"] .sx-ai { display: flex; align-items: center; gap: 12px; padding-right: 8px; }
[data-screen="sport"] .sx-ai__main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
[data-screen="sport"] .sx-ai__t { flex: 1 1 160px; min-width: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; overflow-wrap: anywhere; hyphens: manual; }
[data-screen="sport"] .sx-ai__go { flex: none; min-height: 36px; padding: 0 16px; white-space: nowrap; }
[data-screen="sport"] .sx-ai__x { align-self: flex-start; }

/* ---------- Program / History rows ---------- */
[data-screen="sport"] .sx-nav { margin-top: 6px; border-top: 1px solid var(--line); }
[data-screen="sport"] .sx-nav__row,
.sx-hrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 56px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: none; color: var(--fg); text-align: left; cursor: pointer;
  font: 600 16px/1.25 var(--f-sans); letter-spacing: -0.015em;
  -webkit-tap-highlight-color: transparent;
}
[data-screen="sport"] .sx-nav__row:focus-visible, .sx-hrow:focus-visible { border-radius: 12px; }
[data-screen="sport"] .sx-nav__row > span, .sx-hrow__main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
[data-screen="sport"] .sx-nav__row > svg:first-child { width: 19px; height: 19px; flex: none; color: var(--muted); }
[data-screen="sport"] .sx-nav__row > svg:last-child, .sx-hrow > svg { width: 18px; height: 18px; flex: none; color: var(--faint); transition: transform var(--dur-fast) var(--ease-out), color var(--dur-fast); }
[data-screen="sport"] .sx-nav__row:active, .sx-hrow:active { opacity: 0.7; }
@media (hover: hover) {
  [data-screen="sport"] .sx-nav__row:hover > svg:last-child, .sx-hrow:hover > svg { color: var(--fg); transform: translateX(3px); }
}

/* ---------- exercises: numbered blocks between hairlines ---------- */
.sx-list { list-style: none; margin-top: 18px; border-top: 1px solid var(--line); }
.sx-sheet .sx-list { margin-top: 14px; }
.sx-ex { padding: 16px 0 18px; border-bottom: 1px solid var(--line); min-width: 0; }
[data-screen="sport"] .sx-ex__head { display: flex; align-items: flex-start; gap: 8px; }
.sx-ex__title { flex: 1; min-width: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; overflow-wrap: anywhere; hyphens: manual; }
[data-screen="sport"] .sx-ex__head .sx-ex__title { padding-top: 6px; }
.sx-ex__n { color: var(--muted); font-variant-numeric: tabular-nums; }
.sx-ex__plan { margin-left: 4px; color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
[data-screen="sport"] .sx-ex__head .sx-tool { margin: 0 -8px 0 0; }

/* "Last time", then "Today" with "Same as last time" on its right */
[data-screen="sport"] .sx-prev { margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
[data-screen="sport"] .sx-prev__v { color: rgb(var(--fg-rgb) / 0.88); font-weight: 500; }
[data-screen="sport"] .sx-prev.is-first { color: var(--faint); }
[data-screen="sport"] .sx-today__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 32px; margin-bottom: 6px; }
[data-screen="sport"] .sx-same {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 32px; padding: 0 12px 0 10px; border: 0; border-radius: var(--r-pill);
  background: rgb(var(--fg-rgb) / 0.07); color: var(--fg); font: 600 13px/1 var(--f-sans); cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-out); -webkit-tap-highlight-color: transparent;
}
[data-screen="sport"] .sx-same svg { width: 14px; height: 14px; flex: none; color: var(--muted); }
[data-screen="sport"] .sx-same:active { transform: scale(0.95); }
[data-screen="sport"] .sx-same[hidden] { display: none; }
@media (hover: hover) { [data-screen="sport"] .sx-same:hover { background: rgb(var(--fg-rgb) / 0.12); } }
/* "Today": the labelled result field */
[data-screen="sport"] .sx-today { margin-top: 6px; }
[data-screen="sport"] .sx-today__l { display: block; padding-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* a result that is only read (finished workout, history) */
.sx-res { margin-top: 8px; font-size: 16px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.sx-res__l { margin-right: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.sx-res__v.is-empty { color: var(--faint); }

/* ---------- workout view ---------- */
[data-screen="sport"] .sx-wtitle { font-size: var(--t-title); }
[data-screen="sport"] .sx-count { font-variant-numeric: tabular-nums; }
[data-screen="sport"] .sx-wempty { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
[data-screen="sport"] .sx-addrow { margin-top: 16px; }
[data-screen="sport"] .sx-add, .sx-prog .sx-padd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; margin-top: 16px; }
[data-screen="sport"] .sx-add__go, .sx-prog .sx-add__go { min-height: 48px; padding: 0 18px 0 14px; gap: 6px; }
.sx-add__go svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 479px) {
  [data-screen="sport"] .sx-add, .sx-prog .sx-padd { grid-template-columns: minmax(0, 1fr); }
  [data-screen="sport"] .sx-add__go, .sx-prog .sx-add__go { justify-self: start; min-height: 40px; }
}
[data-screen="sport"] .sx-note { margin-top: 28px; }
[data-screen="sport"] .sx-note > label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
[data-screen="sport"] .sx-note__input { display: block; min-height: 72px; resize: none; overflow: hidden; }
[data-screen="sport"] .sx-finish { margin-top: 26px; }
.sx-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.sx-noteread { margin-top: 20px; }
.sx-noteread__text { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.sx-empty { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.sx-sheet .sx-empty { margin-top: 6px; }

/* ---------- history sheet ---------- */
.sx-sheet .sx-backlink { margin-top: -2px; }
.sx-hist { list-style: none; border-top: 1px solid var(--line); }
.sx-hrow__main { display: flex; flex-direction: column; gap: 3px; }
.sx-hrow__date { font-variant-numeric: tabular-nums; }
.sx-hrow__sub { font-size: var(--t-small); font-weight: 400; letter-spacing: 0; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- a field that grows with its text (placeholder is real text, so it is translated) ---------- */
.sx-grow { position: relative; min-width: 0; }
.sx-grow__input { display: block; height: 48px; resize: none; overflow: hidden; line-height: 1.4; overflow-wrap: anywhere; }
.sx-grow__ph {
  position: absolute; left: 16px; right: 16px; top: 12px; display: none;
  color: var(--faint); font-size: 16px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.sx-grow__input:placeholder-shown + .sx-grow__ph { display: block; }

/* ---------- small icon tools ---------- */
.sx-tool {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--faint); cursor: pointer;
  transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.sx-tool svg { width: 17px; height: 17px; }
.sx-tool:active { transform: scale(0.88); }
@media (hover: hover) {
  .sx-tool:hover { color: var(--fg); background: var(--hover); }
  .sx-tool--del:hover { color: var(--red); }
}
.sx-add-btn { padding-left: 12px; }
.sx-add-btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Program sheet ---------- */
.sx-prog .sx-days { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: var(--r-m); background: rgb(var(--fg-rgb) / 0.06); }
/* the selected day: one lens that slides */
.sx-prog .sx-days__lens {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 32px) / 7);
  border-radius: calc(var(--r-m) - 4px); background: rgb(var(--fg-rgb) / 0.14);
  transition: transform var(--dur-ctl) var(--ease-ctl); pointer-events: none;
}
.sx-prog .sx-dayb {
  position: relative; z-index: 1; min-width: 0; min-height: 40px; padding: 0 0 5px; border: 0; border-radius: calc(var(--r-m) - 4px);
  background: none; color: var(--faint); cursor: pointer;
  font: 600 12px/1 var(--f-sans); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden;
  transition: color var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.sx-prog .sx-dayb:active { transform: scale(0.94); }
.sx-prog .sx-dayb.is-set { color: var(--fg); }
/* a day with exercises carries a dot */
.sx-prog .sx-dayb > span::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; opacity: 0; transition: opacity var(--dur); }
.sx-prog .sx-dayb.is-set > span::after { opacity: 0.7; }
.sx-prog .sx-dayb[aria-pressed="true"] { color: var(--fg); }
@media (hover: hover) { .sx-prog .sx-dayb:hover { color: var(--fg); } }

.sx-prog .sx-prog__day { margin-top: 20px; font-size: var(--t-h2); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; overflow-wrap: anywhere; }
.sx-prog .sx-prog__day + .sx-grow { margin-top: 10px; }
.sx-prog .sx-prog__title { height: 40px; padding: 8px 0; background: none; box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sx-prog .sx-prog__title:focus { background: none; box-shadow: none; border-bottom-color: var(--accent); }
.sx-prog .sx-prog__title + .sx-grow__ph { left: 0; right: 0; top: 8px; font-size: 15px; }
.sx-prog .sx-plist { list-style: none; margin-top: 4px; }
.sx-prog .sx-pempty { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.sx-prog .sx-ptip { margin-top: 12px; color: var(--faint); font-size: 13px; line-height: 1.45; }
.sx-prog .sx-prow { border-bottom: 1px solid var(--line); min-width: 0; }
.sx-prog .sx-prow__btn {
  display: flex; align-items: baseline; gap: 10px; width: 100%; min-height: 52px; padding: 14px 0; border: 0; border-radius: 0; background: none;
  color: var(--fg); text-align: left; cursor: pointer; font: 600 16px/1.35 var(--f-sans); letter-spacing: -0.015em;
  -webkit-tap-highlight-color: transparent;
}
.sx-prog .sx-prow__btn:focus-visible { border-radius: 12px; }
.sx-prog .sx-prow__n { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.sx-prog .sx-prow__text { flex: 1; min-width: 0; overflow-wrap: anywhere; hyphens: manual; }
.sx-prog .sx-prow__dot, .sx-prog .sx-prow__plan { color: var(--muted); font-weight: 500; }
.sx-prog .sx-prow__edit-i { flex: none; align-self: center; color: var(--faint); opacity: 0.6; transition: opacity var(--dur-fast), color var(--dur-fast); }
.sx-prog .sx-prow__edit-i svg { width: 15px; height: 15px; display: block; }
.sx-prog .sx-prow__btn:active { opacity: 0.7; }
@media (hover: hover) { .sx-prog .sx-prow__btn:hover .sx-prow__edit-i { opacity: 1; color: var(--fg); } }
.sx-prog .sx-prow.is-editing { display: flex; align-items: flex-start; gap: 6px; padding: 8px 0; }
.sx-prog .sx-prow.is-editing .sx-grow { flex: 1; }
.sx-prog .sx-prow.is-editing .sx-tool { margin-top: 6px; margin-right: -6px; }

.sx-prompt { display: block; width: 100%; min-height: 220px; resize: vertical; font-size: 15px; line-height: 1.5; }

.sx-ask { font-size: 13px; font-weight: 600; color: var(--fg); margin: 6px 0 0; }
.sx-ask:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .sx-prog .sx-days__lens, [data-screen="sport"] .sx-bar i, [data-screen="sport"] .sx-help__sum svg, .sx-backlink svg { transition: none; }
  [data-screen="sport"] .sx-help__body { animation: none; }
}

/* keyboard ring inside the row (PLAN v4 1.10): 8px of inner room each side, the text and the line stay in place */
[data-screen="sport"] .sx-nav__row, .sx-hrow { width: calc(100% + 16px); margin-inline: -8px; padding-inline: 8px; border-radius: 12px; border-bottom: 0; background: linear-gradient(var(--line), var(--line)) bottom center / calc(100% - 16px) 1px no-repeat; }
/* 320: "Шаги сегодня" keeps whole words (the number field gives a little room) */
@media (max-width: 340px) { [data-screen="sport"] .sx-steps__in { width: 108px; padding: 0 12px; } [data-screen="sport"] .sx-steps__l { overflow-wrap: normal; } }
@media (max-width: 400px) { .sx-grow__ph { font-size: 15px; } }   /* the example ("Приседания 3×10, бег 30 мин") whole on a phone */
/* 320: the card's text column is narrow, so "Скопировать запрос" may take two lines inside its button, with room around it */
@media (max-width: 340px) { [data-screen="sport"] .sx-ai__go { white-space: normal; max-width: 100%; padding: 6px 14px; line-height: 1.2; font-size: 13px; text-align: center; } }
@media (max-width: 340px) { .sx-grow__ph { font-size: 13.5px; letter-spacing: -0.015em; } }   /* 320: the example whole */

/* v5: AI prompt, Program and History always under the day (scroll down), never in a column beside it */
@media (min-width: 960px) {
  [data-screen="sport"][data-view="main"] .sx-board { grid-template-columns: minmax(0, 1fr); gap: 40px; max-width: 720px; }
}
/* v5: one column, so the whole screen (title, day, cards) is one centred column, in line with the tab bar */
[data-screen="sport"][data-view="main"].screen--wide { max-width: calc(720px + 2 * var(--pad)); }
[data-screen="sport"][data-view="main"] .sx-board { max-width: none; }

/* v8 (owner: "in the middle of the screen"): sport.js gives the board the height that puts its middle between the
   corner and the tab bar; its content sits in the middle of that height */
[data-screen="sport"][data-view="main"] .sx-board { align-content: center; }
/* a short day (no program yet, nothing planned): one narrow column in the middle, words centred */
[data-screen="sport"][data-view="main"] .sx-board.is-short { justify-items: center; gap: 28px; }
[data-screen="sport"] .sx-board.is-short > .sx-day, [data-screen="sport"] .sx-board.is-short > .sx-side { width: min(100%, 460px); }
[data-screen="sport"] .sx-board.is-short .sx-day { text-align: center; }
/* centred, the clipped "·" trick no longer hides the first dot: the line starts at 0 and the weekday has no dot */
[data-screen="sport"] .sx-board.is-short .sx-sub__in { justify-content: center; margin-left: 0; }
[data-screen="sport"] .sx-board.is-short .sx-sub__in > .sx-wd::before { content: none; }
[data-screen="sport"] .sx-board.is-short .sx-lead { margin-top: 12px; }
[data-screen="sport"] .sx-board.is-short .sx-text { margin-inline: auto; }
[data-screen="sport"] .sx-board.is-short .sx-ai { text-align: left; }

/* 2026-11-18 (owner: the "Sport" title stood alone in the corner while the day sat in the middle): the title is the
   first line of the day's block, the same size as every screen's title, in the block's column and alignment */
[data-screen="sport"] .sx-title { margin: 0 0 4px; overflow-wrap: anywhere; }
/* the weekday under it reads like the date under Food's title: quiet */
[data-screen="sport"] .sx-title + .sx-sub .sx-wd { color: var(--muted); font-weight: 500; }
[data-screen="sport"] .sx-top:has(+ .sx-board) { margin-bottom: 8px; }
