/* Optical material. The optical edge is shared, while the opacity of each
   surface depends on how much text it needs to carry. */
:root {
  --glass-base:#bbbbbc; --reflection:#fff; --shade:#000; --reflex-light:1; --reflex-dark:1;
  --saturation:150%; --ink:#222244; --paper:#faf9fb; --muted:#60616e;
  --theme-action:#0052f5; --ambient:transparent; --chrome:#ededf0;
  --rim:inset 1.8px 3px 0 -2px color-mix(in srgb,var(--reflection) calc(90% * var(--reflex-light)),transparent),
        inset -2px -2px 0 -1.4px color-mix(in srgb,var(--reflection) calc(80% * var(--reflex-light)),transparent),
        inset -3px -8px 1px -6px color-mix(in srgb,var(--reflection) calc(60% * var(--reflex-light)),transparent),
        inset 1px 2px 5px -1px color-mix(in srgb,var(--shade) calc(8% * var(--reflex-dark)),transparent);
}
:root[data-theme=dark] {
  --glass-base:#bbbbbc; --reflection:#fff; --shade:#000; --reflex-light:.3; --reflex-dark:2;
  --ink:#eeeef0; --muted:#b7b7bf; --paper:#252527; --surface:#343437; --sidebar:#252528;
  --chrome:#242426; --theme-action:#03d5ff; --ambient:rgba(12,13,24,.37); color-scheme:dark;
}
:root[data-theme=dim] {
  --glass-base:#fa81b5; --reflection:#99deff; --shade:#20001b; --reflex-light:.7; --reflex-dark:2;
  --saturation:200%; --ink:#e1e7ee; --muted:#b6c4cf; --paper:#1f3040; --surface:#304252;
  --sidebar:#233544; --line:#c6dfff24; --edge:#c3e8ff42; --hover:#c8e6ff16;
  --chrome:#253844; --theme-action:#ff76b9; --ambient:rgba(21,36,51,.37); color-scheme:dark;
}
#backdrop::after { content:''; position:absolute; inset:0; background:var(--ambient); transition:background-color var(--normal) var(--ease); }
[data-tint-wallpaper=false] #backdrop::after { background:transparent; }
#dock,#menubar,.window,.widget,.popover,.modal-box:not(.launcher) {
  -webkit-backdrop-filter:blur(18px) saturate(var(--saturation));
  backdrop-filter:blur(18px) saturate(var(--saturation));
}
.window {
  background:color-mix(in srgb,var(--paper) calc(34% + var(--glass)*46%),transparent);
  border-color:color-mix(in srgb,var(--reflection) calc(14% + 18% * var(--reflex-light)),transparent);
  box-shadow:var(--rim),0 6px 18px #14101b29,0 0 0 1px #100d2012;
}
.window.focused { box-shadow:var(--rim),0 2px 7px #140e1b20,0 19px 47px -7px #150d224d,0 0 0 1px #100d201a; }
.window.dragging { transition:none; }
.window.dragging[data-gesture=move] { will-change:transform; }
body.tracking,body.tracking * { cursor:var(--tracking-cursor,grabbing)!important; }
.lib-side,.settings-nav { background:linear-gradient(145deg,color-mix(in srgb,var(--sidebar) 43%,transparent),color-mix(in srgb,var(--sidebar) 67%,transparent)); }
.library-main,.settings-page { background:color-mix(in srgb,var(--paper) 87%,transparent); }
.popover,.modal-box:not(.launcher) {
  background:color-mix(in srgb,var(--paper) calc(65% + var(--glass)*26%),transparent);
  box-shadow:var(--rim),0 4px 10px #14121b1a,0 16px 35px #14121b29;
}
.widget:not(.widget-clock) { box-shadow:var(--rim),0 5px 21px #17132530; }
.widget-clock {
  background:linear-gradient(130deg,#353049db,#605571b8);
  box-shadow:inset 0 1px 0 #ffffff54,inset 0 0 0 1px #ffffff26,0 6px 24px #1a112735;
}
.shortcut .app-icon { width:var(--desktop-icon-size,49px); height:var(--desktop-icon-size,49px); }
.shortcut { width:calc(var(--desktop-icon-size,49px) + 36px); }
.visually-hidden { position:absolute!important; inline-size:1px; block-size:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.theme-switch {
  isolation:isolate; position:relative; direction:rtl; display:grid; grid-template-columns:repeat(3,1fr);
  width:min(100%,290px); min-width:0; margin:8px 0 12px; border:0; padding:4px; border-radius:28px;
  color:var(--ink);
}
.theme-switch, #menubar, #dock, .titlebar {
  border:0;
  background:color-mix(in srgb,var(--glass-base) 17%,transparent);
  box-shadow:var(--rim),0 1px 3px #15122219,0 4px 12px #15122215;
  -webkit-backdrop-filter:blur(8px) saturate(var(--saturation)); backdrop-filter:blur(8px) saturate(var(--saturation));
}
.theme-switch::before {
  content:''; position:absolute; pointer-events:none; top:4px; bottom:4px; right:4px; width:calc((100% - 8px)/3);
  border-radius:22px; background:linear-gradient(165deg,color-mix(in srgb,var(--reflection) 23%,transparent),transparent 70%),color-mix(in srgb,var(--glass-base) 36%,transparent);
  box-shadow:var(--rim),0 2px 6px #08051826;
  transform:translateX(calc(-100% * var(--choice))); transition:transform calc(355ms * var(--speed)) cubic-bezier(.24,.78,.25,1);
}
.theme-switch label { display:flex; position:relative; align-items:center; justify-content:center; gap:5px; border-radius:20px; min-height:34px; cursor:pointer; font-size:12px; white-space:nowrap; }
.theme-switch label:has(:checked) { color:var(--theme-action); font-weight:650; }
.theme-switch label:has(:focus-visible) { outline:2px solid var(--theme-action); outline-offset:-2px; }
.theme-switch i { display:flex; }
.theme-switch label:active i { transform:scale(.94); }
:root:is([data-dock-edge=left],[data-dock-edge=right]) :is(#widgets,#shortcuts,#windows,#snap-preview) { bottom:5px; }
[data-dock-edge=left] #workarea { left:var(--dock-room); }
[data-dock-edge=right] #workarea { right:var(--dock-room); }
:root:is([data-dock-edge=left],[data-dock-edge=right]) #dock-zone { top:calc(50% + var(--menu-h)/2); bottom:auto; transform:translateY(-50%); padding:9px; max-height:calc(100vh - var(--menu-h)); }
[data-dock-edge=left] #dock-zone { left:0; right:auto; }
[data-dock-edge=right] #dock-zone { right:0; left:auto; }
:root:is([data-dock-edge=left],[data-dock-edge=right]) #dock { flex-direction:column; align-items:center; padding:10px 8px; }
:root:is([data-dock-edge=left],[data-dock-edge=right]) .dock-divider { height:1px; width:calc(var(--dock-size)*.75); margin:2px 0; }
:root:is([data-dock-edge=left],[data-dock-edge=right]) .dock-magnifier { transform:translateY(var(--shift,0px)) scale(var(--scale,1)); }
[data-dock-edge=left] .dock-magnifier { transform-origin:left center; }
[data-dock-edge=right] .dock-magnifier { transform-origin:right center; }
:root:is([data-dock-edge=left],[data-dock-edge=right]) .dock-tip { top:50%; bottom:auto; transform:translateY(-50%); }
[data-dock-edge=left] .dock-tip { left:calc(100% + 19px); }
[data-dock-edge=right] .dock-tip { right:calc(100% + 19px); left:auto; }
:root:is([data-dock-edge=left],[data-dock-edge=right]) .dock-dot { bottom:auto; top:50%; transform:translateY(-50%); width:4px; }
:root:is([data-dock-edge=left],[data-dock-edge=right]) .active .dock-dot { height:8px; }
[data-dock-edge=left] .dock-dot { left:-5px; }
[data-dock-edge=right] .dock-dot { right:-5px; }
[data-dock-edge=left] .autohide:not(:hover):not(:focus-within) #dock { transform:translateX(calc(-100% - 4px)); }
[data-dock-edge=right] .autohide:not(:hover):not(:focus-within) #dock { transform:translateX(calc(100% + 4px)); }
[data-dock-edge=left] #dock-zone.autohide:not(:hover):not(:focus-within) { clip-path:inset(0 calc(100% - 10px) 0 0); }
[data-dock-edge=right] #dock-zone.autohide:not(:hover):not(:focus-within) { clip-path:inset(0 0 0 calc(100% - 10px)); }
@media (prefers-reduced-transparency:reduce) {
  #menubar,#dock,.window,.widget:not(.widget-clock),.popover,.modal-box:not(.launcher),.theme-switch,.titlebar { background:var(--paper); backdrop-filter:none; -webkit-backdrop-filter:none; }
}
@media (prefers-reduced-motion:reduce) { .theme-switch::before,#backdrop::after { transition:none; } }
@supports (backdrop-filter:url(#theme-lens)) {
  .theme-switch, #menubar, #dock, .titlebar { backdrop-filter:blur(8px) url(#theme-lens) saturate(var(--saturation)); }
}
.tabbed-content { display:flex; flex-direction:column; overflow:hidden; }
.route-tabs { display:flex; flex:none; align-items:stretch; gap:3px; padding:4px 7px; background:color-mix(in srgb,var(--chrome) 58%,transparent); border-bottom:1px solid var(--line); overflow-x:auto; scrollbar-width:thin; }
.route-tab { flex:1 0 auto; max-width:235px; min-width:100px; padding:3px 12px; border-radius:7px; color:var(--muted); font-size:12px; }
.route-tab:hover { background:var(--hover); }
.route-tab[aria-selected=true] { background:var(--paper); color:var(--ink); box-shadow:0 1px 4px #18112222; }
.route-deck,.route-panel { min-height:0; min-width:0; position:relative; flex:1; }
.route-panel { position:absolute; inset:0; overflow:auto; }
@media (prefers-reduced-transparency:reduce) { .theme-switch, #menubar, #dock, .titlebar { backdrop-filter:none; -webkit-backdrop-filter:none; } }

.frame-notice { position:absolute; inset:auto 8px 8px; margin-inline:auto; width:fit-content; max-width:calc(100% - 16px); padding:5px 10px; border:1px solid var(--line); border-radius:10px; display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:6px; background:var(--paper); color:var(--ink); font-size:12px; }
.frame-notice.loading { pointer-events:none; }
.frame-notice .spinner { width:14px; height:14px; }
