/* VT323 is self-hosted (SIL OFL 1.1, see assets/fonts/OFL.txt) so the site makes no third-party requests */
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/vt323-latin.woff2) format('woff2');
}

/* ==========================================================
   Pinkdows XP — shell styles (Luna-ish chrome, desktop, screens)
   ========================================================== */
:root {
  --ui: Tahoma, "Segoe UI", Verdana, "DejaVu Sans", Geneva, sans-serif;
  --title-font: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  --mono: "Lucida Console", Consolas, Monaco, "Courier New", monospace;
  --comic: "Comic Sans MS", "Chalkboard SE", "Comic Neue", "Marker Felt", cursive;
  --tb-h: 30px;
  --face: #ece9d8;
  --sel: #316ac5;
  --pink: #ff5fa8;
  --pink-deep: #d6337f;
  --sky: #7fb8ef;

  --title-active: linear-gradient(180deg, #0997ff, #0053ee 8%, #0050ee 40%, #06f 88%, #06f 93%, #005bff 95%, #003dd7 96%, #003dd7);
  --title-inactive: 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);
  --frame-active: linear-gradient(90deg, #0831d9, #166aee 30%, #0b4fe6 70%, #0831d9);
  --frame-inactive: #7b96df;
  --title-shadow: #0f1089;
  --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%);
  --tray: 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);
  --task: linear-gradient(180deg, #3c81f3 0%, #3b7ff1 45%, #3674ea 100%);
  --task-active: linear-gradient(180deg, #1941a5, #1e52b7 12%, #1c4fb3);
  --sm-head: linear-gradient(180deg, #1868ce 0%, #0e60cb 12%, #0e60cb 20%, #1164cf 32%, #1667cf 33%, #1b6cd3 47%, #1e70d9 54%, #2476dc 60%, #2b7ae1 65%, #3383e5 77%, #3a88e9 79%, #3f8def 90%, #3787ec 100%);
  --sm-foot: 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%, #1165d3 83%, #0f61cb 88%);
  --sm-border: #0e4fc0;
}

/* Pink Luna — Display Properties → Themes */
body.theme-pink {
  --title-active: linear-gradient(180deg, #ff9fd0, #f0529c 8%, #ec4897 40%, #ff5fae 88%, #ff5fae 93%, #f7559f 95%, #c42a73 96%, #c42a73);
  --title-inactive: linear-gradient(180deg, #f7b6d4, #eea3c6 10%, #e99bbf 50%, #efaacb 90%, #f3bfd7);
  --frame-active: linear-gradient(90deg, #b8246b, #ea4c98 30%, #d93a86 70%, #b8246b);
  --frame-inactive: #e9a0c2;
  --title-shadow: #7a0e41;
  --taskbar: linear-gradient(180deg, #7d1a4c 0, #c43b83 3%, #e5559c 6%, #ec67a6 10%, #e5589c 12%, #df4a92 15%, #d9408b 18%, #d63c88 20%, #d53a87 23%, #d63a87 38%, #db3f8c 54%, #df4590 86%, #dc428d 89%, #d43b86 92%, #c03179 95%, #a5286a 98%);
  --tray: linear-gradient(180deg, #a3245f 1%, #f06aa8 6%, #f882b8 10%, #ef6aa7 14%, #ea5d9f 19%, #e6559a 63%, #ec64a4 81%, #e95fa0 88%, #e55a9c 91%, #dc5294 94%, #cc4488 97%, #b12f73);
  --task: linear-gradient(180deg, #f070ae 0%, #ec67a8 45%, #e25b9d 100%);
  --task-active: linear-gradient(180deg, #9c2462, #b02d70 12%, #aa2a6c);
  --sm-head: linear-gradient(180deg, #d63c88 0%, #c42f7a 15%, #cf3a84 45%, #e25597 70%, #ec6aa6 100%);
  --sm-foot: linear-gradient(180deg, #e8629f 0%, #df5596 20%, #d44a8b 50%, #c83f80 80%, #b93574 100%);
  --sm-border: #b3286e;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
html, body { height: 100%; margin: 0; }
html { background: #000; }
body {
  overflow: hidden;
  font: 11px/1.35 var(--ui);
  color: #000;
  background: #000;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
img { -webkit-user-drag: none; -webkit-touch-callout: none; }
.dicon, .sc, #sticky, #taskbar { -webkit-touch-callout: none; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }
body.resizing, body.resizing * { cursor: inherit !important; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: #245edb; color: #fff; font: 16px var(--ui); padding: 20px; text-align: center; }

/* ---------------- desktop + live wallpaper ---------------- */
#desktop {
  position: fixed;
  left: 0; right: 0; top: 0;
  bottom: calc(var(--tb-h) + env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--sky) url(../assets/wallpaper.jpg) center / cover no-repeat;
}
#desktop[data-wall="static"] { background-image: url(../assets/wallpaper-full.jpg); }
#desktop[data-wall="static"] #scene > img,
#desktop[data-wall="static"] #sc-peppa img { opacity: 0; }
#desktop[data-wall="tiles"] { background: #ffc2dc url(../assets/peppa-head-sm.png) 0 0 / 92px repeat; }
#desktop[data-wall="pink"] { background: #ff8cc8; }
#desktop[data-wall="tiles"] #scene,
#desktop[data-wall="pink"] #scene { display: none; }

#scene { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.sc { position: absolute; pointer-events: auto; }
.sc-cloud {
  cursor: pointer;
  animation: drift var(--d, 44s) ease-in-out var(--delay, 0s) infinite alternate;
  will-change: transform;
}
.sc-cloud.puff { animation: drift var(--d, 44s) ease-in-out var(--delay, 0s) infinite alternate, puff .5s ease; }
@keyframes drift { from { transform: translateX(-5vw); } to { transform: translateX(5vw); } }
@keyframes puff { 40% { scale: 1.12 1.18; } }
#sc-sun { cursor: pointer; animation: spin 90s linear infinite; }
#sc-sun.whee { animation: spin 90s linear infinite, whee 1s cubic-bezier(.2, .8, .2, 1); }
@keyframes spin { to { rotate: 360deg; } }
@keyframes whee { 30% { scale: 1.2; filter: brightness(1.15) drop-shadow(0 0 30px #ffe066); } }

#sc-peppa { cursor: pointer; transform-origin: 50% 100%; }
#sc-peppa img {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 96%;
  animation: vibe 3.4s ease-in-out infinite;
}
#sc-peppa.dancing img { animation: dance var(--beat, 1s) ease-in-out infinite; }
#sc-peppa.pp-hop { animation: hop .55s cubic-bezier(.3, .7, .4, 1); }
#sc-peppa.pp-bighop { animation: bighop .95s cubic-bezier(.3, .7, .4, 1); }
@keyframes vibe {
  0%, 100% { transform: rotate(-1.2deg) scaleY(1); }
  50% { transform: rotate(1.2deg) scaleY(1.012); }
}
@keyframes dance {
  0%, 100% { transform: rotate(-5deg) translateY(0) scaleY(1); }
  25% { transform: rotate(0deg) translateY(-5%) scaleY(1.02); }
  50% { transform: rotate(5deg) translateY(0) scaleY(.97); }
  75% { transform: rotate(0deg) translateY(-5%) scaleY(1.02); }
}
@keyframes hop {
  20% { transform: scale(1.06, .93); }
  50% { transform: translateY(-13%) scale(.96, 1.05); }
  80% { transform: scale(1.04, .96); }
}
@keyframes bighop {
  15% { transform: scale(1.08, .9); }
  45% { transform: translateY(-34%) rotate(-6deg) scale(.95, 1.06); }
  62% { transform: translateY(0) scale(1.12, .86); }
  78% { transform: translateY(-6%) scale(.98, 1.03); }
}
.sc-hot { background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer; border-radius: 30%; }
.sc-hot:hover { background: radial-gradient(closest-side, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0)); }
.sc-hot:focus-visible { outline: 2px dashed #fff; outline-offset: 2px; }
#sc-notes { pointer-events: none; }
#sc-notes .note {
  position: absolute;
  bottom: 62%;
  font: bold calc(16px + 12px * var(--scene-s, 1)) / 1 Arial, sans-serif;
  color: var(--pink);
  text-shadow: 0 2px 0 #fff, 0 0 8px rgba(255, 255, 255, .8);
  animation: float-note 2.6s ease-out forwards;
}
#sc-notes .note.idle { font-size: calc(12px + 8px * var(--scene-s, 1)); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
@keyframes float-note {
  from { transform: translate(0, 0) rotate(-10deg); opacity: 0; }
  15% { opacity: 1; }
  to { transform: translate(var(--dx, 0), -130px) rotate(18deg); opacity: 0; }
}
#sc-puddle {
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, #9a6632 0%, #7a4b21 55%, #5c3515 100%);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18), inset 0 6px 10px rgba(255, 255, 255, .18);
  transform: scale(0);
  opacity: 0;
  transition: transform 1.2s ease, opacity 1.2s ease;
}
#sc-puddle.on { transform: scale(1); opacity: 1; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; }

.speech {
  --tail: 34px;
  --tail-y: 50%;
  position: absolute;
  z-index: 4;
  max-width: 250px;
  padding: 9px 13px;
  background: #fff;
  border: 2.5px solid #1b1b1b;
  border-radius: 18px;
  font: bold 14px/1.28 var(--comic);
  color: #1b1b1b;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .14);
  pointer-events: none;
  transform-origin: var(--tail) 100%;
}
.speech::before, .speech::after { content: ''; position: absolute; width: 0; height: 0; border: 0 solid transparent; }
/* default: bubble above the speaker, tail points down */
.speech::before { left: var(--tail); bottom: -17px; margin-left: -10px; border-width: 16px 10px 0; border-top-color: #1b1b1b; }
.speech::after { left: var(--tail); bottom: -11px; margin-left: -7px; border-width: 12px 7px 0; border-top-color: #fff; }
/* bubble below the speaker, tail points up */
.speech.below { transform-origin: var(--tail) 0; }
.speech.below::before { top: -17px; bottom: auto; border-width: 0 10px 16px; border-color: transparent transparent #1b1b1b; }
.speech.below::after { top: -11px; bottom: auto; border-width: 0 7px 12px; border-color: transparent transparent #fff; }
/* bubble to the left of the speaker, tail points right */
.speech.side { transform-origin: 100% var(--tail-y); }
.speech.side::before { left: auto; right: -17px; top: var(--tail-y); bottom: auto; margin: -10px 0 0; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #1b1b1b; }
.speech.side::after { left: auto; right: -11px; top: var(--tail-y); bottom: auto; margin: -7px 0 0; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff; }
.speech.pop { animation: pop-in .28s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } }

/* ---------------- desktop icons ---------------- */
#icons { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.dicon {
  position: absolute;
  width: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 2px 3px;
  border-radius: 3px;
  pointer-events: auto;
  outline: none;
  cursor: default;
}
.dicon-img { position: relative; width: 50px; height: 50px; }
.dicon-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(1px 2px 1.5px rgba(0, 0, 0, .3));
}
.dicon-label {
  max-width: 80px;
  padding: 1px 3px;
  color: #fff;
  font: 11px/1.25 var(--ui);
  text-align: center;
  text-shadow: 1px 1px 1px #000, 0 0 3px rgba(0, 0, 0, .55);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dicon:hover { background: rgba(255, 255, 255, .14); }
.dicon.selected { background: none; }
.dicon.selected .dicon-img img { filter: url(#xp-sel) drop-shadow(1px 2px 1.5px rgba(0, 0, 0, .3)); }
.dicon.selected .dicon-label { background: #0b61ff; text-shadow: none; -webkit-line-clamp: 4; }
.dicon:focus-visible .dicon-label { outline: 1px dotted #fff; outline-offset: 0; }
.dicon.dragging { opacity: .75; z-index: 5; }
.dicon.launch .dicon-img { animation: launch .42s ease; }
.dicon.poof { animation: poof .3s ease-in forwards; }
@keyframes launch { 30% { transform: scale(.82); } 65% { transform: scale(1.1); } }
@keyframes poof { to { transform: scale(0) rotate(25deg); opacity: 0; } }
#icons.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 2px 0;
  padding: 8px 4px;
  align-content: start;
}
#icons.grid .dicon { position: static; width: auto; }

#selrect {
  position: absolute;
  z-index: 6;
  border: 1px solid #3169c6;
  background: rgba(49, 105, 198, .25);
  pointer-events: none;
}

/* ---------------- sticky note with the CA ---------------- */
#sticky {
  position: absolute;
  z-index: 3;
  top: 250px;
  right: 22px;
  width: 204px;
  padding: 18px 14px 12px;
  background: linear-gradient(170deg, #fffbb9, #fff27a 70%, #ffe95c);
  color: #3b2f00;
  font: 13px/1.38 var(--comic);
  box-shadow: 2px 7px 14px rgba(0, 0, 0, .25);
  transform: rotate(2.2deg);
  cursor: grab;
  touch-action: none;
}
#sticky:active { cursor: grabbing; }
.st-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 72px;
  height: 22px;
  margin-left: -36px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(0, 0, 0, .06);
  transform: rotate(-5deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.st-title { display: block; font-size: 19px; margin-bottom: 4px; }
.st-row { margin: 3px 0; }
.st-ca { font: bold 12px var(--mono); background: rgba(255, 255, 255, .55); padding: 0 3px; border-radius: 2px; }
.st-copy, .st-buy {
  font: inherit;
  font-weight: bold;
  color: var(--pink-deep);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.st-copy:hover, .st-buy:hover { color: #9b1457; }
.st-scrawl { margin-top: 8px; font-size: 15px; color: var(--pink-deep); transform: rotate(-3deg); }

/* ---------------- windows ---------------- */
#windows { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
#windows > * { pointer-events: auto; }
.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 3px 3px;
  border-radius: 8px 8px 0 0;
  background: var(--frame-active);
  box-shadow: 2px 5px 18px rgba(0, 20, 60, .38), inset 0 0 0 1px rgba(0, 0, 50, .3);
  font: 11px/1.35 var(--ui);
  color: #000;
  touch-action: none;
}
.window:not(.active) { background: var(--frame-inactive); }
.window.auto-h { height: auto; max-height: 100%; }
.window.auto-h .window-body { overflow: auto; }
.window.maximized { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; padding: 0; }
.window.anim { transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease; }
.window.dragging { opacity: .96; }
.window.ghost { pointer-events: none !important; }
.window.shake { animation: shake .45s ease; }
@keyframes shake {
  10%, 90% { translate: -2px 0; }
  20%, 80% { translate: 4px 0; }
  30%, 50%, 70% { translate: -7px 0; }
  40%, 60% { translate: 7px 0; }
}
.titlebar {
  flex: none;
  height: 29px;
  margin: 0 -3px;
  padding: 0 5px 0 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 7px 7px 0 0;
  background: var(--title-active);
  color: #fff;
  cursor: default;
  touch-action: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.window:not(.active) .titlebar { background: var(--title-inactive); }
.window.maximized .titlebar { margin: 0; border-radius: 0; }
.tb-icon { width: 16px; height: 16px; flex: none; object-fit: contain; }
.tb-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: bold 13px/1 var(--title-font);
  letter-spacing: .2px;
  text-shadow: 1px 1px var(--title-shadow);
}
.window:not(.active) .tb-title { color: #dce6f8; text-shadow: none; }
.tb-btns { display: flex; gap: 2px; flex: none; }
.tb-btn {
  position: relative;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 3px;
  background: radial-gradient(circle at 90% 90%, #0054e9 0%, #2263d5 55%, #4479e4 70%, #a3bbec 90%, #fff 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
  cursor: pointer;
}
.tb-btn:hover { filter: brightness(1.18); }
.tb-btn:active { filter: brightness(.82); }
.window:not(.active) .tb-btn { opacity: .78; }
.tb-close { background: radial-gradient(circle at 90% 90%, #cc4600 0%, #dc6527 55%, #cd7546 70%, #ffccb2 90%, #fff 100%); }
.tb-min::before { content: ''; position: absolute; left: 4px; top: 12px; width: 8px; height: 3px; background: #fff; }
.tb-max::before { content: ''; position: absolute; left: 4px; top: 4px; width: 11px; height: 11px; border: 1px solid #fff; border-top-width: 3px; }
.window.maximized .tb-max::before { left: 3px; top: 7px; width: 8px; height: 8px; }
.window.maximized .tb-max::after { content: ''; position: absolute; left: 7px; top: 3px; width: 8px; height: 8px; border: 1px solid #fff; border-top-width: 2px; border-left: 0; border-bottom: 0; }
.tb-close::before, .tb-close::after { content: ''; position: absolute; left: 9px; top: 3px; width: 2px; height: 13px; background: #fff; transform: rotate(45deg); }
.tb-close::after { transform: rotate(-45deg); }
.tb-help::before { content: '?'; position: absolute; inset: 0; color: #fff; font: bold 13px/19px var(--ui); text-align: center; }
.window-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--face);
  touch-action: auto;
}
.rz { position: absolute; z-index: 3; touch-action: none; }
.rz-n { top: -3px; left: 8px; right: 8px; height: 6px; cursor: n-resize; }
.rz-s { bottom: -3px; left: 8px; right: 8px; height: 7px; cursor: s-resize; }
.rz-e { right: -3px; top: 8px; bottom: 8px; width: 7px; cursor: e-resize; }
.rz-w { left: -3px; top: 8px; bottom: 8px; width: 7px; cursor: w-resize; }
.rz-ne { right: -3px; top: -3px; width: 12px; height: 12px; cursor: ne-resize; }
.rz-nw { left: -3px; top: -3px; width: 12px; height: 12px; cursor: nw-resize; }
.rz-se { right: -3px; bottom: -3px; width: 14px; height: 14px; cursor: se-resize; }
.rz-sw { left: -3px; bottom: -3px; width: 12px; height: 12px; cursor: sw-resize; }
.window.maximized .rz { display: none; }

/* message boxes */
.dialog .window-body { padding: 0; }
.msg { display: flex; gap: 14px; align-items: flex-start; padding: 16px 16px 6px; }
.msg-icon { width: 34px; height: 34px; flex: none; }
.msg-text { min-width: 0; padding-top: 2px; font: 11px/1.5 var(--ui); overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.msg-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 10px 12px 14px; }
table.kv { border-collapse: collapse; }
table.kv td { padding: 2px 10px 2px 0; vertical-align: top; }
table.kv td:first-child { color: #444; white-space: nowrap; }

/* ---------------- XP controls ---------------- */
.btn {
  min-width: 75px;
  min-height: 23px;
  padding: 0 10px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #ecebe6 86%, #d6d0c5 100%);
  color: #000;
  font: 11px var(--ui);
  cursor: pointer;
  white-space: nowrap;
}
.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%); box-shadow: none; }
.btn:focus-visible, .btn.default { box-shadow: inset -1px 1px #cee7ff, inset 1px 2px #98b8ea, inset -2px 2px #bcd4f6, inset 1px -1px #89ade4, inset 2px -2px #89ade4; outline: none; }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.btn:disabled { color: #aca899; border-color: #c9c7ba; background: #f4f4f0; box-shadow: none; cursor: default; }
.btn.big { min-height: 30px; font-size: 12px; font-weight: bold; padding: 0 16px; }
.btn.pink { border-color: #9b1457; background: linear-gradient(180deg, #ffd6ea 0%, #ff8cc8 60%, #f06aa8 100%); color: #3b0020; }
.xp-input, .xp-select, .xp-textarea {
  border: 1px solid #7f9db9;
  background: #fff;
  font: 11px var(--ui);
  padding: 3px 4px;
  color: #000;
  border-radius: 0;
  outline: none;
}
.xp-input:focus, .xp-textarea:focus { border-color: #3169c6; }
.xp-check { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.xp-check input { width: 13px; height: 13px; margin: 0; accent-color: #1c5180; }
fieldset.group { border: 1px solid #d0d0bf; border-radius: 4px; padding: 8px 10px 10px; margin: 0 0 10px; }
fieldset.group > legend { color: #0046d5; padding: 0 3px; }
.tabbar { display: flex; flex-wrap: wrap; padding: 0 6px; position: relative; z-index: 1; }
.tab {
  position: relative;
  top: 2px;
  margin-right: -1px;
  padding: 3px 9px 3px;
  border: 1px solid #919b9c;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #fff, #ecebe5 70%, #d8d2c2);
  font: 11px var(--ui);
  cursor: pointer;
}
.tab:hover { box-shadow: inset 0 2px #ffc83c; }
.tab.active { top: 0; padding-bottom: 6px; background: #fcfcfe; box-shadow: inset 0 2px #e68b2c; z-index: 2; }
.tabpanel { flex: 1; min-height: 0; overflow: auto; background: #fcfcfe; border: 1px solid #919b9c; padding: 12px; box-shadow: 1px 1px 0 #d0d0bf; }
.progress { height: 16px; padding: 1px; border: 1px solid #686868; border-radius: 3px; background: #fff; overflow: hidden; }
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 8px, #fff 8px 10px),
    linear-gradient(180deg, #acedad 0%, #7be47d 14%, #4cda50 28%, #2ed330 42%, #42d845 57%, #76e275 71%, #8fe791 85%, #fff 100%);
  transition: width .25s linear;
}
.statusbar { flex: none; display: flex; gap: 2px; padding: 2px 2px 1px; background: var(--face); border-top: 1px solid #d8d2bd; }
.statusbar > span { flex: 1; min-width: 0; padding: 2px 6px; border: 1px solid; border-color: #aca899 #fff #fff #aca899; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statusbar > span.fit { flex: none; }
.menubar { flex: none; display: flex; flex-wrap: wrap; padding: 0 2px; background: var(--face); border-bottom: 1px solid #fff; box-shadow: 0 1px #d8d2bd; }
.menubar-item { padding: 3px 7px; border: 0; background: none; color: #000; font: 11px var(--ui); cursor: default; }
.menubar-item:hover, .menubar-item.open { background: var(--sel); color: #fff; }
.sunken { border: 1px solid; border-color: #7f9db9; background: #fff; }

/* XP scrollbars inside windows */
.window ::-webkit-scrollbar { width: 17px; height: 17px; }
.window ::-webkit-scrollbar-track { background: #f4f3ee; }
.window ::-webkit-scrollbar-thumb {
  border: 1px solid #fff;
  border-radius: 3px;
  background: linear-gradient(90deg, #cad8fb, #bccefa 40%, #b2c7f8 60%, #a9c0f5);
  box-shadow: inset 0 0 0 1px #8ba9ea;
}
.window ::-webkit-scrollbar-thumb:horizontal { background: linear-gradient(180deg, #cad8fb, #bccefa 40%, #b2c7f8 60%, #a9c0f5); }
.window ::-webkit-scrollbar-thumb:hover { background: #cfe0ff; }
.window ::-webkit-scrollbar-button:single-button {
  display: block;
  width: 17px;
  height: 17px;
  border: 1px solid #fff;
  border-radius: 3px;
  background: #c6d6fb center / 9px no-repeat;
  box-shadow: inset 0 0 0 1px #8ba9ea;
}
.window ::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9'%3E%3Cpath d='M1 6.5 4.5 3 8 6.5' fill='none' stroke='%234d6185' stroke-width='1.8'/%3E%3C/svg%3E"); }
.window ::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9'%3E%3Cpath d='M1 2.5 4.5 6 8 2.5' fill='none' stroke='%234d6185' stroke-width='1.8'/%3E%3C/svg%3E"); }
.window ::-webkit-scrollbar-button:single-button:horizontal:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9'%3E%3Cpath d='M6.5 1 3 4.5 6.5 8' fill='none' stroke='%234d6185' stroke-width='1.8'/%3E%3C/svg%3E"); }
.window ::-webkit-scrollbar-button:single-button:horizontal:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9'%3E%3Cpath d='M2.5 1 6 4.5 2.5 8' fill='none' stroke='%234d6185' stroke-width='1.8'/%3E%3C/svg%3E"); }
.window ::-webkit-scrollbar-corner { background: var(--face); }

/* ---------------- context menus ---------------- */
#menus { position: fixed; z-index: 9500; top: 0; left: 0; }
.ctx {
  position: fixed;
  min-width: 170px;
  padding: 2px;
  background: #fff;
  border: 1px solid #aca899;
  box-shadow: 2px 3px 6px rgba(0, 0, 0, .35);
  font: 11px var(--ui);
  color: #000;
  animation: menu-in .12s ease-out;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-3px); } }
.ctx-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 26px 0 4px;
  white-space: nowrap;
  cursor: default;
}
.ctx-item > img, .ctx-item > i { width: 16px; height: 16px; flex: none; }
.ctx-item > span { flex: 1; }
.ctx-item > kbd { font: inherit; color: inherit; opacity: .7; margin-left: 16px; }
.ctx-item:hover, .ctx-item.open { background: var(--sel); color: #fff; }
.ctx-item.bold > span { font-weight: bold; }
.ctx-item.checked > i::before { content: '✓'; display: block; text-align: center; font-weight: bold; }
.ctx-item.disabled, .ctx-item.disabled:hover { color: #aca899; background: none; }
.ctx-item.has-sub::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 7px;
  border: 4px solid transparent;
  border-left-color: currentColor;
  border-right: 0;
}
.ctx-sep { height: 1px; margin: 3px 2px; background: #aca899; }

/* ---------------- taskbar ---------------- */
#taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9000;
  height: calc(var(--tb-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  align-items: stretch;
  background: var(--taskbar);
  font: 11px var(--ui);
  color: #fff;
}
#start {
  flex: none;
  height: var(--tb-h);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 24px 0 9px;
  border: 0;
  border-radius: 0 12px 12px 0;
  background:
    radial-gradient(ellipse at 30% -10%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #3c9b39 0%, #4db04a 12%, #3f9e3c 45%, #338a31 80%, #2a7428 100%);
  box-shadow: inset -2px 0 3px rgba(0, 0, 0, .3), inset 0 -2px 3px rgba(0, 0, 0, .2), 2px 0 3px rgba(0, 0, 0, .25);
  color: #fff;
  font: italic bold 18px/1 "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .6);
  cursor: pointer;
}
#start img { width: 24px; height: 24px; margin-top: -1px; filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, .4)); }
#start:hover { filter: brightness(1.1); }
#start.pressed, #start:active { filter: brightness(.88); box-shadow: inset 1px 2px 4px rgba(0, 0, 0, .45); }
#quick { flex: none; display: flex; align-items: center; gap: 1px; padding: 0 6px 0 8px; border-right: 1px solid rgba(0, 0, 0, .25); box-shadow: 1px 0 rgba(255, 255, 255, .18); }
.ql { width: 24px; height: 24px; padding: 2px; border: 1px solid transparent; border-radius: 3px; background: none; cursor: pointer; }
.ql img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ql:hover { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); }
#tasks { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; padding: 0 6px; overflow: hidden; }
.task {
  flex: 0 1 160px;
  min-width: 34px;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid rgba(0, 0, 0, .28);
  border-radius: 3px;
  background: var(--task);
  box-shadow: inset 1px 1px rgba(255, 255, 255, .3), inset -1px -1px rgba(0, 0, 0, .18);
  color: #fff;
  font: 11px var(--ui);
  text-align: left;
  cursor: pointer;
  animation: task-in .2s ease-out;
}
@keyframes task-in { from { opacity: 0; transform: translateY(6px); } }
.task img { width: 16px; height: 16px; flex: none; object-fit: contain; }
.task span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.task:hover { filter: brightness(1.12); }
.task.active { background: var(--task-active); box-shadow: inset 1px 1px 3px rgba(0, 0, 0, .5); }
#ticker {
  flex: 0 1 300px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin: 3px 6px 3px 0;
  border-radius: 3px;
  background: rgba(0, 0, 20, .28);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, .4);
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; align-items: center; gap: 10px; white-space: nowrap; animation: ticker 48s linear infinite; font: bold 11px var(--ui); color: #d8ffd6; padding-left: 10px; }
.ticker-track i { font-style: normal; color: #ff9fd0; }
#ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
#tray {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px 0 12px;
  background: var(--tray);
  border-left: 1px solid rgba(0, 0, 60, .5);
  box-shadow: inset 1px 0 1px rgba(160, 230, 255, .55);
}
.tray-btn { width: 20px; height: 20px; padding: 1px; border: 0; background: none; cursor: pointer; border-radius: 2px; }
.tray-btn img { display: block; width: 100%; height: 100%; }
.tray-btn:hover { background: rgba(255, 255, 255, .15); }
#clock { margin-left: 4px; padding: 0 2px; border: 0; background: none; color: #fff; font: 11px var(--ui); white-space: nowrap; cursor: default; }

/* ---------------- start menu ---------------- */
#startmenu {
  position: fixed;
  left: 0;
  bottom: calc(var(--tb-h) + env(safe-area-inset-bottom));
  z-index: 9100;
  width: 392px;
  max-width: 100vw;
  max-height: calc(100% - var(--tb-h) - env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--sm-border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--sm-foot);
  box-shadow: 3px -2px 16px rgba(0, 0, 0, .45);
  font: 11px var(--ui);
  transform-origin: 0 100%;
  animation: sm-in .16s cubic-bezier(.2, .9, .3, 1);
}
@keyframes sm-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.sm-head {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  background: var(--sm-head);
  color: #fff;
  font: bold 15px var(--title-font);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .5);
}
.sm-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, rgba(244, 163, 83, 0), #f4a353 30%, #f4a353 70%, rgba(244, 163, 83, 0)); }
.sm-avatar { width: 46px; height: 46px; flex: none; border: 2px solid #fff; border-radius: 4px; background: var(--sky); overflow: hidden; box-shadow: 1px 1px 3px rgba(0, 0, 0, .45); }
.sm-avatar img { width: 100%; height: 100%; display: block; }
.sm-cols { flex: 1; min-height: 0; display: flex; overflow: auto; }
.sm-left { flex: 1.08; display: flex; flex-direction: column; min-width: 0; padding: 6px 0; background: #fff; }
.sm-right { flex: 1; min-width: 0; padding: 6px 0; background: #d3e5fa; border-left: 1px solid #95bdee; }
.sm-item { display: flex; align-items: center; gap: 7px; width: 100%; padding: 3px 8px; border: 0; background: none; color: #000; font: 11px var(--ui); text-align: left; cursor: pointer; }
.sm-item img { width: 26px; height: 26px; flex: none; object-fit: contain; }
.sm-item.big img { width: 34px; height: 34px; }
.sm-item.big b { font-size: 12px; }
.sm-label { display: flex; flex-direction: column; min-width: 0; }
.sm-label b { font-weight: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-item.big .sm-label b { font-weight: bold; }
.sm-label small { color: #777; font-size: 10px; }
.sm-right .sm-item { color: #0a246a; }
.sm-right .sm-item b { font-weight: bold; }
.sm-right .sm-item img { width: 24px; height: 24px; }
.sm-item:hover { background: var(--sel); color: #fff; }
.sm-item:hover small { color: #dfe8ff; }
.sm-sep { height: 1px; margin: 4px 10px; background: linear-gradient(90deg, rgba(0, 0, 0, 0), #cfcfcf 20%, #cfcfcf 80%, rgba(0, 0, 0, 0)); flex: none; }
.sm-right .sm-sep { background: linear-gradient(90deg, rgba(0, 0, 0, 0), #97b5e8 20%, #97b5e8 80%, rgba(0, 0, 0, 0)); }
.sm-all { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto; padding: 6px 8px; border: 0; background: none; font: bold 11px var(--ui); cursor: pointer; }
.sm-all:hover { background: var(--sel); color: #fff; }
.sm-arrow { width: 18px; height: 18px; border-radius: 3px; background: linear-gradient(180deg, #56b34c, #2f8a24); position: relative; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.sm-arrow::after { content: ''; position: absolute; left: 7px; top: 4px; border: 5px solid transparent; border-left: 6px solid #fff; border-right: 0; }
.sm-foot { flex: none; display: flex; justify-content: flex-end; gap: 4px; padding: 5px 8px; }
.sm-foot button { display: flex; align-items: center; gap: 5px; padding: 3px 6px; border: 0; border-radius: 3px; background: none; color: #fff; font: 11px var(--ui); cursor: pointer; }
.sm-foot button:hover { background: rgba(255, 255, 255, .16); }
.sm-foot img { width: 24px; height: 24px; }

/* ---------------- balloon, tooltip ---------------- */
#balloon {
  position: fixed;
  right: 12px;
  bottom: calc(var(--tb-h) + 16px + env(safe-area-inset-bottom));
  z-index: 9200;
  width: 290px;
  max-width: calc(100vw - 24px);
  padding: 8px 26px 10px 10px;
  border: 1px solid #000;
  border-radius: 8px;
  background: #ffffe1;
  box-shadow: 2px 3px 8px rgba(0, 0, 0, .35);
  color: #000;
  font: 11px/1.4 var(--ui);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
#balloon.show { opacity: 1; transform: none; }
#balloon.clickable { cursor: pointer; }
#balloon::before { content: ''; position: absolute; right: 44px; bottom: -17px; border-left: 17px solid transparent; border-top: 17px solid #000; }
#balloon::after { content: ''; position: absolute; right: 45px; bottom: -15px; border-left: 15px solid transparent; border-top: 15px solid #ffffe1; }
.bl-title { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.bl-title img { width: 16px; height: 16px; }
.bl-x { position: absolute; top: 5px; right: 5px; width: 16px; height: 16px; padding: 0; border: 1px solid #b9b9a0; border-radius: 3px; background: #fff; font: bold 12px/12px Arial, sans-serif; cursor: pointer; }
.bl-x:hover { background: #e3342f; border-color: #8f1512; color: #fff; }
.xp-tip {
  position: fixed;
  z-index: 9800;
  padding: 2px 6px;
  border: 1px solid #000;
  background: #ffffe1;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, .3);
  color: #000;
  font: 11px var(--ui);
  pointer-events: none;
  animation: fade-in .15s;
}

/* ---------------- Clippig ---------------- */
#assistant {
  position: fixed;
  right: 14px;
  bottom: calc(var(--tb-h) + 8px + env(safe-area-inset-bottom));
  z-index: 9050;
  width: 262px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}
#assistant > * { pointer-events: auto; }
#assistant.in { animation: as-in .45s cubic-bezier(.3, 1.5, .5, 1); }
#assistant.out { animation: as-out .25s ease-in forwards; }
@keyframes as-in { from { opacity: 0; transform: translateY(30px) scale(.7); } }
@keyframes as-out { to { opacity: 0; transform: translateY(20px) scale(.8); } }
.as-bubble {
  position: relative;
  width: 100%;
  margin: 0 26px 12px 0;
  padding: 10px 14px 10px 12px;
  border: 1px solid #000;
  border-radius: 10px;
  background: #ffffcc;
  box-shadow: 2px 3px 6px rgba(0, 0, 0, .3);
  color: #000;
  font: 11px/1.45 var(--ui);
}
.as-bubble::before { content: ''; position: absolute; right: 38px; bottom: -15px; border-right: 15px solid transparent; border-top: 15px solid #000; }
.as-bubble::after { content: ''; position: absolute; right: 39px; bottom: -13px; border-right: 13px solid transparent; border-top: 13px solid #ffffcc; }
.as-x { position: absolute; top: 3px; right: 4px; width: 15px; height: 15px; padding: 0; border: 0; background: none; font: bold 14px/14px Arial, sans-serif; color: #555; cursor: pointer; }
.as-x:hover { color: #000; }
.as-opts { margin-top: 6px; }
.as-opt { display: flex; align-items: flex-start; gap: 6px; width: 100%; padding: 3px 2px; border: 0; background: none; color: #000; font: 11px/1.35 var(--ui); text-align: left; cursor: pointer; }
.as-opt i { width: 9px; height: 9px; margin-top: 3px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9cf, #0a4ec2); }
.as-opt:hover span { color: #0b61ff; text-decoration: underline; }
.as-char { width: 92px; height: 138px; margin-right: 6px; padding: 0; border: 0; background: none; cursor: pointer; animation: bob 2.8s ease-in-out infinite; filter: drop-shadow(2px 5px 3px rgba(0, 0, 0, .35)); }
.clippig { display: block; width: 100%; height: 100%; overflow: visible; }
.cp-lids ellipse { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); animation: cp-blink 4.6s infinite; }
.cp-pupils { animation: look 7s ease-in-out infinite; }
#assistant.talk .cp-brows { animation: brows .7s ease; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes cp-blink { 0%, 93%, 100% { transform: scaleY(0); } 96% { transform: scaleY(1); } }
@keyframes look { 0%, 40%, 100% { transform: translate(0, 0); } 50%, 68% { transform: translate(-5px, 1px); } 78% { transform: translate(3px, -1px); } }
@keyframes brows { 30%, 60% { transform: translateY(-5px); } }

/* ---------------- sparks + fx ---------------- */
#sparks { position: fixed; inset: 0; z-index: 9690; pointer-events: none; overflow: hidden; }
.spark { position: absolute; font-size: 13px; line-height: 1; transform: translate(-50%, -50%); text-shadow: 0 0 5px rgba(255, 255, 255, .9); animation: spark .7s ease-out forwards; }
@keyframes spark { to { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), 14px) scale(.3) rotate(90deg); } }
#fx { position: fixed; inset: 0; z-index: 9700; width: 100%; height: 100%; pointer-events: none; }
#saver { position: fixed; inset: 0; z-index: 9800; width: 100%; height: 100%; cursor: none; background: #05050d; }

/* ---------------- boot, login, shutdown screens ---------------- */
.screen { position: fixed; inset: 0; z-index: 10000; overflow: hidden; }
.screen.fade-out { animation: fade-out .48s ease forwards; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; visibility: hidden; } }
@keyframes blink { 50% { opacity: 0; } }
.screen.bios { background: #000; color: #c8c8c8; padding: 22px 26px; font: 19px/1.22 "VT323", "Lucida Console", monospace; }
.bios-text { margin: 0; font: inherit; white-space: pre-wrap; }
.bios-pig { position: absolute; top: 20px; right: 24px; width: 96px; height: 96px; image-rendering: pixelated; }
.bios-skip { position: absolute; left: 26px; bottom: 18px; color: #777; animation: blink 1.1s steps(1) infinite; }
.screen.xpboot { background: #000; color: #fff; display: flex; align-items: center; justify-content: center; font-family: Tahoma, var(--ui); }
.xpb-center { display: flex; flex-direction: column; align-items: center; margin-top: -50px; }
.xpb-logo { display: flex; align-items: center; gap: 10px; }
.xpb-logo img { width: 104px; height: 104px; }
.xpb-word small { display: block; margin: 0 0 -2px 4px; font: 13px Tahoma, sans-serif; color: #ddd; }
.xpb-word b { font: bold 54px/1 "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif; letter-spacing: -1px; }
.xpb-word sup, .lg-logo sup { color: #f5812a; font-style: italic; font-size: .42em; margin-left: 3px; vertical-align: super; }
.xpb-ed { margin: 2px 0 50px 120px; font: italic 15px Tahoma, sans-serif; color: #ddd; }
.xpb-bar { width: 132px; height: 15px; padding: 2px; border: 2px solid #b2b2b2; border-radius: 4px; overflow: hidden; }
.xpb-bar span { display: flex; gap: 2px; width: 30px; height: 100%; animation: xpload 2.2s linear infinite; }
.xpb-bar i { flex: 1; border-radius: 1px; background: linear-gradient(180deg, #ffd1e8, #ff5fa8 45%, #c42a73); }
@keyframes xpload { from { transform: translateX(-34px); } to { transform: translateX(134px); } }
.xpb-foot { position: absolute; left: 28px; right: 28px; bottom: 24px; display: flex; justify-content: space-between; align-items: flex-end; color: #bbb; font: 12px Tahoma, sans-serif; }
.xpb-foot b { font: italic bold 20px Tahoma, sans-serif; color: #fff; }

.screen.login { display: flex; flex-direction: column; background: #5a7edc; color: #fff; font-family: Tahoma, var(--ui); }
.lg-top, .lg-bot { position: relative; flex: none; height: 80px; background: #00309c; }
.lg-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, #00309c, #6d8fe0 30%, #fff 50%, #6d8fe0 70%, #00309c); }
.lg-bot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 30px; }
.lg-bot::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, #00309c, #f99736 35%, #fbc27d 50%, #f99736 65%, #00309c); }
.lg-mid { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 8% 10%, #a3bff3 0, rgba(163, 191, 243, 0) 38%), #5a7edc; }
.lg-left { flex: 1; display: flex; flex-direction: column; align-items: flex-end; padding-right: 38px; text-align: right; }
.lg-logo { display: flex; align-items: center; gap: 10px; text-align: left; }
.lg-logo img { width: 78px; height: 78px; filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, .3)); }
.lg-logo b { display: block; font: bold 38px/1 "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif; letter-spacing: -1px; }
.lg-logo small { display: block; font: italic 13px Tahoma, sans-serif; opacity: .9; }
.lg-left p { margin: 20px 0 0; font-size: 17px; }
.lg-div { width: 1px; align-self: stretch; margin: 40px 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .85) 40%, rgba(255, 255, 255, .85) 60%, rgba(255, 255, 255, 0)); }
.lg-right { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-left: 38px; }
.lg-user { display: flex; align-items: center; gap: 12px; min-width: 250px; padding: 6px 34px 6px 6px; border: 0; border-radius: 8px; background: transparent; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.lg-user:hover, .lg-user:focus-visible, .lg-user.picked { background: linear-gradient(90deg, #0f3fa0, rgba(15, 63, 160, 0)); outline: none; }
.lg-av { width: 60px; height: 60px; flex: none; overflow: hidden; border: 2px solid #fff; border-radius: 5px; background: var(--sky); box-shadow: 1px 1px 3px rgba(0, 0, 0, .4); }
.lg-av img { display: block; width: 100%; height: 100%; }
.lg-user:hover .lg-av, .lg-user.picked .lg-av, .lg-user:focus-visible .lg-av { border-color: #ffc83c; }
.lg-name b { display: block; font-size: 20px; font-weight: normal; }
.lg-name small { font-size: 12px; opacity: .92; }
.lg-user.off { opacity: .82; }
.lg-user.off .lg-av img { filter: grayscale(1); }
.lg-user.shake { animation: shake .45s ease; }
.lg-err { max-width: 280px; margin-left: 78px; padding: 6px 10px; border-radius: 4px; background: #fff7cc; color: #000; font-size: 12px; animation: fade-in .2s; }
.lg-off { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: #fff; font: 14px Tahoma, sans-serif; cursor: pointer; }
.lg-off img { width: 28px; height: 28px; }
.lg-off:hover span { text-decoration: underline; }
.lg-bot p { margin: 0; max-width: 380px; font-size: 12px; text-align: right; opacity: .95; }
.login.welcome .lg-mid { justify-content: flex-start; padding-left: 14%; }
.lg-welcome { font: italic bold 76px/1 "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif; text-shadow: 2px 3px 5px rgba(0, 0, 0, .35); animation: fade-in .6s; }
.lg-saving { display: flex; align-items: center; gap: 16px; font-size: 22px; animation: fade-in .4s; }
.lg-saving img { width: 66px; height: 66px; }
.screen.safe { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 20px; background: #000; color: #f5812a; font: 32px/1.2 "VT323", "Lucida Console", monospace; text-align: center; }
.safe-sub { color: #888; font-size: 21px; }
.safe-on { padding: 8px 20px; border: 1px solid #555; border-radius: 4px; background: #1b1b1b; color: #fff; font: 22px "VT323", monospace; cursor: pointer; }
.safe-on:hover { background: #2c2c2c; }

#bsod {
  position: fixed;
  inset: 0;
  z-index: 9900;
  overflow: auto;
  padding: 3vh 4vw;
  background: #c9186f;
  color: #fff;
  font: clamp(11px, 1.5vw, 17px)/1.32 "Lucida Console", "VT323", monospace;
  cursor: none;
}
#bsod pre { margin: 0; font: inherit; white-space: pre-wrap; }
.blink { animation: blink 1s steps(1) infinite; }

body.dim #desktop, body.dim #taskbar, body.dim #assistant, body.dim #balloon { filter: grayscale(1) brightness(.85); transition: filter 1.4s ease; }
.off-overlay { position: fixed; inset: 0; z-index: 9600; display: grid; place-items: center; background: rgba(0, 0, 0, .15); }
.off-dlg { width: 316px; max-width: 94vw; overflow: hidden; border-radius: 6px; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); font-family: Tahoma, var(--ui); animation: pop-in .25s cubic-bezier(.3, 1.4, .5, 1); }
.off-head { height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; background: #00309c; color: #fff; font-size: 18px; }
.off-head img { width: 36px; height: 36px; }
.off-body { display: flex; justify-content: space-around; padding: 24px 10px 22px; background: linear-gradient(180deg, #7ea0ea, #5e84dd); }
.off-body button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: #fff; font: 12px Tahoma, sans-serif; cursor: pointer; }
.off-ico { position: relative; width: 40px; height: 40px; border: 1px solid #fff; border-radius: 6px; box-shadow: 1px 1px 3px rgba(0, 0, 0, .3); }
.off-ico.standby { background: linear-gradient(135deg, #ffe38a, #e6a800); }
.off-ico.off { background: linear-gradient(135deg, #ff8c6b, #d63a12); }
.off-ico.restart { background: linear-gradient(135deg, #8de07c, #2f9c1f); }
.off-ico::before { content: ''; position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; border: 3px solid #fff; border-top-color: transparent; border-radius: 50%; }
.off-ico::after { content: ''; position: absolute; left: 18px; top: 7px; width: 3px; height: 12px; border-radius: 2px; background: #fff; }
.off-body button:hover .off-ico { filter: brightness(1.15); box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.off-foot { display: flex; justify-content: flex-end; padding: 8px 12px; background: #00309c; }
.standby-screen { position: fixed; inset: 0; z-index: 9990; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #000; color: #666; font: 14px Tahoma, sans-serif; animation: fade-in 1s; cursor: none; }
.zzz { font: bold 46px var(--comic); color: #ff8cc8; }
.zzz span { display: inline-block; animation: zz 1.8s ease-in-out infinite; }
.zzz span:last-child { animation-delay: .3s; }
@keyframes zz { 50% { transform: translateY(-10px); opacity: .5; } }

/* ---------------- desktop reveal after login ---------------- */
body.reveal .dicon { animation: icon-in .5s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: calc(var(--i) * 55ms + 120ms); }
body.reveal #taskbar { animation: tb-in .5s cubic-bezier(.2, .9, .3, 1) both; }
body.reveal #sticky { animation: sticky-in .6s cubic-bezier(.3, 1.4, .5, 1) .9s both; }
body.reveal #scene { animation: fade-in .7s both; }
@keyframes icon-in { from { opacity: 0; transform: scale(.4) translateY(18px); } }
@keyframes tb-in { from { transform: translateY(100%); } }
@keyframes sticky-in { from { opacity: 0; transform: translateY(-40px) rotate(-12deg) scale(.8); } }

/* ---------------- phones & small screens ---------------- */
@media (max-width: 720px), (max-height: 480px) {
  :root { --tb-h: 42px; }
  .window { font-size: 13px; }
  .titlebar { height: 34px; }
  .tb-btn { width: 30px; height: 27px; }
  .tb-max { display: none; }
  .tb-min::before { left: 9px; top: 16px; }
  .tb-max::before { left: 8px; top: 6px; }
  .tb-close::before, .tb-close::after { left: 13px; top: 5px; height: 15px; }
  .tb-title { font-size: 14px; }
  .btn { min-height: 32px; font-size: 13px; }
  .menubar-item { padding: 6px 9px; font-size: 13px; }
  .ctx-item { height: 34px; font-size: 13px; }
  .ctx-item.has-sub::after { top: 13px; }
  .msg-text { font-size: 13px; }
  .xp-input, .xp-select, .xp-textarea { font-size: 16px; }
  #start { padding: 0 16px 0 8px; font-size: 19px; }
  #start img { width: 28px; height: 28px; }
  #quick, #ticker { display: none; }
  #tasks { padding: 0 4px; gap: 3px; }
  .task { flex: 0 0 40px; height: 32px; justify-content: center; padding: 0; }
  .task span { display: none; }
  .task img { width: 22px; height: 22px; }
  #tray { padding: 0 8px; gap: 3px; }
  .tray-btn { width: 26px; height: 26px; padding: 3px; }
  #clock { font-size: 12px; }
  #startmenu { width: 100%; border-radius: 10px 10px 0 0; }
  .sm-item { padding: 6px 8px; font-size: 12.5px; }
  .sm-foot button { font-size: 12.5px; padding: 6px 8px; }
  .dicon-img { width: 46px; height: 46px; }
  .dicon-label { font-size: 11px; }
  .dicon:hover { background: none; }
  #sticky {
    top: auto !important;
    left: 50% !important;
    right: auto !important;
    bottom: 10px;
    width: min(92vw, 380px);
    padding: 12px 12px 9px;
    transform: translateX(-50%) rotate(-1deg);
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    font-size: 13px;
    cursor: default;
  }
  #sticky .st-title { grid-row: span 3; align-self: center; font-size: 17px; }
  #sticky .st-scrawl { display: none; }
  #balloon { left: 8px; right: 8px; width: auto; }
  #assistant { right: 6px; width: min(250px, calc(100vw - 20px)); }
  .as-char { width: 70px; height: 105px; }
  .as-bubble, .as-opt { font-size: 12.5px; }
  .speech { font-size: 13px; max-width: 200px; }
  .lg-mid { flex-direction: column; justify-content: center; gap: 18px; padding: 16px; }
  .lg-left { flex: none; align-items: center; padding: 0; text-align: center; }
  .lg-left p { margin-top: 10px; font-size: 15px; }
  .lg-logo img { width: 58px; height: 58px; }
  .lg-logo b { font-size: 30px; }
  .lg-div { width: 70%; height: 1px; align-self: center; margin: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .85) 40%, rgba(255, 255, 255, .85) 60%, rgba(255, 255, 255, 0)); }
  .lg-right { flex: none; align-items: stretch; padding: 0; width: 100%; max-width: 320px; }
  .lg-user { min-width: 0; }
  .lg-err { margin-left: 0; }
  .lg-top, .lg-bot { height: 64px; }
  .lg-bot { padding: 0 14px; }
  .lg-bot p { font-size: 10.5px; }
  .login.welcome .lg-mid { padding-left: 16px; align-items: center; }
  .lg-welcome { font-size: 54px; }
  .xpb-logo img { width: 72px; height: 72px; }
  .xpb-word b { font-size: 40px; }
  .xpb-ed { margin-left: 80px; }
  .screen.bios { font-size: 15px; padding: 14px; }
  .bios-pig { width: 56px; height: 56px; top: 12px; right: 12px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .lg-top, .lg-bot { height: 44px; }
  .lg-mid { flex-direction: row; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
