/* ===== Roomi 7 — Windows 7 Aero portfolio ===== */
:root {
  --font: "Segoe UI", "Segoe UI Variable", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --taskbar-h: 42px;
  --glass-active: linear-gradient(160deg, rgba(173, 202, 227, 0.72), rgba(105, 141, 176, 0.72) 45%, rgba(82, 116, 152, 0.74));
  --glass-inactive: linear-gradient(160deg, rgba(196, 205, 214, 0.62), rgba(148, 160, 173, 0.62));
  --link: #0066cc;
  --sel-border: rgba(122, 180, 231, 0.9);
  --sel-fill: linear-gradient(to bottom, rgba(160, 210, 250, 0.25), rgba(110, 175, 230, 0.4));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

/* 7.css styles bare <button>/<input> globally — strip its chrome from our
   custom shell (taskbar, Start menu, context menu, balloon) so our own
   styles paint cleanly. Window caption buttons keep 7.css styling. */
#taskbar button, #start-menu button, #start-menu input,
#ctx-menu button, #balloon button {
  background: none; border: none; border-radius: 0;
  box-shadow: none; min-width: 0; min-height: 0; font: inherit;
}
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  font-size: 13px;
  color: #1f1f1f;
  background: #000;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
img { -webkit-user-drag: none; }
.win-titlebar, .rs, .dicon, #icons { touch-action: none; }
button { font-family: var(--font); }

/* ================= Boot / welcome ================= */
#boot {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 90% at 50% 108%, rgba(120, 190, 255, 0.5), transparent 55%),
    radial-gradient(90% 70% at 18% -8%, rgba(70, 140, 220, 0.35), transparent 60%),
    radial-gradient(70% 55% at 85% 12%, rgba(40, 110, 190, 0.3), transparent 65%),
    linear-gradient(to bottom, #10306b, #14459c 55%, #0d2a61);
  cursor: pointer;
  transition: opacity 0.55s ease;
}
#boot.fading { opacity: 0; pointer-events: none; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.boot-avatar {
  width: 128px; height: 128px; border-radius: 10px; padding: 6px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.55), rgba(255,255,255,0.12) 45%, rgba(255,255,255,0.28));
  box-shadow: 0 0 24px rgba(120, 190, 255, 0.55), 0 2px 10px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.9);
}
.boot-avatar svg { width: 100%; height: 100%; border-radius: 6px; display: block; }
.boot-spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.22); border-top-color: #fff;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot-name {
  color: #fff; font-size: 26px; font-weight: 300; letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6), 0 0 22px rgba(140, 200, 255, 0.8);
}
.boot-brand {
  position: absolute; bottom: 34px; width: 100%; text-align: center;
  color: rgba(255,255,255,0.85); font-size: 15px; font-weight: 300;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.boot-brand span { font-weight: 600; }

/* ================= Desktop ================= */
#desktop {
  position: fixed; inset: 0 0 var(--taskbar-h) 0;
  background: #1a64ba url("wallpaper.jpg") center / cover no-repeat;
  overflow: hidden;
}

/* Desktop icons */
#icons { position: absolute; inset: 0; }
.dicon {
  position: absolute; width: 78px; padding: 6px 2px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 1px solid transparent; border-radius: 3px;
  cursor: default; text-align: center;
  transition: background 0.12s, border-color 0.12s, opacity 0.25s;
}
.dicon img, .dicon svg { width: 48px; height: 48px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45)); pointer-events: none; }
.dicon .dlabel {
  color: #fff; font-size: 12px; line-height: 1.2; max-width: 74px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9), 0 0 3px rgba(0,0,0,0.75);
  overflow-wrap: break-word; pointer-events: none;
}
.dicon:hover { background: linear-gradient(to bottom, rgba(170, 215, 250, 0.18), rgba(120, 185, 240, 0.28)); border-color: rgba(160, 205, 245, 0.5); }
.dicon.selected { background: var(--sel-fill); border-color: var(--sel-border); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25); }
.dicon.dragging { opacity: 0.65; z-index: 50; }
.dicon .badge {
  position: absolute; top: 2px; right: 4px;
  background: linear-gradient(to bottom, #ffd76e, #f5a623);
  color: #4a3000; font-size: 8.5px; font-weight: 700; letter-spacing: 0.3px;
  padding: 1.5px 4px; border-radius: 2px; border: 1px solid rgba(120, 80, 0, 0.55);
  box-shadow: 0 1px 2px rgba(0,0,0,0.4); pointer-events: none;
}

/* Marquee selection */
#marquee {
  position: absolute; z-index: 60;
  background: rgba(60, 140, 220, 0.22);
  border: 1px solid rgba(60, 140, 220, 0.85);
}

