/* =========================================================
   Billy Bux XP — Luna-style theme (hand-made, no Microsoft assets)
   ========================================================= */
:root {
  --face: #ece9d8;
  --text: #000;
  --sel: #316ac5;
  --field-border: #7f9db9;
  --task-h: 30px;
  --ui: Tahoma, Verdana, "DejaVu Sans", "Segoe UI", sans-serif;
  --title: "Trebuchet MS", Tahoma, Verdana, sans-serif;
  font-family: var(--ui);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: #3a6ea5; color: var(--text); font-size: 11px; }
button { font: inherit; color: inherit; cursor: default; }
img { -webkit-user-drag: none; }
[hidden] { display: none !important; }
svg.i { display: block; flex: none; overflow: visible; }

/* ---------- Boot ---------- */
#boot { position: fixed; inset: 0; z-index: 9999; background: #000; color: #fff; display: grid; place-items: center; }
.boot-inner { text-align: center; }
.boot-logo { height: 110px; filter: drop-shadow(0 0 18px rgba(120,255,120,.35)); }
.boot-title { font: 300 40px/1 var(--title); margin-top: 10px; }
.boot-title sup, .lg-logo sup { color: #ff8a1c; font-style: italic; font-weight: 800; font-size: .55em; margin-left: 4px; }
.boot-sub { opacity: .65; margin: 6px 0 34px; font-size: 13px; }
.boot-bar { width: 170px; height: 18px; margin: 0 auto; border: 2px solid #b2b2b2; border-radius: 5px; overflow: hidden; position: relative; }
.boot-bar span { position: absolute; top: 2px; width: 9px; height: 10px; border-radius: 2px; background: linear-gradient(#c8dcff, #2c6fe0 50%, #1640a0); animation: slide 1.7s linear infinite; }
.boot-bar span:nth-child(2) { animation-delay: .11s; }
.boot-bar span:nth-child(3) { animation-delay: .22s; }
@keyframes slide { from { left: -30px; } to { left: 180px; } }
.boot-foot { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: 11px; opacity: .45; padding: 0 16px; }

/* ---------- Welcome / login screen ---------- */
#login { position: fixed; inset: 0; z-index: 9998; display: flex; flex-direction: column; background: #5a7edc; color: #fff; }
.lg-top { height: 12%; background: #00309c; border-bottom: 2px solid; border-image: linear-gradient(90deg, #00309c, #fff 50%, #00309c) 1; }
.lg-mid { flex: 1; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 15% 20%, #9cb6f2 0, #5a7edc 45%); }
.lg-left { flex: 1; text-align: right; padding: 0 28px; border-right: 1px solid rgba(255,255,255,.6); }
.lg-logo { font: 300 38px/1 var(--title); }
.lg-left p { font-size: 15px; margin: 18px 0 0; }
.lg-right { flex: 1; padding: 0 28px; }
.lg-user { display: flex; align-items: center; gap: 14px; background: none; border: 0; padding: 8px; border-radius: 6px; color: #fff; cursor: pointer; text-align: left; }
.lg-user:hover, .lg-user:focus-visible { background: linear-gradient(90deg, #00309c, transparent); outline: none; }
.lg-user img { width: 58px; height: 58px; border: 2px solid #fff; border-radius: 5px; background: #fff; }
.lg-user b { display: block; font-size: 20px; font-weight: 400; }
.lg-user small { font-size: 12px; opacity: .85; }
.lg-bot { height: 12%; display: flex; align-items: center; gap: 8px; padding: 0 24px; font-size: 13px; background: #00309c; border-top: 2px solid #f99736; }
.lg-off svg { width: 24px; height: 24px; }
.lg-hint { margin-left: auto; max-width: 300px; font-size: 11px; opacity: .8; text-align: right; }
@media (max-width: 640px) {
  .lg-mid { flex-direction: column; gap: 24px; }
  .lg-left { flex: none; text-align: center; border: 0; }
  .lg-right { flex: none; }
  .lg-hint { display: none; }
}

/* ---------- Desktop: rolling green hill ---------- */
#desktop {
  position: fixed; inset: 0 0 var(--task-h) 0; overflow: hidden;
  background: #3f8ce8 url("assets/hill.webp") center 58% / cover no-repeat;
}

.icons { position: absolute; top: 8px; left: 4px; z-index: 1; display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 78px); max-height: calc(100% - 12px); gap: 2px 0; }
.icon { width: 88px; padding: 2px; border: 0; background: none; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.icon svg { width: 34px; height: 34px; filter: drop-shadow(1px 2px 1px rgba(0,0,0,.35)); }
.icon .lbl { padding: 1px 3px; text-shadow: 1px 1px 1px #000, 0 0 2px #000; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.icon:focus-visible { outline: none; }
.icon:focus-visible svg, .icon:active svg { filter: drop-shadow(1px 2px 1px rgba(0,0,0,.35)) brightness(.7) sepia(1) hue-rotate(180deg) saturate(3); }
.icon:focus-visible .lbl, .icon:active .lbl { background: var(--sel); text-shadow: none; outline: 1px dotted #fff; }

/* ---------- Luna windows ---------- */
.window {
  position: absolute; display: none; flex-direction: column;
  min-width: 250px; max-width: calc(100vw - 8px); max-height: calc(100% - 8px);
  background: var(--face); padding: 0 3px 3px;
  border-radius: 8px 8px 0 0;
  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.open { display: flex; }
.window.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; max-width: none; max-height: none; border-radius: 0; }
.titlebar {
  display: flex; align-items: center; gap: 4px; height: 26px; margin: 0 -3px; padding: 0 5px 0 6px;
  border-radius: 7px 7px 0 0; user-select: none; touch-action: none;
  background: linear-gradient(180deg, #0997ff, #0053ee 8%, #0050ee 40%, #06f 88%, #06f 93%, #005bff 95%, #003dd7 96%, #003dd7);
  color: #fff; font: bold 13px var(--title); text-shadow: 1px 1px #0f1089;
}
.window:not(.active) .titlebar { background: linear-gradient(180deg, #a6c0f5, #7e9fe6 10%, #7b9de4 40%, #8aa9ec 88%, #7c9be0 96%, #6c8bd6); color: #d8e4f8; text-shadow: none; }
.titlebar svg { width: 16px; height: 16px; }
.t-txt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 2px; }
.t-btns { display: flex; gap: 2px; }
.t-btns button {
  width: 21px; height: 21px; padding: 0; border: 1px solid #fff; border-radius: 3px; position: relative;
  background: radial-gradient(circle at 90% 90%, #0054e9 0%, #2263d5 55%, #4479e4 80%, #a3bbec 100%);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.25);
}
.t-btns button:hover { filter: brightness(1.18); }
.t-btns button:active { filter: brightness(.85); }
.t-btns .x { background: radial-gradient(circle at 90% 90%, #cc4600 0%, #dc6527 55%, #cd7546 80%, #ffb89e 100%); }
.t-btns button::before, .t-btns button::after { content: ""; position: absolute; background: #fff; }
.t-btns .min::before { left: 5px; bottom: 4px; width: 7px; height: 3px; }
.t-btns .mx::before { left: 4px; top: 4px; width: 11px; height: 11px; background: none; border: 1px solid #fff; border-top-width: 3px; }
.t-btns .x::before, .t-btns .x::after { left: 9px; top: 3px; width: 2px; height: 13px; transform: rotate(45deg); }
.t-btns .x::after { transform: rotate(-45deg); }
.window:not(.active) .t-btns button { opacity: .75; }

.menubar { display: flex; gap: 0; padding: 1px 0; border-bottom: 1px solid #fff; box-shadow: 0 1px #aca899; margin-bottom: 1px; }
.menubar span { padding: 2px 7px; }
.menubar span:hover { background: var(--sel); color: #fff; }
.body { overflow: auto; flex: 1; min-height: 0; }
.pad { padding: 10px; }

/* ---------- Controls ---------- */
.xp-btn {
  min-width: 75px; height: 23px; padding: 0 10px; border: 1px solid #003c74; border-radius: 3px; color: #000;
  background: linear-gradient(180deg, #fff, #ecebe6 86%, #d6d0c5);
}
.xp-btn:hover:not(:disabled) { box-shadow: inset -1px 1px #fff0cf, inset 1px 2px #fdd889, inset -2px 2px #fbc761, inset 2px -2px #e5a01a; }
.xp-btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.xp-btn:active:not(:disabled) { background: linear-gradient(180deg, #cdcac3, #e3e3db 8%, #e5e5de 94%, #f2f2f1); box-shadow: none; }
.xp-btn:disabled { color: #aca899; border-color: #c9c7ba; background: #f5f4ea; }
input { font: inherit; padding: 3px 4px; border: 1px solid var(--field-border); background: #fff; color: #000; }
input:focus { outline: none; border-color: #3d6ed4; }
fieldset { border: 1px solid #d0d0bf; border-radius: 4px; margin: 0 0 8px; padding: 6px 8px 8px; }
legend { color: #0046d5; padding: 0 3px; }
.d-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.row { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Notepad ---------- */
.notepad { width: 440px; height: 340px; padding: 6px 8px; background: #fff; border: 1px solid var(--field-border); font: 13px/1.35 "Lucida Console", "Courier New", monospace; }
.notepad p { margin: 0 0 12px; }
.notepad marquee { color: #c00; font-weight: bold; background: #ffff99; }

/* ---------- ca.exe ---------- */
.ca { width: 440px; }
.ca-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #d0d0bf; }
.ca-head img { height: 52px; }
.ca-name { font: bold 15px var(--title); }
.ca-sub { color: #555; }
.ca label { display: block; margin-bottom: 4px; }
.ca-row { display: flex; gap: 6px; }
.ca-row input { flex: 1; min-width: 0; font: 12px "Lucida Console", monospace; }
.ca-warn { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 8px; background: #ffffe1; border: 1px solid #aca899; }
.ca-warn svg { width: 20px; height: 20px; }

/* ---------- burn.exe ---------- */
.burn { width: 470px; }
.burn h3 { margin: 0 0 6px; font: bold 15px var(--title); color: #c23b00; }
.burn p { margin: 0 0 10px; line-height: 1.45; }
.flow { list-style: none; padding: 0; margin: 0 0 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.flow li { background: #fff; border: 1px solid var(--field-border); padding: 8px 4px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; }
.flow li svg { width: 30px; height: 30px; }
.flow li small { color: #555; }
.flow li:not(:last-child)::after { content: "▶"; position: absolute; right: -9px; top: 40%; color: #0046d5; font-size: 10px; z-index: 1; }
.burn-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.burn-stats small { display: block; color: #555; }
.burn-stats b { font-size: 15px; color: #c23b00; }
.fine { font-size: 10px; color: #666; }

/* ---------- Clicker ---------- */
.clicker { width: 340px; text-align: center; }
.bank-amt { font: bold 28px var(--title); color: #1f6e0a; font-variant-numeric: tabular-nums; }
.bank-rate { color: #555; }
.clicky { display: block; margin: 4px auto 0; height: 120px; padding: 4px; border: 0; background: none; cursor: pointer; transition: transform .06s; }
.clicky img { height: 100%; display: block; filter: drop-shadow(2px 4px 3px rgba(0,0,0,.3)); pointer-events: none; }
.clicky:active { transform: scale(.9); }
.hint { color: #666; margin-bottom: 8px; }
.shop { display: grid; gap: 4px; text-align: left; }
.shop button { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 4px 8px; height: auto; min-width: 0; text-align: left; }
.s-name { font-weight: bold; }
.s-desc { color: #555; font-size: 10px; }
.s-cost { font-weight: bold; color: #1f6e0a; font-variant-numeric: tabular-nums; }
.shop button:disabled .s-cost { color: #aca899; }
.floaty { position: fixed; pointer-events: none; font: bold 14px var(--title); color: #1f6e0a; text-shadow: 0 0 2px #fff, 0 0 4px #fff; animation: floaty .8s ease-out forwards; z-index: 9000; }
@keyframes floaty { to { transform: translateY(-50px); opacity: 0; } }

/* ---------- Memes ---------- */
.memes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
#meme { width: 280px; max-width: 100%; aspect-ratio: 1; border: 1px solid var(--field-border); background: #000; }
.meme-ctrl { display: flex; flex-direction: column; gap: 8px; width: 200px; max-width: 100%; }
.meme-ctrl label { display: flex; flex-direction: column; gap: 2px; }

/* ---------- Stonks ---------- */
.stonks { padding: 8px; background: #000; color: #cfe; font-family: "Lucida Console", monospace; }
.ticker { display: flex; align-items: baseline; gap: 12px; }
.sym { font-weight: bold; color: #fff; font-size: 13px; }
.price { font-size: 24px; font-weight: bold; color: #3f3; }
.chg { color: #3f3; font-size: 13px; }
.chg.down, .price.down { color: #f44; }
#chart { width: 460px; max-width: 100%; height: auto; display: block; margin-top: 6px; border: 1px solid #234; }
.stonk-note { margin-top: 4px; color: #9fc; }
.stonk-fake { margin-top: 2px; color: #fc6; font-size: 10px; }

/* ---------- BuxAmp ---------- */
.skinned { background: #2b2f3c; }
.amp { width: 300px; padding: 8px; background: linear-gradient(#3a4050, #1c202a); color: #9f9; }
.amp-screen { background: #000; border: 2px inset #666; padding: 6px; font: 11px "Lucida Console", monospace; color: #3f3; }
.viz { display: flex; align-items: flex-end; gap: 2px; height: 46px; margin-top: 6px; }
.viz i { flex: 1; background: linear-gradient(to top, #2f2, #ff0 60%, #f40); height: 4%; transition: height .1s; }
.amp-btns { display: flex; gap: 4px; margin-top: 8px; justify-content: center; }
.amp-b { width: 40px; height: 22px; border: 1px solid #000; border-radius: 2px; color: #ddd; background: linear-gradient(#6a7080, #3a3f4c); box-shadow: inset 1px 1px #8a90a0; cursor: pointer; }
.amp-b:active { box-shadow: inset -1px -1px #8a90a0; }
.amp-foot { text-align: center; font-size: 10px; color: #8a9; margin-top: 6px; font-style: italic; }

/* ---------- System properties ---------- */
.tabs { display: flex; gap: 0; margin-bottom: -1px; position: relative; }
.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 .on { background: #fcfcfe; border-top: 2px solid #e68b2c; padding-bottom: 4px; position: relative; z-index: 1; }
.tabpanel { background: #fcfcfe; border: 1px solid #919b9c; padding: 12px; }
.sysprops { display: flex; gap: 16px; width: 380px; }
.sysprops p { margin: 0 0 10px; line-height: 1.4; }
.sys-img { height: 120px; }

/* ---------- Recycle bin ---------- */
.files { display: grid; grid-template-columns: repeat(auto-fill, 90px); gap: 6px; padding: 10px; width: 420px; background: #fff; border: 1px solid var(--field-border); }
.file { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; cursor: pointer; }
.file svg { width: 32px; height: 32px; }
.file span:last-child { word-break: break-word; text-align: center; padding: 0 2px; }
.file:focus-visible { outline: none; }
.file:focus-visible span:last-child { background: var(--sel); color: #fff; }

/* ---------- Message boxes ---------- */
.dialog .body { display: flex; gap: 12px; align-items: flex-start; padding: 14px 12px 4px; max-width: 380px; line-height: 1.45; }
.dialog .d-ico svg { width: 32px; height: 32px; }
.dialog .d-actions { justify-content: center; padding: 0 12px 10px; }
.ad .body { flex-direction: column; align-items: center; text-align: center; background: repeating-linear-gradient(45deg, #ffef5a 0 20px, #ffd400 20px 40px); }
.ad-big { font: 900 20px var(--title); color: #d00; text-shadow: 2px 2px 0 #fff; animation: blink .6s steps(1) infinite; }
@keyframes blink { 50% { color: #00f; } }

/* ---------- Right-click style menus ---------- */
.ctx-menu { position: absolute; z-index: 7000; min-width: 190px; padding: 2px; background: #fff; border: 1px solid #aca899; box-shadow: 2px 2px 4px rgba(0,0,0,.4); }
.ctx-menu button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 4px 18px 4px 6px; text-align: left; white-space: nowrap; cursor: pointer; }
.ctx-menu button .em { width: 18px; text-align: center; font-size: 13px; }
.ctx-menu button:hover, .ctx-menu button:focus-visible { background: var(--sel); color: #fff; outline: none; }
.ctx-menu hr { border: 0; border-top: 1px solid #aca899; margin: 3px 2px; }
.ctx-menu .head { font-weight: bold; padding: 4px 6px; color: #0046d5; }

/* ---------- THE AGENT ---------- */
#agent { position: absolute; z-index: 6000; width: 108px; height: 162px; left: 0; top: 0; transition: left 0s, top 0s; touch-action: none; }
#agent.walking { transition-timing-function: linear; }
.agent-body { position: absolute; inset: 0; transform-origin: 50% 100%; cursor: pointer; }
.agent-body img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; display: block; pointer-events: none; filter: drop-shadow(1px 3px 2px rgba(0,0,0,.25)); }
#agent.flip .agent-body img { transform: scaleX(-1); }
.agent-shadow { position: absolute; left: 18%; right: 18%; bottom: -6px; height: 10px; border-radius: 50%; background: radial-gradient(rgba(0,0,0,.35), transparent 70%); z-index: -1; }

#agent .agent-body { animation: breathe 3s ease-in-out infinite; }
#agent.walking .agent-body { animation: waddle .36s ease-in-out infinite; }
#agent.talking .agent-body { animation: talk .28s ease-in-out infinite; }
#agent.wave .agent-body { animation: wave .5s ease-in-out 3; }
#agent.jump .agent-body { animation: jump .7s cubic-bezier(.3,.7,.4,1) 2; }
#agent.spin .agent-body { animation: spin 1s ease-in-out 1; }
#agent.dance .agent-body { animation: dance 1.2s ease-in-out infinite; }
#agent.dragging .agent-body { animation: dangle .5s ease-in-out infinite; transform-origin: 50% 0; }
#agent.sleep .agent-body { animation: none; transform: rotate(-8deg) scaleY(.96); filter: brightness(.9); }
#agent.enter .agent-body { animation: enter 1s cubic-bezier(.3,1.4,.5,1); }
#agent.leave .agent-body { animation: leave .7s ease-in forwards; }
@keyframes breathe { 50% { transform: scale(1.02, .975); } }
@keyframes waddle { 0%,100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-6px); } }
@keyframes talk { 50% { transform: scale(.97, 1.03) translateY(-2px); } }
@keyframes wave { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes jump { 0%,100% { transform: none; } 20% { transform: scale(1.1,.85); } 50% { transform: translateY(-70px) scale(.95,1.08); } 80% { transform: scale(1.08,.9); } }
@keyframes spin { to { transform: rotateY(720deg); } }
@keyframes dance { 0%,100% { transform: rotate(0) translateY(0); } 15% { transform: rotate(-15deg) translateY(-14px); } 30% { transform: scaleX(-1) rotate(10deg); } 50% { transform: translateY(-24px) scale(1.05); } 70% { transform: rotate(15deg) translateY(-8px) scaleX(-1); } 85% { transform: scale(1.1,.85); } }
@keyframes dangle { 0%,100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
@keyframes enter { 0% { transform: translateY(-110vh) rotate(-30deg); } 60% { transform: translateY(0) scale(1.15,.8); } 80% { transform: scale(.95,1.08); } 100% { transform: none; } }
@keyframes leave { 30% { transform: scale(1.1,.9); } 100% { transform: translateY(-40px) scale(0) rotate(540deg); opacity: 0; } }
.zzz { position: absolute; right: -6px; top: 4px; display: none; font: bold 16px var(--title); color: #fff; text-shadow: 1px 1px 2px #000; }
#agent.sleep .zzz { display: block; }
.zzz i { position: absolute; font-style: normal; opacity: 0; animation: zz 2.4s linear infinite; }
.zzz i:nth-child(2) { animation-delay: .8s; font-size: 20px; }
.zzz i:nth-child(3) { animation-delay: 1.6s; font-size: 24px; }
@keyframes zz { 0% { transform: translate(0,0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(18px,-40px); opacity: 0; } }

/* speech balloon, Microsoft-Agent style */
.balloon {
  position: absolute; bottom: calc(100% + 14px); left: 50%; width: 230px; transform: translateX(-50%);
  padding: 8px 10px; background: #ffffe1; border: 1px solid #000; border-radius: 8px;
  box-shadow: 2px 2px 3px rgba(0,0,0,.3); font-size: 12px; line-height: 1.4; cursor: default;
  --tail: 50%;
}
.balloon::before, .balloon::after { content: ""; position: absolute; left: var(--tail); border: solid transparent; }
.balloon::before { bottom: -13px; margin-left: -9px; border-width: 13px 9px 0; border-top-color: #000; }
.balloon::after { bottom: -11px; margin-left: -8px; border-width: 12px 8px 0; border-top-color: #ffffe1; }
.balloon.below { bottom: auto; top: calc(100% + 16px); }
.balloon.below::before { bottom: auto; top: -13px; border-width: 0 9px 13px; border-color: transparent transparent #000; }
.balloon.below::after { bottom: auto; top: -11px; border-width: 0 8px 12px; border-color: transparent transparent #ffffe1; }
.b-extra:empty { display: none; }
.b-extra { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.b-extra .row { justify-content: flex-end; }
.b-extra .xp-btn { min-width: 60px; }
.b-extra input { width: 100%; }

/* ---------- Taskbar ---------- */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--task-h); z-index: 8000; display: flex; align-items: center;
  background: 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%);
}
#start {
  height: 100%; display: flex; align-items: center; gap: 5px; padding: 0 20px 2px 8px; border: 0; cursor: pointer;
  border-radius: 0 10px 10px 0; color: #fff; font: italic bold 18px var(--title); text-shadow: 1px 1px 2px rgba(0,0,0,.6);
  background: radial-gradient(ellipse at 50% 0, #6cbd5c 0, #3c9d29 45%, #2f8a1f 70%, #3b9a2a 90%, #5db84a 100%);
  box-shadow: inset 0 1px 1px #9dd88f, inset -1px -1px 2px #1a5e10, 2px 0 4px rgba(0,0,0,.3);
}
#start:hover { filter: brightness(1.1); }
#start.on { filter: brightness(.85); }
.orb { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: bold 13px var(--ui); font-style: normal; color: #1f6e0a; text-shadow: none; background: radial-gradient(circle at 35% 30%, #fff 0 15%, #d6ffb8 40%, #8fe25a 100%); box-shadow: 0 0 0 1px #1f5e0c; }
.quick { display: flex; gap: 2px; padding: 0 6px; margin-left: 4px; border-right: 1px solid #1a3f9a; box-shadow: 1px 0 #4a8af0; height: 22px; align-items: center; }
.quick button, .tray button { width: 22px; height: 22px; padding: 2px; border: 0; background: none; border-radius: 2px; cursor: pointer; display: grid; place-items: center; }
.quick button:hover { background: rgba(255,255,255,.2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.quick svg, .tray svg { width: 16px; height: 16px; }
.quick img, .tray img { height: 18px; }
#tasks { flex: 1; display: flex; gap: 3px; overflow: hidden; min-width: 0; padding: 0 6px; }
.task {
  flex: 0 1 160px; min-width: 36px; height: 24px; display: flex; align-items: center; gap: 5px; padding: 0 8px; cursor: pointer;
  border-radius: 3px; border: 0; color: #fff; background: #3c81f3; box-shadow: inset -1px -1px #1a50b8, inset 1px 1px #8ab3fa, 0 0 0 1px #1d4ec0; white-space: nowrap; overflow: hidden;
}
.task:hover { background: #5393ff; }
.task.active { background: #1e52b7; box-shadow: inset 1px 1px 2px #0a2b78, 0 0 0 1px #1a3f9a; }
.task svg { width: 16px; height: 16px; }
.task span { overflow: hidden; text-overflow: ellipsis; }
.tray {
  height: 100%; display: flex; align-items: center; gap: 2px; padding: 0 10px 0 8px; 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);
  border-left: 1px solid #1042af; box-shadow: inset 1px 0 1px #18bbff;
}
.tray button:hover { background: rgba(255,255,255,.2); }
#tray-voice.muted { opacity: .5; }
#clock { margin-left: 6px; white-space: nowrap; }

/* ---------- Start menu ---------- */
#startmenu { position: fixed; left: 0; bottom: var(--task-h); z-index: 8500; width: 390px; max-width: 100vw; border-radius: 7px 7px 0 0; overflow: hidden; background: #4282d6; box-shadow: 2px -2px 10px rgba(0,0,0,.5); border: 1px solid #1b54d3; }
.sm-head { display: flex; align-items: center; gap: 8px; height: 58px; padding: 0 8px; color: #fff; font: bold 14px var(--title); text-shadow: 1px 1px 2px #0a246a;
  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%); }
.sm-head img { width: 42px; height: 42px; border: 2px solid #fff; border-radius: 3px; background: #fff; box-shadow: 1px 1px 2px rgba(0,0,0,.4); }
.sm-body { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid #e68b2c; box-shadow: inset 0 1px #f9b56a; }
.sm-col { display: flex; flex-direction: column; background: #fff; padding: 6px 2px; }
.sm-col.right { background: #d3e5fa; border-left: 1px solid #95bdee; }
.sm-col button { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 6px; text-align: left; border-radius: 0; cursor: pointer; color: #000; }
.sm-col.right button { color: #0a246a; }
.sm-col button svg { width: 24px; height: 24px; }
.sm-col button.big svg, .sm-col button.big img { width: 32px; height: 32px; object-fit: contain; }
.sm-col button.big small { display: block; color: #777; font-size: 10px; }
.sm-col button:hover, .sm-col button:focus-visible { background: var(--sel); color: #fff; outline: none; }
.sm-col button:hover small { color: #dde; }
.sm-col hr { border: 0; height: 1px; margin: 4px 6px; background: linear-gradient(90deg, transparent, #c5c2b2, transparent); }
.allprog { justify-content: center; font-weight: bold; }
.allprog .arrow { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 3px; background: linear-gradient(#5fd03c, #2e8a12); color: #fff; font-size: 8px; }
.sm-foot { display: flex; justify-content: flex-end; gap: 4px; padding: 4px 8px; background: linear-gradient(180deg, #4282d6, #3b85e0 3%, #418ae3 5%, #418ae3 17%, #3c87e2 21%, #3786e4 26%, #3482e3 29%, #2e7ee1 39%, #2374df 49%, #2072db 57%, #196edb 62%, #176bd8 72%, #1468d6 75%, #1165d1 83%, #0f61cb 88%); }
.sm-foot button { display: flex; align-items: center; gap: 5px; border: 0; background: none; color: #fff; padding: 4px 6px; border-radius: 3px; cursor: pointer; }
.sm-foot button svg { width: 22px; height: 22px; }
.sm-foot button:hover { background: rgba(255,255,255,.18); }

/* ---------- BSOD ---------- */
#bsod { position: fixed; inset: 0; z-index: 10000; background: #0000aa; color: #fff; font: 16px/1.5 "Lucida Console", "Courier New", monospace; display: grid; place-items: center; padding: 16px; cursor: pointer; }
.bsod-inner { max-width: 640px; }
.bsod-h { text-align: center; }
.bsod-h span { background: #aaa; color: #0000aa; padding: 0 8px; }
.bsod-c { text-align: center; animation: blink 1s steps(1) infinite; }

/* ---------- CRT overlay ---------- */
#crt { position: fixed; inset: 0; z-index: 9900; pointer-events: none; display: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.45) 100%);
  animation: flicker .15s steps(2) infinite; }
body.crt #crt { display: block; }
body.crt #desktop, body.crt #taskbar { filter: saturate(1.15) contrast(1.05); }
@keyframes flicker { 50% { opacity: .92; } }

/* ---------- Money rain ---------- */
#rain { position: fixed; inset: 0; pointer-events: none; z-index: 9500; overflow: hidden; }
.bill { position: absolute; top: -60px; font-size: 32px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(calc(100vh + 120px)) rotate(var(--r)); } }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .icons { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-template-rows: none; right: 4px; }
  .icon { width: auto; }
  .window { left: 4px !important; right: 4px; width: auto !important; top: 4px !important; }
  .notepad, .clicker, .sysprops, .files, .amp, .ca, .burn { width: auto; }
  .notepad { height: 50vh; }
  .sysprops { flex-direction: column; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li:nth-child(2)::after { display: none; }
  #agent { width: 79px; height: 118px; }
  .balloon { width: 200px; }
  #start { padding-right: 12px; }
  #start span:last-child { display: none; }
  .quick { display: none; }
  .task span:last-child { display: none; }
  .task { flex: 0 0 36px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  #agent .agent-body, .zzz i, #crt { animation: none !important; }
}
