/* The vist.al desktop. Plain CSS, same colours and fonts as the main site. */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 400 800; font-display: swap; src: url(/fonts/bricolage-grotesque-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 400 800; font-display: swap; src: url(/fonts/bricolage-grotesque-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-display: swap; src: url(/fonts/jetbrains-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --bg: #0a0d13; --bg-2: #10151d; --bg-3: #161d28; --line: #222b38; --line-2: #313d4e;
  --text: #eef3f8; --muted: #9ba8b9; --dim: #637084;
  --accent: #2f6bff; --pop: #ffd23f; --ok: #34d399; --bad: #f87171;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --bar: 48px;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }

/* full page loads between the site and the desktop crossfade instead of flashing (browsers without it just load) */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--pop); outline-offset: 2px; }
[hidden] { display: none !important; }
input, textarea, [contenteditable] { user-select: text; -webkit-user-select: text; }

/* ---------- wallpapers ---------- */
#desktop {
  position: fixed; inset: 0 0 var(--bar) 0; overflow: hidden;
  background:
    radial-gradient(60vw 55vh at 100% 100%, rgba(110, 150, 255, .16), transparent 70%),
    radial-gradient(50vw 45vh at 0% 0%, rgba(47, 107, 255, .14), transparent 70%),
    var(--bg);
}
#desktop::before { /* faint wordmark */
  content: "vist.al"; position: absolute; right: 4vw; bottom: 2vh; pointer-events: none;
  font: 700 clamp(80px, 16vw, 260px)/1 var(--sans); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(155, 168, 185, .09);
}
[data-wall="grid"] #desktop {
  background:
    linear-gradient(rgba(47, 107, 255, .09) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(47, 107, 255, .09) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(80vw 70vh at 50% 120%, rgba(47, 107, 255, .25), transparent 70%),
    #08111f;
}
[data-wall="sunset"] #desktop {
  background:
    radial-gradient(70vw 60vh at 85% 110%, rgba(255, 210, 63, .32), transparent 65%),
    radial-gradient(60vw 60vh at 10% 100%, rgba(248, 113, 113, .22), transparent 70%),
    linear-gradient(180deg, #0b0f1f 0%, #1b1631 60%, #2b1a2c 100%);
}
[data-wall="aurora"] #desktop {
  background:
    radial-gradient(50vw 40vh at 20% 20%, rgba(52, 211, 153, .22), transparent 70%),
    radial-gradient(60vw 50vh at 80% 30%, rgba(124, 58, 237, .25), transparent 70%),
    radial-gradient(70vw 60vh at 50% 110%, rgba(47, 107, 255, .25), transparent 70%),
    #070a12;
}
[data-wall="mono"] #desktop { background: #0d0f12; }
[data-wall="mono"] #desktop::before { -webkit-text-stroke-color: rgba(255, 255, 255, .06); }

/* ---------- boot ---------- */
#boot {
  position: fixed; inset: 0; z-index: 9999; background: #05070b; display: grid; place-items: center;
  transition: opacity .35s ease, visibility .35s;
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(460px, 86vw); }
.boot-mark { font: 700 34px var(--mono); letter-spacing: -.02em; }
.boot-mark span { color: var(--accent); }
.boot-log { margin: 18px 0; min-height: 9.5em; font: 12px/1.6 var(--mono); color: var(--muted); white-space: pre-wrap; }
.boot-log b { color: var(--ok); font-weight: 400; }
.boot-bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }

/* ---------- desktop icons ---------- */
#icons { position: absolute; inset: 0; transition: opacity .12s ease; }
#icons.refreshing { opacity: 0; }
.emb { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.icon {
  position: absolute; width: 84px; padding: 6px 4px 5px; border-radius: 8px; border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center;
  color: var(--text); font: 12px/1.25 var(--sans); text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
  transition: left .18s ease, top .18s ease;
}
.icon.dragging { transition: none; opacity: .85; z-index: 5; }
.icon:hover { background: rgba(155, 168, 185, .1); }
.icon.sel { background: rgba(47, 107, 255, .25); border-color: rgba(47, 107, 255, .55); }
.icon .ic { width: 46px; height: 46px; display: grid; place-items: center; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45)); pointer-events: none; }
.icon span { overflow-wrap: anywhere; pointer-events: none; }
.ic img, .fi-ic img, .tb-ic img, .sm-ic img { width: 100%; height: 100%; object-fit: cover; border-radius: 22%; display: block; }
.ic svg, .fi-ic svg, .tb-ic svg, .sm-ic svg, .wt-ic svg { width: 100%; height: 100%; display: block; }
#select-box { position: absolute; border: 1px solid var(--accent); background: rgba(47, 107, 255, .15); z-index: 4; pointer-events: none; }

