:root {
  --bg: #f4f7f3;
  --bg-elevated: #edf2ee;
  --surface: rgba(255, 255, 252, .88);
  --surface-solid: #fffefa;
  --surface-strong: #edf2ed;
  --surface-hover: #e7eee8;
  --text: #152019;
  --text-soft: #39463e;
  --muted: #606d65;
  --muted-strong: #46534b;
  --line: rgba(21, 32, 25, .10);
  --line-strong: rgba(21, 32, 25, .19);
  --accent: #176b52;
  --accent-strong: #0d5a42;
  --accent-soft: #dcefe7;
  --accent-faint: rgba(23, 107, 82, .09);
  --on-accent: #f8fffB;
  --positive: #176b52;
  --negative: #a93f3a;
  --danger: #a93f3a;
  --warning: #8c6417;
  --shadow-xs: 0 1px 2px rgba(21, 32, 25, .04), 0 6px 16px rgba(21, 32, 25, .035);
  --shadow-sm: 0 10px 30px rgba(21, 32, 25, .065);
  --shadow: 0 26px 72px rgba(21, 32, 25, .12);
  --radius-2xl: 34px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  --bg: #0b100d;
  --bg-elevated: #101612;
  --surface: rgba(21, 28, 23, .90);
  --surface-solid: #151c17;
  --surface-strong: #1d2720;
  --surface-hover: #243027;
  --text: #f1f7f2;
  --text-soft: #d5ded7;
  --muted: #a7b2aa;
  --muted-strong: #c2ccc5;
  --line: rgba(241, 247, 242, .10);
  --line-strong: rgba(241, 247, 242, .20);
  --accent: #77ddb5;
  --accent-strong: #9be8c8;
  --accent-soft: #173c2e;
  --accent-faint: rgba(119, 221, 181, .10);
  --on-accent: #082319;
  --positive: #77ddb5;
  --negative: #ff9d97;
  --danger: #ff9d97;
  --warning: #f2c66d;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .20), 0 8px 20px rgba(0, 0, 0, .12);
  --shadow-sm: 0 12px 34px rgba(0, 0, 0, .25);
  --shadow: 0 28px 80px rgba(0, 0, 0, .42);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #0b100d;
    --bg-elevated: #101612;
    --surface: rgba(21, 28, 23, .90);
    --surface-solid: #151c17;
    --surface-strong: #1d2720;
    --surface-hover: #243027;
    --text: #f1f7f2;
    --text-soft: #d5ded7;
    --muted: #a7b2aa;
    --muted-strong: #c2ccc5;
    --line: rgba(241, 247, 242, .10);
    --line-strong: rgba(241, 247, 242, .20);
    --accent: #77ddb5;
    --accent-strong: #9be8c8;
    --accent-soft: #173c2e;
    --accent-faint: rgba(119, 221, 181, .10);
    --on-accent: #082319;
    --positive: #77ddb5;
    --negative: #ff9d97;
    --danger: #ff9d97;
    --warning: #f2c66d;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .20), 0 8px 20px rgba(0, 0, 0, .12);
    --shadow-sm: 0 12px 34px rgba(0, 0, 0, .25);
    --shadow: 0 28px 80px rgba(0, 0, 0, .42);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% -12%, var(--accent-faint), transparent 31rem),
    radial-gradient(circle at 100% 18%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 25rem),
    var(--bg);
  color: var(--text);
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}
body.reordering { overflow: hidden; user-select: none; cursor: grabbing; }
h1, h2, h3, .balance { text-wrap: balance; }
p, small, label, li, .muted { text-wrap: pretty; }
button, input, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 3px; }
button:disabled { opacity: .43; cursor: not-allowed; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: .83rem; line-height: 1.52; }
.microcopy { margin: 18px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.error-text { min-height: 1.25rem; color: var(--danger); font-size: .84rem; }
.inline-icon { width: 18px; height: 18px; }
.button-icon { width: 19px; height: 19px; flex: 0 0 auto; }

/* Auth */
.auth-screen { min-height: 100dvh; display: grid; place-items: center; padding: max(24px, var(--safe-top)) 24px max(24px, var(--safe-bottom)); }
.auth-card { width: min(100%, 430px); padding: 38px; border: 1px solid var(--line); border-radius: var(--radius-2xl); background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(28px) saturate(1.08); }
.brand-mark { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 34px; border-radius: 19px; background: var(--accent); color: var(--on-accent); font-size: 1.15rem; font-weight: 930; box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 24%, transparent); }
.auth-card h1 { margin: 0 0 12px; font-size: clamp(2rem, 8vw, 3.3rem); line-height: .96; letter-spacing: -.06em; }
.auth-form { display: grid; gap: 12px; margin-top: 29px; }
#biometric-unlock { margin-top: 12px; }

