/* Hodion app screens. All colors come from the tokens in app.css. */
body { padding-bottom: calc(5.6rem + env(safe-area-inset-bottom)); }
.wrap { width: min(var(--max), calc(100% - 1.5rem)); }

/* header extras */
.coin-pill { margin: 0; min-height: 40px; display: inline-flex; align-items: center; padding: 0 0.9rem; border-radius: 999px; background: var(--sun); color: var(--sun-ink); font-weight: 800; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.coin-pill::before { content: "\2726"; margin-right: 0.4rem; }
.coin-pill.bump { animation: bump 520ms var(--ease); }
#pro-status:empty { display: none; }
#pro-status { margin: 0 0 0.75rem; padding: 0.6rem 0.9rem; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 650; animation: pop-in var(--t-mid) var(--ease); }

/* tab bar + fab */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.2rem;
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(10, 50, 35, 0.08);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem;
  min-height: 52px; min-width: 44px; padding: 0.2rem; border: 0; border-radius: 14px;
  background: transparent; color: var(--muted); font-size: 0.75rem; font-weight: 700; line-height: 1.1; cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.tabbar button .ic { width: 24px; height: 24px; transition: transform var(--t-mid) var(--ease); }
.tabbar button:active { transform: scale(0.94); }
.tabbar button[aria-current="page"] { background: var(--accent-soft); color: var(--accent-soft-ink); }
.tabbar button[aria-current="page"] .ic { transform: translateY(-1px) scale(1.08); }
@media (hover: hover) { .tabbar button:hover { background: var(--accent-soft); color: var(--accent-soft-ink); } }
.fab {
  position: fixed; right: 1rem; bottom: calc(5.4rem + env(safe-area-inset-bottom)); z-index: 21;
  width: 56px; height: 56px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: var(--pine); color: var(--on-pine); cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); transition: transform var(--t-fast) var(--ease);
}
.fab .ic { width: 28px; height: 28px; }
.fab:active { transform: scale(0.92); }
body[data-view="today"] .fab, body[data-view="focus"] .fab { display: none; }

/* cards */
.pro-part, .pro-card, .cal-col, .settings-card, .hint-card, .empty-state {
  background: var(--surface); border: 1.5px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pro-card { position: relative; padding: 0.85rem 0.9rem 0.85rem 2rem; margin-top: 0.6rem; color: var(--ink); transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), opacity var(--t-mid) var(--ease); }
.pro-card h3 { padding-right: 0.25rem; }
.pro-card .hint { margin: 0.15rem 0 0.4rem; }
.pro-card .inline-actions { margin-top: 0.5rem; }
.pro-card .button { min-height: 42px; padding: 0.35rem 0.85rem; font-size: 0.92rem; }
.pro-card .done-btn { background: var(--pine); }
.pro-card.is-done { opacity: 0.72; }
.pro-card.is-done h3 { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.pro-card.just-added { animation: pop-in 600ms var(--ease), glow 1.6s ease-out; }
.drag-handle { position: absolute; left: 0.35rem; top: 0.8rem; color: var(--muted); cursor: grab; touch-action: none; opacity: 0.8; }
.drag-handle .ic { width: 20px; height: 20px; }
.pro-card:active .drag-handle { cursor: grabbing; }
@media (hover: hover) { .pro-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); } }
.pro-card[draggable="true"] { cursor: default; }
.parts, .week-grid, .month-grid { display: grid; gap: 0.75rem; }
.pro-part { padding: 0.8rem; color: var(--part-ink); }
.pro-part h3 { margin-bottom: 0.2rem; }
.pro-part .pro-card { border-color: rgba(0, 0, 0, 0.12); }
.pro-part > .button.secondary { color: var(--part-ink); border-color: color-mix(in srgb, var(--part-ink) 55%, transparent); background: transparent; width: 100%; margin-top: 0.4rem; justify-content: flex-start; }
.pro-part .hint, .pro-part .empty-line { color: color-mix(in srgb, var(--part-ink) 78%, transparent); }
.part-morning { background: var(--part-morning); }
.part-day { background: var(--part-day); }
.part-evening { background: var(--part-evening); }
.part-night { background: var(--part-night); }
.empty-line { margin: 0.2rem 0 0; }
h2 { margin-top: 1.1rem; }

/* quick add */
.quick-card { padding: 0.8rem; margin-bottom: 0.75rem; background: var(--surface); border: 1.5px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); }
.quick-card label { flex: 1 0 100%; font-size: var(--fs-sm); color: var(--muted); }
.quick-card input { flex: 1 1 100%; }
.quick-card .button { flex: 1 1 auto; }
.quick-card .hint { flex: 1 0 100%; margin: 0; }

