/* Calendar and to-do surfaces use the existing themes and per-item colors. */
body.uniplan-v2 #panel-calendar .calendar-layout{display:block}
body.uniplan-v2 #panel-calendar .calendar-panel{padding:0!important;overflow:hidden;border-radius:16px;background:var(--surface-strong);box-shadow:0 8px 28px #263b4305}
#panel-calendar .calendar-header{padding:22px 24px;margin:0;align-items:center;border-bottom:1px solid var(--line)}
#panel-calendar .calendar-heading .panel-label{font-size:9px;letter-spacing:1.5px}
#panel-calendar .calendar-heading h3{font-family:inherit;font-size:21px;letter-spacing:-.5px}
#panel-calendar .calendar-view-switch{width:218px;margin:0;max-width:100%;padding:4px;border-radius:9px;background:var(--surface-soft);border:1px solid var(--line);touch-action:pan-y}
#panel-calendar .calendar-view-switch::before{border-radius:6px;background:var(--surface-strong);box-shadow:0 1px 5px #263b4315}
#panel-calendar .view-switch-button{font-size:12px;min-height:34px;padding:6px}
#panel-calendar .calendar-weekdays{padding:0;gap:0;margin:0;border-top:1px solid var(--line)}
#panel-calendar .calendar-weekdays>*{padding:12px 0;font-size:10px;border:0;background:none;color:var(--muted)}
body.uniplan-v2 #calendar-grid{display:grid!important;gap:0!important;min-width:0;width:100%;overflow:visible;border-top:1px solid var(--line);border-radius:0;padding:0!important;touch-action:pan-y}
body.uniplan-v2 #calendar-grid[data-view="month"]{grid-template-columns:repeat(7,minmax(0,1fr))!important}
body.uniplan-v2 #calendar-grid .calendar-day{min-width:0;max-width:100%;border:0!important;border-right:1px solid var(--line)!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;box-shadow:none;background:transparent!important}
body.uniplan-v2 #calendar-grid .calendar-day.is-selected{background:var(--accent-soft)!important}
body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-day{display:block!important;position:relative!important;min-height:clamp(90px,calc((100svh - 350px)/6),140px)!important;height:auto!important;padding:34px 5px 8px!important;text-align:left}
body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-day-number{top:5px!important;left:7px!important;transform:none!important;width:25px!important;height:25px!important;font-size:12px!important}
body.uniplan-v2 #calendar-grid .calendar-markers{display:block!important;min-width:0;max-height:none!important;overflow:visible!important;margin:0;padding:0}
body.uniplan-v2 #calendar-grid .calendar-marker{display:block;min-width:0;min-height:0;max-width:100%;padding:7px 6px!important;margin:0 0 4px;border:0;border-left:3px solid var(--item-color)!important;border-radius:5px;background:color-mix(in srgb,var(--item-color) 20%,var(--surface-strong))!important;color:var(--ink)!important;overflow:hidden}
body.uniplan-v2 #calendar-grid .calendar-marker-row{display:flex;align-items:flex-start;gap:5px;min-width:0}
body.uniplan-v2 #calendar-grid .calendar-item-open{display:block;flex:1;min-width:0;width:100%;padding:0;text-align:left;color:inherit;background:none;border:0;font:inherit;line-height:1.3}
body.uniplan-v2 #calendar-grid .calendar-marker-title{display:block;font-size:11px!important;font-weight:600;line-height:1.3;white-space:normal!important;overflow-wrap:anywhere}
body.uniplan-v2 #calendar-grid .calendar-marker-time{display:block!important;font-size:10px!important;line-height:1.3;margin-top:3px;white-space:normal!important;overflow-wrap:anywhere;color:var(--ink);opacity:.8}
body.uniplan-v2 #calendar-grid .calendar-marker-check{width:15px!important;height:15px!important;min-width:15px!important;flex:0 0 15px!important;padding:0;margin-top:1px;border:1.5px solid var(--item-color);border-radius:4px;font-size:11px;line-height:12px;box-shadow:none}
body.uniplan-v2 #calendar-grid .calendar-marker.is-complete .calendar-marker-check{background:var(--item-color);color:var(--surface-strong)}
/* Laptop: all seven days share an automatically fitted time axis. */
body.uniplan-v2 #calendar-grid[data-view="week"]{grid-template-columns:48px repeat(7,minmax(0,1fr))!important}
body.uniplan-v2 #calendar-grid[data-view="day"]{grid-template-columns:48px minmax(0,1fr)!important}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-day{display:block!important;position:relative!important;min-height:0!important;padding:0!important;text-align:left}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-day-number{display:flex!important;align-items:center;justify-content:center;position:static!important;transform:none!important;width:100%!important;height:72px!important;min-height:72px;padding:6px!important;margin:0!important;border:0;border-bottom:1px solid var(--line);border-radius:0;font-size:12px!important}
.planner-week-gutter{padding-top:72px;min-width:0}
#calendar-grid.has-untimed .planner-week-gutter{padding-top:calc(72px + var(--planner-untimed-height))}
.planner-time-ruler{height:calc(var(--planner-hours)*var(--planner-hour-height));display:flex;flex-direction:column}
.planner-time-ruler>span{display:block;height:var(--planner-hour-height);flex-shrink:0;font-size:9px;color:var(--muted);text-align:center;padding:5px 2px}
.planner-day-timeline{position:relative;min-width:0}
.planner-day-timeline>.planner-time-ruler{display:none}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .planner-day-timeline>.calendar-markers{position:relative!important;height:calc(var(--planner-hours)*var(--planner-hour-height));background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--planner-hour-height) - 1px),var(--line) calc(var(--planner-hour-height) - 1px),var(--line) var(--planner-hour-height))}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .planner-day-timeline .calendar-marker{position:absolute;min-height:0!important;margin:0;box-sizing:border-box}
body.uniplan-v2 #calendar-grid .planner-untimed{height:var(--planner-untimed-height);padding:5px 3px;border-bottom:1px solid var(--line)}
body.uniplan-v2 #calendar-grid .planner-untimed .calendar-marker{height:50px;margin-bottom:4px;padding:5px!important}
/* To-dos retain their color with a readable date and due time inside every card. */
body.uniplan-v2 #panel-todo .todo-item{padding:16px 14px;border-radius:10px;border-left:3px solid var(--item-color);background:color-mix(in srgb,var(--item-color) 10%,var(--surface-strong));gap:14px}
.planner-todo-due{flex:0 0 auto;min-width:105px;text-align:right;display:grid;gap:3px;margin-left:auto;color:var(--ink)}
.planner-todo-due>span{font-size:11px;color:var(--muted)}
.planner-todo-due>strong{font-size:13px;font-weight:700;letter-spacing:0;line-height:1.4}
.planner-todo-due>small{font-size:8px;letter-spacing:1px;text-transform:uppercase;color:var(--muted)}
@media(max-width:760px),(max-width:1366px) and (any-pointer:coarse){
 #panel-calendar .calendar-header{padding:16px 12px;flex-wrap:wrap;gap:12px}#panel-calendar .calendar-heading h3{font-size:19px}#panel-calendar .calendar-header .nav-actions{gap:4px}
 #panel-calendar .calendar-view-switch{margin:0;width:218px;max-width:100%}
 body.uniplan-v2 #calendar-grid[data-view="week"],body.uniplan-v2 #calendar-grid[data-view="day"]{grid-template-columns:minmax(0,1fr)!important}
 .planner-week-gutter{display:none}
 body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-day-number{justify-content:flex-start;padding:10px 15px!important;font-size:13px!important;background:var(--surface-soft)}
 .planner-day-timeline{display:grid;grid-template-columns:48px minmax(0,1fr)}.planner-day-timeline>.planner-time-ruler{display:flex}
 body.uniplan-v2 #calendar-grid .planner-untimed{height:auto;min-height:0;display:grid;gap:4px;padding:7px 7px 7px 48px}
 body.uniplan-v2 #calendar-grid .planner-untimed .calendar-marker{height:auto;min-height:45px;margin:0}
 body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-day{min-height:80px!important;padding:28px 2px 6px!important}
 body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-marker{padding:4px 2px!important;border-left-width:2px!important}
 body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-marker-row{gap:2px}
 body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-marker-title{font-size:8px!important;line-height:1.2}
 body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-marker-time{font-size:7px!important;line-height:1.25;overflow-wrap:normal}
 body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-marker-check{width:10px!important;height:10px!important;min-width:10px!important;flex-basis:10px!important;font-size:8px;line-height:8px}
 body.uniplan-v2 #panel-todo .todo-item{padding:13px 10px;gap:9px}.planner-todo-due{min-width:84px}.planner-todo-due>strong{font-size:13px}.planner-todo-due>span{font-size:10px}
}
@media(prefers-reduced-motion:reduce){#panel-calendar .calendar-view-switch::before{transition:none}}
/* Only the small view slider captures horizontal drags; the calendar scrolls normally. */
#panel-calendar .calendar-view-switch{touch-action:none}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-marker-title{white-space:nowrap!important;text-overflow:ellipsis;overflow:hidden}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .planner-day-timeline .calendar-marker-time{font-size:9px!important;line-height:1.3}

/* Match the approved mockup's warm paper, quiet type, and unified toolbars.
   Other themes and custom color settings continue to use their own palettes. */
:root[data-theme="classic"][data-mode="light"][data-custom-colors="false"] body:is(:has(#panel-today.is-active),:has(#panel-calendar.is-active),:has(#panel-todo.is-active)){
 --bg:#f7f4ed;--surface:#fffdf8;--surface-strong:#fffdf8;--surface-soft:#f3f4ef;--ink:#263b43;--muted:#7a8385;--line:#e5e7e2;--accent-deep:#386887;--accent-soft:#e1eaf0;background:var(--bg)
}
body:is(:has(#panel-today.is-active),:has(#panel-calendar.is-active),:has(#panel-todo.is-active)) .background-layer{opacity:.06}
.planner-page-eyebrow,#planner-add-item{display:none}
#panel-calendar .calendar-header{display:flex;flex-wrap:wrap;justify-content:space-between;gap:18px;padding:23px 25px}
#panel-calendar .planner-period{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
#panel-calendar .calendar-heading{display:flex;align-items:center;gap:8px}
#panel-calendar .calendar-heading h3{line-height:1.4;font-family:inherit;font-size:19px;font-weight:600;letter-spacing:-.5px;margin:0}
#panel-calendar .nav-actions{display:flex;gap:4px;align-items:center;margin:0}
#panel-calendar .nav-actions button{border:1px solid var(--line);border-radius:8px;background:var(--surface-strong);box-shadow:none;font-size:11px;min-height:31px;padding:6px 10px;color:var(--muted)}
#panel-calendar .nav-actions #prev-month,#panel-calendar .nav-actions #next-month{border:0;font-size:24px;line-height:1;padding:2px 8px;min-width:26px;width:auto}
#panel-calendar .nav-actions #calendar-today{color:var(--ink)}
#panel-calendar .calendar-view-switch{flex:0 0 218px;align-self:center;height:37px;gap:0;isolation:isolate}
#panel-calendar .calendar-view-switch::before{width:calc((100% - 8px)/3);transform:translateX(calc(var(--calendar-view-index,0)*100%))}
#panel-calendar .view-switch-button{font-size:11px;font-weight:500;min-height:0;border-radius:6px}
#panel-calendar .view-switch-button.is-active{font-weight:600}
.planner-calendar-meta{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 24px;min-height:51px}
.planner-calendar-legend{display:flex;flex-wrap:wrap;gap:10px 18px;color:var(--muted);font-size:10px;min-width:0}
.planner-calendar-legend>span{display:flex;align-items:center;gap:6px;max-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.planner-calendar-legend i{display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}
.planner-calendar-filter{display:flex;align-items:center;gap:7px;font-size:10px;color:var(--muted);flex-shrink:0}
.planner-calendar-filter select{border:1px solid var(--line);border-radius:7px;background:var(--surface-strong);font-size:11px;padding:5px;color:var(--ink)}
.planner-calendar-footer{display:flex;justify-content:space-between;gap:12px;padding:15px 24px;font-size:9px;color:var(--muted)}
body.uniplan-v2 #calendar-grid .calendar-day.is-selected{background:color-mix(in srgb,var(--accent-soft) 35%,var(--surface-strong))!important}
body.uniplan-v2 #calendar-grid .calendar-marker{border-left-width:2px!important;background:color-mix(in srgb,var(--item-color) 22%,var(--surface-strong))!important;border-radius:6px;padding:8px 7px!important}
body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-marker{padding:5px!important;border-radius:4px;margin-bottom:3px}
body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-marker-title{font-size:10px!important;font-weight:500}
body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-marker-time{font-size:8px!important;font-weight:500}
body.uniplan-v2 #calendar-grid .calendar-day-number .planner-day-weekday{font-size:9px;font-weight:500;letter-spacing:1px;text-transform:uppercase;color:var(--muted)}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-day-number{flex-direction:column;gap:5px}
body.uniplan-v2 #calendar-grid .calendar-day-number>strong{display:grid;place-items:center;min-width:32px;min-height:32px;font-size:18px;font-weight:500;border-radius:50%}
body.uniplan-v2 #calendar-grid .calendar-day.is-selected .calendar-day-number>strong{background:var(--accent-deep);color:var(--surface-strong)}
/* One to-do surface, with the same date groups and compact colored rows as the mockup. */
body.uniplan-v2 #panel-todo .todo-panel{padding:0;border-radius:16px;overflow:hidden;background:var(--surface-strong);box-shadow:0 8px 28px #263b4305}
.planner-todo-top{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:28px 30px 23px}
.planner-todo-top .panel-label{font-size:9px;letter-spacing:1.7px;color:var(--muted);margin:0 0 8px}
.planner-todo-top h3{font-family:inherit;font-size:19px;font-weight:600;letter-spacing:-.5px;margin:0}
#planner-todo-progress-text{font-size:12px;margin:9px 0 0;color:var(--muted)}
.planner-todo-summary{display:grid;gap:12px;justify-items:end}
#panel-todo .todo-count{background:transparent;color:var(--muted);padding:0;font-size:11px;border:0;font-weight:500}
.planner-progress-track{width:180px;height:5px;background:color-mix(in srgb,var(--muted) 12%,var(--surface-strong));border-radius:9px;overflow:hidden}
.planner-progress-track>span{display:block;background:#8da68b;width:0;height:100%;border-radius:9px;transition:width .2s}
.planner-todo-status{display:flex;width:max-content;max-width:calc(100% - 60px);gap:3px;padding:4px;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft);margin:0 30px 20px}
.planner-todo-status button{font:inherit;font-size:11px;padding:7px 13px;border:0;border-radius:6px;background:none;color:var(--muted)}
.planner-todo-status button[aria-pressed="true"]{background:var(--surface-strong);box-shadow:0 1px 4px #263b4310;color:var(--accent-deep);font-weight:600}
#panel-todo .todo-filters{display:flex;flex-wrap:wrap;gap:14px;padding:0 30px 20px;margin:0;border-bottom:1px solid var(--line)}
#panel-todo .todo-filters .field{display:flex;align-items:center;gap:8px;margin:0;flex:1;min-width:140px}
#panel-todo .todo-filters .field>span{font-size:10px;color:var(--muted);white-space:nowrap}
#panel-todo .todo-filters select{min-width:0;font-size:12px;padding:8px;border-radius:7px;border:1px solid var(--line);background:var(--surface-strong);width:100%;min-height:0}
#panel-todo .school-import-accordion{margin:18px 30px 0;background:var(--surface-soft);border-radius:8px}
#panel-todo .school-import-accordion>summary{font-size:11px;font-weight:500;padding:11px 36px 11px 12px}
#panel-todo .todo-list{display:block;padding:0 30px;max-height:none;overflow:visible}
.planner-task-group{padding-top:23px}
.planner-task-group>h4{font-size:10px;font-weight:500;letter-spacing:1.3px;text-transform:uppercase;color:var(--muted);margin:0 0 10px}
body.uniplan-v2 #panel-todo .todo-item{margin:8px 0;padding:15px 12px;border:0;border-left:3px solid var(--item-color);border-bottom:1px solid var(--line);border-radius:7px;background:color-mix(in srgb,var(--item-color) 9%,var(--surface-strong));gap:14px}
#panel-todo .todo-check{width:17px;height:17px;flex:0 0 17px;border-radius:4px;border-width:1.5px;font-size:11px;line-height:14px}
#panel-todo .todo-copy strong{font-size:13px;font-weight:700;line-height:1.4}
#panel-todo .todo-copy>span{font-size:10px;margin-top:3px}
.planner-todo-open{font:inherit;color:inherit;padding:0;background:none;border:0;cursor:pointer;text-align:left}
.planner-todo-open:hover{color:var(--accent-deep)}
.planner-task-kind{font-size:9px;padding:5px 9px;border-radius:5px;background:color-mix(in srgb,var(--item-color) 22%,var(--surface-strong));flex-shrink:0}
.planner-todo-due{min-width:105px;gap:3px}.planner-todo-due>strong{font-size:13px}.planner-todo-due>span{font-size:11px}
.planner-task-footer{padding:28px 20px;font-size:11px;text-align:center;color:var(--muted)}
#panel-todo #todo-completed{margin:0 30px 25px;border-top:1px solid var(--line);padding-top:18px}
#panel-todo #todo-completed>.todo-list{padding:0}
#panel-todo .todo-list>.empty-state{margin-top:20px}
@media(max-width:1050px){#panel-calendar .calendar-header{gap:15px}.planner-calendar-legend>span{max-width:105px}}
@media(max-width:760px),(max-width:1366px) and (any-pointer:coarse){
 #panel-calendar .calendar-header{padding:18px 15px;gap:16px}#panel-calendar .planner-period{gap:12px;width:100%;justify-content:space-between}#panel-calendar .calendar-heading h3{font-size:17px}#panel-calendar .nav-actions{width:auto!important;gap:2px}#panel-calendar .nav-actions button{padding:5px 7px;font-size:10px}
 #panel-calendar .calendar-view-switch{width:218px;flex-basis:218px}
 .planner-calendar-meta{padding:12px 14px;align-items:flex-start;flex-wrap:wrap;gap:10px}.planner-calendar-legend{font-size:9px;gap:8px 12px}.planner-calendar-filter{margin-left:auto}.planner-calendar-filter select{font-size:12px!important}
 .planner-calendar-footer{padding:13px 14px;font-size:8px}
 body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-day-number{flex-direction:row;gap:9px;justify-content:flex-start;height:58px!important;min-height:58px}
 body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-marker{padding:4px 2px!important}.planner-todo-top{padding:24px 18px}.planner-todo-top h3{font-size:18px}.planner-progress-track{width:80px}.planner-todo-status{margin:0 18px 18px;max-width:calc(100% - 36px)}
 #panel-todo .todo-filters{padding:0 18px 18px;gap:12px}#panel-todo .todo-filters .field{min-width:125px}#panel-todo .todo-filters select{font-size:12px!important}#panel-todo .todo-list{padding:0 18px}#panel-todo .school-import-accordion{margin:16px 18px 0}
 body.uniplan-v2 #panel-todo .todo-item{padding:13px 8px;gap:10px}.planner-task-kind{display:none}.planner-todo-due{min-width:80px}.planner-todo-due>strong{font-size:13px}.planner-todo-due>span{font-size:10px}#panel-todo #todo-completed{margin:0 18px 22px}
}
@media(max-width:420px){#panel-calendar .planner-period{gap:10px;flex-wrap:wrap}#panel-calendar .calendar-heading{width:100%}#panel-calendar .calendar-header .nav-actions{justify-content:flex-start}#panel-calendar .calendar-view-switch{width:100%;flex-basis:100%}.planner-calendar-legend>span{max-width:120px}body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-marker-title{font-size:8px!important}body.uniplan-v2 #calendar-grid[data-view="month"] .calendar-marker-time{font-size:7px!important}}
@media(prefers-reduced-motion:reduce){.planner-progress-track>span{transition:none}}
/* Readable week cards: real overlaps determine width; all days share expanded ticks. */
#panel-todo .todo-filters[hidden]{display:none!important}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .planner-day-timeline>.calendar-markers{height:var(--planner-timeline-height)!important;background:none!important}
#calendar-grid .planner-time-ruler{position:relative;display:block;height:var(--planner-timeline-height)}
#calendar-grid .planner-time-ruler>span{position:absolute;left:0;right:0;height:auto;padding-top:4px;font-size:10px;white-space:nowrap}
.planner-hour-line{position:absolute;left:0;right:0;border-top:1px solid var(--line);pointer-events:none;z-index:0}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .planner-day-timeline .calendar-marker{z-index:1;padding:8px 7px!important}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-marker-title{font-size:12px!important;line-height:1.35;white-space:normal!important;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .planner-day-timeline .calendar-marker-time{font-size:11px!important;line-height:1.35;white-space:normal!important;overflow-wrap:normal}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-marker-row{gap:6px}
body.uniplan-v2 #calendar-grid .planner-untimed .calendar-marker{height:auto;min-height:50px}
/* Hidden desktop rulers must remain hidden inside each day. */
#calendar-grid .planner-day-timeline>.planner-time-ruler{display:none}
@media(max-width:760px),(max-width:1366px) and (any-pointer:coarse){
 #calendar-grid .planner-day-timeline>.planner-time-ruler{display:block}
 #calendar-grid .planner-time-ruler>span{font-size:9px}
}
/* Completion controls get their own space instead of squeezing the title column. */
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .planner-day-timeline .calendar-marker-row{display:block;position:relative}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .planner-day-timeline .calendar-marker-row:has(.calendar-marker-check){padding-top:21px}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .planner-day-timeline .calendar-marker-check{position:absolute;top:0;right:0;margin:0}

/* Today shares the planner's paper surfaces, readable typography and item colors. */
#panel-today .panel-card{border-radius:16px;background:var(--surface-strong);box-shadow:0 8px 28px #263b4305;padding:24px;border:1px solid var(--line)}
#panel-today .v2-week-strip{padding:10px 14px;background:var(--surface-strong);border-radius:16px;gap:5px;margin-bottom:24px}
#panel-today .v2-week-strip button{border-radius:8px;padding:11px 4px;gap:7px;color:var(--muted)}
#panel-today .v2-week-strip button>span{font-size:9px;letter-spacing:1px;font-weight:500}
#panel-today .v2-week-strip button>strong{display:grid;place-items:center;min-width:32px;min-height:32px;margin:auto;border-radius:50%;font-size:18px;font-weight:500}
#panel-today .v2-week-strip button.is-active{background:var(--accent-soft);color:var(--accent-deep)}
#panel-today .v2-week-strip button.is-active>strong{background:var(--accent-deep);color:var(--surface-strong)}
#panel-today .v2-today-columns{gap:22px;align-items:start}
#panel-today .v2-today-columns>div{display:grid;gap:22px}
#panel-today .v2-today-columns :is(.v2-up-next,.v2-next-exam,.v2-attention-card){flex:initial}
#panel-today .panel-label{font-size:9px;font-weight:600;letter-spacing:1.7px;color:var(--muted);margin:0 0 16px}
#panel-today .panel-header{align-items:center;gap:14px;margin-bottom:18px}
#panel-today .panel-header h3{font-family:inherit;font-size:19px;font-weight:600;letter-spacing:-.5px;margin:0}
#panel-today .small-button{font-size:11px;font-weight:500;padding:8px 11px;border-radius:8px;border:1px solid var(--line);background:var(--surface-strong);color:var(--muted);box-shadow:none;white-space:normal}
#panel-today .v2-up-next{background:var(--surface-strong);border-color:var(--line)}
#panel-today .v2-up-next h2{font-family:inherit;font-weight:500;font-size:22px;letter-spacing:-.5px}
#panel-today #v2-up-next .v2-preview-item:first-child{padding:0 0 18px}
#panel-today #v2-up-next .v2-preview-item:first-child strong{font-family:inherit;font-size:24px;line-height:1.35;font-weight:600;letter-spacing:-.6px}
#panel-today #v2-up-next .v2-preview-item:not(:first-child) strong{font-size:14px;font-weight:600;line-height:1.45}
#panel-today .v2-preview-item{gap:7px;padding:15px 0}
#panel-today .v2-preview-item .v2-item-type{font-size:9px;letter-spacing:1px;line-height:1.6}
#panel-today .v2-preview-item .settings-note{font-size:11px;line-height:1.6}
#panel-today #v2-next-exam .v2-preview-item strong{font-family:inherit;font-size:14px;line-height:1.45;font-weight:600}
#panel-today .v2-agenda-item{gap:14px;padding:15px 12px;margin:8px 0;border-radius:7px;border:0;border-left:3px solid var(--item-color);border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--item-color) 9%,var(--surface-strong));align-items:center}
#panel-today .todo-check{width:17px;height:17px;flex:0 0 17px;border-radius:4px;border-width:1.5px;font-size:11px;line-height:14px}
#panel-today .v2-item-content{gap:4px;flex:1;min-width:0;width:auto}
#panel-today .v2-item-content strong{font-size:13px;font-weight:600;line-height:1.45;white-space:normal;overflow-wrap:anywhere}
#panel-today .v2-item-content small{font-size:10px;line-height:1.55}
#panel-today .v2-item-type{font-size:8px;letter-spacing:1px;line-height:1.5}
.planner-today-time{flex:0 0 115px;max-width:35%;display:grid;gap:5px;text-align:right;color:var(--ink)}
.planner-today-time time{font-size:13px;font-weight:600;line-height:1.5;white-space:normal}
.planner-today-time>span{font-size:10px;color:var(--muted);line-height:1.5}
#panel-today #v2-attention .v2-agenda-item{align-items:flex-start}
#panel-today .v2-full-day{margin-top:24px;padding:0;overflow:hidden}
#panel-today .v2-full-day>.panel-header{padding:23px 24px 0;margin-bottom:8px}
#panel-today #v2-agenda-date{margin:0;padding:0 24px 20px;border-bottom:1px solid var(--line);font-size:11px;color:var(--muted)}
#panel-today #v2-day-list,#panel-today #v2-day-completed{display:block;padding:16px 24px;max-height:none;overflow:visible}
#panel-today .v2-full-day>.completed-section{margin:0 24px 23px;padding-top:18px;border-color:var(--line)}
#panel-today .v2-full-day>.completed-section>#v2-day-completed{padding:8px 0 0}
#panel-today .completed-section>summary{font-size:11px;color:var(--muted)}
#panel-today .empty-state{font-size:12px;border-radius:8px;color:var(--muted)}
#panel-today>.connector-promo{border-radius:16px;padding:20px 24px}
@media(max-width:1100px){#panel-today .v2-today-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.planner-today-time{flex-basis:96px}}
@media(max-width:760px),(max-width:1366px) and (any-pointer:coarse){
 #panel-today .panel-card{padding:20px 18px}#panel-today .v2-week-strip{padding:7px;gap:3px;margin-bottom:20px}#panel-today .v2-week-strip button{padding:10px 2px}#panel-today .v2-week-strip button>span{font-size:8px}#panel-today .v2-week-strip button>strong{font-size:17px}
 #panel-today .v2-today-columns{grid-template-columns:minmax(0,1fr);gap:18px}#panel-today .v2-today-columns>div{gap:18px}#panel-today .panel-header h3{font-size:18px}
 #panel-today #v2-up-next .v2-preview-item:first-child strong{font-size:23px}#panel-today .v2-agenda-item{gap:10px;padding:13px 9px}#panel-today .v2-item-content strong{font-size:13px}.planner-today-time{flex-basis:90px}.planner-today-time time{font-size:12px}.planner-today-time>span{font-size:9px}
 #panel-today .v2-full-day{margin-top:20px;padding:0}#panel-today .v2-full-day>.panel-header{padding:20px 18px 0}#panel-today #v2-agenda-date{padding:0 18px 18px}#panel-today #v2-day-list,#panel-today #v2-day-completed{padding:12px 18px}#panel-today .v2-full-day>.completed-section{margin:0 18px 20px}#panel-today .v2-full-day>.completed-section>#v2-day-completed{padding:8px 0 0}
}
#panel-today .v2-preview-item{border:0;border-left:2px solid var(--item-color,var(--accent));border-radius:7px;background:color-mix(in srgb,var(--item-color,var(--accent)) 9%,var(--surface-strong));padding:14px 12px;margin:8px 0!important}
#panel-today #v2-up-next .v2-preview-item:first-child{padding:16px 12px}
#panel-today .v2-item-content small:empty{display:none}

/* Keep planner typography on the same rounded family as the rest of the app. */
body.uniplan-v2 .app-shell :is(h1,h2,h3,h4){font-family:inherit}
#panel-calendar .calendar-heading h3,.planner-todo-top h3,#panel-today .panel-header h3{letter-spacing:0}
#panel-today #v2-up-next .v2-preview-item:first-child strong{letter-spacing:0;font-weight:600}

/* Keep time labels solid rather than fading small glyphs. */
body.uniplan-v2 #calendar-grid .calendar-marker-time{opacity:1}

/* Compact page rhythm across every planner section. */
body.uniplan-v2 .v2-main{padding-top:20px}
body.uniplan-v2 .v2-topline{margin-bottom:16px}
body.uniplan-v2 .v2-heading{margin:0 0 16px}
body.uniplan-v2 .planner-page-eyebrow{display:none}
body.uniplan-v2 #v2-date{font-family:inherit;font-size:clamp(23px,2.4vw,30px);line-height:1.2;margin:0 0 5px}
body.uniplan-v2 #v2-section-description{font-size:12px;line-height:1.4}
body.uniplan-v2 #v2-sync-status{margin-top:3px}
body.uniplan-v2 #planner-add-item{top:4px}
#panel-today .v2-week-strip{padding:6px 10px;margin-bottom:14px}
#panel-today .v2-week-strip button{padding:7px 4px;gap:4px}
#panel-today .v2-today-columns,#panel-today .v2-today-columns>div{gap:14px}
#panel-today .panel-card{padding:18px}
#panel-today .panel-header{margin-bottom:12px}
#panel-today>.v2-full-day{margin-top:14px;padding:0}
#panel-today .v2-full-day>.panel-header{padding:18px 18px 0}
#panel-today #v2-agenda-date{padding:0 18px 12px}
#panel-today #v2-day-list,#panel-today #v2-day-completed{padding:12px 18px}
#panel-today .v2-full-day>.completed-section{margin:0 18px 16px;padding-top:12px}
@media(max-width:760px),(max-width:1366px) and (any-pointer:coarse){
 body.uniplan-v2 .v2-main{padding-top:14px}
 body.uniplan-v2 .v2-topline{margin-bottom:14px}
 body.uniplan-v2 .v2-heading{padding-right:0;margin:0 0 14px}
 body.uniplan-v2 #v2-date{font-size:24px;letter-spacing:-.4px}
 body.uniplan-v2 #planner-add-item{position:static;width:max-content;margin-top:10px}
 #panel-today .v2-week-strip{padding:5px;margin-bottom:12px}
 #panel-today .v2-week-strip button{padding:6px 2px}
 #panel-today .v2-today-columns,#panel-today .v2-today-columns>div{gap:12px}
 #panel-today>.v2-full-day{margin-top:12px}
}

/* Keep page context in the toolbar rather than a separate hero header. */
body.uniplan-v2 .v2-topline{align-items:center;gap:12px;margin-bottom:14px}
.v2-page-context{min-width:0;display:grid;gap:4px}
body.uniplan-v2 .v2-heading{margin:0;padding:0}
body.uniplan-v2 #v2-date{font-size:22px;line-height:1.25;margin:0;letter-spacing:-.4px}
body.uniplan-v2 #v2-section-description{display:none}
body.uniplan-v2 #v2-sync-status{font-size:10px;line-height:1.3;margin:3px 0 0}
body.uniplan-v2 .v2-actions{flex-shrink:0}
@media(max-width:760px),(max-width:1366px) and (any-pointer:coarse){
 body.uniplan-v2 .v2-topline{flex-wrap:wrap;gap:10px;margin-bottom:12px}
 body.uniplan-v2 .v2-topline>.v2-mobile-brand{order:0}
 body.uniplan-v2 .v2-actions{order:1;margin-left:auto}
 body.uniplan-v2 .v2-page-context{order:2;flex-basis:100%;gap:4px}
 body.uniplan-v2 .v2-breadcrumb{display:block;font-size:11px}
 body.uniplan-v2 #v2-date{font-size:21px}
}


/* Collection lists share the compact To-Do completion control. */
body.uniplan-v2 .item-card .collection-status-check{
 width:20px;height:20px;min-width:20px;min-height:20px;flex:0 0 20px;
 padding:0;align-self:center;border:1.5px solid var(--item-color,var(--accent));
 border-radius:4px;background:transparent;box-shadow:none;
 font-size:13px;font-weight:700;line-height:17px;color:var(--surface-strong);
}
body.uniplan-v2 .item-card.is-complete .collection-status-check{background:var(--item-color,var(--accent))}

/* Completion is a filled circle, shared by every planner list. */
body.uniplan-v2 :is(#panel-todo,#panel-today,.item-card) .todo-check,
body.uniplan-v2 #calendar-grid .calendar-marker-check{
 border-radius:50%;font-size:0!important;color:transparent!important;
}
body.uniplan-v2 :is(.todo-item,.v2-agenda-item,.item-card).is-complete .todo-check{
 background:var(--item-color,var(--accent));
}

/* Week and Day highlight only the date number, keeping the agenda surface clear. */
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-day.is-selected{
 background:transparent!important;box-shadow:none;
}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-day-number{
 background:transparent!important;color:var(--ink)!important;box-shadow:none!important;
}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-day-number>strong{
 width:32px;height:32px;flex:0 0 32px;border-radius:50%;
}
body.uniplan-v2 #calendar-grid:not([data-view="month"]) .calendar-day.is-today:not(.is-selected) .calendar-day-number>strong{
 background:var(--accent-soft);color:var(--accent-deep);
}

/* Mobile week uses a compact vertical agenda; Day retains its readable time gutter. */
@media(max-width:760px),(max-width:1366px) and (any-pointer:coarse){
 body.uniplan-v2 #calendar-grid[data-view="week"]{
  grid-template-columns:minmax(0,1fr)!important;overflow:visible;
  touch-action:pan-y pinch-zoom;padding-bottom:0!important;
 }
 #calendar-grid[data-view="week"] .planner-week-gutter{display:none}
 body.uniplan-v2 #calendar-grid[data-view="week"] .calendar-day{
  display:grid!important;grid-template-columns:40px minmax(0,1fr);
  gap:0 8px;padding:14px 8px!important;
 }
 body.uniplan-v2 #calendar-grid[data-view="week"] .calendar-day-number{
  grid-column:1;grid-row:1 / span 2;flex-direction:column;
  justify-content:flex-start;align-self:start;gap:5px;
  height:auto!important;min-height:0;padding:6px 0!important;
  border-bottom:0;
 }
 body.uniplan-v2 #calendar-grid[data-view="week"] .planner-untimed{
  grid-column:2;grid-row:1;height:auto;padding:0 0 10px;
 }
 #calendar-grid[data-view="week"] .planner-day-timeline{
  grid-column:2;grid-row:2;display:block;
 }
 #calendar-grid[data-view="week"] .planner-day-timeline>.planner-time-ruler{display:none}
 body.uniplan-v2 #calendar-grid[data-view="week"] .calendar-day-number>strong{font-size:20px}
 body.uniplan-v2 #calendar-grid[data-view="day"]{padding-bottom:16px!important}
 body.uniplan-v2 #calendar-grid[data-view="day"] .calendar-day-number{
  height:60px!important;min-height:60px;flex-direction:row;gap:10px;
  justify-content:flex-start;padding:10px 16px!important;line-height:1.3;overflow:visible;
 }
 #calendar-grid[data-view="day"] .planner-day-timeline{grid-template-columns:64px minmax(0,1fr)}
 body.uniplan-v2 #calendar-grid[data-view="day"] .planner-untimed{padding-left:64px}
 #calendar-grid:not([data-view="month"]) .planner-time-ruler>span{
  font-size:10px;line-height:1.4;padding:4px 6px;text-align:right;overflow:visible;
 }
 body.uniplan-v2 #calendar-grid[data-view="day"] .calendar-day-number>strong{
  display:grid;place-items:center;line-height:1;width:32px;height:32px;min-height:32px;
 }
}

/* Reset the older mobile full-bleed panel so the first column stays inside the viewport. */
@media(max-width:760px),(max-width:1366px) and (any-pointer:coarse){
 body.uniplan-v2 #panel-calendar .calendar-panel{
  width:100%;max-width:100%;min-width:0;margin-inline:0;
 }
 body.uniplan-v2 #calendar-grid[data-view="month"]{
  width:100%;max-width:100%;margin-inline:0;
 }
}

