/* Batch 2. Pixel preview and integer grid occupancy are independent. */
.personal-components .workspace-canvas-grid{position:relative}
#widgets .canvas-resize-handle{display:block;width:44px;height:44px;min-width:44px;min-height:44px!important;bottom:48px;right:0;z-index:8;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border:0;border-radius:12px 0 var(--r-large) 0;background:linear-gradient(135deg,transparent 34%,color-mix(in srgb,var(--surface) 80%,var(--accent)) 36%);font-size:21px!important}
#widgets .canvas-resize-handle:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.canvas-resize-placeholder{min-width:0;min-height:0;box-sizing:border-box;pointer-events:none;border:2px dashed var(--accent);border-radius:var(--r-large);background:color-mix(in srgb,var(--accent) 12%,transparent)}
#widgets>.canvas-live-resize{position:absolute!important;left:var(--canvas-resize-x)!important;top:var(--canvas-resize-y)!important;width:var(--canvas-resize-width)!important;height:var(--canvas-resize-height)!important;max-width:none!important;grid-column:auto!important;grid-row:auto!important;z-index:7;transform:none!important;animation:none!important;transition:none!important}
#widgets>.canvas-live-resize>.plugin-content{transition:none!important}
.canvas-resizing{overflow-anchor:none}
.canvas-size-hint{font-size:12px;line-height:1.6;color:var(--muted);margin:12px 0}
#widgets .canvas-size-live{right:54px;max-width:calc(100% - 62px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#widgets>.plugin-borderless:not(.plugin-expanded)>.plugin-content{scrollbar-width:thin}
#widgets>.plugin-borderless:not(.plugin-expanded)>.plugin-content:has(>.plugin-summary){display:flex;flex-direction:column;overflow:hidden}
#widgets>.plugin-borderless:not(.plugin-expanded) .plugin-summary{flex:1;min-height:0;min-width:0;height:auto}
#widgets>.plugin-borderless:not(.plugin-expanded) .plugin-empty{min-height:0;height:100%;box-sizing:border-box;padding:6px;gap:6px;font-size:13px;overflow:auto}
#widgets>.plugin-borderless:not(.plugin-expanded) .plugin-empty p{line-height:1.4;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#widgets>.plugin-borderless:not(.plugin-expanded) .plugin-empty button{min-height:44px;max-width:100%;padding:6px 10px}
#widgets>.plugin-borderless:not(.plugin-expanded) .plugin-message:not([hidden]){max-height:60px;flex:none;overflow:auto;line-height:1.5;font-size:12px}
#widgets>.plugin-borderless[data-plugin-kind=note]:not(.plugin-expanded)>.plugin-content{display:flex;flex-direction:column}
#widgets>.plugin-borderless[data-plugin-kind=note]:not(.plugin-expanded) textarea{max-width:80ch;width:100%;flex:1;align-self:center;margin:0 auto;font-size:14px;line-height:1.7}

