/* =========================================================================
   Quadessa simulated desktop (Windows 11 + macOS) — used by the website's
   live demo (demo.js) and by the promo film, so both always match.
   ========================================================================= */

/* ===== Simulated OS (1600×900 logical stage, scaled by --s) ===== */
.stage {
  position: absolute; left: 0; top: 0;
  width: 1600px; height: 900px;
  transform-origin: 0 0;
  transform: scale(var(--s, 0.7));
  overflow: hidden;
  --ui: "Segoe UI Variable Text", "Segoe UI", "Inter", system-ui, sans-serif;
  font-family: var(--ui);
  font-size: 13px;
  line-height: 1.4;
  color: #e9e9ea;
  letter-spacing: 0;
}
.stage[data-os="mac"] { --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Inter", system-ui, sans-serif; }
.stage * { box-sizing: border-box; }

.wallpaper { position: absolute; inset: 0; overflow: hidden; }
.wallpaper svg { width: 100%; height: 100%; }
.dotgrid {
  position: absolute; inset: -40px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.4px);
  background-size: 40px 40px;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.stage.moving .dotgrid { opacity: 0.55; }

.world { position: absolute; left: 0; top: 0; width: 3200px; height: 1800px; transform-origin: 0 0; will-change: transform; }
.desk-label {
  position: absolute; font-size: 54px; font-weight: 700; letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.0); pointer-events: none; transition: color 0.4s;
  font-family: var(--font-display);
}
.stage.zoomed .desk-label { color: rgba(255, 255, 255, 0.5); }
.desk-seam { position: absolute; background: rgba(255, 255, 255, 0); transition: background 0.4s; pointer-events: none; }
.stage.zoomed .desk-seam, .stage.moving .desk-seam { background: rgba(255, 255, 255, 0.18); }

/* --- Windows (generic) --- */
.win {
  position: absolute;
  display: flex; flex-direction: column;
  background: #1f1f1f;
  overflow: hidden;
  transition: box-shadow 0.25s, opacity 0.2s, transform 0.2s;
}
.win.is-hidden { opacity: 0; transform: scale(0.94) translateY(20px); pointer-events: none; }
.win .tb { position: relative; flex: none; display: flex; align-items: center; user-select: none; touch-action: none; }
.win .tb-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win .body { position: relative; flex: 1; min-height: 0; display: flex; overflow: hidden; }
.win.pinned::after {
  content: "Pinned"; position: absolute; right: 12px; bottom: 10px; z-index: 5;
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); color: #111;
}

