/* PWA UI is additive; desktop/mobile layout rules stay unchanged. */
#atc-pwa-banner[hidden],#atc-install[hidden],#atc-update[hidden],#atc-reload[hidden]{display:none!important}
#atc-pwa-banner{position:fixed;z-index:110;bottom:12px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);padding:10px 16px;border:1px solid var(--pal-gold);border-radius:10px;background:var(--pal-ink);color:var(--pal-paper);font-size:.85rem;text-align:center;box-shadow:0 4px 16px #0005;pointer-events:none;overflow-wrap:anywhere}
#atc-pwa-status{font-size:.78rem;color:var(--pal-muted);padding:6px 10px;line-height:1.4;overflow-wrap:anywhere}
@media(max-width:950px){#atc-pwa-banner{bottom:calc(var(--mobile-nav-height,64px) + env(safe-area-inset-bottom,0px) + 8px)}}
.atc-offline-page{margin:0;min-height:100vh;display:grid;place-items:center;background:#211216;color:#eadbc5;font:16px/1.55 system-ui,sans-serif;padding:24px;box-sizing:border-box}
.atc-offline-page main{max-width:460px;width:100%;box-sizing:border-box;border:1px solid #79534d;border-radius:16px;padding:clamp(20px,5vw,40px);background:#321a20}
.atc-offline-page img{display:block;margin:0 auto}.atc-offline-brand{color:#d8a75d;font-weight:800;letter-spacing:.1em}.atc-offline-page h1{font-size:2rem;margin:.4em 0}.atc-offline-page h2{font-size:1.25rem}.atc-offline-page a{display:inline-block;background:#ce7542;color:#211216;font-weight:800;border-radius:8px;padding:12px 20px;text-decoration:none}.atc-offline-page hr{border:0;border-top:1px solid #79534d;margin:24px 0}

/* Watchlists: same editorial heading as Collection, compact actions. */
#watchlists-page {width:100%;max-width:none;}
#watchlists-page .folders-section {padding:0;background:transparent;border:0;border-radius:0;}
#watchlists-page .watchlists-heading {color:var(--pal-ink);background:var(--pal-paper);margin-bottom:16px;}
#watchlists-page .watchlists-heading > div {min-width:0;}
#watchlists-page .watchlists-toolbar {display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:0 0 16px;flex-wrap:wrap;}
#watchlists-page #watchlists-refresh-visible {display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;font-size:1.3rem;line-height:1;}
#watchlists-page #create-collection-button {min-height:44px;margin:0;flex:0 1 auto;}
#watchlists-page #watchlists-status:empty {display:none;}
#watchlists-page #watchlists-unified-grid {margin-top:0;}
@media(max-width:950px){
 #watchlists-page .watchlists-heading {padding:15px;min-height:0;}
 #watchlists-page .watchlists-heading h2 {font-size:clamp(2rem,8vw,3rem)!important;}
 #watchlists-page .watchlists-toolbar {margin-bottom:12px;}
 #watchlists-page #create-collection-button {padding:10px 14px;font-size:.85rem;}
 #watchlists-page .atc-shared-editor {padding-inline:8px;}
}

/* Keep the language control in the dropdown's normal flow at every width. */
.backup-controls .settings-dropdown {width: 205px; min-width:0; max-width:calc(100vw - 24px); gap:2px; padding:6px;}
.backup-controls .settings-dropdown .language-toggle {position:static!important; inset:auto!important; transform:none!important; width:100%!important; box-sizing:border-box; display:grid; grid-template-columns:24px 1fr 1fr; align-items:center; gap:4px; padding:4px 2px 8px; margin:0!important; background:transparent!important; backdrop-filter:none; box-shadow:none!important; z-index:auto;}
.backup-controls .settings-dropdown .language-toggle > span {width:auto; padding:0;}
.backup-controls .settings-dropdown .language-toggle button {min-height:40px; width:100%!important; padding:5px!important; justify-content:center;}
.backup-controls .settings-dropdown .language-toggle button.active {background:var(--pal-gold)!important;color:var(--pal-ink)!important;}
.backup-controls .settings-dropdown > button {padding:8px 10px; min-height:40px;}
#atc-pwa-status:empty {display:none;}

/* Long localized PWA actions must stay within the menu. */
.backup-controls .settings-dropdown > button {box-sizing:border-box; min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; line-height:1.3;}
.backup-controls .settings-dropdown > #atc-update {letter-spacing:0!important; font-size:.76rem!important;}
