/* Progress (owner: Progress). Screen scope [data-screen="progress"]; the day sheet renders outside
   #screen and use the .pg- prefix. Content only: no glass here except what the shell gives sheets and controls. */

/* ---------- title and one line ---------- */
[data-screen="progress"] .pg-line { margin-top: 10px; overflow: hidden; color: var(--muted); font-size: var(--t-body); line-height: 1.4; }
[data-screen="progress"] .pg-line__in { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 2px; margin-left: -22px; }
[data-screen="progress"] .pg-line__bit { display: inline-flex; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
[data-screen="progress"] .pg-line__bit .pg-line__sep { flex: none; width: 22px; text-align: center; }
/* days in a row: the corner's fire, grey until today counts */
[data-screen="progress"] .pg-fire { display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; }
[data-screen="progress"] .pg-fire__ico { display: inline-flex; align-self: center; width: 18px; height: 18px; }
/* fire10: the flame is ui/flame.js's own drawing (the corner's colours); no outline icon, no blurred shadow on a raster */
[data-screen="progress"] .pg-fire__ico svg { display: block; width: 18px; height: 18px; shape-rendering: geometricPrecision; }
[data-screen="progress"] .pg-fire.is-lit { color: var(--fg); }
.pg-line__sep { color: var(--faint); }

/* ---------- columns: one on phones, two on wide screens ---------- */
[data-screen="progress"] .pg-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
[data-screen="progress"] .pg-col { min-width: 0; }
@media (min-width: 960px) {
  [data-screen="progress"] .pg-col > .pg-sec:first-child { margin-top: 28px; }
  [data-screen="progress"] .pg-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; align-items: start; }
}

[data-screen="progress"] .pg-sec { margin-top: 40px; }
[data-screen="progress"] .pg-h2 { font-size: var(--t-h2); font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; overflow-wrap: anywhere; }
.pg-h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; overflow-wrap: anywhere; }
[data-screen="progress"] .pg-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 8px; color: var(--muted); font-size: var(--t-small); overflow-wrap: anywhere; }

/* hairline lists */
[data-screen="progress"] .pg-list { list-style: none; margin-top: 12px; border-top: 1px solid var(--line); }
[data-screen="progress"] .pg-list > li { border-bottom: 1px solid var(--line); min-width: 0; }