/* Windows 11 chrome */
[data-os="windows"] .win {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 46px rgba(0, 0, 0, 0.5);
}
[data-os="windows"] .win.is-active { border-color: rgba(255, 255, 255, 0.14); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35), 0 32px 64px rgba(0, 0, 0, 0.6); }
[data-os="windows"] .win .tb { height: 32px; background: #202020; padding-left: 12px; gap: 10px; font-size: 12px; color: #fff; }
[data-os="windows"] .win:not(.is-active) .tb { color: rgba(255, 255, 255, 0.55); }
[data-os="windows"] .tb .tb-icon { width: 16px; height: 16px; flex: none; }
[data-os="windows"] .caps { display: flex; height: 100%; margin-left: auto; flex: none; }
[data-os="windows"] .cap { width: 46px; height: 100%; display: grid; place-items: center; color: inherit; cursor: default; }
[data-os="windows"] .cap svg { width: 10px; height: 10px; }
[data-os="windows"] .cap:hover { background: rgba(255, 255, 255, 0.08); }
[data-os="windows"] .cap.close:hover { background: #c42b1c; color: #fff; }
[data-os="windows"] .tabs { display: flex; align-items: flex-end; align-self: stretch; gap: 2px; padding-top: 6px; flex: 1; min-width: 0; }
[data-os="windows"] .tab { display: flex; align-items: center; gap: 8px; height: 100%; max-width: 230px; padding: 0 12px; border-radius: 7px 7px 0 0; font-size: 12px; color: rgba(255, 255, 255, 0.7); white-space: nowrap; overflow: hidden; }
[data-os="windows"] .tab.on { background: #2b2b2b; color: #fff; }
[data-os="windows"] .tab .x { margin-left: 6px; opacity: 0.6; font-size: 11px; }
[data-os="windows"] .tab-plus { align-self: center; padding: 0 10px; opacity: 0.7; font-size: 16px; }

/* macOS chrome */
[data-os="mac"] .win {
  border-radius: 11px;
  background: #1e1e1e;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.9), inset 0 0 0 0.5px rgba(255, 255, 255, 0.18), 0 10px 26px rgba(0, 0, 0, 0.35), 0 28px 70px rgba(0, 0, 0, 0.45);
}
[data-os="mac"] .win.is-active { box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.9), inset 0 0 0 0.5px rgba(255, 255, 255, 0.2), 0 16px 40px rgba(0, 0, 0, 0.45), 0 40px 100px rgba(0, 0, 0, 0.55); }
[data-os="mac"] .win .tb { height: 30px; background: #2a2a2a; border-bottom: 1px solid rgba(0, 0, 0, 0.6); font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.86); padding: 0 12px; text-align: center; }
[data-os="mac"] .win:not(.is-active) .tb { color: rgba(255, 255, 255, 0.42); background: #262626; }
[data-os="mac"] .win .tb .tb-title { padding-right: 52px; }
[data-os="mac"] .lights { display: flex; gap: 8px; flex: none; }
[data-os="mac"] .light { width: 12px; height: 12px; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25); }
[data-os="mac"] .light.c { background: #ff5f57; }
[data-os="mac"] .light.m { background: #febc2e; }
[data-os="mac"] .light.z { background: #28c840; }
[data-os="mac"] .win:not(.is-active) .light { background: #4a4a4a; }
[data-os="mac"] .lights:hover .light::after { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; font-weight: 800; line-height: 1; color: rgba(0, 0, 0, 0.55); }
[data-os="mac"] .lights:hover .light.c::after { content: "×"; font-size: 11px; }
[data-os="mac"] .lights:hover .light.m::after { content: "–"; }
[data-os="mac"] .lights:hover .light.z::after { content: "+"; font-size: 11px; }
[data-os="mac"] .win:not(.is-active) .lights:hover .light.c { background: #ff5f57; }
[data-os="mac"] .win:not(.is-active) .lights:hover .light.m { background: #febc2e; }
[data-os="mac"] .win:not(.is-active) .lights:hover .light.z { background: #28c840; }
[data-os="mac"] .win .tb.tall { height: 52px; }
[data-os="mac"] .toolbar-url { flex: 1; display: flex; justify-content: center; }
[data-os="mac"] .toolbar-url span { width: min(420px, 70%); height: 30px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.8); }
[data-os="mac"] .tb-tools { display: flex; gap: 16px; opacity: 0.6; font-weight: 400; font-size: 15px; }

/* --- Taskbar (Windows 11) --- */
.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 48px; z-index: 40;
  display: flex; align-items: center; padding: 0 12px;
  background: rgba(30, 30, 32, 0.82);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
}
.tb-weather { display: flex; align-items: center; gap: 8px; width: 260px; color: #fff; }
.tb-weather small { display: block; color: rgba(255, 255, 255, 0.65); font-size: 11.5px; }
.tb-center { flex: 1; display: flex; justify-content: center; gap: 4px; }
.tbtn { position: relative; width: 40px; height: 40px; border-radius: 5px; display: grid; place-items: center; border: 0; background: transparent; cursor: default; }
.tbtn:hover { background: rgba(255, 255, 255, 0.07); }
.tbtn svg, .tbtn .appicon { width: 24px; height: 24px; }
.tbtn.running::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 6px; height: 3px; margin-left: -3px; border-radius: 3px; background: rgba(255, 255, 255, 0.55); transition: width 0.2s, margin 0.2s, background 0.2s; }
.tbtn.focused { background: rgba(255, 255, 255, 0.07); }
.tbtn.focused::after { width: 16px; margin-left: -8px; background: #4cc2ff; }
.tb-search { display: flex; align-items: center; gap: 10px; width: 200px; height: 34px; margin: 3px 6px 0 2px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.6); }
.tb-search svg { width: 15px; height: 15px; }
.tb-tray { width: 260px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; color: #fff; }
.tray-ic { display: grid; place-items: center; height: 36px; padding: 0 6px; border-radius: 5px; }
.tray-ic:hover { background: rgba(255, 255, 255, 0.07); }
.tray-ic svg { width: 15px; height: 15px; }
.tray-group { display: flex; gap: 8px; padding: 0 8px; }
.tray-clock { text-align: right; line-height: 1.3; padding: 0 8px; font-size: 12px; }

/* --- Menu bar + Dock (macOS) --- */
.menubar {
  position: absolute; left: 0; right: 0; top: 0; height: 26px; z-index: 40;
  display: flex; align-items: center; gap: 20px; padding: 0 14px;
  background: rgba(20, 20, 26, 0.38);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  font-size: 13.5px; font-weight: 500; color: #fff;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
}
.menubar .apple { width: 15px; height: 15px; }
.menubar b { font-weight: 700; }
.mb-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.mb-right svg { width: 16px; height: 16px; }
.mb-quad { display: grid; place-items: center; width: 26px; height: 20px; border-radius: 5px; }
.mb-quad.on { background: rgba(255, 255, 255, 0.22); }

.dock {
  position: absolute; left: 50%; bottom: 8px; z-index: 40;
  transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 6px; height: 72px; padding: 8px 9px;
  border-radius: 22px;
  background: rgba(46, 46, 54, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(30px) saturate(1.8);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.dk { position: relative; width: 54px; height: 54px; border: 0; padding: 0; background: none; cursor: default; transition: transform 0.18s var(--ease-out); transform-origin: 50% 100%; }
.dk:hover { transform: scale(1.28) translateY(-6px); }
.dk:hover + .dk, .dk:has(+ .dk:hover) { transform: scale(1.12) translateY(-2px); }
.dk .appicon { width: 100%; height: 100%; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35)); }
.dk.running::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); }
.dk-sep { width: 1px; align-self: stretch; margin: 4px 4px; background: rgba(255, 255, 255, 0.25); }
.dk-tip { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -14px); padding: 4px 10px; border-radius: 6px; background: rgba(40, 40, 46, 0.9); border: 1px solid rgba(255, 255, 255, 0.12); font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.dk:hover .dk-tip { opacity: 1; }

/* --- Quadessa minimap HUD --- */
.hud {
  --hud-card: rgba(17, 18, 23, 0.94);
  --hud-radar: #090a0f;
  --hud-border: rgba(255, 255, 255, 0.16);
  --hud-accent: #38bdf8;
  --hud-accent-2: #0284c7;
  --hud-text: #e8eaee;
  --hud-muted: rgba(232, 234, 238, 0.55);
  position: absolute; right: 18px; top: 18px; z-index: 30;
  width: 330px;
  border-radius: 12px;
  background: var(--hud-card);
  border: 1px solid var(--hud-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--hud-text);
  font-family: "Segoe UI Variable Text", "Inter", system-ui, sans-serif;
  font-size: 11px;
  padding: 10px 10px 8px;
  transition: opacity 0.25s, transform 0.25s var(--ease-out);
}
.stage[data-os="mac"] .hud { top: 40px; font-family: -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif; }
.hud[data-theme="CyberpunkNeon"] { --hud-card: rgba(18, 19, 36, 0.95); --hud-radar: #06070f; --hud-border: #ff2a85; --hud-accent: #00f0ff; --hud-accent-2: #ff2a85; }
.hud[data-theme="NordicFrost"] { --hud-card: rgba(46, 52, 64, 0.96); --hud-radar: #1d212a; --hud-border: #4c566a; --hud-accent: #88c0d0; --hud-accent-2: #5e81ac; --hud-text: #eceff4; }
.hud[data-theme="EmeraldMatrix"] { --hud-card: rgba(14, 26, 19, 0.96); --hud-radar: #050a07; --hud-border: #234230; --hud-accent: #3fb950; --hud-accent-2: #238636; --hud-text: #d6f5dc; }
.hud[data-theme="SolarAmber"] { --hud-card: rgba(28, 22, 18, 0.96); --hud-radar: #0c0907; --hud-border: #45352a; --hud-accent: #f0883e; --hud-accent-2: #bd561d; --hud-text: #fbe8d6; }
.hud[data-theme="DaylightGlass"] { --hud-card: rgba(34, 45, 61, 0.95); --hud-radar: #111822; --hud-border: #4a5e7a; --hud-accent: #7dd3fc; --hud-accent-2: #0284c7; }
.hud-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.hud-head b { font-size: 11.5px; letter-spacing: 0.12em; }
.hud-count { color: var(--hud-muted); margin-right: auto; }
.hud-btn {
  height: 22px; min-width: 26px; padding: 0 6px; border-radius: 5px;
  border: 1px solid var(--hud-border); background: rgba(255, 255, 255, 0.04);
  color: var(--hud-text); font: 600 10.5px/1 inherit; cursor: pointer;
  display: inline-grid; place-items: center;
}
.hud-btn:hover { border-color: var(--hud-accent); }
.hud-btn.on { background: var(--hud-accent); border-color: var(--hud-accent); color: #050608; }
.hud-body { display: flex; gap: 8px; }
.radar { position: relative; flex: 1; aspect-ratio: 16 / 9; border-radius: 7px; background: var(--hud-radar); border: 1px solid var(--hud-border); overflow: hidden; cursor: pointer; touch-action: none; }
.rq { position: absolute; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.06); }
.rq span { position: absolute; left: 4px; top: 2px; font-size: 8.5px; color: var(--hud-muted); white-space: nowrap; }
.rq.on { border-color: color-mix(in srgb, var(--hud-accent) 55%, transparent); background: color-mix(in srgb, var(--hud-accent) 8%, transparent); }
.rq.drop { z-index: 2; border: 2px solid var(--hud-accent); background: color-mix(in srgb, var(--hud-accent) 24%, transparent); box-shadow: inset 0 0 18px color-mix(in srgb, var(--hud-accent) 35%, transparent); }
.rq.drop span { color: var(--hud-accent); font-weight: 700; }
.hud.dropping { border-color: var(--hud-accent); box-shadow: 0 0 0 1px var(--hud-accent), 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 40px color-mix(in srgb, var(--hud-accent) 30%, transparent); }
.rw { position: absolute; border-radius: 2px; background: color-mix(in srgb, var(--c) 55%, #1b1f27); border: 1px solid color-mix(in srgb, var(--c) 80%, #fff 0%); opacity: 0.55; cursor: grab; transition: opacity 0.2s; z-index: 3; }
.rw.vis { opacity: 0.95; }
.rw.pin { box-shadow: 0 0 0 1.5px #fff; }
.rw.dragging { cursor: grabbing; opacity: 1; z-index: 4; }
.rcam { position: absolute; border: 1.5px solid var(--hud-accent); border-radius: 3px; background: color-mix(in srgb, var(--hud-accent) 10%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--hud-accent) 50%, transparent); pointer-events: none; z-index: 5; }
.hud-zoom { width: 26px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hud-zoom .track { position: relative; flex: 1; width: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); }
.hud-zoom .fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 4px; background: var(--hud-accent); }
.hud-zoom .knob { position: absolute; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.hud-foot { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.hud-coords { margin-right: auto; font-family: var(--font-mono); font-size: 10px; color: var(--hud-muted); }

/* Minimap context menu (OS-styled) */
.ctx {
  position: absolute; z-index: 60; min-width: 236px; padding: 4px;
  font-size: 13px; color: #f1f1f1;
  border-radius: 8px;
  background: rgba(44, 44, 44, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
[data-os="mac"] .ctx { border-radius: 10px; padding: 5px; background: rgba(40, 40, 44, 0.8); font-size: 13px; }
.ctx-h { padding: 6px 10px 4px; font-size: 11.5px; color: rgba(255, 255, 255, 0.5); }
.ctx button { display: flex; align-items: center; width: 100%; gap: 10px; padding: 7px 10px; border: 0; border-radius: 5px; background: none; color: inherit; font: inherit; text-align: left; cursor: default; }
[data-os="mac"] .ctx button { padding: 4px 10px; }
.ctx button:hover { background: rgba(255, 255, 255, 0.08); }
[data-os="mac"] .ctx button:hover { background: #0a64d6; }
.ctx button .chk { width: 12px; }
.ctx button kbd { margin-left: auto; background: none; border: 0; padding: 0; color: rgba(255, 255, 255, 0.45); font-family: inherit; font-size: 12px; }
.ctx hr { border: 0; height: 1px; margin: 4px 6px; background: rgba(255, 255, 255, 0.1); }

/* Coach mark */
.coach {
  position: absolute; left: 50%; top: 50%; z-index: 55;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 14px;
  padding: 0.6em 1em 0.6em 0.7em; border-radius: 12px;
  background: rgba(10, 11, 14, 0.82); border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  font: 600 clamp(22px, calc(13px / var(--s, 1)), 60px)/1.2 var(--font-body); color: #fff; white-space: nowrap;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: opacity 0.5s, transform 0.5s var(--ease-out);
}
.coach svg { width: 1.5em; height: 1.5em; animation: nudge 1.6s ease-in-out infinite; }
.coach.gone { opacity: 0; transform: translate(-50%, -40%); }
.coach.hold { opacity: 0; transition: none; }

/* First-look tour: a cursor that clicks the minimap quadrants (sized in stage pixels, so it scales with the screen) */
.tour-cur { position: absolute; z-index: 70; width: 44px; height: 52px; pointer-events: none; opacity: 0;
  transition: left 0.65s cubic-bezier(0.45, 0, 0.2, 1), top 0.65s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.3s; }
.tour-cur.show { opacity: 1; }
.tour-cur svg { position: absolute; left: -3px; top: -2px; width: 44px; height: 52px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)); transition: transform 0.12s; }
.tour-cur.click svg { animation: tour-press 0.32s ease-out; }
.tour-cur .ring { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; border: 3px solid rgba(56, 189, 248, 0.9); opacity: 0; transform: scale(0.3); }
.tour-cur.click .ring { animation: tour-ring 0.6s ease-out; }
.rq.tapped { animation: tour-tap 0.7s ease-out; }
@keyframes tour-press { 40% { transform: scale(0.85); } }
@keyframes tour-ring { 0% { opacity: 1; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes tour-tap { 0% { background: color-mix(in srgb, var(--hud-accent) 45%, transparent); } 100% { background: transparent; } }
@keyframes nudge { 0%, 100% { transform: translateX(-8px); } 50% { transform: translateX(10px); } }

/* ---------------- App content (shared across OSes) ---------------- */
.appicon { display: block; }
.mono-ui { font-family: "Cascadia Code", "SF Mono", "JetBrains Mono", Consolas, monospace; }

/* Code editor */
.ed-act { width: 46px; background: #181818; border-right: 1px solid #2b2b2b; display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 14px; }
.ed-act i { width: 22px; height: 22px; border-radius: 5px; border: 2px solid #6e6e6e; opacity: 0.8; }
.ed-act i:first-child { border-color: #e4e4e4; }
.ed-side { width: 220px; background: #181818; border-right: 1px solid #2b2b2b; padding: 10px 0; font-size: 12.5px; color: #cccccc; }
.ed-side h6 { margin: 0 0 8px; padding: 0 16px; font: 600 11px/1 var(--ui); letter-spacing: 0.06em; color: #9d9d9d; }
.ed-side div { padding: 3px 16px; white-space: nowrap; }
.ed-side .sel { background: #37373d; color: #fff; }
.ed-side .ind1 { padding-left: 30px; }
.ed-side .ind2 { padding-left: 44px; }
.ed-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #1f1f1f; }
.ed-tabs { display: flex; background: #181818; height: 36px; border-bottom: 1px solid #2b2b2b; }
.ed-tabs span { display: flex; align-items: center; gap: 8px; padding: 0 16px; font-size: 12.5px; color: #9d9d9d; border-right: 1px solid #2b2b2b; }
.ed-tabs span.on { background: #1f1f1f; color: #fff; box-shadow: inset 0 1px 0 #0078d4; }
.ed-tabs b { color: #3b8eea; font-size: 11px; }
.ed-code { flex: 1; padding: 10px 0; font-size: 13px; line-height: 21px; overflow: hidden; }
.ed-code div { white-space: pre; padding-left: 14px; color: #cccccc; }
.ed-code .n { display: inline-block; width: 36px; color: #6e7681; text-align: right; margin-right: 22px; }
.ed-code .hl { background: rgba(255, 255, 255, 0.04); }
.k { color: #569cd6; } .f { color: #dcdcaa; } .s { color: #ce9178; } .t { color: #4ec9b0; } .c { color: #6a9955; } .v { color: #9cdcfe; } .num { color: #b5cea8; } .p { color: #c586c0; }
.ed-status { height: 24px; display: flex; align-items: center; gap: 16px; padding: 0 12px; background: #0078d4; color: #fff; font-size: 11.5px; }
.ed-status span:last-child { margin-left: auto; }

/* Terminal */
.term { flex: 1; background: #0c0c0c; padding: 12px 16px; font-size: 13px; line-height: 20px; color: #cccccc; white-space: pre; overflow: hidden; }
[data-os="mac"] .term { background: #1b1b1b; }
.term .pr { color: #3b9cff; } .term .ok { color: #16c60c; } .term .dim { color: #767676; } .term .yl { color: #f9f1a5; }
.term .cur { display: inline-block; width: 8px; height: 16px; vertical-align: -3px; background: #cccccc; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Browser */
.br { flex: 1; display: flex; flex-direction: column; background: #fff; color: #1d1d1f; }
.br-bar { height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: #2b2b2b; color: #fff; }
.br-bar .nav-i { display: flex; gap: 14px; opacity: 0.75; font-size: 15px; }
.br-bar .url { flex: 1; height: 28px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px; background: #1c1c1c; font-size: 12.5px; color: #d0d0d0; }
.br-bar .url i { width: 11px; height: 11px; border: 1.5px solid #9a9a9a; border-radius: 3px 3px 2px 2px; }
[data-os="mac"] .br-bar { display: none; }
.br-page { flex: 1; display: grid; grid-template-columns: 1fr 230px; gap: 34px; padding: 30px 40px; overflow: hidden; }
.br-kick { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: #6b4ef6; text-transform: uppercase; }
.br-page h4 { margin: 8px 0 12px; font: 700 30px/1.12 Georgia, "Times New Roman", serif; letter-spacing: -0.01em; color: #111; }
.br-hero { height: 200px; border-radius: 10px; margin-bottom: 16px; background: linear-gradient(180deg, #7aa7d9 0%, #b9d3ea 45%, #e9d5b8 70%, #c4a27e 100%); position: relative; overflow: hidden; }
.br-hero::before { content: ""; position: absolute; left: -5%; right: -5%; bottom: 0; height: 58%; background: linear-gradient(160deg, #3d5a73 0 30%, transparent 30.5%), linear-gradient(200deg, #4f6f86 0 34%, transparent 34.5%), linear-gradient(180deg, #2f4658, #22303d); clip-path: polygon(0 60%, 18% 20%, 33% 48%, 52% 4%, 70% 40%, 84% 18%, 100% 52%, 100% 100%, 0 100%); }
.br-page p { font: 15px/1.6 Georgia, serif; color: #333; margin: 0 0 10px; }
.br-aside h5 { margin: 0 0 12px; font: 700 12px/1 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; color: #777; }
.br-aside a { display: block; padding: 10px 0; border-top: 1px solid #e6e6e6; font-size: 13.5px; font-weight: 600; color: #222; line-height: 1.35; }
.br-aside a small { display: block; font-weight: 400; color: #888; margin-top: 3px; }

/* Notes */
.nt-side { width: 170px; background: #262626; border-right: 1px solid #333; padding: 12px 8px; font-size: 12.5px; }
.nt-side div { padding: 8px 10px; border-radius: 6px; margin-bottom: 2px; color: #ddd; }
.nt-side div small { display: block; color: #8a8a8a; font-size: 11px; margin-top: 2px; }
.nt-side .on { background: #f5c518; color: #1a1a1a; }
.nt-side .on small { color: #5a4a00; }
.nt-doc { flex: 1; background: #1e1e1e; padding: 20px 22px; font-size: 13.5px; color: #e8e8e8; }
.nt-doc h5 { margin: 0 0 4px; font: 700 20px/1.2 var(--ui); }
.nt-doc .date { color: #8a8a8a; font-size: 11.5px; margin-bottom: 14px; }
.nt-doc label { display: flex; gap: 10px; align-items: center; padding: 5px 0; }
.nt-doc label i { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid #8a8a8a; flex: none; }
.nt-doc label.d i { background: #f5c518; border-color: #f5c518; }
.nt-doc label.d span { color: #8a8a8a; text-decoration: line-through; }

/* Chat */
.ch-servers { width: 64px; background: #131418; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 12px; }
.ch-servers i { width: 42px; height: 42px; border-radius: 14px; background: #2a2d36; display: grid; place-items: center; font: 700 14px var(--ui); color: #ddd; font-style: normal; }
.ch-servers i.on { background: #6d5dfc; color: #fff; border-radius: 12px; }
.ch-chan { width: 210px; background: #1b1c21; padding: 14px 10px; font-size: 13px; color: #9aa0ab; }
.ch-chan h6 { margin: 0 0 12px; padding: 0 8px; font: 700 13px var(--ui); color: #f0f0f0; }
.ch-chan div { padding: 6px 8px; border-radius: 6px; }
.ch-chan .on { background: #2c2e36; color: #fff; }
.ch-chan .unread { color: #f0f0f0; font-weight: 600; }
.ch-main { flex: 1; display: flex; flex-direction: column; background: #22232a; min-width: 0; }
.ch-top { height: 46px; display: flex; align-items: center; padding: 0 18px; border-bottom: 1px solid #191a1f; font-weight: 700; font-size: 14px; color: #fff; }
.ch-msgs { flex: 1; padding: 14px 18px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.msg { display: flex; gap: 12px; }
.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 700 13px var(--ui); color: #fff; }
.msg b { font-size: 13.5px; color: #fff; }
.msg time { margin-left: 8px; font-size: 11px; color: #7d828c; }
.msg p { margin: 2px 0 0; font-size: 13.5px; color: #d6d8dd; line-height: 1.45; }
.msg .react { display: inline-flex; gap: 6px; margin-top: 6px; font-size: 12px; }
.msg .react span { padding: 2px 8px; border-radius: 8px; background: #2c2f3a; border: 1px solid #3c4152; color: #cdd2ff; }
.ch-input { margin: 0 18px 18px; height: 42px; display: flex; align-items: center; padding: 0 14px; border-radius: 8px; background: #2b2d35; color: #7d828c; font-size: 13.5px; }

/* Mail */
.ml-list { width: 300px; background: #1c1c1e; border-right: 1px solid #2f2f32; overflow: hidden; }
.ml-head { padding: 14px 16px 10px; font: 700 18px var(--ui); color: #fff; }
.ml-head small { display: block; font: 400 11.5px var(--ui); color: #8e8e93; margin-top: 2px; }
.ml-item { padding: 10px 16px 11px 26px; border-top: 1px solid #2a2a2d; font-size: 12.5px; position: relative; }
.ml-item.unread::before { content: ""; position: absolute; left: 10px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: #0a84ff; }
.ml-item.on { background: #0a5bd6; border-radius: 6px; margin: 0 6px; padding-left: 20px; }
.ml-item b { display: flex; justify-content: space-between; color: #fff; font-size: 13px; }
.ml-item b span { font-weight: 400; color: #8e8e93; font-size: 11.5px; }
.ml-item.on b span, .ml-item.on .sub, .ml-item.on .pre { color: rgba(255, 255, 255, 0.85); }
.ml-item .sub { color: #e5e5ea; margin-top: 1px; }
.ml-item .pre { color: #8e8e93; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-read { flex: 1; background: #1e1e1e; padding: 22px 26px; font-size: 13.5px; color: #d8d8dc; min-width: 0; }
.ml-read h5 { margin: 0 0 10px; font: 700 19px/1.25 var(--ui); color: #fff; }
.ml-from { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 12.5px; color: #8e8e93; }
.ml-from b { color: #fff; display: block; font-size: 13px; }
.ml-read p { margin: 0 0 10px; line-height: 1.55; }

/* Music */
.mu { flex: 1; display: flex; background: linear-gradient(180deg, #2a1830 0%, #141016 60%); }
.mu-side { width: 170px; background: rgba(0, 0, 0, 0.25); padding: 16px 12px; font-size: 13px; color: #c9c2cf; }
.mu-side h6 { margin: 14px 8px 6px; font: 600 11px var(--ui); letter-spacing: 0.05em; color: #8a8090; text-transform: uppercase; }
.mu-side div { padding: 5px 8px; border-radius: 6px; }
.mu-side .on { background: rgba(255, 255, 255, 0.1); color: #fff; }
.mu-main { flex: 1; padding: 22px; display: flex; flex-direction: column; min-width: 0; }
.mu-now { display: flex; gap: 18px; align-items: flex-end; }
.mu-art { width: 150px; height: 150px; border-radius: 10px; flex: none; background: radial-gradient(circle at 30% 30%, #ff9a8b, transparent 55%), radial-gradient(circle at 75% 70%, #8f5bff, transparent 55%), linear-gradient(135deg, #ff5e7e, #5b2bd6); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.mu-now small { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: #b9aec0; text-transform: uppercase; }
.mu-now h5 { margin: 6px 0 4px; font: 800 26px/1.1 var(--ui); color: #fff; }
.mu-now p { font-size: 13px; color: #c9c2cf; }
.mu-ctrl { display: flex; align-items: center; gap: 18px; margin: 18px 0 10px; color: #fff; }
.mu-ctrl .play { width: 40px; height: 40px; border-radius: 50%; background: #fa2d55; display: grid; place-items: center; }
.mu-ctrl .play i { width: 0; height: 0; border-left: 12px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 3px; }
.mu-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.15); }
.mu-bar i { display: block; width: 46%; height: 100%; border-radius: inherit; background: #fff; }
.mu-times { display: flex; justify-content: space-between; font-size: 11px; color: #9a90a0; margin-top: 4px; }
.mu-q { margin-top: 12px; font-size: 13px; }
.mu-q div { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; padding: 7px 4px; border-top: 1px solid rgba(255, 255, 255, 0.07); color: #ddd5e2; }
.mu-q div span:first-child, .mu-q div span:last-child { color: #8a8090; }
.mu-q .on span:nth-child(2) { color: #fa2d55; font-weight: 600; }

/* Calendar */
.cal { flex: 1; display: flex; flex-direction: column; background: #1e1e1e; color: #e5e5e5; min-width: 0; }
.cal-top { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid #2d2d2d; }
.cal-top h5 { margin: 0; font: 700 20px var(--ui); color: #fff; }
.cal-top span { margin-left: auto; display: flex; gap: 2px; padding: 2px; border-radius: 7px; background: #2c2c2e; font-size: 12px; }
.cal-top span i { font-style: normal; padding: 3px 12px; border-radius: 5px; color: #bbb; }
.cal-top span i.on { background: #5a5a5e; color: #fff; }
.cal-grid { flex: 1; display: grid; grid-template-columns: 48px repeat(5, 1fr); position: relative; overflow: hidden; }
.cal-days { display: contents; }
.cal-d { height: 46px; padding: 8px 10px; font-size: 11.5px; color: #9a9a9e; border-bottom: 1px solid #2d2d2d; border-left: 1px solid #2d2d2d; }
.cal-d b { display: block; font: 600 17px var(--ui); color: #fff; }
.cal-d.today b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #ff3b30; font-size: 15px; }
.cal-hours { grid-column: 1; grid-row: 2; font-size: 10.5px; color: #8a8a8e; }
.cal-hours div { height: 58px; text-align: right; padding-right: 8px; transform: translateY(-7px); }
.cal-col { position: relative; grid-row: 2; border-left: 1px solid #2d2d2d; background-image: linear-gradient(#2a2a2a 1px, transparent 1px); background-size: 100% 58px; }
.ev { position: absolute; left: 4px; right: 6px; padding: 5px 8px; border-radius: 6px; font-size: 11.5px; line-height: 1.3; color: #fff; border-left: 3px solid var(--e); background: color-mix(in srgb, var(--e) 32%, #1e1e1e); overflow: hidden; }
.ev b { display: block; font-size: 12px; }
.ev small { color: rgba(255, 255, 255, 0.7); }

/* Dragging the wallpaper or a window's body glides the canvas, so say so with the cursor */
.screen .stage { cursor: grab; }
.screen .menubar, .screen .taskbar, .screen .dock, .screen .hud, .screen .ctx { cursor: default; }
