/* Design tokens are inherited by the app and by isolated theme previews. */
:root,
html[data-theme="classic"],
[data-preview-theme="classic"] {
  color-scheme:light;
  --bg:#f3f5f1;
  --paper:#ffffff;
  --ink:#23382c;
  --muted:#647368;
  --faint:#89978c;
  --line:#dce4d9;
  --accent:#38654e;
  --green:var(--accent);
  --primary:#38654e;
  --primary-hover:#2a523d;
  --on-primary:#ffffff;
  --soft:#e8efe4;
  --sage:#cdddc6;
  --sidebar-bg:#eaf0e5;
  --nav-active:#d9e6d2;
  --nav-bg:rgba(247,249,244,.96);
  --hover-bg:#edf3e8;
  --subtle-bg:#f6f8f3;
  --other-bg:#f7f9f4;
  --panel-bg:#eaf0e4;
  --selected-bg:#e7f0e1;
  --selected-line:#99b68d;
  --field-bg:#f8faf6;
  --field-line:#cdd9c7;
  --check-line:#8fa28f;
  --label:#4e6354;
  --focus-ring:#80a790;
  --weekend:#927647;
  --event:#547761;
  --event-soft:#e6eee4;
  --event-ink:#3a6449;
  --task:#a66e25;
  --task-soft:#fcf0db;
  --task-ink:#865815;
  --note:#797096;
  --note-soft:#eeeaf6;
  --note-ink:#695c86;
  --success-soft:#e8f0e2;
  --success-ink:#426638;
  --error:#a54937;
  --error-soft:#fbe9e4;
  --toast-bg:#263d2d;
  --login-glow:#dce9d5;
  --backdrop:rgba(26,43,30,.38);
  --shadow-small:rgba(30,52,35,.08);
  --shadow-card:0 4px 22px rgba(33,56,40,.025);
  --shadow-dialog:rgba(21,43,27,.22);
  --shadow-toast:rgba(24,43,28,.18);
  --radius:20px;
  --radius-small:10px;
  --radius-input:10px;
  --radius-dialog:24px;
  --heading-font:inherit;
  --heading-weight:600;
  --heading-spacing:-1.15px;
  --select-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23647368' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-theme="graphite"],
[data-preview-theme="graphite"] {
  color-scheme:dark;
  --bg:#111924;
  --paper:#1b2736;
  --ink:#e9eff7;
  --muted:#a7b6c9;
  --faint:#7d91ab;
  --line:#344458;
  --accent:#9ac2ef;
  --green:var(--accent);
  --primary:#3d719f;
  --primary-hover:#4b83b4;
  --on-primary:#ffffff;
  --soft:#283c51;
  --sage:#45627f;
  --sidebar-bg:#15202e;
  --nav-active:#2b4058;
  --nav-bg:rgba(20,31,45,.96);
  --hover-bg:#25354a;
  --subtle-bg:#1f2d3e;
  --other-bg:#172231;
  --panel-bg:#1c2b3d;
  --selected-bg:#263d56;
  --selected-line:#78a4d1;
  --field-bg:#162231;
  --field-line:#425671;
  --check-line:#8296ae;
  --label:#bdcadb;
  --focus-ring:#8db8e9;
  --weekend:#d5b278;
  --event:#99c6c4;
  --event-soft:#263f45;
  --event-ink:#b1d8d5;
  --task:#e0bb79;
  --task-soft:#403a2a;
  --task-ink:#efd09a;
  --note:#bbb3e6;
  --note-soft:#34354f;
  --note-ink:#d0c9ed;
  --success-soft:#233e38;
  --success-ink:#a3d5ba;
  --error:#f3afa4;
  --error-soft:#4a3035;
  --toast-bg:#315b80;
  --login-glow:#274366;
  --backdrop:rgba(4,11,20,.64);
  --shadow-small:rgba(0,8,18,.25);
  --shadow-card:0 5px 24px rgba(0,8,18,.1);
  --shadow-dialog:rgba(0,5,13,.5);
  --shadow-toast:rgba(0,6,15,.38);
  --radius:12px;
  --radius-small:7px;
  --radius-input:7px;
  --radius-dialog:16px;
  --heading-font:inherit;
  --heading-weight:650;
  --heading-spacing:-.85px;
  --select-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a7b6c9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-theme="rose"],
[data-preview-theme="rose"] {
  color-scheme:light;
  --bg:#faf5f2;
  --paper:#fffdfc;
  --ink:#44313b;
  --muted:#856a76;
  --faint:#a58d97;
  --line:#ebdce1;
  --accent:#924960;
  --green:var(--accent);
  --primary:#924960;
  --primary-hover:#7a394f;
  --on-primary:#ffffff;
  --soft:#f5e8ed;
  --sage:#e4c5d0;
  --sidebar-bg:#f4e9eb;
  --nav-active:#ecd2dd;
  --nav-bg:rgba(253,247,247,.97);
  --hover-bg:#f8ecf0;
  --subtle-bg:#fcf7f6;
  --other-bg:#fcf8f6;
  --panel-bg:#f5e8e9;
  --selected-bg:#f5e1e9;
  --selected-line:#c38ba0;
  --field-bg:#fff9f8;
  --field-line:#dec3ce;
  --check-line:#b58c9c;
  --label:#795664;
  --focus-ring:#be859a;
  --weekend:#a36e4c;
  --event:#8e6785;
  --event-soft:#f0e6ef;
  --event-ink:#79566f;
  --task:#ac7c39;
  --task-soft:#fcf1df;
  --task-ink:#916626;
  --note:#8574a4;
  --note-soft:#efe9f7;
  --note-ink:#74618f;
  --success-soft:#edf2e6;
  --success-ink:#5d7347;
  --error:#ab493b;
  --error-soft:#fbe8e2;
  --toast-bg:#734153;
  --login-glow:#efd8df;
  --backdrop:rgba(62,33,45,.36);
  --shadow-small:rgba(88,50,65,.08);
  --shadow-card:0 5px 24px rgba(109,65,78,.035);
  --shadow-dialog:rgba(81,37,53,.22);
  --shadow-toast:rgba(80,40,54,.18);
  --radius:24px;
  --radius-small:12px;
  --radius-input:12px;
  --radius-dialog:28px;
  --heading-font:Georgia,"Times New Roman",serif;
  --heading-weight:500;
  --heading-spacing:-1px;
  --select-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23856a76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Shared layout, typography and accessible control states. */
html { font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
body { background:var(--bg); color:var(--ink); line-height:1.5; }
button { -webkit-tap-highlight-color:transparent; }
a { color:var(--accent); text-underline-offset:3px; }
button,input,select,textarea { transition:background .16s,border-color .16s,box-shadow .16s; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid var(--focus-ring); outline-offset:3px; }
input:focus,textarea:focus,select:focus { border-color:var(--accent); outline:2px solid var(--focus-ring); outline-offset:1px; }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:.82; }
button:disabled { cursor:not-allowed; }
button[aria-busy="true"] { cursor:wait; }
h1 { font-family:var(--heading-font); font-size:36px; font-weight:var(--heading-weight); letter-spacing:var(--heading-spacing); line-height:1.18; }
.main { max-width:1860px; padding-bottom:24px; }
.topbar { height:76px; font-size:12px; }
.breadcrumb strong { color:var(--label); }
.page-heading { margin:30px 0 24px; }
.page-heading p { font-size:13px; max-width:570px; }
.eyebrow,.space-label { font-size:10px; letter-spacing:1.65px; }
.brand { color:var(--ink); letter-spacing:-.85px; }
.brand-mark { color:var(--on-primary); background:var(--primary); border-radius:var(--radius-small); }
.brand-sub { font-size:11px; line-height:1.5; }
.sidebar { background:var(--sidebar-bg); border-color:var(--line); }
.nav-button { min-height:46px; font-size:13px; border-radius:var(--radius-small); color:var(--muted); }
.nav-button.active { color:var(--accent); background:var(--nav-active); }
.nav-button:hover { color:var(--ink); background:var(--hover-bg); }
.sidebar-note { line-height:1.65; }
.sidebar-note p { font-size:12px; margin-left:0; }
.profile { min-width:0; font-size:13px; }
.profile>div { min-width:0; }
.profile strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile small { font-size:11px; }
.avatar { background:var(--nav-active); color:var(--accent); flex-shrink:0; }
.primary { background:var(--primary); color:var(--on-primary); min-height:44px; border-radius:var(--radius-small); font-size:13px; font-weight:600; padding:11px 18px; }
.primary:hover { background:var(--primary-hover); }
.secondary,.subtle { color:var(--ink); background:var(--subtle-bg); min-height:40px; border-color:var(--line); border-radius:var(--radius-small); font-size:12px; padding:9px 13px; }
.secondary:hover,.subtle:hover { background:var(--hover-bg); border-color:var(--selected-line); }
.icon-button { width:36px; height:36px; border-radius:var(--radius-small); }
.pill { font-size:11px; background:var(--soft); color:var(--accent); }
.stats { gap:12px; margin-bottom:22px; }
.stat { min-width:0; border-radius:var(--radius); padding:16px 18px; gap:12px; box-shadow:var(--shadow-card); }
.stat-icon { width:38px; height:38px; border-radius:var(--radius-small); background:var(--event-soft); color:var(--event-ink); }
.stat:nth-child(2) .stat-icon { background:var(--task-soft); color:var(--task-ink); }
.stat:nth-child(3) .stat-icon { background:var(--note-soft); color:var(--note-ink); }
.stat strong { font-size:24px; font-weight:600; }
.stat small { display:block; margin-top:4px; font-size:12px; line-height:1.4; }
.content-card { box-shadow:var(--shadow-card); }
.toolbar { padding-top:20px; padding-bottom:14px; }
.month-controls h2 { font-size:20px; font-weight:600; line-height:1.35; }
.segmented { background:var(--subtle-bg); border-radius:var(--radius-small); padding:3px; }
.segmented button { min-height:44px; padding:6px 11px; font-size:12px; border-radius:calc(var(--radius-small) - 3px); }
.segmented button.active { color:var(--ink); background:var(--paper); }
.filterbar { padding-bottom:14px; }
.filters button { min-height:44px; font-size:11px; padding:7px 9px; color:var(--muted); border-radius:var(--radius-small); }
.filters button.active { color:var(--accent); background:var(--soft); }
.filters button:hover { background:var(--hover-bg); }
.search { max-width:190px; min-width:0; color:var(--muted); }
.search input { font-size:12px; min-height:36px; }
.scopebar { gap:10px; padding-bottom:16px; }
.scope-filters { border-radius:var(--radius-small); }
.scope-filters button { min-height:44px; font-size:12px; border-radius:calc(var(--radius-small) - 3px); }
.scope-filters button.active { background:var(--primary); color:var(--on-primary); font-weight:600; }
.scope-filters button:not(.active):hover { background:var(--hover-bg); }
.scope-help { font-size:11px; line-height:1.5; }

/* Calendar colors always use the record owner's color over the active surface. */
.weekdays { font-size:10px; font-weight:600; letter-spacing:.8px; background:var(--subtle-bg); color:var(--muted); padding:12px 0; }
.day-cell { padding:9px 7px; min-height:112px; background:var(--paper); transition:background .14s; }
.day-cell.other { background:var(--other-bg); color:var(--faint); }
.day-cell:hover { background:var(--hover-bg); }
.day-cell.selected { background:var(--selected-bg); box-shadow:inset 0 0 0 1px var(--selected-line); }
.day-number { width:26px; height:26px; margin-bottom:5px; font-size:12px; font-weight:550; }
.day-cell.today .day-number { background:var(--primary); color:var(--on-primary); }
.event-chip,.event-chip.task,.event-chip.note { min-height:25px; padding:5px 5px; font-size:10px; line-height:1.35; color:var(--ink); background:color-mix(in srgb,var(--owner-color,var(--accent)) 13%,var(--paper)); border-left-color:var(--owner-color,var(--accent)); border-radius:calc(var(--radius-small) / 2); }
.event-chip:hover { background:color-mix(in srgb,var(--owner-color,var(--accent)) 22%,var(--paper)); }
.event-chip .icon { width:11px; height:11px; }
.event-chip.done { opacity:.64; }
.more { font-size:10px; line-height:1.5; }
.calendar-footer { font-size:10px; padding:15px 20px; color:var(--muted); border-top:1px solid var(--line); }
.owner-legend { gap:10px 14px; }
.day-panel { background:var(--panel-bg); border:1px solid var(--line); padding:24px 18px; }
.day-panel h2 { font-family:var(--heading-font); font-size:25px; font-weight:var(--heading-weight); line-height:1.3; }
.day-panel .eyebrow { font-size:10px; }
.muted { font-size:12px; line-height:1.7; }
.day-item { border-color:var(--line); border-left-color:var(--owner-color,var(--accent)); border-radius:var(--radius-small); padding:13px 12px; }
.day-item:hover { background:var(--subtle-bg); }
.day-item strong { font-size:13px; font-weight:550; }
.day-item .item-kind { font-size:10px; }
.day-item small { font-size:11px; }
.day-add { border-color:var(--selected-line); color:var(--accent); min-height:44px; font-size:12px; border-radius:var(--radius-small); }
.day-add:hover { background:var(--soft); }
.day-quote { font-size:17px; color:var(--muted); padding-top:36px; }
.day-quote span { color:var(--faint); }
.day-quote .icon { width:38px; height:38px; stroke-width:1.2; }
.app-footer { font-size:10px; color:var(--muted); gap:12px; }
.list-item { padding:16px 12px; margin-top:8px; border:1px solid var(--line); border-left:3px solid var(--owner-color,var(--accent)); border-radius:var(--radius-small); background:var(--paper); }
.list-item:hover { background:var(--subtle-bg); }
.list-item strong { font-size:14px; line-height:1.5; }
.list-item small { font-size:12px; }
.empty { font-size:13px; color:var(--muted); }
.badge { font-size:10px; border-radius:calc(var(--radius-small) / 2); padding:4px 8px; background:var(--success-soft); color:var(--success-ink); }
.badge.failed { background:var(--error-soft); color:var(--error); }

/* Forms, account screens and every modal inherit the same theme. */
label { color:var(--label); font-size:12px; line-height:1.5; }
label>input:not([type=checkbox]),label>textarea,label>select,.time-control>input,.comment-form input { background-color:var(--field-bg); color:var(--ink); border-color:var(--field-line); border-radius:var(--radius-input); font-size:14px; min-height:44px; }
input[type=checkbox] { background-color:var(--paper); border-color:var(--check-line); border-radius:5px; }
input[type=checkbox]:checked { background-color:var(--primary); border-color:var(--primary); }
input[type=checkbox]:focus-visible { outline-color:var(--focus-ring); }
.quiet-hours legend { color:var(--label); font-size:12px; }
.time-placeholder,.time-icon { color:var(--muted); }
.check-label { min-height:36px; gap:8px; }
.help { display:inline-block; font-size:11px; line-height:1.55; }
.alert-options { gap:8px; }
.alert-options label { padding:9px 10px; min-height:38px; font-size:11px; gap:6px; border-radius:var(--radius-small); }
.error { color:var(--error); font-size:13px; }
dialog { background:var(--paper); color:var(--ink); border-radius:var(--radius-dialog); max-height:calc(100dvh - 32px); box-shadow:0 30px 90px var(--shadow-dialog); }
dialog::backdrop { background:var(--backdrop); }
.dialog-header { padding:20px 24px; }
.dialog-header h2 { font-size:23px; font-weight:600; line-height:1.3; }
.form-fields { max-height:calc(100dvh - 215px); }
.dialog-footer { background:var(--paper); }
.detail-body h2 { font-family:var(--heading-font); font-weight:var(--heading-weight); }
.detail-meta { font-size:12px; gap:8px 12px; }
.detail-notes { font-size:14px; }
.detail-section h3 { font-size:13px; }
.check-row { min-height:38px; font-size:13px; }
.comment { font-size:13px; }
.comment small,.history-row { font-size:11px; }
.more-menu { background:var(--paper); }
.more-links button { border-radius:var(--radius-small); }
.more-links .icon { color:var(--accent); }
.more-profile { background:var(--subtle-bg); }
.toast { background:var(--toast-bg); color:var(--on-primary); box-shadow:0 5px 30px var(--shadow-toast); border-radius:var(--radius-small); font-size:13px; }
.login-screen { background:radial-gradient(ellipse at top right,var(--login-glow),transparent 60%),var(--bg); min-height:100dvh; padding:32px 0; }
.login-card { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-dialog); box-shadow:var(--shadow-card); width:430px; padding:32px; }
.login-card h1 { font-family:var(--heading-font); font-size:36px; font-weight:var(--heading-weight); letter-spacing:var(--heading-spacing); }
.login-card p { line-height:1.7; }

/* Settings groups reduce visual noise and keep account tools discoverable. */
.settings-view,.deliveries-view { padding:0 24px 24px; }
.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:start; }
.settings-personal-group,.settings-admin-group { display:contents; }
.settings-grid .appearance-card { grid-column:1 / -1; }
.settings-grid>.settings-admin-group>h3 { grid-column:1 / -1; margin:8px 0 0; }
.settings-grid .settings-section { margin-top:0; }
.settings-grid .settings-section[open] { align-self:start; }
.settings-view h3 { font-size:17px; font-weight:600; line-height:1.4; margin:22px 0 12px; }
.settings-view form { max-width:none; }
.personal-card { max-width:none; padding-bottom:20px; }
.personal-card p { font-size:13px; line-height:1.7; }
.personal-card form { max-width:620px; gap:14px; }
.personal-card form .form-row { margin-bottom:0; }
.personal-card h3:first-child { margin-top:0; }
.personal-card .setting-note { font-size:12px; padding:13px 15px; }
.personal-card .detail-actions { gap:9px; margin:16px 0; }
.setting-note { background:var(--soft); color:var(--label); border-radius:var(--radius-small); line-height:1.7; }
.settings-section { display:block; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper); margin-top:14px; overflow:hidden; }
.settings-section-summary { display:flex; align-items:center; gap:12px; cursor:pointer; list-style:none; padding:18px 20px; min-height:68px; color:var(--ink); font-size:15px; font-weight:600; }
.settings-section-summary::-webkit-details-marker { display:none; }
.settings-section-summary::marker { content:""; }
.settings-section-summary::after { content:""; width:8px; height:8px; border-right:1.5px solid var(--muted); border-bottom:1.5px solid var(--muted); transform:rotate(45deg); margin-left:auto; flex-shrink:0; transition:transform .16s; }
.settings-section[open]>.settings-section-summary::after { transform:rotate(225deg); }
.settings-section-summary:has(>.icon)::after { display:none; }
.settings-section-summary>.icon:last-child { margin-left:auto; width:18px; height:18px; color:var(--muted); transition:transform .16s; }
.settings-section[open]>.settings-section-summary>.icon:last-child { transform:rotate(180deg); }
.settings-section-summary:hover { background:var(--subtle-bg); }
.settings-section-summary strong { display:block; font-weight:600; font-size:15px; }
.settings-section-summary small { display:block; font-size:12px; line-height:1.5; color:var(--muted); font-weight:400; margin-top:3px; }
.settings-section-summary .icon { color:var(--accent); }
.settings-section[open]>.settings-section-summary { border-bottom:1px solid var(--line); background:var(--subtle-bg); }
.settings-section-body { padding:20px; }
.settings-section>.personal-card { margin:20px; }
.settings-section-body>.personal-card { padding:0 0 20px; margin-bottom:20px; }
.settings-section-body>.personal-card:last-child,.settings-section>.personal-card:last-child { border-bottom:0; margin-bottom:0; padding-bottom:0; }
.settings-section #settings-form { max-width:620px; }
.personal-devices { margin-top:14px; }
.personal-devices summary { color:var(--accent); font-weight:500; }
.personal-device strong { font-size:13px; font-weight:600; }
.personal-device small { font-size:12px; }
.feed-link input { color:var(--ink); }
.topic-list { max-width:none; }
.topic-row { padding:13px 0; }
.delivery { font-size:12px; }
.delivery strong { font-size:13px; }