/* Weather summary only. The detail charts remain a separate batch. */
#widgets>.plugin-borderless:not(.plugin-expanded) .weather-snapshot{display:flex;flex-direction:column;justify-content:flex-start;gap:10px;min-height:0;padding:12px 14px;overflow:auto;scrollbar-width:thin}
#widgets>.plugin-borderless:not(.plugin-expanded) .weather-card-top{gap:12px;flex:none;align-items:center}
#widgets>.plugin-borderless:not(.plugin-expanded) .weather-card-city{font-size:14px;line-height:1.4;min-width:0;overflow-wrap:anywhere}
#widgets>.plugin-borderless:not(.plugin-expanded) .weather-card-temp{font-size:42px;line-height:1.1;margin:4px 0 0;font-variant-numeric:tabular-nums}
#widgets>.plugin-borderless:not(.plugin-expanded) .weather-card-condition{display:grid;grid-template-columns:30px auto;align-items:center;justify-items:end;gap:4px 7px;font-size:14px;line-height:1.4;min-width:0}
#widgets>.plugin-borderless:not(.plugin-expanded) .weather-card-condition>svg{grid-row:1/3;width:28px;height:28px}
#widgets>.plugin-borderless:not(.plugin-expanded) .weather-summary-range{font-size:12px;grid-column:2;line-height:1.4}
#widgets>.plugin-borderless:not(.plugin-expanded) .weather-mini-days{display:grid!important;gap:6px;margin:0;flex:none;font-size:12px;padding:10px 0;border-top:1px solid #ffffff24}
#widgets>.plugin-borderless:not(.plugin-expanded) .weather-mini-days>span{min-width:0;gap:5px;white-space:normal;line-height:1.3}
#widgets>.plugin-borderless:not(.plugin-expanded) .weather-mini-days b{font-weight:500}
.weather-summary-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 12px;padding:12px 0;border-top:1px solid #ffffff24;text-align:left}
.weather-summary-metrics>span{min-width:0;display:grid;gap:5px;overflow-wrap:anywhere}.weather-summary-metrics small{font-size:12px;opacity:.8}.weather-summary-metrics strong{font-size:15px;font-weight:500}
.weather-summary-updated{font-size:12px;line-height:1.5;opacity:.8;text-align:left;margin-top:auto}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .weather-snapshot{gap:4px;padding:7px 10px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .weather-card-temp{font-size:29px;margin:1px 0 0}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .weather-card-city{font-size:13px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .weather-card-condition{font-size:12px;gap:2px 6px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .weather-card-condition>svg{width:24px;height:24px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .weather-summary-range{font-size:11px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .weather-mini-days{padding:3px 0 0;border:0;font-size:11px;gap:3px;margin-top:auto}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .weather-mini-days>span{gap:2px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .weather-mini-days svg{width:17px;height:17px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) :is(.weather-summary-metrics,.weather-summary-updated){display:none}
#widgets>.plugin-borderless[data-plugin-height=medium]:not(.plugin-expanded) .weather-summary-metrics>span:nth-child(n+5){display:none}
#widgets>.plugin-borderless[data-plugin-width=narrow]:not(.plugin-expanded) .weather-card-top{flex-direction:column;align-items:flex-start;gap:8px}
#widgets>.plugin-borderless[data-plugin-width=narrow]:not(.plugin-expanded) .weather-card-condition{justify-items:start;grid-template-columns:24px minmax(0,1fr);text-align:left}
#widgets>.plugin-borderless[data-plugin-width=narrow]:not(.plugin-expanded) .weather-mini-days{display:none!important}
#widgets>.plugin-borderless[data-plugin-width=narrow]:not(.plugin-expanded) .weather-summary-metrics{grid-template-columns:1fr;gap:12px}
#widgets>.plugin-borderless[data-plugin-width=narrow][data-plugin-height=short]:not(.plugin-expanded) .weather-card-top{gap:5px}
#widgets>.plugin-borderless[data-plugin-width=narrow][data-plugin-height=short]:not(.plugin-expanded) .weather-card-condition{display:flex;gap:5px}
#widgets>.plugin-borderless[data-plugin-width=narrow][data-plugin-height=short]:not(.plugin-expanded) .weather-summary-range{display:none}
#widgets>.plugin-borderless:not(.plugin-expanded) .weather-summary-stale{margin:0;font-size:12px;flex:none}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .weather-snapshot:has(.weather-summary-stale) .weather-mini-days{display:none!important}

/* Calendar summary: never squeeze forty-two touch targets into a short tile. */
#widgets>.plugin-borderless:not(.plugin-expanded) .calendar-summary{display:grid;grid-template-rows:minmax(72px,.75fr) minmax(44px,1fr);gap:12px;overflow:hidden}
.calendar-overview{min-width:0;min-height:0}
#widgets>.plugin-borderless:not(.plugin-expanded) .calendar-today-tile{display:flex;align-items:center;justify-content:flex-start;text-align:left;gap:14px;min-height:44px;height:100%;padding:4px 6px;box-sizing:border-box}
#widgets>.plugin-borderless:not(.plugin-expanded) .calendar-today-tile>strong{font-size:48px;line-height:1;font-weight:600;flex:none}
#widgets>.plugin-borderless:not(.plugin-expanded) .calendar-today-tile>span{font-size:14px;line-height:1.5;min-width:0}
#widgets>.plugin-borderless:not(.plugin-expanded) .calendar-today-tile small{font-size:12px;line-height:1.5;margin-top:3px}
#widgets>.plugin-borderless:not(.plugin-expanded) .calendar-month-summary{display:none}
.calendar-summary-events{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.calendar-summary-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;flex:none;min-height:44px;font-size:13px}
.calendar-summary-heading button{min-height:44px;padding:6px 9px}
.calendar-summary-event-list{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
#widgets>.plugin-borderless:not(.plugin-expanded) .calendar-next-date{min-height:44px!important;padding:8px 4px;gap:8px;box-sizing:border-box;font-size:13px;line-height:1.4}
#widgets>.plugin-borderless:not(.plugin-expanded) .calendar-next-date>strong{font-size:12px}
.calendar-next-date>span{white-space:normal}.calendar-next-date small{display:block;color:var(--muted);font-size:12px;margin-top:4px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .calendar-summary{grid-template-rows:minmax(0,1fr) 44px;gap:4px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .calendar-today-tile{gap:9px;padding:0 2px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .calendar-today-tile>strong{font-size:34px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .calendar-today-tile>span{font-size:12px;line-height:1.3}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .calendar-today-tile small{font-size:11px;line-height:1.3;margin:1px 0}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) :is(.calendar-summary-heading,.calendar-next-date small){display:none}
#widgets>.plugin-borderless[data-plugin-width=narrow]:not(.plugin-expanded) .calendar-today-tile{gap:6px}
#widgets>.plugin-borderless[data-plugin-width=narrow]:not(.plugin-expanded) .calendar-today-tile>strong{font-size:36px}
#widgets>.plugin-borderless[data-plugin-width=narrow]:not(.plugin-expanded) .calendar-today-tile small:first-child{display:none}
#widgets>.plugin-borderless[data-plugin-width=narrow]:not(.plugin-expanded) .calendar-next-date{flex-direction:column;align-items:flex-start;gap:3px}
#widgets>.plugin-borderless[data-plugin-width=narrow][data-plugin-height=short]:not(.plugin-expanded) .calendar-next-date{font-size:12px;padding:3px 2px;gap:1px}
#widgets>.plugin-borderless[data-plugin-width=narrow][data-plugin-height=short]:not(.plugin-expanded) .calendar-next-date>strong{font-size:11px}
#widgets>.plugin-borderless[data-plugin-width=wide]:not(.plugin-expanded) .calendar-summary{grid-template-columns:minmax(160px,.8fr) minmax(0,1.2fr);grid-template-rows:minmax(0,1fr)}
#widgets>.plugin-borderless[data-plugin-month=true]:not(.plugin-expanded) .calendar-summary{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 44px;gap:10px}
#widgets>.plugin-borderless[data-plugin-month=true]:not(.plugin-expanded) .calendar-today-tile{display:none}
#widgets>.plugin-borderless[data-plugin-month=true]:not(.plugin-expanded) .calendar-month-summary{display:flex;flex-direction:column;height:100%;gap:8px}
#widgets>.plugin-borderless[data-plugin-month=true]:not(.plugin-expanded) .calendar-month-head{font-size:14px;min-height:26px;margin:0;flex:none}
#widgets>.plugin-borderless[data-plugin-month=true]:not(.plugin-expanded) .calendar-grid{flex:1;min-height:306px;grid-template-rows:24px repeat(6,minmax(44px,1fr));gap:3px}
#widgets>.plugin-borderless[data-plugin-month=true]:not(.plugin-expanded) .calendar-grid>span{font-size:12px;padding:0;align-self:center}
#widgets>.plugin-borderless[data-plugin-month=true]:not(.plugin-expanded) .calendar-grid button{font-size:14px;min-height:44px;padding:3px 1px;gap:3px}
#widgets>.plugin-borderless[data-plugin-month=true]:not(.plugin-expanded) .calendar-grid button small{font-size:11px}
#widgets>.plugin-borderless[data-plugin-month=true]:not(.plugin-expanded) .calendar-summary-heading{display:none}
#widgets>.plugin-borderless[data-plugin-month=true][data-plugin-split=true]:not(.plugin-expanded) .calendar-summary{grid-template-columns:minmax(340px,1.3fr) minmax(220px,1fr);grid-template-rows:minmax(0,1fr);gap:24px}
#widgets>.plugin-borderless[data-plugin-month=true][data-plugin-split=true]:not(.plugin-expanded) .calendar-summary-heading{display:flex}

/* Todo keeps a fixed entry area and a separately scrolling list. */
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded)>.plugin-content{display:flex;flex-direction:column;gap:6px;overflow:hidden}
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded) :is(.plugin-status,.todo-plan-status){flex:none;margin:0;line-height:1.4}
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded) .todo-plan-status:empty{display:none}
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded) #todoForm{flex:none;margin:0;min-height:44px;gap:5px}
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded) #todoForm input{min-width:0;width:0;flex:1;min-height:44px;font-size:13px;padding:8px}
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded) #todoForm button{width:44px;min-width:44px;min-height:44px}
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded) .todo-plan-toolbar{flex:none;min-width:0;margin:0;gap:6px}
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded) #todoList{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded) .todo-plan-row{min-height:44px;box-sizing:border-box;gap:8px;padding:7px 0}
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded) .todo-plan-copy{min-width:0}
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded) .todo-plan-copy strong{font-size:13px;line-height:1.5;overflow-wrap:anywhere}
#widgets>.plugin-borderless[data-plugin-kind=todo]:not(.plugin-expanded) .todo-plan-actions .icon-button{width:44px;min-width:44px;min-height:44px;height:44px}
#widgets>.plugin-borderless[data-plugin-kind=todo][data-plugin-width=narrow]:not(.plugin-expanded) .todo-plan-actions{display:none}
#widgets>.plugin-borderless[data-plugin-kind=todo][data-plugin-height=short]:not(.plugin-expanded)>.plugin-content{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:44px minmax(0,1fr);gap:6px}
#widgets>.plugin-borderless[data-plugin-kind=todo][data-plugin-height=short]:not(.plugin-expanded) #todoForm{grid-row:1;grid-column:1/-1}
#widgets>.plugin-borderless[data-plugin-kind=todo][data-plugin-height=short]:not(.plugin-expanded) .plugin-status{grid-row:2;grid-column:2;font-size:11px;align-self:start;padding-top:5px}
#widgets>.plugin-borderless[data-plugin-kind=todo][data-plugin-height=short]:not(.plugin-expanded) #todoList{grid-row:2;grid-column:1}
#widgets>.plugin-borderless[data-plugin-kind=todo][data-plugin-height=short]:not(.plugin-expanded) :is(.todo-plan-toolbar,.todo-plan-actions,.todo-plan-copy small){display:none}
#widgets>.plugin-borderless[data-plugin-kind=todo][data-plugin-height=short]:not(.plugin-expanded) .todo-plan-status:not(:empty){grid-row:3;grid-column:1/-1;max-height:40px;overflow:auto;font-size:12px}