/* today layout */
.today-grid { display: block; }
.today-side > * { margin-bottom: 0.8rem; }
.companion {
  display: grid; grid-template-columns: 96px 1fr; grid-template-areas: "pic body" "name body"; gap: 0.1rem 0.9rem; align-items: center;
  padding: 0.8rem 1rem; background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow);
}
#mascot { grid-area: pic; cursor: pointer; }
#mascot-name { grid-area: name; margin: 0; text-align: center; font-weight: 800; color: var(--pine); }
.companion > div:last-child { grid-area: body; min-width: 0; }
#mascot-line { margin: 0 0 0.3rem; font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
#streak-line { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
#level-bar p { margin: 0.4rem 0 0.2rem; font-weight: 750; font-size: var(--fs-sm); }
.level-track { height: 12px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.level-fill { height: 100%; background: linear-gradient(90deg, var(--pine), var(--sun)); border-radius: 999px; transition: width 600ms var(--ease); }
.mascot-svg { width: 96px; height: 112px; animation: mascot-bob 3.2s ease-in-out infinite; }
.world-card { border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--line-soft); box-shadow: var(--shadow); background: var(--surface); }
.world-svg { width: 100%; height: auto; max-height: 240px; display: block; }
.world-svg.is-dim { opacity: 0.78; }
.world-caption { margin: 0; padding: 0.5rem 0.9rem; font-weight: 700; font-size: var(--fs-sm); color: var(--accent-soft-ink); background: var(--accent-soft); }

/* banners, hint cards, empty states */
.banner { display: flex; gap: 0.8rem; padding: 0.9rem 1rem; border-radius: var(--radius); background: var(--warn-bg); color: var(--ink); border: 1.5px solid color-mix(in srgb, var(--mid) 45%, transparent); }
.banner-quiet { background: var(--accent-soft); color: var(--accent-soft-ink); border-color: var(--line-soft); }
.banner-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); color: var(--pine); }
.banner p { margin: 0.15rem 0 0.6rem; }
.banner-quiet p { margin: 0.1rem 0 0; }
.hint-card { padding: 0.7rem 1rem; }
.hint-card summary { cursor: pointer; font-weight: 750; min-height: 32px; display: flex; align-items: center; }
.hint-card ul { margin: 0.4rem 0 0.7rem; padding-left: 1.1rem; color: var(--muted); }
details > summary { cursor: pointer; font-weight: 700; }
.empty-state { text-align: center; padding: 1.4rem 1rem 1.2rem; border-style: dashed; box-shadow: none; background: var(--surface-2); }
.empty-state h3 { margin-top: 0.4rem; }
.empty-state p { margin: 0.3rem auto 0.9rem; color: var(--muted); max-width: 26rem; }
.empty-art { width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--pine); animation: float 4s ease-in-out infinite; }
.empty-art .ic { width: 32px; height: 32px; }

/* more screen */
.group-title { margin: 1.3rem 0 0.5rem; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.35rem; min-height: 84px; padding: 0.8rem 0.9rem;
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow);
  font-weight: 750; text-align: left; text-decoration: none; cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.tile .ic { width: 26px; height: 26px; color: var(--pine); }
