/* Focus screen (owner: Focus). Scope: [data-screen="focus"].
   A timer and a stopwatch (both may run), today's minutes, the last 7 days (settings.focusChart). */

/* the Focus colour follows the main action button (the app colour; blue while the app colour is Graphite),
   so the ring, today's bar and the Start button are one hue */
[data-screen="focus"] { --fc-accent: rgb(var(--cta-rgb, var(--accent-rgb))); }

/* the whole screen sits in the middle of the space between the title and the tab bar */
[data-screen="focus"] .fc-layout {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-content: center;
  min-height: var(--fc-room);
}
[data-screen="focus"] .fc-main { display: flex; flex-direction: column; align-items: center; gap: var(--fc-g); min-width: 0; }

/* ---------- Timer | Stopwatch ---------- */
[data-screen="focus"] .fc-seg { align-self: stretch; display: flex; justify-content: center; }
[data-screen="focus"] .fc-seg .segmented { width: min(100%, 340px); }
[data-screen="focus"] .fc-seg .segmented > button { flex: 1 1 0; min-width: 44px; min-height: 44px; padding: 4px 12px; white-space: normal; line-height: 1.2; }
[data-screen="focus"] .fc-seg__label { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; }
[data-screen="focus"] .fc-seg__label > span { min-width: 0; overflow-wrap: anywhere; }
/* the dot joins the label (the pair stays centred); it grows in, so nothing jumps */
[data-screen="focus"] .fc-seg__dot {
  flex: none; width: 0; height: 6px; margin-left: 0; border-radius: 3px;
  background: var(--fc-accent); opacity: 0; transform: scale(0.2);
  transition: width var(--dur) var(--ease-out), margin var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), background var(--dur);
}
[data-screen="focus"] .segmented > button:is([data-run="run"], [data-run="paused"]) .fc-seg__dot { width: 6px; margin-left: 7px; opacity: 1; transform: none; }
[data-screen="focus"] .segmented > button[data-run="run"] .fc-seg__dot { animation: fc-breathe 2.4s ease-in-out infinite; }
[data-screen="focus"] .segmented > button[data-run="paused"] .fc-seg__dot { background: var(--faint); }

/* ---------- the clock: a thin accent ring, the digits centred by their ink ---------- */
/* Budget for the clock after accounting for single-line controls and the gaps between them. */
[data-screen="focus"] {
  --fc-room: calc(100dvh - var(--safe-t) - 136px - var(--bottom-space));
  --fc-g: clamp(14px, calc((var(--fc-room) - 400px) / 6), 24px);
  --fc-fixed: calc(202px + 3.65 * var(--fc-g));
}
[data-screen="focus"] .fc-ring {
  --ring: min(300px, 76vw, max(150px, calc(var(--fc-room) - var(--fc-fixed))));
  position: relative; width: var(--ring); height: var(--ring); flex: none;
}
[data-screen="focus"] .fc-ring__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
[data-screen="focus"] .fc-ring__track { fill: none; stroke: rgb(var(--fg-rgb) / 0.09); stroke-width: 5; }
[data-screen="focus"] .fc-ring__arc {
  fill: none; stroke: var(--fc-accent); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 100 100; stroke-dashoffset: 0;
  transition: stroke-dashoffset 260ms linear, opacity var(--dur) var(--ease-out), stroke var(--dur) var(--ease-out), stroke-width var(--dur) var(--ease-out);
}
[data-screen="focus"] .fc-ring__arc.is-empty { opacity: 0; }
[data-screen="focus"] .fc-ring.is-paused .fc-ring__arc { stroke: rgb(var(--fg-rgb) / 0.32); }
[data-screen="focus"] .fc-ring.is-done .fc-ring__arc { animation: fc-ring-done 1.6s var(--ease-out); }

