/* A horizontal board on phones as well as larger screens. */
.board-navigation{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 15px}
.board-navigation p{font-size:17px;font-weight:600;line-height:1.45}
.board-navigation small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:4px}
.board-navigation>div{display:flex;gap:5px;flex-shrink:0}
.board-navigation .icon-btn{width:44px;height:44px;border:1px solid var(--line);border-radius:14px}
.board{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:320px;gap:16px;align-items:start;overflow-x:auto;scroll-snap-type:x proximity;scroll-padding-inline:2px;overscroll-behavior-x:contain;margin-top:0;padding:2px 2px 18px;scrollbar-width:thin;scrollbar-color:var(--faint) transparent}
.board>.column{scroll-snap-align:start;min-width:0;padding:15px 12px 12px;border:1px solid var(--line);background:var(--surface);border-radius:24px}
.board .list-title{font-size:15px;line-height:1.4;color:var(--text);gap:8px}
.board .list-title i{width:10px;height:10px;border-radius:50%;flex:none}
.board .list-title>span{font-size:12px;color:var(--muted);font-weight:400}
.board .column-header{gap:5px;padding:0 3px 7px}
.board .column-empty{font-size:13px;line-height:1.6}
.board .add-card{min-height:48px;border-radius:14px;font-size:13px}
.board:focus-visible{outline:2px solid var(--accent);outline-offset:5px;border-radius:24px}
.habit-estimate .field{margin-bottom:0}
.habit-estimate .field input{font-size:18px;min-height:56px}
.habit-field-note{font-size:13px;line-height:1.7;color:var(--muted);margin:12px 0 0}
.topbar [data-action="settings"] svg{width:25px;height:25px;stroke-width:1.7}

/* Settings open as a small set of pages, rather than one long form. */
.sheet:has(.settings-screen){height:min(730px,calc(100dvh - 48px));max-height:calc(100dvh - 48px)}
.sheet:has(.settings-screen) .sheet-header{padding-bottom:22px;border-bottom:1px solid var(--line)}
.sheet:has(.settings-screen) .sheet-content{padding-top:24px}
.settings-screen{display:grid;gap:24px}
.settings-intro{font-size:15px;line-height:1.7;color:var(--muted);margin:0}
.settings-menu,.settings-sections{display:grid;gap:16px}
.settings-card{display:flex;align-items:center;gap:15px;text-align:left;width:100%;padding:19px 16px;border:1px solid var(--line);background:var(--surface);border-radius:20px;min-height:92px}
.settings-card>span:nth-child(2){flex:1;min-width:0}
.settings-card strong{display:block;font-size:16px;font-weight:600;line-height:1.4}
.settings-card small{display:block;font-size:13px;color:var(--muted);line-height:1.6;margin-top:5px}
.settings-card>svg:last-child{flex:none;color:var(--muted)}
.settings-card-icon{width:45px;height:45px;display:grid;place-items:center;flex:none;border-radius:14px;background:var(--accent-soft);color:var(--accent-ink)}
.settings-back{display:flex;align-items:center;gap:8px;min-height:44px;width:max-content;padding:0 6px;color:var(--accent-ink);font-size:14px}
.settings-group{padding:22px;border:1px solid var(--line);border-radius:22px;background:var(--surface);min-width:0}
.settings-group h3{font-size:18px;line-height:1.4;margin:0 0 8px}
.settings-group p{font-size:14px;line-height:1.75;color:var(--muted);margin:0 0 20px}
.settings-group p:last-child{margin-bottom:0}
.settings-group .field{margin:0;gap:10px}
.settings-group .field>span{font-size:13px}
.settings-group .field input{font-size:17px;min-height:55px;background:var(--control)}
.settings-time-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:23px}
.settings-time-fields[hidden]{display:none}
.settings-switch{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;cursor:pointer}
.settings-switch>span{display:flex;align-items:center;gap:12px}
.settings-switch strong{font-size:17px;font-weight:600}
.settings-switch svg{flex:none;color:var(--accent-ink)}
.settings-switch input{appearance:none;-webkit-appearance:none;position:relative;width:48px;height:28px;border:1px solid var(--line);border-radius:20px;flex:none;background:var(--surface-3);cursor:pointer}
.settings-switch input:before{content:'';position:absolute;width:20px;height:20px;top:3px;left:3px;background:var(--text);border-radius:50%;transition:transform .15s}
.settings-switch input:checked{background:var(--accent);border-color:var(--accent)}
.settings-switch input:checked:before{transform:translateX(20px);background:var(--accent-contrast)}
.settings-switch input:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.settings-note{font-size:13px;line-height:1.7;color:var(--muted);margin:0}