.tile-accent { background: var(--accent-soft); color: var(--accent-soft-ink); border-color: var(--pine); }
@media (hover: hover) { .tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--pine); } }
.tile:active { transform: scale(0.97); }
.settings-card { padding: 0.4rem 1rem 0.8rem; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 54px; border-bottom: 1px solid var(--line-soft); }
.setting-row:last-of-type { border-bottom: 0; }
.setting-row select, .setting-row input { width: auto; max-width: 11rem; }
.setting-row .button { min-height: 40px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--line-soft); }
.seg { min-height: 38px; padding: 0 0.9rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-weight: 700; cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.seg[aria-pressed="true"] { background: var(--pine); color: var(--on-pine); }

/* calendar, habits, timeline */
.cal-nav { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 0.35rem; margin: 0.6rem 0; }
.cal-nav p { margin: 0; font-weight: 750; text-align: center; }
.cal-nav .button { padding: 0; }
.month-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.3rem; }
.month-cell { min-height: 48px; text-align: left; padding: 0.3rem; background: var(--surface); border: 1.5px solid var(--line-soft); border-radius: 12px; cursor: pointer; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.month-cell:active { transform: scale(0.96); }
@media (hover: hover) { .month-cell:hover { background: var(--accent-soft); } }
.month-cell.is-today, .cal-col.is-today { border-color: var(--pine); box-shadow: inset 0 0 0 1.5px var(--pine); }
.month-cell.out-month { opacity: 0.45; }
.day-count { display: block; font-weight: 800; font-size: var(--fs-sm); }
.dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-left: 0.15rem; }
.cal-col { padding: 0.6rem; }
.week-board { display: grid; grid-template-columns: 1.8rem repeat(7, minmax(0, 1fr)); gap: 0.15rem; }
.week-board .hour-body { min-height: 36px; }
.week-board .duration-block, .week-board .hour-label, .weekday-label { font-size: 0.68rem; }
.weekday-label.is-today { outline: 2px solid var(--pine); border-radius: 6px; }
.weekday-head { margin-bottom: 0.35rem; text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.hour-slot { display: grid; grid-template-columns: 3.4rem 1fr; gap: 0.4rem; min-height: 56px; }
.hour-slot.is-empty { min-height: 40px; }
.hour-label { padding-top: 0.2rem; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.hour-body { position: relative; min-height: 40px; border-top: 1px solid var(--line); cursor: pointer; transition: background var(--t-fast) var(--ease); }
@media (hover: hover) { .hour-body:hover { background: var(--accent-soft); } }
.hour-slot.is-now .hour-label { color: var(--coral); }
.now-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--coral); z-index: 2; pointer-events: none; }
.now-line span { position: absolute; right: 0; top: -0.95rem; padding: 0 0.4rem; border-radius: 6px; background: var(--coral); color: #fff; font-size: 0.68rem; font-weight: 800; }
.earlier-toggle { width: 100%; margin-bottom: 0.4rem; }
.duration-block { color: #fff; border-radius: 8px; padding: 0.25rem 0.4rem; margin-top: 0.2rem; }
.habit-card { border-left: 6px solid var(--habit, var(--pine)); padding-left: 0.9rem; }
.habit-cell { display: flex; align-items: center; justify-content: center; min-height: 32px; border-radius: 8px; border: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.habit-cell.done { background: var(--ok-bg); font-weight: 800; }
.habit-cell.missed { background: var(--bad-bg); }
.habit-cell.open { background: var(--warn-bg); }
.habit-cell.skipped { color: var(--muted); }

/* shop, badges, focus, charts */
.shop-card, .badge-card { margin-bottom: 0.6rem; padding-left: 0.9rem; }
.badge-card.is-on { background: var(--warn-bg); }
.focus-clock { font-size: clamp(3rem, 14vw, 4.5rem); font-weight: 800; font-variant-numeric: tabular-nums; margin: 0.2rem 0; color: var(--pine); }
#qr-host canvas { width: 126px; height: 126px; background: #fff; }
#ritual-chart { display: flex; align-items: flex-end; gap: 0.35rem; min-height: 120px; }
.chart-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.15rem; min-width: 36px; min-height: 44px; }
.chart-mood, .chart-energy { display: block; width: 12px; border-radius: 6px; }
.chart-mood { background: var(--coral); }
.chart-energy { background: var(--pine); }
.ring { width: 72px; height: 72px; border-radius: 50%; background: conic-gradient(var(--pine) calc(var(--p) * 1%), var(--line-soft) 0); }
.toast { position: fixed; left: 50%; bottom: calc(6rem + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 0.7rem 1.1rem; border-radius: 999px; z-index: 40; max-width: min(92vw, 28rem); font-weight: 700; box-shadow: var(--shadow-lift); animation: toast-in 320ms var(--ease); }

/* editor + dialogs */
#editor-form { gap: 0.55rem; }
#editor-form label { font-size: var(--fs-sm); color: var(--muted); }
.check-row { display: flex; align-items: center; gap: 0.5rem; color: var(--ink) !important; font-size: var(--fs-md) !important; }
.editor-more { border: 1.5px solid var(--line-soft); border-radius: var(--radius-sm); padding: 0.4rem 0.8rem 0.8rem; }
.editor-more summary { min-height: 40px; display: flex; align-items: center; }
.editor-more > * + * { margin-top: 0.45rem; }
.editor-more label { display: block; }
#editor, #edit-notes { font-family: var(--font); }
dialog#editor { max-height: 92vh; overflow: auto; }

/* onboarding */
.onboarding { max-width: min(30rem, calc(100vw - 1rem)); border-radius: 26px; }
.ob-card { position: relative; padding: 1.4rem 1.3rem 1.3rem; text-align: center; background: linear-gradient(180deg, var(--accent-soft), var(--surface) 55%); border-radius: 26px; }
.ob-skip { position: absolute; right: 0.7rem; top: 0.7rem; min-height: 40px; padding: 0 0.8rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.ob-art { height: 150px; display: grid; place-items: center; animation: pop-in 400ms var(--ease); }
.ob-step { margin: 0.5rem 0 0; font-size: var(--fs-sm); font-weight: 800; color: var(--pine); letter-spacing: 0.04em; }
.ob-card h2 { margin: 0.2rem 0 0.4rem; font-size: 1.5rem; }
.ob-card p { margin: 0 auto; max-width: 24rem; color: var(--muted); }
.ob-card input { margin-top: 0.9rem; }
.ob-dots { display: flex; justify-content: center; gap: 0.4rem; margin: 1rem 0 0.8rem; }
.ob-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: width var(--t-mid) var(--ease), background var(--t-mid) var(--ease); }
.ob-dots i.on { width: 24px; border-radius: 6px; background: var(--pine); }
.ob-actions { justify-content: center; }
.ob-actions .button { min-width: 7.5rem; }
.ob-link { margin-top: 0.7rem; min-height: 44px; border: 0; background: transparent; color: var(--pine); font-weight: 750; text-decoration: underline; cursor: pointer; }

@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes glow { from { box-shadow: 0 0 0 4px color-mix(in srgb, var(--pine) 45%, transparent); } to { box-shadow: var(--shadow); } }
@keyframes bump { 30% { transform: scale(1.18) rotate(-3deg); } 60% { transform: scale(0.96); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes mascot-bob { 50% { transform: translateY(-4px); } }

section[id^="view-"]:not([hidden]) { animation: pop-in var(--t-mid) var(--ease); }

/* wide screens: two-column Today, floating dock */
@media (min-width: 700px) {
  .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  body { padding-bottom: 6.5rem; }
  .today-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
  .today-side { position: sticky; top: 1rem; }
  .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .tabbar { left: 50%; right: auto; bottom: 1rem; width: min(560px, calc(100% - 2rem)); transform: translateX(-50%); border: 1.5px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lift); }
  .fab { right: max(1.5rem, calc((100vw - var(--max)) / 2)); bottom: 6rem; }
  .toast { bottom: 6.5rem; }
  #view-calendar, #view-habits, #view-notes, #view-more, #view-shop, #view-badges, #view-list, #view-focus, #view-ritual, #view-report, #view-season, #view-challenge, #view-upcoming, #view-search, #view-abstain { max-width: 820px; margin-inline: auto; }
}
@media (min-width: 1400px) { .parts { grid-template-columns: repeat(4, minmax(0, 1fr)); } .today-grid { grid-template-columns: 400px minmax(0, 1fr); } }
@media (max-width: 700px) { .week-grid { grid-template-columns: 1fr; } .week-board { font-size: 0.8rem; } }

/* Grove, shop previews, badges */
.w-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4.5s ease-in-out infinite; }
.w-sway2 { animation-delay: -2s; }
.w-bird { animation: drift 6s ease-in-out infinite; }
.w-bob { animation: mascot-bob 3s ease-in-out infinite; }
.w-wave { transform-box: fill-box; transform-origin: 0 50%; animation: sway 2.4s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(1.8deg); } 0%, 100% { transform: rotate(-1.8deg); } }
@keyframes drift { 50% { transform: translate(8px, -4px); } }
.shop-card, .badge-card { display: grid; grid-template-columns: 72px 1fr; gap: 0.2rem 0.8rem; align-items: center; }
.shop-card > :not(.shop-preview), .badge-card > :not(.badge-medal) { grid-column: 2; }
.shop-card .button { justify-self: start; }
.shop-preview { grid-row: 1 / span 4; width: 72px; height: 72px; border-radius: 16px; overflow: hidden; background: var(--accent-soft); display: grid; place-items: center; }
.shop-preview svg { width: 100%; height: 100%; }
.shop-preview .swatch { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.6), var(--shadow); }
.shop-preview .mascot-svg { animation: none; width: 64px; height: 72px; }
.shop-preview .world-svg { max-height: none; }
.badge-medal { grid-row: 1 / span 3; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--line-soft); color: var(--muted); filter: grayscale(1); }
.badge-medal .ic { width: 28px; height: 28px; }
.badge-card.is-on .badge-medal { background: var(--sun); color: var(--sun-ink); filter: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--sun) 35%, transparent); }
.badge-card.is-on { background: var(--surface); }
@media (max-width: 700px) { .world-svg { max-height: 200px; } }
#thought { min-height: 3.4rem; }