/* ---------- widget ---------- */
.widget {
  position: absolute; top: 22px; right: 22px; width: 280px; padding: 18px 20px; z-index: 1;
  background: rgba(16, 21, 29, .55); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.w-time { font: 700 46px/1 var(--sans); letter-spacing: -.04em; }
.w-date { color: var(--muted); margin: 4px 0 14px; font: 12px var(--mono); }
.w-list { list-style: none; display: grid; gap: 7px; font-size: 13px; color: var(--muted); }
.w-list b { color: var(--text); font-weight: 600; }
.w-list a { color: var(--pop); text-decoration: none; }
.w-list a:hover { text-decoration: underline; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.dot.live { background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
.dot.pl { background: var(--pop); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.w-hint { margin-top: 14px; font: 11px var(--mono); color: var(--dim); }
@media (max-width: 900px), (max-height: 560px) { .widget { display: none; } }

/* ---------- windows ---------- */
#windows { position: absolute; inset: 0; pointer-events: none; }
.win {
  position: absolute; display: flex; flex-direction: column; min-width: 260px; min-height: 160px; pointer-events: auto;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .3);
  transition: transform .16s ease, opacity .16s ease;
  transform-origin: 50% 60%;
}
.win.opening, .win.closing { transform: scale(.95); opacity: 0; }
.win.min { transform: translateY(40vh) scale(.3); opacity: 0; pointer-events: none; transition: transform .22s ease-in, opacity .2s; }
.win.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; border-width: 0; }
.win.moving { transition: none; }
.win:not(.focus) { box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .55); }
.win:not(.focus) .wt { color: var(--dim); }
.wt {
  height: 36px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 12px;
  background: var(--bg-3); border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--muted);
  touch-action: none; cursor: default;
}
.win.focus .wt { color: var(--text); }
.wt-ic { width: 16px; height: 16px; flex: none; }
.wt-ic img { width: 100%; height: 100%; border-radius: 4px; object-fit: cover; }
.wt-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-btn { width: 34px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); flex: none; }
.wt-btn:hover { background: rgba(155, 168, 185, .14); color: var(--text); }
.wt-btn.x:hover { background: #e5484d; color: #fff; }
.wt-btn svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.wb { flex: 1; min-height: 0; position: relative; overflow: auto; user-select: text; -webkit-user-select: text; }
.rs { position: absolute; z-index: 3; touch-action: none; }
.rs.n, .rs.s { left: 8px; right: 8px; height: 6px; cursor: ns-resize; }
.rs.e, .rs.w { top: 8px; bottom: 8px; width: 6px; cursor: ew-resize; }
.rs.n { top: -3px; } .rs.s { bottom: -3px; } .rs.e { right: -3px; } .rs.w { left: -3px; }
.rs.ne, .rs.nw, .rs.se, .rs.sw { width: 14px; height: 14px; }
.rs.ne { top: -3px; right: -3px; cursor: nesw-resize; } .rs.sw { bottom: -3px; left: -3px; cursor: nesw-resize; }
.rs.nw { top: -3px; left: -3px; cursor: nwse-resize; } .rs.se { bottom: -3px; right: -3px; cursor: nwse-resize; }
.win.max .rs { display: none; }
#windows.busy iframe { pointer-events: none; } /* stops iframes eating pointer events while dragging */
#snap { position: absolute; z-index: 1; border-radius: 10px; background: rgba(47, 107, 255, .14); border: 1px solid rgba(47, 107, 255, .5); transition: all .12s ease; pointer-events: none; }

/* ---------- taskbar ---------- */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--bar); z-index: 900;
  display: flex; align-items: center; gap: 6px; padding: 0 8px; padding-bottom: env(safe-area-inset-bottom);
  background: rgba(10, 13, 19, .82); border-top: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