/* The day-plan preview makes selection, duration and saved outcome explicit. */
.plan-preview{display:grid;gap:18px}
.plan-preview-date{font-size:15px;color:var(--muted);line-height:1.6}
.plan-preview-summary{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:18px;border-radius:20px;background:var(--accent-soft);color:var(--accent-ink)}
.plan-preview-summary>span{display:flex;align-items:center;gap:7px;font-size:14px;line-height:1.5}
.plan-preview-summary strong{font-size:18px;color:var(--text)}
.plan-preview-note{font-size:13px;line-height:1.7;color:var(--muted);margin:0}
.plan-selection-actions{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:7px}
.plan-selection-actions button{font-size:12px;color:var(--accent-ink);min-height:44px;text-align:left}
.plan-proposals{display:grid;gap:13px}
.plan-proposal{display:flex;align-items:center;gap:13px;padding:17px 14px;background:var(--surface);border:1px solid var(--line);border-radius:22px;cursor:pointer;min-width:0}
.plan-proposal:has(input:checked){border-color:var(--accent-border);background:var(--accent-soft)}
.plan-proposal input{width:22px;height:22px;flex:none;accent-color:var(--accent);cursor:pointer}
.plan-proposal input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.plan-proposal .calendar-event-icon{width:45px;height:52px;min-width:45px;border-radius:15px}
.plan-proposal-body{min-width:0;display:grid;gap:5px}
.plan-proposal-body>strong{font-size:16px;line-height:1.45;overflow-wrap:anywhere}
.plan-proposal-type{font-size:12px;color:var(--muted);line-height:1.5}
.plan-proposal-hours{font-size:14px;line-height:1.5;color:var(--accent-ink);font-variant-numeric:tabular-nums}
.plan-overflow{padding:21px 18px;border:1px solid var(--line);border-radius:22px;display:grid;gap:17px}
.plan-overflow h3{font-size:16px;line-height:1.5}
.plan-overflow h3 span{font-size:13px;margin-left:6px;color:var(--muted)}
.plan-overflow strong{font-size:14px;line-height:1.6}
.plan-overflow strong small{font-size:12px;font-weight:400;color:var(--muted)}
.plan-overflow p{font-size:12px;line-height:1.7;color:var(--muted);margin-top:3px}
.plan-preview-empty{padding:22px 18px;border:1px solid var(--line);border-radius:22px;text-align:center}
.plan-preview-empty>svg{color:var(--accent-ink);margin-bottom:12px}
.plan-preview-empty h3{font-size:18px;margin-bottom:10px}
.plan-preview-empty p{font-size:14px;line-height:1.7;color:var(--muted)}
@media(max-width:560px){
 .board{grid-auto-columns:calc(100% - 30px);padding-bottom:17px}
 .board-navigation{gap:10px}.board-navigation p{font-size:16px}.board-navigation small{font-size:11px}
 .modal-backdrop:has(.settings-screen){padding:0;align-items:stretch}
 .sheet:has(.settings-screen){height:100dvh;max-height:100dvh;border:0;border-radius:0}
 .sheet:has(.settings-screen) .sheet-header{padding:calc(18px + env(safe-area-inset-top)) 20px 18px}
 .sheet:has(.settings-screen) .sheet-header:before{display:none}
 .sheet:has(.settings-screen) .sheet-content{padding:22px 20px calc(24px + env(safe-area-inset-bottom))}
 .settings-screen{gap:20px}.settings-card{padding:16px 14px;min-height:96px;gap:12px}
 .settings-card-icon{width:40px;height:44px}.settings-group{padding:21px 17px}.settings-time-fields{gap:13px}
 .plan-proposal{gap:10px;padding:16px 12px}.plan-preview-summary{padding:16px 14px}.plan-preview-summary strong{font-size:17px}
}
@media print{.board{grid-auto-flow:row;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;grid-auto-columns:auto}.board-navigation{display:none}}