/* Fields and buttons */
.pin-input, .text-input, .max-input, .choice-control {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 9%, transparent), var(--shadow-xs);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .15s ease;
}
.pin-input, .text-input, .max-input { padding: 0 16px; }
.pin-input:hover, .text-input:hover, .max-input:hover, .choice-control:hover { border-color: var(--line-strong); background: color-mix(in srgb, var(--surface-solid) 88%, var(--surface-hover)); }
.pin-input:focus, .text-input:focus, .max-input:focus { border-color: color-mix(in srgb, var(--accent) 62%, var(--line)); box-shadow: 0 0 0 4px var(--accent-faint), var(--shadow-xs); }
.pin-input { text-align: center; letter-spacing: .14em; font-size: 1.05rem; }
.textarea-input { min-height: 88px; padding-block: 14px; resize: vertical; line-height: 1.48; }
.large-number-input { min-height: 74px; font-size: 1.75rem; font-weight: 880; letter-spacing: -.035em; text-align: center; font-variant-numeric: tabular-nums; }
input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="number"]::-webkit-inner-spin-button { opacity: .38; }
.field-label { display: flex; align-items: baseline; gap: 5px; margin: 18px 0 8px; color: var(--muted-strong); font-size: .77rem; font-weight: 820; }
.control-field { display: grid; gap: 7px; }
.control-field > span { color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.choice-control { display: grid; grid-template-columns: minmax(0,1fr) 24px; align-items: center; gap: 10px; padding: 0 14px 0 16px; text-align: left; cursor: pointer; }
.choice-control:active { transform: scale(.985); }
.choice-value { min-width: 0; overflow: hidden; color: var(--text); font-weight: 790; text-overflow: ellipsis; white-space: nowrap; }
.choice-value.time-value { font-size: 1.02rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.control-icon { width: 20px; height: 20px; color: var(--muted-strong); transition: transform .18s ease; }
.choice-control[aria-expanded="true"] .control-icon { transform: rotate(180deg); color: var(--accent-strong); }

.primary-button, .secondary-button, .compact-button, .danger-button, .file-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-weight: 830;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.primary-button { background: var(--accent); color: var(--on-accent); box-shadow: 0 11px 26px color-mix(in srgb, var(--accent) 22%, transparent); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 27%, transparent); }
.secondary-button { border-color: var(--line); background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-xs); }
.secondary-button:hover, .compact-button:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.compact-button { min-height: 41px; padding: 0 14px; border-color: var(--line); background: var(--surface-solid); color: var(--text-soft); font-size: .79rem; box-shadow: var(--shadow-xs); }
.danger-button { min-height: 45px; border-color: color-mix(in srgb, var(--danger) 34%, transparent); background: color-mix(in srgb, var(--danger) 5%, transparent); color: var(--danger); }
.primary-button:active, .secondary-button:active, .compact-button:active, .danger-button:active { transform: scale(.97); }
.primary-button.compact { min-height: 44px; padding-inline: 15px; }
.full-width { width: 100%; }
.button-row { display: flex; gap: 10px; margin-top: 14px; }
.button-row > * { flex: 1; }
.button-row.wrap { flex-wrap: wrap; }
.file-button { display: grid; place-items: center; border-color: var(--line); background: var(--surface-solid); }
.file-button input { display: none; }

