@import url('./weekplan/weekplan.css?v=24897a7b3503');
@import url('./focusfriends/focusfriends.css?v=24897a7b3503');
@import url('./sleep/sleep.css?v=24897a7b3503');
@import url('./autoplan/autoplan.css?v=24897a7b3503');
/* Jawna Pro - dark + soft gold (Fawz home layout). Light theme = cream. RTL via logical properties. */
:root, :root[data-theme="dark"] {
  --bg: #000; --bg2: #0b0b0c; --panel: #111112; --card: #1a1a1c; --card2: #222225; --line: rgba(255, 255, 255, .08);
  --text: #f4efe6; --sub: #9a958c; --mute: #6c685f;
  --gold: #e8c27a; --gold2: #f5dca6; --gold-deep: #b8873b; --gold-ink: #1b1306; --gold-soft: rgba(232, 194, 122, .14);
  --danger: #ff6b5e; --ok: #7bd389; --ev: #7fb2ff; --tile-a: #2b2b2d; --tile-b: #141415; --hero-a: #1c1a17; --hero-b: #0e0e0f;
  --shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, .55);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Arabic", "Segoe UI", Roboto, "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  --num: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f1e7; --bg2: #efe8da; --panel: #fffaf1; --card: #fff; --card2: #f6efe2; --line: rgba(60, 40, 10, .1);
  --text: #1d1a14; --sub: #6f6758; --mute: #a39a88;
  --gold: #a87526; --gold2: #c8963f; --gold-deep: #8d6020; --gold-ink: #fff; --gold-soft: rgba(168, 117, 38, .12);
  --danger: #d23c2e; --ok: #2f9b4a; --ev: #2f6fd6; --tile-a: #2b2b2d; --tile-b: #161617; --hero-a: #23201b; --hero-b: #111;
  --shadow: 0 0.5rem 1.5rem rgba(60, 40, 10, .12);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); font-size: 100%; }
/* iPad / desktop = the phone look, bigger (owner rule). All sizes are rem, so one root size scales the whole app (no CSS zoom: WebKit zoom breaks touch math). */
@media (min-width: 760px) and (min-height: 700px) { html { font-size: 120%; } }
@media (min-width: 960px) and (min-height: 960px) { html { font-size: 130%; } }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text); font: 1.0625rem/1.35 var(--font); overscroll-behavior-y: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) calc(env(safe-area-inset-bottom) + 1.5rem) env(safe-area-inset-left); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { opacity: .35; cursor: default; }
svg { width: 1.5rem; height: 1.5rem; fill: currentColor; stroke: currentColor; flex: none; }
.ticon { stroke: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 0.125rem solid var(--gold); outline-offset: 0.125rem; }
html.ringing body { overflow: hidden; }
.view { max-width: 35rem; margin: 0 auto; }
.view.enter { animation: enter .22s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view.enter { animation: none; } }
.pad { padding: 0 1rem; }
.card { background: var(--card); border-radius: 1.125rem; }
.num, .hm, .ring-time, .sw-time, .hero-count, .strip-time, .cal-n, .stat-tile b, .sum-big { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* ---------- Home ---------- */
.home { padding: 1.125rem 0.875rem 0.5rem; }
.home-date { text-align: center; margin-bottom: 1rem; }
.date-line { margin: 0.25rem 0 0.625rem; font-size: 1.375rem; font-weight: 700; letter-spacing: .2px; }
.hijri-pill { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.5rem 1.125rem; border-radius: 62.4375rem; background: rgba(232, 194, 122, .13); color: var(--gold); font-weight: 700; font-size: 1.125rem; }
:root[data-theme="light"] .hijri-pill { background: rgba(168, 117, 38, .12); }
.hijri-pill .moon { width: 1.125rem; height: 1.125rem; stroke: none; }
.hero { position: relative; overflow: hidden; border-radius: 1.875rem; margin-bottom: 0.875rem; color: #f4efe6;
  background: radial-gradient(120% 90% at 0% 0%, rgba(232, 194, 122, .28), transparent 55%), radial-gradient(80% 80% at 10% 100%, rgba(184, 135, 59, .18), transparent 60%), linear-gradient(160deg, var(--hero-a), var(--hero-b));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06); }