/* Timer reuses its existing select, buttons and ticking state. */
.timer-progress{display:none;max-width:280px;width:80%;height:5px;border-radius:4px;background:var(--line);overflow:hidden;flex:none}
.timer-progress>span{display:block;height:100%;width:var(--timer-progress,0%);background:var(--accent);border-radius:inherit}
#widgets>.plugin-borderless[data-plugin-kind=timer]:not(.plugin-expanded)>.plugin-content{gap:10px;overflow:auto}
#widgets>.plugin-borderless[data-plugin-kind=timer][data-plugin-height=short]:not(.plugin-expanded)>.plugin-content{gap:4px}
#widgets>.plugin-borderless[data-plugin-kind=timer]:not([data-plugin-height=short]):not(.plugin-expanded) :is(.timer-mode-controls,.timer-progress){display:block}
#widgets>.plugin-borderless[data-plugin-kind=timer]:not([data-plugin-height=short]):not(.plugin-expanded) .timer-mode-controls{max-width:300px;width:100%;flex:none;margin:0 0 6px}
#widgets>.plugin-borderless[data-plugin-kind=timer]:not([data-plugin-height=short]):not(.plugin-expanded) .timer-current-mode{display:none}
#widgets>.plugin-borderless[data-plugin-kind=timer]:not([data-plugin-height=short]):not(.plugin-expanded) .timer-display{font-size:48px;line-height:1.15;margin:0}
#widgets>.plugin-borderless[data-plugin-kind=timer][data-plugin-height=tall]:not(.plugin-expanded) .timer-display{font-size:64px}
#widgets>.plugin-borderless[data-plugin-kind=timer][data-plugin-width=narrow]:not(.plugin-expanded) .timer-display{font-size:34px}