/* Three independent sketches provide an honest preview of colors and shape. */
.appearance-card { padding:0 0 22px; }
.theme-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0; }
.theme-option { display:block; text-align:left; cursor:pointer; min-width:0; padding:10px; border:1.5px solid var(--line); border-radius:14px; background:var(--paper); position:relative; }
.theme-option.active { border-color:var(--accent); box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 12%,transparent); }
.theme-option.previewing { outline:2px dashed var(--accent); outline-offset:3px; }
.theme-option-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:7px; margin:12px 2px 5px; color:var(--ink); }
.theme-option-heading strong { display:block; font-size:13px; line-height:1.35; font-weight:600; }
.theme-option-heading small { display:block; font-size:11px; color:var(--muted); line-height:1.45; margin-top:4px; }
.theme-option-heading input { flex-shrink:0; accent-color:var(--primary); margin:2px 0 0; }
.theme-miniature { display:grid; grid-template-columns:31px minmax(0,1fr); height:139px; border:1px solid var(--line); border-radius:var(--radius-small); background:var(--bg); color:var(--ink); overflow:hidden; user-select:none; pointer-events:none; }
.theme-mini-sidebar { background:var(--sidebar-bg); padding:11px 5px; border-right:1px solid var(--line); }
.theme-mini-sidebar i { display:block; height:4px; border-radius:2px; margin:8px 0; background:var(--faint); opacity:.4; }
.theme-mini-sidebar i:first-child { width:14px; height:14px; border-radius:calc(var(--radius-small) / 2); background:var(--primary); opacity:1; margin:0 0 15px; }
.theme-mini-sidebar i:nth-child(2) { background:var(--accent); opacity:.8; height:8px; margin-inline:-2px; }
.theme-mini-main { min-width:0; padding:10px 7px; }
.theme-mini-top { display:flex; align-items:center; justify-content:space-between; gap:8px; height:10px; margin-bottom:7px; }
.theme-mini-top span { width:54%; height:5px; background:var(--ink); opacity:.8; border-radius:3px; }
.theme-mini-top i,.theme-mini-top span:last-child { width:18px; height:8px; background:var(--primary); border-radius:calc(var(--radius-small) / 2); opacity:1; }
.theme-mini-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); grid-template-rows:repeat(4,17px); gap:2px; background:var(--paper); border:1px solid var(--line); border-radius:calc(var(--radius-small) / 2); padding:3px; }
.theme-mini-calendar span { position:relative; border-radius:2px; background:var(--subtle-bg); min-width:0; }
.theme-mini-calendar span::before { content:""; position:absolute; width:3px; height:3px; left:2px; top:3px; border-radius:50%; background:var(--faint); opacity:.55; }
.theme-mini-calendar span:nth-child(10),.theme-mini-calendar span:nth-child(17) { background:var(--selected-bg); }
.theme-mini-calendar span:nth-child(17)::before { background:var(--primary); opacity:1; width:6px; height:6px; top:1px; left:1px; }
.theme-mini-calendar span:nth-child(8)::after,.theme-mini-calendar span:nth-child(12)::after,.theme-mini-calendar span:nth-child(17)::after,.theme-mini-calendar span:nth-child(23)::after { content:""; position:absolute; height:4px; left:1px; right:1px; top:10px; border-radius:1px; background:var(--accent); opacity:.72; }
.theme-mini-calendar span:nth-child(12)::after { background:var(--task); }
.theme-mini-calendar span:nth-child(23)::after { background:var(--note); }
.theme-swatch { display:flex; gap:4px; margin:8px 2px 0; }
.theme-swatch i { width:10px; height:10px; border-radius:50%; background:var(--primary); border:1px solid color-mix(in srgb,var(--ink) 10%,transparent); }
.theme-swatch i:nth-child(2) { background:var(--sidebar-bg); }
.theme-swatch i:nth-child(3) { background:var(--bg); }
.theme-preview-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:11px; }
.theme-preview-actions button { flex:1; padding:8px 7px; min-height:40px; font-size:11px; }
.theme-option [data-preview-theme-button] { background:var(--subtle-bg); color:var(--ink); border:1px solid var(--line); border-radius:var(--radius-small); }
.theme-option [data-preview-theme-button]:hover { background:var(--hover-bg); }
.theme-preview-bar { position:sticky; top:12px; z-index:20; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 16px; padding:12px 16px; margin:16px 0; border:1px solid var(--selected-line); background:var(--paper); border-radius:var(--radius-small); box-shadow:0 5px 24px var(--shadow-small); color:var(--ink); }
.theme-preview-bar span { flex:1; min-width:150px; font-size:12px; line-height:1.5; }
.theme-preview-bar strong { font-weight:600; color:var(--accent); }
.theme-preview-bar button { min-height:40px; font-size:12px; }
.theme-preview-bar .primary { padding:9px 14px; }
.theme-preview-bar .secondary { padding:9px 12px; }