[dir="rtl"] .hero { background: radial-gradient(120% 90% at 0% 0%, rgba(232, 194, 122, .28), transparent 55%), radial-gradient(80% 80% at 10% 100%, rgba(184, 135, 59, .18), transparent 60%), linear-gradient(200deg, var(--hero-a), var(--hero-b)); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-radial-gradient(circle at 0% 0%, rgba(232, 194, 122, .07) 0 1px, transparent 1px 1.125rem); -webkit-mask-image: linear-gradient(90deg, #000, transparent 60%); mask-image: linear-gradient(90deg, #000, transparent 60%); }
[dir="rtl"] .hero::before { -webkit-mask-image: linear-gradient(90deg, #000, transparent 60%); mask-image: linear-gradient(90deg, #000, transparent 60%); }
.hero-main { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 0.625rem; width: 100%; padding: 1.375rem 1.375rem 0.75rem; text-align: start; }
.hero-right { min-width: 0; flex: 1 1 auto; }
.hero-lbl { margin: 0 0 0.25rem; color: var(--gold); font-weight: 700; font-size: 1.125rem; }
:root[data-theme="light"] .hero-lbl { color: #e8c27a; }
.hero-title { margin: 0 0 0.5rem; font-size: 2.375rem; line-height: 1.12; font-weight: 800; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-time { margin: 0; font-size: 1.125rem; color: #d9d2c4; }
.hero-time b { font-family: var(--num); font-size: 1.625rem; color: #f4efe6; }
.hero-day { color: #b3ab9b; font-size: 0.9375rem; }
.hero-left { flex: none; text-align: center; }
.hero-left-lbl { margin: 0; color: #b3ab9b; font-size: 0.9375rem; font-weight: 600; }
.hero-count { margin: 0; font-size: 2.5rem; font-weight: 800; letter-spacing: 1px; color: var(--gold2); direction: ltr; }
:root[data-theme="light"] .hero-count { color: #f5dca6; }
.hero-sub { margin: 0; color: #b3ab9b; font-size: 1rem; }
.hero.empty .hero-title { font-size: 1.875rem; }
.hero-cta { position: relative; display: flex; gap: 0.625rem; padding: 0.25rem 1.375rem 1.125rem; flex-wrap: wrap; }
.strip { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.25rem; padding: 0.375rem 0.625rem 0.875rem; }
.strip-item { display: flex; flex-direction: column; align-items: center; gap: 0.125rem; padding: 0.625rem 0.25rem; border-radius: 1rem; min-width: 0; color: #f4efe6; }
.strip-item.on { background: rgba(255, 255, 255, .08); }
.strip-item.on .strip-title { color: var(--gold2); }
.strip-item.past { opacity: .55; }
.strip-title { font-weight: 700; font-size: 0.9375rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-time { font-size: 0.9375rem; color: #c9c1b1; white-space: nowrap; }
.strip-time small { font-size: 0.75rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.625rem; padding: 0.625rem; border-radius: 1.875rem; background: var(--panel); box-shadow: inset 0 1px 0 var(--line); }
:root[data-theme="light"] .grid { background: #1a1917; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.375rem; aspect-ratio: 1 / 1; border-radius: 1.375rem; overflow: hidden;
  isolation: isolate;
  background-color: #111214;
  background-image: radial-gradient(110% 85% at 38% 0%, rgba(231, 190, 116, .095), transparent 67%), linear-gradient(180deg, rgba(255,255,255,.015), rgba(0,0,0,.43)), image-set(url("./art/tiles/a/texture@1x.webp?v=7b90f54b4e44") 1x, url("./art/tiles/a/texture@2x.webp?v=d64789f5bed0") 2x, url("./art/tiles/a/texture@3x.webp?v=d5bcd8520feb") 3x);
  background-size: auto, auto, 280px 280px;
  background-repeat: no-repeat, no-repeat, repeat;
  box-shadow: inset 0 1px 0 rgba(231, 190, 116, .20), inset 0 -0.625rem 1.5rem rgba(0, 0, 0, .38), 0 0.375rem 0.875rem rgba(0, 0, 0, .35);
  transition: transform .12s ease; color: #f4efe6; }
.tile > * { z-index: 1; }
/* proart-a: satin graphite and a fine double gold bevel, independent of tile shape. */
.tile::before { content: ""; position: absolute; inset: 0.3125rem; pointer-events: none;
  border-radius: 1.0625rem; border: 1px solid rgba(231, 190, 116, .22);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.48), inset 0 0 0 3px rgba(231,190,116,.08), 0 -1px 0 rgba(255,248,234,.045); }
.tile:active { transform: scale(.96); }
.tile .ticon { width: 58%; height: auto; max-width: 5.25rem; margin-top: 0.25rem; }
.tile-lbl { font-weight: 700; font-size: 1.0625rem; line-height: 1.1; }
.tile-bar { width: 1.375rem; height: 0.1875rem; border-radius: 0.1875rem; background: var(--gold); opacity: .9; margin-bottom: 0.125rem; }
:root[data-theme="light"] .tile-bar { background: #e8c27a; }
.tile-badge { position: absolute; top: 0.5rem; inset-inline-end: 0.5rem; min-width: 1.375rem; height: 1.375rem; padding: 0 0.375rem; border-radius: 0.6875rem; background: var(--gold); color: #1b1306; font: 700 0.8125rem/1.375rem var(--num); text-align: center; }
:root[data-theme="light"] .tile-badge { background: #e8c27a; }
.tile.is-live::after { content: ""; position: absolute; top: 0.625rem; inset-inline-start: 0.625rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0.25rem rgba(123, 211, 137, .18); }

/* ---------- Screen header ---------- */
.phead { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 3rem 1fr 3rem; align-items: center; padding: 0.5rem 0.5rem 0.375rem; margin-top: calc(-1 * env(safe-area-inset-top)); padding-top: calc(env(safe-area-inset-top) + 0.5rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(1rem); backdrop-filter: blur(1rem); }
.phead h1 { margin: 0; text-align: center; font-size: 1.25rem; font-weight: 800; }
.icon-btn { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 1.375rem; color: var(--gold); }
.icon-btn:active { background: var(--gold-soft); }
.icon-btn.ghost { pointer-events: none; }
.icon-btn.add { background: var(--gold-soft); }
.icon-btn.danger { color: var(--danger); }
.icon-btn.tiny { width: 2rem; height: 2rem; font-size: 1.375rem; color: var(--mute); }
[dir="rtl"] .icon-btn.back svg, [dir="rtl"] .cal-bar .icon-btn:not(.flip) svg, [dir="ltr"] .cal-bar .flip svg { transform: scaleX(-1); }
[dir="rtl"] .chev { transform: scaleX(-1); }

/* ---------- Common bits ---------- */
.section-title { margin: 1.375rem 0.25rem 0.5rem; font-size: 0.9375rem; font-weight: 700; color: var(--sub); }
.empty { text-align: center; color: var(--sub); padding: 2.5rem 0.75rem; margin: 0; }
.empty.small { padding: 1.125rem 0.75rem; }
.note { color: var(--mute); font-size: 0.8125rem; text-align: center; margin: 1.125rem 0.5rem; }
.hint { color: var(--sub); font-size: 0.8125rem; margin: -0.25rem 0.375rem 0.625rem; }
.link { color: var(--gold); font-weight: 600; padding: 0.5rem 0.25rem; }
.link.danger, .danger { color: var(--danger); }
.link.strong { font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5625rem 1rem; border-radius: 62.4375rem; background: var(--card2); font-weight: 600; font-size: 0.9375rem; white-space: nowrap; }
.pill svg { width: 1.125rem; height: 1.125rem; }
.pill.gold { background: var(--gold); color: #1b1306; }
.hero .pill:not(.gold) { background: rgba(255, 255, 255, .1); color: #f4efe6; }
.seg { display: flex; padding: 0.1875rem; border-radius: 0.75rem; background: var(--card2); gap: 0.125rem; }
.seg button { flex: 1; padding: 0.5rem 0.375rem; border-radius: 0.5625rem; font-size: 0.875rem; font-weight: 600; color: var(--sub); white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 0.25rem rgba(0, 0, 0, .25); }
:root[data-theme="dark"] .seg button.on { background: #38383b; }
.pad > .seg { margin: 0.375rem 0 0.75rem; }
.seg.small button { font-size: 0.8125rem; }
.chips { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.125rem 0 0.75rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.center { justify-content: center; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.4375rem 0.875rem; border-radius: 62.4375rem; background: var(--card); color: var(--sub); font-size: 0.875rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--line); }
.chip.on { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.chip.add svg { width: 1rem; height: 1rem; }
.next-line { text-align: center; color: var(--gold); font-weight: 600; margin: 0.375rem 0 0.75rem; }

/* Lists */
.list { list-style: none; margin: 0 0 0.75rem; padding: 0; overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: 0.625rem; padding: 0.25rem 0.75rem; min-height: 3.5rem; background: var(--card); position: relative; transition: transform .18s ease, opacity .25s ease; }
.item.leaving { opacity: 0; transform: translateX(1.25rem); }
[dir="rtl"] .item.leaving { transform: translateX(-1.25rem); }
.item.dragging { z-index: 3; box-shadow: var(--shadow); transition: none; border-radius: 0.75rem; }
.sorting .item:not(.dragging) { transition: transform .15s ease; }
.item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.125rem; padding: 0.625rem 0; text-align: start; }
.item-title { font-size: 1.0625rem; overflow-wrap: anywhere; }
.is-done .item-title { color: var(--mute); text-decoration: line-through; }
.item-notes { font-size: 0.875rem; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.item-meta { display: flex; flex-wrap: wrap; gap: 0.375rem; align-items: center; }
.meta-chip { font-size: 0.75rem; color: var(--sub); background: var(--card2); padding: 0.125rem 0.5rem; border-radius: 0.5rem; }
.due { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.875rem; color: var(--gold); }
.due.late { color: var(--danger); }
.mini { width: 0.875rem; height: 0.875rem; }
.circle { flex: none; display: grid; place-items: center; width: 1.625rem; height: 1.625rem; border-radius: 50%; border: 0.125rem solid var(--mute); color: transparent; transition: background .15s, border-color .15s; }
.circle svg { width: 1rem; height: 1rem; }
.circle.on { background: var(--gold); border-color: var(--gold); color: #1b1306; }
.circle.ghost { border-style: dashed; opacity: .6; }
.circle.small { width: 1.375rem; height: 1.375rem; }
.circle.small svg { width: 0.8125rem; height: 0.8125rem; }
.flag-btn { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; color: var(--mute); }
.flag-btn svg { width: 1.25rem; height: 1.25rem; }
.flag-btn.on { color: var(--gold); }
.flag-btn.big { width: 2.75rem; height: 2.75rem; }
.grip { display: grid; place-items: center; width: 2.125rem; height: 2.75rem; color: var(--mute); touch-action: none; }
.grip svg { width: 1.25rem; height: 1.25rem; }
.done-bar { display: flex; justify-content: space-between; padding: 0.25rem 0.25rem 0.5rem; }
.quick { display: flex; align-items: center; gap: 0.625rem; padding: 0.375rem 0.5rem 0.375rem 0.875rem; margin-bottom: 0.75rem; }
[dir="rtl"] .quick { padding: 0.375rem 0.875rem 0.375rem 0.5rem; }
.quick-input { flex: 1; min-width: 0; border: 0; background: none; padding: 0.625rem 0; outline: none; font-size: 1.0625rem; }
.quick-btn { padding: 0.5rem 0.875rem; border-radius: 0.75rem; background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: 0.9375rem; }

/* Alarms */
.alarm { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 1rem; background: var(--card); }
.alarm-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 0.375rem 0; text-align: start; }
.alarm-time { display: flex; align-items: baseline; gap: 0.375rem; direction: ltr; }
[dir="rtl"] .alarm-time { flex-direction: row-reverse; }
.alarm-time .hm { font-size: 3.125rem; font-weight: 300; line-height: 1.05; letter-spacing: -1px; }
.alarm-time .ampm { font-size: 1.25rem; font-weight: 500; }
.alarm-sub { font-size: 0.875rem; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.alarm.off .alarm-time, .alarm.off .alarm-sub { color: var(--mute); }
.switch { position: relative; flex: none; width: 3.1875rem; height: 1.9375rem; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .knob { position: absolute; inset: 0; border-radius: 1rem; background: var(--card2); transition: background .2s; box-shadow: inset 0 0 0 1px var(--line); }
.switch .knob::after { content: ""; position: absolute; top: 0.125rem; inset-inline-start: 0.125rem; width: 1.6875rem; height: 1.6875rem; border-radius: 50%; background: #fff; box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked + .knob { background: var(--gold); }
.switch input:checked + .knob::after { transform: translateX(1.25rem); }
[dir="rtl"] .switch input:checked + .knob::after { transform: translateX(-1.25rem); }

/* Fields / sheets */
.group { background: var(--card); border-radius: 1rem; margin-bottom: 0.875rem; overflow: hidden; }
.sheet .group { background: var(--card2); }
:root[data-theme="dark"] .sheet .group { background: #232326; }
.group-lbl { margin: 0; padding: 0.75rem 1rem 0.25rem; font-size: 0.8125rem; font-weight: 700; color: var(--sub); }
.field { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 3.125rem; padding: 0.375rem 1rem; color: inherit; text-decoration: none; }
.group > * + .field, .group > .field + * { border-top: 1px solid var(--line); }
.field-label { flex: none; font-size: 1rem; }
.field-value { color: var(--sub); font-size: 0.9375rem; text-align: end; }
.field input[type="text"], .field select { min-width: 0; flex: 1; text-align: end; }
.inline { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
/* Task deadline: date + time pills; an empty pill shows its label, the real input sits on top (tap opens the picker). */
.dl-pill { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 5.25rem; min-height: 2.25rem; padding: 0 0.625rem; border-radius: 0.625rem; background: var(--line); cursor: pointer; }
.dl-pill input { padding: 0.25rem 0; min-height: 1.875rem; }
.dl-pill .dl-ph { display: none; color: var(--sub); font-weight: 600; font-size: 0.9375rem; pointer-events: none; }
.dl-pill.empty .dl-ph { display: inline; }
.dl-pill.empty input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.dl-row { flex-wrap: wrap; row-gap: 0.375rem; }
.dl-row .field-label { white-space: nowrap; }
.dl { flex-wrap: nowrap; margin-inline-start: auto; gap: 0.375rem; }
.dl-pill input { width: auto; max-width: 10em; text-align: center; }
.quick-due { flex: none; color: var(--gold); }
input[type="text"], input[type="search"], input[type="number"], textarea, select, input[type="date"], input[type="time"] { border: 0; background: none; outline: none; color: inherit; font-size: 1rem; }
select { -webkit-appearance: none; appearance: none; color: var(--gold); font-weight: 600; padding: 0.375rem 0; cursor: pointer; }
input[type="date"], input[type="time"] { color: var(--gold); font-weight: 600; font-family: var(--num); padding: 0.375rem 0; min-height: 2.125rem; }
.big-input { width: 100%; padding: 0.875rem 1rem; font-size: 1.125rem !important; font-weight: 600; }
textarea { width: 100%; padding: 0.75rem 1rem; resize: none; line-height: 1.5; border-top: 1px solid var(--line) !important; }
.title-row { display: flex; align-items: center; padding-inline-end: 0.375rem; }
.time-wrap { display: flex; justify-content: center; padding: 0.5rem 0 1.125rem; }
.time-big { font-size: 3.5rem !important; font-weight: 300 !important; color: var(--text) !important; text-align: center; background: var(--card2) !important; border-radius: 1.125rem; padding: 0.375rem 1.125rem !important; }
.days { display: flex; justify-content: space-between; gap: 0.375rem; width: 100%; }
.days-field { padding: 0.625rem 0.75rem 0.875rem; }
.day { flex: 1; aspect-ratio: 1; max-width: 2.625rem; border-radius: 50%; background: var(--card); font-weight: 700; font-size: 0.875rem; color: var(--sub); }
.sheet .day { background: var(--bg2); }
:root[data-theme="dark"] .sheet .day { background: #333336; }
.day.on { background: var(--gold) !important; color: #1b1306; }
.subs { list-style: none; margin: 0; padding: 0 0.5rem; }
.sub { display: flex; align-items: center; gap: 0.625rem; padding: 0.25rem 0.5rem; min-height: 2.75rem; }
.sub input { flex: 1; min-width: 0; padding: 0.5rem 0; }
.sub.on input { color: var(--mute); text-decoration: line-through; }
.sub.add { padding: 0.25rem 1rem 0.5rem; }
.sheet { position: fixed; inset: 0; z-index: 30; }
.sheet-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .2s; }
.sheet-panel { position: absolute; inset-inline: 0; bottom: 0; max-width: 35rem; margin: 0 auto; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--card); border-radius: 1.375rem 1.375rem 0 0; transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -0.625rem 2.5rem rgba(0, 0, 0, .4); }
:root[data-theme="dark"] .sheet-panel { background: #19191b; }
.sheet-panel.tall { height: 92vh; height: 92dvh; }
.sheet.open .sheet-back { opacity: 1; }
.sheet.open .sheet-panel { transform: none; }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.sheet-head .link:last-child { justify-self: end; }
.sheet-head .link:first-child { justify-self: start; }
.sheet-body { flex: 1; overflow-y: auto; padding: 0.875rem 0.875rem 0.375rem; -webkit-overflow-scrolling: touch; }
.sheet-panel.tall .sheet-body { display: flex; flex-direction: column; }
.note-editor { flex: 1; border-top: 0 !important; font-size: 1.0625rem !important; min-height: 50vh; }
.sheet-foot { padding: 0.375rem 0.875rem 0.875rem; display: flex; justify-content: center; }
.sheet-foot.row { justify-content: space-between; align-items: center; gap: 0.625rem; border-top: 1px solid var(--line); padding-top: 0.625rem; }
.danger-btn { width: 100%; padding: 0.875rem; border-radius: 0.875rem; background: rgba(255, 107, 94, .12); color: var(--danger); font-weight: 700; }
.toast { position: fixed; z-index: 40; inset-inline: 1rem; bottom: calc(env(safe-area-inset-bottom) + 1.125rem); max-width: 32.5rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 1rem; border-radius: 1rem; background: #2c2c2f; color: #fff; box-shadow: var(--shadow); font-size: 0.9375rem; }
.toast .link { color: var(--gold2); padding: 0; }
.sound-hint { position: fixed; z-index: 20; inset-inline: 1rem; bottom: calc(env(safe-area-inset-bottom) + 0.875rem); max-width: 32.5rem; margin: 0 auto; padding: 0.75rem; border-radius: 0.875rem; background: var(--gold); color: #1b1306; font-weight: 700; font-size: 0.9375rem; }

/* Ring screen */
.ring { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1.5rem; color: #f4efe6;
  background: radial-gradient(120% 70% at 50% 0%, rgba(232, 194, 122, .25), transparent 60%), #050505; }
.ring-inner { width: 100%; max-width: 26.25rem; text-align: center; display: flex; flex-direction: column; align-items: center; }
.ring-kind { margin: 0 0 0.375rem; color: var(--gold2); font-weight: 700; letter-spacing: .5px; font-size: 1.125rem; }
.ring-clock { display: flex; align-items: baseline; gap: 0.5rem; direction: ltr; font-family: var(--num); margin-bottom: 0.375rem; }
.ring-clock .hm { font-size: 5.5rem; font-weight: 200; line-height: 1; }
.ring-clock .ampm { font-size: 1.625rem; }
.ring-title { margin: 0.5rem 0 0.125rem; font-size: 1.75rem; font-weight: 800; overflow-wrap: anywhere; }
.ring-sub { margin: 0 0 2.25rem; color: #b3ab9b; min-height: 1.3em; }
.ring-actions { display: flex; flex-direction: column; gap: 0.875rem; width: 100%; }
.ring-snooze { padding: 1.125rem; border-radius: 1.25rem; background: rgba(255, 255, 255, .1); font-size: 1.25rem; font-weight: 700; color: #f4efe6; }
.ring-stop { padding: 1.25rem; border-radius: 1.25rem; background: var(--gold); color: #1b1306; font-size: 1.375rem; font-weight: 800; animation: pulse 1.6s ease-in-out infinite; }
:root[data-theme="light"] .ring-stop { background: #e8c27a; }
.ring-close { padding: 0.75rem; color: #b3ab9b; font-weight: 600; }
@keyframes pulse { 50% { box-shadow: 0 0 0 0.625rem rgba(232, 194, 122, .15); } }

/* Calendar */
.cal-bar { display: flex; align-items: center; justify-content: space-between; margin: 0.25rem 0 0.5rem; }
.cal-title { font-size: 1.25rem; font-weight: 800; padding: 0.375rem 0.625rem; }
.cal { padding: 0.625rem 0.5rem 0.5rem; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--mute); padding-bottom: 0.375rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.125rem; }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 0.375rem 0 0.25rem; min-height: 3.25rem; border-radius: 0.75rem; }
.cal-n { font-size: 1.0625rem; font-weight: 600; width: 2rem; height: 2rem; line-height: 2rem; border-radius: 50%; }
.cal-h { font-size: 0.625rem; color: var(--mute); line-height: 1; margin-top: -1px; }
.cal-day.out { opacity: .3; }
.cal-day.today .cal-n { color: var(--gold); font-weight: 800; }
.cal-day.on .cal-n { background: var(--gold); color: #1b1306; }
.cal-dots { display: flex; gap: 0.1875rem; margin-top: 0.1875rem; }
.cal-dots i { width: 0.3125rem; height: 0.3125rem; border-radius: 50%; }
.cal-dots .ev { background: var(--ev); }
.cal-dots .tk { background: var(--gold); }
.ag-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.25rem 0.875rem; min-height: 3.625rem; }
.ag-bar { flex: none; width: 0.25rem; align-self: stretch; margin: 0.625rem 0; border-radius: 0.125rem; background: var(--ev); }

/* Notes */
.search { display: flex; align-items: center; gap: 0.5rem; padding: 0 0.875rem; margin: 0.375rem 0 0.875rem; color: var(--mute); }
.search svg { width: 1.25rem; height: 1.25rem; }
.search input { flex: 1; min-width: 0; padding: 0.75rem 0; }
.notes-grid { columns: 2; column-gap: 0.625rem; }
.note-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; width: 100%; break-inside: avoid; margin-bottom: 0.625rem; padding: 0.875rem; border-radius: 1.125rem; background: var(--card); text-align: start; border: 1px solid var(--line); }
.note-title { font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; padding-inline-end: 1.125rem; }
.note-body { font-size: 0.875rem; color: var(--sub); white-space: pre-line; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.note-date { font-size: 0.75rem; color: var(--mute); }
.note-pin { position: absolute; top: 0.625rem; inset-inline-end: 0.625rem; color: var(--gold); }
.note-pin svg { width: 1rem; height: 1rem; }
.c-gold { background: linear-gradient(160deg, rgba(232, 194, 122, .22), var(--card)); }
.c-rose { background: linear-gradient(160deg, rgba(255, 130, 140, .2), var(--card)); }
.c-sky { background: linear-gradient(160deg, rgba(127, 178, 255, .2), var(--card)); }
.c-mint { background: linear-gradient(160deg, rgba(123, 211, 137, .2), var(--card)); }
.c-violet { background: linear-gradient(160deg, rgba(178, 140, 255, .2), var(--card)); }
.swatches { display: flex; gap: 0.5rem; }
.sw { width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 0.125rem solid var(--line); }
.sw.c-none { background: var(--card2); }
.sw.c-gold { background: #e8c27a; } .sw.c-rose { background: #ff8a94; } .sw.c-sky { background: #7fb2ff; } .sw.c-mint { background: #7bd389; } .sw.c-violet { background: #b28cff; }
.sw.on { box-shadow: 0 0 0 0.125rem var(--card), 0 0 0 0.25rem var(--gold); }

/* Habits */
.habit-sum { display: flex; align-items: center; gap: 1rem; padding: 0.875rem 1.125rem; margin: 0.375rem 0 0.875rem; }
.mini-ring { width: 4rem; height: 4rem; }
.mini-ring .track, .big-ring .track { fill: none; stroke: var(--card2); stroke-width: 6; }
.mini-ring .fill { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; transform: rotate(-90deg); transform-box: view-box; transform-origin: 32px 32px; transition: stroke-dashoffset .4s; } /* proqa3: user units, rem broke on iPad/desktop (root 19.2/20.8px) */
.mini-ring text { fill: var(--text); stroke: none; font: 700 14px var(--num); }
.sum-big { margin: 0; font-size: 1.625rem; font-weight: 800; }
.sum-sub { margin: 0; color: var(--sub); font-size: 0.875rem; }
.habit { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; }
.habit-ico { position: relative; flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 1rem; background: var(--card2); font-size: 1.5rem; border: 0.125rem solid transparent; transition: .15s; }
.habit.on .habit-ico { background: var(--gold-soft); border-color: var(--gold); }
.habit-tick { position: absolute; bottom: -0.25rem; inset-inline-end: -0.25rem; display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--gold); color: #1b1306; }
.habit-tick svg { width: 0.8125rem; height: 0.8125rem; }
.habit.rest { opacity: .6; }
.week-dots { display: flex; gap: 0.1875rem; }
.wd { width: 1.125rem; height: 1.125rem; border-radius: 0.375rem; background: var(--card2); color: var(--mute); font-size: 0.625rem; font-weight: 700; display: grid; place-items: center; }
.wd.on { background: var(--gold); color: #1b1306; }
.wd.off { opacity: .35; }
.wd.now { outline: 0.0938rem solid var(--gold); outline-offset: 1px; }
.emoji-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.375rem; padding: 0.5rem 0.75rem 0.75rem; }
.emoji-pick button { aspect-ratio: 1; border-radius: 0.75rem; font-size: 1.375rem; background: var(--bg2); }
:root[data-theme="dark"] .emoji-pick button { background: #333336; }
.emoji-pick button.on { background: var(--gold-soft); box-shadow: inset 0 0 0 0.125rem var(--gold); }

/* Focus + timer */
.ring-wrap { position: relative; width: min(78vw, 18.75rem); aspect-ratio: 1; margin: 1.125rem auto 0.625rem; }
.big-ring { width: 100%; height: 100%; }
.big-ring .track { stroke-width: 12; }
.big-ring .fill { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.big-ring.rest .fill { stroke: var(--ok); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-phase { margin: 0; color: var(--gold); font-weight: 700; }
.ring-time { margin: 0; font-size: 3.625rem; font-weight: 300; letter-spacing: 1px; direction: ltr; }
.round-dots { display: flex; gap: 0.375rem; margin-top: 0.375rem; }
.round-dots i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--card2); }
.round-dots i.on { background: var(--gold); }
.ctrl-row { display: flex; align-items: center; justify-content: center; gap: 1.125rem; margin: 0.875rem 0 1.25rem; }
.big-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-width: 9.375rem; padding: 1rem 1.625rem; border-radius: 62.4375rem; font-size: 1.125rem; font-weight: 800; }
.big-btn.gold { background: linear-gradient(180deg, #f5dca6, #d9a95b); color: #1b1306; box-shadow: 0 0.5rem 1.375rem rgba(217, 169, 91, .3); }
.round-btn { display: grid; place-items: center; width: 3.625rem; height: 3.625rem; border-radius: 50%; background: var(--card); color: var(--text); }
.round-btn.ghost { visibility: hidden; }
.rb-txt { font-size: 0.875rem; font-weight: 700; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; padding: 0.875rem 0.375rem; text-align: center; }
.stat-row div { display: flex; flex-direction: column; }
.stat-row div + div { border-inline-start: 1px solid var(--line); }
.stat-row b { font: 800 1.625rem var(--num); color: var(--gold); }
.stat-row span { font-size: 0.8125rem; color: var(--sub); }
.num { width: 4rem; text-align: center; font-weight: 700; color: var(--gold); background: var(--bg2) !important; border-radius: 0.625rem; padding: 0.5rem 0.25rem !important; }
:root[data-theme="dark"] .num { background: #333336 !important; }
.unit { color: var(--sub); font-size: 0.875rem; }
.picker { padding: 1.25rem 0 0.375rem; }
.hms-row { display: flex; justify-content: center; gap: 0.625rem; margin-bottom: 1.125rem; direction: ltr; }
.hms { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; color: var(--sub); font-size: 0.8125rem; font-weight: 600; }
.hms .num { width: 5.375rem; font-size: 2.5rem; font-weight: 300; padding: 0.625rem 0 !important; background: var(--card) !important; color: var(--text); border-radius: 1.125rem; }
.sw-wrap { display: grid; place-items: center; height: 12.5rem; }
.sw-time { margin: 0; font-size: 4rem; font-weight: 200; direction: ltr; letter-spacing: 1px; }
.lap { display: flex; justify-content: space-between; padding: 0.75rem 1rem; font-size: 1rem; }
.lap.best .num, .lap.best { color: var(--ok); }
.lap.worst { color: var(--danger); }
.lap .num { width: auto; background: none !important; padding: 0 !important; color: inherit; font-weight: 500; }
.timer .seg { margin-top: 0.375rem; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.stat-tile { display: flex; flex-direction: column; gap: 0.125rem; padding: 0.875rem 1rem; }
.stat-tile b { font-size: 2rem; font-weight: 800; color: var(--gold); }
.st-lbl { font-weight: 700; font-size: 0.9375rem; }
.st-sub { color: var(--sub); font-size: 0.75rem; }
.chart { padding: 0.875rem 0.875rem 0.625rem; margin-bottom: 0.75rem; }
.chart-title { margin: 0 0 0.625rem; font-weight: 700; font-size: 0.9375rem; }
.bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 8.125rem; }
.bars.rtl { flex-direction: row-reverse; }
[dir="rtl"] .bars.rtl { flex-direction: row; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.25rem; }
.bar { width: 100%; max-width: 1.75rem; border-radius: 0.5rem 0.5rem 0.25rem 0.25rem; background: linear-gradient(180deg, var(--gold2), var(--gold-deep)); opacity: .55; }
.bar-col.now .bar { opacity: 1; }
.bar-val { font: 600 0.6875rem var(--num); color: var(--sub); min-height: 0.8125rem; }
.bar-day { font-size: 0.75rem; color: var(--mute); font-weight: 700; }
.bar-col.now .bar-day { color: var(--gold); }

/* Settings */
.link-row { cursor: pointer; }
.link-row .chev { width: 1.125rem; height: 1.125rem; color: var(--mute); }
.demo { display: block; margin: 0.5rem auto; }

@media (min-width: 600px) { .home { padding-top: 1.75rem; } }
@media (max-width: 360px) { .hero-title { font-size: 1.875rem; } .hero-count { font-size: 2rem; } .tile-lbl { font-size: 0.9375rem; } .alarm-time .hm { font-size: 2.625rem; } }

/* ---------- Alarm editor (Alarmy style) ---------- */
.sr { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wheel-wrap { position: relative; padding: 0.25rem 0 0; }
.wheel { position: relative; display: flex; justify-content: center; align-items: center; gap: 0.25rem; height: 16.25rem; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.wheel-band { position: absolute; inset-inline: 0.5rem; top: 6.5rem; height: 3.25rem; border-radius: 1rem; background: var(--card2); }
:root[data-theme="dark"] .wheel-band { background: #2a2a2d; }
.wheel-col { position: relative; height: 16.25rem; width: 5.375rem; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-item { height: 3.25rem; line-height: 3.25rem; text-align: center; scroll-snap-align: center; font: 500 2.125rem var(--num); color: var(--mute); transition: color .15s, transform .15s; }
.wheel-item.sel { color: var(--text); font-weight: 700; transform: scale(1.08); }
.wheel-col:last-child .wheel-item { font-size: 1.625rem; }
.wheel-colon { position: relative; font: 700 2rem var(--num); color: var(--text); }
.rings-in { text-align: center; color: var(--gold); font-weight: 700; margin: 0.25rem 0 1rem; }
.daily { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--gold); font-weight: 600; }
.daily input { width: 1.25rem; height: 1.25rem; accent-color: var(--gold); }
.rep-row { min-height: 0 !important; padding-top: 0 !important; padding-bottom: 0.5rem !important; border-top: 0 !important; }
.field-label.gold { color: var(--gold); font-weight: 700; }
.ms-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding: 0.25rem 0.75rem 0.75rem; border-top: 0 !important; }
.ms-slot { position: relative; display: grid; place-items: center; height: 4.625rem; border-radius: 0.875rem; background: var(--bg2); color: var(--mute); }
:root[data-theme="dark"] .ms-slot { background: #2c2c2f; }
.ms-slot.on { background: var(--gold-soft); color: var(--text); box-shadow: inset 0 0 0 0.0938rem var(--gold); }
.ms-slot-main { display: flex; flex-direction: column; align-items: center; gap: 0.125rem; font-size: 0.8125rem; font-weight: 600; width: 100%; height: 100%; justify-content: center; }
.ms-ico { font-size: 1.5rem; line-height: 1; }
.ms-x { position: absolute; top: 0.125rem; inset-inline-end: 0.25rem; width: 1.625rem; height: 1.625rem; color: var(--sub); font-size: 1.125rem; }
.ms-panel { padding: 0 0.75rem 0.75rem; border-top: 1px solid var(--line); }
.ms-pick { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.625rem 0.375rem; text-align: start; border-radius: 0.75rem; }
.ms-pick:active { background: var(--gold-soft); }
.ms-pick .ms-ico { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 0.75rem; background: var(--bg2); }
:root[data-theme="dark"] .ms-pick .ms-ico { background: #2c2c2f; }
.ms-pick-t { display: flex; flex-direction: column; } .ms-pick-t small { color: var(--sub); font-size: 0.8125rem; }
.ms-panel .field { padding-inline: 0.25rem; } .ms-panel .seg { flex: 1; max-width: 16.25rem; }
.ms-panel-foot { display: flex; justify-content: flex-end; padding-top: 0.375rem; }
.tone-list { display: flex; flex-direction: column; padding: 0 0.5rem; }
.tone { display: flex; align-items: center; gap: 0.375rem; min-height: 3rem; border-radius: 0.75rem; }
.tone.on { background: var(--gold-soft); }
.tone-play { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; color: var(--gold); }
.tone-play svg { width: 1.125rem; height: 1.125rem; }
.tone-name { flex: 1; text-align: start; padding: 0.75rem 0.25rem; font-size: 1rem; }
.tone-check { color: var(--gold); padding-inline-end: 0.625rem; } .tone-check svg { width: 1.125rem; height: 1.125rem; }
.vol-row { gap: 0.625rem; } .vol-row .mini { color: var(--gold); }
.range { flex: 1; accent-color: var(--gold); height: 1.75rem; }
.vib { display: inline-flex; }
.alarm-ms { display: flex; gap: 0.25rem; margin-top: 0.125rem; font-size: 0.875rem; } .alarm-ms i { font-style: normal; }
.ring-ms { color: var(--gold2); font-weight: 600; margin: -1.5rem 0 1.5rem; }

/* ---------- Mission screen ---------- */
.mission { width: 100%; max-width: 27.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.875rem; }
.ms-top { width: 100%; }
.ms-name { margin: 0 0 0.5rem; text-align: center; color: var(--gold2); font-weight: 800; font-size: 1.25rem; }
.ms-progress { height: 0.5rem; border-radius: 0.25rem; background: rgba(255, 255, 255, .1); overflow: hidden; }
.ms-progress i { display: block; height: 100%; background: linear-gradient(90deg, #f5dca6, #d9a95b); transition: width .3s; }
.ms-body { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.875rem; }
.ms-q { margin: 1.125rem 0 0; font-size: 2.375rem; font-weight: 800; color: #f4efe6; direction: ltr; }
.ms-entry { min-height: 3.5rem; margin: 0; font-size: 2.75rem; font-weight: 300; color: var(--gold2); direction: ltr; }
.ms-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.625rem; width: 100%; }
.ms-pad button { height: 4rem; border-radius: 1.125rem; background: rgba(255, 255, 255, .1); color: #f4efe6; font: 600 1.75rem var(--num); }
.ms-pad button:active { background: rgba(255, 255, 255, .2); }
.ms-pad .ok { background: var(--gold); color: #1b1306; }
.ms-hint { margin: 0; color: #b3ab9b; text-align: center; }
.ms-phrase { margin: 0; font-size: 1.375rem; font-weight: 700; color: #f4efe6; text-align: center; line-height: 1.5; }
.ms-input { width: 100%; padding: 1rem; border-radius: 1rem; background: rgba(255, 255, 255, .1) !important; color: #f4efe6; font-size: 1.125rem !important; text-align: center; }
.ms-phone { font-size: 5.5rem; margin-top: 0.625rem; }
.ms-phone.jig { animation: jig .25s; }
@keyframes jig { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.ms-grid { display: grid; gap: 0.625rem; width: 100%; }
.ms-grid.g4 { grid-template-columns: repeat(4, 1fr); } .ms-grid.g3 { grid-template-columns: repeat(3, 1fr); max-width: 20rem; }
.tile4 { aspect-ratio: 1; border-radius: 1rem; background: rgba(255, 255, 255, .1); transition: background .12s; }
.tile4.on { background: linear-gradient(160deg, #f5dca6, #d9a95b); }
.tile4.bad { background: #ff6b5e; }
.ms-done { font-size: 1.875rem; font-weight: 800; color: var(--gold2); margin: 2.5rem 0; text-align: center; }
.shake { animation: shk .35s; }
@keyframes shk { 25% { transform: translateX(-0.5rem); } 75% { transform: translateX(0.5rem); } }
.ring .big-btn { color: #1b1306; }
.ring .big-btn:not(.gold) { background: rgba(255, 255, 255, .12); color: #f4efe6; }
.sheet-body > * { flex-shrink: 0; }
.ms-q, .ms-entry { font-family: var(--num); font-variant-numeric: tabular-nums; text-align: center; }

/* ---------- Calendar views (Apple style) ---------- */
.cal-wrap > .pad:first-child .seg { margin: 0.25rem 0 0.625rem; }
.cal-dots .dv { background: var(--ok); }
.phonecal-cta { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.875rem 1rem; margin: 0.875rem 0; text-align: start; }
.phonecal-cta .pc-ico { font-size: 1.625rem; } .phonecal-cta span:nth-child(2) { flex: 1; display: flex; flex-direction: column; } .phonecal-cta small { color: var(--sub); }
.wk-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.125rem; margin-bottom: 0.375rem; }
.wk-day { display: flex; flex-direction: column; align-items: center; gap: 0.125rem; padding: 0.25rem 0; }
.wk-dn { font-size: 0.75rem; color: var(--mute); font-weight: 700; }
.wk-n { width: 2.125rem; height: 2.125rem; line-height: 2.125rem; border-radius: 50%; font: 600 1.0625rem var(--num); text-align: center; }
.wk-day.today .wk-n { color: var(--gold); }
.wk-day.on .wk-n { background: var(--gold); color: #1b1306; }
.day-title { display: flex; flex-direction: column; margin: 0.25rem 0 0.5rem; } .day-title b { font-size: 1.125rem; } .day-title small { color: var(--gold); font-size: 0.8125rem; }
.tg-scroll { height: calc(100dvh - 18.75rem); min-height: 22.5rem; overflow-y: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line); overscroll-behavior: contain; }
.tg { position: relative; display: flex; height: 84rem; }
.tg-hours { position: relative; flex: none; width: 3.25rem; }
.tg-hours span { position: absolute; inset-inline-end: 0.5rem; transform: translateY(-50%); font: 600 0.6875rem var(--num); color: var(--mute); white-space: nowrap; }
.tg-cols { position: relative; flex: 1; display: flex; }
.tg-lines { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 3.5rem; }
.tg-col { position: relative; flex: 1; min-width: 0; height: 100%; }
.tg-cols.week .tg-col + .tg-col { border-inline-start: 1px solid var(--line); }
.tg-ev { position: absolute; display: flex; flex-direction: column; align-items: flex-start; overflow: hidden; padding: 0.1875rem 0.375rem; border-radius: 0.375rem; text-align: start; font-size: 0.75rem; line-height: 1.25;
  background: color-mix(in srgb, var(--c) 26%, var(--card)); border-inline-start: 0.1875rem solid var(--c); color: var(--text); }
.tg-ev b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tg-ev small { color: var(--sub); }
.tg-ev.task { border-style: dashed; } .tg-ev.is-done b { text-decoration: line-through; opacity: .6; }
.tg-cols.week .tg-ev { padding: 0.125rem 0.1875rem; font-size: 0.625rem; }
.tg-now { position: absolute; inset-inline: 0; height: 0.125rem; background: var(--danger); z-index: 2; pointer-events: none; }
.tg-now::before { content: ""; position: absolute; inset-inline-start: -0.3125rem; top: -0.25rem; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--danger); }
.tg-allday { display: flex; align-items: flex-start; border-top: 1px solid var(--line); padding: 0.25rem 0; }
.tg-ad-lbl { flex: none; width: 3.25rem; font-size: 0.625rem; color: var(--mute); text-align: center; padding-top: 0.25rem; }
.tg-ad-cols { flex: 1; display: flex; gap: 0.125rem; } .tg-ad-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.tg-ad { padding: 0.1875rem 0.375rem; border-radius: 0.375rem; font-size: 0.6875rem; font-weight: 600; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--c) 30%, var(--card)); color: var(--text); }
.wk-head { display: flex; } .wk-head-cols { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); }
.wk-h { display: flex; flex-direction: column; align-items: center; padding: 0.25rem 0 0.375rem; } .wk-h small { font-size: 0.6875rem; color: var(--mute); } .wk-h b { font: 700 1rem var(--num); width: 1.875rem; height: 1.875rem; line-height: 1.875rem; border-radius: 50%; }
.wk-h.today b { color: var(--gold); } .wk-h.on b { background: var(--gold); color: #1b1306; }
.cal-pick .field-label { display: inline-flex; align-items: center; gap: 0.5rem; } .cal-pick small { color: var(--mute); }
.cal-dot { width: 0.625rem; height: 0.625rem; border-radius: 50%; display: inline-block; }
.cal-pick input { width: 1.25rem; height: 1.25rem; accent-color: var(--gold); }
/* Apple-style month: event titles inside the day cells */
.cal-grid .cal-day { min-height: 6rem; justify-content: flex-start; align-items: stretch; gap: 0.125rem; padding: 0.25rem 0.125rem; border-radius: 0.5rem; }
.cal-top { display: flex; flex-direction: column; align-items: center; }
.cal-day.on { background: var(--gold-soft); }
.cal-day.on .cal-n { background: none; color: var(--gold); font-weight: 800; }
.cal-day.today .cal-n { background: var(--danger); color: #fff; }
.cal-chip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 0.625rem; line-height: 1.3; font-weight: 600; padding: 0 0.1875rem; border-radius: 0.25rem; white-space: normal; overflow: hidden; overflow-wrap: anywhere; hyphens: auto;
  color: color-mix(in srgb, var(--c) 45%, var(--text)); background: color-mix(in srgb, var(--c) 24%, transparent); }
.cal-grid .cal-day.out { opacity: 1; }
.cal-grid .cal-day.out .cal-top { opacity: .3; }
.cal-grid .cal-day.out .cal-chip { opacity: .8; }
.cal-chip.ad { background: color-mix(in srgb, var(--c) 34%, transparent); }
.cal-more { font-size: 0.625rem; color: var(--mute); text-align: center; }
.cal { padding: 0.5rem 0.25rem 0.375rem; }
.pad0 { margin: 0 0 0.75rem; }
.loc-row { border-top: 1px solid var(--line); }
.loc-input { width: 100%; padding: 0.75rem 1rem; font-size: 1rem; }
.cal-grid, .cal-head { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-grid .cal-day { min-width: 0; overflow: hidden; }

/* ---------- 16 Nov: medicines, day counters, tips, 5 missions ---------- */
.ms-slots { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 1rem) / 3.4); overflow-x: auto; scrollbar-width: none; }
.ms-slots::-webkit-scrollbar { display: none; }
.ms-pad.ops { grid-template-columns: repeat(4, 1fr); }
.ms-pad.ops .op { font-size: 2.125rem; }
.doses .dose, .meds .med { display: flex; align-items: center; gap: 0.75rem; padding: 0.25rem 0.875rem; min-height: 3.75rem; }
.dose-time { flex: none; min-width: 4rem; font: 700 1.0625rem var(--num); color: var(--gold); }
.dose.on .item-title { color: var(--sub); }
.dose.late:not(.on) .dose-time { color: var(--danger); }
.dose-btn { flex: none; padding: 0.5rem 1rem; border-radius: 62.4375rem; background: var(--gold); color: #1b1306; font-weight: 700; font-size: 0.9375rem; display: inline-flex; align-items: center; }
.dose-btn.on { background: var(--card2); color: var(--ok); }
.dose-btn svg { width: 1rem; height: 1rem; }
.med.off { opacity: .5; }
.med-times { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.375rem 0.875rem 0.875rem; align-items: center; }
.med-time { position: relative; display: inline-flex; align-items: center; gap: 0.25rem; background: var(--bg2); border-radius: 0.75rem; padding: 0.25rem 0.5rem; }
:root[data-theme="dark"] .med-time { background: #2c2c2f; }
.med-time input { background: none; border: 0; font: 600 1.0625rem var(--num); color: var(--text); }
.med-time .ms-x { position: static; }
.counters { display: flex; flex-direction: column; gap: 0.625rem; margin-bottom: 0.875rem; }
.counter { display: flex; align-items: center; gap: 0.875rem; width: 100%; padding: 0.875rem 1rem; text-align: start; }
.counter-ico { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 0.875rem; background: var(--gold-soft); font-size: 1.625rem; }
.counter-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.counter-title { font-size: 1.0625rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.counter-sub, .counter-goal { font-size: 0.8125rem; color: var(--sub); }
.counter-goal { color: var(--gold); }
.counter-num { flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.counter-num b { font: 800 2.125rem var(--num); color: var(--gold2); }
:root[data-theme="light"] .counter-num b { color: var(--gold); }
.counter-num small { font-size: 0.75rem; color: var(--sub); margin-top: 0.1875rem; }
.counter.since .counter-ico { background: rgba(255, 140, 60, .14); }
.counter.past { opacity: .6; }
.home-counters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.625rem; margin-top: 0.875rem; }
.counter.small { min-inline-size: 0; flex-direction: column; align-items: flex-start; gap: 0.375rem; padding: 0.75rem 0.875rem; background: var(--panel); border-radius: 1.375rem; box-shadow: inset 0 1px 0 var(--line); }
.counter.small .counter-ico { display: none; }
.counter.small .counter-title { font-size: 0.875rem; color: var(--sub); white-space: nowrap; }
.counter.small .counter-text { width: 100%; }
.counter.small .counter-sub { display: none; }
.counter.small .counter-num { flex-direction: row; align-items: baseline; gap: 0.375rem; }
.counter.small .counter-num b { font-size: 1.875rem; }
.center { text-align: center; justify-content: center; }
.group.center { display: flex; padding: 0.75rem; }
.tips { display: flex; flex-direction: column; gap: 0.625rem; padding-bottom: 1.25rem; }
.tip { overflow: hidden; }
.tip-head { display: grid; grid-template-columns: 2.75rem 1fr; grid-template-rows: auto auto; column-gap: 0.75rem; width: 100%; padding: 0.875rem 1rem; text-align: start; align-items: start; }
.tip-ico { grid-row: 1 / 3; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; background: var(--gold-soft); font-size: 1.5rem; }
.tip-text { display: flex; flex-direction: column; gap: 0.1875rem; min-width: 0; }
.tip-title { font-size: 1.0625rem; }
.tip-short { font-size: 0.875rem; color: var(--sub); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tip.open .tip-short { -webkit-line-clamp: unset; color: var(--text); }
.tip-more { grid-column: 2; margin-top: 0.375rem; font-size: 0.8125rem; font-weight: 700; color: var(--gold); }
.tip-body { padding: 0 1rem 1rem; padding-inline-start: 4.5rem; }
.tip-body ul { margin: 0 0 0.75rem; padding-inline-start: 1.125rem; color: var(--sub); font-size: 0.9375rem; line-height: 1.5; }
.tip-body li + li { margin-top: 0.375rem; }

/* 16 Nov: Exercise */
.grid > .tile:last-child:nth-child(3n + 1) { grid-column: 1 / -1; aspect-ratio: auto; flex-direction: row; gap: 0.75rem; min-height: 4.75rem; }
.grid > .tile:last-child:nth-child(3n + 1) .ticon { width: 2.875rem; margin-top: 0; }
.grid > .tile:last-child:nth-child(3n + 1) .tile-bar { display: none; }
.ex-intro { margin: 0.375rem 0.25rem 0.375rem; font-size: 0.9375rem; line-height: 1.45; }
.ex-plans { display: flex; flex-direction: column; gap: 0.625rem; margin-bottom: 0.5rem; }
.ex-chev { flex: none; color: var(--mute); }
.ex-chev svg { width: 1.25rem; height: 1.25rem; display: block; }
[dir="rtl"] .ex-chev svg { transform: scaleX(-1); }
.ex-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0.875rem 0.375rem; margin: 0.375rem 0 0.875rem; text-align: center; }
.ex-stat { display: flex; flex-direction: column; gap: 0.125rem; }
.ex-stat + .ex-stat { border-inline-start: 1px solid var(--line); }
.ex-stat .sum-big { font-size: 1.5rem; direction: ltr; }
.ex-today { margin-bottom: 0.75rem; }
.ex-today.card { padding: 1rem 1.125rem; }
.ex-today.card .pill, .ex-today.card .link { margin-top: 0.625rem; }
.ex-today-head { padding: 0.125rem 0.25rem 0.5rem; }
.ex-today .hero-lbl { margin: 0; }
.ex-item { padding: 0.625rem 0.875rem 0.75rem; background: var(--card); }
.ex-item-top { display: flex; align-items: center; gap: 0.75rem; width: 100%; text-align: start; }
.ex-ico { flex: none; display: grid; place-items: center; width: 2.625rem; height: 2.625rem; border-radius: 0.75rem; background: var(--gold-soft); font-size: 1.375rem; }
.ex-sets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.625rem; padding-inline-start: 3.375rem; }
.ex-set { min-width: 3.25rem; height: 2.5rem; padding: 0 0.75rem; border-radius: 0.75rem; background: var(--card2); color: var(--mute); font: 700 1.0625rem var(--num); border: 0.0938rem dashed transparent; }
.ex-set.next { border-color: var(--gold); color: var(--gold); }
.ex-set.on { background: var(--gold); color: #1b1306; border-style: solid; border-color: transparent; }
.ex-set.on.miss { background: var(--gold-soft); color: var(--gold); }
.ex-set.add { min-width: 2.5rem; color: var(--gold); }
.ex-finish { display: flex; justify-content: center; width: 100%; padding: 0.875rem; font-size: 1.0625rem; margin-top: 0.125rem; }
.ex-finish svg { width: 1.25rem; height: 1.25rem; }
.center { text-align: center; }
.ex-ladders .item-title { font-weight: 700; }
.ex-ladders .ex-lad { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.625rem 0.875rem; text-align: start; background: var(--card); }
.ex-bar { display: block; height: 0.25rem; border-radius: 0.125rem; background: var(--card2); margin-top: 0.375rem; overflow: hidden; }
.ex-bar i { display: block; height: 100%; border-radius: 0.125rem; background: linear-gradient(90deg, var(--gold-deep), var(--gold2)); }
[dir="rtl"] .ex-bar i { background: linear-gradient(270deg, var(--gold-deep), var(--gold2)); }
.ex-hist .ex-h { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.875rem; background: var(--card); }
.ex-hist .dose-time { min-width: 5.375rem; font-size: 0.875rem; }
.ex-up { flex: none; }
.ex-safety { margin-top: 1.375rem; padding-bottom: 1.5rem; line-height: 1.45; }
.ex-rest { position: fixed; z-index: 20; inset-inline: 1rem; bottom: calc(env(safe-area-inset-bottom) + 0.875rem); max-width: 32.5rem; margin: 0 auto; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.75rem 0.625rem 1.125rem; border-radius: 1.125rem; background: var(--gold); color: #1b1306; font-weight: 700; box-shadow: 0 0.5rem 1.875rem rgba(0, 0, 0, .45); }
.ex-rest-t { flex: 1; font: 800 1.625rem var(--num); font-variant-numeric: tabular-nums; direction: ltr; text-align: start; }
.ex-rest-btn { padding: 0.5rem 0.875rem; border-radius: 0.75rem; background: rgba(0, 0, 0, .14); font-weight: 800; font-size: 0.9375rem; }
body[data-screen="exercise"] .view { padding-bottom: 4.375rem; }
.ex-log { padding: 0.875rem 0.625rem 1rem; }
.ex-stepper { display: flex; align-items: center; justify-content: center; gap: 1.375rem; margin: 0.5rem 0 0.125rem; direction: ltr; }
.ex-pm { width: 4rem; height: 4rem; border-radius: 2rem; background: var(--gold-soft); color: var(--gold); font-size: 2.125rem; font-weight: 600; line-height: 1; }
.ex-num { min-width: 6.875rem; text-align: center; font: 800 4rem var(--num); font-variant-numeric: tabular-nums; color: var(--text); }
.ex-hold { margin-top: 0.625rem; }
.ex-how { margin: 0 0.5rem 0.5rem; font-size: 0.875rem; line-height: 1.5; }
.ex-results .ex-res { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.875rem; background: var(--card2); }
.ex-res-ico { flex: none; font-size: 1.375rem; }
.ex-res-txt { font-size: 0.875rem; color: var(--sub); white-space: normal; }
.ex-res.up .ex-res-txt { color: var(--gold); font-weight: 700; }
.ex-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.625rem; }
.ex-step { display: flex; gap: 0.75rem; padding: 0.875rem; border-radius: 1rem; background: var(--card2); }
.ex-step.on { box-shadow: inset 0 0 0 0.125rem var(--gold); }
.ex-step.locked .ex-step-body > b, .ex-step.locked .ex-step-body > p { opacity: .65; }
.ex-step-n { flex: none; display: grid; place-items: center; width: 2.125rem; height: 2.125rem; border-radius: 1.0625rem; background: var(--card); font: 700 0.9375rem var(--num); color: var(--gold); }
.ex-step.on .ex-step-n { background: var(--gold); color: #1b1306; }
.ex-step-body { flex: 1; min-width: 0; }
.ex-step-body p { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--sub); line-height: 1.45; }
.ex-step-body .ex-step-goal { color: var(--gold); font-weight: 600; }
.ex-setlvl { margin-top: 0.625rem; font-size: 0.875rem; padding: 0.4375rem 0.875rem; background: var(--gold-soft); color: var(--gold); }
.ex-wlist { margin: 0; padding: 0.375rem 1rem 0.75rem; padding-inline-start: 2.125rem; font-size: 0.875rem; color: var(--sub); line-height: 1.6; }
.ex-wlist b { color: var(--text); }
.ex-switch { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 0.75rem; }
.sheet-foot.ex-foot { flex-direction: column; }
/* Calendars sheet, holidays, Hijri (procal) */
.cal-views { display: flex; align-items: center; gap: 0.5rem; }
.cal-views .seg { flex: 1; min-width: 0; }
.cal-wrap > .pad.cal-views .seg { margin: 0.25rem 0 0.625rem; }
.cals-btn { flex: none; margin: 0.25rem 0 0.625rem; background: var(--card2); }
.cals-btn svg { width: 1.375rem; height: 1.375rem; }
.cal-title { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.cal-sub { display: block; font-size: 0.75rem; font-weight: 600; color: var(--gold); margin-top: 0.125rem; }
.wk-h .wk-hj { font-style: normal; font-size: 0.625rem; line-height: 1; color: var(--mute); }
.wk-h.on .wk-hj { color: var(--gold); }
.group-note { margin: 0; padding: 0.25rem 1rem 0.75rem; font-size: 0.8125rem; color: var(--mute); line-height: 1.45; }
.link-row .field-label { display: flex; flex-direction: column; align-items: flex-start; text-align: start; }
.row-sub { font-size: 0.75rem; color: var(--mute); font-weight: 400; }
.small-lbl { font-size: 0.8125rem; color: var(--sub); line-height: 1.4; flex: 1; }
.ics-row { gap: 0.375rem; }
.ics-main { display: flex; align-items: center; gap: 0.625rem; flex: 1; min-width: 0; cursor: pointer; }
.ics-txt { display: flex; flex-direction: column; min-width: 0; }
.ics-txt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ics-txt small { font-size: 0.75rem; color: var(--mute); }
.ics-ref, .ics-del { flex: none; font-size: 1.25rem; }
.ics-ref.spin { animation: icsspin 1s linear infinite; }
@keyframes icsspin { to { transform: rotate(360deg); } }
.ics-url { gap: 0.5rem; }
.ics-url .loc-input { flex: 1; min-width: 0; padding: 0.625rem 0.75rem; direction: ltr; text-align: left; border: 1px solid var(--line); border-radius: 0.75rem; background: transparent; font-size: 0.9375rem; }
.info { padding: 0.875rem 1rem; }
.info-head { display: flex; align-items: center; gap: 0.625rem; font-size: 1.1875rem; }
.info-head .cal-dot { flex: none; }
.info-when { margin: 0.625rem 0 0.25rem; font-weight: 600; }
.info-sub { margin: 0.25rem 0; color: var(--sub); font-size: 0.875rem; }
.info-notes { margin: 0.625rem 0 0; white-space: pre-wrap; color: var(--sub); font-size: 0.875rem; overflow-wrap: anywhere; }
.info .note { text-align: start; margin: 0.625rem 0 0; }
.ag-row.hol .item-title { font-weight: 600; }
.cal-chip, .tg-ad, .tg-ev b { unicode-bidi: plaintext; }

/* Day score (home top card) + weekly review (proday) */
.ds-card { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.625rem 0.875rem; margin-bottom: 0.75rem; border: 0; color: var(--text); text-align: start; font: inherit; border-radius: 1.375rem; }
.ds-ring { flex: none; }
.ds-ring-bg { fill: none; stroke: var(--line); stroke-width: 3.4; }
.ds-ring-fg { fill: none; stroke: var(--gold); stroke-width: 3.4; stroke-linecap: round; }
.ds-ring-n { fill: var(--text); stroke: none; font: 800 0.75rem var(--num); }
.ds-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ds-text b { font-size: 0.9375rem; }
.ds-sub { font-size: 0.7812rem; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-go { flex: none; display: flex; align-items: center; gap: 0.125rem; font-size: 0.8125rem; font-weight: 700; color: var(--gold); }
.ds-go svg { width: 1rem; height: 1rem; stroke: currentColor; }
.ds-today { padding: 1rem; }
.ds-today-top { display: flex; align-items: center; gap: 0.875rem; }
.ds-big-lbl { margin: 0 0 0.25rem; font-size: 1.0625rem; font-weight: 800; }
.ds-today .hint { margin: 0; }
.ds-parts { list-style: none; margin: 0.875rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.625rem; }
.ds-part { display: grid; grid-template-columns: 1fr 5rem 2.625rem; align-items: center; gap: 0.625rem; }
.ds-part-l { display: flex; flex-direction: column; min-width: 0; font-size: 0.8125rem; color: var(--sub); }
.ds-part-l b { font-size: 0.9375rem; color: var(--text); }
.ds-meter { height: 0.5rem; border-radius: 0.5rem; background: var(--line); overflow: hidden; display: flex; }
.ds-meter i { display: block; height: 100%; border-radius: 0.5rem; background: linear-gradient(90deg, var(--gold-deep), var(--gold2)); }
[dir="rtl"] .ds-meter i { background: linear-gradient(270deg, var(--gold-deep), var(--gold2)); }
.ds-pct { font: 700 0.875rem var(--num); text-align: end; color: var(--gold); }
.ds-page .stat-grid { margin-top: 0.75rem; }
.ds-streaks { margin-top: 0.75rem; padding: 0.875rem 1rem; }
.ds-streaks ul { list-style: none; margin: 0.375rem 0 0; padding: 0; }
.ds-streaks li { display: flex; justify-content: space-between; gap: 0.625rem; padding: 0.5rem 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.ds-streaks li:first-child { border-top: 0; }
.ds-streaks li b { color: var(--gold); font-family: var(--num); white-space: nowrap; }
.ds-share-row { margin: 1.125rem 0 1.75rem; }
.ds-preview { position: fixed; inset: 0; z-index: 99; background: rgba(0, 0, 0, .9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; padding: 1.25rem; }
.ds-preview img { max-width: 100%; max-height: 80vh; border-radius: 1.125rem; }
.ds-preview p { color: #f4efe6; margin: 0; }
@media (min-width: 700px) { .ds-page { max-width: 47.5rem; margin: 0 auto; } }
/* Integrated countdowns (proday) */
.dleft { font-size: 0.75rem; font-weight: 700; color: var(--gold); background: var(--gold-soft); padding: 0.125rem 0.5rem; border-radius: 0.5rem; }
.dleft.late { color: var(--danger); background: rgba(255, 107, 94, .13); }
.cd-chip { padding: 1px 0.375rem; }
.counter-link { font-size: 0.75rem; color: var(--gold); }
.hint.in-group { margin: 0; padding: 0 1rem 0.75rem; }
.counter-linked .row > span:first-child, .counter-linked .field-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: -0.125rem 0 0.625rem; }
.day-acts .pill { font-size: 0.8125rem; padding: 0.375rem 0.75rem; }
.rel-day { color: var(--gold); font-weight: 600; }

/* pro4: quick add chips + repeating tasks */
.qchips { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: -0.25rem 0 0.75rem; }
.qchips[hidden] { display: none; }
.qchip { display: inline-flex; align-items: center; gap: 0.3125rem; padding: 0.3125rem 0.625rem; border-radius: 62.4375rem; background: var(--gold-soft); color: var(--gold); font-size: 0.8125rem; font-weight: 600; border: 1px solid transparent; }
.qchip .mini { width: 0.875rem; height: 0.875rem; }
.qchip .qx { opacity: .7; font-size: 0.9375rem; line-height: 1; margin-inline-start: 0.125rem; }
.qchip.off { background: none; color: var(--sub); border-color: var(--line); text-decoration: line-through; }
.meta-chip.rep { display: inline-flex; align-items: center; gap: 0.1875rem; color: var(--gold); }
.meta-chip.rep .mini { width: 0.75rem; height: 0.75rem; }
.rep-cust { gap: 0.5rem; }
.rep-n { width: 4rem; text-align: center; }
.rep-days { padding: 0.25rem 0 0.625rem; flex-wrap: nowrap; gap: 0.25rem; overflow: visible; }
.rep-days .chip { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0.375rem 0; font-size: 0.8125rem; }
.rep-ghost { color: var(--gold); opacity: .8; }
.rep-ghost svg { width: 0.8125rem; height: 0.8125rem; }
.qchip.info { background: none; border-color: var(--line); color: var(--sub); }
/* pro4: search everything + backup */
.home-search { display: flex; align-items: center; gap: 0.625rem; width: 100%; margin-bottom: 0.75rem; padding: 0.6875rem 0.875rem; border: 0; color: var(--mute); font: inherit; font-size: 0.9375rem; text-align: start; border-radius: 1rem; }
.home-search svg { width: 1.125rem; height: 1.125rem; flex: none; stroke: currentColor; }
.search-group .section-title .count { color: var(--mute); font-weight: 600; font-size: .85em; }
.sr-item mark { background: var(--gold-soft); color: var(--gold); border-radius: 0.25rem; padding: 0 1px; }
.sr-item .ag-bar { align-self: stretch; }
.restore-box { padding: 0.875rem 1rem; }
.restore-box p { margin: 0 0 0.5rem; }
#lastBackupRow { flex-wrap: wrap; gap: 0.375rem; }
#lastBackupRow .field-label { display: flex; flex-direction: column; align-items: flex-start; }

/* 16 Nov pro4: projects + priority + matrix + time blocking */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.seg .seg-ico { display: inline-grid; place-items: center; }
.seg .seg-ico svg { width: 1.125rem; height: 1.125rem; display: block; }
.seg:has(.seg-ico) button:last-child { flex: 0 0 3.25rem; }
.circle.prio { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, transparent); }
.circle.prio.on { background: var(--gold); border-color: var(--gold); }
.prio-tag { font: 700 0.6875rem/1 var(--num, inherit); color: var(--pc); border: 1px solid color-mix(in srgb, var(--pc) 55%, transparent); padding: 0.125rem 0.3125rem; border-radius: 0.375rem; }
.pp-dot { display: inline-block; width: 0.5625rem; height: 0.5625rem; border-radius: 50%; background: var(--pc); flex: none; }
.prio-pick { display: flex; gap: 0.375rem; flex-wrap: nowrap; }
.prio-pick .pp { display: inline-flex; align-items: center; gap: 0.3125rem; padding: 0.375rem 0.625rem; border-radius: 62.4375rem; background: var(--card2); color: var(--sub); font-size: 0.8125rem; font-weight: 700; border: 1px solid transparent; }
.prio-pick .pp.on { color: var(--text); border-color: var(--pc, var(--gold)); background: color-mix(in srgb, var(--pc, var(--gold)) 16%, var(--card2)); }
.prio-row { flex-wrap: wrap; gap: 0.5rem; }
.sched-row { justify-content: flex-end; padding-top: 0; }
.sched-btn { display: inline-flex; align-items: center; gap: 0.375rem; }
.chip.proj-link { color: var(--gold); }
.chip.proj-link svg { width: 1rem; height: 1rem; }
.chip .count { font-size: 0.75rem; background: var(--gold-soft); color: var(--gold); border-radius: 0.5rem; padding: 0 0.375rem; margin-inline-start: 0.125rem; }
.proj-chip { display: inline-flex; align-items: center; gap: 0.3125rem; }
.proj-dot { display: inline-block; width: 0.5625rem; height: 0.5625rem; border-radius: 50%; background: var(--c); flex: none; }
.proj-list { list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18.75rem), 1fr)); }
.proj-card, .proj-head { display: flex; flex-direction: column; gap: 0.625rem; width: 100%; padding: 1rem; text-align: start; border-radius: 1.125rem; }
.proj-card.is-done { opacity: .6; }
.proj-top { display: flex; align-items: center; gap: 0.625rem; min-width: 0; }
.proj-top .proj-dot { width: 0.75rem; height: 0.75rem; }
.proj-name { flex: 1; min-width: 0; font-size: 1.0625rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-due { font-size: 0.8125rem; color: var(--sub); }
.proj-card { container-type: inline-size; }
@container (max-width: 12rem) {
  .proj-card .proj-top { display: grid; grid-template-columns: 0.75rem minmax(0, 1fr); align-items: baseline; }
  .proj-card .proj-name { white-space: normal; overflow-wrap: anywhere; }
  .proj-card .proj-due, .proj-card .meta-chip { grid-column: 2; justify-self: start; }
}
.proj-bar { height: 0.5rem; border-radius: 0.5rem; background: var(--card2); overflow: hidden; }
.proj-bar i { display: block; height: 100%; border-radius: 0.5rem; transition: width .3s; }
.proj-sub { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.8125rem; color: var(--sub); }
.proj-sub b { color: var(--text); }
.proj-head { margin-bottom: 0.75rem; }
.proj-head .proj-name { font-size: 1.25rem; white-space: normal; }
.proj-note { margin: 0; color: var(--sub); white-space: pre-wrap; }
.proj-colors { display: flex; gap: 0.75rem; padding: 0.625rem 0.125rem 0.25rem; }
.pc-dot { width: 1.875rem; height: 1.875rem; border-radius: 50%; background: var(--c); border: 0.1875rem solid transparent; box-shadow: inset 0 0 0 0.125rem var(--card); }
.pc-dot.on { border-color: var(--text); }
.empty-box { text-align: center; padding: 1.875rem 0.625rem; }
.empty-box .pill { display: inline-flex; align-items: center; gap: 0.375rem; margin-top: 0.375rem; }
.from-chip { color: var(--gold); background: var(--gold-soft); }
.empty-box .empty { padding-bottom: 0.75rem; }
.empty-box .hint { margin: 0 0.375rem 0.75rem; }
.empty-box .empty-add { padding: 0.875rem 1.75rem; font-size: 1.0625rem; font-weight: 700; min-height: 3rem; }
.empty-box .empty-add svg { width: 1.25rem; height: 1.25rem; }
.matrix-hint { margin: 0 0.125rem 0.625rem; }
.matrix { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .matrix { grid-template-columns: 1fr 1fr; } }
.mq { padding: 0; overflow: hidden; border-top: 0.1875rem solid var(--qc); }
.mq-head { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.75rem 1rem 0.5rem; }
.mq-head b { color: var(--qc); font-size: 1rem; }
.mq-head small { color: var(--sub); flex: 1; }
.mq-head .count { font-weight: 700; color: var(--sub); }
.mq .list { margin: 0; }
.mq .empty.small { margin: 0.25rem 1rem 0.875rem; text-align: start; }
.tb-wrap { margin-bottom: 0.5rem; }
.tb-tray { border: 1px dashed var(--line); border-radius: 1rem; padding: 0.625rem 0.75rem; }
.tb-lbl { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.625rem; margin: 0 0 0.5rem; font-size: 0.875rem; }
.tb-lbl small { color: var(--sub); font-size: 0.75rem; }
.tb-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tb-pill { display: inline-flex; align-items: center; gap: 0.375rem; max-width: 100%; padding: 0.4375rem 0.75rem; border-radius: 0.75rem; background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 0.875rem; font-weight: 600; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
.tb-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-pill small { color: var(--sub); font-weight: 500; font-size: 0.75rem; white-space: nowrap; }
.tb-pill.lifting { opacity: .4; }
.tb-ghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; max-width: 15rem; padding: 0.5rem 0.75rem; border-radius: 0.75rem; background: var(--gold); color: #1b1306; font-weight: 700; font-size: 0.875rem; box-shadow: 0 0.625rem 1.75rem rgba(0, 0, 0, .45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-inline-start: 0.25rem solid var(--pc, var(--gold-deep)); }
body.tb-dragging, body.tb-dragging * { cursor: grabbing !important; user-select: none; }
.tb-mark { position: absolute; inset-inline: 0; height: 0; border-top: 0.125rem solid var(--gold); pointer-events: none; z-index: 5; }
.tb-mark span { position: absolute; inset-inline-start: 0.25rem; top: -0.6875rem; padding: 1px 0.375rem; border-radius: 0.375rem; background: var(--gold); color: #1b1306; font: 700 0.75rem/1.125rem var(--num, inherit); }
.tb-banner { display: flex; align-items: center; gap: 0.625rem; padding: 0.75rem 0.875rem; margin-bottom: 0.5rem; border: 1px solid var(--gold); color: var(--gold); font-weight: 600; }
.tb-banner span { flex: 1; min-width: 0; }
.tb-banner .link { flex: none; }
.sched-btn { background: var(--gold-soft); color: var(--gold); padding: 0.4375rem 0.875rem; font-size: 0.875rem; }
.sched-row { padding-block: 0 0.625rem; border-top: 0 !important; }

/* protips 16 Nov: sections, search, done / not for me, tip of the day on home */
.tip-find { margin: 0 0 0.625rem; }
.tip-chips { margin: 0 -0.25rem 0.125rem; padding-inline: 0.25rem; }
.tip-sec-title { display: flex; align-items: baseline; gap: 0.25rem; }
.tip-sec-title:first-child { margin-top: 0.25rem; }
.tip-ico { position: relative; }
.tip-tick { position: absolute; inset-block-end: -0.25rem; inset-inline-end: -0.25rem; display: grid; place-items: center; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--gold); color: #111; font: 800 0.6875rem/1 system-ui; font-style: normal; }
.tip.done .tip-title { color: var(--sub); }
.tip.no { opacity: .6; }
.tip-src { margin: 0 0 0.75rem; font-size: 0.8125rem; color: var(--mute); line-height: 1.45; }
.tip-note { margin: 0.625rem 0 0; font-size: 0.75rem; color: var(--mute); line-height: 1.4; }
.tip-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.tip-done.on { background: var(--gold-soft); color: var(--gold); }
.tip-no { font-size: 0.875rem; color: var(--mute); padding: 0.5rem 0.25rem; }
.tip-hidden-btn { align-self: center; margin-top: 0.375rem; padding: 0.5rem; font-size: 0.875rem; color: var(--mute); }
.tip-empty { text-align: center; color: var(--mute); padding: 1.5rem 0; }
.tip-day { display: grid; grid-template-columns: 2.75rem 1fr auto; column-gap: 0.75rem; align-items: center; width: 100%; margin-top: 0.875rem; padding: 0.75rem 0.875rem; border: 0; color: var(--text); text-align: start; font: inherit; border-radius: 1.375rem; }
.tip-day .tip-text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.tip-day-lbl { font-size: 0.75rem; font-weight: 700; color: var(--gold); }
.tip-day .tip-short { -webkit-line-clamp: 1; }
.tip-day .chev { width: 1.125rem; height: 1.125rem; color: var(--mute); stroke: currentColor; }
/* 16 Nov pro4: journal + mood */
.j-bar { padding: 0 0 0.375rem; }
.j-card { padding: 1rem; display: flex; flex-direction: column; gap: 0.875rem; }
.j-ask { margin: 0; font-size: 1.125rem; font-weight: 700; text-align: center; }
.mood-row { display: flex; justify-content: space-between; gap: 0.375rem; }
.mood-row .mood { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.5rem 0; border-radius: 0.875rem; border: 0.125rem solid transparent; background: var(--card2); }
.mood-row .mood-face { font-size: 1.625rem; line-height: 1; filter: grayscale(.35); opacity: .8; }
.mood-row.big .mood-face { font-size: 2.125rem; }
.mood-row .mood small { font-size: 0.75rem; color: var(--sub); font-weight: 600; }
.mood-row .mood.on { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 16%, var(--card2)); }
.mood-row .mood.on .mood-face { filter: none; opacity: 1; }
.mood-row .mood.on small { color: var(--text); }
.j-note { width: 100%; min-height: 7.5rem; resize: vertical; border-radius: 0.875rem; padding: 0.75rem 0.875rem; background: var(--card2); color: var(--text); border: 1px solid var(--line); font: inherit; line-height: 1.5; }
.j-score { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; border-radius: 0.875rem; background: var(--card2); text-align: start; }
.j-score > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.j-score small { color: var(--sub); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.j-score-n { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0.1875rem solid var(--gold); color: var(--gold); font: 800 1rem/1 var(--num, inherit); flex: none; }
.j-hist { padding: 0.875rem 1rem; margin-top: 0.75rem; }
.j-dots { display: flex; align-items: flex-end; gap: 0.1875rem; height: 3.375rem; margin: 0.375rem 0 0.75rem; }
.j-dot { flex: 1; min-width: 0; height: 0.375rem; border-radius: 0.25rem; background: var(--mc, var(--card2)); padding: 0; }
.j-dot.sel { outline: 0.125rem solid var(--text); outline-offset: 1px; }
.j-avgs { display: flex; gap: 0.75rem; }
.j-avgs > span { flex: 1; display: flex; flex-direction: column; gap: 0.125rem; padding: 0.625rem 0.75rem; border-radius: 0.75rem; background: var(--card2); }
.j-avgs small { color: var(--sub); font-size: 0.75rem; }
.j-avgs b { font-size: 1.125rem; }
.j-link { margin: 0.625rem 0.125rem 0; }
.j-face { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: 50%; font-size: 1.375rem; background: color-mix(in srgb, var(--mc, var(--card2)) 20%, var(--card2)); }
.j-list .item { align-items: center; gap: 0.75rem; }
.j-home { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.75rem 0.875rem; margin-bottom: 0.75rem; text-align: start; }
.j-home .j-home-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; text-align: start; }
.j-home .j-home-t small { color: var(--sub); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.j-home.ask { flex-wrap: wrap; }
.j-home.ask .j-home-t { flex: 1 1 100%; }
.j-home.ask .mood-row { flex: 1 1 100%; }
.j-home.ask .mood { padding: 0.375rem 0; }
.bar-mood { font-size: 0.9375rem; line-height: 1; min-height: 1rem; }
.note-thumb { display: block; width: 100%; max-height: 7.5rem; object-fit: cover; border-radius: 0.625rem; margin-bottom: 0.375rem; }
.note-photo { display: block; max-width: 100%; max-height: 40vh; margin: 0 auto 0.75rem; border-radius: 0.875rem; }
.sh-img img { display: block; max-width: 100%; max-height: 16.25rem; margin: 0 auto; border-radius: 0.75rem; }
#shKind .seg { margin-bottom: 0.75rem; }

/* shared lists (listshare.js) */
.ls-bar { display: flex; gap: .5rem; margin: -.25rem 0 .75rem; }
.ls-chip.on-share { color: var(--gold); background: var(--gold-soft); }
.ls-body .ls-info { margin: .25rem .25rem 1rem; line-height: 1.5; }
.ls-status { color: var(--mute); font-size: .875rem; margin: 0 .25rem .75rem; }
.ls-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.ls-btns .pill { min-height: 2.75rem; padding: .625rem 1.25rem; font-weight: 700; }

/* focus app blocker (phone app) */
.fb-card { margin-top: 1rem; }
.fb-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; text-align: start; }
.fb-text { display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.fb-text small { color: var(--mute); font-size: .8125rem; line-height: 1.35; }
.fb-pick { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.fb-n { color: var(--mute); display: inline-flex; align-items: center; gap: .25rem; }
[dir=rtl] .fb-n svg { transform: scaleX(-1); }
.fb-locked { text-align: center; color: var(--gold); font-weight: 700; margin: .75rem 0 0; }
.fb-app label { display: flex; align-items: center; gap: .75rem; padding: .625rem 1rem; }
.fb-app img, .fb-noicon { width: 2rem; height: 2rem; border-radius: .5rem; flex: none; background: var(--line); }
.fb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-app input { width: 1.375rem; height: 1.375rem; accent-color: var(--gold); flex: none; }

.task-board { display: grid; gap: .8rem; }
.board-column { min-width: 0; }
.board-column > .group-lbl { margin-block: .35rem; }
.board-list, .board-item > .list { margin: 0; }
.board-item { display: block; padding-block-end: .35rem; }
.board-stage { padding-inline: .65rem; }
.board-stage select { max-width: 100%; font: inherit; color: var(--sub); background: var(--card); }
.board-item + .board-item { border-top: 1px solid var(--line); }
@media (min-width: 740px) {
  .task-board { grid-template-columns: repeat(3,minmax(0,1fr)); }
  body[data-screen="tasks"]:has(.task-board) #view { max-width: 76rem; }
}

/* Reflow when the available width is small relative to the reader's text size. */
.view { container-type: inline-size; }
.field input[type="number"] { min-inline-size: 0; max-inline-size: 100%; }
@container (max-width: 21rem) {
  .phead { grid-template-columns: minmax(44px, 15%) minmax(0, 1fr) minmax(44px, 15%); }
  .phead .icon-btn { max-inline-size: 100%; }
  .phead h1, .field-label, .stat-tile, .ds-text, .note { overflow-wrap: anywhere; }
  .pad, .home { padding-inline: min(1rem, 4cqi); }
  .field { flex-wrap: wrap; }
  .field-label, .field > :is(input, select, button, span) { min-width: 0; max-inline-size: 100%; }
  .field-label { flex-shrink: 1; }
  .seg { flex-wrap: wrap; }
  .seg button, .pill { max-inline-size: 100%; white-space: normal; overflow-wrap: anywhere; }
  .quick { flex-wrap: wrap; }
  .quick-input { flex-basis: 5rem; }
  .ctrl-row, .mood-row, .ds-today-top { flex-wrap: wrap; }
  .ctrl-row .big-btn { min-inline-size: 0; max-inline-size: 100%; }
  .mood-row .mood { min-inline-size: min(3rem, 45%); }
  .hms-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hms .num { width: 100%; min-width: 0; }
  .hms { min-width: 0; overflow-wrap: anywhere; }
  .ring-wrap, .water-ring { max-inline-size: 100%; }
  .water-ring { height: auto; aspect-ratio: 1; }
  .ring-time, .sw-time { font-size: min(3.625rem, 15cqi); }
  .stat-grid, .stat-row { grid-template-columns: repeat(auto-fit, minmax(min(8rem,100%),1fr)); }
  .ds-part { grid-template-columns: minmax(0,1fr) auto; }
  .ds-part-l { grid-column: 1/-1; }
}
@container (max-width: 16rem) {
  .home-counters { grid-template-columns: minmax(0,1fr); }
  .grid { grid-template-columns: repeat(auto-fit, minmax(min(7rem,100%),1fr)); }
  .tip-title { overflow-wrap: anywhere; }
  .tile-lbl { max-inline-size: 100%; overflow-wrap: anywhere; }
  .cal-title { min-width: 0; overflow-wrap: anywhere; }
  .cal-bar .icon-btn { flex: 0 0 min(2.5rem, 16%); }
  .bars { gap: min(.5rem, 1cqi); }
  .bar-col { min-width: 0; }
  .bar-day { writing-mode: vertical-rl; max-block-size: 100%; }
  .water-add.big-btn { min-inline-size: 0; }
}
.ex-plan[data-plan="fitness"] .counter-title { white-space: normal; overflow-wrap: anywhere; }
.fitness-value { width: 7em; max-width: 45%; text-align: center; }

.hour-page .hour-slot{width:100%;text-align:start;gap:.8rem;background:transparent;color:inherit;border:0}
.hour-slot b{flex-shrink:0;font-variant-numeric:tabular-nums}
.hour-slot .item-title,.hour-chips button,#hourSummary{overflow-wrap:anywhere;white-space:normal}
.hour-chips{display:flex;flex-wrap:wrap;gap:.4rem;margin-block:.7rem}
.hour-chips [aria-pressed="true"]{background:var(--gold);color:#181511}
.hour-page input[type=date],#hourText{min-width:0;max-width:100%;font:inherit}
#hourText{width:100%}
#hourSummary{width:100%;text-align:start;color:inherit}

.hour-input-label{display:grid;gap:.6rem;margin-block:.75rem}
.hour-input-label input{padding:.6rem}
.hour-slot:disabled{opacity:.55}