/* Toolbox: saved favorites first; larger cards also expose the other tools. */
#widgets>.plugin-borderless:not(.plugin-expanded) .tools-shortcuts{display:grid;grid-template-columns:repeat(var(--plugin-columns,3),minmax(0,1fr))!important;grid-auto-rows:minmax(60px,auto);align-content:start;align-items:stretch;gap:10px;height:100%;overflow:auto;scrollbar-width:thin;box-sizing:border-box}
#widgets>.plugin-borderless:not(.plugin-expanded) .tools-shortcut{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:60px;min-width:0;padding:10px 5px!important;font-size:13px!important;line-height:1.4;box-sizing:border-box}
#widgets>.plugin-borderless:not(.plugin-expanded) .tools-shortcut>span{overflow-wrap:anywhere}
.tools-shortcut>small{display:none;font-size:12px;color:var(--muted);font-weight:400;line-height:1.5}
#widgets>.plugin-borderless:not([data-plugin-height=short]):not(.plugin-expanded) .tools-shortcut>small{display:block}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .tools-shortcuts{grid-auto-rows:44px;gap:6px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .tools-shortcut{min-height:44px;gap:3px;padding:3px!important;font-size:12px!important}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .tools-shortcut>svg{width:18px;height:18px}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .tools-shortcut[data-tool-extra=true]{display:none!important}
#widgets>.plugin-borderless[data-plugin-height=short][data-plugin-width=narrow]:not(.plugin-expanded) .tools-shortcut:nth-child(n+3){display:none!important}

