:root {
    color-scheme: light;
    --bg: #f6f8fc;
    --bg-soft: #fbfcff;
    --panel: rgba(255, 255, 255, .94);
    --panel-solid: #ffffff;
    --panel-alt: #f7f9fe;
    --text: #172033;
    --text-soft: #59657a;
    --muted: #8791a5;
    --border: #dbe2ef;
    --border-soft: #e9eef6;
    --primary: #3867f4;
    --primary-2: #7357ef;
    --primary-strong: #2455e6;
    --primary-soft: #eef3ff;
    --success: #16845b;
    --success-bg: #eaf8f2;
    --warning: #a56508;
    --warning-bg: #fff7df;
    --danger: #d33f5a;
    --danger-bg: #fff0f3;
    --shadow: 0 12px 36px rgba(47, 67, 112, .08);
    --shadow-soft: 0 6px 20px rgba(47, 67, 112, .06);
    --radius: 18px;
    --radius-sm: 11px;
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 15% 0%, rgba(82, 125, 255, .10), transparent 30%),
        radial-gradient(circle at 90% 8%, rgba(121, 88, 239, .09), transparent 28%),
        var(--bg);
    color: var(--text);
}

body { min-height: 100vh; margin: 0; background: transparent; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(56, 103, 244, .20);
    outline-offset: 2px;
}
button:disabled { cursor: not-allowed; opacity: .58; }
svg { display: block; }

.shell { width: min(1380px, calc(100% - 28px)); margin: 0 auto; }

