:root {
  color-scheme: dark;
  --accent: #74e2e3;
  --logo-accent: var(--accent);
  --chrome-bg: rgba(4, 32, 46, .84);
  --chrome-ink: #f4f8fc;
  --dock-bg: rgba(20, 40, 54, .64);
  --dock-ink: #f4f8fc;
  --tab-active: rgba(111, 207, 237, .22);
  --desktop-backdrop: #082439;
  --top: 46px;
  --tabs: 36px;
  --line: rgba(229, 246, 255, .2);
  --muted: #b9c9d3;
  --dock-icon: clamp(42px, 3.7vw, 58px);
  --dock-item: calc(var(--dock-icon) + 17px);
  --dock-gap: clamp(6px, .65vw, 10px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--desktop-backdrop); color: var(--chrome-ink); }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a, input { font: inherit; }
button, a { color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { text-decoration: none; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The approved wallpaper is a real image: no colour wash, blur or dark overlay. */
.wallpaper { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--wallpaper-position, center); z-index: -2; pointer-events: none; }

.menubar { height: var(--top); display: flex; align-items: center; gap: clamp(22px, 2.2vw, 38px); padding: 0 clamp(18px, 1.8vw, 30px); background: var(--chrome-bg); color: var(--chrome-ink); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15); position: relative; z-index: 40; }
.brand { flex-shrink: 0; display: flex; align-items: center; }
.agraw-mark { display: block; position: relative; width: clamp(118px, 9.3vw, 156px); aspect-ratio: 1585 / 313; }
.agraw-mark::before, .agraw-mark::after { content: ""; position: absolute; inset: 0; mask: center / contain no-repeat; -webkit-mask: center / contain no-repeat; }
.agraw-mark::before { background: var(--chrome-ink); mask-image: url('assets/agraw-word-mask.png'); -webkit-mask-image: url('assets/agraw-word-mask.png'); }
.agraw-mark::after { background: var(--logo-accent); mask-image: url('assets/agraw-r-accent-mask.png'); -webkit-mask-image: url('assets/agraw-r-accent-mask.png'); }
.menubar nav { display: flex; align-items: center; gap: clamp(22px, 2vw, 36px); }
.menubar nav::before { content: ""; width: 1px; height: 25px; margin-left: -6px; background: var(--chrome-ink); opacity: .35; }
.menubar nav button { white-space: nowrap; font-size: clamp(12px, 1.05vw, 17px); font-weight: 560; padding: 8px 0; }
.menubar nav button span { margin-left: 5px; font-size: .8em; }
.menubar button:hover, .menubar a:hover { color: var(--accent); }
.system-menu { margin-left: auto; display: flex; align-items: center; gap: clamp(13px, 1.4vw, 24px); }
.system-menu > button { display: grid; place-items: center; min-height: 32px; min-width: 32px; padding: 5px; border-radius: 8px; }
.system-menu > button:hover { background: color-mix(in srgb, var(--chrome-ink) 8%, transparent); }
.system-menu time { font-size: clamp(12px, 1vw, 16px); white-space: nowrap; font-variant-numeric: tabular-nums; }
.old-design { font-size: 10px; color: var(--chrome-ink); opacity: .7; }
.theme-current-label { font-size: 11px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }

