/* Canvas and navigation remain separate rows: never double-count the iOS inset. */
.app-shell { position: fixed; inset: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; overflow: hidden; background: var(--bg); }
.app-shell > .app { width: 100%; height: 100%; min-height: 0; max-width: 760px; margin: 0 auto; padding: calc(20px + var(--safe-top)) max(20px,env(safe-area-inset-right)) 32px max(20px,env(safe-area-inset-left)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; -webkit-overflow-scrolling: touch; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 6px; font-size: 21px; font-weight: 730; letter-spacing: -.9px; }
.helperik-mark { width: 28px; height: 28px; color: var(--brand); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.day { color: var(--muted); font-size: 12px; }
.app-menu { position: relative; }
.app-menu summary { display: grid; place-items: center; list-style: none; width: 44px; height: 44px; border-radius: 12px; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.app-menu summary::-webkit-details-marker { display: none; }
.app-menu[open] summary { background: var(--raised); color: var(--ink); }
.menu-panel { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: 220px; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 16px 40px #0005; }
.menu-panel button { display: block; width: 100%; min-height: 46px; padding: 10px 12px; text-align: left; background: none; border: 0; border-radius: 10px; font-size: 14px; }
.menu-panel #reset-tasks { border-top: 1px solid var(--border); border-radius: 0; margin-top: 4px; color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 0 0 20px; }
h1 { margin: 0; font-size: 40px; line-height: 1.12; letter-spacing: -1.6px; font-weight: 680; }
.day-progress { flex: 0 0 auto; padding-bottom: 1px; color: var(--ink); text-align: right; font-size: 20px; font-weight: 550; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.day-progress small { display: block; margin-top: 3px; color: var(--quiet); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.group-head h2 { margin: 0; color: var(--muted); font-size: 12px; font-weight: 550; letter-spacing: .02em; }
.group-head > span, .archive-actions { color: var(--quiet); font-size: 12px; font-variant-numeric: tabular-nums; }
.list { display: grid; gap: 8px; }
.task { position: relative; display: grid; grid-template-columns: 28px minmax(0,1fr) 80px; gap: 0 12px; align-items: center; padding: 16px 14px; border: 0; border-radius: var(--radius); background: var(--panel); transition: background var(--motion); overflow-anchor: none; }
.mark-done { position: relative; display: grid; place-items: center; align-self: start; margin-top: 2px; width: 26px; height: 26px; padding: 0; background: transparent; border: 1.5px solid var(--quiet); border-radius: 50%; color: var(--accent); font-size: 22px; line-height: 1; }
.mark-done::after { content: ''; position: absolute; inset: -9px; }
.mark-done.plus { border-radius: 8px; border-color: var(--quiet); font-weight: 400; }
.task-main { min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center; cursor: pointer; border-radius: 3px; }
.task-title { font-size: 16px; font-weight: 560; line-height: 1.4; letter-spacing: -.25px; overflow-wrap: anywhere; }
.project-chevron { display: inline-block; margin-left: 7px; color: var(--quiet); font-size: 15px; transition: transform var(--motion); }
.project-chevron.expanded { transform: rotate(180deg); }
.task-note { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; margin-top: 8px; color: var(--quiet); font-size: 12px; }
.meta { color: var(--muted); font-size: 12px; }
.deadline { display: inline-flex; align-items: center; gap: 5px; }
.deadline.urgent { color: var(--red); }.deadline.soon { color: var(--amber); }
.deadline.urgent::before, .deadline.soon::before { content: ''; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: currentColor; }
.tag { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.tag::before { content: '↻'; font-size: 15px; line-height: 1; color: var(--quiet); }
.sub-count { font-variant-numeric: tabular-nums; }
.sub-count::before { content: '·'; margin-right: 8px; color: var(--quiet); }
.rating { --rating-width: 75px; position: relative; display: inline-block; flex: 0 0 auto; width: var(--rating-width); height: calc(var(--rating-width) / 5); vertical-align: middle; }
.rating svg { width: var(--rating-width); height: calc(var(--rating-width) / 5); fill: currentColor; }
.rating-track { display: block; color: var(--star-idle); }
.rating-fill { position: absolute; inset: 0 auto 0 0; display: block; overflow: hidden; color: var(--star); }
.task-rating { grid-column: 3; grid-row: 1; align-self: start; display: flex; flex-direction: column; align-items: flex-end; padding-top: 3px; }
.task-rating .rating { --rating-width: 80px; }
.edit-mini { display: grid; place-items: center; border: 0; background: none; width: 44px; height: 44px; margin: 0 -7px -12px 0; padding: 0; color: var(--quiet); font-size: 22px; }
.task-note:empty { display: none; }
.task-title { transition: color .2s ease; }
.mark-done { transition: background .15s ease,border-color .15s ease,color .15s ease; }
.task.completed .mark-done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 700; }
.task.completed .task-title { color: var(--muted); }
.project-progress { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.project-progress-fill { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--accent); transform-origin: left center; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.inline-subs { grid-column: 2/-1; border-top: 1px solid var(--border); margin-top: 14px; padding-top: 6px; }
.inline-sub { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 0; border: 0; background: none; color: var(--ink); font-size: 14px; text-align: left; }
.check-circle { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; padding: 0; border: 1px solid var(--quiet); border-radius: 6px; font-size: 13px; line-height: 1; }
.inline-sub-label { overflow-wrap: anywhere; }
.inline-sub.is-done { color: var(--quiet); }
.inline-sub.is-done .check-circle { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sub-link { border: 0; background: none; min-height: 44px; padding: 6px 0; color: var(--accent); font-size: 12px; }
.archive { margin-top: 28px; }
.archive .list { gap: 0; }
.archive .task { padding: 12px 14px; background: none; border-radius: 0; border-bottom: 1px solid var(--hair); }
.archive .mark-done { width: 22px; height: 22px; margin-left: 2px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 700; }
.archive .task-title { font-size: 14px; color: var(--muted); font-weight: 450; }
.archive .edit-mini { display: none; }
.archive .task-main { min-height: 30px; }
.archive .task-rating { align-self: center; padding-top: 0; }.archive .rating { --rating-width: 75px; }
.archive .mark-done { align-self: center; margin-top: 0; }
.empty-state { padding: 28px 20px 32px; border: 0; background: var(--panel); border-radius: var(--radius); }
.empty-mark { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); font-size: 26px; }
.empty-state h2 { font-size: 21px; letter-spacing: -.5px; margin: 0 0 8px; font-weight: 600; }
.empty-state p { margin: 0; max-width: 280px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.primary-button { min-height: 44px; padding: 11px 17px; border: 0; border-radius: 11px; color: var(--accent-ink); background: var(--accent); font-weight: 650; }
.empty-state .primary-button { margin-top: 22px; }
.app-shell > .tabs { display: flex; align-items: start; justify-content: space-evenly; position: relative; min-height: calc(57px + max(8px,var(--nav-inset,var(--safe-bottom)))); margin: 0; padding: 8px env(safe-area-inset-right,0px) max(8px,var(--nav-inset,var(--safe-bottom))) env(safe-area-inset-left,0px); border-top: 1px solid var(--hair); background: var(--bg); }
.tabs button { flex: 1 1 0; min-width: 44px; width: 0; height: 48px; margin: 0; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--quiet); padding: 0; font-size: 10px; font-weight: 500; }
.tabs svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs .selected { color: var(--accent); }
.tab.selected .icon-surface { fill: currentColor; }
.tab.selected .icon-detail { stroke: var(--bg); stroke-width: 2; }
.tabs .add-task { color: var(--accent); }
.add-task .add-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--accent-ink); background: var(--accent); transition: transform 160ms ease, opacity 160ms ease; }
.add-task svg { width: 22px; height: 22px; }
.add-task:active .add-icon { transform: scale(.94); opacity: .86; }
@media (prefers-reduced-motion: reduce) { .add-task .add-icon { transition: none; } }
/* Statistics: one reading, two totals, and a calendar. */
.stats-heading { margin-bottom: 8px; }
.stats-period { margin: 0 0 26px; font-size: 13px; color: var(--muted); }
.stats-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.stat-number { display: block; font-size: 40px; line-height: 1.15; letter-spacing: -1.3px; font-weight: 580; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-caption { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.stat-filter { width: 100%; min-height: 46px; padding: 11px 12px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--ink); font-size: 14px; }
.calendar-wrap { padding: 16px; border-radius: var(--radius); background: var(--panel); }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; }
.calendar-weekdays { margin-bottom: 12px; text-align: center; color: var(--quiet); font-size: 11px; }
.cal-day { position: relative; aspect-ratio: 1; min-height: 28px; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: var(--raised); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cal-day.active { background: var(--calendar-active); color: var(--ink); }
.cal-day.strong { background: var(--accent); color: var(--accent-ink); }
.cal-day.today { border-color: var(--accent); }
.cal-day.future { opacity: .3; }
.cal-dot { position: absolute; bottom: 1px; right: 4px; font-size: 8px; }
.calendar-legend { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin: 14px 0 0; color: var(--quiet); font-size: 10px; }
.calendar-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--raised); }
.calendar-legend i:nth-of-type(2) { background: var(--calendar-active); }.calendar-legend i:nth-of-type(3) { background: var(--accent); }
/* Fixed-height task sheet; nested panes keep their own scroll position. */
.overlay { position: fixed; z-index: 50; inset: auto 0 auto; top: var(--editor-top,0px); height: var(--editor-height,100dvh); display: flex; justify-content: center; align-items: stretch; padding: var(--safe-top) env(safe-area-inset-right,0px) 0 env(safe-area-inset-left,0px); overflow: hidden; background: transparent; transition: background var(--motion); overscroll-behavior: none; }
.overlay.is-open { background: #050609bd; }
.dialog { position: relative; width: 100%; max-width: 620px; height: 100%; overflow: clip; isolation: isolate; border: 1px solid var(--border); border-bottom: 0; border-radius: 22px 22px 0 0; background: var(--panel); transform: translateY(105%); transition: transform .42s cubic-bezier(.22,.7,.22,1); box-shadow: 0 -12px 60px #0004; }
.is-open .dialog { transform: translateY(0); }
.editor-screen { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; background: var(--panel); padding-bottom: var(--safe-bottom); transition: transform .42s cubic-bezier(.22,.7,.22,1),opacity var(--motion); }
.editor-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; flex: 0 0 68px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.editor-header h2 { margin: 0; font-size: 14px; font-weight: 600; text-align: center; }
.editor-header button { justify-self: start; border: 0; min-height: 44px; padding: 0 4px; background: none; color: var(--muted); font-size: 13px; }
.editor-header button:last-child { justify-self: end; }
.editor-header .editor-save { border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 650; min-height: 36px; padding: 8px 12px; }
.editor-header [aria-label='Назад'] { font-size: 32px; width: 44px; text-align: left; }
.editor-body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 24px; }
.title-label { margin: 20px 0 8px; color: var(--quiet); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
#edit-title { flex: 0 0 auto; width: 100%; min-height: 46px; resize: none; max-height: 140px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 25px; font-weight: 570; letter-spacing: -.6px; line-height: 1.35; padding: 0 0 14px; outline-offset: 0; }
#edit-title::placeholder { color: var(--quiet); font-weight: 450; }
#edit-title:focus { outline: none; }
#edit-title[aria-invalid='true'] { outline: 1px solid var(--red); }
.editor-row { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; width: 100%; min-height: 54px; padding: 12px 0; border: 0; background: transparent; text-align: left; font-size: 14px; }
.deadline-row { border-top: 0; }
.editor-row:disabled { opacity: 1; }
.deadline-row:disabled .row-chevron { visibility: hidden; }
#deadline-label { margin-left: auto; max-width: 65%; text-align: right; color: var(--accent); font-size: 13px; line-height: 1.5; }
.row-chevron { flex: 0 0 14px; color: var(--quiet); font-size: 22px; line-height: 1; text-align: center; }
.deadline-chevron { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform-origin: 50% 50%; transform-box: view-box; transition: transform .36s ease; }
.deadline-row[aria-expanded='true'] .deadline-chevron { transform: rotate(180deg); }
.editor-drawer { display: grid; grid-template-rows: 0fr; opacity: 0; flex: 0 0 auto; transition: grid-template-rows .36s cubic-bezier(.22,.8,.25,1),opacity .26s ease; }
.editor-drawer.is-expanded { grid-template-rows: 1fr; opacity: 1; }.drawer-clip { min-height: 0; overflow: hidden; }
.editor-priority-group { flex: 0 0 auto; margin: 12px 0 8px; padding: 4px 0 20px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.priority-heading { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: 15px; font-weight: 600; }
#editor-priority { display: flex; align-items: center; }
#editor-priority .rating { --rating-width: 90px; }
.ratings { display: grid; gap: 16px; }
.rate-label-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 3px 12px; margin-bottom: 7px; }
.field-label { font-size: 13px; color: var(--ink); }
.rate-caption { color: var(--quiet); font-size: 11px; }
.rating-options, .repeat-options, .target-adjust { display: grid; padding: 3px; gap: 3px; background: var(--bg); border-radius: 10px; }
.rating-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
.rating-option, .repeat-option, .repeat-step { min-width: 0; height: 44px; padding: 0 3px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; }
.rating-option.selected, .repeat-option[aria-pressed='true'] { background: var(--raised); color: var(--ink); font-weight: 650; }
.repeat-toggle-row { justify-content: space-between; }
.switch { position: relative; display: block; flex: 0 0 46px; width: 46px; height: 28px; }
.switch input { appearance: none; -webkit-appearance: none; position: absolute; inset: -8px 0; width: 46px; height: 44px; margin: 0; border: 0; outline: none; box-shadow: none; background: transparent; cursor: pointer; z-index: 1; }
.switch-track { position: relative; display: block; width: 46px; height: 28px; border-radius: 16px; background: var(--track); transition: background var(--motion),filter .16s; pointer-events: none; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); transition: transform var(--motion),background var(--motion); }
.switch input:checked + .switch-track { background: var(--accent); }.switch input:checked + .switch-track::after { transform: translateX(18px); background: var(--accent-ink); }
.switch input:focus-visible + .switch-track { filter: brightness(1.25); }
.repeat-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0 12px; }
.repeat-options { flex: 1 1 176px; min-width: 0; grid-template-columns: repeat(2,minmax(0,1fr)); }
.repeat-target { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-left: auto; }
.repeat-target-label { display: none; color: var(--muted); font-size: 13px; }
.target-adjust { grid-template-columns: 44px minmax(24px,auto) 44px; align-items: center; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.repeat-step { color: var(--accent); font-size: 20px; line-height: 1; }
.repeat-step:active { background: var(--raised); }
.repeat-option:focus-visible, .repeat-step:focus-visible { outline-offset: -2px; }
@media (max-width: 350px) {
  .repeat-target { flex-basis: 100%; }
  .repeat-target-label { display: block; }
}
.description-row, .subs-row { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-height: 70px; padding-right: 24px; }
.description-row .row-chevron, .subs-row .row-chevron { position: absolute; right: 0; top: 24px; }
.row-label { font-size: 14px; }
#description-preview { font-size: 13px; line-height: 1.6; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#subs-preview { flex: 0 0 auto; }
.subs-row { flex-direction: row; align-items: center; min-height: 52px; gap: 12px; }
#subs-summary { margin-left: auto; color: var(--muted); font-size: 12px; }
.subs-row .row-chevron { top: 16px; }
.draft-sub-row { display: flex; align-items: center; min-height: 44px; gap: 0; }
.draft-sub-check { position: relative; flex: 0 0 44px; display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; margin-left: -10px; border: 0; background: transparent; }
.draft-sub-check.is-done .check-circle { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.draft-sub-name { flex: 1; min-width: 0; min-height: 44px; padding: 8px 0; border: 0; background: none; color: var(--muted); text-align: left; overflow-wrap: anywhere; font-size: 14px; }
.delete { flex: 0 0 44px; align-self: start; margin-top: 16px; padding: 0; border: 0; background: none; color: var(--red); font-size: 13px; }
.editor-subscreen { z-index: 2; transform: translateY(100%); visibility: hidden; transition: transform .42s cubic-bezier(.22,.7,.22,1),visibility 0s .42s; }
.editor-subscreen.is-active { transform: translateY(0); visibility: visible; transition: transform .42s cubic-bezier(.22,.7,.22,1),visibility 0s; }
.editor-screen.behind-pane { transform: translateY(-12px); opacity: .6; }
#edit-description { display: block; flex: 1; min-height: 0; width: 100%; resize: none; margin: 0; border: 0; border-radius: 0; padding: 22px 20px; background: transparent; font: inherit; font-size: 17px; line-height: 1.65; outline-offset: -3px; }
#edit-description:focus, .dialog:focus, .editor-subscreen:focus { outline: none; }
.sub-editor-body { flex: 1; min-height: 0; overflow: auto; padding: 0 20px; overscroll-behavior: contain; }
.subform { position: sticky; top: 16px; z-index: 1; display: flex; align-items: center; gap: 0; margin: 16px 0; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); overflow: hidden; }
.subform:focus-within { border-color: var(--accent); }
.subform input { flex: 1; min-width: 0; height: 48px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 0; background: transparent; outline: none; font-size: 16px; }
.subform button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; margin: 2px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--accent); }
.subform svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.subitem { display: flex; align-items: center; min-height: 58px; gap: 12px; border-bottom: 1px solid var(--border); }
.subitem input[type='checkbox'] { appearance: none; -webkit-appearance: none; display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--quiet); border-radius: 7px; background: transparent; cursor: pointer; }
.subitem input[type='checkbox']:checked { background: var(--accent); border-color: var(--accent); }.subitem input[type='checkbox']:checked::after { content: '✓'; color: var(--accent-ink); font-size: 16px; font-weight: 700; line-height: 1; }
.sub-name { flex: 1; min-width: 0; width: auto; height: 44px; margin: 0; padding: 6px 0; border: 0; background: transparent; font-size: 16px; }.subitem.checked .sub-name { color: var(--quiet); }
.subitem button { flex: 0 0 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--quiet); font-size: 23px; }
.date-wheels { position: relative; display: grid; grid-template-columns: .75fr 1.5fr 1fr; height: 220px; gap: 4px; margin: 12px 0; border-radius: 12px; background: var(--bg); isolation: isolate; overflow: hidden; }
.date-wheels::before { content: ''; position: absolute; left: 6px; right: 6px; top: 88px; height: 44px; border-radius: 8px; background: var(--raised); z-index: -1; pointer-events: none; }
.date-wheel { height: 220px; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none; padding: 88px 0; touch-action: pan-y; mask-image: linear-gradient(transparent,#000 32%,#000 68%,transparent); -webkit-mask-image: linear-gradient(transparent,#000 32%,#000 68%,transparent); }
.date-wheel::-webkit-scrollbar { display: none; }.wheel-option { display: grid; place-items: center; height: 44px; scroll-snap-align: center; color: var(--quiet); font-size: 20px; cursor: pointer; user-select: none; }.wheel-option.selected { color: var(--ink); }
html.editor-open { overflow: hidden; overscroll-behavior: none; scroll-behavior: auto; }.editor-open body { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; overscroll-behavior: none; }.editor-open .app-shell > .app { overflow: hidden; }
.update-notice { position: fixed; z-index: 45; bottom: calc(85px + var(--safe-bottom)); left: 50%; transform: translateX(-50%); width: min(92vw,430px); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--raised); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 30px #0005; font-size: 13px; }.update-notice button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; min-height: 44px; padding: 8px 14px; font-weight: 650; }
@media (hover: hover) { .task:hover { background: var(--raised); }.mark-done:hover { border-color: var(--accent); }.menu-panel button:hover, .subform button:hover { background: var(--raised); }.task-main:hover .task-title { color: #fff; } }
@media (min-width: 768px) { .app-shell > .app { padding-top: calc(36px + var(--safe-top)); }.top { margin-bottom: 28px; }.page-head { margin-bottom: 24px; }h1 { font-size: 48px; }.task { padding: 18px 20px; column-gap: 16px; }.task-title { font-size: 17px; }.calendar-wrap { padding: 24px; }.cal-day { aspect-ratio: 1.45; } }
@media (max-width: 365px) { .app-shell > .app { padding-left: max(16px,env(safe-area-inset-left)); padding-right: max(16px,env(safe-area-inset-right)); }.brand { font-size: 20px; }.top { margin-bottom: 18px; }.day { font-size: 11px; }.task { padding: 14px 11px; gap: 0 9px; grid-template-columns: 26px minmax(0,1fr) 75px; }.task-title { font-size: 15px; }.editor-body, .sub-editor-body { padding-left: 16px; padding-right: 16px; }.ratings { gap: 14px; }.task-rating .rating { --rating-width: 75px; }.editor-header { padding: 0 12px; }.editor-header .editor-save { padding: 8px; }.editor-header h2 { font-size: 13px; }#edit-title { font-size: 23px; }.calendar-wrap { padding: 12px; }.calendar-grid, .calendar-weekdays { gap: 4px; } }

/* Recommendation questionnaire and optional task estimates. */
#now-heading { font-size: clamp(32px, 8vw, 40px); }
.now-form { display: grid; gap: 18px; }
.now-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.now-form legend { margin-bottom: 8px; padding: 0; font-size: 14px; font-weight: 600; }
.now-options { display: grid; gap: 2px; padding: 3px; border-radius: 12px; background: var(--panel); }
.now-times { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.now-energy { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.now-options label { display: grid; place-items: center; min-height: 44px; padding: 2px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 550; cursor: pointer; transition: background var(--motion), color var(--motion); }
.now-options input:checked + label { background: var(--accent-soft); color: var(--ink); }
.now-options input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -2px; }
.now-options label:active { background: var(--raised); }
.now-hint { margin: 6px 0 0; color: var(--quiet); font-size: 12px; }
#now-pick { justify-self: start; }
#now-result:not(:empty) { margin-top: 22px; }
.now-card, .now-empty { padding: 16px; border-radius: var(--radius); background: var(--panel); }
.now-card h2, .now-empty h2 { min-width: 0; margin: 0; font-size: 17px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.now-card h2:focus, .now-empty h2:focus { outline: none; }
.now-card .rating { flex: 0 0 auto; }
.now-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; }
.now-card p, .now-empty p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.now-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.now-empty .primary-button { margin-top: 14px; }
.now-secondary { min-height: 44px; padding: 8px 14px; border: 0; border-radius: 11px; background: var(--raised); color: var(--ink); font-weight: 550; }
.editor-estimates { flex: 0 0 auto; padding: 4px 0; }
.editor-estimates summary { align-content: center; min-height: 44px; color: var(--muted); font-size: 14px; cursor: pointer; }
.estimate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 6px 0 10px; }
.estimate-fields label, .editor-estimates p { color: var(--quiet); font-size: 12px; }
.estimate-fields input, .estimate-fields select { display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px; border: 0; border-radius: 9px; background: var(--raised); font-size: 16px; }

/* A recommendation shows its parent goal and the same progress used in the list. */
.now-card { position: relative; }
.now-project { margin-bottom: 6px; color: var(--quiet); font-size: 13px; overflow-wrap: anywhere; }
.recommended-sub { background: var(--accent-soft); }

#ai-settings, #sync-settings { width: min(480px, calc(100% - 24px)); max-height: calc(100dvh - 36px - var(--safe-top) - var(--safe-bottom)); overflow: auto; padding: 18px; border: 0; border-radius: var(--radius); color: var(--ink); background: var(--panel); }
#ai-settings::backdrop, #sync-settings::backdrop { background: #0009; }
#sync-settings p { color: var(--muted); font-size: 14px; margin: 8px 0 14px; }
#sync-account-label { overflow-wrap: anywhere; }
#sync-account-label:empty { display: none; }
.sync-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#sync-settings button { min-height: 44px; }
#sync-sign-in { display: inline-flex; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 8px; background: #f2f2f2; color: #1f1f1f; font: 500 14px/20px 'Google Sans', system-ui, sans-serif; }
#sync-sign-in img { object-fit: contain; }
.sync-conflict { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--hair); }
.sync-conflict h3 { margin: 0 0 8px; font-size: 15px; overflow-wrap: anywhere; }
#sync-settings summary { min-height: 34px; padding-block: 7px; color: var(--muted); cursor: pointer; overflow-wrap: anywhere; }
#sync-settings input { width: min(100%, 245px); min-height: 44px; padding: 8px; color: var(--ink); background: var(--bg); border: 0; border-radius: 8px; }
.sync-privacy { display: block; width: fit-content; margin-top: 12px; color: var(--muted); font-size: 13px; }
.sync-conflict pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow: auto; font-size: 12px; color: var(--muted); }
#sync-delete { margin-top: 12px; text-align: left; }
.ai-heading, #ai-journal li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-heading h2 { margin: 0; font-size: 22px; }
#ai-settings p { margin: 3px 0 12px; color: var(--muted); font-size: 13px; }
.ai-setting { display: flex; align-items: center; gap: 9px; min-height: 44px; margin-top: 4px; font-weight: 600; }
.ai-setting input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--accent); }
#ai-settings h3 { margin: 18px 0 6px; font-size: 16px; }
#ai-settings-status:empty, #ai-challenge:empty { display: none; }
#ai-journal { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
#ai-journal li { padding: 8px; border-radius: 9px; background: var(--raised); }
#ai-journal span { min-width: 0; overflow-wrap: anywhere; }
#ai-journal small { display: block; color: var(--muted); }
#ai-journal button { min-height: 44px; padding: 6px; border: 0; background: none; color: var(--accent); font-weight: 600; }
.ai-status { position: fixed; z-index: 4; bottom: calc(65px + var(--safe-bottom)); left: 50%; width: max-content; max-width: calc(100% - 32px); margin: 0; transform: translateX(-50%); padding: 8px 12px; border-radius: 9px; background: var(--raised); color: var(--ink); font-size: 13px; pointer-events: none; }
.editor-open .ai-status { display: none; }

.privacy-document, .privacy-document body { min-height: 100%; height: auto; overflow: visible; }
.privacy-page { max-width: 620px; margin: 0 auto; padding: calc(20px + var(--safe-top)) 20px calc(24px + var(--safe-bottom)); line-height: 1.55; }
.privacy-page a { color: var(--accent); }
.privacy-page h2 { font-size: 18px; margin: 24px 0 8px; }
.privacy-page p { color: var(--muted); margin: 0 0 12px; }