/* RSS uses the cached articles; changing size never starts another fetch. */
#widgets>.plugin-borderless:not(.plugin-expanded) .plugin-summary:has(.rss-summary-count){display:flex;flex-direction:column;gap:6px;overflow:hidden}
#widgets>.plugin-borderless:not(.plugin-expanded) .rss-summary-count{flex:none;font-size:12px;line-height:18px;margin:0;color:var(--muted)}
#widgets>.plugin-borderless:not(.plugin-expanded) .rss-summary-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
#widgets>.plugin-borderless:not(.plugin-expanded) .rss-summary-list button{display:block!important;width:100%;text-align:left;min-height:44px;padding:9px 0;font-size:13px;line-height:1.5;box-sizing:border-box;overflow-wrap:anywhere}
.rss-summary-list button>strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:500}
#widgets>.plugin-borderless:not(.plugin-expanded) .rss-summary-list button small{font-size:12px;line-height:1.5;margin-top:4px}
.rss-summary-excerpt{display:none;font-size:13px;line-height:1.6;color:var(--muted);margin-top:6px}
#widgets>.plugin-borderless[data-plugin-height=tall]:not(.plugin-expanded) .rss-summary-excerpt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.rss-summary-more{min-height:44px;flex:none;align-self:flex-start}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .rss-summary-more{display:none}
#widgets>.plugin-borderless[data-plugin-height=short]:not(.plugin-expanded) .rss-summary-list button>strong{-webkit-line-clamp:1}
#widgets>.plugin-borderless[data-plugin-height=short][data-plugin-width=narrow]:not(.plugin-expanded) .rss-summary-source{display:none}

@media(prefers-reduced-motion:reduce){.canvas-resize-placeholder{backdrop-filter:none}}
