/* App shell "Update" button (web/updates.mjs). Separate file so the shared stylesheets stay untouched.
   Sidebar slot on tablets/desktops (and in the phone drawer); icon-only header slot on phones and when the sidebar is collapsed. Empty when there is no update. */
[data-app-update]:empty{display:none}
.app-update--sidebar{margin:14px 0 0;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2)}
.app-update-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:38px;padding:8px 12px;border:0;border-radius:7px;background:var(--brand);color:var(--on-brand);font-size:12px;font-weight:600;text-decoration:none;cursor:pointer}
.app-update-button:hover{background:var(--brand-d)}
.app-update-button:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.app-update-button:disabled{cursor:progress;opacity:.85}
.app-update[data-update-state="busy"] .app-update-icon{display:inline-block;animation:app-update-spin 1s linear infinite}
.app-update[data-update-state="clicked"] .app-update-button,.app-update[data-update-state="clicked"] .app-update-button:hover{background:var(--surface);color:var(--ink);border:1px solid var(--line)}
.app-update-icon{font-size:15px;line-height:1}
.app-update-detail{display:block;overflow-wrap:anywhere;margin-top:8px;color:var(--muted);font-size:11px;line-height:1.5}
[data-app-update="header"]{display:none}
/* Header slot: phones (sidebar is a drawer, which still carries the full card) and the collapsed desktop sidebar
   (web/sidebar.mjs hides the sidebar entirely). Icon-only there so the header never overflows; the label stays
   readable to screen readers and the detail is the button's tooltip. */
@media(max-width:600px){[data-app-update="header"]:not(:empty){display:block}}
@media(min-width:601px){:root[data-sidebar=collapsed] [data-app-update="header"]:not(:empty){display:block}:root[data-sidebar=collapsed] .app-update-detail{display:none}}
.app-update--header .app-update-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.app-update--header .app-update-button{width:36px;min-height:36px;padding:0;border-radius:8px}
@media(prefers-reduced-motion:reduce){.app-update[data-update-state="busy"] .app-update-icon{animation:none}}
@keyframes app-update-spin{to{transform:rotate(360deg)}}
/* Settings › App version (versionMarkup): what is running, the website build, and Update when one is out. */
.app-version dd{overflow-wrap:anywhere}
.app-version-note{display:block;margin-top:4px;color:var(--muted);font-size:11px;line-height:1.5}
.app-version-update{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:7px 14px;border:0;border-radius:7px;background:var(--brand);color:var(--on-brand);font-size:12px;font-weight:600;text-decoration:none;cursor:pointer}
.app-version-update:hover{background:var(--brand-d)}
.app-version-update:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.app-version-update:disabled,.app-version-update[data-update-state="clicked"]{background:var(--surface);color:var(--ink);border:1px solid var(--line);cursor:default;opacity:1}
/* Download / install notice (web/updates.mjs showNotice): bottom right on desktop, full width on phones. */
.dl-notice{position:fixed;right:24px;bottom:24px;z-index:1001;display:flex;align-items:flex-start;gap:12px;width:min(420px,calc(100vw - 32px));padding:14px 14px 14px 16px;border-radius:10px;background:var(--surface-raised,var(--surface));color:var(--ink);border:1px solid var(--line);box-shadow:0 10px 32px var(--shadow-md,rgba(0,0,0,.18));font-size:12px;line-height:1.55}
.dl-notice[hidden]{display:none}
.dl-notice-icon{flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--blue-soft);color:var(--blue-text);font-weight:700}
.dl-notice[data-kind="error"]{border-color:var(--danger-line);background:var(--danger-soft);color:var(--danger-text)}
.dl-notice[data-kind="error"] .dl-notice-icon{background:var(--danger-strong);color:#fff}
.dl-notice-text{flex:1;min-width:0;overflow-wrap:anywhere}
.dl-notice-text strong{display:block;font-size:13px;font-weight:650;margin-bottom:2px}
.dl-notice-text span{display:block;color:inherit;opacity:.9}
.dl-notice-retry{flex:none;align-self:center;border:0;border-radius:7px;background:var(--brand);color:var(--on-brand);font-size:12px;font-weight:600;padding:8px 12px;cursor:pointer}
.dl-notice-retry:hover{background:var(--brand-d)}
.dl-notice-close{flex:none;border:0;background:transparent;color:inherit;font-size:18px;line-height:1;width:28px;height:28px;border-radius:6px;cursor:pointer;opacity:.75}
.dl-notice-close:hover{background:color-mix(in srgb,currentColor 12%,transparent);opacity:1}
.dl-notice button:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
[data-download-status][data-kind="error"]{color:var(--danger-text)}
@media(max-width:600px){.dl-notice{left:12px;right:12px;bottom:12px;width:auto}}