/* App shell */
.app-shell { width: min(100%, 820px); min-height: 100dvh; margin: 0 auto; padding: 0 18px calc(116px + var(--safe-bottom)); }
.topbar { position: sticky; z-index: 30; top: 0; min-height: calc(94px + var(--safe-top)); display: flex; align-items: center; justify-content: space-between; padding-top: var(--safe-top); background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(24px) saturate(1.2); }
.topbar-copy { min-width: 0; }
.topbar h1 { margin: 0; font-size: 1.84rem; letter-spacing: -.048em; }
.topbar-actions { display: flex; gap: 8px; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text-soft); box-shadow: var(--shadow-xs); cursor: pointer; transition: transform .15s ease, border-color .18s ease, background .18s ease, color .18s ease; }
.icon-button.soft { width: 40px; height: 40px; background: var(--surface-strong); box-shadow: none; }
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-solid); color: var(--text); }
.icon-button:active { transform: scale(.93); }
.icon-button svg { width: 20px; height: 20px; }
main { display: block; }
.view { display: none; animation: rise .25s ease; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

/* Shared cards */
.metric-card, .panel, .routine-group, .builder-moment, .stat-card, .progress-hero {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px) saturate(1.05);
}
.panel { margin-top: 13px; padding: 22px; border-radius: var(--radius-xl); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel h2, .section-intro h2, .settings-panel h2 { margin: 0; color: var(--text); font-size: 1.23rem; letter-spacing: -.035em; }
.panel-support { margin: -9px 0 15px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.metric-pill { min-width: 52px; padding: 7px 10px; border-radius: 999px; background: var(--surface-strong); color: var(--muted-strong); font-size: .75rem; font-weight: 850; text-align: center; font-variant-numeric: tabular-nums; }

/* Today */
.hero-card { min-height: 180px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 10px 0 14px; padding: 30px; overflow: hidden; border-radius: var(--radius-2xl); color: #f8fffb; background: radial-gradient(circle at 82% 10%, rgba(255,255,255,.18), transparent 14rem), linear-gradient(145deg, #176e54, #173b30); box-shadow: 0 24px 58px rgba(13, 82, 59, .24); }
.hero-card .eyebrow { color: rgba(248,255,251,.72); }
.hero-number { display: block; font-size: clamp(3.2rem, 16vw, 5.8rem); line-height: .91; letter-spacing: -.08em; font-variant-numeric: tabular-nums; }
.hero-caption { max-width: 32ch; margin: 10px 0 0; color: rgba(248,255,251,.76); font-size: .8rem; line-height: 1.45; }
.progress-ring, .period-ring { --value: 0; aspect-ratio: 1; display: grid; place-items: center; position: relative; isolation: isolate; border-radius: 50%; background: conic-gradient(currentColor calc(var(--value) * 1%), color-mix(in srgb, currentColor 18%, transparent) 0); }
.progress-ring { width: 98px; flex: 0 0 auto; color: #f7fffb; }
.progress-ring::after, .period-ring::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; }
.progress-ring::after { width: 75px; aspect-ratio: 1; background: #225145; }
.progress-ring span { font-size: .87rem; font-weight: 900; }
.metric-card { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-radius: var(--radius-lg); }
.metric-copy { min-width: 0; display: flex; align-items: center; gap: 14px; }
.metric-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; background: var(--accent-soft); color: var(--accent-strong); }
.metric-icon svg { width: 22px; height: 22px; }
.metric-value { display: block; font-size: 2rem; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.metric-copy .small { margin: 5px 0 0; }
.metric-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.routine-sections { display: grid; gap: 14px; margin: 14px 0; }
.routine-group { overflow: hidden; border-radius: var(--radius-lg); }
.routine-heading { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 17px 12px; }
.routine-heading-copy { display: flex; align-items: center; gap: 11px; }
.moment-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: var(--accent-faint); color: var(--accent-strong); }
.moment-icon svg { width: 18px; height: 18px; }
.routine-heading h2 { margin: 0; font-size: 1.01rem; letter-spacing: -.02em; }
.routine-heading > span { min-width: 45px; padding: 6px 9px; border-radius: 999px; background: var(--surface-strong); color: var(--muted-strong); font-size: .71rem; font-weight: 850; text-align: center; }
.routine-item { border-top: 1px solid var(--line); transition: background .18s ease; }
.routine-item:hover { background: color-mix(in srgb, var(--accent) 3%, transparent); }
.check-row, .timestamp-row { width: 100%; min-height: 76px; display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px 17px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.checkmark { width: 35px; height: 35px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 50%; color: transparent; font-size: .88rem; font-weight: 900; transition: .2s cubic-bezier(.2,.8,.2,1); }
.timestamp-row .checkmark { color: var(--muted); }
.routine-item.done .checkmark { transform: scale(1.02); border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 25%, transparent); }
.item-main { min-width: 0; }
.item-main strong { display: block; font-size: .96rem; letter-spacing: -.012em; }
.item-main small { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.item-time { color: var(--muted-strong); font-size: .74rem; font-weight: 760; font-variant-numeric: tabular-nums; }
.routine-item.done .item-main strong { color: var(--muted); }
.exercise-row { padding: 17px; }
.exercise-header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.exercise-header strong, .exercise-header small { display: block; }
.exercise-header small { margin-top: 4px; color: var(--muted); font-size: .77rem; }
.exercise-header > small { min-width: 45px; margin: 0; padding: 6px 9px; border-radius: 999px; background: var(--surface-strong); color: var(--muted-strong); text-align: center; }
.set-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(49px, 1fr)); gap: 8px; }
.set-chip { min-height: 49px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); color: var(--text-soft); font-weight: 880; cursor: pointer; transition: transform .15s ease, background .18s ease, color .18s ease, border-color .18s ease; }
.set-chip:active { transform: scale(.94); }
.set-chip.done { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.max-sets { display: grid; gap: 8px; }
.max-set-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 46px; align-items: center; gap: 8px; }
.max-index { color: var(--muted); font-size: .74rem; font-weight: 850; text-align: center; }
.max-input { min-height: 49px; }
.max-validate { width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); color: var(--muted-strong); cursor: pointer; }
.max-set-row.done .max-validate { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

/* Progress */
.progress-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 12px; }
.compact-field { padding: 12px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: var(--shadow-xs); }
.compact-field .choice-control { min-height: 45px; border: 0; padding: 0 2px; background: transparent; box-shadow: none; }
.compact-field .choice-control:hover { background: transparent; }
.progress-hero { min-height: 190px; display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 28px; overflow: hidden; border-radius: var(--radius-2xl); background: radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 15rem), color-mix(in srgb, var(--surface) 88%, var(--accent-faint)); }
.progress-score { display: block; font-size: clamp(3.6rem, 16vw, 6.2rem); line-height: .89; letter-spacing: -.085em; font-variant-numeric: tabular-nums; }
.trend-line { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
.trend-badge { padding: 6px 9px; border-radius: 999px; font-size: .72rem; font-weight: 880; font-variant-numeric: tabular-nums; }
.trend-badge.positive { background: var(--accent-soft); color: var(--accent-strong); }
.trend-badge.negative { background: color-mix(in srgb, var(--negative) 12%, transparent); color: var(--negative); }
.trend-badge.neutral { background: var(--surface-strong); color: var(--muted-strong); }
.progress-caption { color: var(--muted); font-size: .77rem; }
.progress-hero-visual { display: grid; place-items: center; gap: 10px; flex: 0 0 auto; }
.progress-hero-visual small { max-width: 14ch; color: var(--muted); font-size: .7rem; font-weight: 740; text-align: center; }
.period-ring { width: 112px; color: var(--accent); }
.period-ring::after { width: 85px; aspect-ratio: 1; background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line); }
.period-ring span { color: var(--text); font-size: 1.05rem; font-weight: 900; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.stat-card { min-height: 151px; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; border-radius: var(--radius-lg); }
.stat-icon { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: auto; border-radius: 12px; background: var(--accent-faint); color: var(--accent-strong); }
.stat-icon svg { width: 18px; height: 18px; }
.stat-card .eyebrow { margin-bottom: 7px; }
.stat-card strong { font-size: 1.54rem; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.stat-card small { display: block; margin-top: 7px; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.chart-panel { padding-bottom: 16px; }
.trend-chart { min-height: 248px; color: var(--accent); overflow: hidden; }
.trend-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 7; }
.chart-grid text { fill: var(--muted); stroke: none; font-size: 11px; font-weight: 730; }
.chart-area { fill: url(#progressArea); stroke: none; }
.chart-average { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 6 7; opacity: .65; }
.chart-line { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { color: var(--accent-strong); cursor: pointer; outline: none; }
.chart-hit { fill: transparent; stroke: none; }
.chart-dot { fill: var(--surface-solid); stroke: currentColor; stroke-width: 4; transition: r .15s ease, fill .15s ease, stroke-width .15s ease; }
.chart-point:hover .chart-dot, .chart-point:focus-visible .chart-dot, .chart-point.selected .chart-dot { r: 7; fill: var(--accent-soft); stroke-width: 3; }
.chart-label { fill: var(--muted); stroke: none; font-size: 12px; font-weight: 760; }
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.analytics-panel { min-width: 0; }
.bar-summary { display: grid; gap: 15px; }
.bar-row { display: grid; grid-template-columns: minmax(72px, .72fr) minmax(100px, 1.3fr) 44px; align-items: center; gap: 10px; }
.bar-label { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: .78rem; font-weight: 780; }
.bar-label .moment-icon { width: 28px; height: 28px; border-radius: 9px; }
.bar-track { height: 9px; overflow: hidden; border-radius: 999px; background: var(--surface-strong); }
.bar-fill { width: calc(var(--value) * 1%); height: 100%; border-radius: inherit; background: var(--accent); }
.bar-value { color: var(--muted-strong); font-size: .73rem; font-weight: 850; text-align: right; font-variant-numeric: tabular-nums; }
.weekday-chart { min-height: 166px; display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 7px; padding-top: 8px; }
.weekday-column { min-width: 0; display: grid; grid-template-rows: 1fr auto auto; align-items: end; gap: 7px; height: 166px; }
.weekday-bar-track { width: 100%; height: 116px; display: flex; align-items: end; overflow: hidden; border-radius: 10px; background: var(--surface-strong); }
.weekday-bar-fill { width: 100%; min-height: 4px; height: calc(var(--value) * 1%); border-radius: 10px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--accent-strong))); }
.weekday-column b { color: var(--muted-strong); font-size: .62rem; text-align: center; font-variant-numeric: tabular-nums; }
.weekday-column span { color: var(--muted); font-size: .65rem; font-weight: 850; text-align: center; }
.consistency-panel { overflow: hidden; }
.heatmap { --heat-weeks: 5; display: grid; grid-template-columns: 25px repeat(var(--heat-weeks), minmax(22px,1fr)); grid-auto-rows: minmax(22px, 1fr); gap: 6px; min-width: 0; }
.heat-day-label { display: grid; place-items: center start; color: var(--muted); font-size: .59rem; font-weight: 800; }
.heat-week-label { display: grid; place-items: end center; min-height: 18px; color: var(--muted); font-size: .56rem; font-weight: 750; }
.heat-cell, .heat-empty { aspect-ratio: 1; min-width: 0; border-radius: 7px; }
.heat-empty { background: transparent; }
.heat-cell { display: grid; place-items: center; padding: 0; border: 0; background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--muted-strong); cursor: pointer; position: relative; font-size: .57rem; font-weight: 830; transition: transform .15s ease, box-shadow .15s ease, background .18s ease; }
.heat-cell span { opacity: .62; }
.heat-cell[data-level="1"] { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent-strong); }
.heat-cell[data-level="2"] { background: color-mix(in srgb, var(--accent) 42%, transparent); color: var(--accent-strong); }
.heat-cell[data-level="3"] { background: color-mix(in srgb, var(--accent) 70%, transparent); color: var(--on-accent); }
.heat-cell[data-level="4"] { background: var(--accent); color: var(--on-accent); }
.heat-cell:hover { transform: translateY(-2px); }
.heat-cell.selected { z-index: 1; box-shadow: 0 0 0 3px var(--surface-solid), 0 0 0 5px var(--text); }
.heat-legend { display: flex; gap: 4px; }
.heat-legend span { width: 11px; height: 11px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.heat-legend span:nth-child(2) { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.heat-legend span:nth-child(3) { background: color-mix(in srgb, var(--accent) 68%, transparent); }
.heat-legend span:nth-child(4) { background: var(--accent); }
.day-detail-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 16px; }
.day-detail-summary > div { padding: 15px; border-radius: 16px; background: var(--surface-strong); }
.day-detail-summary span { display: block; color: var(--muted); font-size: .68rem; font-weight: 760; }
.day-detail-summary strong { display: block; margin-top: 5px; font-size: 1.18rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.day-detail-list { display: grid; }
.day-detail-row { min-height: 64px; display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 11px; border-top: 1px solid var(--line); }
.detail-check { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: transparent; }
.day-detail-row.complete .detail-check { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); background: var(--accent-soft); color: var(--accent-strong); }
.day-detail-row strong { display: block; font-size: .84rem; }
.day-detail-row small { display: block; margin-top: 3px; color: var(--muted); font-size: .69rem; }
.day-detail-row b { color: var(--muted-strong); font-size: .7rem; font-variant-numeric: tabular-nums; }
.activity-summary { display: grid; gap: 9px; }
.activity-card { width: 100%; display: grid; grid-template-columns: 58px minmax(0,1fr) 22px; align-items: center; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-solid); text-align: left; }
.activity-ring { --value: 0; width: 56px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, var(--surface-solid) 57%, transparent 59%), conic-gradient(var(--accent) calc(var(--value) * 1%), var(--surface-strong) 0); }
.activity-ring b { font-size: .69rem; }
.activity-copy { min-width: 0; }
.activity-copy strong, .activity-copy small, .activity-copy span { display: block; }
.activity-copy strong { font-size: .89rem; }
.activity-copy small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: .71rem; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy span { margin-top: 7px; color: var(--accent-strong); font-size: .67rem; font-weight: 830; }
.activity-chevron { width: 17px; height: 17px; color: var(--muted); }
.empty-state { padding: 30px 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); }
.empty-state p { margin: 7px 0 0; font-size: .79rem; }
.empty-state.compact { padding: 20px; }