/* focus ring */
.focus-ring { position: relative; width: min(260px, 70vw); aspect-ratio: 1; margin: 0.8rem auto; }
.focus-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--line-soft); stroke-width: 9; }
.ring-fg { fill: none; stroke: var(--pine); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset 900ms linear, stroke 300ms var(--ease); }
.focus-ring[data-state="rest"] .ring-fg { stroke: var(--coral); }
.focus-ring[data-state="idle"] .ring-fg { stroke-dashoffset: 0; stroke: var(--line); transition: none; }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-text p { margin: 0; }
.focus-mode { font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--fs-sm); }
.focus-ring[data-state="work"] .focus-mode { color: var(--pine); }
.focus-ring[data-state="rest"] .focus-mode, .focus-ring[data-state="rest"] .focus-clock { color: var(--coral); }
.focus-ring[data-state="work"] .focus-clock { animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.03); } }
#focus-sound { margin-right: 0.3rem; }
.mood-row { padding-left: 0.9rem; }
.mood-line { display: grid; grid-template-columns: 5rem 1fr 1.2rem; gap: 0.6rem; align-items: center; margin-top: 0.4rem; font-size: var(--fs-sm); }
.mood-line .level-fill.chart-mood { background: var(--coral); width: auto; display: block; }
.mood-line .level-fill.chart-energy { background: var(--pine); }

/* ---------- v8.6: reward animations ---------- */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.fx-coin { position: fixed; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff4c2, var(--sun) 55%, #d99a00); box-shadow: 0 0 8px rgba(255, 200, 61, 0.8); pointer-events: none; z-index: 61; will-change: transform, opacity; }
.coin-pill.fx-pill { animation: bump 520ms var(--ease), coin-glow 900ms ease-out; }
#mascot.fx-hop { animation: pip-hop 900ms var(--ease); }
#mascot.fx-calm, #world.fx-calm { animation: calm-glow 900ms ease-out; }
#world { position: relative; }
#world.fx-alive .world-svg { animation: grove-alive 1200ms ease-out; }
#world.fx-alive .w-sway, #world.fx-alive .w-wave { animation-duration: 1.1s; }
#world.fx-alive::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(circle, rgba(255, 236, 140, 0.95) 0 3px, transparent 4px) 18% 70% / 100% 100% no-repeat,
  radial-gradient(circle, rgba(255, 236, 140, 0.9) 0 2px, transparent 3px) 42% 60% / 100% 100% no-repeat,
  radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 3px, transparent 4px) 66% 72% / 100% 100% no-repeat,
  radial-gradient(circle, rgba(255, 236, 140, 0.9) 0 2px, transparent 3px) 84% 58% / 100% 100% no-repeat;
  animation: fireflies 1200ms ease-out forwards; }
