/* Graphite: the chosen visual direction. Geometry of calendar hours is unchanged. */
:root[data-accent="green"]{--green:#83bfa4;--accent-soft:#283e36;--accent-ink:#bee4cf}
:root[data-accent="blue"]{--green:#83b0f0;--accent-soft:#2b3951;--accent-ink:#c1d9fa}
:root[data-accent="teal"]{--green:#76c8cc;--accent-soft:#253c40;--accent-ink:#b7e5e7}
:root[data-accent="amber"]{--green:#deb777;--accent-soft:#423829;--accent-ink:#efd6ae}
:root[data-accent="rose"]{--green:#e99bbe;--accent-soft:#432e3e;--accent-ink:#f3c7db}
:root{color-scheme:dark;--page:#191b20;--surface:#202329;--nav:#15171c;--raised:#282c34;--ink:#e2e5ed;--muted:#a0a8b9;--border:#333740;--green:#8997ee;--accent-soft:#30374f;--accent-ink:#c6ceff;--danger:#efa0aa;background:var(--page);color:var(--ink)}
body{background:var(--page)}a{color:var(--accent-ink)}button:hover{filter:none;background-color:var(--raised)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:var(--green)}button:disabled{cursor:default;opacity:.55}.app-shell>main{min-width:0}.sidebar{background:var(--nav);border-color:var(--border);gap:24px}.brand{color:var(--ink);font-size:18px}.brand small{font-size:10px}.brand img{width:34px;height:34px}.eyebrow,.page-heading .eyebrow{color:var(--muted);font-size:10px;letter-spacing:1.4px}.nav-active{background:var(--accent-soft);color:var(--accent-ink);padding:11px;border-radius:7px}.sidebar-heading .eyebrow{font-size:10px}.sidebar-item-text small,.sidebar-help,.item-actions{color:var(--muted)}.category-dot{box-shadow:0 0 0 1px #ffffff24}.category-filter input,.task-row input,.project-days input,.notification-settings input[type=checkbox]{accent-color:var(--green)}.sidebar-item .category-filter{font-size:12px;line-height:1.6}.local-note{background:var(--surface);border-color:var(--border);border-radius:7px}.local-note p,.export-button{color:var(--muted)}.status-dot{background:#83bfa4}.sidebar-bottom{padding-top:20px}.topbar{height:60px;background:var(--page);padding:0 26px;gap:18px}.breadcrumb,.breadcrumb span,.search{color:var(--muted)}.search input{color:var(--ink);font-size:12px}.search input::placeholder{color:var(--muted)}.avatar{border:0;box-shadow:none;background:var(--accent-soft);color:var(--accent-ink);width:29px;height:29px}.workspace{padding:26px;max-width:1800px}.page-heading{margin-bottom:23px}.page-heading .eyebrow{margin-bottom:9px}h1{font-size:clamp(24px,2.1vw,31px);letter-spacing:-.9px;font-weight:550;margin-bottom:8px}h1 span{color:var(--ink)}.page-heading>div>p:last-child{font-size:12px;color:var(--muted)}button.primary{background:var(--green);border-color:var(--green);color:#171b2c;box-shadow:none;border-radius:7px;font-weight:600;padding:10px 15px}.primary:hover{background:color-mix(in srgb,var(--green) 85%,white)}.outline-button{background:var(--surface);border-color:var(--border);color:var(--ink);border-radius:6px}.text-button{color:var(--muted)}.icon-button{border-radius:6px}.calendar-toolbar{gap:12px}.period{gap:15px}.period h2{font-size:19px;min-width:158px;font-weight:550}.view-switch{background:var(--surface);border:1px solid var(--border);border-radius:7px;padding:3px}.view-switch button{color:var(--muted);border-radius:4px;font-size:11px;padding:6px 12px}.view-switch [aria-pressed=true]{background:var(--accent-soft);color:var(--accent-ink);box-shadow:none}.status-line{color:var(--muted);font-size:11px;padding:10px 0;min-height:33px}.status-line.error{color:var(--danger)}.planning-layout{gap:18px;grid-template-columns:minmax(0,1fr) 235px}.calendar-panel,.day-panel{background:var(--surface);border-color:var(--border);border-radius:8px}.day-panel{padding:20px 17px}.day-heading h2{font-size:23px;font-weight:500}.count-label{color:var(--accent-ink);background:var(--accent-soft);font-size:10px}.empty-symbol{background:var(--raised);color:var(--muted);border-radius:12px}.empty-day p,.small-note,.calendar-footer,.more-events{color:var(--muted)}.small-note{display:none}.add-day{background:transparent;border-color:color-mix(in srgb,var(--green) 45%,var(--border));color:var(--accent-ink);border-radius:6px}.weekday-headings{background:var(--surface);color:var(--muted);border-color:var(--border)}.calendar-day{border-color:var(--border)}.calendar-day.selected{background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--green)}.calendar-day.outside{background:#1b1e24}.outside .day-number{color:#959bad}.today .day-number,.today-heading strong{background:var(--green);color:#191b20}.event-chip,.event-card{color:var(--event-ink,var(--ink));border-radius:5px}.event-card{padding:11px}.event-chip:hover,.event-card:hover{background:var(--event-bg);filter:brightness(1.12)}.event-notes{color:inherit;opacity:.85}.category-name{opacity:.9}.free-day{background:transparent;border-color:var(--border);color:var(--muted)}.calendar-footer{font-size:10px;border-top:1px solid var(--border);padding:11px 13px}.calendar-filter-note{background:#393222;color:#e3c68c}.week-help{background:var(--surface);color:var(--muted);border-color:var(--border);font-size:10px}.week-top{background:var(--surface);box-shadow:0 2px 5px #0003}.time-corner,.all-day-label,.hour-axis{background:var(--surface);color:var(--muted);border-color:var(--border)}.week-days,.week-all-day,.time-day-heading,.all-day-events{border-color:var(--border)}.time-day-heading.selected{background:var(--accent-soft)}.time-day-button span,.hour-label{color:var(--muted)}.time-day-button:hover{background:transparent}.time-day{border-color:var(--border);background:repeating-linear-gradient(to bottom,#333740 0,#333740 1px,transparent 1px,transparent 32px,#292d34 32px,#292d34 33px,transparent 33px,transparent 64px)}.selected-time-day{background-color:color-mix(in srgb,var(--accent-soft) 45%,var(--surface))}.time-week .timed-event{font-size:11px;border-radius:4px}.time-week .timed-event .event-time{font-size:10px}.day-task-count{background:var(--accent-soft);color:var(--accent-ink)}.task-count,.tasks-empty,.task-time{color:var(--muted)}.task-row{border-color:var(--border)}.task-title{color:var(--ink)}.task-title:hover{background:transparent;color:var(--accent-ink)}.task-row.completed .task-title{color:var(--muted)}.time-week .timed-task{background:#263c35;border-color:#6b9b82;border-left-color:#83bfa4}.timed-task .task-title{color:#d0e5d7}.timed-task .task-time{color:#b7d0c1}.timed-task.completed{background:#292f2c;opacity:1}.timed-task.completed .task-title{color:#b0beb4}
/* Forms, menus and reminders use the same dark surfaces. */
dialog{background:var(--surface);color:var(--ink);border-color:#454b58;border-radius:11px;box-shadow:0 25px 100px #0008;padding:25px}dialog::backdrop{background:#080b10b3;backdrop-filter:blur(3px)}.dialog-heading h2{font-size:22px;letter-spacing:-.4px}.dialog-actions{border-color:var(--border)}form input:not([type=checkbox]),form select,form textarea,.phone-connection input{background:var(--page);color:var(--ink);border-color:#454c5b;border-radius:6px}form input::placeholder,form textarea::placeholder{color:#959dac}.recurrence-fields input:read-only{background:var(--page)}.optional,.form-help,.reminder-help,.recurrence-fields .field-help{color:var(--muted)}.form-help{background:var(--raised);border-radius:6px}.project-days,.reminder-fields,.recurrence-fields,.recurrence-days{border-color:#454c5b}.recurrence-fields label{display:block;font-size:12px;line-height:1.6}.recurrence-fields label>select,.recurrence-fields label>input:not([type=checkbox]){margin-top:5px}.recurrence-fields .recurrence-interval{white-space:nowrap}.recurrence-fields .recurrence-interval input{width:85px;flex:0 0 85px;margin:0}.recurrence-days label{display:flex}.danger,.danger-button,.status-line.error,#form-error,#project-form-error,#task-error,#task-feedback,#category-error{color:var(--danger)}.danger-button{background:#492a32;border:1px solid #885362;border-radius:6px}.danger-button:hover{background:#60333e}#delete-confirmation,#project-delete-confirmation,#category-delete-fields,#task-delete-confirmation{background:#35262c;color:#f0c1c8}.item-menu{background:var(--raised);border-color:#4c5362;box-shadow:0 8px 30px #0007;border-radius:8px}.item-menu button:hover,.item-menu button:focus-visible{background:var(--accent-soft)}.notification-settings,.phone-connection{background:var(--surface);border-color:var(--border);border-radius:7px;font-size:11px;padding:11px 14px;margin-bottom:16px}.notification-settings summary,.phone-connection summary{color:var(--ink);font-weight:500}.notification-settings p,.phone-connection p{color:var(--muted)}.notification-settings #notification-status,#project-feedback{color:var(--accent-ink)}.notification-toast{background:var(--raised);color:var(--ink);border-color:var(--green);border-radius:10px;box-shadow:0 12px 55px #0007}.notification-sound-settings{border-color:#454c5b}.project-card,.projects-panel{background:var(--surface);border-color:var(--border)}.project-card.paused{background:var(--page);border-color:var(--border)}.project-rhythm,.project-window,.project-progress{color:var(--muted)}.project-warning{background:#393222;color:#e3c68c}.recurrence-fields input[type=number]{min-width:0}
/* Compact desktop rail; categories and activities stay one click away. */
#desktop-sidebar-toggle{display:none}
.brand-monogram{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;background:var(--green);color:#191b20;border-radius:8px;font-size:29px;font-weight:700;line-height:1;letter-spacing:-2px;padding-right:2px}.appearance-trigger{display:flex;align-items:center;gap:8px;font-size:11px;padding:8px 10px;flex-shrink:0}.appearance-dot{width:12px;height:12px;border-radius:50%;background:var(--green);display:inline-block}.appearance-help{font-size:13px;line-height:1.7;color:var(--muted)}.theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:20px 0}.theme-option{display:flex;align-items:center;gap:12px;border:1px solid #454c5b;background:var(--page);color:var(--ink);padding:14px;border-radius:7px;font-size:14px;min-height:52px}.theme-option[aria-pressed=true]{background:var(--accent-soft);border-color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}.theme-swatch{display:block;width:23px;height:23px;flex-shrink:0;border-radius:50%}.theme-swatch.violet{background:#8997ee}.theme-swatch.green{background:#83bfa4}.theme-swatch.blue{background:#83b0f0}.theme-swatch.teal{background:#76c8cc}.theme-swatch.amber{background:#deb777}.theme-swatch.rose{background:#e99bbe}#appearance-dialog{width:min(440px,calc(100vw - 28px))}
@media(max-width:740px){.appearance-label{display:none}.appearance-trigger{padding:10px;min-height:38px;min-width:38px;justify-content:center}.topbar .search{gap:5px}.topbar{gap:8px}.search input{width:110px}.breadcrumb{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.theme-option{padding:12px;gap:9px}}
@media(min-width:741px){.app-shell{grid-template-columns:74px minmax(0,1fr)}.app-shell.sidebar-open{grid-template-columns:238px minmax(0,1fr)}.sidebar{padding:23px 14px;position:sticky;top:0;height:100dvh;overflow-y:auto;overflow-x:hidden;gap:23px}.sidebar>.brand{justify-content:center;min-height:36px}.sidebar>.brand>span:not(.brand-monogram),.sidebar>.sidebar-section>.eyebrow,.sidebar .nav-label,.sidebar .nav-dot,.sidebar .local-note,.sidebar-toggle-label{display:none}.sidebar>.new-event{font-size:0;padding:10px 0;min-height:43px;background:var(--accent-soft);color:var(--accent-ink);border-color:var(--border)}.sidebar>.new-event>span{font-size:25px;margin:0;line-height:22px}.sidebar .nav-active{justify-content:center;padding:12px 0}.sidebar .nav-active>span:first-child{font-size:21px}#desktop-sidebar-toggle{display:flex;align-items:center;justify-content:center;width:100%;height:auto;min-height:43px;padding:8px 0;color:var(--muted);gap:9px}#desktop-sidebar-toggle>span:first-child{font-size:25px;line-height:1}.sidebar #sidebar-lists{display:none}.sidebar .sidebar-bottom{margin-top:auto;padding-top:10px}.sidebar .export-button{font-size:0;width:100%;padding:10px 0;min-height:42px}.sidebar .export-button::before{content:'↓';font-size:23px}.sidebar-open .sidebar{padding:23px 18px}.sidebar-open .sidebar>.brand{justify-content:flex-start}.sidebar-open .sidebar>.brand>span:not(.brand-monogram),.sidebar-open .sidebar .local-note,.sidebar-open .sidebar #sidebar-lists,.sidebar-open .sidebar-toggle-label{display:block}.sidebar-open .sidebar .nav-label{display:inline;font-size:12px}.sidebar-open .sidebar>.new-event{font-size:12px;display:flex;align-items:center;justify-content:center;gap:9px}.sidebar-open .sidebar>.new-event>span{font-size:21px}.sidebar-open .sidebar .nav-active{justify-content:flex-start;padding:11px}.sidebar-open #desktop-sidebar-toggle{justify-content:flex-start;padding:8px;color:var(--accent-ink);background:var(--accent-soft)}.sidebar-toggle-label{font-size:11px;text-align:left}.sidebar-open .sidebar .export-button{font-size:11px;text-align:left}.sidebar-open .sidebar .export-button::before{display:none}}
@media(min-width:1550px){.planning-layout{grid-template-columns:minmax(0,1fr) 275px}.workspace{padding:30px 34px}.topbar{padding:0 34px}}
@media(max-width:1100px){.planning-layout{grid-template-columns:minmax(0,1fr) 215px;gap:13px}.workspace{padding:23px 20px}.day-panel{padding:18px 14px}.sidebar-open .planning-layout{grid-template-columns:1fr}.sidebar-open .day-panel{display:block}}
@media(min-width:741px) and (max-width:1000px){.day-heading{display:block}.day-heading h2{margin:5px 0 10px}.day-heading .count-label{display:inline-block}#day-events{display:block}.empty-day{padding:20px 0}.empty-day p{max-width:180px}}
@media(max-width:740px){.app-shell,.app-shell.sidebar-open{display:block}.sidebar{position:static;height:auto;padding:10px 14px;background:var(--nav);gap:10px}.sidebar:has(#sidebar-lists.mobile-open) .sidebar-bottom{display:block;padding-top:4px}#desktop-sidebar-toggle{display:none}#sidebar-toggle{border-color:var(--border);color:var(--accent-ink);background:var(--accent-soft);border-radius:6px;min-height:42px}.topbar{height:55px;padding:0 15px;gap:9px}.breadcrumb{font-size:10px}.breadcrumb span{margin:0 5px}.search input{width:124px;font-size:12px}.workspace{padding:23px 14px}.page-heading{margin-bottom:20px;gap:10px}.page-heading h1{font-size:25px;max-width:240px;line-height:1.16}.page-heading .eyebrow{font-size:9px}.page-heading>div>p:last-child{font-size:11px;line-height:1.5}.page-heading>.mobile-create{font-size:12px;padding:10px;min-height:42px}.period{gap:8px}.period h2{font-size:18px;min-width:0}.view-switch{width:100%}.view-switch button{min-height:37px;font-size:12px}.planning-layout{grid-template-columns:minmax(0,1fr);gap:17px}.calendar-panel{grid-row:1}.day-panel{grid-row:auto;padding:18px}.day-heading{display:flex}.day-heading h2{font-size:22px}#day-events{display:block}.notification-settings,.phone-connection{padding:12px;font-size:12px}.notification-settings summary,.phone-connection summary{min-height:20px}.sidebar-heading .eyebrow{font-size:12px}.sidebar-item .category-filter{font-size:14px;min-height:42px}.sidebar .item-actions{min-height:42px}.sidebar-help,.sidebar-item-text small{font-size:11px}.tasks-heading button{min-width:42px;min-height:42px}.task-title{font-size:14px}.time-week .timed-task .task-title{font-size:11px}.task-count,.tasks-empty{font-size:12px}.calendar-footer{font-size:10px;line-height:1.6}.week-help{font-size:11px;line-height:1.6}.time-corner,.all-day-label{font-size:9px}.day-task-count{font-size:10px}.sidebar .export-button{padding:10px 0;font-size:12px}dialog{padding:20px}form input:not([type=checkbox]),form select,form textarea{font-size:16px;padding:10px}.reminder-row{grid-template-columns:minmax(55px,1fr) minmax(105px,1.6fr) 28px;gap:5px}.reminder-row select{font-size:13px}.dialog-actions button{min-height:42px}.recurrence-days label{font-size:12px;min-height:30px}.recurrence-fields .field-help,.form-help{font-size:12px}.time-week .timed-event .event-time{font-size:10px}.notification-buttons button{min-height:43px}}
@media(max-width:380px){.breadcrumb{font-size:9px}.search input{width:105px}.page-heading h1{font-size:23px}.page-heading>.mobile-create{font-size:11px;padding:9px}.period h2{font-size:17px}.period .outline-button{padding:8px}.period .icon-button{width:28px}.recurrence-fields{padding:10px}.recurrence-fields .recurrence-interval{gap:7px}.recurrence-fields .recurrence-interval input{width:68px;flex-basis:68px}}

/* Direct manipulation in the hourly week. Controls are siblings of the card. */
.time-slot{position:absolute;min-height:12px;z-index:2;cursor:grab}
.time-slot:hover,.time-slot:focus-within{z-index:5}
.time-week .time-slot>.timed-event,.time-week .time-slot>.timed-task{position:absolute;inset:0;width:100%;height:100%;cursor:grab}
.time-slot button.slot-move,.time-slot button.slot-resize{position:absolute;z-index:6;border:0;border-radius:3px;background:var(--surface);color:var(--accent-ink);padding:0;line-height:1;touch-action:none;user-select:none;opacity:0}
.time-slot button.slot-move{top:0;right:0;width:20px;height:22px;cursor:grab;font-size:18px}
.time-slot button.slot-resize{bottom:-4px;left:calc(50% - 16px);width:32px;height:12px;cursor:ns-resize;font-size:12px;border:1px solid var(--border)}
.time-slot:hover button.slot-move,.time-slot:hover button.slot-resize,.time-slot:focus-within button.slot-move,.time-slot:focus-within button.slot-resize{opacity:1}
.time-edit-source{opacity:.35;pointer-events:none}
.time-edit-preview{position:absolute;left:2px;right:2px;z-index:8;background:var(--accent-soft);border:2px solid var(--green);color:var(--accent-ink);border-radius:5px;box-sizing:border-box;font-size:11px;padding:4px;pointer-events:none;overflow:hidden;min-height:16px}
.time-edit-preview.invalid-drop{border-color:var(--danger);opacity:.6}
.time-editing{user-select:none;cursor:grabbing}
.timeline-feedback{margin:0;padding:8px 12px;font-size:12px;color:var(--accent-ink);line-height:1.5;height:54px;box-sizing:border-box;overflow:auto;border-top:1px solid var(--border)}
@media(max-width:740px){.timeline-feedback{height:90px}}
.timeline-feedback.error{color:var(--danger)}
@media(pointer:coarse),(max-width:740px){.time-slot button.slot-move{width:24px;height:24px;opacity:1}.time-slot button.slot-resize{height:18px;width:32px;opacity:1}}

@media(max-width:740px){.week-sheet{min-width:1028px}}

/* Task priorities and deadlines are readable without relying only on color. */
.task-planning-fields{border:1px solid var(--border);border-radius:8px;margin:16px 0;padding:12px}
.task-planning-fields legend{font-size:12px;color:var(--muted);padding:0 5px}
.task-planning-fields .time-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.task-planning-fields input,.task-planning-fields select{min-width:0;max-width:100%;box-sizing:border-box}
.task-deadline-warning{font-size:12px;color:var(--danger);line-height:1.5;margin:8px 0 0}
.task-deadline-warning:empty{display:none}
.task-estimate-summary{font-size:11px;line-height:1.5;color:var(--accent-ink);margin:6px 0}
.task-estimate-summary:empty{display:none}
.task-sort-help{font-size:10px;color:var(--muted);margin:6px 0 12px;line-height:1.4}
.task-metadata{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.task-badge{font-size:10px;line-height:1.45;font-weight:400;background:var(--raised);color:var(--muted);border-radius:4px;padding:3px 5px}
.task-badge.priority-urgent,.task-badge.deadline-overdue{color:#ffc4c5;background:#492e35}
.task-badge.priority-important,.task-badge.deadline-today{color:#f2d4a4;background:#423829}
.task-badge.priority-low{color:#c5d5ef;background:#2c3443}
.task-badge.deadline-after-deadline{color:var(--muted)}
.task-row[data-priority=urgent]:not(.completed){border-left:3px solid #efa0aa;padding-left:7px}
.task-row[data-priority=important]:not(.completed){border-left:3px solid #deb777;padding-left:7px}
.time-week .timed-task[data-priority=urgent]:not(.completed){border-left-color:#efa0aa}
.time-week .timed-task[data-priority=important]:not(.completed){border-left-color:#deb777}
@media(max-width:740px){.task-badge{font-size:11px}.task-estimate-summary{font-size:12px}.task-sort-help{font-size:11px}.task-planning-fields .time-fields{grid-template-columns:minmax(0,1fr)}}

.task-row.completed .task-title{text-decoration:none}.task-row.completed .task-title-text{text-decoration:line-through}
@media(max-width:740px){#project-form .time-fields:has(#project-priority){grid-template-columns:minmax(0,1fr)}}

.task-rollover-open{font-size:11px;width:100%;margin:4px 0 8px;min-height:34px}
.rollover-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 8px}
.rollover-list-toolbar .checkbox-label{margin:0}
.rollover-list{max-height:280px;overflow:auto;border:1px solid var(--border);border-radius:7px}
.rollover-list:empty{display:none}
.rollover-row{display:flex;gap:10px;align-items:flex-start;padding:12px;margin:0;border-bottom:1px solid var(--border);cursor:pointer}
.rollover-row:last-child{border-bottom:0}
.rollover-row input{flex-shrink:0;width:18px;height:18px;margin:2px 0;accent-color:var(--green)}
.rollover-row>span{min-width:0}.rollover-row strong{display:block;font-size:13px;overflow-wrap:anywhere;font-weight:500}.rollover-row small{display:block;color:var(--muted);line-height:1.6;font-size:11px;margin-top:4px}
.rollover-row:has(input:checked){background:var(--accent-soft)}
#rollover-error{color:var(--danger);font-size:12px;line-height:1.5}
#rollover-warning:empty,#rollover-error:empty{display:none}
@media(max-width:740px){.task-rollover-open{min-height:42px;font-size:12px}.rollover-list-toolbar{align-items:flex-start;flex-direction:column;gap:8px}.rollover-row{padding:12px 9px}.rollover-row input{width:20px;height:20px}.rollover-row small{font-size:12px}.rollover-list{max-height:260px}}

/* Keep confirmation copy, fields and actions in separate, wrapping rows. */
.dialog-heading{gap:14px;min-width:0}.dialog-heading>div,.dialog-heading h2{min-width:0;overflow-wrap:anywhere;line-height:1.35}.dialog-heading>.icon-button{flex:0 0 32px}
.dialog-actions,.dialog-actions>div{flex-wrap:wrap}.dialog-actions button{white-space:normal;overflow-wrap:anywhere;max-width:100%;line-height:1.5}
#category-delete-fields{display:grid;gap:16px;padding:16px;font-size:13px;line-height:1.65}
#category-delete-fields p{margin:0;overflow-wrap:anywhere}
#category-delete-fields label{display:flex;flex-direction:column;gap:10px;min-width:0}
#category-replacement{display:block;min-width:0;max-width:100%;line-height:1.5}
#delete-confirmation,#project-delete-confirmation,#task-delete-confirmation{padding:14px;border-radius:8px;font-size:13px;line-height:1.65;overflow-wrap:anywhere}
#delete-confirmation p,#project-delete-confirmation p,#task-delete-confirmation p{margin:0 0 14px}
#delete-confirmation button,#project-delete-confirmation button,#task-delete-confirmation button{max-width:100%;white-space:normal;line-height:1.5;margin:4px 8px 4px 0}
@media(max-width:380px){.dialog-actions{align-items:stretch}.dialog-actions>div{width:100%;margin:0}.dialog-actions button{flex:1 1 auto}#category-form .dialog-actions{flex-direction:column}}
/* A non-interactive live time marker stays above appointment cards. */
.time-now-line{position:absolute;left:0;right:0;height:2px;background:#ff929b;z-index:7;pointer-events:none}
.time-now-line::before{content:'';position:absolute;left:-4px;top:-3px;width:8px;height:8px;border-radius:50%;background:#ff929b}
.time-now-label{position:absolute;right:2px;bottom:3px;padding:2px 4px;background:#47272f;color:#ffd8dd;border-radius:3px;font-size:10px;font-weight:600;line-height:1.3;white-space:nowrap}
.calendar-toolbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}#now{white-space:nowrap}
@media(max-width:740px){.calendar-toolbar-actions{width:100%}.calendar-toolbar-actions .view-switch{width:auto;flex:1}#now{min-height:45px}}

/* Daily overview: all calendars feed availability, even when filtered. */
#day-overview-dialog{width:min(800px,calc(100vw - 28px))}
#day-overview-dialog .eyebrow{text-transform:capitalize;letter-spacing:.6px;line-height:1.5}
.overview-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;margin:20px 0}
.overview-columns section{min-width:0}.overview-columns h3,.overview-availability h3{font-size:15px;margin:0 0 12px}
.overview-list,.overview-free-list{display:grid;gap:8px}.overview-free-list{grid-template-columns:repeat(2,minmax(0,1fr));max-height:290px;overflow:auto;padding:6px}
.overview-card{display:flex;flex-direction:column;gap:7px;min-width:0;width:100%;text-align:left;padding:12px;border:1px solid var(--border);border-radius:7px;background:var(--page);color:var(--ink);overflow-wrap:anywhere}
.overview-card:hover{border-color:var(--green)}.overview-card strong{font-size:13px;line-height:1.5}.overview-card span,.overview-help{font-size:12px;line-height:1.6;color:var(--muted)}
.overview-help{margin:9px 0}.overview-help:empty,.overview-warning:empty{display:none}.overview-warning{font-size:12px;line-height:1.6;color:var(--danger)}
.overview-total{font-size:13px;color:var(--accent-ink);line-height:1.5}.overview-availability{padding-top:20px;border-top:1px solid var(--border);margin-bottom:20px}
.overview-availability .time-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-availability label{font-size:12px;line-height:1.5;min-width:0}.overview-availability input{min-width:0;width:100%;background:var(--page);border:1px solid #454c5b;border-radius:6px;color:var(--ink);padding:10px;font-size:14px}
#overview-all-tasks,#overview-report{display:block;text-align:left;line-height:1.6}#day-overview-dialog .dialog-actions{justify-content:flex-end}
@media(max-width:740px){.calendar-toolbar-actions{justify-content:space-between}.calendar-toolbar-actions .view-switch{flex-basis:100%}#open-day-overview{min-height:45px}.overview-columns{grid-template-columns:minmax(0,1fr);gap:22px}.overview-free-list{grid-template-columns:minmax(0,1fr)}.overview-availability input{font-size:16px}.overview-card{min-height:44px}.overview-card strong{font-size:14px}}

.calendar-toolbar { flex-wrap: wrap; }

.moment-section{border-top:1px solid var(--border);padding:20px 0}.moment-section h3{font-size:15px;margin:0 0 12px}.moment-section h4{font-size:13px;margin:18px 0 10px}.moment-budget-label{display:flex;align-items:center;gap:14px;font-size:12px;line-height:1.5;flex-wrap:wrap}.moment-budget-label input{width:90px;background:var(--page);color:var(--ink);border:1px solid #454c5b;border-radius:6px;padding:10px;font-size:16px}

.session-lock-controls{padding:12px;border:1px solid var(--border);border-radius:7px;margin:0 0 18px}.session-lock-controls p{font-size:12px;line-height:1.6;margin:0 0 10px}.session-lock-controls p:last-child{margin:10px 0 0;color:var(--muted)}.session-lock-controls button{max-width:100%;white-space:normal;line-height:1.5}.session-lock-badge{font-size:10px;line-height:1.4}.time-week .session-lock-badge{font-size:9px}.time-week .short-event .session-lock-badge{display:none}

.task-subtasks-fields{border:1px solid var(--border);border-radius:8px;padding:12px;margin:16px 0;min-width:0}.task-subtasks-fields legend{font-size:12px;padding:0 5px}.task-subtasks-fields .field-help{font-size:12px;line-height:1.6;color:var(--muted)}.subtask-fields-list{display:grid;gap:10px}.subtask-field-row{display:grid;grid-template-columns:20px minmax(0,1fr) 32px;gap:8px;align-items:center}.subtask-field-row input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:var(--green)}.subtask-field-row input[type=text]{min-width:0}.subtask-field-row:has(input:checked) input[type=text]{text-decoration:line-through;color:var(--muted)}

#planning-settings-form .field-help{font-size:12px;line-height:1.6;color:var(--muted);margin:10px 0 20px}#planning-settings-form .checkbox-label{margin:20px 0 12px}#planning-settings-form .time-fields{margin-top:16px}#planning-limits-summary{line-height:1.6;overflow-wrap:anywhere}#open-planning-settings{width:100%;white-space:normal;line-height:1.5}

.utility-dialog{padding:24px}.utility-dialog .field-help{color:var(--muted);font-size:12px;line-height:1.6}.utility-list{display:grid;gap:10px;margin:16px 0;max-height:55vh;overflow:auto}.task-filter-fields label{display:block;font-size:12px;line-height:1.6;margin:12px 0}.task-filter-fields select{display:block;width:100%;padding:9px;background:var(--page);color:var(--ink);border:1px solid var(--border);border-radius:6px;margin-top:5px}#open-inbox{width:100%;white-space:normal}#inbox-count{margin-left:5px}#task-inbox-help{font-size:12px;line-height:1.6;color:var(--muted)}

#weekly-review-dialog{width:min(760px,calc(100vw - 28px))}.review-period{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.review-period label{font-size:12px;display:grid;gap:6px}.review-period input,.actual-time-row input{background:var(--page);color:var(--ink);border:1px solid var(--border);border-radius:6px;padding:10px;min-width:0;font-size:16px}.actual-time-row{display:grid;grid-template-columns:minmax(0,1fr) 140px;gap:12px;align-items:center;font-size:13px;line-height:1.5;padding:8px 0}.actual-time-row span{overflow-wrap:anywhere}@media(max-width:500px){.actual-time-row{grid-template-columns:minmax(0,1fr)}#review-save{white-space:normal;line-height:1.5}}

.template-fields{border:1px solid var(--border);border-radius:8px;padding:12px;margin:18px 0}.template-fields summary{cursor:pointer;font-size:13px}.template-fields label{margin-top:14px}.template-fields button{white-space:normal;line-height:1.5}.template-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.template-fields .field-help,.template-fields [role=status]{font-size:12px;line-height:1.6;color:var(--muted)}

.planning-actions{display:grid;gap:10px}.planning-actions button{white-space:normal;line-height:1.5}#planning-preview-dialog{width:min(760px,calc(100vw - 28px))}#preview-parameters label,.day-proposal label{display:block;font-size:12px;line-height:1.6;margin:10px 0}#preview-parameters input:not([type=checkbox]),#preview-parameters select,.day-proposal input[type=time]{display:block;width:100%;min-width:0;background:var(--page);color:var(--ink);border:1px solid var(--border);border-radius:6px;padding:10px;font-size:16px}.day-proposal{padding:12px;border:1px solid var(--border);border-radius:8px}.day-proposal .checkbox-label{display:flex;gap:10px}.day-proposal .time-fields{margin:0}#preview-result h3{font-size:14px;margin:12px 0 0}

#backups-dialog{width:min(740px,calc(100vw - 28px))}.backup-file-label{display:grid;gap:12px;font-size:13px}.backup-file-label input{min-width:0;max-width:100%;font-size:13px}#backup-preview{border-top:1px solid var(--border);margin-top:20px;padding-top:15px}#backup-comparison{font-size:13px;line-height:1.6}#backup-preview .checkbox-label{font-size:13px;line-height:1.6;margin:18px 0}#backup-error{font-size:13px;line-height:1.6}#open-backups{white-space:normal;line-height:1.5;margin-bottom:8px}

/* Optional pauses and recurring-series management. */
.break-card { border-style: dashed !important; opacity: .85; }
.series-pause-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border, #45464e); }
.series-pause-row > div { flex: 1 1 200px; min-width: 0; }
.series-pause-row p { margin: 6px 0 0; }
#series-pause-form { margin: 16px 0; }
#series-dialog select { max-width: 100%; }
#open-series-manager { margin-bottom: 12px; width: 100%; }

#series-dialog { width: min(740px, calc(100vw - 28px)); }
#series-dialog label { display: grid; gap: 7px; min-width: 0; font-size: 12px; line-height: 1.5; }
#series-dialog input, #series-dialog select { width: 100%; min-width: 0; padding: 10px; border-radius: 6px; border: 1px solid var(--border); color: var(--ink); background: var(--page); font-size: 16px; }
#series-dialog .time-fields { grid-template-columns: repeat(2, minmax(0,1fr)); }
#series-dialog .field-help, #series-error { overflow-wrap: anywhere; }
#break-dialog .dialog-actions { flex-wrap: wrap; gap: 10px; }
@media (max-width: 740px) {
  #series-dialog .utility-dialog, #break-dialog .utility-dialog { padding: 0; }
  #series-dialog .time-fields { grid-template-columns: minmax(0,1fr); }
  #series-dialog button { white-space: normal; line-height: 1.5; }
}

#planning-settings-form .task-planning-fields { display: grid; gap: 16px; }
#planning-settings-form .task-planning-fields > label { display: grid; gap: 7px; min-width: 0; font-size: 13px; line-height: 1.5; }
#planning-settings-form .task-planning-fields > .checkbox-label { display: flex; align-items: flex-start; gap: 9px; margin: 8px 0 0; }
#planning-settings-form .task-planning-fields > .checkbox-label input { flex: 0 0 auto; margin-top: 3px; }
#planning-settings-form .task-planning-fields > .field-help { margin: 0; }

/* Validation: visible without relying only on colour, in every dialog. */
dialog .field-invalid, dialog input[aria-invalid="true"], dialog select[aria-invalid="true"], dialog textarea[aria-invalid="true"] { border: 2px solid #ff8d8d !important; outline: 1px solid #ff8d8d; outline-offset: 2px; }
dialog .field-error { display: block; color: #ffb3b3; font-size: .82rem; line-height: 1.5; margin: .45rem 0 .7rem; overflow-wrap: anywhere; }
dialog .field-error::before { content: "À corriger : "; font-weight: 650; }
dialog progress { width: 100%; accent-color: var(--accent); }

/* Keep long, hovered and focused appointments below the sticky date header. */
.week-hours { position: relative; z-index: 0; isolation: isolate; }
.week-top { z-index: 10; isolation: isolate; }

.duration-value { display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:8px;align-items:start; }
.duration-value input,.duration-value select { min-width:0;width:100%; }
.duration-value .field-error { grid-column:1 / -1;order:3; }
@media(max-width:450px) { .duration-value { grid-template-columns:minmax(0,1fr) 86px; } }

.duration-value { grid-template-columns:minmax(0,1fr) auto; }
.duration-units { display:flex;align-self:start;margin-top:5px;border:1px solid var(--border);border-radius:6px;overflow:hidden; }
.duration-units button { padding:10px 8px;font-size:12px;border:0;border-radius:0;color:var(--muted);background:var(--page); }
.duration-units button[aria-pressed="true"] { background:var(--accent-soft);color:var(--accent-ink);font-weight:650; }
@media(max-width:450px){.duration-value{grid-template-columns:minmax(0,1fr)}.duration-units{justify-self:start;margin-top:0}}

/* Keep small appointments legible; secondary details yield to the title. */
.time-week .timed-event strong{white-space:normal;overflow-wrap:anywhere;line-height:1.15;flex-shrink:0;max-width:100%}
.time-week .timed-task .task-title{flex:1;padding:0;min-width:0}
.time-week .timed-task .task-title-text{display:block;max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.15}
.time-week .short-event strong,.time-week .short-event .task-title-text{white-space:nowrap}
.time-week .title-priority .session-duration,.time-week .title-priority .session-lock-badge{display:none}
.delete-scope-dialog{width:min(440px,calc(100vw - 32px));max-height:85dvh}
.delete-scope-dialog h2{font-size:20px}.delete-scope-options{display:grid;gap:12px;margin-top:20px}
.delete-scope-options button{padding:12px;white-space:normal;line-height:1.5}

/* Distinct navigation groups, with optional tools folded away. */
.time-week .week-scroll{height:auto;max-height:none;overflow-x:auto;overflow-y:hidden;overscroll-behavior-y:auto}
.sidebar-group{border-top:1px solid var(--border);padding-top:14px;margin-top:18px}
.sidebar-group>summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--ink);padding:6px 0;line-height:1.5}
.sidebar-group-body{display:grid;gap:5px;padding-top:9px}
.sidebar .sidebar-action{display:block;width:100%;border:0;background:transparent;text-align:left;padding:10px 9px;border-radius:6px;line-height:1.5;color:var(--ink)}
.sidebar .sidebar-action:hover,.sidebar .sidebar-action:focus-visible{background:var(--accent-soft)}
.sidebar-action strong{display:block;font-size:12px;font-weight:500}.sidebar-action small{display:block;font-size:10px;color:var(--muted);margin-top:3px}
.sidebar-group .sidebar-help{margin:0 9px 7px}.sidebar-group .task-filter-fields{margin:0}.sidebar-group #reset-filters{margin-top:4px}
#inbox-count{display:inline-block;background:var(--accent-soft);color:var(--accent-ink);border-radius:10px;padding:0 6px;margin-left:4px}
.sidebar #project-feedback:empty{display:none}.sidebar #project-feedback{font-size:11px;line-height:1.6}
.sidebar-group[open]>summary{color:var(--accent-ink)}
@media(max-width:740px){.sidebar-action strong{font-size:14px}.sidebar-action small{font-size:12px}.sidebar-group>summary{font-size:14px}}

.day-occasions{margin-top:22px;border-top:1px solid var(--border);padding-top:16px;font-size:12px;line-height:1.6}.day-occasions h3{font-size:14px;margin:0 0 12px}.day-occasions details{font-size:11px;color:var(--muted);margin:8px 0}.day-occasions summary{cursor:pointer}.day-occasions [data-open]{width:100%;white-space:normal;margin-top:8px}.occasion-source{padding-top:8px}.birthday-list{display:grid;gap:5px;max-height:200px;overflow:auto;margin-bottom:18px}.birthday-entry{display:block;width:100%;text-align:left;background:var(--accent-soft);color:var(--accent-ink);border:1px solid var(--border);border-radius:6px;padding:10px;margin:5px 0;white-space:normal;overflow-wrap:anywhere}.day-occasions [data-feast]{color:var(--accent-ink)}#birthday-dialog [data-confirm]{padding:12px;background:#35262c;border-radius:6px}#birthday-dialog [data-confirm] button{padding:10px;white-space:normal;margin:4px}

.sidebar a.sidebar-action{text-decoration:none}

/* Undated-in-time tasks share the all-day row without reserving hours. */
.time-week .week-all-day{max-height:none;overflow:visible}
.time-week .all-day-events .all-day-task{display:flex;align-items:flex-start;gap:5px;margin:0 0 4px;padding:5px;min-height:26px;height:auto;max-height:none;min-width:0;background:var(--accent-soft);border:1px solid var(--border);border-radius:4px;overflow:hidden}
.time-week .all-day-events .all-day-task input{flex:none;margin:2px 0 0;accent-color:var(--green)}
.time-week .all-day-events .all-day-task .task-title{flex:1;min-width:0;padding:0;text-align:left;white-space:normal;overflow-wrap:anywhere;font-size:11px;line-height:1.35}
.time-week .all-day-events .all-day-task .task-title-text{white-space:normal;overflow-wrap:anywhere}
.time-week .all-day-events .all-day-task.completed{opacity:.7}

.public-occasions{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:7px}.public-occasions[hidden]{display:none}.public-occasions li{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;padding:7px 9px;border:1px solid var(--border);border-radius:6px;background:var(--accent-soft)}.public-occasions strong{overflow-wrap:anywhere}.occasion-kind{font-size:10px;color:var(--muted)}

.previous-day-drop{position:absolute;bottom:0;left:54px;right:0;height:64px;display:flex;align-items:center;justify-content:center;padding:8px;background:var(--surface);border:2px dashed var(--green);color:var(--accent-ink);font-size:12px;pointer-events:none;z-index:2}