/* Builder */
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 10px 0 12px; }
.gesture-hint { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 17px; padding: 14px 15px; border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line)); border-radius: 17px; background: var(--accent-faint); color: var(--muted-strong); }
.gesture-hint svg { width: 21px; height: 21px; flex: 0 0 auto; color: var(--accent-strong); }
.gesture-hint p { margin: 0; font-size: .76rem; line-height: 1.5; }
.gesture-hint strong { color: var(--text); }
.builder-list { display: grid; gap: 14px; }
.builder-moment { overflow: hidden; border-radius: var(--radius-lg); transition: border-color .18s ease, box-shadow .18s ease; }
.builder-moment.is-drop-target { border-color: color-mix(in srgb, var(--accent) 65%, var(--line)); box-shadow: 0 0 0 4px var(--accent-faint), var(--shadow-sm); }
.builder-moment-heading { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px 12px 16px; }
.builder-moment-title { display: flex; align-items: center; gap: 11px; }
.builder-moment-title h3 { margin: 0; font-size: 1rem; letter-spacing: -.02em; }
.builder-moment-title small { display: block; margin-top: 2px; color: var(--muted); font-size: .66rem; }
.add-moment-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid); color: var(--accent-strong); cursor: pointer; }
.builder-moment-items { min-height: 18px; display: grid; border-top: 1px solid var(--line); }
.builder-moment-empty { padding: 19px; color: var(--muted); font-size: .75rem; text-align: center; }
.builder-item { min-height: 87px; display: grid; grid-template-columns: minmax(0,1fr) 28px; align-items: center; gap: 10px; padding: 13px 15px 13px 17px; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; touch-action: pan-y; -webkit-touch-callout: none; user-select: none; transition: transform .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease; }
.builder-item:last-child { border-bottom: 0; }
.builder-item:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.builder-item:active:not(.is-dragging) { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.builder-item.is-pressing { background: var(--accent-faint); transform: scale(.992); }
.builder-item.is-drag-source { visibility: hidden; pointer-events: none; }
.drag-ghost { position: fixed; z-index: 100; margin: 0; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 70%, var(--line)); border-radius: 18px; background: var(--surface-solid); box-shadow: 0 22px 60px color-mix(in srgb, var(--accent) 24%, rgba(0,0,0,.18)); pointer-events: none; will-change: transform; }
.builder-meta { min-width: 0; pointer-events: none; }
.builder-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.builder-title-row strong { min-width: 0; overflow: hidden; font-size: .94rem; text-overflow: ellipsis; white-space: nowrap; }
.type-chip { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: var(--accent-faint); color: var(--accent-strong); font-size: .6rem; font-weight: 850; }
.builder-meta small { display: block; margin-top: 6px; overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.days-summary { display: inline-block; margin-top: 7px; color: var(--muted-strong); font-size: .65rem; font-weight: 790; }
.builder-disclosure { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); pointer-events: none; transition: color .18s ease, background .18s ease, transform .18s ease; }
.builder-disclosure svg { width: 17px; height: 17px; }
.builder-item:hover .builder-disclosure, .builder-item:focus-visible .builder-disclosure { color: var(--accent-strong); background: var(--accent-faint); transform: translateX(2px); }
.builder-item.is-pressing .builder-disclosure, .drag-ghost .builder-disclosure { opacity: 0; }
.drag-placeholder { min-height: 72px; margin: 7px; border: 1px dashed color-mix(in srgb, var(--accent) 62%, var(--line)); border-radius: 16px; background: repeating-linear-gradient(135deg, var(--accent-faint), var(--accent-faint) 9px, transparent 9px, transparent 18px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface-solid) 65%, transparent); }