/* ---------- days: small rings, Monday first ---------- */
[data-screen="progress"] .pg-cal { margin-top: 14px; }
[data-screen="progress"] .pg-cal__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
[data-screen="progress"] .pg-cal__wd span { text-align: center; font-size: 11px; font-weight: 500; color: var(--faint); padding-bottom: 6px; }
[data-screen="progress"] .pg-cal__cell {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0;
  padding: 4px 0 6px; border: 0; border-radius: 14px; background: none; color: inherit; font: inherit;
  -webkit-tap-highlight-color: transparent;
}
[data-screen="progress"] button.pg-cal__cell { cursor: pointer; transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast); }
[data-screen="progress"] button.pg-cal__cell:active { transform: scale(0.92); }
@media (hover: hover) { [data-screen="progress"] button.pg-cal__cell:hover { background: var(--hover); } }
[data-screen="progress"] .pg-cal__ring { display: grid; place-items: center; width: 40px; height: 40px; }
[data-screen="progress"] .pg-cal__ring svg { width: 40px; height: 40px; }
/* fire10: a missed day is one thin ring at low contrast (calm, still readable); days to come stay a small dot */
[data-screen="progress"] .pg-cal__ring svg.pg-miss circle { stroke: rgb(var(--fg-rgb) / 0.22); stroke-width: 1.5; }
[data-screen="progress"] .pg-cal__cell.is-miss .pg-cal__num { color: var(--faint); }
[data-screen="progress"] .pg-cal__cell.is-empty .pg-cal__ring::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }
[data-screen="progress"] .pg-cal__num { font-size: 10.5px; font-weight: 500; line-height: 1; color: var(--faint); font-variant-numeric: tabular-nums; }
[data-screen="progress"] .pg-cal__cell.is-today .pg-cal__num { color: var(--fg); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
/* legend: what a gap means */
[data-screen="progress"] .pg-legend { margin-top: 14px; font-size: var(--t-small); line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; text-wrap: balance; }   /* if it wraps on a narrow phone, two even lines, never one word alone */
@media (min-width: 960px) {
  [data-screen="progress"] .pg-cal__ring, [data-screen="progress"] .pg-cal__ring svg { width: 46px; height: 46px; }
}

/* ---------- habits: 14 dots ---------- */
[data-screen="progress"] .pg-hb { padding: 14px 0 15px; }
[data-screen="progress"] .pg-hb__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
[data-screen="progress"] .pg-hb__name { flex: 1; min-width: 0; font-size: var(--t-body); font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; overflow-wrap: anywhere; }
[data-screen="progress"] .pg-hb__n { flex: none; font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-screen="progress"] .pg-hb__dots { display: flex; gap: 6px; margin-top: 10px; }
[data-screen="progress"] .pg-hb__dots i { flex: none; width: 12px; height: 12px; border-radius: 50%; }
[data-screen="progress"] .pg-hb__dots i.is-done { background: var(--fg); }
[data-screen="progress"] .pg-hb__dots i.is-missed { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
[data-screen="progress"] .pg-hb__dots i.is-today { box-shadow: inset 0 0 0 1.5px rgb(var(--fg-rgb) / 0.7); }
[data-screen="progress"] .pg-hb__dots i.is-off { background: radial-gradient(circle, var(--line-strong) 0 1.6px, transparent 2px); }
@media (max-width: 380px) { [data-screen="progress"] .pg-hb__dots { gap: 5px; } [data-screen="progress"] .pg-hb__dots i { width: 11px; height: 11px; } }

/* ---------- food: calories this week ---------- */
[data-screen="progress"] .pg-kc { margin-top: 16px; }
[data-screen="progress"] .pg-kc__plot { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; height: 96px; border-bottom: 1px solid var(--line); }
[data-screen="progress"] .pg-kc__col { display: flex; align-items: flex-end; justify-content: center; height: 100%; min-width: 0; }
[data-screen="progress"] .pg-kc__bar { display: block; width: min(100%, 26px); border-radius: 6px 6px 2px 2px; background: rgb(var(--fg-rgb) / 0.42); transition: height 500ms var(--ease-out); }
[data-screen="progress"] .pg-kc__bar.is-today { background: var(--fg); }
[data-screen="progress"] .pg-kc__bar.is-over { box-shadow: inset 0 2px 0 rgb(var(--fg-rgb) / 0.85); }   /* over the target: a quiet cap, never a warning colour */
[data-screen="progress"] .pg-kc__bar.is-today.is-over { background: var(--fg); }
[data-screen="progress"] .pg-kc__target { position: absolute; left: 0; right: 0; z-index: 1; height: 0; border-top: 1.5px dashed rgb(var(--fg-rgb) / 0.4); pointer-events: none; }
[data-screen="progress"] .pg-kc__wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
[data-screen="progress"] .pg-kc__wd span { text-align: center; font-size: 11px; font-weight: 500; color: var(--faint); }
[data-screen="progress"] .pg-kc__wd span.is-today { color: var(--fg); font-weight: 650; }

/* ---------- weight ---------- */
[data-screen="progress"] .pg-w__stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; margin-top: 10px; }
[data-screen="progress"] .pg-w__now { font-size: 20px; font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-screen="progress"] .pg-w__when { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; font-size: var(--t-body); color: var(--muted); overflow-wrap: anywhere; }
[data-screen="progress"] .pg-w__chg { flex-basis: 100%; font-size: var(--t-small); color: var(--muted); overflow-wrap: anywhere; }
[data-screen="progress"] .pg-w__chart { width: 100%; height: 56px; margin-top: 12px; overflow: visible; color: var(--fg); }
[data-screen="progress"] .pg-w__form { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
[data-screen="progress"] .pg-w__field { position: relative; flex: 0 1 150px; min-width: 0; }
[data-screen="progress"] .pg-w__input { min-height: 44px; padding: 10px 40px 10px 14px; font-variant-numeric: tabular-nums; }
[data-screen="progress"] .pg-w__unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: var(--t-small); color: var(--muted); pointer-events: none; }
[data-screen="progress"] .pg-w__go { min-height: 44px; padding: 0 22px; }

/* ---------- sport ---------- */
[data-screen="progress"] .pg-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
[data-screen="progress"] .pg-kv span { min-width: 0; color: var(--muted); font-size: var(--t-body); overflow-wrap: anywhere; }
[data-screen="progress"] .pg-kv b { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
[data-screen="progress"] .pg-kv + .pg-list { margin-top: 0; border-top: 0; }
[data-screen="progress"] .pg-row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 12px 0;
  border: 0; background: none; color: var(--fg); text-align: left; cursor: pointer;
  font: 600 var(--t-body)/1.3 var(--f-sans); letter-spacing: -0.015em;
  -webkit-tap-highlight-color: transparent;
}
[data-screen="progress"] .pg-row:active { opacity: 0.7; }
[data-screen="progress"] .pg-row__date { flex: none; min-width: 58px; font-size: var(--t-small); font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
[data-screen="progress"] .pg-row__main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
[data-screen="progress"] .pg-row svg { flex: none; width: 18px; height: 18px; color: var(--faint); transition: transform var(--dur-fast) var(--ease-out), color var(--dur-fast); }
@media (hover: hover) { [data-screen="progress"] .pg-row:hover svg { color: var(--fg); transform: translateX(3px); } }

/* ================= sheets (outside #screen) ================= */

/* ---------- one day ---------- */
.pg-day__head { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.pg-day__head svg.stone { flex: none; }
.pg-day__status { min-width: 0; font-size: 19px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; overflow-wrap: anywhere; }
.pg-day__status.is-miss { color: var(--muted); }
.pg-day__parts { list-style: none; margin-top: 20px; border-top: 1px solid var(--line); }
.pg-day__parts li { padding: 13px 0 14px; border-bottom: 1px solid var(--line); }
.pg-day__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pg-day__k { min-width: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.pg-day__pts { flex: none; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-day__parts .bar { margin-top: 10px; height: 4px; }
.pg-day__note { margin-top: 6px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.pg-day__parts li.is-none .pg-day__pts { color: var(--muted); }
.pg-day__none { margin-top: 18px; color: var(--muted); }
.pg-day__block { margin-top: 24px; }
.pg-day__block > .pg-h3 { font-size: 12px; font-weight: 500; letter-spacing: 0.01em; color: var(--muted); margin-bottom: 8px; }
.pg-day__plans { list-style: none; }
.pg-day__plans li { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; }
.pg-day__tick { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.pg-day__plans li.is-done .pg-day__tick { background: rgb(var(--fg-rgb) / 0.14); box-shadow: none; }
.pg-day__tick svg { width: 13px; height: 13px; }
.pg-day__plan { min-width: 0; font-size: var(--t-body); line-height: 1.4; overflow-wrap: anywhere; }
.pg-day__plans li.is-done .pg-day__plan { color: var(--muted); }
.pg-day__text { font-size: 16px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

/* a hard day's one small step */
.pg-step { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 10px; font-size: var(--t-body); line-height: 1.45; overflow-wrap: anywhere; }
.pg-step > span { min-width: 0; }
.pg-step__l { font-size: 12px; font-weight: 500; color: var(--muted); }
.pg-step svg { width: 15px; height: 15px; color: var(--green); align-self: center; flex: none; }

/* keyboard ring inside the row (PLAN v4 1.10): 8px of inner room each side, the text stays in place */
[data-screen="progress"] .pg-row { width: calc(100% + 16px); margin-inline: -8px; padding-inline: 8px; border-radius: 12px; }
/* a narrow phone (360): each day's ring leaves 4px on its sides, so the keyboard ring is drawn inside the day too */
@media (max-width: 959px) {
  [data-screen="progress"] .pg-cal__ring { width: min(40px, calc(100% - 8px)); height: auto; aspect-ratio: 1; }
  [data-screen="progress"] .pg-cal__ring svg { width: 100%; height: 100%; }
}
/* the weight check: a small change of the calorie target, offered under the weight */
[data-screen="progress"] .pg-adapt { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-m); background: rgb(var(--cta-rgb) / 0.1); box-shadow: inset 0 0 0 1px rgb(var(--cta-rgb) / 0.25); }
[data-screen="progress"] .pg-adapt__text { flex: 1 1 200px; margin: 0; font-size: var(--t-small); line-height: 1.4; }

/* v6: the app colour where Progress used to be grey — done habit dots, today's calorie bar, the weight line and the
   bars in a day's breakdown (the bar--accent class) */
[data-screen="progress"] .pg-hb__dots i.is-done { background: var(--accent); }
[data-screen="progress"] .pg-kc__bar.is-today, [data-screen="progress"] .pg-kc__bar.is-today.is-over { background: var(--accent); }
[data-screen="progress"] .pg-w__chart { color: var(--accent); }
.pg-day__parts .bar--accent > i { background: var(--accent); }

/* ================= v6 insights ================= */
/* rows that open a sheet: an icon in front, a small second line */
[data-screen="progress"] .pg-links { margin-top: 14px; }
[data-screen="progress"] .pg-row__ico { flex: none; display: grid; place-items: center; width: 22px; color: var(--muted); }
[data-screen="progress"] .pg-row__ico svg { width: 19px; height: 19px; color: inherit; }
@media (hover: hover) { [data-screen="progress"] .pg-row:hover .pg-row__ico svg { color: inherit; transform: none; } }
[data-screen="progress"] .pg-row__main { display: flex; flex-direction: column; gap: 2px; }
[data-screen="progress"] .pg-row__sub { font-size: var(--t-small); font-weight: 500; color: var(--muted); letter-spacing: 0; overflow-wrap: anywhere; }
[data-screen="progress"] .pg-row .pg-row__date { min-width: 0; text-align: right; white-space: nowrap; }

/* what affects your day */
[data-screen="progress"] .pg-aff__empty { margin-top: 10px; color: var(--muted); font-size: var(--t-body); line-height: 1.45; overflow-wrap: anywhere; text-wrap: pretty; }
[data-screen="progress"] .pg-aff__bar { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
[data-screen="progress"] .pg-aff__bar .bar { flex: 1; height: 6px; max-width: 260px; }
[data-screen="progress"] .pg-aff__item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0 15px; }
[data-screen="progress"] .pg-aff__n {
  flex: none; min-width: 52px; padding: 5px 0; border-radius: var(--r-pill); text-align: center;
  font-size: 15px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
}
[data-screen="progress"] .pg-aff__n.is-down { color: var(--muted); background: rgb(var(--fg-rgb) / 0.07); }
[data-screen="progress"] .pg-aff__body { flex: 1; min-width: 0; }
[data-screen="progress"] .pg-aff__text { font-size: var(--t-body); font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; overflow-wrap: anywhere; text-wrap: pretty; }
[data-screen="progress"] .pg-aff__sub { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; font-size: var(--t-small); color: var(--muted); overflow-wrap: anywhere; }

/* this month and last */
[data-screen="progress"] .pg-mo__grid { margin-top: 12px; border-top: 1px solid var(--line); }
[data-screen="progress"] .pg-mo__row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
[data-screen="progress"] .pg-mo__head { padding: 8px 0; font-size: 12px; font-weight: 500; color: var(--faint); }
[data-screen="progress"] .pg-mo__head span, [data-screen="progress"] .pg-mo__v { text-align: right; min-width: 0; overflow-wrap: anywhere; }
[data-screen="progress"] .pg-mo__k { min-width: 0; font-size: var(--t-body); color: var(--muted); overflow-wrap: anywhere; }
[data-screen="progress"] .pg-mo__v { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
[data-screen="progress"] .pg-mo__v.is-prev { color: var(--muted); font-weight: 550; }
[data-screen="progress"] .pg-mo__v.is-up { color: var(--accent); }

/* the week */
[data-screen="progress"] .pg-wk__goal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 10px; font-size: var(--t-body); font-weight: 600; overflow-wrap: anywhere; }
[data-screen="progress"] .pg-wk__goal .muted { font-weight: 500; font-size: var(--t-small); }
[data-screen="progress"] .pg-wk__dot, .wk-goal__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
[data-screen="progress"] .pg-wk__review.is-ready .pg-row__ico { color: var(--accent); }

/* sleep: 30 nights and the goal line */
[data-screen="progress"] .pg-sl__chart { margin-top: 16px; }
[data-screen="progress"] .pg-sl__plot { position: relative; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 96px; border-bottom: 1px solid var(--line); }
[data-screen="progress"] .pg-sl__col { display: flex; align-items: flex-end; justify-content: center; height: 100%; min-width: 0; }
[data-screen="progress"] .pg-sl__bar { display: block; width: min(100%, 10px); border-radius: 4px 4px 1px 1px; background: rgb(var(--fg-rgb) / 0.3); transition: height 500ms var(--ease-out); }
[data-screen="progress"] .pg-sl__bar.is-met { background: color-mix(in srgb, var(--accent) 72%, transparent); }
[data-screen="progress"] .pg-sl__bar.is-today { background: var(--accent); }
[data-screen="progress"] .pg-sl__goal { position: absolute; left: 0; right: 0; z-index: 1; height: 0; border-top: 1.5px dashed rgb(var(--fg-rgb) / 0.45); pointer-events: none; }
[data-screen="progress"] .pg-sl__goaltag { position: absolute; right: 0; bottom: 3px; padding: 0 4px; border-radius: 4px; font-size: 11px; font-weight: 600; color: var(--muted); background: rgb(var(--bg-rgb) / 0.7); font-variant-numeric: tabular-nums; }
[data-screen="progress"] .pg-sl__x { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 11px; font-weight: 500; color: var(--faint); white-space: nowrap; }
[data-screen="progress"] .pg-sl__steady { margin-top: 22px; }
[data-screen="progress"] .pg-sl__steady .pg-list { margin-top: 8px; }
[data-screen="progress"] .pg-sl__st { display: flex; align-items: center; gap: 14px; padding: 12px 0 13px; }
[data-screen="progress"] .pg-sl__pm { flex: none; min-width: 52px; padding: 5px 0; border-radius: var(--r-pill); text-align: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); background: rgb(var(--fg-rgb) / 0.07); }
[data-screen="progress"] .pg-sl__pm.is-steady { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
[data-screen="progress"] .pg-sl__stt { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: var(--t-body); font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; overflow-wrap: anywhere; }
[data-screen="progress"] .pg-sl__sub { font-size: var(--t-small); font-weight: 500; letter-spacing: 0; color: var(--muted); }

/* letter */
[data-screen="progress"] .pg-lt__go.is-open .pg-row__ico { color: var(--accent); }

/* ---------- Today: this week's goal line (mounted by Today) ---------- */
.wk-goal {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; max-width: 100%; min-height: 32px; padding: 4px 0;
  border: 0; background: none; color: var(--fg); font: 600 var(--t-small)/1.3 var(--f-sans); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wk-goal__dot { width: 7px; height: 7px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.wk-goal__t { min-width: 0; overflow-wrap: anywhere; }
.wk-goal__n { color: var(--muted); font-weight: 500; }
.wk-goal:active { opacity: 0.7; }

/* ---------- Today: an opened letter (mounted by Today) ---------- */
.lt-notice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-m); background: color-mix(in srgb, var(--accent) 11%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent); min-width: 0; }
.lt-notice__ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.lt-notice__ico svg { width: 18px; height: 18px; }
.lt-notice__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--t-small); color: var(--muted); overflow-wrap: anywhere; }
.lt-notice__txt b { font-size: var(--t-body); font-weight: 650; color: var(--fg); letter-spacing: -0.015em; }
.lt-notice__go { flex: none; }

/* ================= v6 sheets ================= */
/* week review */
.rv-range { margin-top: -2px; color: var(--muted); font-size: var(--t-body); }
.rv-rings { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-top: 16px; }
.rv-day { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.rv-day__ring { display: grid; place-items: center; width: min(40px, 100%); aspect-ratio: 1; }
.rv-day__ring svg { width: 100%; height: 100%; }
.rv-day.is-out .rv-day__ring::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }
.rv-day__wd { font-size: 11px; font-weight: 500; color: var(--faint); }
.rv-day.is-today .rv-day__wd { color: var(--fg); font-weight: 700; }
.rv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rv-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rv-stat b { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.rv-stat b .cur { width: 12px; height: 14px; color: var(--accent); }
.rv-stat span { font-size: 12px; color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
.rv-rows { margin-top: 4px; }
.rv-row { display: flex; flex-direction: column; gap: 3px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rv-row__k { font-size: 12px; font-weight: 500; color: var(--muted); }
.rv-row__v { font-size: var(--t-body); font-weight: 600; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.rv-row__s { font-size: 12px; color: var(--muted); }
.rv-goal { margin-top: 22px; }
.rv-goal__hint { margin-top: 4px; font-size: var(--t-small); color: var(--muted); overflow-wrap: anywhere; }
.rv-goal__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rv-goal__chips .chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.rv-share { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 24px; }

/* year in rings */
.yr-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-height: 22px; font-size: var(--t-body); color: var(--muted); overflow-wrap: anywhere; }
.yr-info b { color: var(--fg); font-weight: 650; }
.yr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.yr-legend__i { display: inline-flex; align-items: center; gap: 6px; }
.yr-legend .yr-d { width: 12px; height: 12px; }
.yr-cal { margin-top: 8px; }
.yr-year { margin: 18px 0 6px; font-size: 13px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.yr-m { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 6px; padding: 3px 0; }
.yr-m.is-lazy { min-height: 46px; }
.yr-m__name { padding-top: 4px; font-size: 11px; font-weight: 600; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yr-cells { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px 2px; }
.yr-d {
  --p: 0; --c: var(--accent);
  position: relative; display: block; width: 100%; aspect-ratio: 1; max-width: 22px; margin: 0 auto; padding: 0; border: 0; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgb(var(--fg-rgb) / 0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
button.yr-d::after { content: ''; position: absolute; inset: -3px; }   /* a slightly larger tap area */
.yr-d.is-low { --c: color-mix(in srgb, var(--accent) 50%, transparent); }
.yr-d.is-pending { --c: color-mix(in srgb, var(--accent) 60%, transparent); }
.yr-d.is-miss { background: rgb(var(--fg-rgb) / 0.12); }
.yr-d.is-rest { background: repeating-conic-gradient(rgb(var(--fg-rgb) / 0.3) 0 20deg, transparent 20deg 40deg); }
.yr-d.is-none { background: none; -webkit-mask: none; mask: none; cursor: default; }
.yr-d.is-none::before { content: ''; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; border-radius: 50%; background: var(--line); }
.yr-d.is-today { outline: 1.5px solid var(--fg); outline-offset: 1px; -webkit-mask: none; mask: none; background: radial-gradient(farthest-side, rgb(var(--bg-rgb)) calc(100% - 3px), transparent calc(100% - 2.5px)), conic-gradient(var(--c) calc(var(--p) * 1%), rgb(var(--fg-rgb) / 0.12) 0); }
.yr-d.is-picked { -webkit-mask: none; mask: none; background: var(--c); }
.yr-d.is-picked.is-miss, .yr-d.is-picked.is-rest { background: var(--fg); }
@media (min-width: 720px) {
  .yr-cells { grid-template-columns: repeat(31, minmax(0, 1fr)); }
  .yr-m.is-lazy { min-height: 22px; }
}

/* letter to yourself */
.lt-read { margin-top: 2px; padding: 16px 18px; border-radius: var(--r-m); background: rgb(var(--fg-rgb) / 0.05); box-shadow: inset 0 0 0 1px var(--line); }
.lt-read__from { font-size: 12px; font-weight: 500; color: var(--muted); }
.lt-read__text { margin-top: 8px; font-size: 16px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.lt-write { margin-top: 18px; }
.lt-read + .lt-write { margin-top: 26px; }
.lt-hint { margin-top: 4px; font-size: var(--t-small); color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.lt-box { margin-top: 12px; width: 100%; min-height: 140px; }
.lt-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.lt-seal { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.lt-seal span { min-width: 0; overflow-wrap: anywhere; text-align: left; }
.lt-count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lt-block { margin-top: 24px; }
.lt-block > .pg-h3 { font-size: 12px; font-weight: 500; letter-spacing: 0.01em; color: var(--muted); margin-bottom: 6px; }
.lt-list { list-style: none; border-top: 1px solid var(--line); }
.lt-list > li { border-bottom: 1px solid var(--line); min-width: 0; }
.lt-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 10px 0; border: 0; background: none; color: var(--fg); font: 600 var(--t-body)/1.3 var(--f-sans); text-align: left; }
li.lt-item.is-sealed { border-bottom: 1px solid var(--line); }
.lt-list > li.lt-item { border-bottom: 1px solid var(--line); }
button.lt-item { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.lt-item:active { opacity: 0.7; }
.lt-item svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.lt-item__main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lt-item__sub { flex: none; font-size: var(--t-small); font-weight: 500; color: var(--muted); }
.lt-item.is-new svg:first-child { color: var(--accent); }
.lt-item.is-current .lt-item__main { color: var(--accent); }
[data-screen="progress"] .pg-row__main { overflow-wrap: break-word; }   /* words wrap whole ("Разбор прошлой недели" split "прош/лой" at 320) */
[data-screen="progress"] .pg-row__main .pg-row__sub { font-size: 13px; color: var(--muted); font-weight: 500; }

/* v8: "Review last week" and its dates: on one line when they fit (the dates at the end, on the title's baseline),
   otherwise the dates on a clean second line right under the title; the chevron stays in the middle of the row */
[data-screen="progress"] .pg-wk__main { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 12px; row-gap: 2px; }
[data-screen="progress"] .pg-wk__title { min-width: 0; }
[data-screen="progress"] .pg-wk__main .pg-row__date { text-align: left; }