/* The same layout adapts to a phone; no theme needs separate mobile markup. */
@media(min-width:1600px) {
 .day-cell { min-height:132px; }
 .event-chip { font-size:11px; }
}
@media(max-width:1200px) {
 .stat { padding:14px 13px; gap:9px; }
 .search { max-width:145px; }
 .month-controls h2 { font-size:18px; }
 .day-cell { padding:7px 4px; min-height:110px; }
 .event-chip { font-size:9px; }
 .filters button { padding-inline:7px; }
}
@media(max-width:980px) {
 .day-panel { padding:22px; }
 .day-panel h2 { font-size:24px; }
 .calendar-footer { font-size:10px; }
 .search { max-width:170px; }
}
@media(max-width:760px) {
 .theme-options { gap:8px; }
 .theme-option { padding:8px; }
 .theme-miniature { grid-template-columns:25px minmax(0,1fr); height:122px; }
 .theme-mini-main { padding:8px 4px; }
 .theme-mini-calendar { grid-template-rows:repeat(4,15px); gap:1px; padding:2px; }
 .theme-mini-sidebar { padding-inline:4px; }
 .theme-option-heading { flex-wrap:wrap; }
}
@media(max-width:640px), (max-width:980px) and (pointer:coarse) {
 .main { padding-inline:max(14px,env(safe-area-inset-left,0px)) max(14px,env(safe-area-inset-right,0px)); padding-bottom:calc(98px + env(safe-area-inset-bottom,0px)); }
 .topbar { height:calc(54px + env(safe-area-inset-top,0px)); font-size:12px; }
 .timezone { font-size:10px; }
 .breadcrumb span { margin-inline:8px; }
 .page-heading { margin:20px 0 18px; align-items:flex-start; gap:10px; }
 .page-heading h1 { font-size:29px; line-height:1.17; margin:8px 0; }
 .page-heading p { font-size:12px; line-height:1.65; max-width:270px; }
 .page-heading .eyebrow { font-size:9px; letter-spacing:1.3px; }
 .page-heading .primary { min-height:44px; font-size:12px; padding:10px 12px; margin-top:7px; }
 .stats { gap:7px; margin-bottom:17px; }
 .stat { border-radius:calc(var(--radius) - 5px); padding:12px 9px; gap:6px; grid-template-columns:26px minmax(0,1fr); }
 .stat-icon { width:26px; height:26px; border-radius:7px; }
 .stat-icon .icon { width:17px; height:17px; }
 .stat strong { font-size:21px; }
 .stat small { font-size:11px; line-height:1.4; margin-top:0; }
 .toolbar { gap:10px; padding:14px 11px 10px; }
 .month-controls { width:100%; flex-wrap:wrap; gap:3px; }
 .settings-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
 .month-controls h2 { flex:1; min-width:130px; font-size:18px; margin-right:3px; white-space:nowrap; }
 .month-controls .icon-button { width:44px; height:44px; flex-shrink:0; }
 .month-controls .subtle { font-size:11px; padding-inline:8px; min-height:44px; }
 .segmented { width:100%; }
 .segmented button { flex:1; min-height:44px; font-size:12px; }
 .filterbar { padding:0 11px 12px; }
 .filters { gap:2px; }
 .filters button { min-height:44px; font-size:11px; padding:8px 5px; }
 .filters .dot { width:5px; height:5px; margin-right:3px; }
 .search { max-width:100%; margin-top:6px; }
 .search input { font-size:16px; min-height:40px; }
 .scopebar { padding:0 11px 13px; gap:7px; }
 .scope-filters { width:100%; }
 .scope-filters button { min-height:44px; font-size:12px; padding-inline:8px; }
 .scope-help { font-size:11px; }
 .weekdays { font-size:10px; letter-spacing:.5px; padding:10px 0; }
 .day-cell { min-height:91px; padding:5px 2px; }
 .day-number { width:25px; height:25px; font-size:12px; margin-bottom:4px; }
 .event-chip,.event-chip.task,.event-chip.note { min-height:22px; padding:4px 2px; font-size:9px; border-left-width:2px; line-height:1.4; }
 .event-chip .icon { width:10px; height:10px; margin-right:2px; }
 .more { font-size:9px; }
 .calendar-footer { padding:12px 10px; font-size:10px; }
 .calendar-footer .dot { margin-left:0; }
 .owner-legend { gap:7px 11px; }
 .day-panel { padding:20px 16px; }
 .day-panel h2 { font-size:24px; }
 .day-item { padding:13px; }
 .day-item strong { font-size:14px; }
 .day-item small { font-size:12px; }
 .day-item .item-kind { font-size:11px; }
 .list-view { padding:0 12px 15px; }
 .list-item { align-items:flex-start; gap:9px; padding:13px 11px; }
 .list-item strong { font-size:14px; }
 .list-item small { font-size:12px; line-height:1.6; }
 .settings-view,.deliveries-view { padding:0 14px 18px; }
 .settings-view h3 { font-size:17px; margin-top:19px; }
 .personal-card p { font-size:13px; line-height:1.7; }
 .settings-section { margin-top:12px; border-radius:calc(var(--radius) - 5px); }
 .settings-section-summary { min-height:68px; padding:15px 14px; gap:10px; }
 .settings-section-summary strong { font-size:14px; }
 .settings-section-summary small { font-size:12px; }
 .settings-section-body { padding:16px 14px; }
 .settings-section>.personal-card { margin:16px 14px; }
 .personal-card form { gap:13px; }
 .personal-card .detail-actions { margin:14px 0; }
 .personal-device { align-items:flex-start; }
 .personal-device .secondary { padding-inline:9px; }
 label { font-size:12px; }
 label>input:not([type=checkbox]),label>textarea,label>select,.time-control>input,.comment-form input { font-size:16px; min-height:46px; }
 .time-placeholder { font-size:16px; }
 .check-label { min-height:44px; }
 .primary,.secondary,.subtle { min-height:44px; font-size:13px; }
 .alert-options label { font-size:12px; min-height:44px; }
 .help { display:block; margin:5px 0 0; }
 .form-row { gap:10px; }
 .form-fields { padding:17px; }
 .dialog-header,.dialog-footer { padding:17px; }
 .dialog-header h2 { font-size:22px; }
 .detail-body { padding:20px; }
 .detail-actions { gap:8px; }
 .check-row { min-height:44px; }
 .icon-button { width:44px; height:44px; }
 .more-menu { border-radius:var(--radius-dialog) var(--radius-dialog) 0 0; }
 .more-links { padding:8px 12px; }
 .more-links button { min-height:72px; }
 .more-profile { padding:18px 24px; }
 .mobile-nav { background:var(--nav-bg); border-color:var(--line); gap:3px; }
 .mobile-nav button { color:var(--muted); border-radius:var(--radius-small); }
 .mobile-nav button.active { background:var(--nav-active); color:var(--accent); }
 .mobile-nav small { font-size:11px; }
 .login-card { padding:27px; max-width:calc(100vw - 28px); }
 .login-card h1 { font-size:34px; }
 .theme-option { padding:7px; border-radius:12px; }
 .theme-miniature { grid-template-columns:22px minmax(0,1fr); height:116px; }
 .theme-mini-main { padding:8px 4px; }
 .theme-mini-sidebar { padding:9px 3px; }
 .theme-mini-top { gap:3px; margin-bottom:6px; }
 .theme-mini-calendar { grid-template-rows:repeat(4,15px); }
 .theme-option-heading { margin:10px 0 4px; gap:5px; }
 .theme-option-heading strong { font-size:12px; }
 .theme-option-heading small { font-size:10px; }
 .theme-preview-actions { margin-top:8px; gap:6px; }
 .theme-preview-actions button { flex-basis:100%; min-height:44px; font-size:11px; padding-inline:4px; }
 .theme-swatch { gap:3px; }
 .theme-swatch i { width:9px; height:9px; }
 .theme-preview-bar { top:8px; padding:11px 12px; gap:9px; margin:12px 0; }
 .theme-preview-bar span { flex-basis:100%; }
 .theme-preview-bar button { flex:1; min-height:44px; padding-inline:8px; }
}
@media(max-width:360px) {
 .page-heading h1 { font-size:26px; }
 .page-heading .primary { padding-inline:9px; font-size:11px; }
 .stat { padding:11px 7px; grid-template-columns:22px minmax(0,1fr); }
 .stat-icon { width:22px; height:24px; }
 .stat strong { font-size:20px; }
 .stat small { font-size:10px; }
 .month-controls h2 { font-size:17px; }
 .month-controls h2 { flex-basis:100%; margin-bottom:5px; }
 .month-controls .icon-button { width:44px; }
 .month-controls .subtle { margin-left:auto; }
 .month-controls .subtle { font-size:10px; padding-inline:7px; }
 .filters button { font-size:10px; padding-inline:4px; }
 .scope-filters button { padding-inline:5px; font-size:11px; }
 .event-chip .icon { display:none; }
 .theme-options { grid-template-columns:1fr; gap:10px; }
 .theme-option { display:grid; grid-template-columns:114px minmax(0,1fr); gap:0 12px; padding:10px; }
 .theme-miniature { grid-row:1 / 4; height:116px; }
 .theme-option-heading { margin-top:3px; }
 .theme-option-heading strong { font-size:13px; }
 .theme-option-heading small { font-size:11px; }
 .theme-swatch { margin-top:4px; }
 .theme-preview-actions { margin-top:8px; }
 .theme-preview-actions button { min-height:40px; font-size:12px; }
}
@media(max-width:390px) {
 .form-row { grid-template-columns:minmax(0,1fr); }
 .quiet-hours .form-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(prefers-reduced-motion:reduce) {
 *,*::before,*::after { transition:none!important; scroll-behavior:auto!important; }
}

/* Theme chooser labels, banner actions and shared SVG alignment. */
.primary>.icon { width:18px; height:18px; vertical-align:-4px; margin-right:3px; }
.search .icon { width:18px; height:18px; display:block; }
.theme-option:hover { background:var(--subtle-bg); border-color:var(--selected-line); }
.theme-option-description { display:block; color:var(--muted); font-size:12px; line-height:1.55; margin:7px 2px 2px; }
.theme-mini-sidebar b { display:flex; align-items:center; justify-content:center; width:14px; height:14px; color:var(--on-primary); background:var(--primary); font:9px Georgia,serif; border-radius:calc(var(--radius-small) / 2); margin-bottom:15px; }
.theme-preview-bar>span>small { display:block; font-size:11px; color:var(--muted); }
.theme-preview-bar>span>strong { display:block; font-size:14px; }
.theme-preview-bar>.theme-preview-actions { margin:0; flex-wrap:nowrap; }
.theme-preview-bar>.theme-preview-actions button { flex:none; min-height:44px; font-size:12px; padding-inline:14px; }
@media(max-width:640px), (max-width:980px) and (pointer:coarse) {
 .theme-option-description { font-size:11px; margin:6px 0 2px; }
 .theme-preview-bar>.theme-preview-actions { width:100%; }
 .theme-preview-bar>.theme-preview-actions button { flex:1; flex-basis:0; font-size:12px; }
}

/* Compact phone overview: controls stay large while the calendar starts earlier. */
.theme-option-heading { display:block; }
.theme-option-heading strong,.theme-option-heading small { display:block; }
.theme-option-heading small { margin-top:4px; }
.theme-miniature { margin-bottom:2px; }
.filterbar .search { border:1px solid var(--field-line); border-radius:var(--radius-input); background:var(--field-bg); padding:0 9px; gap:7px; min-height:40px; }
.filterbar .search input { border:0; background:transparent; padding:0; margin:0; min-height:38px; }
.filterbar .search:focus-within { border-color:var(--accent); outline:2px solid var(--focus-ring); outline-offset:1px; }
@media(max-width:640px), (max-width:980px) and (pointer:coarse) {
 .topbar { height:calc(48px + env(safe-area-inset-top,0px)); }
 .page-heading { margin:14px 0; align-items:center; }
 .page-heading .eyebrow,.page-heading p { display:none; }
 .page-heading h1 { font-size:28px; margin:4px 0; line-height:1.2; }
 .page-heading .primary { margin-top:0; }
 .stats { margin-bottom:14px; gap:7px; }
 .stat { padding:10px 8px; gap:4px 6px; grid-template-columns:22px minmax(0,1fr); }
 .stat-icon { width:22px; height:24px; }
 .stat-icon .icon { width:15px; height:15px; }
 .stat strong { font-size:20px; }
 .stat small { font-size:10px; line-height:1.25; }
 .toolbar { padding-top:12px; padding-bottom:8px; gap:8px; }
 .filterbar { padding-bottom:10px; }
 .filterbar .search { min-height:44px; margin-top:5px; padding-inline:9px; }
 .filterbar .search input { min-height:42px; font-size:16px; }
 .scopebar { padding-bottom:11px; }
 .scope-help { display:none; }
 .theme-option-heading strong { font-size:13px; }
 .theme-option-heading small { font-size:11px; line-height:1.4; }
}
@media(max-width:360px) {
 .page-heading h1 { font-size:26px; }
 .stat { padding-inline:7px; }
}

/* Backup settings, archive actions and restore preview use every design palette. */
.settings-section[data-settings-section="backups"] { grid-column:1 / -1; }
.backup-status { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:22px; }
.backup-status>div { padding:15px 17px; background:var(--subtle-bg); border:1px solid var(--line); border-radius:var(--radius-small); }
.backup-status small,.backup-row small { display:block; color:var(--muted); font-size:12px; line-height:1.6; }
.backup-status strong { display:block; margin-top:4px; font-size:14px; }
#backup-settings-form { max-width:700px; display:grid; gap:14px; }
#backup-settings-form>p { margin:0; }
#backup-settings-form>.primary { justify-self:start; }
#backup-settings h4 { margin:22px 0 10px; font-size:15px; }
#backup-settings p { overflow-wrap:anywhere; }
.backup-manual { padding:3px 0 16px; margin-top:20px; border-block:1px solid var(--line); }
.backup-manual .detail-actions { margin:12px 0; }
.backup-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 0; border-bottom:1px solid var(--line); }
.backup-row>div:first-child { min-width:0; }
.backup-row strong { display:block; font-size:13px; }
.backup-row small { overflow-wrap:anywhere; }
.backup-row-actions { display:flex; flex-wrap:wrap; gap:7px; flex-shrink:0; }
.backup-restore-upload { margin-top:20px; }
#backup-upload-form { display:grid; gap:12px; max-width:620px; }
#backup-upload-form button { justify-self:start; }
#backup-restore-content { padding:0 24px 20px; overflow-wrap:anywhere; }
#backup-restore-content label { display:grid; gap:8px; margin-top:18px; }
.backup-restore-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:18px 0; }
.backup-restore-counts>span { padding:12px; border:1px solid var(--line); border-radius:var(--radius-small); background:var(--soft); font-size:12px; }
.backup-restore-counts strong { display:block; font-size:22px; }
#backup-settings .form-feedback { margin:8px 0; }
@media(max-width:640px), (max-width:980px) and (pointer:coarse) {
 .backup-row { align-items:flex-start; flex-direction:column; }
 .backup-row-actions { width:100%; gap:6px; }
 .backup-row-actions button { flex:1; padding-inline:6px; font-size:12px; }
 .backup-status { gap:8px; }
 .backup-status>div { padding:12px 10px; }
 .backup-status strong { font-size:12px; }
 #backup-restore-content { padding-inline:18px; }
 .backup-restore-counts { gap:7px; }
 .backup-restore-counts>span { padding:10px 7px; font-size:11px; }
 .backup-manual .detail-actions button { flex:1; flex-basis:140px; }
 #backup-settings-form>.primary,#backup-upload-form>button { width:100%; }
}