/* Settings */
.settings-panel { margin-top: 11px; }
.settings-panel > .muted { margin-top: 8px; }
.settings-row, .toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.settings-row:first-of-type { margin-top: 16px; }
.settings-row p, .toggle-row small { display: block; margin: 4px 0 0; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.status-dot.on { background: var(--accent); box-shadow: 0 0 0 6px var(--accent-faint); }
.switch-input { appearance: none; width: 53px; height: 32px; flex: 0 0 auto; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-strong); cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.switch-input::before { content: ""; display: block; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-solid); box-shadow: 0 2px 8px rgba(0,0,0,.16); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.switch-input:checked { border-color: var(--accent); background: var(--accent); }
.switch-input:checked::before { transform: translateX(21px); background: var(--on-accent); }
.theme-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; padding: 5px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface-strong); }
.theme-picker button { min-height: 76px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 7px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-size: .71rem; font-weight: 820; cursor: pointer; transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
.theme-picker button.active { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-xs); }
.theme-picker svg { width: 20px; height: 20px; }
.danger-panel { border-color: color-mix(in srgb, var(--danger) 21%, var(--line)); }
.footer-note { padding: 12px 8px 26px; color: var(--muted); font-size: .74rem; text-align: center; }
.footer-note a { color: var(--accent-strong); }