@keyframes pip-hop { 0% { transform: none; } 25% { transform: translateY(-14px) rotate(-6deg) scale(1.06); } 50% { transform: translateY(0) scale(0.97, 1.03); } 70% { transform: translateY(-6px) rotate(4deg); } 100% { transform: none; } }
@keyframes grove-alive { 0% { filter: saturate(1) brightness(1); } 35% { filter: saturate(1.35) brightness(1.08); } 100% { filter: none; } }
@keyframes fireflies { 0% { opacity: 0; transform: translateY(10px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-36px); } }
@keyframes coin-glow { 0% { box-shadow: 0 0 0 0 rgba(255, 200, 61, 0.9); } 100% { box-shadow: 0 0 0 14px rgba(255, 200, 61, 0); } }
@keyframes calm-glow { 0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 50%, transparent); } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) {
  .fx-layer, .fx-coin { display: none; }
  #world.fx-alive::after { display: none; }
}

/* ---------- v8.6: Rest days chip ---------- */
.streak-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0 0 0.3rem; }
.streak-row #streak-line { margin: 0; }
.rest-chip { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 36px; padding: 0 0.7rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 750; font-size: var(--fs-sm); cursor: pointer; }
.rest-chip .ic { width: 18px; height: 18px; color: var(--pine); }
.rest-chip.is-empty { color: var(--muted); }
.rest-body { padding: 1.15rem; display: grid; gap: 0.6rem; }
.rest-body p { margin: 0; }
.rest-shields { display: flex; gap: 0.4rem; }
.rest-shields .ic { width: 34px; height: 34px; color: var(--pine); }
.rest-shields .ic.off { color: var(--line); }

/* ---------- v8.6: Save my day ---------- */
.rescue-btn { font-weight: 800; }
.rescue-list { display: grid; gap: 0.6rem; max-height: 52vh; overflow: auto; padding: 0.1rem; }
.rescue-item { border: 1.5px solid var(--line-soft); border-radius: var(--radius-sm); padding: 0.6rem 0.7rem; background: var(--surface-2); display: grid; gap: 0.4rem; }
.rescue-item h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.rescue-item .hint { margin: 0; font-size: var(--fs-sm); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.25rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 0.2rem; }
.seg button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; padding: 0 0.3rem; }
.seg button[aria-pressed="true"] { background: var(--pine); color: var(--on-pine); }
.rescue-sum { font-weight: 750; margin: 0; }
.dlg-body { padding: 1.15rem; display: grid; gap: 0.75rem; }
.dlg-body h2 { margin: 0; }
.dlg-body p { margin: 0; }
.celebrate-pip { display: grid; place-items: center; }
.celebrate-pip svg { width: 120px; height: 140px; animation: pip-hop 1100ms var(--ease) 2; }
.celebrate-body { text-align: center; }