/* Distinct visual language: paper planner, precise dashboard, editorial garden. */
:root,
html[data-theme="classic"],
[data-preview-theme="classic"] {
 --paper:#fffef8;
 --subtle-bg:#f9faf1;
 --sidebar-bg:#ecefe2;
 --field-bg:#fcfdf7;
 --mono-font:ui-monospace,"SFMono-Regular",Consolas,"Liberation Mono",monospace;
 --motion-ease:cubic-bezier(.2,.7,.2,1);
 --paper-rule:color-mix(in srgb,var(--selected-line) 16%,transparent);
 --detail-ornament:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22180%22%20height%3D%22160%22%20viewBox%3D%220%200%20180%20160%22%20fill%3D%22none%22%20stroke%3D%22%23b48297%22%20stroke-width%3D%221.2%22%3E%3Cpath%20d%3D%22M36%20145C58%2096%2095%2076%20133%2021%22%2F%3E%3Cpath%20d%3D%22M71%2096C31%2093%2027%2065%2038%2048C61%2052%2075%2072%2071%2096ZM93%2073C86%2040%20104%2020%20125%2020C135%2046%20119%2063%2093%2073ZM53%20120C39%20105%2015%20111%2012%20130C34%20147%2050%20134%2053%20120ZM117%2046C148%2042%20163%2024%20162%208C136%205%20120%2023%20117%2046Z%22%2F%3E%3Cpath%20d%3D%22M66%20101C100%2098%20111%20112%20111%20131C86%20133%2070%20122%2066%20101ZM99%2067C127%2064%20146%2076%20147%2094C123%20104%20105%2084%2099%2067Z%22%2F%3E%3C%2Fsvg%3E");
}
html[data-theme="classic"] .content-card {
 border-radius:20px 20px 16px 16px;
 box-shadow:0 3px 0 color-mix(in srgb,var(--line) 60%,var(--paper)),0 12px 32px var(--shadow-small);
}
html[data-theme="classic"] .month-controls h2 {
 font-family:Georgia,"Times New Roman",serif;
 font-weight:500;
 font-size:23px;
 letter-spacing:-.5px;
}
html[data-theme="classic"] .toolbar {
 background:linear-gradient(180deg,var(--paper),var(--subtle-bg));
}
html[data-theme="classic"] .weekdays {
 border-bottom:2px solid var(--line);
 color:var(--label);
}
html[data-theme="classic"] .day-cell {
 background-image:linear-gradient(to bottom,transparent calc(100% - 13px),var(--paper-rule) calc(100% - 13px),var(--paper-rule) calc(100% - 12px),transparent calc(100% - 12px));
}
html[data-theme="classic"] .day-cell.selected {
 box-shadow:inset 0 -3px 0 var(--primary),inset 0 0 0 1px var(--selected-line);
}
html[data-theme="classic"] .day-cell.today .day-number {
 box-shadow:0 0 0 3px var(--paper),0 0 0 4px var(--selected-line);
}
html[data-theme="classic"] .event-chip {
 border-radius:3px 7px 7px 3px;
 box-shadow:0 1px 1px var(--shadow-small);
}
html[data-theme="classic"] .nav-button.active {
 box-shadow:inset 3px 0 0 var(--primary);
}
html[data-theme="classic"] .day-panel {
 border-top:4px solid var(--selected-line);
 background-image:repeating-linear-gradient(0deg,transparent,transparent 31px,var(--paper-rule) 31px,var(--paper-rule) 32px);
}
html[data-theme="classic"] .day-item {
 box-shadow:0 2px 0 var(--shadow-small);
}
html[data-theme="classic"] .list-item {
 border-radius:3px 12px 12px 3px;
}
html[data-theme="classic"] .settings-section[open] {
 box-shadow:0 3px 0 var(--shadow-small);
}