/* Navigation */
.bottom-nav { position: fixed; z-index: 35; bottom: max(12px, var(--safe-bottom)); left: 50%; width: min(calc(100% - 24px), 740px); display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px; border: 1px solid var(--line); border-radius: 25px; background: color-mix(in srgb, var(--surface-solid) 90%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(26px) saturate(1.22); transform: translateX(-50%); }
.nav-item { min-height: 62px; display: grid; place-items: center; align-content: center; gap: 4px; padding: 5px; border: 0; border-radius: 18px; background: transparent; color: var(--muted); cursor: pointer; transition: background .18s ease, color .18s ease, transform .15s ease; }
.nav-item svg { width: 20px; height: 20px; }
.nav-item small { font-size: .63rem; font-weight: 830; }
.nav-item.active { background: var(--accent); color: var(--on-accent); box-shadow: 0 9px 20px color-mix(in srgb, var(--accent) 22%, transparent); }
.nav-item:active { transform: scale(.96); }

/* Dialogs and custom controls */
.app-dialog { width: min(calc(100% - 24px), 550px); max-height: min(91dvh, 850px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow); overscroll-behavior: contain; }
.app-dialog::backdrop { background: rgba(5, 11, 7, .58); backdrop-filter: blur(9px); }
.item-dialog form, .picker-shell { padding: 24px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 5px; }
.dialog-header h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.04em; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.conditional-fields { margin-top: 4px; }
.days-fieldset { margin: 15px 0 0; padding: 0; border: 0; }
.days-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days-row label { position: relative; }
.days-row input { position: absolute; opacity: 0; pointer-events: none; }
.days-row span { height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-solid); color: var(--muted); font-size: .75rem; font-weight: 900; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease, transform .15s ease; }
.days-row span:active { transform: scale(.94); }
.days-row input:checked + span { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: var(--accent-soft); color: var(--accent-strong); }
.days-row input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 34%, transparent); outline-offset: 2px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.dialog-actions .danger-button { margin-right: auto; }
.small-dialog { max-width: 420px; }
.picker-dialog { max-width: 460px; }
.option-list { display: grid; gap: 7px; margin-top: 18px; }
.option-button { width: 100%; min-height: 58px; display: grid; grid-template-columns: 38px minmax(0,1fr) 25px; align-items: center; gap: 11px; padding: 8px 12px; border: 1px solid transparent; border-radius: 16px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.option-button:hover { background: var(--surface-strong); }
.option-button.selected { border-color: color-mix(in srgb, var(--accent) 36%, var(--line)); background: var(--accent-faint); }
.option-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-strong); color: var(--muted-strong); }
.option-button.selected .option-icon { background: var(--accent-soft); color: var(--accent-strong); }
.option-copy strong, .option-copy small { display: block; }
.option-copy strong { font-size: .87rem; }
.option-copy small { margin-top: 3px; color: var(--muted); font-size: .69rem; }
.option-check { color: transparent; }
.option-button.selected .option-check { color: var(--accent-strong); }
.calendar-toolbar { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 10px; margin: 20px 0 14px; }
.calendar-toolbar strong { text-align: center; text-transform: capitalize; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-weekdays { margin-bottom: 6px; }
.calendar-weekdays span { display: grid; place-items: center; min-height: 28px; color: var(--muted); font-size: .66rem; font-weight: 850; }
.calendar-day { aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--text-soft); font-size: .78rem; font-weight: 760; cursor: pointer; font-variant-numeric: tabular-nums; }
.calendar-day:hover { background: var(--surface-strong); }
.calendar-day.outside { color: var(--muted); opacity: .55; }
.calendar-day.today { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent-strong); }
.calendar-day.selected { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 20%, transparent); }
.calendar-day:disabled { opacity: .22; cursor: not-allowed; }
.picker-footer { display: flex; justify-content: flex-end; margin-top: 17px; }
.time-display { display: flex; justify-content: center; align-items: center; gap: 9px; margin: 22px 0 18px; font-size: clamp(3.8rem, 19vw, 5.8rem); font-weight: 900; line-height: .9; letter-spacing: -.075em; font-variant-numeric: tabular-nums; }
.time-display i { color: var(--muted); font-style: normal; transform: translateY(-4px); }
.time-steppers { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.time-stepper { display: grid; grid-template-columns: 44px 1fr 44px; grid-template-areas: "label label label" "up input down"; align-items: center; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-strong); }
.time-stepper > span { grid-area: label; color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .09em; text-align: center; text-transform: uppercase; }
.time-stepper button { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-solid); color: var(--muted-strong); cursor: pointer; }
.time-stepper button:first-of-type { grid-area: up; }
.time-stepper button:last-of-type { grid-area: down; }
.time-stepper input { grid-area: input; width: 100%; min-width: 0; height: 44px; padding: 0; border: 0; background: transparent; color: var(--text); font-size: 1.25rem; font-weight: 880; text-align: center; font-variant-numeric: tabular-nums; }
.minute-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 12px; }
.minute-presets button { min-height: 42px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-solid); color: var(--muted-strong); font-size: .76rem; font-weight: 820; cursor: pointer; }
.minute-presets button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(108px + var(--safe-bottom)); min-width: 190px; max-width: calc(100% - 40px); padding: 13px 17px; border: 1px solid color-mix(in srgb, var(--on-accent) 12%, transparent); border-radius: 16px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-size: .79rem; font-weight: 820; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 18px); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Legal */
.legal-page { padding: 24px; }
.legal-card { width: min(100%, 760px); margin: 40px auto; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); line-height: 1.72; box-shadow: var(--shadow-sm); }
.legal-card h1 { font-size: 2.6rem; letter-spacing: -.055em; }
.legal-card h2 { margin-top: 28px; }
.legal-card a { color: var(--accent-strong); }