#start { width: 40px; height: 36px; border-radius: 8px; display: grid; place-items: center; flex: none; }
#start:hover, #start[aria-expanded="true"] { background: rgba(155, 168, 185, .14); }
.start-mark { font: 700 18px var(--mono); color: var(--text); }
.start-mark i { font-style: normal; color: var(--accent); }
#tasks { flex: 1; min-width: 0; display: flex; gap: 4px; overflow: hidden; }
.tb {
  height: 36px; max-width: 190px; min-width: 40px; padding: 0 10px; border-radius: 8px; display: flex; align-items: center; gap: 8px;
  color: var(--muted); font: 12px var(--mono); position: relative;
}
.tb:hover { background: rgba(155, 168, 185, .1); color: var(--text); }
.tb.active { background: rgba(155, 168, 185, .16); color: var(--text); }
.tb::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 6px; height: 3px; border-radius: 2px; background: var(--dim); transform: translateX(-50%); transition: width .15s; }
.tb.active::after { width: 16px; background: var(--accent); }
.tb-ic { width: 20px; height: 20px; flex: none; }
.tb-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tray { display: flex; align-items: center; gap: 4px; flex: none; }
#tray-music { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; }
#tray-music:hover { background: rgba(155, 168, 185, .12); }
.eq { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--ok); border-radius: 1px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.tray-classic { font: 11px var(--mono); color: var(--dim); text-decoration: none; padding: 6px 8px; border-radius: 6px; }
.tray-classic:hover { color: var(--text); background: rgba(155, 168, 185, .1); }
#clock { height: 36px; padding: 0 10px; border-radius: 8px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; font: 11px/1.3 var(--mono); color: var(--muted); }
#clock b { color: var(--text); font-weight: 400; }
#clock:hover, #clock[aria-expanded="true"] { background: rgba(155, 168, 185, .12); }

/* ---------- popups: start menu, calendar, context menu ---------- */
.pop {
  position: fixed; z-index: 950; background: rgba(16, 21, 29, .94); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, .75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  animation: pop-in .14s ease;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } }
