/* Milky Mist：仅自由桌面与其编辑面板，不覆盖个人主题变量。 */
#home-view { position:relative; isolation:isolate; }
/* 按模拟屏幕内宽响应，而非电脑窗口宽度；窄卡片给文字完整的一列。 */
#home-view .desktop-page { container-type:inline-size; }
@container (max-width:310px) {
  #home-view :is(.companion-doorways,.companion-launchers) > button { grid-template-columns:minmax(0,1fr); row-gap:6px; align-content:start; }
  #home-view :is(.companion-doorways,.companion-launchers) > button > span { grid-row:auto; justify-self:start; }
  #home-view :is(.companion-doorways,.companion-launchers) :is(strong,small) { min-width:0; overflow-wrap:anywhere; }
}
#home-view.has-desktop-wallpaper { background:linear-gradient(rgb(255 253 250 / 26%),rgb(255 253 250 / 38%)),var(--desktop-user-wallpaper) center/cover no-repeat; }
.desktop-edit-bar { display:flex; flex:none; align-items:center; gap:6px; padding:6px 14px; border-bottom:1px solid var(--color-border); background:var(--color-surface); }
.desktop-edit-bar strong { flex:1; min-width:0; font-size:13px; color:var(--color-text); }
.desktop-edit-bar button,.desktop-edit-controls button { min-width:44px; min-height:44px; padding:6px 10px; border:1px solid var(--color-border); border-radius:12px; background:var(--color-surface); color:var(--color-text); font:inherit; font-size:13px; }
.desktop-edit-controls { display:flex; align-items:center; gap:6px; flex:none; padding:4px 12px; background:var(--color-surface); }
.desktop-edit-controls span { flex:1; min-width:0; font-size:12px; overflow-wrap:anywhere; }
.desktop-editing [data-desktop-item] { outline:1px dashed var(--color-primary); outline-offset:2px; }
.desktop-editing [data-desktop-item].desktop-selected { outline:2px solid var(--color-primary); }
.desktop-editing [data-desktop-kind=apps] { touch-action:none; cursor:grab; user-select:none; }
.desktop-editing .desktop-dragging { opacity:.65; cursor:grabbing; }
.desktop-editing .desktop-drop-target { box-shadow:inset 0 0 0 3px var(--color-primary); }
.desktop-custom-dialog { width:calc(var(--layout-screen-width, 390px) - 28px); padding:0; border:1px solid var(--color-border); border-radius:22px; background:var(--color-surface); color:var(--color-text); box-shadow:0 12px 36px rgb(63 45 68 / 14%); }
.desktop-custom-dialog::backdrop { background:rgb(45 35 51 / 26%); }
.desktop-custom-dialog[open] { display:flex; flex-direction:column; }
.desktop-custom-dialog header { display:flex; flex:none; align-items:center; justify-content:space-between; gap:8px; padding:12px 16px; border-bottom:1px solid var(--color-border); }
.desktop-custom-dialog h2 { font-size:18px; margin:0; }
.desktop-custom-dialog header button { min-width:44px; min-height:44px; border:0; background:transparent; color:var(--color-text); font-size:22px; }
.desktop-custom-body { flex:1; min-height:0; padding:12px 16px 20px; overflow:auto; overscroll-behavior:contain; }
.desktop-custom-footer { flex:none; padding:8px 16px 12px; border-top:1px solid var(--color-border); }
.desktop-custom-footer p { margin:0 0 6px; font-size:12px; line-height:1.5; }
.desktop-custom-footer button { width:100%; min-height:44px; }
.desktop-custom-body p { font-size:13px; line-height:1.6; }
.desktop-custom-body details { border-top:1px solid var(--color-border); margin-top:12px; padding-top:8px; }
.desktop-custom-body summary { min-height:44px; align-content:center; font-weight:600; }
.desktop-widget-row { display:flex; align-items:center; gap:6px; padding:5px 0; }
.desktop-widget-row label { display:flex; align-items:center; flex:1; gap:8px; min-height:44px; min-width:0; font-size:14px; }
.desktop-widget-row input { width:18px; height:18px; flex:none; accent-color:var(--color-primary); }
.desktop-widget-row button { min-width:44px; min-height:44px; padding:4px; }
.desktop-wallpaper-preview { display:block; width:100%; height:100px; object-fit:cover; border-radius:12px; margin:8px 0; }
.desktop-custom-body .secondary-button { min-height:44px; margin:4px 4px 4px 0; }
.desktop-edit-bar button:active,.desktop-edit-controls button:active { transform:scale(.98); transition:transform 120ms ease-out; }
.desktop-edit-bar button:focus-visible,.desktop-edit-controls button:focus-visible,.desktop-widget-row button:focus-visible { outline:2px solid var(--color-text); outline-offset:2px; }
@media (max-width:360px) { .desktop-edit-bar { padding-inline:8px; gap:3px; }.desktop-edit-bar button { padding-inline:7px; } }
@media (prefers-reduced-motion:reduce) { .desktop-edit-bar button:active,.desktop-edit-controls button:active { transform:none; transition:none; } }