/* a faint disc inside the ring gives it depth without a border */
[data-screen="focus"] .fc-ring__face {
  --fs: calc(var(--ring) * 0.66 / var(--w, 3.32));
  position: absolute; inset: 0; border-radius: 50%;
}
[data-screen="focus"] .fc-ring__face::before {
  content: ""; position: absolute; inset: 12px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgb(var(--fg-rgb) / 0.045), rgb(var(--fg-rgb) / 0.012) 72%, transparent);
}
[data-screen="focus"] .fc-digits {
  position: absolute; left: 0; right: 0; top: 50%; height: 1em; margin-top: -0.5em;
  display: flex; align-items: baseline; justify-content: center;
  font-family: var(--f-sans); font-size: var(--fs); font-weight: 500; line-height: 1; letter-spacing: 0;
  font-variant-numeric: tabular-nums; color: var(--fg); white-space: nowrap;
  translate: 0 calc(var(--dy, 0.04) * 1em);
  transition: opacity var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
[data-screen="focus"] .fc-digits__d { display: inline-block; width: calc(var(--cell, 0.74) * 1em); text-align: center; }
[data-screen="focus"] .fc-digits__probe { position: absolute; visibility: hidden; font-size: 100px; line-height: 1; white-space: pre; }
[data-screen="focus"] .fc-digits__colon { display: inline-block; width: calc(var(--ccell, 0.36) * 1em); text-align: center; opacity: 0.55; translate: 0 calc(var(--cy, -0.06) * 1em); }
[data-screen="focus"] .fc-ring.is-paused .fc-digits { opacity: 0.5; }
[data-screen="focus"] .fc-ring.is-done .fc-ring__face { animation: fc-pop 900ms var(--ease-out); }

/* one quiet word under the digits (Paused, Done, Sure?) — placed below the ink, so the time stays exactly centred */
[data-screen="focus"] .fc-sub {
  position: absolute; left: 16%; right: 16%; top: calc(50% + var(--fs) * var(--ink, 0.72) / 2 + 16px);
  font: 500 13px/1.3 var(--f-sans); color: var(--muted); text-align: center; overflow-wrap: anywhere;
  opacity: 0; transform: translateY(-3px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
[data-screen="focus"] .fc-sub.is-shown { opacity: 1; transform: none; }
[data-screen="focus"] .fc-ring.is-done .fc-sub { color: var(--fg); }

/* ---------- under the clock: the minutes (timer) or one calm line; always the same height ---------- */
[data-screen="focus"] .fc-under { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; }
[data-screen="focus"] .fc-under > * { animation: fc-fade var(--dur) var(--ease-out); }
[data-screen="focus"] .fc-note { font: 500 14px/1.35 var(--f-sans); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
[data-screen="focus"] .fc-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 100%; }
[data-screen="focus"] .fc-chip { min-width: 52px; min-height: 44px; justify-content: center; font-variant-numeric: tabular-nums; }
[data-screen="focus"] .fc-custombox {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 4px; border-radius: var(--r-pill);
  background: rgb(var(--fg-rgb) / 0.07); color: var(--muted); cursor: text;
  transition: background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), color var(--dur);
}
@media (hover: hover) { [data-screen="focus"] .fc-custombox:hover { background: rgb(var(--fg-rgb) / 0.11); } }
[data-screen="focus"] .fc-custombox.is-on { box-shadow: inset 0 0 0 1.5px var(--fg); color: var(--fg); }
[data-screen="focus"] .fc-custombox:focus-within { box-shadow: inset 0 0 0 2px var(--fc-accent); }
[data-screen="focus"] .fc-custombox__unit { font: 500 13px/1 var(--f-sans); }
[data-screen="focus"] .fc-custom {
  width: 92px; min-height: 44px; padding: 0 0 0 10px; border: 0; background: none; color: var(--fg);
  font: 500 14px/1 var(--f-sans); font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; appearance: textfield;
}
[data-screen="focus"] .fc-custom:focus-visible { outline: none; }
[data-screen="focus"] .fc-custom::placeholder { color: var(--muted); }
[data-screen="focus"] .fc-custombox:has(.fc-custom:placeholder-shown) { padding-right: 4px; }
[data-screen="focus"] .fc-custombox:has(.fc-custom:placeholder-shown) .fc-custombox__unit { display: none; }
[data-screen="focus"] .fc-custombox.is-on .fc-custom { width: 52px; }
/* the field is as wide as its word ("Custom", "Своё") or the number typed, in every language */
@supports (field-sizing: content) {
  [data-screen="focus"] .fc-custom, [data-screen="focus"] .fc-custombox.is-on .fc-custom { field-sizing: content; width: auto; min-width: 44px; max-width: 120px; }
  [data-screen="focus"] .fc-custombox:has(.fc-custom:placeholder-shown) .fc-custom { padding: 0 10px; }
}
[data-screen="focus"] .fc-custom::-webkit-outer-spin-button,
[data-screen="focus"] .fc-custom::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Start · Stop  Pause/Resume ---------- */
/* Start, Stop and Pause share a row that can grow for longer labels. */
[data-screen="focus"] .fc-actions { display: flex; align-items: center; justify-content: center; gap: 12px; width: min(100%, 360px); min-height: 62px; flex: none; }
[data-screen="focus"] .fc-act {
  flex: 1 1 0; min-width: 44px; min-height: 56px; padding: 8px 16px; gap: 8px;
  font-size: 16px; letter-spacing: -0.005em; white-space: normal;
  animation: fc-fade var(--dur) var(--ease-out);
}
[data-screen="focus"] .fc-act__label { min-width: 0; overflow-wrap: anywhere; }
[data-screen="focus"] .fc-act svg { flex: none; width: 18px; height: 18px; }
[data-screen="focus"] .fc-act[data-ic="play"] svg, [data-screen="focus"] .fc-act[data-ic="stop"] svg { fill: currentColor; stroke-width: 1.2; }
[data-screen="focus"] .fc-act[data-ic="pause"] svg { stroke-width: 2.6; }
/* the big Start (and the lone Stop after the 4-hour pause): a filled accent pill with a glossy edge */
[data-screen="focus"] .fc-act--main { flex: 0 1 320px; min-height: 62px; font-size: 17px; gap: 10px; }
/* Pause: soft and filled; Stop: an outline */
[data-screen="focus"] .fc-act--soft { background: rgb(var(--fg-rgb) / 0.1); color: var(--fg); transition: background var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
@media (hover: hover) { [data-screen="focus"] .fc-act--soft:hover { background: rgb(var(--fg-rgb) / 0.15); opacity: 1; } }
@media (hover: hover) and (pointer: fine) {
  /* Leave more room for a pair of actions on desktop. */
  [data-screen="focus"] .fc-actions:has(.fc-act + .fc-act) { width: min(100%, 420px); }
  [data-screen="focus"] .fc-actions:has(.fc-act + .fc-act) .fc-act { padding-inline: 14px; }
}

/* ---------- the other clock, when it runs ---------- */
[data-screen="focus"] .fc-otherbox {
  display: grid; grid-template: 0fr / minmax(0, 1fr); max-width: 100%; opacity: 0; margin-top: calc(-1 * var(--fc-g));
  transition: grid-template-rows var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out), margin-top var(--dur) var(--ease-out);
}
[data-screen="focus"] .fc-otherbox__in { min-height: 0; overflow: hidden; display: flex; justify-content: center; padding: 0 4px; }
[data-screen="focus"] .fc-otherbox.is-shown { grid-template-rows: 1fr; opacity: 1; margin-top: calc(-0.35 * var(--fc-g)); }
[data-screen="focus"] .fc-otherbox:not(.is-shown) { pointer-events: none; }
[data-screen="focus"] .fc-other {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px;
  min-height: 44px; min-width: 44px; max-width: 100%; padding: 6px 12px;
  border: 0; border-radius: var(--r-pill); background: rgb(var(--fg-rgb) / 0.07); color: var(--fg);
  font: 500 14px/1.2 var(--f-sans); cursor: pointer;
  transition: background var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { [data-screen="focus"] .fc-other:hover { background: rgb(var(--fg-rgb) / 0.11); } }
[data-screen="focus"] .fc-other:active { transform: scale(0.96); }
[data-screen="focus"] .fc-other__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fc-accent); flex: none; }
[data-screen="focus"] .fc-other[data-run="run"] .fc-other__dot { animation: fc-breathe 2.4s ease-in-out infinite; }
[data-screen="focus"] .fc-other[data-run="paused"] .fc-other__dot { background: var(--faint); }
[data-screen="focus"] .fc-other__name { color: var(--muted); }
[data-screen="focus"] .fc-other__time { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-screen="focus"] .fc-other__state { color: var(--muted); font-size: 13px; }
[data-screen="focus"] :is(.fc-other__name, .fc-other__state) { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
[data-screen="focus"] .fc-other__state:empty { display: none; }
[data-screen="focus"] .fc-other svg { width: 16px; height: 16px; color: var(--faint); flex: none; }

/* ---------- today, the last 7 days ---------- */
/* one column (phones, tablets): the chart is about as wide as the clock column above it, centred under it */
[data-screen="focus"] .fc-stats { min-width: 0; width: 100%; max-width: 460px; justify-self: center; }
[data-screen="focus"] .fc-today {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 0 14px; border-bottom: 1px solid var(--line);
}
[data-screen="focus"] .fc-today__label, [data-screen="focus"] .fc-week__title { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
[data-screen="focus"] .fc-today__right { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
[data-screen="focus"] .fc-today__value { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-screen="focus"] .fc-live { width: 7px; height: 7px; border-radius: 50%; background: var(--fc-accent); opacity: 0; transform: scale(0.2); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
[data-screen="focus"] .fc-live.is-on { opacity: 1; transform: none; animation: fc-breathe 2.4s ease-in-out infinite; }

[data-screen="focus"] .fc-week { margin-top: 30px; }
[data-screen="focus"] .fc-week__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
[data-screen="focus"] .fc-week__total { font-size: 14px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

[data-screen="focus"] .fc-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
[data-screen="focus"] .fc-bars__col { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
[data-screen="focus"] .fc-bars__val {
  display: flex; align-items: baseline; justify-content: center; gap: 1px; height: 16px; max-width: 100%;
  font: 650 13px/16px var(--f-sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
[data-screen="focus"] .fc-bars__val small { margin-left: 2px; font-size: 10px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
[data-screen="focus"] .fc-bars__track { width: 100%; height: 112px; display: flex; align-items: flex-end; justify-content: center; }
[data-screen="focus"] .fc-bars__bar {
  position: relative; display: block; overflow: hidden;
  width: min(100%, 30px); height: calc(var(--h, 0) * 100%); min-height: 3px;
  border-radius: 8px 8px 4px 4px; background: rgb(var(--fg-rgb) / 0.22);
  transform-origin: bottom; transform: scaleY(0);
  transition: transform 720ms var(--ease-out) calc(var(--i, 0) * 45ms), height 600ms var(--ease-out), background var(--dur) var(--ease-out), border-radius var(--dur);
}
[data-screen="focus"] .fc-bars.is-in .fc-bars__bar { transform: none; }
[data-screen="focus"] .fc-bars__bar.is-today { background: var(--fc-accent); }
[data-screen="focus"] .fc-bars__bar.is-zero { height: 3px; border-radius: 2px; background: var(--line-strong); }
/* minutes on a running clock: the top of today's bar, lighter */
[data-screen="focus"] .fc-bars__live { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--l, 0) * 100%); background: rgb(255 255 255 / 0.3); transition: height 600ms var(--ease-out); }
[data-screen="focus"] .fc-bars__wd { font-size: 12px; font-weight: 500; color: var(--faint); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: clip; }
[data-screen="focus"] .fc-bars__wd.is-today { color: var(--fg); }
/* under the bars: the daily average and the best day, two quiet cells */
[data-screen="focus"] .fc-avg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line);
}
[data-screen="focus"] .fc-avg[hidden] { display: none; }
[data-screen="focus"] .fc-avg__cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
[data-screen="focus"] .fc-avg__cell + .fc-avg__cell { text-align: end; align-items: flex-end; }
[data-screen="focus"] .fc-avg__label { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
[data-screen="focus"] .fc-avg__line { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
[data-screen="focus"] .fc-avg__value { font-size: 16px; font-weight: 650; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
[data-screen="focus"] .fc-avg__day { font-size: 13px; font-weight: 500; color: var(--muted); }
[data-screen="focus"] .fc-empty { margin-top: 14px; font-size: var(--t-small); color: var(--muted); text-align: center; }

/* chart switched off in Settings: today's minutes become one quiet line under the buttons
   (one more gap and its 22px line come off the clock, so the column still fits above the tab bar) */
[data-screen="focus"] .fc-layout.is-solo { gap: var(--fc-g); --fc-fixed: calc(224px + 4.65 * var(--fc-g)); }
[data-screen="focus"] .fc-layout.is-solo .fc-today { min-height: 22px; }
[data-screen="focus"] .fc-layout.is-solo .fc-stats { width: auto; max-width: 100%; justify-self: center; }
[data-screen="focus"] .fc-layout.is-solo .fc-today { justify-content: center; gap: 8px; padding: 0; border: 0; }
[data-screen="focus"] .fc-layout.is-solo .fc-today__label { font-size: 15px; font-weight: 500; letter-spacing: -0.005em; color: var(--muted); }
[data-screen="focus"] .fc-layout.is-solo .fc-today__value { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
[data-screen="focus"] .fc-layout.is-solo .fc-today__right { flex-direction: row-reverse; gap: 7px; }

/* focus rings: the app-wide inner, rounded ring (base.css); the minutes field shows its own accent edge */

/* ---------- motion ---------- */
@keyframes fc-breathe { 50% { opacity: 0.35; } }
@keyframes fc-fade { from { opacity: 0; transform: translateY(3px); } }
@keyframes fc-pop { 0% { transform: scale(1); } 35% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes fc-ring-done { 0% { stroke-width: 5; } 30% { stroke-width: 9; } 100% { stroke-width: 5; } }

/* ---------- narrow phones ---------- */
@media (max-width: 400px) {
  [data-screen="focus"] .fc-act { padding-inline: 12px; }
  [data-screen="focus"] .fc-pick { gap: 6px; }
  [data-screen="focus"] .fc-chip { min-width: 46px; padding: 0 12px; }
  [data-screen="focus"] .fc-bars { gap: 6px; }
  [data-screen="focus"] .fc-bars__track { height: 96px; }
}

/* ---------- computer (v6): one centred column, like Sport — the clock fills the first screen, today and the week
   follow under it (as on a phone), all in line with the tab bar ---------- */
[data-screen="focus"].screen--wide { max-width: calc(720px + 2 * var(--pad)); }
@media (min-width: 960px) {
  [data-screen="focus"] { --fc-g: clamp(14px, calc((var(--fc-room) - 400px) / 6), 26px); }
  [data-screen="focus"] .fc-ring { --ring: min(320px, max(150px, calc(var(--fc-room) - var(--fc-fixed)))); }
  [data-screen="focus"] .fc-stats { max-width: 520px; }
}
@media (min-width: 1500px) {
  [data-screen="focus"] .fc-ring { --ring: min(360px, max(150px, calc(var(--fc-room) - var(--fc-fixed)))); }
}
/* v6: Stop is filled with the app colour (.btn--accent); its key hint, if any, reads on the colour */
[data-screen="focus"] .fc-act--stop { color: var(--on-accent, #fff); }

@media (prefers-reduced-motion: reduce) {
  [data-screen="focus"] .fc-ring__arc, [data-screen="focus"] .fc-bars__bar, [data-screen="focus"] .fc-bars__live,
  [data-screen="focus"] .fc-otherbox, [data-screen="focus"] .fc-sub, [data-screen="focus"] .fc-seg__dot { transition: none; }
  [data-screen="focus"] .fc-under > *, [data-screen="focus"] .fc-act, [data-screen="focus"] .fc-ring.is-done .fc-ring__face,
  [data-screen="focus"] .fc-ring.is-done .fc-ring__arc, [data-screen="focus"] .fc-live.is-on,
  [data-screen="focus"] .fc-other__dot, [data-screen="focus"] .fc-seg__dot { animation: none !important; }
}
/* a narrow phone: a label that does not fit takes a second line instead of being cut ("В среднем за день") */
[data-screen="focus"] .fc-avg__label { white-space: normal; text-overflow: clip; overflow-wrap: normal; line-height: 1.25; }
/* a narrow phone: each day's amount stays inside its own column and inside the page */
@media (max-width: 360px) { [data-screen="focus"] .fc-bars__val { font-size: 11px; letter-spacing: -0.03em; } [data-screen="focus"] .fc-bars__val small { font-size: 9px; margin-left: 1px; } [data-screen="focus"] .fc-bars { gap: 4px; } }
/* 320: a day's amount stands as a number with its unit under it, so neighbours never run together ("30 мин45 мин") */
@media (max-width: 340px) {
  [data-screen="focus"] .fc-bars__val { flex-direction: column; align-items: center; height: auto; min-height: 26px; line-height: 13px; font-size: 12px; }
  [data-screen="focus"] .fc-bars__val small { margin-left: 0; font-size: 9.5px; line-height: 11px; }
}

/* ---------- v7: the plan this focus is on, above the digits ---------- */
[data-screen="focus"] .fc-task {
  position: absolute; left: 18%; right: 18%; bottom: calc(50% + var(--fs) * var(--ink, 0.72) / 2 + 14px);
  font: 500 13px/1.3 var(--f-sans); color: var(--muted); text-align: center; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  opacity: 0; transition: opacity var(--dur) var(--ease-out);
}
[data-screen="focus"] .fc-task.is-shown { opacity: 1; }

/* ---------- v7: the result after a session (in the place of the other clock's pill) ---------- */
[data-screen="focus"] .fc-result__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
[data-screen="focus"] .fc-result {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; min-height: 44px; padding: 6px 12px; border-radius: var(--r-pill);
  background: rgb(var(--fg-rgb) / 0.07); color: var(--fg); font: 500 14px/1.2 var(--f-sans); font-variant-numeric: tabular-nums;
}
[data-screen="focus"] .fc-result__t { min-width: 0; overflow-wrap: anywhere; }
[data-screen="focus"] .fc-result__ic { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--fc-accent); color: #fff; flex: none; }
[data-screen="focus"] .fc-result__ic svg { width: 12px; height: 12px; stroke-width: 3; }
[data-screen="focus"] .fc-result__mark {
  min-width: 44px; min-height: 44px; max-width: 100%; padding: 6px 14px; border: 0; border-radius: var(--r-pill); background: none; cursor: pointer;
  font: 600 14px/1.2 var(--f-sans); color: var(--fc-accent); -webkit-tap-highlight-color: transparent;
  overflow-wrap: anywhere;
}
@media (hover: hover) { [data-screen="focus"] .fc-result__mark:hover { background: rgb(var(--fg-rgb) / 0.06); } }

/* ---------- v7: background sound: a pill in the title row, a sheet to pick ---------- */
[data-screen="focus"] .fc-amb {
  display: inline-flex; align-items: center; gap: 7px; min-width: 44px; min-height: 44px; max-width: 46vw; padding: 6px 12px;
  border: 0; border-radius: var(--r-pill); background: rgb(var(--fg-rgb) / 0.07); color: var(--muted); cursor: pointer;
  font: 500 14px/1.2 var(--f-sans); text-align: start; -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
[data-screen="focus"] .fc-amb svg { width: 17px; height: 17px; flex: none; }
[data-screen="focus"] .fc-amb__t, [data-screen="focus"] .topbar .title { min-width: 0; overflow-wrap: anywhere; }
[data-screen="focus"] .fc-amb.is-on { color: var(--fg); }
[data-screen="focus"] .fc-amb[data-playing="true"] svg { color: var(--fc-accent); }
[data-screen="focus"] .fc-amb:active { transform: scale(0.95); }
@media (hover: hover) { [data-screen="focus"] .fc-amb:hover { background: rgb(var(--fg-rgb) / 0.11); } }

.fc-amb-note { margin: 0 0 12px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.fc-amb-list { display: flex; flex-direction: column; }
.fc-amb-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--fg); cursor: pointer; text-align: left; font: 500 16px/1.3 var(--f-sans); letter-spacing: -0.01em;
  -webkit-tap-highlight-color: transparent;
}
.fc-amb-item:last-child { border-bottom: 0; }
.fc-amb-item__ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgb(var(--fg-rgb) / 0.07); color: var(--muted); }
.fc-amb-item__ic svg { width: 18px; height: 18px; }
.fc-amb-item__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fc-amb-item__mark { flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: var(--accent); opacity: 0; }
.fc-amb-item__mark svg { width: 18px; height: 18px; stroke-width: 2.6; }
.fc-amb-item[aria-checked="true"] .fc-amb-item__mark { opacity: 1; }
.fc-amb-item[aria-checked="true"] .fc-amb-item__ic { background: rgb(var(--accent-rgb) / 0.16); color: var(--accent); }
.fc-amb-item__lock { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: var(--r-pill); background: rgb(var(--fg-rgb) / 0.07); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fc-amb-item__lock svg { width: 13px; height: 13px; }
.fc-amb-item.is-locked .fc-amb-item__name { color: var(--muted); }
@media (hover: hover) { .fc-amb-item:hover { background: rgb(var(--fg-rgb) / 0.04); } }
.fc-amb-vol { padding: 16px 4px 4px; }
.fc-amb-vol .slider { height: 44px; }
.fc-amb-vol[hidden] { display: none; }
.fc-amb-vol__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--muted); }
.fc-amb-vol__top svg { width: 17px; height: 17px; }

/* shop9 (2026-11-18): the Background sound list — each sound with its ▶ beside it (a taste, nothing chosen) */
.fc-amb-row { display: flex; align-items: center; gap: 8px; min-width: 0; border-bottom: 1px solid var(--line); }
.fc-amb-row:last-child { border-bottom: 0; }
.fc-amb-row > .fc-amb-item { flex: 1 1 auto; min-width: 0; border-bottom: 0; }
.fc-amb-play {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgb(var(--fg-rgb) / .08); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.fc-amb-play svg { width: 15px; height: 15px; fill: currentColor; }
.fc-amb-play .amb-listen__play svg { margin-left: 2px; }
@media (hover: hover) { .fc-amb-play:hover { background: rgb(var(--fg-rgb) / .14); } }
.fc-amb-play:active { transform: scale(.9); }
.fc-amb-play:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
