/* Shared platform preferences. Presentation bundles keep their authored styles. */
:root{--ui-surface:#fff;--ui-raised:#f0f5f7;--ui-border:#d4e0e7;--ui-foreground:#132e43;--ui-subtle:#627686;--ui-accent:#007c80}
.header-tools{display:flex;align-items:center;gap:24px;min-width:0}
.preferences{display:flex;align-items:center;gap:7px;flex:none}
.language-select,.theme-toggle{height:34px;border:1px solid var(--ui-border);border-radius:7px;background:var(--ui-surface);color:var(--ui-foreground);font:500 11px Inter,Arial,sans-serif}
.language-select{min-width:59px;padding:0 7px;cursor:pointer}
.theme-toggle{width:34px;padding:7px;display:grid;place-items:center;cursor:pointer;flex:none}
.theme-toggle:hover,.language-select:hover{background:var(--ui-raised)}
.theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle[data-theme-target="light"] .theme-icon-moon,.theme-toggle[data-theme-target="dark"] .theme-icon-sun{display:none}
.preferences select:focus-visible,.preferences button:focus-visible{outline:3px solid #59b9ba;outline-offset:3px}
html[data-theme] .button{transition-property:border-color,box-shadow}
html[data-theme="dark"]{--ui-surface:#102334;--ui-raised:#172e41;--ui-border:#30495c;--ui-foreground:#e4edf4;--ui-subtle:#a3b8c8;--ui-accent:#67d3cf;--navy:#e4edf4;--teal:#67d3cf;--teal-dark:#54c5c1;--muted:#a3b8c8;--line:#293f50;--white:#102334;color:#e4edf4;background:#091724}
html[data-theme="dark"] body{background:#091724;color:#e4edf4}
html[data-theme="dark"] :is(.app-header,.auth-card,.library-auth,.deck-card,.dialog,.empty-state,.search-field,.user-row,.version-list,.platform-list,.organization-card,.organization-filter,.skip-link){background:#102334;border-color:var(--line);color:var(--ui-foreground);box-shadow:none}
html[data-theme="dark"] .app-header{background:#0c1c2b}
html[data-theme="dark"] .brand-divider{border-color:var(--line)}
html[data-theme="dark"] :is(.field input,.field textarea,.field select){background:#0b1b29;border-color:#30495c;color:#e4edf4}
html[data-theme="dark"] :is(.field input,.field textarea,.search-field input)::placeholder{color:#8ea5b6}
html[data-theme="dark"] .field :is(input,textarea,select):focus{border-color:#67d3cf;box-shadow:0 0 0 3px #67d3cf18}
html[data-theme="dark"] :is(.button-primary){background:#087d82;border-color:#11999d;color:#fff;box-shadow:none}
html[data-theme="dark"] .button-primary:hover{background:#0a9296;border-color:#32b6b8}
html[data-theme="dark"] .button-secondary{background:#183044;border-color:#3c586c;color:#e4edf4}
html[data-theme="dark"] .button-secondary:hover{background:#214159;border-color:#567389}
html[data-theme="dark"] :is(.button-quiet,.quiet-link,.back-link,.nav-link,.secondary-access>summary,.alternative-login summary,.password-login-details summary,.legacy-login summary,.legacy-access summary){color:#aac1d1}
html[data-theme="dark"] :is(.button-quiet:hover,.quiet-link:hover,.back-link:hover,.nav-link.active,.nav-link:hover){color:#78e0da}
html[data-theme="dark"] .button-quiet:hover{background:#193346}
html[data-theme="dark"] .nav-link.active{border-bottom-color:#67d3cf}
html[data-theme="dark"] :is(.role-label,.status-badge,.count-badge,.user-deck-tag,.icon-button,.version-marker,.account-apple){background:#1a3345;color:#bad0de;border-color:#355367}
html[data-theme="dark"] .icon-button:hover{background:#264a5e}
html[data-theme="dark"] :is(.user-avatar,.empty-icon,.organization-mark,.published-icon){background:#153b40;color:#85d8cf;border-color:#315a5f}
html[data-theme="dark"] :is(.status-badge.published,.organization-filter.active){background:#173d36;color:#9addbe;border-color:#386755}
html[data-theme="dark"] :is(.published-panel,.recipient-note,.invitation-panel){background:#11352f;border-color:#2e574a;color:#c2e5d5}
html[data-theme="dark"] :is(.published-panel.unpublished,.availability-notice){background:#172f40;border-color:#587e91;color:#c2d6e2}
html[data-theme="dark"] .unpublished .published-icon{background:#1d3e52;color:#b0d0e1}
html[data-theme="dark"] :is(.published-copy>p:last-child,.recipient-note>p,.recipient-note>span,.invitation-panel p:not(.eyebrow)){color:#adcbc3}
html[data-theme="dark"] :is(.materials-footer,.material-languages,.field-hint,.field small,.access-expiry,.login-caption,.version-meta,.card-footer time,.account-mobile-label,.account-apple>p,.checkbox-line,.version-note,.account-email,.access-message,.user-info .user-login-label,.auth-intro>p:not(.eyebrow),.drop-zone>span){color:#a3b8c8}
html[data-theme="dark"] .card-footer a:not(.button){color:#78d9d2}
html[data-theme="dark"] :is(.card-footer,.version-row+.version-row,.access-row+.access-row,.organization-footer,.dialog-footer,.access-options,.version-marker){border-color:var(--line)}
html[data-theme="dark"] .deck-card:hover{border-color:#507482;box-shadow:0 6px 20px #0002}
html[data-theme="dark"] .deck-unavailable:hover{border-color:var(--line);box-shadow:none}
html[data-theme="dark"] :is(.access-option:hover,.drop-zone,.drop-zone.selected){background:#143039;border-color:#436773}
html[data-theme="dark"] :is(.drop-zone:hover,.drop-zone.drag-over){background:#1c4149;border-color:#67d3cf}
html[data-theme="dark"] .drop-zone svg{stroke:#85d8cf}
html[data-theme="dark"] :is(.form-error,.notice){background:#382826;border-color:#735047;color:#f0b7a4}
html[data-theme="dark"] .invitation-panel .form-error{color:#f0b7a4!important}
html[data-theme="dark"] .button-danger{background:#923f35;border-color:#b85e51;color:#fff}
html[data-theme="dark"] .button-danger:hover{background:#ae4e40}
html[data-theme="dark"] .dialog::backdrop{background:#030b14b8}
html[data-theme="dark"] .toast{background:#244b5c;color:#f0f7fa}
html[data-theme="dark"] #generated-password{background:#133936;color:#a3e8dc}
html[data-theme="dark"] #credentials-copy-status{color:#9addbe}
html[data-theme="dark"] .button-apple{background:#e1ebf0;color:#112535;border-color:#e1ebf0}
html[data-theme="dark"] .button-apple:hover{background:#fff}
html[data-theme="dark"] .user-disabled :is(h2,.user-avatar){color:#8fa6b6}
html[data-theme="dark"] .search-field svg{stroke:#aac1d1}
html[data-theme="dark"] .brand-mark{background:#e4edf4}
/* Player chrome also follows the platform preference. */
.viewer-toolbar .preferences{margin-left:auto}
.viewer-toolbar .theme-toggle{width:34px;height:34px;min-width:34px;border-color:var(--ui-border);background:var(--ui-surface);color:var(--ui-foreground)}
.viewer-toolbar .theme-toggle svg{width:18px;height:18px}
html[data-theme="light"]:has(.viewer-main){background:#f4f7f9;color:#132e43}
html[data-theme="light"] :is(.viewer-main,.viewer-state){background:#f4f7f9;color:#132e43}
html[data-theme="light"] .viewer-toolbar{background:#fff;border-color:#dce5eb;color:#132e43}
html[data-theme="light"] .viewer-title{border-color:#dce5eb}
html[data-theme="light"] .viewer-brand img{filter:brightness(0) saturate(100%) invert(14%) sepia(20%) saturate(1778%) hue-rotate(161deg) brightness(97%) contrast(94%)}
html[data-theme="light"] :is(.viewer-title>span,.viewer-state p){color:#627686}
html[data-theme="light"] :is(.state-actions a,.state-actions button,.viewer-toolbar>button){background:#fff;border-color:#b9cdd9;color:#28485c}
html[data-theme="light"] .viewer-state.error h2{color:#a04b38}
html[data-theme="light"] .viewer-spinner{border-color:#c6dcde;border-top-color:#007c80}
@media(max-width:1100px){.header-tools{gap:16px}.app-header:has(#nav-catalog) .brand-product,.app-header:has(#nav-catalog) .brand-divider{display:none}}
@media(max-width:760px){.header-tools{gap:12px;flex-wrap:wrap;justify-content:flex-end}.app-header:has(#nav-catalog){padding-top:14px;row-gap:12px}.app-header:has(#nav-catalog) .header-tools{display:contents}.app-header:has(#nav-catalog) .preferences{margin-left:auto;align-self:flex-start}.app-header:has(#nav-catalog) .header-actions{order:3}.app-header:has(#nav-catalog) .brand{margin-bottom:0}.viewer-toolbar{gap:12px}.viewer-toolbar .viewer-title{padding-left:12px}.viewer-toolbar .preferences{gap:4px}.viewer-toolbar .language-select{min-width:53px}.viewer-toolbar .theme-toggle{width:30px;min-width:30px}}
@media(max-width:640px){.header-tools{gap:12px}.app-header:has(#library-account:not([hidden])) .brand-product,.app-header:has(#library-account:not([hidden])) .brand-divider{display:none}.language-select{min-width:54px}.preferences{gap:5px}.viewer-toolbar .viewer-title{border-left:0;padding-left:0}.viewer-title>span{display:none}}
@media(max-width:360px){.app-header .brand{gap:9px}.app-header .brand-product{font-size:11px}.app-header .brand-divider{display:none}.header-tools{gap:9px}.language-select{min-width:50px}.viewer-toolbar{gap:8px;padding:0 10px}.viewer-toolbar .viewer-brand img{width:28px}.viewer-toolbar .viewer-title h1{font-size:10px}}

@media(max-width:640px){.app-header:has(#admin-link:not([hidden])){height:auto;min-height:70px;flex-wrap:wrap;padding-top:14px;padding-bottom:14px}.app-header:has(#admin-link:not([hidden])) .header-tools{display:contents}.app-header:has(#admin-link:not([hidden])) .preferences{margin-left:auto}.app-header:has(#admin-link:not([hidden])) #library-account{width:100%;justify-content:flex-end;gap:18px}}
