/* AustinOS: a GNOME-flavored Linux desktop */
:root {
  --top-h: 32px;
  --dock-w: 68px;
  --radius: 12px;
  --font: "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Ubuntu Mono", ui-monospace, Menlo, Consolas, monospace;
  --accent: #e95420;
  --on-accent: #fff;
  --destructive: #c7162b;
}
body[data-accent="orange"]  { --accent: #e95420; }
body[data-accent="bark"]    { --accent: #787859; }
body[data-accent="sage"]    { --accent: #657b69; }
body[data-accent="olive"]   { --accent: #4b8501; }
body[data-accent="teal"]    { --accent: #308280; }
body[data-accent="blue"]    { --accent: #0073e5; }
body[data-accent="purple"]  { --accent: #7764d8; }
body[data-accent="magenta"] { --accent: #b34cb3; }
body[data-accent="red"]     { --accent: #da3450; }

body[data-style="dark"] {
  --win: #242424; --head: #303030; --card: #363636; --view: #1e1e1e;
  --text: #ffffff; --dim: #b5b5b5; --line: rgba(255,255,255,.09);
  --hover: rgba(255,255,255,.08); --btn: rgba(255,255,255,.1); --btn-h: rgba(255,255,255,.16);
  --shadow: 0 2px 6px rgba(0,0,0,.35), 0 18px 48px rgba(0,0,0,.5);
  --link: #ffa47a;
}
body[data-style="light"] {
  --win: #fafafa; --head: #ebebeb; --card: #ffffff; --view: #ffffff;
  --text: #2e2e2e; --dim: #6a6a6a; --line: rgba(0,0,0,.1);
  --hover: rgba(0,0,0,.06); --btn: rgba(0,0,0,.08); --btn-h: rgba(0,0,0,.13);
  --shadow: 0 2px 6px rgba(0,0,0,.15), 0 18px 48px rgba(0,0,0,.28);
  --link: #c2410c;
}

/* Wallpapers */
body[data-wall="aubergine"], .w-aubergine {
  background:
    radial-gradient(60% 80% at 85% 110%, #e95420 0%, rgba(233,84,32,.0) 60%),
    radial-gradient(50% 60% at 100% 40%, rgba(199,22,43,.75) 0%, rgba(199,22,43,0) 70%),
    radial-gradient(70% 90% at 10% 0%, #5e2750 0%, rgba(94,39,80,0) 70%),
    linear-gradient(160deg, #2c001e 0%, #4d1238 55%, #77216f 100%);
}
body[data-wall="dusk"], .w-dusk {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 400' preserveAspectRatio='none'%3E%3Cpath d='M0 400V250l120-60 90 40 140-110 120 90 80-30 160 100 110-70 150 60 130-120 140 90 90-30 170 100v80z' fill='%23241032' fill-opacity='.85'/%3E%3Cpath d='M0 400V320l200-40 160 30 220-60 180 50 200-30 240 40 200-30 200 40v80z' fill='%2315071f'/%3E%3Cpath d='M1260 400v-150m0 40h-24v-40m24 60h22v-50' stroke='%2315071f' stroke-width='14' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") bottom / 100% 42% no-repeat,
    radial-gradient(30% 25% at 70% 62%, #ffd27a 0%, rgba(255,210,122,0) 100%),
    linear-gradient(180deg, #1d1035 0%, #5a2160 35%, #c2455a 62%, #f08a4b 80%, #f9c46b 100%);
}
body[data-wall="mint"], .w-mint {
  background:
    radial-gradient(60% 70% at 20% 100%, #87cf3e 0%, rgba(135,207,62,0) 70%),
    radial-gradient(60% 70% at 90% 10%, #2aa198 0%, rgba(42,161,152,0) 70%),
    linear-gradient(140deg, #0b3d2e, #14614a 60%, #1f7a5c);
}
body[data-wall="midnight"], .w-midnight {
  background:
    radial-gradient(40% 50% at 75% 30%, rgba(80,120,255,.35), rgba(80,120,255,0) 70%),
    radial-gradient(50% 60% at 15% 85%, rgba(160,60,255,.3), rgba(160,60,255,0) 70%),
    linear-gradient(180deg, #050816, #0d1330);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; color: var(--text);
  font: 14.5px/1.45 var(--font);
  background-size: cover; background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--link); }
svg { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top-h); z-index: 9000;
  display: flex; align-items: center; justify-content: space-between; padding: 0 6px;
  background: #000; color: #fff; font-size: 14px; font-weight: 500;
}
.topbar button { border: 0; background: none; color: #fff; border-radius: 999px; height: 24px; }
.topbar button:hover, .topbar button[aria-expanded="true"] { background: rgba(255,255,255,.17); }
.tb-pill { padding: 0 12px; }
.tb-clock { position: absolute; left: 50%; transform: translateX(-50%); padding: 0 12px; white-space: nowrap; }
.tb-right { display: flex; align-items: center; gap: 2px; }
.tb-icon { width: 30px; display: grid; place-items: center; }
.tb-icon svg, .tb-status svg { width: 16px; height: 16px; }
.tb-status { display: flex; align-items: center; gap: 8px; }
#tray-pager.buzz { animation: buzz .1s linear 8; }
@keyframes buzz { 0%,100% { transform: none } 25% { transform: rotate(-12deg) } 75% { transform: rotate(12deg) } }

/* Quick settings */
.qs {
  position: fixed; top: calc(var(--top-h) + 6px); right: 6px; z-index: 9100; width: 340px; max-width: calc(100vw - 12px);
  background: #2a2a2a; color: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.5);
  display: flex; flex-direction: column; gap: 10px; animation: pop .14s ease-out;
}
.qs[hidden] { display: none; }
.qs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qs-tile { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 0; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; text-align: left; min-height: 48px; }
.qs-tile svg { width: 18px; height: 18px; }
.qs-tile span { display: flex; flex-direction: column; line-height: 1.2; font-weight: 500; }
.qs-tile small { font-weight: 400; opacity: .8; font-size: 12px; }
.qs-tile:hover { background: rgba(255,255,255,.17); }
.qs-tile.on { background: var(--accent); color: var(--on-accent); }
.qs-foot { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 0; font-size: 13px; }
.qs-round { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; }
.qs-round:hover { background: rgba(255,255,255,.17); }
.qs-round svg { width: 18px; height: 18px; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98) } to { opacity: 1; transform: none } }

/* Notification banner */
.banner {
  position: fixed; top: calc(var(--top-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 9200;
  width: min(420px, calc(100vw - 20px)); display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 16px; background: #2f2f2f; color: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.45);
  animation: drop .2s ease-out; cursor: pointer;
}
.banner[hidden] { display: none; }
.banner-ico { width: 32px; height: 32px; }
.banner b { display: block; margin-bottom: 2px; }
.banner span { font-size: 13.5px; color: #ddd; }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -12px) } to { opacity: 1; transform: translate(-50%, 0) } }

/* Dock */
.dock {
  position: fixed; top: var(--top-h); bottom: 0; left: 0; width: var(--dock-w); z-index: 8000;
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0;
  background: rgba(20, 20, 20, .72); backdrop-filter: blur(14px);
}
.dock-app {
  position: relative; width: 52px; height: 52px; border: 0; border-radius: 12px; background: none;
  display: grid; place-items: center; transition: background .12s;
}
.dock-app svg { width: 42px; height: 42px; transition: transform .15s; }
.dock-app:hover { background: rgba(255,255,255,.12); }
.dock-app:active svg { transform: scale(.9); }
.dock-app.running::before {
  content: ""; position: absolute; left: -6px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px;
  border-radius: 50%; background: var(--accent);
}
.dock-app.focused::before { height: 14px; margin-top: -7px; border-radius: 3px; }
.dock-app::after {
  content: attr(data-label); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: rgba(30,30,30,.95); color: #fff; padding: 5px 10px; border-radius: 8px; font-size: 13px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.dock-app:hover::after { opacity: 1; }
.dock-sep { flex: 1; }
.dock-grid { color: #fff; }
.dock-grid svg { width: 26px; height: 26px; }

/* Desktop */
.desktop { position: fixed; top: var(--top-h); left: var(--dock-w); right: 0; bottom: 0; }
.desk-icons { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 6px; }
.desk-icon {
  width: 92px; padding: 8px 4px; border: 0; border-radius: 10px; background: none; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.desk-icon svg { width: 52px; height: 52px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.desk-icon:hover { background: rgba(255,255,255,.12); }
.desk-icon.sel { background: color-mix(in srgb, var(--accent) 45%, transparent); }

/* Windows */
.win {
  position: absolute; display: flex; flex-direction: column; overflow: hidden;
  background: var(--win); color: var(--text); border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(0,0,0,.25);
  max-width: calc(100% - 16px); max-height: calc(100% - 16px);
  animation: open .16s ease-out;
}
.win[hidden] { display: none; }
@keyframes open { from { opacity: 0; transform: scale(.96) } to { opacity: 1; transform: none } }
.win.max { inset: 0 !important; width: auto !important; height: auto !important; max-width: none; max-height: none; border-radius: 0; }
.win:not(.focused) { box-shadow: 0 2px 6px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.2); }
.win:not(.focused) .headerbar { color: var(--dim); }

.headerbar {
  position: relative; flex: none; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 10px;
  background: var(--head); border-bottom: 1px solid var(--line); user-select: none; touch-action: none; cursor: default;
}
.hb-title { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 700; white-space: nowrap; pointer-events: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.hb-title small { font-weight: 400; color: var(--dim); margin-left: 6px; }
.hb-path { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 8px; background: var(--btn); font-size: 14px; }
.hb-path svg { width: 16px; height: 16px; }
.hb-path i { font-style: normal; color: var(--dim); }
.hb-ctl { margin-left: auto; display: flex; gap: 10px; }
.hb-ctl button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--btn); display: grid; place-items: center; padding: 0; }
.hb-ctl button:hover { background: var(--btn-h); }
.hb-ctl button[data-act="close"]:hover { background: var(--accent); color: var(--on-accent); }
.hb-ctl svg { width: 16px; height: 16px; }
.win-body { flex: 1; min-height: 0; overflow: auto; padding: 18px; }
.win-body p { margin: 0 0 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border: 0; border-radius: 8px; background: var(--btn); color: var(--text);
  font-weight: 500; text-decoration: none; transition: background .12s;
}
.btn:hover { background: var(--btn-h); }
.btn.suggested { background: var(--accent); color: var(--on-accent); }
.btn.suggested:hover { filter: brightness(1.08); }
.btn.destructive { color: #fff; background: var(--destructive); }
.btn.small { padding: 4px 12px; font-size: 13px; }
.btn.wide { width: 100%; padding: 11px; }
.link { border: 0; background: none; padding: 0; color: var(--link); font-weight: 500; }
.link:hover { text-decoration: underline; }

/* Rows (boxed list) */
.rows { margin: 0; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.rows > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.rows > div:last-child { border-bottom: 0; }
.rows dt { font-weight: 500; white-space: nowrap; }
.rows dd { margin: 0; color: var(--dim); text-align: right; }

/* Welcome */
.welcome { display: flex; flex-direction: column; gap: 16px; }
.welcome-hero { display: flex; gap: 18px; align-items: center; }
.welcome-logo { width: 72px; height: 72px; }
.welcome h2 { margin: 0 0 4px; font-size: 22px; font-weight: 500; }
.welcome-hero p { margin: 0; color: var(--dim); }
.tip { background: var(--card); border-radius: 12px; padding: 14px 16px; box-shadow: 0 0 0 1px var(--line); }
.tip-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; color: var(--dim); }
.tip p { margin: 0; min-height: 3em; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hint { font-size: 12.5px; color: var(--dim); text-align: center; margin: 0 !important; }

/* About */
.about { display: flex; flex-direction: column; align-items: center; text-align: center; }
.about-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--card), 0 6px 20px rgba(0,0,0,.3); }
.about-name { font-size: 22px; font-weight: 500; margin-top: 14px; }
.about-sub { color: var(--dim); margin-bottom: 18px; }
.about .rows { width: 100%; text-align: left; }

/* Files */
.files { flex: 1; min-height: 0; display: flex; }
.files-side { width: 180px; flex: none; padding: 8px; background: var(--head); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; }
.side-item svg { width: 16px; height: 16px; }
.side-item:hover { background: var(--hover); }
.side-item.on { background: var(--btn-h); font-weight: 500; }
.files-main { flex: 1; overflow: auto; padding: 16px; background: var(--view); display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; align-content: start; }
.fitem { border: 0; background: none; border-radius: 10px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; text-align: center; }
.fitem[hidden] { display: none; }
.fitem:hover { background: var(--hover); }
.fitem.sel { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.files-status { flex: none; padding: 6px 14px; font-size: 12.5px; color: var(--dim); background: var(--head); border-top: 1px solid var(--line); }

.appicon {
  --c1: #888; --c2: #444;
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: linear-gradient(160deg, var(--c1), var(--c2)); color: #fff; font: 700 22px var(--font); letter-spacing: -.5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 8px rgba(0,0,0,.3);
}
.appicon.big { width: 84px; height: 84px; font-size: 34px; border-radius: 20px; }
.appicon.sm { width: 40px; height: 40px; font-size: 17px; border-radius: 10px; }
.appicon.muted { --c1: #8a8a90; --c2: #55555b; filter: grayscale(1); opacity: .8; }

.app-detail { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.app-detail h2 { margin: 12px 0 0; font-size: 22px; font-weight: 500; }
.chip { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); margin-bottom: 10px; }
.app-tagline { font-weight: 500; font-size: 16px; margin: 4px 0 6px !important; }
.app-desc { color: var(--dim); }
.app-detail .rows { width: 100%; margin: 6px 0 16px; text-align: left; }

/* Editor */
.editor { background: var(--view); font: 15px/1.6 var(--mono); padding: 18px 26px 26px; counter-reset: ln; }
.editor h2, .editor h3 { font-weight: 700; margin: 18px 0 4px; }
.editor h2 { font-size: 22px; margin-top: 0; }
.editor h3 { font-size: 17px; color: var(--accent); }
.editor h3 em { font-style: normal; font-weight: 400; color: var(--text); }
.editor .md { color: var(--dim); font-weight: 400; }
.editor .when { color: var(--dim); margin-bottom: 4px; }
.editor p { margin: 0 0 6px; }
.editor ul { margin: 4px 0 10px; padding-left: 2.2ch; list-style: "- "; }
.editor li { margin: 2px 0; }
.editor li::marker { color: var(--accent); }
.editor-status { flex: none; display: flex; justify-content: flex-end; gap: 22px; padding: 5px 14px; font-size: 12.5px; color: var(--dim); background: var(--head); border-top: 1px solid var(--line); }

/* Trash */
.trash { padding: 8px; background: var(--view); }
.trash-row { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 10px; }
.trash-row:hover { background: var(--hover); }
.trash-row div { flex: 1; display: flex; flex-direction: column; }
.trash-row div span { color: var(--dim); font-size: 13.5px; }
.trash-row time { color: var(--dim); font-size: 13px; white-space: nowrap; }
.headerbar .btn.small { position: relative; z-index: 1; }

/* Contact */
.contact { display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; }
.contact p { color: var(--dim); }
.contact .list { width: 100%; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.contact .list a { display: flex; justify-content: space-between; padding: 12px 14px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.contact .list a:last-child { border-bottom: 0; }
.contact .list a:hover { background: var(--hover); }
.contact .list a span { color: var(--dim); }
.contact .list a::after { content: "↗"; color: var(--dim); margin-left: 8px; }

/* Terminal */
.term-win .headerbar { background: #2c2c2c; color: #fff; border-bottom-color: #111; }
.term-win:not(.focused) .headerbar { color: #aaa; }
.term-win .hb-ctl button { background: rgba(255,255,255,.1); color: #fff; }
.term {
  background: #300a24; color: #eeeeec; font: 16px/1.35 var(--mono); padding: 10px 12px; cursor: text;
}
body[data-wall="midnight"] .term, body[data-wall="mint"] .term { background: #171421; }
#term-out { white-space: pre-wrap; word-break: break-word; }
#term-out a { color: #8ae234; }
.term-line { display: flex; }
.ps { white-space: pre; }
.ps .u, .t-u { color: #8ae234; font-weight: 700; }
.ps .d, .t-d { color: #729fcf; font-weight: 700; }
#term-in { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: inherit; font: inherit; padding: 0 0 0 1ch; caret-color: #eeeeec; }
.t-h { color: #fce94f; }
.t-ok { color: #8ae234; }
.t-err { color: #ef2929; }
.t-acc { color: var(--accent); font-weight: 700; }
.t-dim { color: #a0a0a0; }

/* Settings */
.settings h3 { font-size: 14px; font-weight: 700; margin: 18px 0 10px; }
.settings h3:first-child { margin-top: 0; }
.style-pick { display: flex; gap: 14px; }
.style-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font-size: 13px; }
.mini { width: 120px; height: 72px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); position: relative; overflow: hidden; }
.mini::after { content: ""; position: absolute; left: 16px; top: 14px; right: 16px; bottom: -6px; border-radius: 6px; }
.mini.light { background: #e8e8e8; } .mini.light::after { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.mini.dark { background: #1a1a1a; } .mini.dark::after { background: #333; }
.style-opt.on .mini { box-shadow: 0 0 0 3px var(--accent); }
.accents { display: flex; flex-wrap: wrap; gap: 12px; }
.accents button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--a); padding: 0; }
.accents button.on { box-shadow: 0 0 0 2px var(--win), 0 0 0 4px var(--a); }
.walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.walls button { border: 0; background: none; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; align-items: center; }
.wall-prev { width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; background-size: cover !important; }
.walls button.on .wall-prev { box-shadow: 0 0 0 3px var(--accent); }

/* Dialogs */
.win.dialog { border-radius: 16px; }
.dialog-body { text-align: center; padding: 26px 24px 18px; }
.dialog-body h2 { margin: 0 0 8px; font-size: 19px; }
.dialog-body p { color: var(--dim); }
.dialog-btns { display: flex; border-top: 1px solid var(--line); }
.dialog-btns button { flex: 1; padding: 13px; border: 0; background: none; font-weight: 500; border-right: 1px solid var(--line); }
.dialog-btns button:last-child { border-right: 0; }
.dialog-btns button:hover { background: var(--hover); }
.dialog-btns button.destructive { color: #ff6b6b; }
body[data-style="light"] .dialog-btns button.destructive { color: var(--destructive); }
.dialog-btns button.suggested { color: var(--accent); }

/* Overview */
.overview {
  position: fixed; inset: var(--top-h) 0 0 0; z-index: 8500; padding: 28px 24px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(22px) saturate(1.2);
  display: flex; flex-direction: column; align-items: center; gap: 30px; overflow: auto; animation: fade .18s ease-out;
}
.overview[hidden] { display: none; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.ov-search { display: flex; align-items: center; gap: 10px; width: min(420px, 100%); padding: 10px 16px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; }
.ov-search svg { width: 18px; height: 18px; opacity: .8; }
.ov-search input { flex: 1; background: none; border: 0; outline: 0; color: #fff; font: inherit; font-size: 15px; }
.ov-search input::placeholder { color: rgba(255,255,255,.65); }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, 128px); justify-content: center; gap: 18px 10px; width: min(900px, 100%); }
.ov-app { border: 0; background: none; border-radius: 16px; padding: 14px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; font-size: 13.5px; text-align: center; }
.ov-app:hover, .ov-app:focus-visible { background: rgba(255,255,255,.14); outline: none; }
.ov-app svg, .ov-app .appicon { width: 72px; height: 72px; border-radius: 18px; font-size: 28px; }
.ov-empty { color: rgba(255,255,255,.8); grid-column: 1 / -1; text-align: center; }

/* Boot */
.boot { position: fixed; inset: 0; z-index: 10000; background: #000; color: #ccc; cursor: pointer; }
.boot[hidden] { display: none; }
.boot-log { margin: 0; padding: 14px 16px; font: 14px/1.35 var(--mono); white-space: pre-wrap; height: 100%; overflow: hidden; }
.boot-log .ok { color: #4e9a06; font-weight: 700; }
.splash { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: #000; }
.boot.splashing .splash { display: flex; animation: fade .3s ease-out; }
.splash-logo { width: 96px; height: 96px; }
.splash-name { font: 300 34px var(--font); color: #fff; letter-spacing: .5px; }
.splash-name b { font-weight: 700; }
.splash-dots { display: flex; gap: 10px; margin-top: 30px; }
.splash-dots i { width: 9px; height: 9px; border-radius: 50%; background: #fff; opacity: .25; animation: dot 1s infinite; }
.splash-dots i:nth-child(2) { animation-delay: .15s } .splash-dots i:nth-child(3) { animation-delay: .3s }
.splash-dots i:nth-child(4) { animation-delay: .45s } .splash-dots i:nth-child(5) { animation-delay: .6s }
@keyframes dot { 30% { opacity: 1; background: var(--accent) } }

/* Kernel panic + power off */
.panic { position: fixed; inset: 0; z-index: 10001; background: #000; color: #e6e6e6; cursor: pointer; overflow: hidden; }
.panic[hidden] { display: none; }
.panic pre { margin: 0; padding: 14px 16px; font: 14px/1.35 var(--mono); white-space: pre-wrap; }
.panic .red { color: #ff5555; font-weight: 700; }
.off { position: fixed; inset: 0; z-index: 10001; background: #000; display: grid; place-items: end center; padding-bottom: 40px; cursor: pointer; }
.off[hidden] { display: none; }
.off span { color: #444; font-size: 13px; }

/* Phones */
@media (max-width: 700px) {
  :root { --dock-w: 0px; }
  .dock {
    top: auto; bottom: 0; left: 0; right: 0; width: auto; height: calc(64px + env(safe-area-inset-bottom));
    flex-direction: row; justify-content: flex-start; overflow-x: auto; padding: 6px 8px env(safe-area-inset-bottom);
  }
  .dock-app { width: 48px; height: 48px; flex: none; }
  .dock-app svg { width: 38px; height: 38px; }
  .dock-app::after { display: none; }
  .dock-app.running::before { left: 50%; top: auto; bottom: -4px; margin: 0 0 0 -2.5px; }
  .dock-app.focused::before { width: 14px; height: 5px; margin-left: -7px; }
  .dock-sep { flex: 0 0 1px; height: 32px; background: rgba(255,255,255,.2); margin: 0 4px; }
  .desktop { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tb-clock { font-size: 13px; }
  .win { inset: 0 !important; width: auto !important; height: auto !important; max-width: none; max-height: none; border-radius: 0; }
  .win.dialog { inset: auto 12px 30% 12px !important; border-radius: 16px; }
  .hb-ctl button[data-act="max"], .hb-ctl button[data-act="min"] { display: none; }
  .files { flex-direction: column; }
  .files-side { width: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-item { white-space: nowrap; }
  .desk-icons { left: 14px; right: auto; }
  .welcome-hero { flex-direction: column; text-align: center; }
  .welcome-actions .btn { flex: 1 1 100%; }
  .editor { padding: 14px 16px; font-size: 14px; }
  .trash-row time { display: none; }
  .overview { inset: var(--top-h) 0 calc(64px + env(safe-area-inset-bottom)) 0; }
  .ov-grid { grid-template-columns: repeat(auto-fill, 96px); }
  .ov-app svg, .ov-app .appicon { width: 58px; height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Header-bar action buttons (left side) */
.headerbar > .btn.small { position: relative; z-index: 1; }
a.desk-icon { text-decoration: none; }