.app-header {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(213, 222, 238, .9);
    background: linear-gradient(120deg, rgba(255,255,255,.97), rgba(244,248,255,.95) 54%, rgba(249,245,255,.96));
    box-shadow: 0 4px 18px rgba(44, 63, 104, .04);
}
.app-header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 20%, rgba(61, 111, 249, .13), transparent 22%),
        radial-gradient(circle at 88% 0%, rgba(119, 80, 232, .12), transparent 24%);
}
.header-inner {
    position: relative;
    z-index: 1;
    min-height: 108px;
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.eyebrow, .section-kicker, .timer-kicker, .flow-step {
    color: var(--primary);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.brand-title { margin-top: 7px; font-size: 30px; font-weight: 850; letter-spacing: -.035em; }
.brand-subtitle { margin-top: 4px; color: var(--text-soft); font-size: 13px; }
.app-main { padding: 22px 0 44px; }

.flash { margin-bottom: 14px; padding: 13px 15px; border: 1px solid; border-radius: 12px; box-shadow: var(--shadow-soft); font-size: 13px; font-weight: 700; }
.flash-success { border-color: #bde5d5; background: var(--success-bg); color: var(--success); }
.flash-error { border-color: #f3c5ce; background: var(--danger-bg); color: var(--danger); }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card {
    position: relative;
    min-height: 108px;
    overflow: hidden;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,255,.98));
    box-shadow: var(--shadow-soft);
}
.stat-card::after { content: ""; position: absolute; width: 92px; height: 92px; right: -36px; top: -38px; border-radius: 999px; background: rgba(68, 111, 247, .07); }
.stat-card.stat-primary { border-color: #cbd7ff; background: linear-gradient(145deg, #f8faff, #eef3ff 64%, #f5f0ff); }
.stat-card.stat-primary::after { background: rgba(113, 84, 239, .10); }
.stat-label { position: relative; z-index: 1; color: var(--text-soft); font-size: 11px; font-weight: 700; }
.stat-value { position: relative; z-index: 1; margin-top: 7px; color: var(--text); font-size: clamp(24px, 2vw, 30px); font-weight: 880; letter-spacing: -.035em; }
.stat-note { position: relative; z-index: 1; margin-top: 6px; color: var(--muted); font-size: 10px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .8fr); gap: 14px; align-items: stretch; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.panel-heading {
    min-height: 84px;
    padding: 17px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--border-soft);
    background: linear-gradient(120deg, rgba(255,255,255,.98), rgba(249,251,255,.98));
}
.panel-heading h1, .panel-heading h2 { margin: 4px 0 0; color: var(--text); font-size: 20px; font-weight: 850; letter-spacing: -.025em; }
.section-description { margin: 5px 0 0; color: var(--text-soft); font-size: 11px; line-height: 1.45; }

.state-grid { padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.state-card {
    position: relative;
    min-height: 118px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 13px;
    text-align: left;
    border: 1px solid #dbe3ef;
    border-radius: 15px;
    background: linear-gradient(145deg, #fff, #f9fbff);
    color: var(--text);
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.state-card:hover { transform: translateY(-1px); border-color: #b8c9ee; box-shadow: 0 8px 22px rgba(47, 67, 112, .08); }
.state-card.state-recommended { border-color: #becbf2; background: linear-gradient(145deg, #f8faff, #f0f4ff 58%, #f6f1ff); }
.state-icon { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; border-radius: 13px; background: var(--primary-soft); color: var(--primary); }
.state-icon svg, .quick-action svg, .focus-cta-icon svg, .voice-button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.state-copy { min-width: 0; display: grid; gap: 5px; }
.state-copy strong { font-size: 15px; font-weight: 840; letter-spacing: -.015em; }
.state-copy small { color: var(--text-soft); font-size: 11px; }

.quick-actions { padding: 14px; display: grid; gap: 10px; }
.quick-primary {
    min-height: 92px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    border: 1px solid #cbd7ff;
    border-radius: 14px;
    background: linear-gradient(135deg, #f7f9ff, #eef3ff 60%, #f5f0ff);
    color: var(--text);
    cursor: pointer;
}
.quick-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-size: 24px; font-weight: 400; }
.quick-primary > span:last-child { display: grid; gap: 4px; }
.quick-primary strong { font-size: 14px; font-weight: 850; }
.quick-primary small { color: var(--text-soft); font-size: 10px; }
.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick-action { min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); border-radius: 13px; background: #fff; color: #365287; cursor: pointer; font-size: 12px; font-weight: 820; }
.quick-action svg { width: 20px; height: 20px; }
.saved-link { min-height: 48px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border-soft); border-radius: 11px; background: #fbfcff; color: var(--text-soft); font-size: 11px; }
.saved-link strong { color: var(--primary); }

.focus-cta { width: 100%; min-height: 88px; margin-top: 14px; padding: 16px 20px; display: flex; align-items: center; gap: 14px; border-radius: var(--radius); background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 12px 30px rgba(61, 91, 230, .22); cursor: pointer; text-align: left; }
.focus-cta-icon { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.14); }
.focus-cta > span:nth-child(2) { min-width: 0; flex: 1; display: grid; gap: 4px; }
.focus-cta small { opacity: .78; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.focus-cta strong { font-size: 18px; font-weight: 850; }
.focus-arrow { font-size: 26px; }
.app-note { margin: 16px 2px 0; color: var(--muted); text-align: center; font-size: 10px; }

.primary-button, .secondary-button, .ghost-button { min-height: 42px; padding: 0 15px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 11px; font-weight: 820; }
.primary-button { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 7px 18px rgba(61, 91, 230, .18); }
.secondary-button { border: 1px solid #cdd8ec; background: #f2f6ff; color: #365287; }
.ghost-button { border: 1px solid #d4ddeb; background: rgba(255,255,255,.88); color: var(--text-soft); }
.close-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #dbe3ef; border-radius: 10px; background: #fff; color: #6e798c; cursor: pointer; font-size: 20px; }

.modal, .flow-dialog, .timer-dialog { padding: 0; border: 0; background: transparent; }
.modal::backdrop, .flow-dialog::backdrop, .timer-dialog::backdrop { background: rgba(29, 40, 64, .44); backdrop-filter: blur(5px); }
.modal { width: min(610px, calc(100% - 24px)); max-height: calc(100dvh - 24px); }
.modal-card { max-height: calc(100dvh - 24px); overflow: auto; border: 1px solid #d9e1ee; border-radius: 18px; background: #fff; box-shadow: 0 28px 70px rgba(27, 42, 73, .22); }
.modal-header { min-height: 82px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--border-soft); background: linear-gradient(120deg, #fff, #f6f9ff 60%, #faf7ff); }
.modal-header h2 { margin: 4px 0 0; font-size: 18px; font-weight: 850; }
.modal-body { padding: 18px; display: grid; gap: 15px; }
.modal-actions { padding: 14px 18px 18px; display: flex; justify-content: flex-end; gap: 9px; }
.split-actions { justify-content: space-between; }
.field-block { display: grid; gap: 7px; }
.field-block > span, .duration-picker legend { color: #5d687b; font-size: 10px; font-weight: 780; }
.field-block small { color: var(--muted); font-weight: 650; }
.field-block input, .field-block textarea { width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid #d5deec; border-radius: 11px; outline: 0; resize: vertical; background: #fbfcff; color: var(--text); font-size: 13px; line-height: 1.45; }
.field-block input:focus, .field-block textarea:focus { border-color: #91adff; box-shadow: 0 0 0 3px rgba(56,103,244,.08); }
.type-picker, .duration-options { display: flex; gap: 8px; flex-wrap: wrap; }
.type-chip, .duration-options button { min-height: 38px; padding: 0 12px; border: 1px solid #d5deec; border-radius: 999px; background: #fff; color: var(--text-soft); cursor: pointer; font-size: 10px; font-weight: 800; }
.type-chip.is-active, .duration-options button.is-active { border-color: #9bb2f8; background: var(--primary-soft); color: var(--primary); }
.voice-row { min-height: 42px; display: flex; align-items: center; gap: 10px; }
.voice-button { gap: 7px; }
.voice-button svg { width: 18px; height: 18px; }
.voice-status { color: var(--muted); font-size: 10px; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-size: 11px; font-weight: 700; }
.duration-picker { margin: 0; padding: 0; border: 0; }
.duration-picker legend { margin-bottom: 8px; }
.focus-actions { justify-content: space-between; }

.flow-dialog { width: min(650px, calc(100% - 24px)); max-height: calc(100dvh - 24px); }
.flow-shell { max-height: calc(100dvh - 24px); overflow: auto; border: 1px solid #d9e1ee; border-radius: 20px; background: #fff; box-shadow: 0 28px 70px rgba(27, 42, 73, .24); }
.flow-header { min-height: 88px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(120deg, #fff, #f6f9ff 60%, #faf7ff); }
.flow-header h2 { margin: 5px 0 0; font-size: 22px; font-weight: 870; letter-spacing: -.025em; }
.flow-progress { height: 4px; background: #edf1f8; }
.flow-progress span { display: block; width: 25%; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-2)); transition: width .2s ease; }
.flow-content { min-height: 340px; padding: 24px 22px; display: flex; flex-direction: column; justify-content: center; }
.flow-center { width: 100%; max-width: 500px; margin: 0 auto; display: grid; gap: 16px; text-align: center; }
.flow-center h3 { margin: 0; font-size: clamp(24px, 4vw, 32px); font-weight: 880; letter-spacing: -.035em; }
.flow-center > p { max-width: 440px; margin: 0 auto; color: var(--text-soft); font-size: 14px; line-height: 1.5; }
.flow-actions { margin-top: 7px; display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }
.flow-actions .primary-button, .flow-actions .secondary-button, .flow-actions .ghost-button { min-height: 48px; min-width: 130px; }
.flow-input { width: 100%; max-width: 500px; min-height: 110px; margin: 0 auto; padding: 13px; border: 1px solid #d5deec; border-radius: 13px; outline: 0; resize: vertical; background: #fbfcff; color: var(--text); font-size: 14px; line-height: 1.45; }
.flow-input:focus { border-color: #91adff; box-shadow: 0 0 0 3px rgba(56,103,244,.08); }
.inline-voice { display: flex; align-items: center; justify-content: center; gap: 10px; }
.inline-error { color: var(--danger); font-size: 11px; font-weight: 700; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-card { min-height: 92px; padding: 14px; display: grid; place-items: center; border: 1px solid #d8e1ef; border-radius: 14px; background: #fff; color: var(--text); cursor: pointer; font-size: 13px; font-weight: 850; text-align: center; }
.choice-card:hover { border-color: #a9bdef; background: #f8faff; }

.breathing-wrap { display: grid; place-items: center; gap: 13px; }
.breath-orb { width: 132px; height: 132px; display: grid; place-items: center; border-radius: 999px; background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.95), rgba(224,233,255,.92) 45%, rgba(113,87,239,.20)); border: 1px solid #cad7f5; box-shadow: 0 18px 40px rgba(59, 87, 169, .15); transform: scale(.76); transition-property: transform; transition-timing-function: ease-in-out; }
.breath-orb.is-inhale { transform: scale(1); }
.breath-orb.is-exhale { transform: scale(.76); }
.breath-phase { color: var(--primary); font-size: 13px; font-weight: 850; }
.breath-time { color: var(--text-soft); font-size: 12px; }

.flow-dialog.night-flow .flow-shell { border-color: #334158; background: #182131; color: #edf2ff; }
.flow-dialog.night-flow::backdrop { background: rgba(9, 14, 24, .76); }
.flow-dialog.night-flow .flow-header { background: linear-gradient(120deg, #1c2738, #172030 60%, #211d31); }
.flow-dialog.night-flow .flow-step, .flow-dialog.night-flow .section-kicker { color: #9fb6ff; }
.flow-dialog.night-flow .close-button { border-color: #42516a; background: #202c3f; color: #d8e1f2; }
.flow-dialog.night-flow .flow-progress { background: #27354a; }
.flow-dialog.night-flow .flow-center > p, .flow-dialog.night-flow .voice-status { color: #aebbd0; }
.flow-dialog.night-flow .flow-input { border-color: #3a4a63; background: #111a28; color: #f0f4ff; }
.flow-dialog.night-flow .choice-card { border-color: #3b4a62; background: #202c3f; color: #eef3ff; }
.flow-dialog.night-flow .choice-card:hover { border-color: #6682c8; background: #26344a; }
.flow-dialog.night-flow .secondary-button, .flow-dialog.night-flow .ghost-button { border-color: #45546b; background: #202c3f; color: #d7e0ef; }
.flow-dialog.night-flow .breath-orb { border-color: #465878; background: radial-gradient(circle at 35% 28%, #31415b, #233149 50%, #272640); box-shadow: 0 18px 40px rgba(0, 0, 0, .20); }

.timer-dialog { width: min(680px, calc(100% - 24px)); }
.timer-shell { min-height: 470px; padding: 34px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; border: 1px solid #d9e1ee; border-radius: 22px; background: linear-gradient(145deg, #fff, #f7f9ff); box-shadow: 0 28px 70px rgba(27, 42, 73, .24); text-align: center; }
.timer-shell h2 { max-width: 560px; margin: 0; font-size: clamp(22px, 4vw, 34px); font-weight: 880; letter-spacing: -.035em; }
.timer-first-step { max-width: 520px; margin: -5px 0 0; color: var(--text-soft); font-size: 13px; }
.timer-value { margin: 4px 0; color: var(--text); font-size: clamp(64px, 11vw, 94px); font-variant-numeric: tabular-nums; font-weight: 880; letter-spacing: -.055em; }
.timer-actions { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }
.timer-actions button { min-height: 48px; }
.distraction-card, .completion-card { width: min(100%, 520px); padding: 22px; border: 1px solid #ccd8f6; border-radius: 16px; background: #f2f6ff; display: grid; gap: 14px; }
.distraction-card span { color: var(--text-soft); font-size: 11px; font-weight: 750; }
.distraction-card strong { font-size: 18px; font-weight: 860; }
.completion-card h3 { margin: 0; font-size: 24px; font-weight: 870; }
.completion-card p { margin: 0; color: var(--text-soft); font-size: 12px; }
.completion-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

.saved-main { max-width: 1180px; }
.saved-toolbar { margin-bottom: 14px; padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-soft); }
.saved-toolbar h1 { margin: 4px 0 0; font-size: 20px; font-weight: 850; }
.filter-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-chips a { min-height: 36px; padding: 0 11px; display: inline-flex; align-items: center; border: 1px solid #d6dfed; border-radius: 999px; background: #fff; color: var(--text-soft); font-size: 10px; font-weight: 800; }
.filter-chips a.is-active { border-color: #9eb5f8; background: var(--primary-soft); color: var(--primary); }
.saved-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.saved-card { min-width: 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-soft); }
.saved-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.capture-badge, .tomorrow-badge { min-height: 24px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 9px; font-weight: 850; }
.capture-badge { border: 1px solid #cfdbf8; background: var(--primary-soft); color: #4e6dab; }
.capture-worry { border-color: #ecd7ad; background: #fff8e8; color: #93640d; }
.capture-pending { border-color: #d7dfea; background: #f6f8fb; color: #657186; }
.capture-brain_dump { border-color: #d8cdef; background: #f7f1ff; color: #6f55a1; }
.tomorrow-badge { background: #eef7f2; color: var(--success); }
.saved-content { margin: 0; color: var(--text); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.saved-meta { margin-top: auto; color: var(--muted); font-size: 9px; }
.saved-actions { padding-top: 10px; display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }
.saved-actions .secondary-button, .saved-actions .ghost-button { min-height: 36px; }
.text-danger { padding: 8px; background: transparent; color: var(--danger); cursor: pointer; font-size: 10px; font-weight: 800; }
.empty-state { grid-column: 1 / -1; min-height: 330px; padding: 34px; display: grid; place-items: center; align-content: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-soft); text-align: center; }
.empty-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--success-bg); color: var(--success); font-size: 24px; }
.empty-state h2 { margin: 4px 0 0; font-size: 20px; }
.empty-state p { margin: 0 0 8px; color: var(--text-soft); font-size: 11px; }

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .capture-panel { order: 2; }
    .saved-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 640px) {
    .shell { width: min(100% - 18px, 1380px); }
    .header-inner { min-height: 94px; padding: 14px 0; }
    .brand-title { font-size: 26px; }
    .brand-subtitle { font-size: 11px; }
    .header-actions { gap: 6px; }
    .header-actions .ghost-button { min-height: 38px; padding: 0 10px; font-size: 10px; }
    .stats-grid { gap: 7px; }
    .stat-card { min-height: 86px; padding: 12px 10px; border-radius: 13px; }
    .stat-label { min-height: 25px; font-size: 9px; line-height: 1.25; }
    .stat-value { margin-top: 3px; font-size: 21px; }
    .stat-note { margin-top: 3px; font-size: 8px; }
    .panel-heading { min-height: 76px; padding: 14px; }
    .panel-heading h1, .panel-heading h2 { font-size: 18px; }
    .state-grid { padding: 10px; gap: 8px; }
    .state-card { min-height: 112px; padding: 12px; align-items: flex-start; flex-direction: column; gap: 9px; }
    .state-icon { width: 38px; height: 38px; flex-basis: 38px; border-radius: 11px; }
    .state-icon svg { width: 20px; height: 20px; }
    .state-copy strong { font-size: 13px; line-height: 1.2; }
    .state-copy small { font-size: 9px; }
    .quick-actions { padding: 10px; }
    .focus-cta { min-height: 80px; padding: 13px 15px; }
    .focus-cta-icon { width: 42px; height: 42px; flex-basis: 42px; }
    .focus-cta strong { font-size: 16px; }
    .modal, .flow-dialog, .timer-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; margin: 0; }
    .modal-card, .flow-shell, .timer-shell { width: 100vw; min-height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
    .flow-content { min-height: calc(100dvh - 94px); padding: 24px 18px 40px; }
    .timer-shell { padding: 28px 18px; }
    .modal-body { padding: 16px; }
    .modal-actions { padding: 12px 16px 18px; }
    .split-actions, .focus-actions { align-items: stretch; flex-direction: column-reverse; }
    .split-actions button, .focus-actions button { width: 100%; min-height: 48px; }
    .choice-grid { grid-template-columns: 1fr; }
    .saved-grid { grid-template-columns: 1fr; }
    .saved-toolbar { padding: 14px; }
    .filter-chips { width: 100%; }
}

@media (max-width: 390px) {
    .header-actions .install-button { display: none !important; }
    .state-card { min-height: 106px; }
    .state-copy strong { font-size: 12.5px; }
    .quick-row { gap: 7px; }
}

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