/* Graphite uses a shared status strip, indexed surfaces and a drawing grid. */
html[data-theme="graphite"] body {
 background-image:linear-gradient(color-mix(in srgb,var(--line) 22%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--line) 22%,transparent) 1px,transparent 1px);
 background-size:56px 56px;
}
html[data-theme="graphite"] .brand-mark {
 border-radius:4px;
 font-family:var(--mono-font);
 font-size:25px;
 font-weight:600;
 border:1px solid var(--selected-line);
 background:var(--subtle-bg);
 color:var(--accent);
}
html[data-theme="graphite"] .eyebrow,
html[data-theme="graphite"] .space-label,
html[data-theme="graphite"] .timezone,
html[data-theme="graphite"] .pill,
html[data-theme="graphite"] .day-number,
html[data-theme="graphite"] .stat strong,
html[data-theme="graphite"] .month-controls h2,
html[data-theme="graphite"] .day-panel h2 {
 font-family:var(--mono-font);
 font-variant-numeric:tabular-nums;
}
html[data-theme="graphite"] .page-heading h1 {
 font-size:34px;
 letter-spacing:-.9px;
 font-weight:700;
}
html[data-theme="graphite"] .sidebar {
 border-right:1px solid var(--selected-line);
}
html[data-theme="graphite"] .space-label { padding-top:14px; border-top:1px solid var(--line); }
html[data-theme="graphite"] .nav-button {
 border-radius:3px;
 border-bottom:1px solid color-mix(in srgb,var(--line) 60%,transparent);
 margin-bottom:0;
}
html[data-theme="graphite"] .nav-button.active {
 box-shadow:inset 2px 0 0 var(--accent);
 background:linear-gradient(90deg,var(--nav-active),var(--sidebar-bg));
}
html[data-theme="graphite"] .stats {
 border:1px solid var(--line);
 border-top:2px solid var(--selected-line);
 border-radius:5px;
 background:var(--paper);
 gap:0;
 overflow:hidden;
}
html[data-theme="graphite"] .stat {
 border:0;
 border-right:1px solid var(--line);
 border-radius:0;
 background:transparent;
 box-shadow:none;
}
html[data-theme="graphite"] .stat:last-child { border-right:0; }
html[data-theme="graphite"] .stat strong { font-size:28px; letter-spacing:-1px; }
html[data-theme="graphite"] .stat-icon { border:1px solid var(--line); border-radius:4px; }
html[data-theme="graphite"] .content-card {
 border-radius:7px;
 border-top:2px solid var(--selected-line);
 box-shadow:0 10px 28px var(--shadow-small);
}
html[data-theme="graphite"] .toolbar {
 border-bottom:1px solid var(--line);
 margin-bottom:12px;
 background:var(--subtle-bg);
}
html[data-theme="graphite"] .month-controls h2 { font-size:19px; letter-spacing:-.7px; }
html[data-theme="graphite"] .segmented,
html[data-theme="graphite"] .scope-filters {
 border-radius:4px;
 background:var(--field-bg);
}
html[data-theme="graphite"] .segmented button,
html[data-theme="graphite"] .scope-filters button { border-radius:3px; }
html[data-theme="graphite"] .weekdays {
 font-family:var(--mono-font);
 letter-spacing:1px;
 font-size:11px;
 border-top:2px solid var(--line);
}
html[data-theme="graphite"] .day-cell { position:relative; }
html[data-theme="graphite"] .day-cell.selected {
 box-shadow:inset 0 0 0 1px var(--accent);
 background:linear-gradient(135deg,var(--selected-bg),var(--paper));
}
html[data-theme="graphite"] .day-cell.selected::after {
 content:"";
 position:absolute;
 right:3px;
 top:3px;
 width:11px;
 height:11px;
 border-top:2px solid var(--accent);
 border-right:2px solid var(--accent);
 pointer-events:none;
}
html[data-theme="graphite"] .day-number { border-radius:3px; }
html[data-theme="graphite"] .day-cell.today .day-number {
 color:var(--accent);
 background:var(--field-bg);
 border:1px solid var(--accent);
}
html[data-theme="graphite"] .event-chip,
html[data-theme="graphite"] .event-chip.task,
html[data-theme="graphite"] .event-chip.note {
 border-radius:2px;
 background:color-mix(in srgb,var(--owner-color,var(--accent)) 16%,var(--field-bg));
}
html[data-theme="graphite"] .day-panel {
 border-radius:7px;
 border-top:2px solid var(--accent);
 background-image:linear-gradient(color-mix(in srgb,var(--line) 12%,transparent) 1px,transparent 1px);
 background-size:100% 24px;
}
html[data-theme="graphite"] .day-panel h2 { font-size:22px; }
html[data-theme="graphite"] .day-item,
html[data-theme="graphite"] .list-item,
html[data-theme="graphite"] .settings-section { border-radius:5px; }
html[data-theme="graphite"] .day-quote {
 font:12px/1.8 var(--mono-font);
 padding-top:28px;
}
html[data-theme="graphite"] .day-quote span { display:none; }
html[data-theme="graphite"] .settings-section-summary {
 font-family:var(--mono-font);
}
html[data-theme="graphite"] .settings-section-summary small { font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
html[data-theme="graphite"] .dialog-header {
 background:var(--subtle-bg);
 border-top:2px solid var(--selected-line);
}
html[data-theme="graphite"] .dialog-header .eyebrow { color:var(--accent); }
html[data-theme="graphite"] .login-card {
 border-radius:8px;
 border-top:3px solid var(--selected-line);
}
html[data-theme="graphite"] .login-card .eyebrow { font-family:var(--mono-font); }

/* Rose has an editorial hierarchy and separate, softly outlined day cards. */
html[data-theme="rose"] body {
 background-image:radial-gradient(ellipse at 85% 0,color-mix(in srgb,var(--soft) 85%,transparent),transparent 55%);
}
html[data-theme="rose"] .sidebar {
 inset:18px auto 18px 18px;
 width:208px;
 border:1px solid var(--line);
 border-radius:28px;
 background:var(--paper);
 box-shadow:0 10px 32px var(--shadow-small);
}
html[data-theme="rose"] .brand { font-family:Georgia,"Times New Roman",serif; font-size:28px; font-weight:500; }
html[data-theme="rose"] .brand-sub { font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
html[data-theme="rose"] .brand-mark { border-radius:50% 50% 50% 12px; }
html[data-theme="rose"] .nav-button { border-radius:18px; }
html[data-theme="rose"] .nav-button.active { background:var(--soft); box-shadow:inset 0 0 0 1px var(--selected-line); }
html[data-theme="rose"] .page-heading { position:relative; isolation:isolate; }
html[data-theme="rose"] .page-heading::after {
 content:"";
 position:absolute;
 width:150px;
 height:125px;
 right:145px;
 bottom:-6px;
 background-image:var(--detail-ornament);
 background-size:contain;
 background-repeat:no-repeat;
 opacity:.24;
 z-index:-1;
 pointer-events:none;
}
html[data-theme="rose"] .page-heading h1 {
 font-size:45px;
 font-style:italic;
 font-weight:400;
 line-height:1.15;
 letter-spacing:-1.1px;
}
html[data-theme="rose"] .page-heading .eyebrow {
 display:flex;
 align-items:center;
 gap:9px;
}
html[data-theme="rose"] .page-heading .eyebrow::before {
 content:"";
 width:24px;
 height:1px;
 background:var(--selected-line);
}
html[data-theme="rose"] .stat {
 border-radius:20px 20px 20px 7px;
 background:linear-gradient(145deg,var(--paper),var(--subtle-bg));
}
html[data-theme="rose"] .stat strong { font-family:Georgia,"Times New Roman",serif; font-size:32px; font-weight:400; }
html[data-theme="rose"] .stat-icon { border-radius:50%; }
html[data-theme="rose"] .content-card {
 border-radius:28px;
 box-shadow:0 14px 38px var(--shadow-small);
}
html[data-theme="rose"] .toolbar { border-bottom:1px solid var(--line); margin:0 18px 15px; padding-inline:0; }
html[data-theme="rose"] .month-controls h2 {
 font-family:Georgia,"Times New Roman",serif;
 font-size:24px;
 font-style:italic;
 font-weight:400;
}
html[data-theme="rose"] .segmented,
html[data-theme="rose"] .scope-filters { border-radius:22px; }
html[data-theme="rose"] .segmented button,
html[data-theme="rose"] .scope-filters button { border-radius:18px; }
html[data-theme="rose"] .weekdays {
 padding-inline:14px;
 border:0;
 background:transparent;
 color:var(--label);
}
html[data-theme="rose"] .calendar-grid {
 gap:7px;
 padding:0 12px 12px;
}
html[data-theme="rose"] .day-cell {
 border:1px solid var(--line);
 border-radius:10px;
 background:var(--subtle-bg);
 min-height:106px;
}
html[data-theme="rose"] .day-cell.other { background:var(--other-bg); }
html[data-theme="rose"] .day-cell.selected {
 border-color:var(--accent);
 box-shadow:0 3px 10px var(--shadow-small);
 background:var(--selected-bg);
}
html[data-theme="rose"] .day-cell.today .day-number {
 box-shadow:0 0 0 3px var(--paper);
 border-radius:50% 50% 50% 5px;
}
html[data-theme="rose"] .event-chip,
html[data-theme="rose"] .event-chip.task,
html[data-theme="rose"] .event-chip.note { border-radius:8px 8px 8px 2px; }
html[data-theme="rose"] .day-panel {
 position:relative;
 isolation:isolate;
 border-radius:28px 28px 9px 28px;
 background:linear-gradient(145deg,var(--paper),var(--panel-bg));
 overflow:hidden;
}
html[data-theme="rose"] .day-panel::after {
 content:"";
 position:absolute;
 width:130px;
 height:125px;
 right:-7px;
 bottom:16px;
 background-image:var(--detail-ornament);
 background-size:contain;
 background-repeat:no-repeat;
 opacity:.2;
 z-index:-1;
 pointer-events:none;
}
html[data-theme="rose"] .day-panel h2 { font-size:28px; font-style:italic; font-weight:400; }
html[data-theme="rose"] .day-item { border-radius:16px 16px 16px 5px; }
html[data-theme="rose"] .list-item { border-radius:18px 18px 18px 5px; }
html[data-theme="rose"] .settings-section { border-radius:20px; }
html[data-theme="rose"] .settings-section-summary strong {
 font-family:Georgia,"Times New Roman",serif;
 font-weight:400;
 font-size:18px;
}
html[data-theme="rose"] .dialog-header h2 { font-family:Georgia,"Times New Roman",serif; font-weight:400; font-size:27px; }
html[data-theme="rose"] .login-card { border-radius:32px 32px 10px 32px; }
html[data-theme="rose"] .login-card h1 { font-style:italic; }

/* Daily brief: real date, next record and task progress, never a decorative hero. */
.daily-brief {
 position:relative;
 display:grid;
 grid-template-columns:auto minmax(0,1fr) 142px auto;
 align-items:center;
 gap:14px 22px;
 margin:0 0 20px;
 padding:17px 20px;
 border:1px solid var(--line);
 border-radius:var(--radius);
 background:var(--paper);
 box-shadow:var(--shadow-card);
 min-width:0;
}
.daily-brief>* { min-width:0; }
.brief-date-block { padding-right:18px; border-right:1px solid var(--line); }
.brief-eyebrow { display:block; color:var(--muted); font-size:10px; line-height:1.4; margin-bottom:4px; }
.brief-date { display:block; font-size:26px; font-weight:600; letter-spacing:-.8px; line-height:1.2; white-space:nowrap; }
.brief-summary { min-width:0; }
.brief-state { color:var(--label); font-size:13px; line-height:1.5; margin:0; }
.brief-next { display:flex; align-items:center; gap:10px; margin-top:3px; min-width:0; }
.brief-next-label { color:var(--muted); font-size:11px; line-height:1.4; flex-shrink:0; }
.brief-next-button { display:flex; align-items:center; gap:9px; min-height:44px; padding:6px 9px; background:var(--subtle-bg); border:1px solid var(--line); border-radius:var(--radius-small); min-width:0; max-width:100%; text-align:left; }
.brief-next-button:hover { border-color:var(--selected-line); background:var(--soft); }
.brief-next-time { font-family:var(--mono-font); font-size:11px; font-variant-numeric:tabular-nums; color:var(--accent); white-space:nowrap; }
.brief-next-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; font-weight:550; }
.brief-progress { min-width:0; }
.brief-progress-meta { display:flex; justify-content:space-between; align-items:center; gap:9px; font-size:11px; color:var(--muted); margin-bottom:8px; }
.brief-progress-meta strong { color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
.brief-progress-meter { display:block; width:100%; height:5px; appearance:none; -webkit-appearance:none; border:0; border-radius:4px; background:var(--soft); overflow:hidden; color:var(--primary); accent-color:var(--primary); }
.brief-progress-meter::-webkit-progress-bar { background:var(--soft); border-radius:4px; }
.brief-progress-meter::-webkit-progress-value { background:var(--primary); border-radius:4px; transition:width .24s var(--motion-ease); }
.brief-progress-meter::-moz-progress-bar { background:var(--primary); border-radius:4px; }
.brief-actions { display:flex; gap:7px; }
.brief-actions button { min-height:44px; font-size:12px; }
.daily-brief[data-state="complete"] { border-color:var(--selected-line); }
.daily-brief[data-state="complete"] .brief-state { color:var(--success-ink); }
html[data-theme="classic"] .daily-brief {
 border-radius:5px 18px 18px 5px;
 border-left:4px solid var(--selected-line);
 background:linear-gradient(105deg,var(--subtle-bg),var(--paper) 50%);
}
html[data-theme="classic"] .brief-date { font-family:Georgia,"Times New Roman",serif; font-weight:400; }
html[data-theme="graphite"] .daily-brief {
 border-radius:5px;
 border-top:2px solid var(--accent);
 background:linear-gradient(110deg,var(--subtle-bg),var(--paper));
}
html[data-theme="graphite"] .brief-eyebrow,
html[data-theme="graphite"] .brief-date,
html[data-theme="graphite"] .brief-progress-meta { font-family:var(--mono-font); }
html[data-theme="graphite"] .brief-date { font-size:22px; letter-spacing:-1px; }
html[data-theme="graphite"] .brief-next-button { border-radius:3px; background:var(--field-bg); }
html[data-theme="graphite"] .brief-progress-meter { height:4px; border-radius:0; }
html[data-theme="rose"] .daily-brief {
 border-radius:24px 24px 24px 6px;
 background:linear-gradient(120deg,var(--paper),var(--subtle-bg));
}
html[data-theme="rose"] .brief-date { font-family:Georgia,"Times New Roman",serif; font-style:italic; font-size:29px; font-weight:400; }
html[data-theme="rose"] .brief-next-button { border-radius:16px; }

/* Counts and optional editor groups communicate useful state at a glance. */
.filters button { display:inline-flex; align-items:center; justify-content:center; gap:4px; }
.filters .dot { margin-right:0; flex-shrink:0; }
.filter-count { display:inline-flex; align-items:center; justify-content:center; min-width:16px; padding:1px 4px; border-radius:5px; background:var(--subtle-bg); color:var(--muted); font-size:10px; line-height:1.4; font-variant-numeric:tabular-nums; }
.filters button.active .filter-count { background:var(--paper); color:var(--accent); }
html[data-theme="graphite"] .filter-count { font-family:var(--mono-font); border-radius:2px; background:var(--field-bg); }
html[data-theme="rose"] .filter-count { border-radius:50%; }
.editor-group { margin:18px 0; border:1px solid var(--line); border-radius:var(--radius-small); background:var(--subtle-bg); overflow:hidden; }
.editor-group>summary { display:flex; align-items:center; gap:12px; min-height:56px; padding:12px 14px; cursor:pointer; list-style:none; color:var(--ink); }
.editor-group>summary::-webkit-details-marker { display:none; }
.editor-group>summary::marker { content:""; }
.editor-group>summary>span { min-width:0; flex:1; }
.editor-group>summary strong { display:block; font-size:13px; font-weight:600; line-height:1.4; }
.editor-group>summary small { display:block; font-size:11px; line-height:1.45; color:var(--muted); margin-top:4px; overflow-wrap:anywhere; }
.editor-group>summary .icon { width:18px; height:18px; color:var(--muted); transition:transform .18s var(--motion-ease); }
.editor-group[open]>summary { border-bottom:1px solid var(--line); }
.editor-group[open]>summary .icon { transform:rotate(180deg); }
.editor-group>summary:hover { background:var(--hover-bg); }
.editor-group-body { padding:15px 14px; }
.editor-group-body>label,.editor-group-body>.form-row { margin-bottom:14px; }
.editor-group-body>:last-child { margin-bottom:0; }
html[data-theme="graphite"] .editor-group { border-radius:4px; }
html[data-theme="graphite"] .editor-group>summary strong { font-family:var(--mono-font); }
html[data-theme="rose"] .editor-group { border-radius:16px; }
html[data-theme="rose"] .editor-group>summary strong { font-family:Georgia,"Times New Roman",serif; font-size:16px; font-weight:400; }

/* Empty states use the same visual language as real records. */
.empty {
 position:relative;
 margin:18px;
 padding:34px 20px;
 border:1px dashed var(--selected-line);
 border-radius:var(--radius);
 background:var(--subtle-bg);
}
.empty::before {
 content:"";
 display:block;
 width:34px;
 height:30px;
 margin:0 auto 15px;
 border:1px solid var(--selected-line);
 border-radius:5px;
 background:linear-gradient(var(--selected-line),var(--selected-line)) center 8px / 16px 1px no-repeat,linear-gradient(var(--selected-line),var(--selected-line)) center 16px / 10px 1px no-repeat,var(--paper);
 pointer-events:none;
}
html[data-theme="graphite"] .empty { border-style:solid; border-radius:4px; background:var(--field-bg); font-family:var(--mono-font); font-size:12px; }
html[data-theme="graphite"] .empty::before { border-radius:0; box-shadow:4px 4px 0 var(--soft); }
html[data-theme="rose"] .empty { border-style:solid; border-radius:26px 26px 26px 6px; }
html[data-theme="rose"] .empty::before { width:57px; height:48px; border:0; background:var(--detail-ornament) center / contain no-repeat; opacity:.75; }

/* Sketches show composition, not only palette. */
[data-preview-theme="classic"] .theme-mini-calendar { background-image:repeating-linear-gradient(0deg,transparent 0,transparent 16px,var(--line) 16px,var(--line) 17px); border-radius:4px; gap:1px; }
[data-preview-theme="classic"] .theme-mini-calendar span { background:color-mix(in srgb,var(--paper) 80%,transparent); }
[data-preview-theme="graphite"] .theme-mini-sidebar { background-image:linear-gradient(90deg,var(--line) 1px,transparent 1px); background-size:8px 100%; }
[data-preview-theme="graphite"] .theme-mini-calendar { border-radius:1px; gap:1px; padding:1px; }
[data-preview-theme="graphite"] .theme-mini-calendar span { border-radius:0; border:1px solid var(--line); background:var(--field-bg); }
[data-preview-theme="graphite"] .theme-mini-top { border-bottom:1px solid var(--line); padding-bottom:4px; height:12px; }
[data-preview-theme="rose"] .theme-miniature { border-radius:17px 17px 17px 3px; }
[data-preview-theme="rose"] .theme-mini-sidebar { margin:4px 0 4px 3px; padding-top:7px; border:1px solid var(--line); border-radius:9px; background:var(--paper); }
[data-preview-theme="rose"] .theme-mini-calendar { border:0; background:transparent; gap:3px; padding:0; }
[data-preview-theme="rose"] .theme-mini-calendar span { border:1px solid var(--line); border-radius:4px; background:var(--paper); }
[data-preview-theme="rose"] .theme-mini-top span:first-child { height:7px; border-radius:60% 20%; }

/* States move once in response to an action; entry motion is provided by experience.js. */
button,input,select,textarea,
.day-cell,.day-number,.day-item,.list-item,.settings-section,
.theme-miniature,.brief-next-button {
 transition:background-color .18s var(--motion-ease),border-color .18s var(--motion-ease),box-shadow .18s var(--motion-ease),transform .18s var(--motion-ease);
}
button:active:not(:disabled) { transform:translateY(1px); }
button.is-busy { cursor:wait; }
.button-busy-icon { width:16px; height:16px; display:inline-block; vertical-align:-3px; margin-right:6px; opacity:.9; }
button.is-busy>.icon:not(.button-busy-icon) { opacity:.35; }
.task-completed { border-color:var(--selected-line); background:var(--success-soft); box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 14%,transparent); }
@media(hover:hover) and (pointer:fine) {
 .primary:hover:not(:disabled) { transform:translateY(-1px); box-shadow:0 4px 11px var(--shadow-small); }
 .theme-option:hover .theme-miniature { transform:translateY(-2px); }
 .day-item:hover,.list-item:hover { transform:translateY(-1px); box-shadow:0 3px 9px var(--shadow-small); }
 .day-cell:hover .day-number { transform:translateY(-1px); }
 .nav-button:hover .icon,.mobile-nav button:hover .icon { transform:translateY(-1px); }
}
.nav-button .icon,.mobile-nav button .icon { transition:transform .18s var(--motion-ease); }
.segmented .icon { width:17px; height:17px; vertical-align:-4px; margin-right:4px; }
.search-controls { display:flex; align-items:center; gap:8px; min-width:0; }
.search-controls .search { flex:1; min-width:0; margin-top:0; }
.search-controls #today-button { white-space:nowrap; }

@media(max-width:1200px) {
 html[data-theme="rose"] .sidebar { inset:14px auto 14px 8px; width:186px; padding-inline:14px; }
 .daily-brief { grid-template-columns:auto minmax(0,1fr) 115px auto; gap:12px 15px; padding-inline:17px; }
 .brief-date-block { padding-right:14px; }
 .brief-next { gap:7px; }
 .brief-next-label { max-width:90px; }
}
@media(max-width:980px) {
 html[data-theme="rose"] .sidebar { width:171px; }
 html[data-theme="rose"] .nav-button { padding-inline:10px; gap:10px; font-size:12px; }
 .daily-brief { grid-template-columns:auto minmax(0,1fr) 108px; }
 .brief-actions { grid-column:2 / -1; justify-content:flex-end; }
 html[data-theme="rose"] .page-heading::after { right:120px; width:110px; height:105px; }
}
@media(max-width:640px), (max-width:980px) and (pointer:coarse) {
 html[data-theme="classic"] .month-controls h2 { font-size:20px; }
 html[data-theme="graphite"] .page-heading h1 { font-size:28px; }
 html[data-theme="rose"] .page-heading h1 { font-size:31px; letter-spacing:-.9px; }
 html[data-theme="rose"] .page-heading .eyebrow { display:none; }
 html[data-theme="rose"] .page-heading::after { display:none; }
 html[data-theme="rose"] .stat { border-radius:15px 15px 15px 4px; }
 html[data-theme="rose"] .stat strong { font-size:23px; }
 html[data-theme="graphite"] .stat strong { font-size:20px; }
 html[data-theme="graphite"] .stat { padding:10px 8px; }
 html[data-theme="graphite"] .stat-icon { width:22px; height:24px; }
 html[data-theme="classic"] .content-card { border-radius:17px; box-shadow:0 2px 0 var(--line); }
 html[data-theme="graphite"] .content-card { border-radius:6px; }
 html[data-theme="rose"] .content-card { border-radius:23px; }
 .toolbar { display:grid; grid-template-columns:minmax(0,1fr) 96px; align-items:center; gap:8px; padding:10px 11px; }
 .month-controls { display:flex; width:auto; min-width:0; gap:2px; flex-wrap:nowrap; }
 .month-controls h2 { min-width:0; flex:1; white-space:nowrap; margin:0; font-size:18px; }
 .month-controls .icon-button { width:44px; height:44px; }
 .segmented { width:96px; padding:3px; }
 .segmented button { width:44px; min-height:44px; flex:1; padding:0; position:relative; display:inline-flex; align-items:center; justify-content:center; }
 .segmented .icon { width:20px; height:20px; margin:0; }
 .segmented .mode-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
 html[data-theme="graphite"] .toolbar { margin-bottom:9px; padding:10px 11px; }
 html[data-theme="graphite"] .month-controls h2 { font-size:16px; letter-spacing:-.6px; }
 html[data-theme="rose"] .toolbar { margin:0 11px 9px; padding:10px 0; }
 html[data-theme="rose"] .month-controls h2 { font-size:21px; letter-spacing:-.8px; }
 .filterbar { padding-top:0; }
 .filters { gap:3px; }
 .filters button { font-size:11px; padding:6px 5px; gap:3px; }
 .filter-count { min-width:14px; padding:1px 3px; font-size:10px; }
 .search-controls { width:100%; margin-top:5px; gap:7px; }
 .search-controls .search { max-width:none; margin-top:0; min-height:44px; }
 .search-controls #today-button { min-height:44px; padding:8px 10px; font-size:11px; }
 .scopebar { padding-bottom:10px; }
 html[data-theme="rose"] .calendar-grid { padding:0 6px 8px; gap:3px; }
 html[data-theme="rose"] .weekdays { padding:10px 6px; }
 html[data-theme="rose"] .day-cell { min-height:88px; border-radius:7px; padding:5px 2px; }
 html[data-theme="rose"] .day-cell.today .day-number { box-shadow:0 0 0 2px var(--paper); }
 html[data-theme="rose"] .event-chip,html[data-theme="rose"] .event-chip.task,html[data-theme="rose"] .event-chip.note { border-radius:5px 5px 5px 1px; }
 html[data-theme="graphite"] .weekdays { font-size:10px; }
 html[data-theme="graphite"] .day-panel h2 { font-size:22px; }
 html[data-theme="rose"] .day-panel h2 { font-size:25px; }
 html[data-theme="classic"] .day-panel { border-top-width:3px; }
 html[data-theme="rose"] .day-panel { border-radius:23px 23px 7px 23px; }
 html[data-theme="rose"] .settings-section { border-radius:16px; }
 html[data-theme="rose"] .settings-section-summary strong { font-size:17px; }
 html[data-theme="graphite"] .settings-section-summary strong { font-size:13px; }
 .daily-brief { grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:3px 9px; padding:10px 12px 13px; margin-bottom:14px; }
 .brief-date-block { grid-column:1; grid-row:1; border:0; padding:0; }
 .brief-eyebrow { display:none; }
 .brief-date { font-size:22px; line-height:1.1; letter-spacing:-.4px; }
 .brief-summary { display:contents; }
 .brief-state { grid-column:2; grid-row:1; font-size:11px; line-height:1.35; text-align:left; }
 .brief-next { grid-column:1 / -1; margin:0; gap:7px; width:100%; }
 .brief-next-label { max-width:70px; font-size:10px; line-height:1.35; flex-basis:70px; }
 .brief-next-button { flex:1; min-height:44px; padding:5px 7px; gap:6px; }
 .brief-next-time { font-size:10px; }
 .brief-next-title { font-size:12px; }
 .brief-progress { grid-column:3; grid-row:1; }
 .brief-progress-meta { margin:0; font-size:10px; }
 .brief-progress-meta>span { display:none; }
 .brief-progress-meta strong { border:1px solid var(--line); border-radius:5px; padding:3px 5px; background:var(--subtle-bg); font-size:10px; }
 .brief-progress-meter { position:absolute; bottom:4px; left:12px; width:calc(100% - 24px); height:3px; }
 .brief-actions { grid-column:1 / -1; justify-content:flex-end; margin-top:3px; }
 .brief-actions button { min-height:44px; padding-inline:12px; }
 html[data-theme="classic"] .daily-brief { border-radius:4px 15px 15px 4px; border-left-width:3px; }
 html[data-theme="graphite"] .daily-brief { border-radius:4px; }
 html[data-theme="graphite"] .brief-date { font-size:19px; }
 html[data-theme="graphite"] .brief-progress-meter { height:3px; }
 html[data-theme="rose"] .daily-brief { border-radius:20px 20px 20px 5px; }
 html[data-theme="rose"] .brief-date { font-size:24px; }
 .editor-group { margin:15px 0; }
 .editor-group>summary { min-height:56px; padding:11px 12px; }
 .editor-group-body { padding:14px 12px; }
 .empty { margin:14px 7px; padding:27px 14px; }
}
@media(max-width:360px) {
 html[data-theme="graphite"] .page-heading h1 { font-size:26px; }
 html[data-theme="rose"] .page-heading h1 { font-size:29px; }
 .month-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px 2px; align-items:center; }
 .month-controls h2 { grid-column:1 / -1; font-size:16px; line-height:1.3; white-space:normal; text-align:center; margin:0; }
 html[data-theme="classic"] .month-controls h2 { font-size:18px; }
 html[data-theme="graphite"] .month-controls h2 { font-size:15px; }
 html[data-theme="rose"] .month-controls h2 { font-size:19px; }
 .month-controls .icon-button { justify-self:center; }
 .filters { gap:2px; }
 .filters button { flex:1; font-size:11px; padding-inline:2px; gap:3px; }
 .filters .dot { display:none; }
 .filter-count { min-width:12px; padding-inline:2px; font-size:10px; }
 .brief-state { font-size:10px; }
 .brief-date { font-size:20px; }
 html[data-theme="graphite"] .brief-date { font-size:18px; }
 html[data-theme="rose"] .brief-date { font-size:22px; }
 .brief-next-label { flex-basis:60px; font-size:9px; }
 .brief-next-title { font-size:11px; }
}
@media(prefers-reduced-motion:reduce) {
 *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
 button:active:not(:disabled),.primary:hover:not(:disabled),.day-item:hover,.list-item:hover,.theme-option:hover .theme-miniature,.day-cell:hover .day-number,.nav-button:hover .icon,.mobile-nav button:hover .icon { transform:none; }
}

.button-busy-icon .icon { width:16px; height:16px; vertical-align:middle; }
.daily-brief:has(.brief-progress[hidden]) { grid-template-columns:auto minmax(0,1fr) auto; }