#panel-today .planner-attention-badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:3px}
#panel-today .planner-attention-badges>span{padding:2px 7px;border-radius:999px;font-size:10px;font-weight:700;line-height:1.35}
#panel-today .planner-attention-badges>.priority-label{background:#c93434;color:#fff}
#panel-today .planner-attention-badges>.todo-overdue{background:#fde8e7;color:#922323}

/* Deadline rows grow to fit long assignment and quiz names. */
body.uniplan-v2 #calendar-grid .planner-untimed .calendar-marker{height:auto;max-height:none;overflow:visible}
body.uniplan-v2 #calendar-grid .planner-untimed .calendar-marker-row{align-items:flex-start}
body.uniplan-v2 #calendar-grid .planner-untimed .calendar-marker-title,
body.uniplan-v2 #calendar-grid .planner-untimed .calendar-marker-time{white-space:normal!important;overflow:visible;overflow-wrap:anywhere}
#chat-settings,#connected-ai-apps{min-width:0}

/* Keep settings compact without adding more layers of controls. */
#panel-settings #settings-form{gap:14px}
#panel-settings :is(.settings-accordion,.customization-dropdown){padding:14px;border-radius:12px}
#panel-settings :is(.settings-accordion,.customization-dropdown)>summary{font-size:14px;min-height:24px}
#panel-settings .customization-heading p{margin:0}
#panel-settings .customization-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:540px){#panel-settings .customization-controls{grid-template-columns:1fr}}