@media (max-width: 720px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .app-shell { padding-inline: 12px; }
  .topbar { min-height: calc(86px + var(--safe-top)); }
  .hero-card { min-height: 164px; padding: 23px; }
  .hero-caption { max-width: 22ch; }
  .progress-ring { width: 84px; }
  .progress-ring::after { width: 64px; }
  .metric-card { align-items: flex-start; padding: 18px; }
  .metric-copy { align-items: flex-start; }
  .metric-icon { width: 42px; height: 42px; }
  .metric-actions { max-width: 98px; }
  .progress-controls { grid-template-columns: 1fr 1.12fr; }
  .compact-field { padding: 11px; }
  .progress-hero { min-height: 176px; padding: 22px; }
  .period-ring { width: 96px; }
  .period-ring::after { width: 73px; }
  .progress-hero-visual small { display: none; }
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 139px; padding: 15px; }
  .panel { padding: 18px; }
  .trend-chart { min-height: 210px; margin-inline: -7px; }
  .heatmap { gap: 5px; overflow-x: auto; padding: 3px 3px 8px; scrollbar-width: none; }
  .heatmap::-webkit-scrollbar { display: none; }
  .heat-cell, .heat-empty { min-width: 22px; }
  .day-detail-summary { grid-template-columns: 1fr 1fr; }
  .day-detail-summary > div:last-child { grid-column: 1 / -1; }
  .activity-card { grid-template-columns: 55px minmax(0,1fr) 18px; gap: 11px; padding: 11px; }
  .activity-ring { width: 52px; }
  .form-grid.two { grid-template-columns: 1fr; }
  .button-row { flex-direction: column; }
  .app-dialog { width: 100%; max-width: none; max-height: 93dvh; margin: auto 0 0; border-radius: 29px 29px 0 0; border-bottom: 0; }
  .item-dialog form, .picker-shell { padding: 22px 18px calc(22px + var(--safe-bottom)); }
  .days-row { gap: 5px; }
  .days-row span { height: 42px; border-radius: 12px; }
  .time-display { font-size: 4.2rem; }
  .time-stepper { grid-template-columns: 40px 1fr 40px; padding: 10px; }
  .time-stepper button { width: 39px; height: 39px; }
}

@media (max-width: 390px) {
  .hero-number, .progress-score { font-size: 3.35rem; }
  .hero-card { gap: 12px; }
  .hero-caption { font-size: .73rem; }
  .progress-ring { width: 76px; }
  .progress-ring::after { width: 58px; }
  .period-ring { width: 82px; }
  .period-ring::after { width: 62px; }
  .progress-controls { gap: 7px; }
  .compact-field { padding-inline: 9px; }
  .choice-value { font-size: .83rem; }
  .stat-card { min-height: 133px; }
  .theme-picker button { min-height: 68px; }
  .nav-item small { font-size: .58rem; }
  .bar-row { grid-template-columns: 72px minmax(80px,1fr) 38px; gap: 7px; }
  .time-steppers { gap: 7px; }
}

@media (hover: none) {
  .primary-button:hover { transform: none; }
  .builder-item:hover, .heat-cell:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (display-mode: standalone) {
  .topbar { min-height: calc(90px + var(--safe-top)); }
}

#confirm-dialog .dialog-actions .danger-button { margin-right: 0; }
#confirm-dialog .dialog-actions > * { flex: 1; }