/* Snap ghost */
#snap-ghost {
  position: absolute; z-index: 5; pointer-events: none;
  border-radius: 7px;
  background: rgba(190, 220, 250, 0.28);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: inset 0 0 0 1px rgba(120, 160, 210, 0.5), inset 0 0 60px rgba(255,255,255,0.25);
  backdrop-filter: blur(2px);
  transition: all 0.13s ease-out; opacity: 0;
}
#snap-ghost.show { opacity: 1; }

/* ================= Windows ================= */
.win {
  /* .win = positioning/behaviour layer; 7.css .window.glass draws the chrome */
  position: absolute; min-width: 320px; min-height: 200px;
  display: flex; flex-direction: column;
}
/* raised shadow for the focused window (7.css gives a flat shadow to all) */
.win.active { box-shadow: 2px 4px 18px 2px rgba(0, 15, 35, 0.5), inset 0 0 0 1px #fffa; }
.win.maximized { border-radius: 0; }
.win.maximized > .title-bar { border-radius: 0; }
.win.anim-rect { transition: top 0.17s ease-out, left 0.17s ease-out, width 0.17s ease-out, height 0.17s ease-out, border-radius 0.17s; }
.win.opening { animation: win-in 0.16s ease-out; }
@keyframes win-in { from { transform: scale(0.88); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.win.closing { animation: win-out 0.14s ease-in forwards; }
@keyframes win-out { to { transform: scale(0.88); opacity: 0; } }
.win.minimizing { animation: win-min 0.22s cubic-bezier(0.4, 0, 0.9, 0.6) forwards; }
@keyframes win-min { to { transform: translate(var(--min-tx), var(--min-ty)) scale(0.05); opacity: 0; } }
.win.restoring { animation: win-restore 0.2s cubic-bezier(0.1, 0.6, 0.3, 1); }
@keyframes win-restore { from { transform: translate(var(--min-tx), var(--min-ty)) scale(0.05); opacity: 0; } to { transform: none; opacity: 1; } }

/* Title bar — 7.css draws the glass; we add the app-icon slot + drag cursor */
.win > .title-bar { cursor: default; flex: 0 0 auto; }
.tb-left { display: flex; align-items: center; gap: 5px; min-width: 0; padding-top: 6px; }
.ticon { width: 16px; height: 16px; flex: 0 0 16px; }
.ticon svg, .ticon img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35)); }
.title-bar-text { padding-top: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* keep our SVG project glyphs from inheriting 7.css button chrome */
.title-bar-controls button { min-width: 29px; }

/* Client area — flex-fill + scroll; 7.css .window-body gives the inset frame */
.win-body {
  flex: 1; min-height: 0; overflow: auto; background: #fff;
  user-select: text; -webkit-user-select: text;
  position: relative; z-index: 1;
}
.win.maximized > .win-body { margin: 0; border-left: none; border-right: none; border-bottom: none; }

/* Resize handles */
.rs { position: absolute; z-index: 4; }
.rs-n { top: -4px; left: 8px; right: 8px; height: 8px; cursor: n-resize; }
.rs-s { bottom: -4px; left: 8px; right: 8px; height: 8px; cursor: s-resize; }
.rs-e { right: -4px; top: 8px; bottom: 8px; width: 8px; cursor: e-resize; }
.rs-w { left: -4px; top: 8px; bottom: 8px; width: 8px; cursor: w-resize; }
.rs-ne { top: -4px; right: -4px; width: 12px; height: 12px; cursor: ne-resize; }
.rs-nw { top: -4px; left: -4px; width: 12px; height: 12px; cursor: nw-resize; }
.rs-se { bottom: -4px; right: -4px; width: 12px; height: 12px; cursor: se-resize; }
.rs-sw { bottom: -4px; left: -4px; width: 12px; height: 12px; cursor: sw-resize; }
.win.maximized .rs { display: none; }

/* ================= Window content styling ================= */
.app-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px 14px;
  background: linear-gradient(to bottom, #f4f9fe, #e4eef8);
  border-bottom: 1px solid #d5e2ee;
}
.app-hero svg, .app-hero img { width: 52px; height: 52px; flex: 0 0 52px; }
.app-hero h1 { font-size: 21px; font-weight: 400; color: #003399; line-height: 1.15; }
.app-hero .tagline { font-size: 12.5px; color: #4c607a; margin-top: 2px; }
.status-pill {
  display: inline-block; margin-left: 8px; vertical-align: middle;
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  padding: 2px 7px; border-radius: 3px;
  background: linear-gradient(to bottom, #ffd76e, #f5a623);
  border: 1px solid #b97d10; color: #4a3000;
}
.status-pill.live { background: linear-gradient(to bottom, #a5e08a, #5cb337); border-color: #3c7d1e; color: #143b00; }
.app-content { padding: 16px 20px 20px; line-height: 1.55; }
.app-content p { margin-bottom: 10px; }
.app-content h2 { font-size: 13.5px; color: #003399; font-weight: 600; margin: 14px 0 6px; }
.app-content ul { margin: 4px 0 10px 18px; }
.app-content li { margin-bottom: 5px; }
.app-content a { color: var(--link); text-decoration: none; }
.app-content a:hover { text-decoration: underline; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: #5a6b80; margin-bottom: 12px; }
.meta-row b { color: #2c3e55; font-weight: 600; }

/* Experience timeline */
.xp-entry { display: flex; gap: 14px; padding: 4px 0 14px; }
.xp-rail { display: flex; flex-direction: column; align-items: center; }
.xp-dot { width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #9fd2ff, #1d6fc4 70%); border: 1px solid #10508f; box-shadow: 0 0 6px rgba(60, 140, 220, 0.7); }
.xp-line { flex: 1; width: 2px; background: linear-gradient(to bottom, #9cc4e8, #dbe9f7); margin-top: 3px; }
.xp-body h3 { font-size: 14.5px; color: #1f1f1f; font-weight: 600; }
.xp-body .xp-sub { font-size: 12px; color: #5a6b80; margin: 1px 0 8px; }

/* File list (recycle bin / IE favorites) */
.file-list { padding: 6px; }
.file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: 1px solid transparent; border-radius: 3px;
  cursor: default; text-decoration: none; color: inherit;
}
.file-row:hover { background: linear-gradient(to bottom, #f2f9ff, #dcefff); border-color: #b8d9f2; }
.file-row svg, .file-row img { width: 32px; height: 32px; flex: 0 0 32px; }
.file-row .f-name { font-size: 12.5px; color: #1f1f1f; }
.file-row .f-desc { font-size: 11.5px; color: #64748c; margin-top: 1px; }
.file-row .f-go { margin-left: auto; color: var(--link); font-size: 11.5px; white-space: nowrap; }
.bin-note {
  margin: 8px; padding: 8px 12px; font-size: 11.5px; color: #6b5d1e;
  background: linear-gradient(to bottom, #fff9e3, #fdf3c9); border: 1px solid #e5d089; border-radius: 3px;
}

/* ================= Taskbar ================= */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--taskbar-h);
  z-index: 5000;
  display: flex; align-items: stretch;
  background: linear-gradient(to bottom, rgba(110, 140, 170, 0.45), rgba(50, 75, 105, 0.6) 40%, rgba(20, 40, 65, 0.72));
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-top: 1px solid rgba(180, 210, 240, 0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), inset 0 12px 18px -12px rgba(255,255,255,0.35);
}

#start-btn {
  width: 62px; border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
}
#start-btn img { width: 48px; height: 48px; margin-top: -10px; transition: filter 0.12s; }
#start-btn:hover img { filter: brightness(1.2) drop-shadow(0 0 7px rgba(150, 210, 255, 0.9)); }
#start-btn:active img, #start-btn.open img { filter: brightness(0.92) drop-shadow(0 0 5px rgba(120, 180, 240, 0.8)); }

#task-buttons { display: flex; align-items: stretch; gap: 1px; padding: 2px 2px; flex: 1; min-width: 0; overflow: hidden; }
.tbtn {
  width: 60px; min-width: 40px; border-radius: 3px;
  border: 1px solid transparent;
  background: none; cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center;
  --mx: 50%;
}
.tbtn img, .tbtn svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); pointer-events: none; }
.tbtn:hover {
  border-color: rgba(200, 225, 250, 0.65);
  background:
    radial-gradient(60px 34px at var(--mx) 100%, rgba(190, 230, 255, 0.55), rgba(120, 170, 220, 0.12) 70%, transparent),
    linear-gradient(to bottom, rgba(255,255,255,0.22), rgba(255,255,255,0.05));
  box-shadow: inset 0 0 4px rgba(255,255,255,0.4);
}
.tbtn.running { border-color: rgba(170, 200, 230, 0.55); background: linear-gradient(to bottom, rgba(255,255,255,0.28), rgba(255,255,255,0.06) 48%, rgba(90, 125, 160, 0.28) 52%, rgba(160, 195, 230, 0.22)); box-shadow: inset 0 0 5px rgba(255,255,255,0.35), inset 0 -8px 12px -8px rgba(190, 230, 255, 0.7); }
.tbtn.running:hover { background: radial-gradient(60px 34px at var(--mx) 100%, rgba(200, 235, 255, 0.6), rgba(120, 170, 220, 0.15) 70%, transparent), linear-gradient(to bottom, rgba(255,255,255,0.35), rgba(255,255,255,0.1) 48%, rgba(100, 140, 180, 0.3) 52%, rgba(170, 205, 240, 0.3)); }
.tbtn.focused { border-color: rgba(200, 230, 255, 0.8); background: linear-gradient(to bottom, rgba(255,255,255,0.42), rgba(210, 235, 255, 0.2) 48%, rgba(120, 160, 205, 0.42) 52%, rgba(190, 220, 250, 0.38)); box-shadow: inset 0 1px 6px rgba(255,255,255,0.55), inset 0 -10px 14px -8px rgba(200, 235, 255, 0.85); }

/* Taskbar tooltip */
#tb-tip {
  position: fixed; z-index: 6500; pointer-events: none;
  background: linear-gradient(to bottom, #ffffff, #e8f0f8);
  border: 1px solid #8399ad; border-radius: 3px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.35);
  padding: 4px 9px; font-size: 11.5px; color: #333;
  opacity: 0; transition: opacity 0.12s;
}
#tb-tip.show { opacity: 1; }

/* Tray */
#tray { display: flex; align-items: center; gap: 4px; padding-left: 6px; }
.tray-icons { display: flex; align-items: center; gap: 7px; padding: 0 4px; }
.tray-icons svg { width: 15px; height: 15px; opacity: 0.95; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6)); }
#clock { text-align: center; color: #fff; font-size: 11.5px; line-height: 1.35; padding: 0 8px; text-shadow: 0 1px 2px rgba(0,0,0,0.7); cursor: default; border-radius: 3px; border: 1px solid transparent; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
#clock:hover { border-color: rgba(200, 225, 250, 0.5); background: linear-gradient(to bottom, rgba(255,255,255,0.18), rgba(255,255,255,0.04)); }
#show-desktop {
  width: 14px; align-self: stretch; margin-left: 2px;
  border: none; border-left: 1px solid rgba(15, 30, 50, 0.8);
  box-shadow: inset 1px 0 0 rgba(200, 225, 250, 0.4);
  background: linear-gradient(to bottom, rgba(255,255,255,0.14), rgba(255,255,255,0.03));
  cursor: pointer;
}
#show-desktop:hover { background: linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(200, 230, 255, 0.2)); }

/* ================= Start menu ================= */
#start-menu {
  position: fixed; left: 4px; bottom: calc(var(--taskbar-h) + 4px); z-index: 6000;
  width: 416px; height: min(544px, calc(100vh - 90px));
  display: flex; padding: 7px;
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(140, 170, 200, 0.78), rgba(70, 100, 135, 0.8) 55%, rgba(45, 70, 100, 0.85));
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 0 0 1px rgba(0, 15, 35, 0.7), inset 0 0 0 1px rgba(255,255,255,0.5), 0 10px 34px rgba(0,0,0,0.55);
  transform-origin: 8% 100%;
}
#start-menu.opening { animation: sm-in 0.14s ease-out; }
@keyframes sm-in { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: none; } }

.sm-left {
  flex: 1.18; background: #f8fbfe; border: 1px solid rgba(20, 40, 70, 0.55); border-radius: 5px;
  display: flex; flex-direction: column; overflow: hidden;
}
.sm-programs { flex: 1; overflow-y: auto; padding: 5px; }
.sm-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border: 1px solid transparent; border-radius: 3px;
  cursor: default; color: #1f1f1f; font-size: 12.5px;
}
.sm-item svg, .sm-item img { width: 26px; height: 26px; flex: 0 0 26px; }
.sm-item:hover { background: linear-gradient(to bottom, #eaf4fd, #d2e8f9); border-color: #a9cdea; }
.sm-item .sm-item-sub { display: block; font-size: 10.5px; color: #6f8296; }
.sm-divider { height: 1px; background: #dbe6f0; margin: 4px 8px; }
.sm-group-label { font-size: 11px; color: #6f8296; padding: 6px 10px 3px; }
.sm-noresults { padding: 14px; font-size: 12px; color: #6f8296; }

.sm-search { flex: 0 0 auto; padding: 8px; border-top: 1px solid #dbe6f0; position: relative; }
.sm-search input {
  width: 100%; height: 26px; padding: 0 30px 0 10px;
  border: 1px solid #8fa8bd; border-radius: 13px;
  font-family: var(--font); font-size: 12px; color: #333;
  background: #fff; outline: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}
.sm-search input:focus { border-color: #5d9bd3; box-shadow: inset 0 1px 3px rgba(0,0,0,0.12), 0 0 5px rgba(100, 170, 230, 0.6); }
.sm-mag { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; pointer-events: none; }
.sm-mag::before { content: ""; position: absolute; top: 0; left: 0; width: 8px; height: 8px; border: 2px solid #6f8fae; border-radius: 50%; }
.sm-mag::after { content: ""; position: absolute; bottom: 0; right: 1px; width: 5px; height: 2px; background: #6f8fae; transform: rotate(45deg); border-radius: 1px; }

.sm-right { flex: 1; display: flex; flex-direction: column; padding: 10px 6px 8px 12px; position: relative; }
.sm-avatar {
  width: 66px; height: 66px; align-self: center; margin: 4px 0 14px;
  border-radius: 6px; padding: 4px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.65), rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.35));
  box-shadow: 0 2px 8px rgba(0,0,0,0.45), inset 0 0 2px rgba(255,255,255,0.9), 0 0 14px rgba(140, 200, 255, 0.35);
}
.sm-avatar svg { width: 100%; height: 100%; border-radius: 3px; display: block; }
.sm-links { flex: 1; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.sm-link {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 9px; border: 1px solid transparent; border-radius: 3px;
  color: #fff; font-size: 12.5px; text-decoration: none; cursor: default;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}
.sm-link svg, .sm-link img { width: 18px; height: 18px; flex: 0 0 18px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4)); }
.sm-link:hover { background: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0.12)); border-color: rgba(255,255,255,0.45); box-shadow: inset 0 0 4px rgba(255,255,255,0.3); }
.sm-rdivider { height: 1px; background: rgba(255,255,255,0.25); box-shadow: 0 1px 0 rgba(0,0,0,0.2); margin: 5px 4px; flex: 0 0 1px; }

.sm-shutdown-row { flex: 0 0 auto; display: flex; justify-content: flex-end; padding-top: 10px; }
#sm-shutdown {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 8px 5px 14px; border-radius: 3px;
  border: 1px solid rgba(10, 25, 45, 0.8);
  background: linear-gradient(to bottom, rgba(255,255,255,0.42), rgba(255,255,255,0.12) 45%, rgba(60, 90, 125, 0.4) 50%, rgba(120, 155, 190, 0.35));
  color: #fff; font-size: 12.5px; cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}
#sm-shutdown:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5), 0 0 9px rgba(150, 205, 255, 0.7); background: linear-gradient(to bottom, rgba(255,255,255,0.55), rgba(255,255,255,0.2) 45%, rgba(80, 115, 150, 0.5) 50%, rgba(150, 185, 220, 0.45)); }
#sm-shutdown .sm-sep { width: 1px; height: 16px; background: rgba(10, 25, 45, 0.7); box-shadow: 1px 0 0 rgba(255,255,255,0.3); margin-left: 4px; }
#sm-shutdown .sm-arrow { font-size: 9px; }

/* ================= Balloon tip ================= */
#balloon {
  position: fixed; right: 12px; bottom: calc(var(--taskbar-h) + 12px); z-index: 6200;
  width: 300px; padding: 12px 14px;
  background: linear-gradient(to bottom, #fefefe, #e9f1f8);
  border: 1px solid #7d92a5; border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  animation: balloon-in 0.25s ease-out;
}
@keyframes balloon-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#balloon::after { /* tail */
  content: ""; position: absolute; right: 34px; bottom: -9px;
  border: 9px solid transparent; border-top-color: #e9f1f8; border-bottom: none;
  filter: drop-shadow(0 1px 0 #7d92a5);
}
#balloon .balloon-title { font-weight: 600; font-size: 12.5px; padding-right: 18px; cursor: pointer; }
#balloon .balloon-body { font-size: 12px; color: #445366; margin-top: 4px; cursor: pointer; }
.balloon-close { position: absolute; top: 6px; right: 7px; border: 1px solid transparent; background: none; font-size: 10px; color: #667; cursor: pointer; border-radius: 2px; padding: 1px 4px; }
.balloon-close:hover { border-color: #b0682e; background: linear-gradient(to bottom, #f7b968, #e88b3c); color: #fff; }

/* ================= Context menu ================= */
#ctx-menu {
  position: fixed; z-index: 7000; min-width: 190px;
  background: #f1f5fb;
  border: 1px solid #979797; border-radius: 3px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.9);
  padding: 3px;
  animation: sm-in 0.1s ease-out;
}
.ctx-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 10px; border: 1px solid transparent; border-radius: 3px;
  font-size: 12px; color: #1f1f1f; cursor: default;
}
.ctx-item svg { width: 16px; height: 16px; }
.ctx-item:hover { background: linear-gradient(to bottom, #eaf4fd, #d2e8f9); border-color: #a9cdea; }
.ctx-item.disabled { color: #9aa6b3; pointer-events: none; }
.ctx-sep { height: 1px; background: #d9dee5; margin: 3px 6px; }

/* ================= Shutdown overlay ================= */
#shutdown {
  position: fixed; inset: 0; z-index: 20000;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(to bottom, #10306b, #14459c 55%, #0d2a61);
  color: #fff; font-size: 20px; font-weight: 300;
  opacity: 0; transition: opacity 0.6s;
}
#shutdown.on { opacity: 1; }
#shutdown.dark { background: #000; transition: background 0.8s; }
.sd-msg { text-shadow: 0 1px 4px rgba(0,0,0,0.7); text-align: center; line-height: 1.7; }
.sd-msg small { font-size: 13px; opacity: 0.75; display: block; }

/* ================= Scrollbars (webkit) ================= */
.win-body::-webkit-scrollbar, .sm-programs::-webkit-scrollbar { width: 15px; }
.win-body::-webkit-scrollbar-track, .sm-programs::-webkit-scrollbar-track { background: #f0f0f0; }
.win-body::-webkit-scrollbar-thumb, .sm-programs::-webkit-scrollbar-thumb {
  background: linear-gradient(to right, #cfd8e2, #a8b8c8); border: 1px solid #8fa0b0; border-radius: 2px;
}
.win-body::-webkit-scrollbar-thumb:hover { background: linear-gradient(to right, #dbe6f0, #b8cad9); }

/* ================= Small screens ================= */
@media (max-width: 720px) {
  #start-menu { width: calc(100vw - 8px); }
  .tbtn { width: 46px; }
  .tray-icons { display: none; }
  .dicon { width: 70px; }
  .app-hero { padding: 14px 14px 12px; }
  .app-content { padding: 12px 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
