/* Fixed-size personal home, using the existing palette and desktop frame. */
#homeView{background:var(--bg)}
#homeView .home-header{min-height:100px;height:auto;padding:24px 32px;background:var(--bg);border:0;gap:16px}
#homeView .home-heading{min-width:0;flex:1}
#homeView .home-heading h1{font-size:25px;line-height:1.25;margin:6px 0 0;font-weight:650;letter-spacing:-.035em;overflow-wrap:anywhere}
#homeView .home-heading .eyebrow{font-size:10px;letter-spacing:.08em}
#homeView .home-heading p{display:none}
#homeView .home-scroll{padding:0 32px 32px;background:var(--bg);scroll-behavior:auto}
#customizeHomeButton{flex-shrink:0}
#homeModulesRoot{container:home-editor / inline-size;max-width:1320px;margin:0 auto;color:var(--text)}
#homeModulesRoot [hidden]{display:none!important}
.hm-content{display:flex;gap:24px;align-items:flex-start;min-width:0}
.hm-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-flow:row;gap:22px;min-width:0;flex:1;container:home-board / inline-size;align-items:start;position:relative}
.hm-widget{height:280px;min-width:0;box-sizing:border-box;border:1px solid var(--line);border-radius:16px;background:var(--panel);box-shadow:0 3px 12px rgb(15 45 30 / 3%);position:relative;display:flex;flex-direction:column;scroll-margin-top:calc(var(--hm-toolbar-height,76px) + 12px)}
.hm-widget-header{display:flex;align-items:center;gap:8px;padding:16px 18px 10px;min-height:52px;flex-shrink:0;position:relative}
.hm-widget-label{display:flex;gap:10px;min-width:0;align-items:center;flex:1}
.hm-widget-label h2{font-size:15px;font-weight:650;line-height:1.3;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hm-module-icon{display:inline-grid;place-items:center;width:31px;height:31px;flex-shrink:0;font-size:19px;border-radius:9px;background:var(--accent-soft);color:var(--accent)}
[data-module-id="notes"]>.hm-widget-header .hm-module-icon{background:var(--warning-soft);color:var(--warning)}
[data-module-id="countdown"]>.hm-widget-header .hm-module-icon{background:var(--info-soft);color:var(--info)}
.hm-widget-body{flex:1;min-height:0;min-width:0;overflow:hidden;padding:2px 18px 6px}
.hm-widget-footer{display:flex;justify-content:flex-end;align-items:center;gap:12px;min-height:35px;padding:3px 18px 10px;flex-shrink:0}
.hm-button{border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);font:inherit;font-size:12px;font-weight:550;padding:9px 13px;cursor:pointer;line-height:1.4}
.hm-button:hover:not(:disabled){background:var(--hover);border-color:var(--field-line)}
.hm-primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.hm-primary:hover:not(:disabled){background:var(--accent);filter:brightness(.95)}
.hm-button:disabled,.hm-text-button:disabled{opacity:.5;cursor:default}
.hm-text-button{border:0;background:transparent;color:var(--accent);padding:4px 0;font:inherit;font-size:12px;cursor:pointer}
.hm-text-button:hover:not(:disabled){text-decoration:underline}
.hm-editor-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 18px;padding:12px 14px;background:var(--accent-soft);border-radius:12px;border:1px solid var(--line);position:sticky;top:0;z-index:30;box-shadow:0 3px 10px rgb(15 45 30 / 6%)}
.hm-edit-label{display:flex;flex-direction:column;gap:5px;min-width:0}
.hm-edit-label strong{font-size:14px}.hm-edit-label small{color:var(--muted);font-size:11px}
.hm-edit-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.hm-editor-toolbar .hm-button{padding:8px 10px;font-size:11px}
.hm-status{margin:0 0 15px;padding:11px 14px;border:1px solid var(--line);border-radius:8px;color:var(--accent);background:var(--accent-soft);font-size:12px;line-height:1.6}
.hm-status.is-error{color:var(--danger);background:var(--danger-soft)}
.hm-status button{margin-left:12px}
.hm-state{color:var(--muted);font-size:13px;line-height:1.7;padding:20px 4px;grid-column:1/-1}
.hm-error{color:var(--danger)}
.hm-more{position:relative;flex-shrink:0;color:var(--muted)}
.hm-more>summary{list-style:none;cursor:pointer;letter-spacing:1px;border-radius:7px;width:29px;height:29px;display:grid;place-items:center;font-size:18px;font-weight:700;line-height:1}
.hm-more>summary::-webkit-details-marker{display:none}
.hm-more>summary:hover,.hm-more[open]>summary{background:var(--hover);color:var(--text)}
.hm-menu{position:absolute;right:0;top:32px;background:var(--panel);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:5px;min-width:170px;z-index:12}
.hm-menu button{display:block;width:100%;border:0;text-align:left;background:transparent;color:var(--text);padding:9px 10px;border-radius:6px;font-size:12px;cursor:pointer}
.hm-menu button:hover:not(:disabled),.hm-menu button:focus-visible{background:var(--hover)}
.hm-menu button:disabled{opacity:.4;cursor:default}
.hm-menu .hm-menu-remove{color:var(--danger)}
.hm-handle{padding:0;border:0;border-radius:7px;background:transparent;color:var(--muted);width:30px;min-width:30px;height:34px;font-size:23px;cursor:grab;touch-action:auto}
.hm-handle:active{cursor:grabbing}.hm-handle:hover{background:var(--hover)}
.hm-handle:disabled{opacity:.3;cursor:default}
.hm-editing .hm-widget{border-style:dashed;border-color:var(--field-line)}
.hm-editing .hm-widget-header{cursor:grab}.hm-editing .hm-widget-header:active{cursor:grabbing}
.hm-size-label{color:var(--muted);font-size:10px;white-space:nowrap}
.hm-drop-zone{position:absolute;left:0;right:0;top:-22px;height:36px;border:2px solid transparent;border-radius:6px;font-size:11px;text-align:center;line-height:32px;z-index:8;opacity:0;pointer-events:none;color:var(--accent)}
.hm-drop-end{grid-column:1/-1;position:relative;top:0;height:40px;line-height:36px;opacity:1;border:1px dashed var(--line);color:var(--muted);background:var(--panel);order:10000}
.hm-dragging .hm-drop-zone{opacity:1;pointer-events:auto;background:var(--accent-soft);border:1px dashed var(--accent)}
.hm-dragging .hm-drop-active{background:var(--accent);color:var(--on-accent);border:2px solid var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.hm-dock-zone{position:absolute;z-index:9;pointer-events:none;opacity:0;border:1px dashed var(--accent);background:var(--accent-soft);color:var(--accent);font-size:11px;display:grid;place-items:center;border-radius:8px;text-align:center}
.hm-dock-left{left:0;top:35px;bottom:35px;width:24%;max-width:90px}.hm-dock-right{right:0;top:35px;bottom:35px;width:24%;max-width:90px}
.hm-dock-top{top:0;left:24%;right:24%;height:35px}.hm-dock-bottom{bottom:0;left:24%;right:24%;height:35px}
.hm-dragging .hm-dock-zone.hm-drop-active{background:var(--accent);color:var(--on-accent);opacity:1}
.hm-drag-source{position:absolute!important;opacity:0;pointer-events:none}
.hm-dragging .hm-drop-zone{opacity:0;pointer-events:none}
.hm-drag-targets{position:absolute;inset:0;pointer-events:none;z-index:11}
.hm-drag-target{position:absolute;box-sizing:border-box;border-radius:7px;opacity:0;pointer-events:auto}
.hm-drag-target.hm-drop-active{opacity:0}
.hm-placement-preview{height:280px;min-width:0;border:2px dashed var(--accent);border-radius:16px;background:var(--accent-soft);color:var(--accent);display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;position:relative;z-index:10;box-sizing:border-box;font-size:12px}
.hm-placement-preview::before{content:'';position:absolute;inset:-22px -7px}.hm-placement-preview strong{font-size:17px}
.hm-dragging .hm-widget-header[data-drop-label]::after{content:attr(data-drop-label);position:absolute;inset:0;display:grid;place-items:center;border:2px dashed var(--accent);border-radius:14px 14px 0 0;background:var(--accent-soft);color:var(--accent);font-size:12px;pointer-events:none}
.hm-card-edit-controls{display:flex;align-items:center;gap:4px;margin-right:auto}
.hm-size-button,.hm-remove-button{border:1px solid var(--line);background:var(--panel);color:var(--muted);border-radius:6px;padding:5px 6px;font:inherit;font-size:11px;line-height:1.4;cursor:pointer;white-space:nowrap}
.hm-size-button[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent);font-weight:650}
.hm-size-button:hover:not(:disabled),.hm-remove-button:hover:not(:disabled){background:var(--hover)}
.hm-remove-button{margin-left:4px}.hm-remove-button:hover:not(:disabled){color:var(--danger)}
.hm-editing .hm-widget-footer{justify-content:space-between;flex-wrap:wrap;gap:6px;min-height:43px}
.hm-size-button:disabled,.hm-remove-button:disabled{opacity:.5;cursor:default}
.hm-editing .hm-widget[data-size="T"] .hm-widget-header{gap:5px;padding:10px 12px 7px;min-height:42px}
.hm-editing .hm-widget[data-size="T"] .hm-widget-header .hm-module-icon{display:none}
.hm-editing .hm-widget[data-size="T"] .hm-widget-header .hm-handle{width:20px;min-width:20px;font-size:20px}
.hm-editing .hm-widget[data-size="T"] .hm-widget-label h2{font-size:13px}
.hm-editing .hm-widget[data-size="T"] .hm-widget-footer{padding:3px 10px 8px;gap:3px;min-height:38px}
.hm-editing .hm-widget[data-size="T"] .hm-card-edit-controls{gap:3px}
.hm-editing .hm-widget[data-size="T"] .hm-remove-button{margin-left:1px}
.hm-just-added{animation:hm-added-flash .8s ease-out}
@keyframes hm-added-flash{from{box-shadow:0 0 0 4px var(--accent-soft);border-color:var(--accent)}to{box-shadow:0 3px 12px rgb(15 45 30 / 3%)}}
@media(prefers-reduced-motion:reduce){.hm-just-added{animation:none}}
.hm-owned-panel{width:320px;max-width:100%;box-sizing:border-box;flex:0 0 clamp(280px,32%,340px);background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px;position:sticky;top:var(--hm-toolbar-height,76px);max-height:calc(100dvh - var(--hm-toolbar-height,76px) - 150px);overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain}
.hm-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.hm-panel-heading h2{font-size:16px;margin:0}
.hm-close{width:28px;height:28px;border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:22px;border-radius:6px}
.hm-close:hover{background:var(--hover)}
.hm-panel-hint,.hm-panel-footnote{color:var(--muted);font-size:11px;line-height:1.7;margin:12px 0}
.hm-panel-footnote{margin-bottom:0}
.hm-owned-item{padding:12px 0;border-bottom:1px solid var(--line)}
.hm-panel-module-heading{display:flex;align-items:center;gap:8px;min-width:0}
.hm-owned-item .hm-module-icon{width:26px;height:26px;font-size:16px;border-radius:7px}
.hm-owned-copy{min-width:0;flex:1}.hm-owned-copy strong,.hm-owned-copy small{display:block;overflow-wrap:anywhere}
.hm-owned-copy strong{font-size:12px}.hm-owned-copy small{font-size:10px;color:var(--muted);margin-top:4px}
.hm-owned-item .hm-text-button{flex-shrink:0}
.hm-panel-search{display:block;margin:16px 0}
.hm-panel-search input{display:block;width:100%;min-width:0;box-sizing:border-box;padding:10px 12px;border:1px solid var(--field-line);border-radius:9px;background:var(--field-bg);color:var(--text);font:inherit;font-size:12px}
.hm-panel-search input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.hm-panel-section+.hm-panel-section{margin-top:24px}
.hm-section-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:6px}
.hm-section-heading h3{font-size:12px;font-weight:650;margin:0}.hm-section-heading>span{font-size:10px;color:var(--muted)}
.hm-recommended-item{margin-top:10px;padding:13px 12px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.hm-panel-description{font-size:11px;line-height:1.6;color:var(--muted);margin:10px 0;overflow-wrap:anywhere}
.hm-panel-module-footer{display:flex;justify-content:space-between;gap:8px;align-items:center}.hm-panel-module-footer .hm-button{font-size:11px;padding:6px 10px;flex-shrink:0}
.hm-panel-module-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.hm-panel-module-actions .hm-text-button{font-size:10px;white-space:nowrap}
.hm-panel-price{font-size:10px;color:var(--muted);line-height:1.5}
.hm-panel-empty{font-size:11px;line-height:1.6;color:var(--muted);padding:10px 0;margin:0}
.hm-panel-notice{padding:10px 12px;border-radius:9px;background:var(--accent-soft);color:var(--accent);font-size:11px;line-height:1.6}
.hm-panel-notice.is-error{color:var(--danger);background:var(--danger-soft)}
.hm-panel-purchase{padding:13px;margin-bottom:20px;border:1px solid var(--field-line);border-radius:12px;background:var(--accent-soft)}
.hm-panel-purchase strong{font-size:12px}.hm-panel-purchase p{font-size:11px;line-height:1.6;color:var(--muted);margin:9px 0}
.hm-panel-order-price{font-size:12px;font-weight:600}.hm-panel-order-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.hm-panel-order-actions .hm-button{font-size:11px;padding:7px 9px}
.hm-added-group{margin-top:22px;border-top:1px solid var(--line);padding-top:14px}.hm-added-group>summary{font-size:11px;color:var(--muted);cursor:pointer;padding:5px 0}.hm-added-group .hm-owned-item{padding:9px 0}.hm-added-group .hm-handle{display:none}
.hm-add-tile{grid-column:1/-1;border:1px dashed var(--line);background:transparent;color:var(--muted);height:52px;border-radius:12px;font-size:12px;cursor:pointer}
.hm-add-tile:hover{color:var(--accent);background:var(--hover);border-color:var(--field-line)}
.hm-empty{grid-column:1/-1;min-height:280px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:30px;border:1px dashed var(--line);border-radius:16px}
.hm-empty-symbol{font-size:32px;color:var(--accent)}.hm-empty h2{font-size:18px;margin:14px 0 0}.hm-empty p{font-size:13px;color:var(--muted);line-height:1.7;margin-bottom:22px}
.hm-settings-dialog{max-width:460px;width:calc(100% - 32px);border:1px solid var(--line);padding:26px;border-radius:16px;background:var(--panel);color:var(--text)}
.hm-settings-dialog h2{margin:0 0 22px;font-size:20px}.hm-settings-dialog label{display:block;font-size:13px;margin-bottom:20px}
.hm-settings-dialog input:not([type=checkbox]){display:block;width:100%;margin-top:8px;border:1px solid var(--field-line);background:var(--field-bg);color:var(--text);padding:10px;border-radius:8px;box-sizing:border-box;font:inherit}
.hm-settings-dialog .hm-check-label{display:flex;gap:8px;align-items:center}.hm-settings-dialog input[type=checkbox]{accent-color:var(--accent)}
.hm-expanded-dialog{width:min(780px,calc(100% - 32px));max-width:none;max-height:85vh;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--text);padding:24px}
.hm-expanded-heading{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:20px}.hm-expanded-heading h2{margin:0;font-size:20px}
.hm-expanded-body{min-height:280px;max-height:60vh;overflow:auto}
.hm-expanded-dialog::backdrop,.hm-settings-dialog::backdrop{background:var(--overlay)}
.hm-sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.home-workspace-updates{max-width:1320px;margin:24px auto 0;border-top:1px solid var(--line);padding-top:17px;color:var(--muted)}
.home-workspace-updates>summary{cursor:pointer;font-size:12px;list-style:none}.home-workspace-updates>summary:before{content:'›';margin-right:8px}.home-workspace-updates[open]>summary:before{content:'⌄'}
.home-workspace-updates .home-hero,.home-workspace-updates .home-tools{display:none}
.home-workspace-updates .home-content-grid{margin:16px 0 0}
#homeModulesRoot :is(button,summary,a):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@container home-editor (max-width:700px){.hm-editing .hm-content{flex-direction:column}.hm-editing .hm-grid{width:100%}.hm-owned-panel{width:100%;flex-basis:auto;position:static;order:-1;max-height:440px;padding:16px}.hm-editor-toolbar{align-items:flex-start;flex-direction:column}.hm-edit-actions{justify-content:flex-start}}
@container home-editor (max-width:850px){.hm-editor-toolbar{align-items:flex-start;flex-direction:column}.hm-edit-actions{justify-content:flex-start}}
@container home-editor (max-width:540px){.hm-grid{grid-template-columns:minmax(0,1fr)}.hm-editor-toolbar .hm-edit-label small{display:none}.hm-editor-toolbar .hm-edit-actions{gap:5px}.hm-editor-toolbar .hm-button{padding:7px 8px}}
@container home-board (max-width:520px){.hm-widget,.hm-placement-preview{grid-column:1/-1!important;grid-row:auto!important}.hm-widget-header{padding-left:14px;padding-right:14px}.hm-widget-body{padding-left:14px;padding-right:14px}}
@media(max-width:720px){
  /* This ID selector owns the header padding, so reserve the status-bar inset
     here rather than relying on the less specific shared mobile header rule. */
  #homeView .home-header{padding:calc(16px + var(--mobile-safe-top,env(safe-area-inset-top,0px))) 16px 16px;gap:10px;flex-wrap:wrap;min-height:calc(90px + var(--mobile-safe-top,env(safe-area-inset-top,0px)))}
  #homeView .home-heading h1{font-size:21px}
  #homeView .home-heading{flex-basis:calc(100% - 110px)}
  /* The shell navigation reserves --mobile-safe-bottom once. The scrollable
     module list only needs its normal content gutter above that navigation. */
  #homeView .home-scroll{padding:0 14px 16px}
  #customizeHomeButton{min-height:40px;font-size:11px;padding:7px 9px}
  .hm-content{gap:16px}.hm-grid{gap:18px}.hm-widget{height:280px}.hm-editor-toolbar{padding:12px}.hm-drop-zone{top:-14px}.hm-drop-end{top:0}
  .hm-add-tile{order:10000}
  /* Only settled, content-free states compact in browse mode. Loading cards,
     business forms, populated lists and the editing/drag grid stay fixed-size. */
  #homeModulesRoot:not(.hm-editing) .hm-widget:has(>.hm-widget-body>:is(.hm-state,.lmw-error-box,.lum-error-box,.led-error-box):only-child,>.hm-widget-body:is([data-module-id="today-schedule"],[data-module-id="quick-links"])>.lmw-empty,>.hm-widget-body:is([data-module-id="workspace-updates"],[data-module-id="recent-messages"])[aria-busy="false"]>.led-home-list:empty):not(:has(>.hm-widget-body :is(form,ul:not(:empty)))){
    height:auto;min-height:156px;
  }
  #homeModulesRoot:not(.hm-editing) .hm-widget:has(>.hm-widget-body>:is(.hm-state,.lmw-error-box,.lum-error-box,.led-error-box):only-child,>.hm-widget-body:is([data-module-id="today-schedule"],[data-module-id="quick-links"])>.lmw-empty,>.hm-widget-body:is([data-module-id="workspace-updates"],[data-module-id="recent-messages"])[aria-busy="false"]>.led-home-list:empty):not(:has(>.hm-widget-body :is(form,ul:not(:empty))))>.hm-widget-body{
    flex:0 0 auto;
  }
  #homeModulesRoot:not(.hm-editing) .hm-widget:has(>.hm-widget-body>:is(.hm-state,.lmw-error-box,.lum-error-box,.led-error-box):only-child,>.hm-widget-body:is([data-module-id="today-schedule"],[data-module-id="quick-links"])>.lmw-empty,>.hm-widget-body:is([data-module-id="workspace-updates"],[data-module-id="recent-messages"])[aria-busy="false"]>.led-home-list:empty):not(:has(>.hm-widget-body :is(form,ul:not(:empty))))>.hm-widget-footer{
    margin-top:auto;
  }
  #homeModulesRoot:not(.hm-editing) .hm-widget-body:is([data-module-id="today-schedule"],[data-module-id="quick-links"])>.lmw-empty{padding:6px 0}
}