#startmenu { left: 8px; bottom: calc(var(--bar) + 8px); width: min(440px, calc(100vw - 16px)); max-height: calc(100vh - var(--bar) - 24px); display: flex; flex-direction: column; overflow: hidden; }
.sm-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sm-head img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.sm-head strong { display: block; font-size: 15px; }
.sm-head span { font: 11px var(--mono); color: var(--muted); }
.sm-search { margin: 14px 18px 6px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 12px; }
.sm-search input { flex: 1; background: none; border: 0; outline: 0; height: 36px; font: 13px var(--mono); }
.sm-search:focus-within { border-color: var(--accent); }
.sm-label { padding: 10px 18px 4px; font: 11px var(--mono); color: var(--dim); text-transform: lowercase; }
.sm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 0 10px 10px; overflow: auto; }
.sm-app { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 8px; font-size: 12px; text-align: center; }
.sm-app:hover, .sm-app:focus-visible, .sm-app.hit { background: rgba(155, 168, 185, .12); }
.sm-ic { width: 36px; height: 36px; }
.sm-empty { grid-column: 1 / -1; padding: 16px; color: var(--dim); font: 12px var(--mono); text-align: center; }
.sm-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); background: rgba(10, 13, 19, .5); }
.sm-foot a, .sm-foot button { font: 12px var(--mono); color: var(--muted); text-decoration: none; padding: 7px 10px; border-radius: 6px; }
.sm-foot a:hover, .sm-foot button:hover { background: rgba(155, 168, 185, .12); color: var(--text); }
.sm-power { display: flex; gap: 2px; }
#calendar { right: 8px; bottom: calc(var(--bar) + 8px); width: 286px; padding: 16px; }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.cal-head strong { font-size: 15px; }
.cal-head span { font: 11px var(--mono); color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font: 12px var(--mono); }
.cal-grid b { color: var(--dim); font-weight: 400; padding: 4px 0; }
.cal-grid span { padding: 6px 0; border-radius: 6px; color: var(--muted); }
.cal-grid span.today { background: var(--accent); color: #fff; }
.cal-grid span.out { opacity: .3; }
#ctx { min-width: 200px; padding: 6px; z-index: 960; }
.ctx-i { display: flex; justify-content: space-between; gap: 18px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 6px; font-size: 13px; }
.ctx-i:hover, .ctx-i:focus-visible { background: var(--accent); color: #fff; outline: 0; }
.ctx-i kbd { font: 11px var(--mono); opacity: .55; }
.ctx-sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* ---------- shared app bits ---------- */
.bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--bg-2); flex-wrap: wrap; }
.bt { height: 28px; padding: 0 10px; border-radius: 6px; font: 12px var(--mono); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.bt:hover:not(:disabled) { background: rgba(155, 168, 185, .12); color: var(--text); }
.bt:disabled { opacity: .35; cursor: default; }
.bt.on { background: rgba(47, 107, 255, .2); color: var(--text); }
.bt.primary { background: var(--accent); color: #fff; }
.bt.primary:hover { filter: brightness(1.1); background: var(--accent); }
.fld { height: 28px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 0 10px; font: 12px var(--mono); outline: 0; }
.fld:focus { border-color: var(--accent); }
.app { height: 100%; display: flex; flex-direction: column; }
.grow { flex: 1; min-height: 0; position: relative; }
.status { padding: 4px 10px; border-top: 1px solid var(--line); font: 11px var(--mono); color: var(--dim); display: flex; justify-content: space-between; gap: 10px; }

/* terminal */
.term { height: 100%; background: #070a0f; padding: 10px 12px; font: 13px/1.55 var(--mono); color: #d6deea; overflow-y: auto; cursor: text; }
.term-out { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-line { display: flex; gap: 8px; }
.term-in { flex: 1; background: none; border: 0; outline: 0; font: inherit; color: inherit; caret-color: var(--pop); padding: 0; min-width: 0; }
.t-p { color: var(--ok); } .t-p i { color: var(--accent); font-style: normal; }
.t-dim { color: var(--dim); } .t-y { color: var(--pop); } .t-b { color: #7aa2ff; } .t-r { color: var(--bad); } .t-g { color: var(--ok); }
.term a { color: #7aa2ff; }
.fetch { display: flex; gap: 22px; align-items: flex-start; }
.fetch pre { color: var(--accent); font: inherit; line-height: 1.2; }

/* files */
.files { display: grid; grid-template-columns: 150px 1fr; height: 100%; min-height: 0; }
.fs-side { border-right: 1px solid var(--line); padding: 8px 6px; overflow: auto; background: rgba(10, 13, 19, .35); }
.fs-side button { width: 100%; text-align: left; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 13px; color: var(--muted); }
.fs-side button:hover { background: rgba(155, 168, 185, .1); color: var(--text); }
.fs-side button.on { background: rgba(47, 107, 255, .18); color: var(--text); }
.fs-side .fi-ic { width: 18px; height: 18px; }
.fs-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.fs-path { flex: 1; min-width: 80px; }
.fs-grid { flex: 1; overflow: auto; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); align-content: start; gap: 4px; }
.fi { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 8px; border: 1px solid transparent; font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.fi:hover { background: rgba(155, 168, 185, .08); }
.fi.sel, .fi:focus-visible { background: rgba(47, 107, 255, .2); border-color: rgba(47, 107, 255, .45); outline: 0; }
.fi-ic { width: 44px; height: 44px; }
.fs-empty { grid-column: 1 / -1; color: var(--dim); font: 12px var(--mono); padding: 30px; text-align: center; }
@media (max-width: 560px) { .files { grid-template-columns: 1fr; } .fs-side { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px; } .fs-side button { width: auto; flex: none; } }

/* notepad */
.np { flex: 1; width: 100%; resize: none; border: 0; outline: 0; background: #0c1018; padding: 14px 16px; font: 13px/1.65 var(--mono); color: var(--text); tab-size: 2; }
.np-name { margin-left: auto; font: 11px var(--mono); color: var(--dim); }

/* browser */
.br-addr { flex: 1; min-width: 120px; }
.br-marks { display: flex; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--line); background: var(--bg-2); overflow-x: auto; }
.br-marks button { font: 11px var(--mono); color: var(--muted); padding: 4px 9px; border-radius: 5px; white-space: nowrap; }
.br-marks button:hover { background: rgba(155, 168, 185, .1); color: var(--text); }
.br-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }
.br-ext { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; background: var(--bg); }
.br-ext h3 { font-size: 20px; margin-bottom: 8px; }
.br-ext p { color: var(--muted); margin-bottom: 18px; max-width: 360px; }
.br-load { position: absolute; left: 0; top: 0; height: 2px; background: var(--accent); width: 0; z-index: 2; transition: width 1.2s ease, opacity .3s; }
.br-load.go { width: 80%; }
.br-load.done { width: 100%; opacity: 0; transition: width .2s, opacity .3s .2s; }

/* paint */
.pt-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pt-sw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line-2); }
.pt-sw.on { border-color: var(--text); }
.pt-size { width: 80px; accent-color: var(--accent); }
.pt-canvas { position: absolute; inset: 0; width: 100%; height: 100%; background: #fff; cursor: crosshair; touch-action: none; display: block; }
.pt-col { width: 26px; height: 24px; padding: 0; border: 1px solid var(--line-2); border-radius: 5px; background: none; }

/* snake */
.sn { height: 100%; display: flex; flex-direction: column; background: #07120c; }
.sn-top { display: flex; justify-content: space-between; padding: 8px 12px; font: 12px var(--mono); color: var(--muted); border-bottom: 1px solid #12301f; }
.sn-top b { color: var(--ok); font-weight: 400; }
.sn-stage { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; outline: 0; }
.sn-stage canvas { display: block; image-rendering: pixelated; border-radius: 6px; box-shadow: 0 0 0 1px #1a4630; }
.sn-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 13px/1.6 var(--mono); color: var(--text); background: rgba(7, 18, 12, .72); }
.sn-msg strong { display: block; font: 700 28px var(--sans); color: var(--ok); margin-bottom: 6px; letter-spacing: -.02em; }
.sn-pad { display: none; grid-template-columns: repeat(3, 52px); gap: 6px; justify-content: center; padding: 10px; }
.sn-pad button { height: 44px; border-radius: 8px; background: #0f2a1c; color: var(--ok); font-size: 18px; }
.sn-pad .u { grid-column: 2; } .sn-pad .l { grid-column: 1; grid-row: 2; } .sn-pad .d { grid-column: 2; grid-row: 2; } .sn-pad .r { grid-column: 3; grid-row: 2; }
@media (pointer: coarse) { .sn-pad { display: grid; } }

/* music */
.mu { height: 100%; display: flex; flex-direction: column; background: linear-gradient(180deg, #1a1033, #0c0a17); }
.mu-vis { flex: 1; min-height: 80px; width: 100%; display: block; }
.mu-info { padding: 0 18px; }
.mu-info strong { display: block; font-size: 18px; }
.mu-info span { color: var(--muted); font: 12px var(--mono); }
.mu-seek { display: flex; align-items: center; gap: 10px; padding: 12px 18px 4px; font: 11px var(--mono); color: var(--muted); }
.mu-seek input { flex: 1; accent-color: #a78bfa; }
.mu-ctl { display: flex; align-items: center; gap: 12px; padding: 6px 18px 16px; }
.mu-play { width: 46px; height: 46px; border-radius: 50%; background: #fff; color: #1a1033; display: grid; place-items: center; font-size: 16px; }
.mu-play:hover { transform: scale(1.05); }
.mu-vol { margin-left: auto; display: flex; align-items: center; gap: 8px; font: 11px var(--mono); color: var(--muted); }
.mu-vol input { width: 90px; accent-color: #a78bfa; }

/* photos */
.ph { height: 100%; display: flex; flex-direction: column; background: #06080c; }
.ph-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 12px; position: relative; }
.ph-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.ph-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(16, 21, 29, .75); font-size: 16px; border: 1px solid var(--line-2); }
.ph-nav:hover { background: var(--accent); }
.ph-nav.p { left: 12px; } .ph-nav.n { right: 12px; }
.ph-strip { display: flex; gap: 6px; padding: 8px; overflow-x: auto; border-top: 1px solid var(--line); }
.ph-strip button { width: 64px; height: 44px; flex: none; border-radius: 5px; overflow: hidden; opacity: .5; border: 2px solid transparent; }
.ph-strip button.on { opacity: 1; border-color: var(--accent); }
.ph-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* mail */
.mail { padding: 18px; display: grid; gap: 12px; align-content: start; }
.mail h3 { font-size: 20px; letter-spacing: -.01em; }
.mail h3 em { font: italic 400 1.15em var(--serif); color: var(--pop); }
.mail p.sub { color: var(--muted); font-size: 13px; margin-top: -6px; }
.mail label { display: grid; gap: 5px; font: 11px var(--mono); color: var(--muted); }
.mail input, .mail textarea, .mail select { background: var(--bg); border: 1px solid var(--line-2); border-radius: 7px; padding: 9px 11px; font: 13px var(--sans); color: var(--text); outline: 0; }
.mail input:focus, .mail textarea:focus, .mail select:focus { border-color: var(--accent); }
.mail textarea { resize: vertical; min-height: 90px; }
.mail-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { display: block; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 20px; font: 12px var(--mono); color: var(--muted); cursor: pointer; }
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--pop); outline-offset: 2px; }
.mail-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mail-foot .bt { height: 36px; padding: 0 18px; font-size: 13px; }
.mail-st { font: 12px var(--mono); color: var(--muted); }
.mail-st.ok { color: var(--ok); }
.mail-note { font: 11px var(--mono); color: var(--dim); }
.mail-note a { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) { .mail-row { grid-template-columns: 1fr; } }

/* settings */
.set { padding: 18px; display: grid; gap: 22px; align-content: start; }
.set h4 { font: 11px var(--mono); color: var(--dim); margin-bottom: 10px; text-transform: lowercase; }
.walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.wall-opt { aspect-ratio: 16 / 10; border-radius: 8px; border: 2px solid var(--line-2); position: relative; overflow: hidden; }
.wall-opt.on { border-color: var(--accent); }
.wall-opt span { position: absolute; left: 6px; bottom: 4px; font: 11px var(--mono); text-shadow: 0 1px 3px #000; }
.wall-opt[data-w="midnight"] { background: radial-gradient(at 100% 100%, rgba(110, 150, 255, .4), transparent 60%), #0a0d13; }
.wall-opt[data-w="grid"] { background: linear-gradient(rgba(47, 107, 255, .3) 1px, transparent 1px) 0 0 / 10px 10px, linear-gradient(90deg, rgba(47, 107, 255, .3) 1px, transparent 1px) 0 0 / 10px 10px, #08111f; }
.wall-opt[data-w="sunset"] { background: radial-gradient(at 85% 110%, rgba(255, 210, 63, .6), transparent 60%), linear-gradient(#0b0f1f, #2b1a2c); }
.wall-opt[data-w="aurora"] { background: radial-gradient(at 20% 20%, rgba(52, 211, 153, .5), transparent 60%), radial-gradient(at 80% 30%, rgba(124, 58, 237, .55), transparent 60%), #070a12; }
.wall-opt[data-w="mono"] { background: #0d0f12; }
.accents { display: flex; gap: 10px; flex-wrap: wrap; }
.acc { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line-2); }
.acc.on { border-color: var(--text); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.set-row small { display: block; color: var(--dim); font: 11px var(--mono); }

/* task manager */
.tm { padding: 14px; display: grid; gap: 14px; align-content: start; }
.tm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tm-stat { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.tm-stat span { font: 11px var(--mono); color: var(--dim); }
.tm-stat b { display: block; font: 700 20px var(--sans); }
.tm-graph { width: 100%; height: 70px; display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.tm-table { width: 100%; border-collapse: collapse; font: 12px var(--mono); }
.tm-table th { text-align: left; color: var(--dim); font-weight: 400; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tm-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tm-table td:last-child { text-align: right; }

/* about */
.ab { padding: 26px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.ab img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--accent); }
.ab h3 { font: 700 26px var(--mono); }
.ab h3 span { color: var(--accent); }
.ab p { color: var(--muted); font-size: 13px; max-width: 340px; }
.ab dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font: 12px var(--mono); text-align: left; margin: 8px 0; }
.ab dt { color: var(--dim); }
.ab-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* toast */
.toast { position: fixed; right: 16px; bottom: calc(var(--bar) + 16px); z-index: 970; background: var(--bg-3); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 14px; font: 12px var(--mono); max-width: 320px; box-shadow: 0 14px 40px -10px rgba(0, 0, 0, .7); animation: pop-in .2s ease; }

/* ---------- small screens: windows go full-screen ---------- */
@media (max-width: 719px) {
  .win { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; border-width: 0; }
  .wt-btn.mx, .rs { display: none; }
  .tb-t, .tray-classic { display: none; }
  .tb { padding: 0 9px; }
  .icon { width: 78px; }
}

.nojs { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); font: 14px var(--mono); z-index: 99999; }
.nojs a { color: var(--pop); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
.ab dd a { color: var(--muted); }
