:root{--z-page-chrome:20;--z-menu:500;--z-drag-preview:1200;--z-surface-base:3000;--z-toast:5000;--z-tooltip:6000}.modal-backdrop{position:fixed;inset:0;z-index:var(--z-surface-base);display:grid;place-items:center;padding:clamp(16px,4vw,36px);background:rgba(0,0,0,.5);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.modal{position:relative;width:min(540px,100%);min-width:min(320px,100%);min-height:180px;max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);overflow:auto;border:1px solid #344555;border-radius:15px;background:#111d28;box-shadow:0 25px 80px #000b}.surface-panel{resize:none}.surface-no-titlebar{min-height:0}.modal-titlebar{min-height:58px;padding:13px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);cursor:move;-webkit-user-select:none;user-select:none;touch-action:none}.modal-titlebar[data-movable=false]{cursor:default}.modal-titlebar h2{min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px}.surface-resize-handle{position:absolute;z-index:2;right:5px;bottom:5px;width:17px;height:17px;border-right:2px solid #93a4b5aa;border-bottom:2px solid #93a4b5aa;border-radius:0 0 3px 0;cursor:nwse-resize;opacity:.8;touch-action:none}.surface-resize-handle:hover{border-color:#8fc9ff}.drawer-backdrop{place-items:stretch end;padding:0}.surface-drawer{width:min(560px,100%);height:100%;max-width:min(560px,100vw);max-height:100vh;border-radius:15px 0 0 15px}.surface-drawer-left{margin-right:auto;border-radius:0 15px 15px 0}.modal:has(.page-settings){width:min(1080px,100%);overflow:hidden;display:flex;flex-direction:column}.modal:has(.page-settings)>.page-settings{min-height:0;flex:1 1 auto;display:flex;flex-direction:column}.modal:has(.page-settings)>.page-settings>.settings-tabs{flex:0 0 auto}.modal:has(.page-settings)>.page-settings>.settings-panel{min-height:0;flex:1 1 auto}.modal:has(.page-settings)>.page-settings>.settings-panel:has(.background-settings-layout){display:flex;flex-direction:column;overflow:hidden}.modal:has(.page-settings)>.page-settings>.form-actions{flex:0 0 auto}.modal:has(.background-lightbox){width:min(960px,100%);min-height:0;overflow:hidden}.modal:has(.widget-settings){width:min(720px,100%)}.modal:has(.admin-shell){width:min(1040px,100%);height:calc(100vh - 32px);max-height:calc(100vh - 32px);overflow:hidden;display:flex;flex-direction:column}.modal:has(.admin-shell)>.admin-shell{min-height:0;flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}.modal:has(.admin-shell)>.admin-shell>.settings-tabs{flex:0 0 auto}.modal:has(.admin-shell)>.admin-shell>.admin-panel{min-height:0;flex:1 1 auto;overflow:auto}.modal:has(.admin-shell)>.admin-shell>.background-library-panel{overflow:hidden;display:flex;flex-direction:column}.modal:has(.admin-shell)>.form-actions{flex:0 0 auto}.modal:has(.organizer){width:min(1400px,100%);max-height:calc(100vh - 32px);overflow:hidden;background:#141414}.surface-no-titlebar>.modal-titlebar{display:none}.modal:has(.bookmark-display-settings){width:min(720px,100%)}.modal>header{padding:17px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.modal h2{margin:0;font-size:18px}.save-status{position:static;display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:8px 12px;border:1px solid #2d9bf080;border-radius:999px;background:#0d1a26ee;box-shadow:0 8px 24px #0008;color:#dce6ef;font-size:12px;pointer-events:none}.save-status.saved{border-color:#54c78a99;color:#d8f5e4}.save-spinner{width:14px;height:14px;flex:0 0 14px;border:2px solid #6fa9d477;border-top-color:#2d9bf0;border-radius:50%;animation:save-spinner-rotate .8s linear infinite}.save-check{color:#54c78a;font-size:15px;font-weight:800;line-height:14px}@keyframes save-spinner-rotate{to{transform:rotate(1turn)}}.toast-stack{position:fixed;right:24px;bottom:24px;z-index:var(--z-toast);display:flex;flex-direction:column;align-items:flex-end;gap:10px;width:min(560px,calc(100vw - 48px));pointer-events:none}.toast{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:10px 12px;border:1px solid #2d9bf080;border-radius:10px;background:#0d1a26f5;box-shadow:0 12px 30px #000b;color:#dce6ef;font-size:12px;pointer-events:auto}.toast-saving{border-color:#2d9bf080}.toast-success{border-color:#54c78a99;color:#d8f5e4}.toast-info{border-color:#7fb7dc99}.toast-error{border-color:#d8874f;background:#3a2418f5;color:#ffe4d2}.toast-dismiss{width:24px;height:24px;margin-left:6px;padding:0;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer;font-size:17px;line-height:1}.toast-dismiss:hover{background:#ffffff12}.background-stock-library{display:grid;gap:9px;padding-top:3px}.background-stock-library-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;color:#b7c5d1;font-size:12px}.background-stock-library-heading span{color:var(--muted);font-size:11px}.background-stock-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(108px,1fr));gap:8px;max-height:190px;overflow:auto;padding:2px}.background-stock-card{display:grid;min-width:0;gap:5px;padding:5px;border:1px solid #405366;border-radius:8px;background:#0c1620;color:var(--ink);cursor:pointer;text-align:left}.background-stock-card:focus-visible,.background-stock-card:hover{border-color:#2d9bf0;background:#152b3c;outline:0}.background-stock-card.selected{border-color:var(--gold);box-shadow:0 0 0 1px var(--gold)}.background-stock-thumbnail{display:block;height:56px;border-radius:5px;background-position:50%;background-size:cover;background-color:#182532}.background-stock-name{overflow:hidden;color:var(--ink);font-size:11px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.background-lightbox{display:grid;min-height:0;place-items:center;padding:20px}.background-lightbox img{display:block;max-width:100%;background:#0c1620;object-fit:contain}.background-lightbox img,.background-lightbox-preview{max-height:calc(100vh - 150px);border:1px solid #405366;border-radius:10px}.background-lightbox-preview{width:min(900px,100%);aspect-ratio:16/9;background-position:50%;background-repeat:no-repeat;background-size:contain;background-color:#0c1620}.background-stock-tooltip{position:fixed;z-index:var(--z-tooltip);width:min(360px,calc(100vw - 24px));padding:8px;border:1px solid #526475;border-radius:10px;background:#101820f7;box-shadow:0 18px 48px #000c;color:var(--ink);pointer-events:none}.background-stock-tooltip img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:6px;background:#182532}.background-stock-tooltip strong{display:block;margin-top:7px;overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.background-library-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.background-library-header h3{margin:0 0 5px}.background-library-header .field-help{max-width:620px;margin:0}.background-library-dropzone{display:grid;min-height:128px;place-items:center;align-content:center;gap:6px;margin-bottom:18px;padding:18px;border:1px dashed #405366;border-radius:10px;background:#0c1620aa;color:var(--muted);text-align:center;transition:border-color .15s ease,background .15s ease,color .15s ease}.background-library-dropzone strong{color:var(--ink);font-size:14px}.background-library-dropzone span{font-size:12px}.background-library-dropzone.is-dragging{border-color:#2d9bf0;background:#152b3cee;color:#dceeff}.background-library-file{display:none}.background-library-progress{display:grid;gap:6px;margin:-4px 0 18px;padding:10px 12px;border:1px solid #405366;border-radius:8px;background:#0c1620;color:var(--muted)}.background-library-progress-label{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--ink);font-size:12px}.background-library-progress-label strong{color:#8fc9ff;font-size:12px}.background-library-progress progress{width:100%;height:8px;overflow:hidden;border:0;border-radius:999px;background:#253341}.background-library-progress progress::-webkit-progress-bar{border-radius:999px;background:#253341}.background-library-progress progress::-webkit-progress-value{border-radius:999px;background:#2d9bf0}.background-library-progress progress::-moz-progress-bar{border-radius:999px;background:#2d9bf0}.background-library-progress small{color:var(--muted);font-size:11px}.background-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;min-height:0;flex:1 1 auto;max-height:none;overflow:auto;padding:3px}.background-library-card{display:grid;min-width:0;overflow:hidden;border:1px solid #405366;border-radius:10px;background:#0c1620}.background-library-thumbnail{min-height:112px;background-position:50%;background-size:cover;background-color:#182532}.background-library-card-body{display:grid;gap:4px;padding:10px}.background-library-card-body strong{overflow:hidden;color:var(--ink);font-size:13px;text-overflow:ellipsis;white-space:nowrap}.background-library-card-body small{color:var(--muted);font-size:11px}.background-library-card-body .button{justify-self:start;margin-top:4px}.background-library-empty{display:grid;min-height:220px;place-items:center;align-content:center;gap:10px;border:1px dashed #405366;border-radius:10px;color:var(--muted);text-align:center}.background-library-empty p{margin:0}.background-library-add-form{display:grid;gap:16px;padding:24px}.background-library-add-form textarea{min-height:180px;width:100%;resize:vertical;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.background-library-import-errors{padding:12px;border:1px solid #a64d4d;border-radius:8px;background:#321d21;color:#ffb5a9}.background-library-import-errors ul{display:grid;gap:8px;max-height:170px;margin:9px 0 0;padding-left:20px;overflow:auto}.background-library-import-errors li{display:grid;gap:2px}.background-library-import-errors li span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.background-library-import-errors li small{color:#ffd0c8}@media (max-width:700px){.background-library-header{align-items:stretch;flex-direction:column}.background-library-header .button{width:100%}}.api-token-dialog{display:grid;gap:14px;padding:24px}.api-token-dialog .admin-notice,.api-token-dialog .field-help{margin:0}.api-token-choices{display:grid;gap:8px;margin:0;padding:0;border:0}.api-token-choices legend{margin-bottom:6px;padding:0}.api-token-choices label{display:flex;align-items:center;gap:8px}.agent-client-list{display:grid;gap:12px;margin-bottom:20px}.agent-client{padding:12px 14px;border:1px solid #405366;border-radius:8px}.agent-client .field-help,.agent-client p{margin:6px 0 0}.agent-command{display:flex;align-items:flex-start;gap:8px;margin-top:8px}.agent-command pre{flex:1 1;min-width:0;margin:0;padding:8px 10px;overflow-x:auto;border-radius:6px;background:#0c1620;font-size:12px}.admin-panel h4{margin:20px 0 8px}.admin-panel h5{margin:16px 0 6px}.api-token-table td small{display:block;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.privacy-page{min-height:100vh;padding:40px 16px 64px;background:#081018}.privacy-page article{max-width:720px;margin:0 auto;color:#c5d0da;line-height:1.6}.privacy-page h1{margin:8px 0 4px;color:var(--ink);font-size:clamp(24px,4vw,32px);line-height:1.2}.privacy-page h2{margin:32px 0 8px;color:var(--ink);font-size:18px}.privacy-page .eyebrow{margin:0}.privacy-page .privacy-date{margin:0 0 20px;color:var(--muted);font-size:14px}.privacy-page ul{margin:8px 0;padding-left:22px}.privacy-page li+li{margin-top:6px}.privacy-page a{color:#6dc7ff}