/* Day flow (js/screens/dayflow.js): the "what next" line under the ring, Start / Close the day, mood in one tap,
   "Yesterday is empty". Prefix .df-. On Today the pieces are scoped to [data-screen="today"]. */

/* ---------- the line under the ring: one fixed height (two short lines), so the ring never moves ---------- */
:root { --df-hint-h: 40px; }
[data-screen="today"] .td-ring:has(.df-hint) { padding-bottom: 14px; }
@media (min-width: 1024px) { [data-screen="today"] .td-ring:has(.df-hint) { padding-bottom: 0; } }
[data-screen="today"] .df-hint {
  box-sizing: border-box; display: flex; align-items: flex-start; justify-content: center; gap: 6px;
  width: 100%; max-width: 360px; margin: 0 auto; padding: 0 8px; overflow: hidden;
  font-size: 14px; font-weight: 500; line-height: 1.38; letter-spacing: -0.01em; color: var(--muted); text-align: center;
  font-variant-numeric: tabular-nums; transition: opacity var(--dur-fast) var(--ease-out);
}
[data-screen="today"] .df-hint__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: balance; }
[data-screen="today"] .df-hint.is-empty { visibility: hidden; }
/* a picked facet names itself where the stone ends; the line steps back meanwhile */
[data-screen="today"] .td-stone.has-facet + .df-hint { opacity: 0.35; }
@media (min-width: 1024px) { [data-screen="today"] .df-hint { max-width: 460px; font-size: 15px; } }