/* ---------- v8.6: Brain dump ---------- */
.dump-area { min-height: 40vh; font-size: 1.05rem; line-height: 1.45; }
.voice-on { background: var(--coral) !important; color: #fff !important; border-color: var(--coral) !important; }
.sort-stage { position: relative; min-height: 190px; display: grid; place-items: center; touch-action: none; }
.sort-card { width: 100%; min-height: 160px; border-radius: var(--radius); background: var(--surface-2); border: 2px solid var(--line); padding: 1rem; display: grid; align-content: center; gap: 0.4rem; text-align: center; box-shadow: var(--shadow); transition: transform 220ms var(--ease), opacity 220ms var(--ease); user-select: none; }
.sort-card h3 { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.sort-card.go-right { transform: translateX(120%) rotate(12deg); opacity: 0; }
.sort-card.go-left { transform: translateX(-120%) rotate(-12deg); opacity: 0; }
.sort-card.go-up { transform: translateY(-120%); opacity: 0; }
.sort-card.go-down { transform: scale(0.6); opacity: 0; }
.sort-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.sort-actions .button { min-height: 48px; }
.sort-progress { margin: 0; text-align: center; font-weight: 750; color: var(--muted); }
.dump-btn .ic { width: 18px; height: 18px; }

/* ---------- v8.6: share cards + Sunday nudge ---------- */
#recap-preview canvas { width: 100%; height: auto; max-height: 62vh; object-fit: contain; border-radius: 12px; display: block; margin: 0 auto; box-shadow: var(--shadow); }
#recap-dialog .dlg-body .hint { font-size: var(--fs-sm); }
.grove-share { position: absolute; right: 0.5rem; top: 0.5rem; min-height: 36px; padding: 0 0.7rem; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.88); color: #12231b; font: inherit; font-weight: 750; font-size: 0.8rem; display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.grove-share .ic { width: 16px; height: 16px; }
.today-anytime { margin-bottom: 0.5rem; }

/* ---------- v8.7 Wave 1 ---------- */
/* В1-2: on phones and tablets the day comes first, decorations after it. */
.today-main { display: flex; flex-direction: column; }
.now-strip { order: 2; display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; align-items: baseline; margin: 0 0 0.6rem; padding: 0.55rem 0.9rem; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-soft-ink); font-size: var(--fs-sm); }
.now-strip .now-clock { font-variant-numeric: tabular-nums; }
.now-strip .now-next { min-width: 0; overflow-wrap: anywhere; }
#quick-add { order: 3; }
.moved-box { order: 4; margin: 0 0 0.75rem; padding: 0.8rem; border-radius: var(--radius); background: var(--warn-bg); color: var(--ink); border: 1.5px solid var(--line-soft); }
.moved-box h3 { margin: 0 0 0.2rem; }
.moved-box > .hint { margin: 0 0 0.5rem; color: var(--ink); }
.moved-card { margin: 0; background: var(--surface); }
.moved-card h3 { margin: 0; }
.moved-card .hint { margin: 0.1rem 0 0; }
.day-block { order: 5; margin-bottom: 0.75rem; }
.day-title { margin: 0.2rem 0 0.5rem; font-size: 1.15rem; }
.inbox-title { margin: 0.8rem 0 0.4rem; }
.day-empty { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); }
.day-empty p { margin: 0; color: var(--ink); font-weight: 650; }
.day-empty .ic { flex: 0 0 auto; width: 22px; height: 22px; color: var(--pine); }
.today-actions { order: 6; margin-bottom: 0.75rem; }
.day-tools { order: 10; }
.hours-block { order: 11; }
.date-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin-bottom: 0.75rem; }
.date-row label { flex: 1 0 100%; }
.date-live { font-weight: 750; color: var(--ink); }
#note-day-live, #edit-date-live { display: block; margin-top: 0.2rem; font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 1023px) {
  .today-grid { display: flex; flex-direction: column; }
  .today-side, .today-main { display: contents; }
  .today-side > * { margin-bottom: 0; }
  #companion { order: 1; margin-bottom: 0.6rem; }
  #week-nudge, #backup-banner, #ask-banner { order: 7; margin-bottom: 0.75rem; }
  #world { order: 8; margin-bottom: 0.75rem; }
  #glossary { order: 9; margin-bottom: 0.75rem; }
  .companion { grid-template-columns: 64px 1fr; padding: 0.55rem 0.8rem; }
  .companion .mascot-svg { width: 64px; height: 74px; }
  #mascot-name { font-size: var(--fs-sm); }
  #mascot-line { font-size: 1rem; margin-bottom: 0.15rem; }
  #level-bar p { margin: 0.2rem 0 0.15rem; }
  .level-track { height: 8px; }
  #energy-hint:empty { display: none; }
  .world-svg { height: 120px; max-height: 120px; }
  .parts .pro-part.is-empty { display: none; }
  #quick-add { gap: 0.45rem; padding: 0.65rem; }
  #quick-add .button { min-height: 44px; padding-inline: 0.7rem; }
}
/* В1-3: a message never catches a tap and never sits on Add, Start, the + button or the tab bar. */
.toast { top: calc(env(safe-area-inset-top) + 0.5rem); bottom: auto; pointer-events: none; display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.5rem 0.5rem 1rem; border-radius: 18px; animation-name: toast-down; }
.toast[hidden] { display: none; }
.toast-close { pointer-events: auto; flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--bg) 18%, transparent); color: inherit; display: grid; place-items: center; cursor: pointer; }
.toast-close .ic { width: 16px; height: 16px; }
@keyframes toast-down { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (min-width: 1024px) { .toast { bottom: auto; } }
/* В1-8: habit month with weekday names; neutral days before the habit; a soft dot for a missed day. */
.habit-month-wrap { margin-top: 0.6rem; }
.habit-month.weekday-head { margin-bottom: 0.25rem; }
.habit-month.weekday-head span { text-align: center; font-size: 0.75rem; font-weight: 750; color: var(--muted); }
.habit-cell.pad { border: 0; background: transparent; }
.habit-cell.before, .habit-cell.future { color: var(--muted); border-style: dashed; background: transparent; }
.habit-cell.missed { background: transparent; position: relative; }
.habit-cell.missed::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--muted); opacity: 0.6; }
/* В1-11: the hour grid scrolls inside itself, the calendar header stays on screen. */
#cal.cal-scroll { max-height: calc(100vh - 17rem); max-height: calc(100dvh - 17rem); min-height: 260px; overflow-y: auto; overscroll-behavior: contain; border-radius: var(--radius); }
/* ---------- v8.7 Wave 2 / 3 ---------- */
/* В2-9: week review as a calm card */
.report-card { display: grid; gap: 0.8rem; }
.report-range { margin: 0; font-weight: 800; color: var(--pine); }
.report-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.report-tile { padding: 0.6rem 0.7rem; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-soft-ink); display: grid; }
.report-tile strong { font-size: 1.4rem; line-height: 1.1; }
.report-tile span { font-size: var(--fs-sm); }
.report-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; align-items: end; height: 120px; }
.report-bar { display: grid; grid-template-rows: 1fr auto; height: 100%; text-align: center; gap: 0.2rem; }
.report-bar .report-fill { align-self: end; display: block; border-radius: 8px 8px 4px 4px; background: color-mix(in srgb, var(--pine) 55%, var(--surface)); }
.report-bar.is-best .report-fill { background: var(--pine); }
.report-bar.is-rest .report-fill { background: var(--line); }
.report-bar small { font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.report-lines { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.25rem; }
.hodi-note { padding: 0.7rem 0.9rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1.5px solid var(--line-soft); }
.hodi-note p { margin: 0.25rem 0 0; }
@media (min-width: 700px) { .report-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* В2-9: short add forms, the list stays visible */
.form-more { flex: 1 0 100%; }
.form-more summary { min-height: 40px; display: flex; align-items: center; font-weight: 700; color: var(--muted); cursor: pointer; }
.form-more > * + * { margin-top: 0.4rem; }
.form-more label { display: block; }
.note-form { display: grid; gap: 0.5rem; }
.note-form .button { justify-self: start; }
#view-habits .quick-card #habit-title { flex: 1 1 12rem; }
#view-habits .quick-card #add-habit { flex: 0 0 auto; }
/* В2-9: the + button never hides the last tiles */
body:not([data-view="today"]):not([data-view="focus"]) main { padding-bottom: 5.5rem; }
/* В3-6: phone down */
.phone-down { position: fixed; inset: 0; z-index: 70; display: grid; place-content: center; gap: 1rem; text-align: center; padding: 2rem; background: #0b1511; color: #e8f3ec; }
.phone-down[hidden] { display: none; }
.pd-title { margin: 0; font-weight: 800; font-size: 1.15rem; }
.pd-clock { margin: 0; font-size: clamp(3.5rem, 18vw, 7rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.pd-hint { margin: 0; color: #b9cfc2; max-width: 22rem; }
.phone-down .button.secondary { justify-self: center; color: #e8f3ec; border-color: #5f7d6c; background: transparent; }
body.is-phone-down { overflow: hidden; }
.focus-ambient { margin: 0.6rem 0; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
#phone-down { margin-bottom: 0.8rem; }
#edit-stuck { justify-self: start; }

/* ---------- v8.8 ---------- */
/* Э0-2: one line per task. Round check on the left (1 tap), the rest of the row opens the editor. */
.pro-card.task-row { display: flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0.5rem 0.3rem 1.55rem; margin-top: 0.35rem; min-height: 48px; border-radius: 14px; background: var(--surface); }
.task-row .drag-handle { top: 50%; left: 0.2rem; transform: translateY(-50%); }
.task-row .drag-handle .ic { width: 16px; height: 16px; }
.check-btn { flex: 0 0 auto; width: 34px; height: 34px; margin: 5px 0; border-radius: 50%; border: 2.5px solid var(--pine); background: transparent; color: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; position: relative; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.check-btn::after { content: ""; position: absolute; inset: -6px; }
.check-btn .ic { width: 18px; height: 18px; }
.check-btn:active { transform: scale(0.9); }
.check-btn[aria-pressed="true"] { background: var(--pine); color: var(--on-pine); }
@media (hover: hover) { .check-btn:hover { background: var(--accent-soft); color: var(--pine); } .check-btn[aria-pressed="true"]:hover { background: var(--pine); color: var(--on-pine); } }
.task-open { flex: 1 1 auto; min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 0.55rem; padding: 0.2rem 0.1rem; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.task-open .task-title { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 1rem; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.task-time { flex: 0 0 auto; font-weight: 800; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; color: var(--accent-soft-ink); background: var(--accent-soft); padding: 0.1rem 0.45rem; border-radius: 8px; }
.task-meta { flex: 0 0 auto; font-size: var(--fs-sm); color: var(--muted); }
.pro-card.task-row.is-done .task-title { text-decoration: line-through; color: var(--muted); }
.task-row.just-done .check-btn { animation: check-pop 420ms var(--ease); }
@keyframes check-pop { 50% { transform: scale(1.25); } }
.pro-part { padding: 0.45rem 0.55rem 0.55rem; border-radius: 16px; }
.pro-part h3 { margin: 0.1rem 0.2rem 0; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.parts { gap: 0.5rem; }
.hour-body .task-row { min-height: 44px !important; }
/* Э1-4: the first-minute hint and the day-1 card */
.coach { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0 0; padding: 0.5rem 0.8rem; border-radius: 14px; background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 700; font-size: var(--fs-sm); animation: pop-in var(--t-mid) var(--ease); }
.coach .ic { flex: 0 0 auto; width: 20px; height: 20px; }
.coach[hidden], .back-box[hidden], .day1-card[hidden], .streak-row[hidden] { display: none; }
.day1-card { order: 5; display: grid; grid-template-columns: 64px 1fr; gap: 0.7rem; align-items: center; margin: 0 0 0.75rem; padding: 0.7rem 0.9rem; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--line-soft); box-shadow: var(--shadow); }
.day1-card h3 { margin: 0; }
.day1-card p { margin: 0.1rem 0 0.4rem; }
.day1-art .mascot-svg { width: 64px; height: 74px; }
/* Э1-6: welcome back */
.back-box { order: 2; margin: 0 0 0.6rem; padding: 0.75rem 0.9rem; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-soft-ink); }
.back-box h3 { margin: 0; color: inherit; }
.back-box p { margin: 0.15rem 0 0.5rem; color: var(--ink); }
#survey-banner { order: 7; margin-bottom: 0.75rem; }
/* Э1-1: new things in the garden grow in, one after another; tap skips; calm without motion */
.world-card { position: relative; }
.world-card.is-growing .w-new { transform-box: fill-box; transform-origin: 50% 100%; animation: w-grow 700ms var(--ease) both; }
@keyframes w-grow { from { transform: scale(0); opacity: 0; } 70% { transform: scale(1.25); opacity: 1; } to { transform: scale(1); } }
.w-flap { transform-box: fill-box; transform-origin: 50% 50%; animation: w-flap 900ms ease-in-out infinite alternate; }
@keyframes w-flap { to { transform: scaleX(0.5); } }
.w-rain path { animation: w-rain 1.4s linear infinite; }
@keyframes w-rain { from { transform: translateY(-20px); opacity: 0; } 30% { opacity: 0.7; } to { transform: translateY(40px); opacity: 0; } }
.w-star { animation: w-twinkle 2.4s ease-in-out infinite alternate; }
@keyframes w-twinkle { to { opacity: 0.3; } }
.hodi-wave { transform-box: fill-box; transform-origin: 0% 100%; animation: hodi-wave 900ms ease-in-out 3 alternate; }
@keyframes hodi-wave { to { transform: rotate(-18deg); } }
@media (prefers-reduced-motion: reduce) {
  .world-card.is-growing .w-new, .w-flap, .w-rain path, .w-star, .hodi-wave, .task-row.just-done .check-btn { animation: none !important; }
}
.garden-track .level-fill { background: linear-gradient(90deg, #46c58a, var(--pine)); }
/* toast action (Undo) */
.toast-action { pointer-events: auto; flex: 0 0 auto; min-height: 36px; padding: 0 0.8rem; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--bg) 22%, transparent); color: inherit; font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.toast-action[hidden] { display: none; }
/* Э0-3: Sparks only in the Shop */
.coin-pill { display: none; }
body[data-view="shop"] .coin-pill { display: inline-flex; }
/* Э1-7: a new profile sees five blocks on Today: Hodi, now/next, add, the day, the garden */
body.is-new .today-actions #dump-open, body.is-new .today-actions [data-view="ritual"], body.is-new .day-tools, body.is-new .hours-block, body.is-new #energy-hint { display: none; }
/* small things */
.danger-quiet { margin-top: 1rem; background: transparent; color: var(--danger); border: 1.5px solid color-mix(in srgb, var(--danger) 60%, transparent); }
.tech-pre { white-space: pre-wrap; word-break: break-word; font-size: 0.78rem; max-height: 12rem; overflow: auto; background: var(--surface-2); padding: 0.6rem; border-radius: 10px; }
.sv-choice { border: 0; padding: 0; margin: 0.6rem 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.sv-choice legend { font-weight: 700; margin-bottom: 0.3rem; }
.sv-choice label { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; }
#recap-formats { margin-bottom: 0.6rem; }
#recap-formats .seg[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-soft-ink); }
/* Э0-4, Э2-9: from 840 px a side navigation rail; nothing hides under it; the + button sits in the rail */
@media (min-width: 840px) {
  body { padding-bottom: 2rem; padding-left: 96px; }
  .tabbar { top: 0; bottom: 0; left: 0; right: auto; width: 88px; height: 100vh; transform: none; display: flex; flex-direction: column; justify-content: flex-start; gap: 0.4rem; padding: 5.5rem 0.5rem 1rem; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  .tabbar button { min-height: 64px; font-size: 0.74rem; }
  .fab { left: 16px; right: auto; top: 1rem; bottom: auto; }
  .site-header .bar { padding-left: 0; }
  .toast { left: calc(50% + 48px); }
}
@media (min-width: 840px) and (max-width: 1023px) {
  .today-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
  .today-side, .today-main { display: block !important; }
  .today-side > * { margin-bottom: 0.8rem !important; }
}
/* Э2-9 at 600–839 px: still the bottom bar, but parts sit two by two */
@media (min-width: 600px) and (max-width: 839px) { .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.check-btn.done-btn, .pro-card .check-btn.done-btn { background: transparent; }
.pro-card .check-btn.done-btn[aria-pressed="true"] { background: var(--pine); }
.pro-part h3.task-title { text-transform: none; letter-spacing: 0; font-size: 1rem; margin: 0; }
.toast { width: max-content; }
/* Э0-2: a compact quick-add row: field, voice, Add, details */
#quick-add { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 0.4rem; }
#quick-add .qa-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#quick-add #quick-title { grid-column: 1; min-width: 0; }
#quick-add .qa-icon { width: 46px; min-width: 46px; padding: 0; }
#quick-add .qa-icon .qa-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#quick-add #quick-preview { grid-column: 1 / -1; margin: 0; }
@media (min-width: 1024px) { #quick-add .qa-icon { width: auto; padding: 0 0.9rem; } #quick-add .qa-icon .qa-text { position: static; width: auto; height: auto; clip: auto; } }
@media (max-width: 1023px) {
  .companion { padding: 0.45rem 0.75rem; }
  .companion .mascot-svg { width: 54px; height: 62px; }
  #mascot-name { font-size: 0.72rem; line-height: 1; }
  #companion { margin-bottom: 0.5rem; }
  .now-strip { margin-bottom: 0.5rem; padding: 0.45rem 0.8rem; }
  #quick-add { padding: 0.5rem; margin-bottom: 0.5rem; }
  .day-title { margin: 0.1rem 0 0.35rem; }
}

/* v8.8 — edge-to-edge (Android 15+ app, notched phones): keep content out of system bars */
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
@media (min-width: 840px) { body { padding-left: calc(96px + env(safe-area-inset-left)); } }
/* v8.8 Э0-2: one more row on a 390×844 phone (touch target stays ≥46px via .check-btn::after) */
.pro-card.task-row { padding-top: 0.12rem; padding-bottom: 0.12rem; margin-top: 0.28rem; min-height: 46px; }
.task-row .check-btn { margin: 2px 0; }
.pro-part { padding: 0.35rem 0.5rem 0.45rem; }
.parts { gap: 0.4rem; }

/* v9.0: settings that exist only in the Android app, or only on the web */
html:not(.is-native) .native-only { display: none !important; }
html.is-native .web-only { display: none !important; }
.setting-row .switch { width: 44px; height: 26px; accent-color: var(--pine); }
