/* Windows XP "Luna" look, redrawn in CSS. One fixed look regardless of the host's
   light/dark setting, because the original only ever had one. */
:root {
  color-scheme: light;
  --font: Tahoma, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --face: #ece9d8;
  --sel: #316ac5;
  --link: #215dc6;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; }
body { font: 12px/1.35 var(--font); color: #000; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#os { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; }
.screen { position: absolute; inset: 0; }

/* ---------------------------------------------------------------- power */
#s-power { background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: #8a8a8a; }
#power-btn {
  width: 92px; height: 92px; border-radius: 50%; border: 3px solid #2d2d2d; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #2b2b2b, #111 70%); color: #3fbf4f;
  display: grid; place-items: center; box-shadow: 0 0 0 6px #0b0b0b, 0 0 24px rgba(63,191,79,.25);
  transition: color .2s, box-shadow .2s;
}
#power-btn:hover { color: #6de07a; box-shadow: 0 0 0 6px #0b0b0b, 0 0 34px rgba(63,191,79,.5); }
#power-btn:focus-visible { outline: 2px solid #6de07a; outline-offset: 6px; }
.power-hint { margin: 0; font-size: 14px; letter-spacing: .1em; }
.power-narrow { margin: 0; font-size: 13px; color: #5d5d5d; display: none; }
body.narrow .power-narrow { display: block; }

/* ---------------------------------------------------------------- boot */
#s-boot { background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#boot-logo { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: -60px; }
.wordmark { color: #fff; font-family: "Franklin Gothic Medium", "Arial Black", Arial, var(--font); font-style: italic; letter-spacing: -.02em; line-height: 1; }
.wordmark b { font-weight: 800; }
.wordmark sup { color: #f27b21; font-size: .62em; font-weight: 800; margin-left: .08em; vertical-align: .55em; }
.boot-bar { margin-top: 70px; width: 156px; height: 18px; border: 2px solid #b2b2b2; border-radius: 5px; padding: 2px; overflow: hidden; position: relative; }
.boot-run { position: absolute; top: 2px; left: 0; display: flex; gap: 2px; animation: boot-run 2.2s linear infinite; }
.boot-run i { width: 9px; height: 10px; border-radius: 1px; background: linear-gradient(#2838c7, #6c85f6 45%, #2838c7); }
@keyframes boot-run { from { transform: translateX(-34px); } to { transform: translateX(160px); } }
.boot-note { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; margin: 0; color: #5c5c5c; font-size: 12px; padding-inline: 16px; }

/* ---------------------------------------------------------------- banded screens */
#s-band { background: #5a7edc; display: flex; flex-direction: column; color: #fff; }
.band-top { height: 12%; min-height: 60px; background: #00309c; position: relative; }
.band-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: linear-gradient(90deg, #00309c, #fff 50%, #00309c); opacity: .75; }
.band-mid { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 12% 12%, #91b1ef 0, #5a7edc 38%, #4d6fd1 100%); }
.band-bottom { height: 12%; min-height: 64px; background: #003399; position: relative; display: flex; align-items: center; justify-content: space-between; padding-inline: 40px; gap: 16px; }
.band-bottom::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: linear-gradient(90deg, #003399, #f99736 50%, #003399); }
.band-logo { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.m-login, .m-welcome, .m-status { display: none; }
#s-band[data-mode="login"] .m-login { display: flex; }
#s-band[data-mode="welcome"] .m-welcome { display: flex; }
#s-band[data-mode="logoff"] .m-status, #s-band[data-mode="shutdown"] .m-status { display: flex; }
#s-band:not([data-mode="login"]) .band-bottom > * { visibility: hidden; }
.st-logoff, .st-shutdown { display: none; margin: 18px 0 0; font-size: 18px; }
#s-band[data-mode="logoff"] .st-logoff, #s-band[data-mode="shutdown"] .st-shutdown { display: block; }
.m-status { flex-direction: column; align-items: center; }
.m-status .band-logo { align-items: center; }
.m-login { width: min(820px, 92%); align-items: center; }
.m-left { flex: 1; display: flex; flex-direction: column; align-items: flex-end; padding-right: 34px; gap: 20px; }
.m-left p { margin: 0; font-size: 16px; }
.m-divider { width: 2px; align-self: stretch; min-height: 280px; background: linear-gradient(transparent, rgba(255,255,255,.8) 50%, transparent); }
.m-right { flex: 1; padding-left: 34px; }
#user-tile { display: flex; align-items: center; gap: 14px; padding: 8px 14px 8px 8px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: #fff; min-width: 260px; }
#user-tile:hover, #user-tile:focus-visible { background: linear-gradient(90deg, #00309c, transparent); outline: none; }
#user-tile #user-avatar { display: block; width: 52px; height: 52px; border: 2px solid #fff; border-radius: 6px; overflow: hidden; }
#user-tile #user-avatar svg { width: 48px; height: 48px; display: block; }
#user-tile:hover #user-avatar { border-color: #ffc53d; }
.u-name { font-size: 20px; }
.m-welcome span { font-size: 64px; font-style: italic; font-weight: 700; text-shadow: 2px 3px 0 rgba(0,40,140,.6); font-family: "Franklin Gothic Medium", Arial, var(--font); }
#band-off { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: #fff; cursor: pointer; font-size: 14px; padding: 4px; border-radius: 4px; }
#band-off:hover span { text-decoration: underline; }
#band-off:focus-visible { outline: 1px dotted #fff; }
.band-tip { margin: 0; font-size: 12px; color: #c6d3f7; max-width: 320px; text-align: right; }

/* ---------------------------------------------------------------- desktop */
#desktop { right: auto; bottom: auto; transform-origin: 0 0; background: #3a6ea5 url("/wallpaper.jpg") center / cover no-repeat; overflow: hidden; transition: filter 1.2s ease; }
#desktop.dim { filter: grayscale(1) brightness(.85); }
#desktop.fade-in { animation: fade-in .8s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
#icons { position: absolute; left: 8px; top: 10px; bottom: 40px; display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 12px 6px; }
.d-icon { width: 76px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 3px 2px; color: #fff; text-align: center; cursor: default; outline: none; }
.d-icon .ico { filter: drop-shadow(1px 2px 1px rgba(0,0,0,.35)); }
.d-icon span { font-size: 12px; line-height: 1.25; padding: 0 3px; text-shadow: 1px 1px 1px #000, 0 0 3px #000; border-radius: 1px; word-break: break-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-icon.sel span { -webkit-line-clamp: 6; }
.d-icon.sel span { background: var(--sel); text-shadow: none; }
.d-icon.sel .ico { filter: drop-shadow(1px 2px 1px rgba(0,0,0,.35)) sepia(1) hue-rotate(190deg) saturate(3) brightness(.8); }
.d-icon:focus-visible span { outline: 1px dotted #fff; }
/* The window layer covers the whole desktop, so it must not swallow clicks itself:
   only the windows and modal masks inside it take pointer events. Without this the
   desktop icons underneath can't be selected or opened. */
#layer { position: absolute; left: 0; top: 0; right: 0; bottom: 30px; pointer-events: none; }
#layer > * { pointer-events: auto; }

/* ---------------------------------------------------------------- windows */
.window {
  position: absolute; display: flex; flex-direction: column; min-width: 200px;
  background: var(--face); border-radius: 8px 8px 0 0; padding: 0 3px 3px;
  box-shadow: inset -1px -1px #00138c, inset 1px 1px #0831d9, inset -2px -2px #001ea0, inset 2px 2px #166aee, inset -3px -3px #003bda, inset 3px 3px #0855dd, 2px 3px 10px rgba(0,0,0,.35);
}
.window.maximized { border-radius: 0; }
.window:not(.active) { box-shadow: inset -1px -1px #6582d6, inset 1px 1px #7c98ea, inset -2px -2px #7b95e0, inset 2px 2px #9bb1ee, inset -3px -3px #87a2e3, inset 3px 3px #92abe9, 2px 3px 10px rgba(0,0,0,.25); }
.titlebar {
  height: 29px; margin: 0 -3px; padding: 0 5px 0 7px; display: flex; align-items: center; gap: 5px; flex: none;
  border-radius: 8px 8px 0 0; color: #fff; cursor: default;
  background: linear-gradient(180deg, #0997ff, #0053ee 8%, #0050ee 40%, #06f 88%, #06f 93%, #005bff 95%, #003dd7 96%, #003dd7);
  font: 700 13px/1 "Trebuchet MS", var(--font); text-shadow: 1px 1px #0f1089;
}
.window.maximized .titlebar { border-radius: 0; }
.window:not(.active) .titlebar { background: linear-gradient(180deg, #7697e7, #7e9ee3 3%, #94afe8 6%, #97b4e9 8%, #82a5e4 14%, #7c9fe2 17%, #7996de 25%, #7b99e1 56%, #82a9e9 81%, #80a5e7 89%, #7b96e1 94%, #7a93df 97%, #abbae3); color: #d8e4f8; text-shadow: none; }
.t-icon { display: flex; flex: none; }
.t-icon svg { width: 16px; height: 16px; }
.t-text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.t-btns { display: flex; gap: 2px; flex: none; }
.t-btns button {
  width: 21px; height: 21px; padding: 0; border: 1px solid #fff; border-radius: 3px; cursor: pointer;
  background: radial-gradient(circle at 90% 90%, #0054e9 0, #2263d5 55%, #4479e4 70%, #a3bbec 90%, #fff 100%);
  display: grid; place-items: center;
}
.t-btns button svg { width: 21px; height: 21px; display: block; }
.t-btns button:hover { filter: brightness(1.15); }
.t-btns button:active { filter: brightness(.85); }
.t-btns .t-close { background: radial-gradient(circle at 90% 90%, #cc4600 0, #dc6527 55%, #cd7546 70%, #ffccb2 90%, #fff 100%); }
.window:not(.active) .t-btns button { opacity: .75; }
.w-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.window.dialog .w-body { flex: none; }
.w-grip { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, #a6a391 50%, #a6a391 58%, transparent 58%, transparent 68%, #a6a391 68%, #a6a391 76%, transparent 76%); }
.window.maximized .w-grip { display: none; }
.window.flash { animation: flash .12s 3 steps(1); }
@keyframes flash { 50% { filter: brightness(1.35); } }

/* ---------------------------------------------------------------- controls */
.xpbtn {
  min-width: 75px; height: 23px; padding: 0 12px; cursor: pointer;
  border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(180deg, #fff, #ecebe6 86%, #d6d0c5);
}
.xpbtn:hover { box-shadow: inset -1px 1px #fff0cf, inset 1px 2px #fdd889, inset -2px 2px #fbc761, inset 2px -2px #e5a01a; }
.xpbtn:active { background: linear-gradient(180deg, #cdcac3, #e3e3db 8%, #e5e5de 94%, #f2f2f1); }
.xpbtn.default, .xpbtn:focus-visible { box-shadow: inset -1px 1px #cee7ff, inset 1px 2px #98b8ea, inset -2px 2px #bcd4f6, inset 1px -1px #89ade4, inset 2px -2px #89ade4; outline: none; }
.xpbtn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.xpbtn:disabled { color: #aca899; border-color: #c9c7ba; background: #f5f4ea; box-shadow: none; cursor: default; }
.xp-input { width: 100%; height: 23px; padding: 2px 4px; border: 1px solid #7f9db9; font: inherit; background: #fff; user-select: text; -webkit-user-select: text; }
.xp-input:focus { outline: none; border-color: #3c7fb1; }
.dlg-row { display: flex; align-items: center; gap: 8px; }
.dlg-row span { flex: none; }
.xp-select { flex: 1; height: 23px; font: inherit; border: 1px solid #7f9db9; background: #fff; padding: 0 2px; }

/* dialogs */
.modal-mask { position: absolute; inset: 0; }
.dlg { padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 14px; }
.dlg-main { display: flex; gap: 14px; align-items: flex-start; }
.dlg-icon { flex: none; }
.dlg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dlg-text p { margin: 0; line-height: 1.5; }
.dlg-err { color: #c00; }
.dlg-buttons { display: flex; justify-content: center; gap: 8px; }
.pick-list { height: 170px; overflow-y: auto; background: #fff; border: 1px solid #7f9db9; display: flex; flex-direction: column; }
.pick-row { display: flex; align-items: center; gap: 6px; border: 0; background: none; text-align: left; padding: 3px 6px; cursor: default; }
.pick-row small { margin-left: auto; color: #777; }
.pick-row.sel { background: var(--sel); color: #fff; }
.pick-row.sel small { color: #d6e2f8; }
.about { display: flex; flex-direction: column; gap: 10px; }
.about p { margin: 0; line-height: 1.55; }
.about-hero { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 4px; background: linear-gradient(90deg, #1c3fa8, #5a7edc); }
.about-link a { color: var(--link); }

/* menus */
.menubar { display: flex; flex: none; padding: 1px 0; border-bottom: 1px solid #fff; background: var(--face); }
.menubar-item { border: 0; background: none; padding: 2px 7px; cursor: default; }
.menubar-item:hover, .menubar-item.open { background: var(--sel); color: #fff; }
.ctx { position: absolute; z-index: 100000; min-width: 170px; padding: 2px; background: #fff; border: 1px solid #aca899; box-shadow: 2px 2px 3px rgba(0,0,0,.35); display: flex; flex-direction: column; }
.ctx-item { display: flex; align-items: center; border: 0; background: none; text-align: left; padding: 3px 14px 3px 0; cursor: default; white-space: nowrap; }
.ctx-item.bold { font-weight: 700; }
.ctx-check { width: 22px; text-align: center; flex: none; }
.ctx-hint { margin-left: auto; padding-left: 24px; }
.ctx-item:not(:disabled):hover, .ctx-item:not(:disabled):focus { background: var(--sel); color: #fff; outline: none; }
.ctx-item:disabled { color: #aca899; }
.ctx-sep { height: 1px; margin: 3px 1px; background: #aca899; }

/* ---------------------------------------------------------------- notepad */
.notepad { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.np-text {
  flex: 1; min-height: 0; width: 100%; resize: none; margin: 0; border: 1px solid #7f9db9; padding: 2px 4px; outline: none;
  font: 14px/1.45 "Lucida Console", "Courier New", "PingFang SC", monospace; background: #fff; user-select: text; -webkit-user-select: text;
}
.np-text.nowrap { white-space: pre; overflow-x: auto; }

/* ---------------------------------------------------------------- paint */
.paint { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pt-mid { flex: 1; min-height: 0; display: flex; }
.pt-tools { width: 58px; flex: none; padding: 4px 4px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; border-right: 1px solid #fff; }
.pt-toolgrid { display: grid; grid-template-columns: 25px 25px; gap: 1px; }
.pt-tool { width: 25px; height: 25px; padding: 0; display: grid; place-items: center; border: 1px solid transparent; background: none; cursor: default; }
.pt-tool:hover { border-color: #fff #808080 #808080 #fff; }
.pt-tool.on { border-color: #808080 #fff #fff #808080; background: repeating-conic-gradient(#fff 0 25%, #e0dfd6 0 50%) 0 0 / 2px 2px; }
.pt-tool:focus-visible { outline: 1px dotted #000; }
.pt-options { width: 50px; min-height: 64px; padding: 3px; border: 1px solid; border-color: #808080 #fff #fff #808080; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pt-opt { width: 42px; min-height: 14px; padding: 2px 0; display: grid; place-items: center; border: 0; background: none; cursor: default; }
.pt-opt.on { background: var(--sel); }
.pt-opt i { display: block; background: #000; }
.pt-opt.on i { background: #fff; }
.pt-dot { border-radius: 50%; }
.pt-bar { width: 32px; }
.pt-shape { width: 30px; height: 12px; background: none !important; border: 1px solid #000; }
.pt-shape.round { border-radius: 50%; }
.pt-shape.both { background: #9c9c9c !important; }
.pt-shape.fill { background: #9c9c9c !important; border-color: #9c9c9c; }
.pt-opt.on .pt-shape { border-color: #fff; }
.pt-area { flex: 1; min-width: 0; overflow: auto; background: #808080; padding: 4px; }
.pt-holder { display: inline-block; line-height: 0; box-shadow: 1px 1px 0 #404040; }
.pt-canvas { display: block; background: #fff; touch-action: none; image-rendering: pixelated; cursor: crosshair; }
.pt-canvas[data-tool="fill"] { cursor: cell; }
.pt-canvas[data-tool="picker"] { cursor: copy; }
.pt-palette { flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 4px 3px; }
.pt-current { position: relative; width: 32px; height: 32px; flex: none; border: 1px solid; border-color: #808080 #fff #fff #808080; background: repeating-conic-gradient(#fff 0 25%, #d4d0c8 0 50%) 0 0 / 2px 2px; }
.pt-current i { position: absolute; width: 14px; height: 14px; border: 1px solid; border-color: #fff #808080 #808080 #fff; box-shadow: 0 0 0 1px #000 inset; }
.pt-fg { left: 4px; top: 4px; z-index: 1; }
.pt-bg { right: 4px; bottom: 4px; }
.pt-swatches { display: grid; grid-template-columns: repeat(14, 16px); grid-template-rows: 16px 16px; gap: 0; }
.pt-swatch { width: 16px; height: 16px; padding: 0; border: 1px solid; border-color: #808080 #fff #fff #808080; box-shadow: inset 1px 1px #404040; cursor: default; }
.pt-colorinput { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pt-status { flex: none; display: flex; justify-content: space-between; gap: 12px; padding: 3px 8px; border-top: 1px solid #d8d2bd; color: #444; white-space: nowrap; overflow: hidden; }
.pt-pos { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- explorer */
.explorer { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ex-tools { display: flex; gap: 2px; padding: 3px 4px; border-bottom: 1px solid #d8d2bd; flex: none; }
.ex-tool { display: flex; align-items: center; gap: 4px; padding: 2px 8px 2px 4px; border: 1px solid transparent; border-radius: 3px; background: none; cursor: default; }
.ex-tool:not(:disabled):hover { border-color: #cecece; background: linear-gradient(#fefefe, #ebeae2); }
.ex-tool:disabled { opacity: .45; }
.ex-tool:disabled svg { filter: grayscale(1); }
.ex-empty { margin-left: auto; }
.ex-addr { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-bottom: 1px solid #d8d2bd; flex: none; }
.ex-addr-label { color: #7a7a7a; }
.ex-addr-box { flex: 1; display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 4px; background: #fff; border: 1px solid #7f9db9; overflow: hidden; white-space: nowrap; }
.ex-addr-box svg { width: 16px; height: 16px; flex: none; }
.ex-main { flex: 1; min-height: 0; display: flex; }
.ex-side { width: 190px; flex: none; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(#748aff, #4057d3); }
.ex-box { border-radius: 3px 3px 0 0; overflow: hidden; }
.ex-box-h { padding: 5px 10px; font-weight: 700; color: var(--link); background: linear-gradient(90deg, #fff, #c6d3f7); }
.ex-box-b { padding: 8px 10px; background: #d6dff7; display: flex; flex-direction: column; gap: 5px; }
.ex-link { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; text-align: left; color: #0c32a0; cursor: pointer; }
.ex-link svg { width: 16px; height: 16px; flex: none; }
.ex-link:hover span { text-decoration: underline; color: #2b72ff; }
.ex-details { display: block; line-height: 1.6; word-break: break-all; }
.ex-pane { flex: 1; min-width: 0; overflow-y: auto; background: #fff; padding: 10px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px 4px; outline: none; }
.ex-group { flex-basis: 100%; font-weight: 700; color: var(--link); padding: 4px 2px 2px; border-bottom: 1px solid #ccd6f2; margin-bottom: 4px; }
.ex-item { width: 88px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; text-align: center; cursor: default; }
.ex-item span { padding: 0 2px; word-break: break-all; line-height: 1.3; }
.ex-item.sel span { background: var(--sel); color: #fff; }
.ex-item.sel .ico { filter: sepia(1) hue-rotate(190deg) saturate(2.5) brightness(.85); }
.ex-emptynote { color: #777; padding: 6px; }
.ex-status { flex: none; padding: 3px 8px; border-top: 1px solid #d8d2bd; color: #444; background: var(--face); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- taskbar */
#taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30px; display: flex; align-items: center; z-index: 50000;
  background: linear-gradient(#1f2f86 0, #3165c4 3%, #3682e5 6%, #4490e6 10%, #3883e5 12%, #2b71e0 15%, #2663da 18%, #235bd6 20%, #2258d5 23%, #2157d6 38%, #245ddb 54%, #2562df 86%, #245fdc 89%, #2158d4 92%, #1d4ec0 95%, #1941a5 98%);
}
#start {
  height: 30px; display: flex; align-items: center; gap: 5px; padding: 0 22px 0 9px; margin-right: 10px; border: 0; cursor: pointer;
  border-radius: 0 12px 12px 0; color: #fff; font: italic 700 18px/1 "Franklin Gothic Medium", Arial, var(--font); text-shadow: 1px 1px 2px rgba(0,0,0,.6);
  background: linear-gradient(180deg, #3c8f33 0%, #5ec24f 8%, #4aae3b 30%, #3a9a2f 70%, #2c7d24 100%);
  box-shadow: inset -2px -1px 3px rgba(0,0,0,.25), 2px 0 3px rgba(0,0,0,.35);
}
#start:hover { filter: brightness(1.1); }
#start.pressed { filter: brightness(.85); }
#start:focus-visible { outline: 1px dotted #fff; outline-offset: -4px; }
#start-flag svg { display: block; filter: drop-shadow(1px 1px 1px rgba(0,0,0,.5)); }
#tasks { flex: 1; min-width: 0; display: flex; gap: 3px; overflow: hidden; }
.task {
  flex: 0 1 170px; min-width: 60px; height: 24px; display: flex; align-items: center; gap: 5px; padding: 0 8px; border: 0; border-radius: 3px; cursor: default;
  color: #fff; text-align: left; background: #3c81f3; box-shadow: inset -1px -1px rgba(0,0,0,.25), inset 1px 1px rgba(255,255,255,.35);
}
.task span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.task svg { width: 16px; height: 16px; flex: none; }
.task:hover { background: #53a3ff; }
.task.pressed { background: #1e52b7; box-shadow: inset 1px 1px 2px rgba(0,0,0,.45); }
#tray {
  height: 30px; display: flex; align-items: center; padding: 0 14px; margin-left: 8px; color: #fff;
  background: linear-gradient(#0c59b9 1%, #139ee9 6%, #18b5f2 10%, #139beb 14%, #1290e8 19%, #0d8dea 63%, #0d9ff1 81%, #0f9eed 88%, #119be9 91%, #1392e2 94%, #137ed7 97%, #095bc9);
  border-left: 1px solid #092e51; box-shadow: inset 1px 0 1px #18bbff;
}

/* ---------------------------------------------------------------- start menu */
#startmenu {
  position: absolute; left: 0; bottom: 30px; width: 400px; z-index: 60000; border-radius: 7px 7px 0 0; overflow: hidden;
  background: #fff; border: 1px solid #0b3fb0; box-shadow: 3px 3px 8px rgba(0,0,0,.45);
}
.sm-head { height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 10px; color: #fff; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,.6);
  background: linear-gradient(#1868ce 0%, #0e60cb 12%, #0e60cb 20%, #1164cf 32%, #1667cf 33%, #1b6cd3 47%, #1e70d9 54%, #2476dc 60%, #297ae0 65%, #3482e3 77%, #3786e5 79%, #428ee9 90%, #4791eb 100%); }
.sm-head #sm-avatar { display: block; width: 46px; height: 46px; border: 2px solid #fff; border-radius: 4px; overflow: hidden; }
.sm-head #sm-avatar svg { width: 42px; height: 42px; display: block; }
.sm-cols { display: flex; border-top: 2px solid #f39a33; }
#sm-left { flex: 1; padding: 6px 4px; display: flex; flex-direction: column; gap: 2px; background: #fff; }
#sm-right { width: 175px; padding: 6px 4px; display: flex; flex-direction: column; gap: 1px; background: #d3e5fa; border-left: 1px solid #95bdee; }
.sm-item { display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 4px 6px; border-radius: 2px; cursor: default; color: #000; }
#sm-right .sm-item { color: #0a246a; }
.sm-item.bold { font-weight: 700; }
.sm-item.big span { display: flex; flex-direction: column; }
.sm-item.big small { color: #777; font-size: 11px; }
.sm-item:hover, .sm-item:focus-visible { background: var(--sel); color: #fff !important; outline: none; }
.sm-item:hover small, .sm-item:focus-visible small { color: #d6e2f8; }
.sm-sep { height: 1px; margin: 4px 6px; background: linear-gradient(90deg, transparent, #87a8dd, transparent); }
.sm-foot { height: 40px; display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding: 0 8px;
  background: linear-gradient(#4282d6 0%, #3b85e0 3%, #418ae3 5%, #418ae3 17%, #3c87e2 21%, #3786e4 26%, #3482e3 29%, #2e7ee1 39%, #2374df 49%, #2072db 57%, #196edb 62%, #176bd8 72%, #1468d6 75%, #1165d5 83%, #0f61cb 88%); }
.sm-foot button { display: flex; align-items: center; gap: 5px; border: 0; background: none; color: #fff; padding: 3px 6px; border-radius: 3px; cursor: pointer; }
.sm-foot button:hover, .sm-foot button:focus-visible { background: rgba(255,255,255,.18); outline: none; }

/* ---------------------------------------------------------------- balloon */
#balloon {
  position: absolute; right: 12px; bottom: 44px; width: 290px; z-index: 55000; padding: 10px 26px 10px 12px; cursor: pointer;
  background: #ffffe1; border: 1px solid #000; border-radius: 8px; box-shadow: 2px 2px 4px rgba(0,0,0,.3);
  animation: fade-in .4s ease-out;
}
#balloon::after { content: ""; position: absolute; right: 30px; bottom: -13px; border: 13px solid transparent; border-top-color: #ffffe1; border-bottom: 0; border-right: 0; filter: drop-shadow(1px 1px 0 #000); }
#balloon b { display: block; margin-bottom: 4px; }
#balloon p { margin: 0 0 4px; line-height: 1.5; }
.bl-go { color: var(--link); text-decoration: underline; }
.bl-close { position: absolute; right: 6px; top: 6px; width: 16px; height: 16px; padding: 0; border: 1px solid #b9b9a4; border-radius: 3px; background: #ffffe1; line-height: 12px; cursor: pointer; }
.bl-close:hover { border-color: #000; }

/* ---------------------------------------------------------------- shut-down dialog */
#s-sys { position: absolute; inset: 0; z-index: 90000; display: grid; place-items: center; }
#sys-box { width: 312px; border-radius: 6px; overflow: hidden; box-shadow: 3px 3px 10px rgba(0,0,0,.5); animation: fade-in .3s ease-out; }
.sys-head { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 14px; background: #0831d9; color: #fff; font-size: 16px; }
.sys-body { background: linear-gradient(135deg, #5a7edc, #3a5ecc); display: flex; justify-content: space-around; padding: 26px 8px 22px; border-top: 2px solid #f99736; }
.sys-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: #fff; cursor: pointer; padding: 4px 6px; border-radius: 4px; }
.sys-tile:not(:disabled):hover span, .sys-tile:focus-visible span { text-decoration: underline; }
.sys-tile:focus-visible { outline: 1px dotted #fff; }
.sys-tile:disabled { cursor: default; opacity: .55; filter: grayscale(.6); }
.sys-foot { background: #0831d9; padding: 8px 10px; text-align: right; }

/* Narrow screens: the banded screens reflow (the desktop itself is scaled in JS). */
@media (max-width: 640px) {
  .m-login { flex-direction: column; gap: 28px; }
  .m-divider { display: none; }
  .m-left { align-items: center; padding-right: 0; text-align: center; }
  .band-logo { align-items: center; }
  .m-right { padding-left: 0; }
  #user-tile { min-width: 0; }
  .band-bottom { padding-inline: 16px; }
  .band-tip { display: none; }
  .m-welcome span { font-size: 48px; }
  #sys-box { width: min(312px, calc(100vw - 32px)); }
}

@media (prefers-reduced-motion: reduce) {
  .boot-run { animation-duration: 6s; }
  #desktop.fade-in, #balloon, #sys-box, .window.flash { animation: none; }
  #desktop { transition: none; }
}