/* ---------- Start / Close the day: one calm glass button ---------- */
[data-screen="today"] .df-flow-slot:not([hidden]) { margin-bottom: 14px; }
.df-flow {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 14px 10px 10px; border: 0; border-radius: 18px;
  cursor: pointer; text-align: left; font: inherit; color: var(--fg);
  background: linear-gradient(150deg, rgb(var(--cta-rgb) / 0.16), rgb(var(--cta-rgb) / 0.06) 60%, rgb(var(--fg-rgb) / 0.03));
  box-shadow: inset 0 0 0 1px rgb(var(--cta-rgb) / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.06), 0 18px 36px -28px rgb(0 0 0 / 0.7);
  -webkit-tap-highlight-color: transparent; transition: background-color .15s ease, transform var(--dur-fast) var(--ease-out);
}
@media (hover: hover) { .df-flow:hover { background-color: rgb(var(--fg-rgb) / 0.04); } }
.df-flow:active { transform: scale(0.99); }
.df-flow:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.df-flow__ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgb(var(--cta-rgb) / 0.2); color: rgb(var(--cta-rgb)); }
:root[data-theme="dark"] .df-flow__ic { color: #fff; background: rgb(var(--cta-rgb) / 0.55); }
.df-flow__ic svg { width: 21px; height: 21px; }
.df-flow__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.df-flow__title { font-size: 16px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.df-flow__sub { font-size: 13px; color: var(--muted); line-height: 1.3; }
.df-flow__chev { flex: none; color: var(--muted); display: grid; place-items: center; }
.df-flow__chev svg { width: 18px; height: 18px; }

/* ---------- mood in one tap and the day menu: one row of a fixed height ---------- */
[data-screen="today"] .df-bar[hidden], [data-screen="today"] .df-flow-slot[hidden], [data-screen="today"] .df-bar [hidden] { display: none; }
/* Settings › Sections › "Mood on Today" off: only the day menu stays, small, on the right */
[data-screen="today"] .df-bar.is-menu-only { justify-content: flex-end; height: 44px; border-bottom: 0; }
[data-screen="today"] .df-bar { display: flex; align-items: center; gap: 8px; height: 56px; margin: 0 0 4px; border-bottom: 1px solid var(--line); }
[data-screen="today"] .df-bar__label { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 550; letter-spacing: -0.01em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.df-faces { display: flex; align-items: center; gap: 2px; flex: none; }
.df-face {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted);
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.df-face__svg { width: 26px; height: 26px; }
@media (hover: hover) { .df-face:hover { color: var(--fg); background: var(--hover); } }
.df-face:active { transform: scale(0.92); }
.df-face.is-on { color: rgb(var(--cta-rgb)); background: rgb(var(--cta-rgb) / 0.14); }
:root[data-theme="dark"] .df-face.is-on { color: #fff; background: rgb(var(--cta-rgb) / 0.5); }
.df-face:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.df-menu { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--muted); cursor: pointer; }
@media (hover: hover) { .df-menu:hover { color: var(--fg); background: var(--hover); } }
.df-menu svg { width: 20px; height: 20px; }
@media (max-width: 420px) { [data-screen="today"] .df-bar { gap: 6px; } [data-screen="today"] .df-bar .df-faces { gap: 0; } [data-screen="today"] .df-bar .df-face { width: 38px; height: 38px; } [data-screen="today"] .df-bar__label { font-size: 14px; } }
@media (max-width: 380px) { .df-face { width: 36px; height: 36px; } .df-face__svg { width: 24px; height: 24px; } [data-screen="today"] .df-bar__label { font-size: 14px; } }
@media (max-width: 340px) { [data-screen="today"] .df-bar__label { display: none; } [data-screen="today"] .df-bar { justify-content: space-between; } }

/* ---------- "Yesterday is empty": a quiet glass card ---------- */
.df-yday {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 12px 12px 12px 12px; border-radius: 16px;
  background: rgb(var(--fg-rgb) / 0.045); box-shadow: inset 0 0 0 1px var(--line);
}
.df-yday__ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgb(var(--fg-rgb) / 0.07); color: var(--muted); }
.df-yday__ic svg { width: 17px; height: 17px; }
.df-yday__text { flex: 1 1 180px; min-width: 0; margin: 0; font-size: 15px; font-weight: 550; letter-spacing: -0.01em; line-height: 1.3; }
.df-yday__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.df-yday__actions .btn { min-height: 36px; white-space: nowrap; }
[data-screen="today"] .td-notice-slot .df-yday { border: 0; }

/* ---------- the sheets ---------- */
.df-form { display: grid; gap: 18px; }
.df-lead { margin: -2px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
/* the line at the top of Start / Close the day: where the answers go (one quiet line) */
.df-lead.df-where { margin: -6px 0 -6px; font-size: 13px; color: var(--muted); }
.df-field > span { font-size: 13px; }
.df-row { display: flex; gap: 10px; align-items: stretch; }
.df-row .df-time { flex: 1; min-width: 0; }
.df-now { flex: none; min-height: 48px; }
.df-input { width: 100%; box-sizing: border-box; font-size: 16px; }
.df-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.df-chip { max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.df-chip[aria-checked="true"] { background: var(--fg); color: var(--bg); }
.df-faces--big { justify-content: space-between; max-width: 340px; }
.df-faces--big .df-face { width: 52px; height: 52px; }
.df-faces--big .df-face__svg { width: 32px; height: 32px; }
.df-go { width: 100%; margin-top: 2px; }

/* the day menu */
.df-menu-list { display: grid; }
.df-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 8px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; border-radius: 0; }
.df-item:last-child { border-bottom: 0; }
@media (hover: hover) { .df-item:hover .df-item__title { opacity: 0.8; } }
.df-item:focus-visible { outline: 2px solid var(--fg); outline-offset: -2px; border-radius: 12px; }
.df-item__ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgb(var(--fg-rgb) / 0.07); color: var(--muted); }
.df-item__ic svg { width: 19px; height: 19px; }
.df-item__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.df-item__title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.df-item__sub { font-size: 13px; color: var(--muted); line-height: 1.3; }
.df-item__chev { flex: none; color: var(--muted); display: grid; place-items: center; }
.df-item__chev svg { width: 17px; height: 17px; }

@media (prefers-reduced-motion: reduce) { .df-flow, .df-face, .df-hint { transition: none; } }

/* ---------- Start / Close the day (owner 2026-11-19): two pills side by side, always on Today ----------
   They used to hide in the ⋯ menu outside the morning and the evening. The one due now is lit in the app colour,
   one done today shows a check (and still opens to change the answers). */
[data-screen="today"] .df-flow-slot:not([hidden]) { margin-bottom: 10px; }
.df-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.df-act {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 48px; padding: 6px 12px;
  border: 0; border-radius: var(--r-pill, 999px); cursor: pointer; font: inherit; color: var(--fg);
  background: rgb(var(--fg-rgb) / 0.05); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgb(255 255 255 / 0.05);
  -webkit-tap-highlight-color: transparent; transition: background-color .15s ease, box-shadow .15s ease, transform var(--dur-fast) var(--ease-out);
}
@media (hover: hover) { .df-act:hover { background-color: rgb(var(--fg-rgb) / 0.08); } }
.df-act:active { transform: scale(0.97); }
.df-act:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.df-act__ic { flex: none; display: grid; place-items: center; color: var(--muted); }
.df-act__ic svg { width: 18px; height: 18px; }
.df-act__title { min-width: 0; font-size: 14px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
/* the one due now: lit in the app colour */
.df-act.is-due {
  background: linear-gradient(150deg, rgb(var(--cta-rgb) / 0.22), rgb(var(--cta-rgb) / 0.09) 70%);
  box-shadow: inset 0 0 0 1px rgb(var(--cta-rgb) / 0.4), inset 0 1px 0 rgb(255 255 255 / 0.06), 0 14px 28px -22px rgb(var(--cta-rgb) / 0.9);
}
.df-act.is-due .df-act__ic { color: rgb(var(--cta-rgb)); }
:root[data-theme="dark"] .df-act.is-due .df-act__ic { color: #fff; }
/* done today: quiet, with a check */
.df-act.is-done { background: transparent; }
.df-act.is-done .df-act__ic { color: rgb(var(--cta-rgb)); }
.df-act.is-done .df-act__title { color: var(--muted); }
@media (max-width: 360px) { .df-act { padding-inline: 8px; gap: 6px; } .df-act__title { font-size: 13px; } }

/* Owner 2026-11-20: «Start the day» / «Close the day» without edges. The drawn edge line goes, a faint fill stays. */
.df-act { box-shadow: none; background: rgb(255 255 255 / 0.07); }
:root[data-theme="light"] .df-act { background: rgb(255 255 255 / 0.55); }
@media (hover: hover) {
  .df-act:hover { background-color: rgb(255 255 255 / 0.11); }
  :root[data-theme="light"] .df-act:hover { background-color: rgb(255 255 255 / 0.8); }
}
.df-act.is-due { box-shadow: 0 14px 28px -22px rgb(var(--cta-rgb) / 0.9); }
.df-act.is-done { background: rgb(255 255 255 / 0.04); }
:root[data-theme="light"] .df-act.is-done { background: rgb(255 255 255 / 0.35); }