/* Browser-style tabs stay available above every fullscreen application. */
.windowbar { height: var(--tabs); display: flex; align-items: stretch; padding: 0 16px; gap: 6px; background: var(--chrome-bg); color: var(--chrome-ink); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); position: relative; z-index: 35; }
#desktop-button { min-width: 112px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 3px; padding: 0 18px; border-radius: 10px 10px 0 0; font-size: 14px; font-weight: 560; border: 1px solid transparent; border-bottom: 2px solid transparent; }
#desktop-button svg { width: 16px; height: 16px; }
#desktop-button[aria-selected="true"] { background: var(--tab-active); border-color: var(--line); border-bottom-color: var(--accent); }
#desktop-button:hover { background: var(--tab-active); }
#window-tabs { display: flex; align-items: stretch; gap: 5px; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; flex: 1; }
.window-tab { display: flex; align-items: center; min-width: 112px; max-width: 220px; flex-shrink: 0; border: 1px solid transparent; border-bottom: 2px solid transparent; border-radius: 9px 9px 0 0; margin-top: 3px; }
.window-tab:has([aria-selected="true"]) { background: var(--tab-active); border-color: var(--line); border-bottom-color: var(--accent); }
.window-tab:hover { background: color-mix(in srgb, var(--chrome-ink) 6%, transparent); }
.tab-switch { min-width: 0; display: flex; align-items: center; gap: 8px; flex: 1; padding: 0 12px; font-size: 13px; white-space: nowrap; align-self: stretch; }
.tab-switch .app-glyph { width: 21px; height: 21px; border-radius: 4px; }
.tab-switch .app-glyph svg:not(.theme-icon) { width: 15px; height: 15px; }
.tab-close { width: 28px; height: 26px; margin: 0 3px 0 0; padding: 0; border-radius: 5px; font-size: 17px; opacity: .7; }
.tab-close:hover { background: color-mix(in srgb, var(--chrome-ink) 10%, transparent); opacity: 1; }
.window-count { flex-shrink: 0; align-self: center; font-size: 10px; opacity: .65; margin-left: auto; padding-left: 8px; }