/* Give supporting card text a little more weight without increasing its size. */
#panel-today .v2-item-type{font-weight:600}
#panel-today .v2-preview-item .settings-note,
#panel-today .v2-item-content small,
#panel-today .planner-today-time>span{font-weight:500}

#panel-settings .account-profile-fields{display:grid;gap:14px;margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid var(--line)}
#panel-settings .account-profile-fields>button{justify-self:start}
#panel-settings .customization-presets{margin-top:14px}
#panel-settings #chat-settings{margin-top:16px}
#panel-settings #chat-settings .pet-settings{border:0;background:transparent;padding:12px 0 0;margin:0}
#panel-settings #chat-settings .pet-settings h3{font-size:16px;margin:0 0 6px}
#panel-settings #chat-settings .pet-settings p{font-size:12px;line-height:1.5}

.photo-showcase{display:grid;place-items:center;min-height:60vh;padding:12px;background:var(--surface-strong);border:1px solid var(--line);border-radius:16px}
#planner-showcase-photo{display:block;max-width:100%;width:auto;height:auto;max-height:calc(100dvh - 180px);object-fit:contain;border-radius:8px}
@media(max-width:760px){#planner-showcase-photo{max-height:calc(100dvh - 240px)}}

body.uniplan-v2 .v2-actions #open-settings svg{width:28px;height:28px;flex-shrink:0}
body.uniplan-v2 .v2-actions #open-settings{padding:7px}
@media(max-width:760px),(max-width:1366px) and (any-pointer:coarse){body.uniplan-v2 .v2-actions #open-settings svg{width:26px;height:26px}}

/* Mobile Week is a compact agenda rather than a spaced hourly timeline. */
@media(max-width:760px),(max-width:1366px) and (any-pointer:coarse){
 body.uniplan-v2 #calendar-grid[data-view="week"] .calendar-day{padding:10px 6px!important;gap:0 6px}
 body.uniplan-v2 #calendar-grid[data-view="week"] .planner-day-timeline>.calendar-markers{
  height:auto!important;display:grid!important;gap:5px;
 }
 body.uniplan-v2 #calendar-grid[data-view="week"] .planner-day-timeline .calendar-marker{
  position:static!important;top:auto!important;left:auto!important;
  width:100%!important;height:auto!important;margin:0;padding:8px!important;
 }
 #calendar-grid[data-view="week"] .planner-hour-line{display:none}
 body.uniplan-v2 #calendar-grid[data-view="week"] .planner-day-timeline .calendar-marker-row{
  display:flex;align-items:flex-start;gap:7px;padding-top:0;
 }
 body.uniplan-v2 #calendar-grid[data-view="week"] .planner-day-timeline .calendar-marker-check{
  position:static;flex-shrink:0;margin-top:2px;
 }
 body.uniplan-v2 #calendar-grid[data-view="week"] .planner-day-timeline .calendar-marker-row:has(.calendar-marker-check){padding-top:0}
 body.uniplan-v2 #calendar-grid[data-view="week"] .calendar-marker-title{font-size:12px!important;line-height:1.3}
 body.uniplan-v2 #calendar-grid[data-view="week"] .calendar-marker-time{font-size:10px!important;margin-top:3px}
 body.uniplan-v2 #calendar-grid[data-view="week"] .planner-untimed:empty{display:none}
}

#panel-todo .school-import-accordion>summary,
#panel-todo .planner-task-group>h4,
#panel-todo .planner-todo-due>span{font-weight:700}
