/* Geometry is independent of theme paint and typography. */
html body dialog.week-dialog {box-sizing:border-box!important;width:min(760px,calc(100vw - 48px))!important;height:min(620px,80dvh)!important;min-height:0!important;max-width:760px!important;max-height:80dvh!important;padding:24px!important;border-width:1px!important}
html body dialog.panel-fullscreen-dialog {box-sizing:border-box!important;width:min(1040px,calc(100vw - 64px))!important;height:min(700px,78dvh)!important;min-height:0!important;max-width:1040px!important;max-height:80dvh!important;padding:16px!important;border-width:1px!important}
.soft-intro {position:relative}
.dashboard-clock {position:absolute;z-index:2;inset-inline-start:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:2px;pointer-events:none;color:var(--text)}
.dashboard-clock time {font-size:1.25rem;font-weight:650;font-variant-numeric:tabular-nums;line-height:1.15;white-space:nowrap}
.dashboard-clock>span {font-size:.69rem;color:var(--text-muted);white-space:nowrap}
/* Synthwave: stronger cyan/magenta tubes, solid controls and luminous horizon. */
html[data-theme=synth] body :is(#daysPanel,#activeDayPanel,#chatPanel,#card-discord,#card-subtasks-mandatory,#card-subtasks-general,.panel,.draggable-card,.snap-card,.kpi-card,.swaga-right-panel,.soft-sidebar,.weekly-plan-panel) {transition:none!important;border-color:#d36aff99!important;box-shadow:inset 0 0 0 1px #72edff18,0 0 6px #d35dff55,0 0 21px #c448db26!important}
html[data-theme=synth] body :is(.side-sub-header,.panel-title,.soft-intro h1,.dashboard-clock time) {color:#92f4ff!important;text-shadow:0 0 8px #3de4ff80,0 0 18px #6cecff40}
html[data-theme=synth] body :is(button.btn-cyan,button.btn-cyan-pill,.swaga-send-btn) {background:#f19bda!important;color:#29112c!important;border-color:#ffcbf1!important;box-shadow:0 0 8px #ff76d966,0 0 18px #e45fc73d!important}
html[data-theme=synth] .theme-scenery>i:nth-child(1) {box-shadow:0 0 65px #ff6ba64d,0 0 130px #d34cff30}
html[data-theme=synth] .theme-scenery>i:nth-child(2) {background-image:linear-gradient(#f775e180 1px,transparent 1px),linear-gradient(90deg,#66e9ff75 1px,transparent 1px)}
/* Studio: blue workspace, mint discipline, violet projects and coral conversation. */
html[data-theme=studio] body #daysPanel {--studio-color:#8dbbff;--studio-ink:#15243a}
html[data-theme=studio] body :is(#activeDayPanel,.weekly-plan-panel) {--studio-color:#85ddd0;--studio-ink:#142c29}
html[data-theme=studio] body #card-subtasks-mandatory {--studio-color:#f3c780;--studio-ink:#332817}
html[data-theme=studio] body #card-subtasks-general {--studio-color:#b8a2f4;--studio-ink:#281d3d}
html[data-theme=studio] body #chatPanel {--studio-color:#ffa196;--studio-ink:#291b1a}
html[data-theme=studio] body .monthly-overview {--studio-color:#8dbbff;--studio-ink:#15243a}
html[data-theme=studio] body :is(#daysPanel,#activeDayPanel,#card-subtasks-mandatory,#card-subtasks-general,#chatPanel,.monthly-overview,.weekly-plan-panel) {border-color:color-mix(in srgb,var(--studio-color) 45%,#54616f)!important;box-shadow:inset 0 1px 0 color-mix(in srgb,var(--studio-color) 30%,transparent),0 8px 24px #00000044!important}
html[data-theme=studio] body :is(#daysPanel,#activeDayPanel,#card-subtasks-mandatory,#card-subtasks-general,#chatPanel,.monthly-overview) :is(.panel-title,.side-sub-header,.day-pts-badge,.swaga-model-badge,.week-card-head h2) {color:var(--studio-color)!important}
html[data-theme=studio] body :is(#daysPanel,#activeDayPanel,#card-subtasks-mandatory,#card-subtasks-general,#chatPanel) :is(button.btn-mini.btn-cyan,button.btn-mini.btn-cyan-pill,.swaga-send-btn) {background:var(--studio-color)!important;border-color:var(--studio-color)!important;color:var(--studio-ink)!important;box-shadow:inset 0 1px 0 #ffffff55,0 0 12px color-mix(in srgb,var(--studio-color) 26%,transparent)!important}
html[data-theme=studio] body .kpi-card:first-child {border-color:#8dbbff77!important}
html[data-theme=studio] body .kpi-card:nth-child(2) {border-color:#85ddd077!important}
html[data-theme=studio] body .dashboard-clock time {color:#b1cfff}
@media(max-width:800px){.dashboard-clock{position:static;transform:none;margin-inline:auto}.dashboard-clock time{font-size:1rem}.dashboard-clock>span{font-size:.6rem}html body dialog.week-dialog{width:calc(100vw - 24px)!important;padding:16px!important}html body dialog.panel-fullscreen-dialog{width:calc(100vw - 24px)!important}}
/* Reserve the same layout space for fonts, thick outlines and shadows in every theme. */
@media(min-width:1501px){
 html[data-theme] body .app-layout-wrapper {border-width:1px!important}
 html[data-theme=pop] body .app-layout-wrapper {outline:2px solid #101010;outline-offset:-3px}
 html[data-theme] body header {box-sizing:border-box!important;height:clamp(68px,5.85dvh,84px)!important;min-height:clamp(68px,5.85dvh,84px)!important;max-height:clamp(68px,5.85dvh,84px)!important;padding:12px 0!important;flex-shrink:0}
 html[data-theme] body .soft-intro {box-sizing:border-box!important;height:clamp(48px,4.45dvh,64px)!important;min-height:clamp(48px,4.45dvh,64px)!important;max-height:clamp(48px,4.45dvh,64px)!important;flex-shrink:0}
 html[data-theme] body .kpi-grid,html[data-theme] body .kpi-card {box-sizing:border-box!important;height:clamp(92px,9.25dvh,133px)!important;min-height:0!important;max-height:clamp(92px,9.25dvh,133px)!important;flex-shrink:0}
 html[data-theme] body .kpi-bar>.rules-note {height:auto!important;min-height:0!important;max-height:none!important;flex-shrink:0}
 html[data-theme] body .cockpit-4col-grid {padding:0 0 12px!important;box-sizing:border-box!important}
 html[data-theme] body .cockpit-4col-grid>.snap-grid {padding:0!important;box-sizing:border-box!important}
 html[data-theme] body :is(#daysPanel,#activeDayPanel,#chatPanel,#card-discord,#card-subtasks-mandatory,#card-subtasks-general,.snap-card,.weekly-plan-panel):not([data-scene-moving]) {rotate:0deg!important;transform:none!important}
}
html[data-theme] body :is(.snap-grid,.custom-space) {gap:18px!important}

/* Theme choices keep identical geometry, including labels that wrap to two lines. */
html[data-theme] body .appearance-menu>.theme-options {box-sizing:border-box!important;width:min(360px,calc(100vw - 32px))!important;max-width:360px!important;padding:16px!important;border-width:1px!important}
html[data-theme] body .theme-swatches {grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-auto-rows:minmax(84px,1fr)!important;gap:8px!important}
html[data-theme] body .theme-swatches>button {box-sizing:border-box!important;width:100%!important;height:auto!important;min-height:84px!important;max-height:none!important;min-width:0!important;margin:0!important;padding:8px 3px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:6px!important;border-radius:12px!important;rotate:0deg!important;transform:none!important}
html[data-theme] body .theme-swatches>button>i {box-sizing:border-box!important;flex:0 0 28px!important;width:28px!important;height:28px!important;min-height:28px!important;max-height:28px!important;border-width:6px!important;border-radius:50%!important}
html[data-theme] body .theme-swatches>button>span {display:block!important;width:100%!important;min-height:28px!important;height:auto!important;font-size:11px!important;line-height:14px!important;text-align:center!important;white-space:normal!important;overflow-wrap:anywhere!important}
html[data-theme] body .theme-swatches>button.theme-premium {grid-column:span 2;min-height:92px!important;gap:4px!important}
html[data-theme] body .theme-swatches>button.theme-premium>span {min-height:0!important}
html[data-theme] body .theme-swatches .theme-premium-badge {
 padding:1px 6px;border:1px solid #a67528;border-radius:5px;
 background:#ffdd97;color:#392307;font:700 10px/14px system-ui,sans-serif;
}
/* Taller standard dialogs, with dashboard previews retained underneath. */
html body dialog.panel-fullscreen-dialog {height:min(910px,90dvh)!important;max-height:90dvh!important}
.panel-visual-preview {pointer-events:none!important;transition:none!important;animation:none!important}
html body #activeDayPanel .day-tools-dock {position:relative!important;display:block!important;flex:0 0 30px!important;height:30px!important;min-height:30px!important;max-height:30px!important;overflow:visible!important;margin-top:6px}
html body .day-tools-dock>.time-ring-card {display:none!important}
html body .day-notes-dock {position:absolute!important;inset:auto 0 0!important;display:block!important;height:30px;min-height:0!important;padding:0!important;z-index:5}
html body .notes-dock-toggle {width:100%;height:30px;min-height:30px!important;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;padding:5px 8px!important;border:1px solid var(--border);border-radius:8px!important;background:var(--card)!important;color:var(--text)!important;font:inherit;cursor:pointer}
html body .notes-drawer-content {position:absolute;bottom:29px;left:0;right:0;box-sizing:border-box;padding:9px;background:var(--card);border:1px solid var(--border);border-radius:10px 10px 0 0;box-shadow:0 -8px 24px #0003;opacity:0;transform:translateY(8px);pointer-events:none;visibility:hidden;transition:opacity 180ms ease-out,transform 180ms ease-out,visibility 180ms}
html body .notes-drawer-content #dayNotesInput {height:140px!important;min-height:140px!important;max-height:220px!important;width:100%;box-sizing:border-box;resize:vertical}
html body .notes-dock-toggle:focus-visible {outline:2px solid var(--cyan);outline-offset:2px}
@media(prefers-reduced-motion:reduce){html body .notes-drawer-content{transition:none}}
@media(max-width:600px){html body dialog.panel-fullscreen-dialog{height:90dvh!important}}
/* Pointer leaving the notes region always retracts it, regardless of focus. */
html body .day-notes-dock:not(.notes-open) .notes-drawer-content {opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translateY(8px)!important}
html body .day-notes-dock.notes-open .notes-drawer-content {opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important}
html body .panel-expanded.monthly-overview .mountain-chart {flex:1!important;height:100%!important;min-height:0!important;max-height:none!important;display:block!important}
html body .panel-expanded.monthly-overview .mountain-chart>svg {width:100%!important;height:100%!important;max-height:none!important}
html body #card-discord.panel-expanded {display:flex!important;flex-direction:column!important}
html body #card-discord.panel-expanded textarea {flex:1!important;height:100%!important;min-height:0!important;max-height:none!important}
html body .panel-expanded>.side-sub-header {flex-shrink:0}
html body .panel-expanded>.catalog-chart {flex:1!important;min-height:0!important;height:auto!important}

html body .panel-openable:focus-visible {outline:2px solid var(--cyan);outline-offset:2px}