#workspace { position: absolute; inset: calc(var(--top) + var(--tabs)) 0 0; }
.desktop { height: 100%; width: 100%; position: relative; }
.desktop-copy, .landscape-caption, .desktop-bottom { display: none; }
#theme-caption, #desktop-slogan { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 1; margin: 0; font-size: clamp(10px, .85vw, 14px); color: var(--desktop-caption-ink, #fff); text-shadow: 0 1px 5px #0008; pointer-events: none; }
#theme-caption { left: 20px; }
#desktop-slogan { right: 20px; font-style: italic; }
body:has(#desktop[hidden]) #theme-caption, body:has(#desktop[hidden]) #desktop-slogan { display: none; }
#windows { position: absolute; inset: 0; pointer-events: none; }
.app-window { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--desktop-backdrop); pointer-events: auto; animation: open-window .18s ease-out; }
.app-window > iframe { display: block; width: 100%; flex: 1; min-height: 0; border: 0; background: var(--desktop-backdrop); }
.app-window-toolbar { height: 30px; flex-shrink: 0; display: flex; align-items: center; gap: 11px; padding: 0 15px; color: var(--chrome-ink); background: var(--chrome-bg); border-bottom: 1px solid var(--line); font-size: 11px; }
.window-controls { display: flex; align-items: center; gap: 2px; }
.window-controls button { display: grid; place-items: center; position: relative; width: 22px; height: 24px; padding: 0; }
.window-controls button::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #ff655b; }
.window-controls .minimize::before { background: #f5bc49; }
.window-controls button:hover::after { content: "×"; position: absolute; inset: 0; display: grid; place-items: center; color: #47211c; font-size: 10px; font-weight: 750; }
.window-controls .minimize:hover::after { content: "−"; color: #67470a; }
.app-window-title { font-weight: 600; }
.window-external { display: grid; place-items: center; min-width: 28px; align-self: stretch; margin-left: auto; color: var(--accent); font-size: 18px; }
.window-hint { font-size: 10px; opacity: .65; white-space: nowrap; }
.iframe-status { position: absolute; top: 30px; left: 0; right: 0; z-index: 1; text-align: center; padding: 9px; background: var(--chrome-bg); color: var(--chrome-ink); font-size: 11px; pointer-events: none; }
.app-window.loaded .iframe-status { display: none; }
@keyframes open-window { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* A quiet compact Dock expands on approach; the application workspace stays free. */
.dock-zone { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); padding: 32px 12px max(14px, env(safe-area-inset-bottom)); z-index: 60; width: max-content; max-width: 100%; }
.dock { display: flex; align-items: flex-end; gap: var(--dock-gap); padding: 10px 16px 11px; border: 1px solid var(--line); border-radius: 25px; color: var(--dock-ink); background: var(--dock-bg); box-shadow: inset 0 1px 0 #ffffff26, 0 9px 32px #00152530; backdrop-filter: blur(17px) saturate(1.25); -webkit-backdrop-filter: blur(17px) saturate(1.25); transform: translateY(0) scale(1); transform-origin: center bottom; opacity: 1; transition: opacity .16s ease, transform .22s cubic-bezier(.2,.8,.2,1); }
.dock-zone:focus-within .dock { transform: translateY(-3px) scale(1.06); }
body.dock-hidden .dock-zone .dock { transform: translateY(calc(100% + 34px)) scale(.96); opacity: 0; pointer-events: none; transition: opacity .55s ease-in-out, transform .7s cubic-bezier(.4,0,.2,1); }
/* A new application immediately receives all of its workspace. Idle concealment
   uses the slower transition above; edge reveal remains quick. */
body.dock-hidden.dock-hide-immediate .dock-zone .dock { transition: none; }
.dock-hidden .dock-zone { pointer-events: none; }
.dock-item { --icon-light: var(--accent); position: relative; display: flex; align-items: center; flex-direction: column; justify-content: flex-end; flex-shrink: 0; width: var(--dock-item); padding: 0 0 7px; gap: 4px; outline-offset: 5px !important; background: transparent; border: 0; box-shadow: none; }
.dock-item:nth-child(2n) { --icon-light: color-mix(in srgb, var(--accent) 78%, #ffd494); }
.dock-item:nth-child(3n) { --icon-light: color-mix(in srgb, var(--accent) 78%, #c7b9ff); }
.app-glyph { display: grid; place-items: center; overflow: hidden; font-weight: 650; border-radius: 13px; flex-shrink: 0; }
.dock-item .app-glyph { position: relative; isolation: isolate; width: var(--dock-icon); height: var(--dock-icon); border-radius: 0; overflow: visible; background: transparent !important; box-shadow: none !important; transform-origin: center bottom; transition: transform .26s cubic-bezier(.2,.8,.2,1), filter .26s ease; }
.dock-item .app-glyph::before, .dock-item .app-glyph::after { content: ""; position: absolute; pointer-events: none; opacity: 0; transition: opacity .24s ease; }
.dock-item .app-glyph::before { z-index: -1; inset: -15%; border-radius: 50%; background: radial-gradient(ellipse, color-mix(in srgb, var(--icon-light) 40%, transparent), transparent 70%); filter: blur(7px); }
.dock-item .app-glyph::after { z-index: -1; inset: -12%; border-radius: 46% 54% 51% 49%; background: conic-gradient(from 20deg, transparent 0deg 48deg, color-mix(in srgb, var(--icon-light) 30%, transparent) 82deg, var(--icon-light) 105deg, transparent 140deg 222deg, color-mix(in srgb, var(--icon-light) 55%, transparent) 265deg, transparent 302deg); -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1px), #000 calc(100% - .4px), transparent); mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1px), #000 calc(100% - .4px), transparent); filter: drop-shadow(0 0 3px var(--icon-light)); animation: dock-light-orbit 4.8s linear infinite; animation-play-state: paused; }
.app-glyph > img { width: 100%; height: 100%; object-fit: contain; }
.app-glyph > svg:not(.theme-icon) { width: 60%; height: 60%; }
.app-glyph .theme-icon { display: block; width: 100%; height: 100%; overflow: hidden; fill: none; stroke: none; border-radius: inherit; }
.app-glyph:has(.theme-icon) { background: none; box-shadow: none; }
.dock-item .theme-icon { position: relative; z-index: 1; overflow: visible; border-radius: 0; filter: drop-shadow(0 2px 2px #0003); }
.dock-label { color: var(--dock-ink); font-size: clamp(10px, .85vw, 13px); line-height: 1.2; font-weight: 500; white-space: nowrap; text-shadow: 0 1px 3px #0002; }
.dock-item:focus-visible .app-glyph { transform: translateY(-8px) scale(1.24); }
.dock-item:focus-visible .app-glyph::before, .dock-item:focus-visible .app-glyph::after { opacity: 1; animation-play-state: running; }
.dock-item:nth-child(2n) .app-glyph::after { animation-direction: reverse; animation-duration: 5.6s; }
.dock-item:nth-child(3n) .app-glyph::before { animation: dock-light-breathe 2.8s ease-in-out infinite alternate; animation-play-state: paused; }
.dock-item:nth-child(3n):focus-visible .app-glyph::before { animation-play-state: running; }
.dock-item:focus-visible { z-index: 2; }
.dock-item.running::after { content: ""; position: absolute; bottom: -2px; width: 5px; height: 5px; border-radius: 99px; background: var(--accent); box-shadow: 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent); }
.dock-item.active::after { width: 14px; }
.dock-item.launching .app-glyph { animation: dock-bounce .5s ease; }
.dock-divider { display: none; }
.glyph-talsa:not(:has(.theme-icon)) { background: linear-gradient(135deg,#72c5fc,#154cc9); }
.glyph-asafu:not(:has(.theme-icon)) { background: linear-gradient(135deg,#e6a461,#d36540 55%,#a44251); color:#fff3dc; }
.glyph-tira:not(:has(.theme-icon)) { background: linear-gradient(135deg,#a5b6ed,#5e52c7); }
.glyph-pdft:not(:has(.theme-icon)) { background: linear-gradient(135deg,#ff9278,#cf4152); color: white; letter-spacing:-1px; font-size:18px; }
.glyph-selwali:not(:has(.theme-icon)) { background: linear-gradient(135deg,#7ef2df,#2a9d98); color: #083c41; }
.glyph-selwali > svg:not(.theme-icon) { fill: currentColor; stroke: none; width: 50%; }
.glyph-dallet:not(:has(.theme-icon)) { background: linear-gradient(135deg,#e4ca83,#aa8741); color: #2b271a; }
.glyph-about { background: var(--tab-active); color: var(--accent); }
#dock-reveal { position: fixed; bottom: 0; left: 0; right: 0; width: 100%; height: max(12px, env(safe-area-inset-bottom)); z-index: 59; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
#dock-reveal span { height: 3px; width: 44px; border-radius: 99px; background: var(--chrome-ink); opacity: .45; margin-bottom: 3px; }
body:not(.app-active) #dock-reveal { display: none; }
@media (hover: hover) and (pointer: fine) {
  .dock-zone:hover .dock { transform: translateY(-3px) scale(1.06); }
  .dock-item:hover { z-index: 2; }
  .dock-item:hover .app-glyph { transform: translateY(-8px) scale(1.24); }
  .dock-item:has(+ .dock-item:hover) .app-glyph, .dock-item:hover + .dock-item .app-glyph { transform: translateY(-3px) scale(1.10); }
  .dock-item:hover .app-glyph::before, .dock-item:hover .app-glyph::after { opacity: 1; animation-play-state: running; }
}
@keyframes dock-light-orbit { to { transform: rotate(1turn); } }
@keyframes dock-light-breathe { from { filter: blur(7px); transform: translateX(-2px) scale(.92); } to { filter: blur(9px); transform: translateX(2px) scale(1.06); } }
@keyframes dock-bounce { 0%, 100% { transform: translateY(0); } 38% { transform: translateY(-20px); } 70% { transform: translateY(-4px); } }

.popover { position: fixed; z-index: 80; top: calc(var(--top) + 9px); background: var(--chrome-bg); color: var(--chrome-ink); border: 1px solid var(--line); border-radius: 15px; padding: 20px; box-shadow: 0 20px 60px #0005; backdrop-filter: blur(28px) saturate(1.3); -webkit-backdrop-filter: blur(28px) saturate(1.3); animation: open-window .15s ease-out; }
.popover-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.close-popover { min-width: 26px; min-height: 26px; padding: 0 5px; border-radius: 5px; font-size: 21px; opacity: .7; }
.close-popover:hover { opacity: 1; background: var(--tab-active); }
.launcher { left: 164px; width: 400px; max-width: calc(100vw - 24px); }
#launcher-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.launcher-app { display: flex; align-items: center; gap: 11px; border-radius: 8px; padding: 10px 7px; text-align: left; }
.launcher-app:hover { background: var(--tab-active); }
.launcher-app .app-glyph { width: 40px; height: 40px; border-radius: 9px; }
.launcher-app strong { display: block; font-size: 12px; font-weight: 550; }
.launcher-app small { display: block; font-size: 10px; margin-top: 3px; opacity: .7; }
.launcher-app .app-availability { color: var(--accent); font-weight: 600; opacity: 1; }
.appearance { width: min(760px, calc(100vw - 32px)); right: 16px; max-height: min(83vh, 760px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.theme-choice { min-width: 0; display: block; padding: 5px; border: 1px solid transparent; border-radius: 10px; text-align: left; color: var(--chrome-ink); }
.theme-choice[aria-checked="true"], .theme-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--tab-active); }
.theme-choice:hover { background: color-mix(in srgb, var(--chrome-ink) 7%, transparent); }
.theme-preview { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; background-size: cover; background-position: center; box-shadow: 0 1px 5px #0002; overflow: hidden; }
.theme-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.theme-choice > span:last-child, .theme-choice-name { display: block; padding: 8px 3px 3px; font-size: 11px; line-height: 1.35; }
.theme-choice small { display: block; font-size: 9px; opacity: .65; margin: 0 3px 4px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 12px; padding: 17px 0 6px; }
.setting-row input { accent-color: var(--accent); width: 18px; height: 18px; }
.appearance p { font-size: 11px; opacity: .7; line-height: 1.6; margin-bottom: 0; }
.theme-status { font-size: 11px; opacity: .7; }

/* All validated themes use the same interaction model, with their own chrome. */
body[data-desktop-theme="horizon"] { --line: #d6efff33; }
body[data-desktop-theme="assemblee"] .dock { border-radius: 32px; box-shadow: inset 0 1px 0 #fff4, 0 12px 32px #001d3440; }
body[data-desktop-theme="trame"] .dock { border-radius: 12px; border-top: 2px solid #cdb28475; }
body[data-desktop-theme="trame"] .window-tab, body[data-desktop-theme="trame"] #desktop-button { border-radius: 0; }
body[data-desktop-theme="trame"] .menubar { backdrop-filter: blur(5px); }
body[data-desktop-theme="langue"] .dock { border-radius: 30px; box-shadow: inset 0 1px 0 #fff, 0 10px 30px #0b5c9230; }
body[data-desktop-theme="atelier"] .dock { border-radius: 999px; }
body[data-desktop-theme="emeraude"] .dock { border-radius: 18px; }
body[data-desktop-theme="crepuscule"] .dock { border-radius: 28px; border-color: #f2cf9e38; }
body[data-desktop-theme="azur"] .dock { border-color: #96c9ff75; box-shadow: inset 0 1px 0 #d5ebff38, 0 9px 32px #00152c40; }
body[data-desktop-theme="clarte"] .dock { border-radius: 30px; box-shadow: inset 0 1px 0 white, 0 12px 35px #30659b30; }
body[data-desktop-theme="place"] .dock { border-radius: 18px; border-color: #fff9; box-shadow: inset 0 1px 0 white, 0 8px 20px #163c6b2c; }
body[data-desktop-theme="verre"] .dock { border-radius: 30px; border-color: #a4d9ff9e; box-shadow: inset 0 1px 0 #c8efff80, 0 10px 30px #011f504f; }
body[data-desktop-theme="terre"] .dock { border-radius: 28px; border-color: #ffd29b55; box-shadow: inset 0 1px 0 #ffc59e55, 0 12px 32px #33090050; }
body[data-desktop-theme="terre"] .window-tab, body[data-desktop-theme="terre"] #desktop-button { border-radius: 9px 9px 0 0; }
body[data-desktop-theme="nuit"] .dock { border-radius: 38px; border-color: #cd9bff44; box-shadow: inset 0 1px 0 #dfb9ff22, 0 0 22px #773edc25, 0 12px 32px #05011950; }
body[data-desktop-theme="panorama"] .dock { border-radius: 18px; border-color: #40e9ed80; }
body[data-tone="light"] { color-scheme: light; --line: rgba(21, 49, 83, .18); --muted: #53677b; --desktop-caption-ink: #163442; }
body[data-tone="light"] #theme-caption, body[data-tone="light"] #desktop-slogan { text-shadow: 0 1px 3px #fff8; }
body[data-tone="light"] .dock-label { text-shadow: none; }

.about-content, .unavailable-content { flex: 1; min-height: 0; overflow: auto; padding: clamp(26px, 5vw, 75px); background: var(--desktop-backdrop); color: var(--chrome-ink); }
.about-content { line-height: 1.9; }
.about-content h2 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(32px, 3.2vw, 48px); font-weight: 400; line-height: 1.15; margin: 0 0 25px; }
.about-content p { max-width: 880px; opacity: .85; }
.about-content .about-verse { max-width: 700px; margin: 35px 0; padding: 20px 30px; border-left: 2px solid var(--accent); }
.about-content blockquote { margin: 0; }
.about-content a { color: var(--accent); }
.unavailable-content { display: flex; align-items: center; justify-content: center; text-align: center; }
.unavailable-content .app-glyph { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 25px; }
.unavailable-content h2 { margin: 0 0 12px; font-family: Georgia, 'Times New Roman', serif; font-size: 44px; font-weight: 400; }
.unavailable-content p { font-size: 14px; opacity: .7; }
dialog { color: var(--chrome-ink); background: var(--desktop-backdrop); border: 1px solid var(--line); border-radius: 17px; max-width: min(440px, calc(100vw - 32px)); padding: 28px; box-shadow: 0 30px 90px #0009; }
dialog::backdrop { background: #00111999; backdrop-filter: blur(5px); }
dialog h2 { font-size: 19px; font-weight: 600; margin: 0 0 16px; }
dialog p { font-size: 13px; line-height: 1.65; opacity: .75; }
dialog > div { display: flex; justify-content: flex-end; gap: 12px; margin-top: 25px; }
dialog button { padding: 10px 15px; border-radius: 8px; font-size: 12px; background: var(--tab-active); }
#confirm-close { background: var(--accent); color: var(--desktop-backdrop); }

@media (min-width: 1800px) { :root { --dock-icon: 62px; --dock-item: 82px; --dock-gap: 10px; } }
@media (max-width: 1100px) {
  .theme-current-label, .old-design { display: none; }
  :root { --dock-icon: 48px; --dock-item: 64px; --dock-gap: 6px; }
  .dock { padding-inline: 16px; }
  #theme-caption, #desktop-slogan { font-size: 10px; }
}
@media (max-width: 760px) {
  :root { --top: 44px; --tabs: 36px; --dock-icon: clamp(32px, 6vw, 43px); --dock-item: clamp(38px, 7.8vw, 54px); --dock-gap: 3px; }
  .menubar { padding: 0 13px; gap: 17px; }
  .agraw-mark { width: 95px; }
  .menubar nav { gap: 15px; }
  .menubar nav::before { display: none; }
  .menubar nav button { font-size: 11px; }
  .system-menu { gap: 7px; }
  .system-menu time { font-size: 11px; }
  .system-menu > button { min-width: 28px; }
  .windowbar { padding-inline: 8px; gap: 3px; }
  #desktop-button { min-width: 76px; padding: 0 10px; font-size: 12px; }
  .window-tab { min-width: 98px; }
  .tab-switch { font-size: 12px; padding-inline: 8px; gap: 5px; }
  .window-count { display: none; }
  .dock-zone { padding: 24px 5px max(15px, env(safe-area-inset-bottom)); }
  .dock { border-radius: 18px; gap: var(--dock-gap); padding: 8px 8px 10px; }
  .dock-zone:is(:hover, :focus-within) .dock { transform: translateY(0) scale(1); }
  .dock-hidden .dock-zone:is(:hover, :focus-within) .dock { transform: translateY(calc(100% + 34px)) scale(.96); }
  .dock-item .app-glyph { border-radius: 0; }
  .dock-label { font-size: 10px; }
  .dock-item:hover .app-glyph, .dock-item:focus-visible .app-glyph { transform: translateY(-5px) scale(1.12); }
  .dock-item:has(+ .dock-item:hover) .app-glyph, .dock-item:hover + .dock-item .app-glyph { transform: none; }
  #theme-caption { left: 13px; bottom: calc(108px + env(safe-area-inset-bottom)); font-size: 9px; max-width: 52%; }
  #desktop-slogan { right: 13px; bottom: calc(108px + env(safe-area-inset-bottom)); font-size: 9px; max-width: 42%; text-align: right; }
  .popover { top: calc(var(--top) + 7px); padding: 16px; }
  .launcher { left: 12px; }
  .appearance { right: 12px; width: calc(100vw - 24px); max-height: calc(100dvh - var(--top) - 30px); }
  #theme-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .theme-choice-name, .theme-choice > span:last-child { font-size: 10px; }
  .app-window-toolbar { padding-inline: 8px; gap: 8px; }
  .window-hint { display: none; }
}
@media (max-width: 420px) {
  :root { --dock-icon: 32px; --dock-item: 38px; --dock-gap: 3px; }
  .menubar { gap: 13px; padding-inline: 10px; }
  .menubar nav { gap: 11px; }
  .agraw-mark { width: 88px; }
  .system-menu time { display: none; }
  .dock { padding-inline: 8px; gap: 3px; }
  .dock-label { font-size: 8.5px; }
  .dock-item { gap: 5px; }
  #desktop-slogan { max-width: 45%; font-size: 8px; }
  #theme-caption { max-width: 48%; font-size: 8px; }
  .launcher-app { gap: 8px; padding-inline: 4px; }
  .launcher-app .app-glyph { width: 33px; height: 33px; }
  .launcher-app small { font-size: 9px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  :root { --top: 35px; --tabs: 30px; --dock-icon: 37px; --dock-item: 51px; }
  .menubar nav button { padding-block: 4px; }
  .agraw-mark { width: 105px; }
  .dock { padding-block: 7px 9px; }
  .dock-label { font-size: 9px; }
  .dock-zone { padding-bottom: 9px; }
  #theme-caption, #desktop-slogan { font-size: 8px; bottom: 9px; }
  .appearance { max-height: calc(100dvh - var(--top) - 15px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.system-menu > #appearance-toggle { display: flex; align-items: center; justify-content: center; gap: 9px; }
.popover-heading small { display: block; font-size: 10px; font-weight: 400; opacity: .65; margin-top: 5px; }
.legacy-gallery-link { display: inline-flex; color: var(--accent); font-size: 11px; margin-top: 14px; }
.theme-choice.is-loading { opacity: .65; }
