/* ==========================================================================
   Temur XP — a Windows XP (Luna) inspired desktop
   ========================================================================== */

:root {
  --font: Tahoma, "Trebuchet MS", Verdana, "Segoe UI", sans-serif;
  --title-grad: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #06f 88%, #06f 93%, #005bff 95%, #003dd7 96%, #003dd7 100%);
  --title-grad-inactive: linear-gradient(180deg, #7697e7 0%, #7e9ee3 10%, #94afe8 40%, #97b4e9 88%, #82a5e4 100%);
  --frame: #0831d9;
  --frame-inactive: #6582f5;
  --face: #ece9d8;
  --face-dark: #aca899;
  --taskbar: linear-gradient(180deg, #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%);
  --select: #316ac5;
  --taskbar-h: 30px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: var(--font); font-size: 11px;
  background: #000; color: #000;
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
input, textarea, select, button { font-family: var(--font); font-size: 11px; }
textarea, input[type=text], .selectable { user-select: text; -webkit-user-select: text; }
a { color: #0033cc; }
svg { display: block; }
.hidden { display: none !important; }

/* --------------------------------------------------------------- screens */
.screen { position: fixed; inset: 0; z-index: 9000; }

#boot {
  background: #000; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: none;
}
.boot-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 60px; }
.boot-logo .flag { width: 70px; height: 70px; }
.boot-logo .brand { font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif; line-height: 1; }
.boot-logo .brand small { display: block; font-size: 16px; letter-spacing: .5px; }
.boot-logo .brand b { font-size: 46px; font-weight: bold; letter-spacing: -1px; }
.boot-logo .brand b sup { font-size: 24px; color: #ff6a13; font-weight: bold; margin-left: 3px; }
.boot-bar {
  width: 124px; height: 18px; border: 2px solid #b2b2b2; border-radius: 4px;
  padding: 2px; overflow: hidden; position: relative;
}
.boot-bar .runner {
  position: absolute; top: 2px; left: -40px; display: flex; gap: 2px;
  animation: boot-run 1.6s linear infinite;
}
.boot-bar .runner i { width: 8px; height: 10px; border-radius: 1px; background: linear-gradient(180deg, #2838c7, #5979ef 40%, #2838c7); }
@keyframes boot-run { from { left: -40px; } to { left: 124px; } }
.boot-foot { position: absolute; bottom: 30px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 40px; font-size: 12px; color: #aaa; }

#login {
  background: #5a7edc; display: flex; flex-direction: column;
}
.login-top, .login-bottom { height: 13%; min-height: 60px; background: #00309c; position: relative; }
.login-top::after, .login-bottom::before {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #00309c, #fff 30%, #fff 50%, #f99736 70%, #00309c);
}
.login-top::after { bottom: 0; background: linear-gradient(90deg, #00309c, #b1c7f5 50%, #00309c); }
.login-bottom::before { top: 0; }
.login-mid {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 10% 10%, #91b1ef 0%, #5a7edc 45%);
}
.login-left { flex: 1; display: flex; flex-direction: column; align-items: flex-end; padding-right: 40px; color: #fff; text-align: right; }
.login-left .flag { width: 90px; height: 90px; margin-bottom: 8px; }
.login-left .brand { font-size: 32px; font-weight: bold; font-family: "Franklin Gothic Medium", Arial, sans-serif; }
.login-left .brand sup { font-size: 16px; color: #ff9933; }
.login-left p { font-size: 15px; margin: 30px 0 0; }
.login-divider { width: 1px; align-self: stretch; margin: 40px 0; background: linear-gradient(180deg, transparent, #fff 20%, #fff 80%, transparent); opacity: .6; }
.login-right { flex: 1; padding-left: 30px; }
.user-tile {
  display: inline-flex; align-items: center; gap: 14px; padding: 8px 40px 8px 8px;
  border-radius: 8px; cursor: pointer; color: #fff; border: 0; background: transparent; text-align: left;
}
.user-tile:hover, .user-tile:focus-visible { background: linear-gradient(90deg, #00309c, transparent); outline: none; }
.user-tile img, .user-tile .avatar {
  width: 64px; height: 64px; border-radius: 6px; border: 2px solid #fff; background: #fff; object-fit: cover;
  opacity: .85;
}
.user-tile:hover img { opacity: 1; border-color: #ffc000; }
.user-tile .name { font-size: 20px; }
.user-tile .sub { font-size: 12px; opacity: .8; margin-top: 3px; }
.login-bottom { display: flex; align-items: center; justify-content: space-between; padding: 0 30px; color: #fff; font-size: 13px; }
.login-bottom button { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: #fff; font-size: 13px; cursor: pointer; }
.login-bottom button svg { width: 26px; height: 26px; }
.login-welcome { font-size: 44px; color: #fff; font-style: italic; font-weight: bold; text-shadow: 1px 2px 4px #0005; }

#off {
  background: #000; color: #ff9c00; display: flex; align-items: center; justify-content: center;
  font-size: 22px; text-align: center; cursor: pointer; flex-direction: column; gap: 14px;
}
#off small { color: #666; font-size: 12px; }

/* --------------------------------------------------------------- desktop */
#desktop {
  position: fixed; inset: 0 0 var(--taskbar-h) 0;
  background: #3a6ea5 center / cover no-repeat;
  overflow: hidden;
}
#desktop-icons { position: absolute; inset: 0; }
.dicon {
  position: absolute; width: 76px; display: flex; flex-direction: column; align-items: center;
  padding: 2px; cursor: default; outline: none;
}
.dicon .img { width: 34px; height: 34px; position: relative; }
.dicon .img svg, .dicon .img img { width: 100%; height: 100%; }
.dicon .label {
  margin-top: 4px; padding: 1px 3px; color: #fff; text-align: center; line-height: 1.2;
  text-shadow: 1px 1px 1px #000, 0 0 3px #000; word-break: break-word;
  max-width: 74px;
}
.dicon.selected .img { filter: brightness(.7) sepia(1) hue-rotate(185deg) saturate(4); }
.dicon.selected .label { background: var(--select); text-shadow: none; }
.dicon:focus-visible .label { outline: 1px dotted #fff; }
.dicon.dragging { opacity: .7; z-index: 5; }
.dicon .shortcut { position: absolute; left: -2px; bottom: -2px; width: 12px; height: 12px; }

#marquee { position: absolute; border: 1px solid #316ac5; background: rgba(49, 106, 197, .25); pointer-events: none; z-index: 4; }

/* --------------------------------------------------------------- windows */
.window {
  position: absolute; display: flex; flex-direction: column;
  background: var(--face); min-width: 220px; min-height: 120px;
  border: 3px solid var(--frame); border-top: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 3px 10px rgba(0,0,0,.45);
}
.window.inactive { border-color: var(--frame-inactive); }
.window.maximized { border-radius: 0; border-width: 0; box-shadow: none; }
.window.maximized .titlebar { border-radius: 0; }
.window.minimized { display: none; }
.window.opening { animation: win-open .14s ease-out; }
@keyframes win-open { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

.titlebar {
  height: 28px; flex: none; display: flex; align-items: center; gap: 4px;
  padding: 0 4px 0 6px; margin: 0 -3px;
  background: var(--title-grad); color: #fff; border-radius: 8px 8px 0 0;
  border: 1px solid var(--frame); border-bottom: 0;
  touch-action: none;
}
.window.maximized .titlebar { margin: 0; border: 0; }
.inactive .titlebar { background: var(--title-grad-inactive); border-color: var(--frame-inactive); }
.titlebar .ticon { width: 16px; height: 16px; flex: none; }
.titlebar .ticon svg, .titlebar .ticon img { width: 16px; height: 16px; }
.titlebar .ttext {
  flex: 1; min-width: 0; font-weight: bold; font-size: 13px; letter-spacing: .2px;
  text-shadow: 1px 1px #0f1089; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: "Trebuchet MS", var(--font);
}
.inactive .titlebar .ttext { color: #d8e4f8; text-shadow: none; }
.tbtn {
  width: 21px; height: 21px; flex: none; border: 1px solid #fff; border-radius: 3px; padding: 0;
  background: radial-gradient(circle at 90% 90%, #0054e9 0%, #2263d5 55%, #4480f5 90%, #fff 100%);
  position: relative; cursor: pointer;
  box-shadow: inset 0 -1px 1px #0000003a;
}
.tbtn:hover { filter: brightness(1.2); }
.tbtn:active { filter: brightness(.85); }
.tbtn.close { background: radial-gradient(circle at 90% 90%, #cc4600 0%, #dc6527 55%, #cd7546 70%, #fff 100%); }
.inactive .tbtn { opacity: .7; }
.tbtn::before, .tbtn::after { content: ""; position: absolute; }
.tbtn.min::before { left: 4px; bottom: 4px; width: 7px; height: 3px; background: #fff; }
.tbtn.max::before { left: 4px; top: 4px; width: 11px; height: 11px; border: 1px solid #fff; border-top-width: 3px; }
.window.maximized .tbtn.max::before { left: 7px; top: 3px; width: 8px; height: 8px; }
.window.maximized .tbtn.max::after { left: 3px; top: 7px; width: 8px; height: 8px; border: 1px solid #fff; border-top-width: 2px; background: #2c69e0; }
.tbtn.close::before, .tbtn.close::after { left: 9px; top: 3px; width: 2px; height: 13px; background: #fff; transform: rotate(45deg); }
.tbtn.close::after { transform: rotate(-45deg); }
.tbtn.help::before { content: "?"; inset: 0; color: #fff; font: bold 14px/19px Arial, sans-serif; text-align: center; }

.wbody { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.resizer { position: absolute; z-index: 2; touch-action: none; }
.resizer.n { top: -3px; left: 6px; right: 6px; height: 6px; cursor: n-resize; }
.resizer.s { bottom: -4px; left: 6px; right: 6px; height: 7px; cursor: s-resize; }
.resizer.e { right: -4px; top: 6px; bottom: 6px; width: 7px; cursor: e-resize; }
.resizer.w { left: -4px; top: 6px; bottom: 6px; width: 7px; cursor: w-resize; }
.resizer.se { right: -4px; bottom: -4px; width: 12px; height: 12px; cursor: se-resize; }
.resizer.sw { left: -4px; bottom: -4px; width: 12px; height: 12px; cursor: sw-resize; }
.resizer.ne { right: -4px; top: -3px; width: 12px; height: 10px; cursor: ne-resize; }
.resizer.nw { left: -4px; top: -3px; width: 12px; height: 10px; cursor: nw-resize; }
.window.maximized .resizer, .window.fixed .resizer { display: none; }
.dragshield { position: fixed; inset: 0; z-index: 99999; }

/* menubar & toolbars */
.menubar { display: flex; flex: none; padding: 1px 2px; border-bottom: 1px solid #fff; box-shadow: 0 1px #d0cfc4; background: var(--face); position: relative; }
.menubar > .mitem { padding: 2px 7px; cursor: default; position: relative; }
.menubar > .mitem:hover, .menubar > .mitem.open { background: var(--select); color: #fff; }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 160px; z-index: 50;
  background: #fff; border: 1px solid #aca899; box-shadow: 2px 2px 3px rgba(0,0,0,.35); padding: 2px; color: #000;
}
.dropdown .ditem { padding: 3px 20px 3px 22px; white-space: nowrap; position: relative; }
.dropdown .ditem:hover { background: var(--select); color: #fff; }
.dropdown .ditem.disabled { color: #aca899; pointer-events: none; }
.dropdown .ditem.checked::before { content: "✓"; position: absolute; left: 7px; }
.dropdown .sep { height: 1px; background: #aca899; margin: 3px 1px; }

.toolbar {
  display: flex; align-items: center; gap: 2px; flex: none; padding: 2px 4px;
  background: linear-gradient(180deg, #fff 0%, #ece9d8 60%, #e3e0d0 100%);
  border-bottom: 1px solid #d0cfc4; min-height: 38px; overflow-x: auto; scrollbar-width: none;
}
.toolbar::-webkit-scrollbar { display: none; }
.tool {
  display: flex; align-items: center; gap: 4px; padding: 3px 6px; border: 1px solid transparent; border-radius: 3px;
  background: none; cursor: pointer; white-space: nowrap; color: #000;
}
.tool:hover:not(:disabled) { border-color: #cecec3; background: linear-gradient(#fff, #f0efe7 60%, #e3e0cf); }
.tool:active:not(:disabled) { background: #e3e0cf; box-shadow: inset 1px 1px 2px #0003; }
.tool:disabled { opacity: .45; cursor: default; }
.tool svg { width: 26px; height: 26px; }
.tool.small svg { width: 18px; height: 18px; }
.tool-sep { width: 1px; align-self: stretch; margin: 3px 3px; background: #c5c2b2; box-shadow: 1px 0 #fff; }

.addressbar { display: flex; align-items: center; gap: 4px; padding: 2px 4px; flex: none; border-bottom: 1px solid #d0cfc4; }
.addressbar label { color: #7f7c73; padding: 0 2px; }
.addressbox {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; height: 22px;
  background: #fff; border: 1px solid #7f9db9; padding: 0 3px;
}
.addressbox svg { width: 16px; height: 16px; flex: none; }
.addressbox input { border: 0; outline: 0; flex: 1; min-width: 0; height: 100%; }
.addressbox .path { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gobtn { display: flex; align-items: center; gap: 3px; background: none; border: 0; cursor: pointer; padding: 0 4px; }
.gobtn i { width: 19px; height: 19px; border-radius: 3px; background: linear-gradient(135deg, #7cd66a, #2c9a1e); position: relative; display: block; }
.gobtn i::after { content: ""; position: absolute; left: 7px; top: 5px; border: 5px solid transparent; border-left: 6px solid #fff; border-right: 0; }

.statusbar { display: flex; flex: none; gap: 2px; padding: 2px; border-top: 1px solid #d0cfc4; background: var(--face); }
.statusbar > div { padding: 2px 6px; border: 1px solid; border-color: #aca899 #fff #fff #aca899; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statusbar > div.fit { flex: none; min-width: 100px; }

/* explorer */
.explorer { flex: 1; display: flex; min-height: 0; background: #fff; }
.taskpane {
  width: 210px; flex: none; overflow-y: auto; padding: 12px;
  background: linear-gradient(180deg, #748aff 0%, #4057d3 100%);
}
.tp-box { margin-bottom: 12px; border-radius: 4px 4px 0 0; overflow: hidden; }
.tp-head {
  display: flex; justify-content: space-between; align-items: center; padding: 5px 8px 5px 12px;
  background: linear-gradient(90deg, #fff 0%, #c6d3f7 100%); color: #215dc6; font-weight: bold; cursor: pointer;
}
.tp-head:hover { color: #428eff; }
.tp-head .chev { width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 1px solid #b1bdd6; position: relative; }
.tp-head .chev::after { content: ""; position: absolute; left: 5px; top: 3px; width: 4px; height: 4px; border: solid #215dc6; border-width: 2px 0 0 2px; transform: rotate(45deg); }
.tp-box.collapsed .chev::after { top: 1px; transform: rotate(225deg); }
.tp-box.collapsed .tp-body { display: none; }
.tp-body { background: #d6dff7; padding: 8px 10px; border: 1px solid #fff; border-top: 0; }
.tp-link { display: flex; align-items: center; gap: 6px; padding: 3px 0; color: #215dc6; cursor: pointer; }
.tp-link:hover { color: #428eff; text-decoration: underline; }
.tp-link svg { width: 16px; height: 16px; flex: none; }
.tp-body .dname { font-weight: bold; margin-bottom: 4px; word-break: break-word; }
.tp-body .dline { color: #333; margin: 2px 0; word-break: break-word; }

.files { flex: 1; overflow: auto; padding: 8px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px 8px; }
.files.tiles .fitem { width: 220px; flex-direction: row; text-align: left; gap: 6px; }
.files.tiles .fitem .img { width: 48px; height: 48px; }
.files.tiles .fitem .label { max-width: none; }
.fitem { width: 88px; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4px 2px; outline: none; cursor: default; }
.fitem .img { width: 40px; height: 40px; flex: none; position: relative; }
.fitem .img svg, .fitem .img img { width: 100%; height: 100%; }
.fitem .img img.thumb { object-fit: cover; border: 1px solid #ccc; }
.fitem .label { padding: 1px 2px; margin-top: 3px; line-height: 1.25; word-break: break-word; max-width: 86px; }
.fitem .label small { display: block; color: #7f7f7f; }
.fitem.selected .img { filter: brightness(.75) sepia(1) hue-rotate(185deg) saturate(3); }
.fitem.selected .label { background: var(--select); color: #fff; }
.fitem.selected .label small { color: #dde; }
.files .empty { color: #777; padding: 20px; }
.files .loading { padding: 20px; color: #555; display: flex; align-items: center; gap: 8px; }

/* generic XP controls */
.btn {
  min-width: 75px; height: 23px; padding: 0 10px; border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #ecebe6 86%, #d6d0c5 100%); cursor: pointer; color: #000;
}
.btn:hover { box-shadow: inset -1px 1px #fff0cf, inset 1px 2px #fdd889, inset -2px 2px #fbc761, inset 2px -2px #e5a01a; }
.btn:active { background: linear-gradient(180deg, #cdcac3 0%, #e3e3db 8%, #e5e5de 94%, #f2f2f1 100%); }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.btn.default { box-shadow: inset -1px 1px #cee7ff, inset 1px 2px #98b8ea, inset -2px 2px #bcd4f6, inset 1px -1px #89ade4, inset 2px -2px #89ade4; }
.btn:disabled { color: #aca899; border-color: #cac8bb; cursor: default; box-shadow: none; }
fieldset { border: 1px solid #d0d0bf; border-radius: 4px; padding: 8px 10px; margin: 0 0 8px; }
legend { color: #0046d5; padding: 0 3px; }
.sunken { background: #fff; border: 1px solid #7f9db9; }

.scroll-xp { scrollbar-color: #c1d3fb #fdfdfb; }

/* dialog */
.dialog-body { display: flex; gap: 14px; padding: 14px 14px 6px; align-items: flex-start; }
.dialog-body .dicn { width: 32px; height: 32px; flex: none; }
.dialog-body .dmsg { line-height: 1.5; padding-top: 2px; white-space: pre-line; }
.dialog-btns { display: flex; justify-content: center; gap: 8px; padding: 10px 14px 12px; flex-wrap: wrap; }
.errreport { padding: 0; }
.errreport .head { background: #fff; padding: 12px 14px; display: flex; gap: 12px; border-bottom: 1px solid #aca899; font-weight: bold; }
.errreport .head svg { width: 32px; height: 32px; flex: none; }
.errreport .txt { padding: 10px 14px; line-height: 1.5; }
.errreport .txt b { display: block; margin-bottom: 4px; }

/* notepad */
.notepad-area {
  flex: 1; width: 100%; resize: none; border: 0; outline: 0; padding: 4px 6px; margin: 0;
  font: 13px/1.35 "Lucida Console", Consolas, "Courier New", monospace; color: #000; background: #fff;
  border-top: 1px solid #aca899;
}
.notepad-area.nowrap { white-space: pre; overflow-wrap: normal; overflow-x: auto; }

/* cmd */
.cmd {
  flex: 1; background: #000; color: #c0c0c0; padding: 4px 6px; overflow-y: auto; cursor: text;
  font: 13px/1.3 "Lucida Console", Consolas, "Courier New", monospace; white-space: pre-wrap; word-break: break-word;
}
.cmd .line { display: flex; }
.cmd input { flex: 1; background: transparent; border: 0; outline: 0; color: inherit; font: inherit; padding: 0; caret-color: #c0c0c0; }
.cmd a { color: #6cf; }

/* IE */
.ie-view { flex: 1; overflow: auto; background: #fff; border-top: 1px solid #aca899; }
.ie-view iframe { border: 0; width: 100%; height: 100%; display: block; }
.homepage { font-family: "Times New Roman", Times, serif; font-size: 16px; min-height: 100%; background: #000080 repeating-linear-gradient(45deg, #000080 0 10px, #00006e 10px 20px); color: #fff; padding: 16px; text-align: center; }
.homepage h1 { font-family: "Comic Sans MS", "Comic Sans", cursive; color: #ffff00; font-size: 34px; margin: 6px 0; text-shadow: 3px 3px #f0f; }
.homepage .marq { overflow: hidden; white-space: nowrap; background: #000; color: #0f0; font-family: "Courier New", monospace; padding: 4px 0; border: 2px ridge #c0c0c0; }
.homepage .marq span { display: inline-block; padding-left: 100%; animation: marq 14s linear infinite; }
@keyframes marq { to { transform: translateX(-100%); } }
.homepage .box { background: #c0c0c0; color: #000; border: 3px outset #fff; max-width: 560px; margin: 16px auto; padding: 12px; text-align: left; font-size: 15px; }
.homepage .box h2 { margin: 0 0 8px; font-size: 18px; background: #000080; color: #fff; padding: 2px 6px; }
.homepage .box a { color: #0000ee; }
.homepage .box a:visited { color: #551a8b; }
.homepage .blink { animation: blink 1s steps(1) infinite; color: #ff0; }
@keyframes blink { 50% { visibility: hidden; } }
.homepage .counter { display: inline-flex; gap: 1px; background: #000; padding: 2px; margin-top: 6px; }
.homepage .counter span { background: #222; color: #0f0; font: bold 16px "Courier New", monospace; padding: 1px 4px; }
.homepage .construction { display: inline-block; background: repeating-linear-gradient(-45deg, #ffcc00 0 12px, #000 12px 24px); color: #000; padding: 4px; margin: 8px 0; }
.homepage .construction b { background: #ffcc00; padding: 2px 8px; font-family: Arial, sans-serif; font-size: 13px; }

/* paint */
.paint { flex: 1; display: flex; min-height: 0; background: #c0c0c0; }
.paint-tools { width: 56px; flex: none; padding: 4px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px; background: var(--face); border-right: 1px solid #aca899; }
.paint-tools button { width: 23px; height: 23px; padding: 0; border: 1px solid; border-color: #fff #808080 #808080 #fff; background: var(--face); cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.paint-tools button.on { border-color: #808080 #fff #fff #808080; background: #fff repeating-conic-gradient(#e0e0e0 0 25%, #fff 0 50%) 0 0 / 4px 4px; }
.paint-tools .sizes { width: 100%; margin-top: 4px; border: 1px solid; border-color: #808080 #fff #fff #808080; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 0; }
.paint-tools .sizes span { width: 36px; display: flex; align-items: center; justify-content: center; height: 10px; cursor: pointer; }
.paint-tools .sizes span.on { background: var(--select); }
.paint-tools .sizes span i { display: block; width: 26px; background: #000; }
.paint-tools .sizes span.on i { background: #fff; }
.paint-canvas-wrap { flex: 1; overflow: auto; padding: 4px; background: #808080; }
.paint-canvas-wrap canvas { background: #fff; display: block; box-shadow: 1px 1px 0 #000; touch-action: none; cursor: crosshair; }
.paint-palette { display: flex; align-items: center; gap: 6px; padding: 4px; border-top: 1px solid #fff; flex: none; }
.paint-current { width: 30px; height: 30px; position: relative; border: 1px solid; border-color: #808080 #fff #fff #808080; background: var(--face); flex: none; }
.paint-current i { position: absolute; width: 14px; height: 14px; border: 1px solid #808080; }
.paint-current i.fg { left: 4px; top: 4px; z-index: 1; }
.paint-current i.bg { right: 4px; bottom: 4px; }
.paint-swatches { display: grid; grid-template-columns: repeat(14, 15px); grid-auto-rows: 15px; gap: 1px; }
.paint-swatches i { border: 1px solid; border-color: #808080 #fff #fff #808080; cursor: pointer; }

/* minesweeper */
.mine-wrap { padding: 6px; background: #c0c0c0; border: 3px solid; border-color: #fff #808080 #808080 #fff; margin: 0; display: inline-block; }
.mine-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 5px; margin-bottom: 6px; border: 2px solid; border-color: #808080 #fff #fff #808080; }
.mine-lcd { background: #000; color: #f00; font: bold 22px/1 "Courier New", monospace; padding: 1px 2px; letter-spacing: 1px; min-width: 42px; text-align: center; border: 1px solid; border-color: #808080 #fff #fff #808080; }
.mine-face { width: 28px; height: 28px; border: 2px solid; border-color: #fff #808080 #808080 #fff; background: #c0c0c0; font-size: 17px; line-height: 22px; padding: 0; cursor: pointer; }
.mine-face:active { border-color: #808080 #fff #fff #808080; }
.mine-grid { display: grid; border: 3px solid; border-color: #808080 #fff #fff #808080; touch-action: manipulation; }
.mine-grid i {
  width: 18px; height: 18px; font: bold 13px/14px Tahoma, Verdana, sans-serif; font-style: normal; text-align: center;
  border: 2px solid; border-color: #fff #808080 #808080 #fff; background: #c0c0c0; cursor: default;
}
.mine-grid i.open { border: 0; border-left: 1px solid #808080; border-top: 1px solid #808080; line-height: 17px; }
.mine-grid i.boom { background: #f00; }
.mine-grid i.n1 { color: #0000ff; } .mine-grid i.n2 { color: #008000; } .mine-grid i.n3 { color: #f00; }
.mine-grid i.n4 { color: #000080; } .mine-grid i.n5 { color: #800000; } .mine-grid i.n6 { color: #008080; }
.mine-grid i.n7 { color: #000; } .mine-grid i.n8 { color: #808080; }

/* game launcher splash */
.splash { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; padding: 20px; gap: 16px; }
.splash h2 { margin: 0; font-size: 30px; letter-spacing: 2px; text-shadow: 2px 2px 0 #000; font-family: Impact, "Arial Black", sans-serif; font-weight: normal; }
.splash .bar { width: 260px; height: 14px; border: 1px solid #fff8; background: #0006; overflow: hidden; }
.splash .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #fff6, #fff); transition: width .25s; }
.splash small { opacity: .8; font-size: 12px; }

/* image viewer */
.viewer { flex: 1; display: flex; align-items: center; justify-content: center; background: #fff; min-height: 0; padding: 10px; }
.viewer img { max-width: 100%; max-height: 100%; box-shadow: 0 0 0 1px #aaa, 3px 3px 6px #0003; }
.viewer-bar { display: flex; justify-content: center; gap: 4px; padding: 4px; background: linear-gradient(#fff, #ece9d8); border-top: 1px solid #d0cfc4; flex: none; }

/* stack / project sheet */
.sheet { padding: 12px; overflow: auto; flex: 1; line-height: 1.5; }
.sheet .top { display: flex; gap: 12px; align-items: center; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #d0d0bf; }
.sheet .top svg { width: 40px; height: 40px; flex: none; }
.sheet .top input { flex: 1; border: 1px solid #7f9db9; padding: 3px; }
.sheet table { border-collapse: collapse; width: 100%; }
.sheet td { padding: 3px 0; vertical-align: top; }
.sheet td:first-child { width: 90px; color: #444; }
.sheet .meter { height: 12px; border: 1px solid #686868; border-radius: 2px; padding: 1px; background: #fff; width: 100%; max-width: 200px; }
.sheet .meter i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #37b62a 0 7px, transparent 7px 9px); }
.sheet-btns { display: flex; justify-content: flex-end; gap: 6px; padding: 8px 12px; flex: none; }

/* contacts */
.contacts { flex: 1; overflow: auto; background: #fff; }
.contacts table { width: 100%; border-collapse: collapse; }
.contacts th { text-align: left; font-weight: normal; padding: 3px 6px; background: linear-gradient(#fff, #ebeadb); border-right: 1px solid #d0cfc4; border-bottom: 1px solid #d0cfc4; }
.contacts td { padding: 5px 6px; border-bottom: 1px solid #f0f0f0; }
.contacts tr:hover td { background: #eef3fc; }
.contacts td .who { display: flex; align-items: center; gap: 6px; }
.contacts td svg { width: 16px; height: 16px; }

/* display properties */
.tabs { display: flex; padding: 6px 6px 0; gap: 0; }
.tabs span { padding: 3px 8px; border: 1px solid #919b9c; border-bottom: 0; border-radius: 3px 3px 0 0; background: linear-gradient(#fff, #ecebe5); margin-right: -1px; }
.tabs span.on { background: #fcfcfe; border-top: 2px solid #ffc83c; position: relative; top: 1px; padding-bottom: 4px; }
.tabpanel { margin: 0 6px; border: 1px solid #919b9c; background: #fcfcfe; padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; }
.monitor-preview { width: 180px; margin: 0 auto; }
.monitor-preview .scr { height: 110px; border: 8px solid #d6d3c3; border-radius: 6px 6px 0 0; background: #3a6ea5 center / cover; box-shadow: inset 0 0 0 1px #888; }
.monitor-preview .stand { width: 60px; height: 14px; margin: 0 auto; background: linear-gradient(#cfccbc, #a9a695); clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%); }
.listbox { border: 1px solid #7f9db9; background: #fff; height: 110px; overflow-y: auto; }
.listbox div { padding: 2px 6px; display: flex; align-items: center; gap: 6px; cursor: default; }
.listbox div svg { width: 16px; height: 16px; }
.listbox div.on { background: var(--select); color: #fff; }

/* run dialog */
.run-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.run-body .row { display: flex; gap: 12px; align-items: flex-start; line-height: 1.4; }
.run-body .row svg { width: 32px; height: 32px; flex: none; }
.run-body input { width: 100%; border: 1px solid #7f9db9; height: 21px; padding: 0 3px; }

/* --------------------------------------------------------------- taskbar */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--taskbar-h); z-index: 5000;
  display: flex; align-items: stretch; background: var(--taskbar);
}
#start-btn {
  display: flex; align-items: center; gap: 5px; padding: 0 22px 2px 10px; margin-right: 10px; flex: none;
  border: 0; cursor: pointer; color: #fff; font: italic bold 19px/1 "Franklin Gothic Medium", "Trebuchet MS", Arial, sans-serif;
  text-shadow: 1px 1px 2px #333; border-radius: 0 10px 10px 0;
  background: radial-gradient(circle at 20% 110%, #3c8f3c 0%, #43a043 30%, #54b754 60%, #7bd07b 90%);
  box-shadow: inset -2px -2px 4px #1e5e1e, inset 2px 2px 3px #b3ecb3, 2px 0 3px #0005;
}
#start-btn svg { width: 22px; height: 22px; filter: drop-shadow(1px 1px 1px #0006); }
#start-btn:hover { filter: brightness(1.1); }
#start-btn.pressed { filter: brightness(.85); box-shadow: inset 2px 2px 4px #1e5e1e; }
#task-list { flex: 1; display: flex; gap: 3px; padding: 2px 4px; overflow: hidden; min-width: 0; }
.task {
  flex: 0 1 160px; min-width: 36px; display: flex; align-items: center; gap: 5px; padding: 0 8px;
  border-radius: 3px; color: #fff; cursor: pointer; white-space: nowrap; overflow: hidden;
  background: #3c81f3; box-shadow: inset -1px -1px #1c52b8, inset 1px 1px #75a7fb, 1px 1px 1px #0003; border: 0;
}
.task:hover { background: #53a3ff; }
.task.active { background: #1e52b7; box-shadow: inset 1px 1px 2px #102d71, inset -1px -1px #3f73cd; }
.task.active:hover { background: #3175e8; }
.task svg, .task img { width: 16px; height: 16px; flex: none; }
.task span { overflow: hidden; text-overflow: ellipsis; }
#tray {
  display: flex; align-items: center; gap: 6px; padding: 0 10px 0 12px; flex: none; color: #fff;
  background: linear-gradient(180deg, #0c59b9 1%, #139ee9 6%, #18b5f2 10%, #139beb 14%, #1290e8 19%, #0d8dea 63%, #0d9ff1 81%, #0f9eed 88%, #119be9 91%, #1392e2 94%, #137ed7 97%, #095bc9 100%);
  border-left: 1px solid #1042af; box-shadow: inset 1px 0 1px #18bbff;
}
#tray .ticon { width: 16px; height: 16px; cursor: pointer; }
#tray .ticon svg { width: 16px; height: 16px; }
#clock { padding-left: 4px; white-space: nowrap; cursor: default; }

.balloon {
  position: fixed; right: 12px; bottom: calc(var(--taskbar-h) + 12px); z-index: 6000; width: 280px;
  background: #ffffe1; border: 1px solid #000; border-radius: 8px; padding: 8px 10px 10px; box-shadow: 2px 2px 6px #0006;
  animation: win-open .2s ease-out;
}
.balloon::after { content: ""; position: absolute; right: 60px; bottom: -14px; border: 7px solid transparent; border-top: 8px solid #ffffe1; border-right-color: transparent; }
.balloon::before { content: ""; position: absolute; right: 59px; bottom: -16px; border: 8px solid transparent; border-top: 8px solid #000; }
.balloon .bh { display: flex; align-items: center; gap: 6px; font-weight: bold; margin-bottom: 4px; }
.balloon .bh svg { width: 16px; height: 16px; }
.balloon .bx { margin-left: auto; width: 14px; height: 14px; border: 1px solid #aaa; border-radius: 2px; line-height: 11px; text-align: center; cursor: pointer; font-weight: normal; }
.balloon .bx:hover { background: #e65d2f; color: #fff; border-color: #a33; }
.balloon p { margin: 0; line-height: 1.4; }

/* --------------------------------------------------------------- start menu */
#start-menu {
  position: fixed; left: 0; bottom: var(--taskbar-h); z-index: 5500; width: 380px; max-width: 100vw;
  border-radius: 8px 8px 0 0; overflow: visible; background: #4282d6;
  box-shadow: 2px -2px 10px #0006; border: 1px solid #1c5ec9; border-bottom: 0;
  display: flex; flex-direction: column;
}
.sm-head {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; height: 58px; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #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%);
  color: #fff; font: bold 14px "Trebuchet MS", var(--font); text-shadow: 1px 1px 2px #0005; position: relative;
}
.sm-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, #f89b1f 50%, transparent); }
.sm-head img, .sm-head .avatar { width: 44px; height: 44px; border: 2px solid #fff; border-radius: 4px; background: #fff; object-fit: cover; box-shadow: 1px 1px 3px #0006; }
.sm-cols { display: flex; min-height: 0; }
.sm-left { flex: 1; background: #fff; padding: 6px 0; display: flex; flex-direction: column; border-right: 1px solid #95bdee; }
.sm-right { flex: 1; background: #d3e5fa; padding: 6px 0; border-left: 1px solid #95bdee; }
.sm-item { display: flex; align-items: center; gap: 6px; padding: 3px 8px; cursor: pointer; position: relative; color: #000; }
.sm-item svg, .sm-item img { width: 30px; height: 30px; flex: none; }
.sm-right .sm-item svg { width: 22px; height: 22px; }
.sm-item b { display: block; }
.sm-item small { color: #777; display: block; }
.sm-right .sm-item { color: #0a246a; }
.sm-right .sm-item b { font-weight: bold; }
.sm-item:hover, .sm-item.open { background: var(--select); color: #fff; }
.sm-item:hover small, .sm-item.open small { color: #fff; }
.sm-sep { height: 1px; margin: 4px 8px; background: linear-gradient(90deg, transparent, #c4c3bb 20%, #c4c3bb 80%, transparent); }
.sm-right .sm-sep { background: linear-gradient(90deg, transparent, #9cbde9 20%, #9cbde9 80%, transparent); }
.sm-all { margin-top: auto; justify-content: center; font-weight: bold; gap: 8px; }
.sm-all .arrow { width: 18px; height: 18px; border-radius: 3px; background: linear-gradient(135deg, #7cd66a, #2c9a1e); position: relative; }
.sm-all .arrow::after { content: ""; position: absolute; left: 7px; top: 4px; border: 5px solid transparent; border-left: 6px solid #fff; border-right: 0; }
.sm-foot {
  display: flex; justify-content: flex-end; gap: 6px; padding: 6px 10px; color: #fff;
  background: linear-gradient(180deg, #4282d6 0%, #3b85e0 3%, #418ae3 5%, #418ae3 17%, #3c87e2 21%, #3786e4 26%, #3482e3 29%, #2e7ee1 39%, #2374df 49%, #2072db 57%, #196edb 62%, #176bd8 72%, #1468d5 75%, #1165d0 83%, #0f61cb 88%);
}
.sm-foot button { display: flex; align-items: center; gap: 4px; background: none; border: 0; color: #fff; cursor: pointer; padding: 3px 5px; border-radius: 3px; }
.sm-foot button:hover { background: #fff3; }
.sm-foot svg { width: 22px; height: 22px; }

.submenu {
  position: fixed; z-index: 5600; background: #fff; border: 1px solid #aca899; min-width: 200px; padding: 2px 0;
  box-shadow: 2px 2px 4px #0005; max-height: calc(100vh - var(--taskbar-h) - 10px); overflow-y: auto;
}
.submenu .sm-item { padding: 3px 10px 3px 6px; }
.submenu .sm-item svg, .submenu .sm-item img { width: 16px; height: 16px; }
.submenu .sm-item.has-sub::after { content: ""; margin-left: auto; border: 4px solid transparent; border-left: 4px solid currentColor; border-right: 0; }
.submenu .sm-item:has(+ *)::after { }
.submenu .sm-hdr { padding: 3px 10px; color: #777; }

/* context menu */
#ctx {
  position: fixed; z-index: 7000; background: #fff; border: 1px solid #aca899; box-shadow: 2px 2px 3px #0006; padding: 2px; min-width: 170px;
}
#ctx .ditem { padding: 4px 20px 4px 22px; white-space: nowrap; }
#ctx .ditem b { font-weight: bold; }
#ctx .ditem:hover { background: var(--select); color: #fff; }
#ctx .ditem.disabled { color: #aca899; pointer-events: none; }
#ctx .sep { height: 1px; background: #aca899; margin: 3px 1px; }

/* shutdown dialog */
#shutdown {
  z-index: 8500; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35);
}
#shutdown.grey #desktop { filter: grayscale(1); }
.sd-box { width: 314px; max-width: calc(100vw - 20px); border: 1px solid #fff; box-shadow: 0 0 20px #0008; }
.sd-head { height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; background: #0f2e9c; color: #fff; font-size: 17px; }
.sd-head .flag { width: 30px; height: 30px; }
.sd-mid { background: linear-gradient(90deg, #5a7edc, #7a98e5 50%, #5a7edc); padding: 26px 10px; display: flex; justify-content: space-around; position: relative; }
.sd-mid::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, #5a7edc, #fff 50%, #5a7edc); }
.sd-mid button { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: #fff; cursor: pointer; font-size: 11px; }
.sd-mid button svg { width: 34px; height: 34px; border-radius: 4px; }
.sd-mid button:hover svg { filter: brightness(1.2); box-shadow: 0 0 0 2px #fff8; }
.sd-foot { height: 44px; display: flex; align-items: center; justify-content: flex-end; padding: 0 12px; background: #0f2e9c; }

/* --------------------------------------------------------------- mobile */
@media (max-width: 640px) {
  :root { --taskbar-h: 36px; }
  .dicon { width: 78px; }
  .dicon .img { width: 40px; height: 40px; }
  .taskpane { display: none; }
  #start-menu { width: 100vw; border-radius: 0; }
  .sm-item small { display: none; }
  .task { flex-basis: 40px; justify-content: center; }
  .task span { display: none; }
  #start-btn { padding-right: 16px; }
  .login-mid { flex-direction: column; justify-content: center; gap: 20px; }
  .login-left { align-items: center; padding: 0; text-align: center; flex: none; }
  .login-left p { margin-top: 10px; }
  .login-divider { display: none; }
  .login-right { padding: 0; flex: none; }
  .login-welcome { font-size: 32px; }
  .window .titlebar { height: 32px; }
  .tbtn { width: 25px; height: 25px; }
  .tbtn.close::before, .tbtn.close::after { left: 11px; top: 5px; }
  .tbtn.max::before { left: 6px; top: 6px; }
  .tbtn.min::before { left: 6px; bottom: 6px; }
  #tray .ticon.opt { display: none; }
}