.plan-preview-date::first-letter{text-transform:uppercase}
/* Planning options stay compact; the proposed times remain the focus. */
.plan-preview-options { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:14px; margin:2px 0 0; }
.plan-preview-options .field { min-width:0; margin:0; }
.plan-preview-options .choice-control>summary,.plan-preview-options .value-trigger { min-height:48px; }
.plan-preview-options .choice-control>summary { border-radius:inherit; }
.plan-refresh-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.plan-refresh-row p { color:var(--muted); font-size:13px; margin:0; }
.plan-refresh-row strong { color:var(--text); font-weight:600; }
.plan-refresh-row button { gap:7px; }
.plan-proposal-reason { display:block; color:var(--muted); font-size:12px; line-height:1.5; margin:2px 0 5px; }
.plan-selection-actions { flex-wrap:wrap; }
.plan-selection-actions [data-plan-reflow] { color:var(--accent-ink); }
.plan-overflow>summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; list-style:none; cursor:pointer; font-weight:650; }
.plan-overflow>summary::-webkit-details-marker { display:none; }
.plan-reset { margin:8px 0 18px; }
/* Notifications must not block a field or drag target underneath them. */
.toast { pointer-events:none; }
.toast button { pointer-events:auto; }
@media(max-width:360px) { .plan-preview-options { grid-template-columns:1fr; gap:12px; } }

.reset-group{display:grid;gap:12px}
.reset-group>h3{font-size:13px;font-weight:600;color:var(--muted);margin:0 2px}
.reset-screen .reset-all-card{border-color:var(--danger)}
.reset-screen .reset-all-card .settings-card-icon{color:var(--danger);background:var(--danger-soft)}
.reset-confirm{display:grid;gap:20px;padding:6px 0}
.reset-symbol{display:grid;place-items:center;width:58px;height:58px;border-radius:19px;color:var(--accent-ink);background:var(--accent-soft)}
.reset-symbol.is-destructive{color:var(--danger);background:var(--danger-soft)}
.reset-lead{font-size:16px;line-height:1.6;color:var(--text)}
.reset-counts{display:flex;flex-wrap:wrap;gap:12px 24px;padding:16px;border-radius:17px;background:var(--surface-2)}
.reset-counts>span{display:grid;gap:4px;font-size:12px;line-height:1.5;color:var(--muted)}
.reset-counts strong{font-size:23px;font-variant-numeric:tabular-nums;color:var(--text)}
.reset-effects{display:grid;gap:13px;padding-left:20px;margin:0;font-size:14px;line-height:1.7;color:var(--text)}
.reset-effects li::marker{color:var(--accent-ink)}
.reset-recovery{display:flex;gap:10px;align-items:flex-start;padding:15px;border-radius:16px;background:var(--accent-soft);color:var(--accent-ink);font-size:13px;line-height:1.7}
.reset-recovery svg{flex-shrink:0;margin-top:2px}
.reset-export,.reset-cancel{justify-self:start;text-align:left;white-space:normal}
.reset-confirm .field{gap:10px;font-size:14px}
.reset-destructive .sheet-footer .btn.primary{background:var(--surface);color:var(--danger);border-color:var(--danger)}
.reset-form .sheet-footer .btn{white-space:normal;line-height:1.4;min-height:48px}
@media(max-width:560px){.reset-form .sheet-footer .btn{width:100%}.reset-confirm{gap:18px}.reset-effects{font-size:14px}.reset-group+.reset-group{margin-top:24px}}

/* Template management shares the app's existing surfaces and colors. */
.template-list{display:grid;gap:12px}.template-card{min-width:0;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.template-copy{min-width:0}.template-copy h3{margin:0 0 8px;font-size:16px;line-height:1.4;overflow-wrap:anywhere}.template-copy p{margin:0 0 10px;color:var(--muted);font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;max-height:6em;overflow:auto}
.template-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:16px}.template-actions .btn,.template-actions .icon-btn{min-height:44px}.template-actions .icon-btn{margin-left:auto;flex-shrink:0}.template-actions .btn{white-space:normal}
