/* =========================================================================
   MACOS TAHOE LIQUID TITANIUM × GHOSTTY GETH × LINEAR DARK × TEENAGE ENG.
   92% Pure Carbon-Titanium Neutral Glass · Single Bio-Signal Emerald (#2ef29b)
   Porcelain White Primary Actions · 1px Optical Bevels · Zero Neon Slop
   ========================================================================= */

@property --beam-rot {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg-carbon: #07080b;
  --menubar-bg: rgba(11, 13, 20, 0.56);
  --menubar-ink: rgba(244, 245, 248, 0.94);
  --win-bg: rgba(14, 16, 25, 0.58);
  --win-bar: rgba(22, 25, 38, 0.62);
  --win-sub: rgba(255, 255, 255, 0.042);
  --win-sub-hover: rgba(255, 255, 255, 0.072);
  --win-border: rgba(255, 255, 255, 0.14);
  --win-border-focus: rgba(199, 210, 254, 0.34);
  --hairline: rgba(255, 255, 255, 0.085);
  --win-edge-top: rgba(255, 255, 255, 0.28);

  --ink: #f5f5f7;
  --ink-2: #a5a8b8;
  --ink-3: #686b7d;

  /* Authentic Ethereum Core × Comic Phage Palette (Periwinkle Cobalt + Phosphor Mint + Signal Coral) */
  --bio: #7c93ff;
  --bio-soft: rgba(124, 147, 255, 0.14);
  --bio-line: rgba(124, 147, 255, 0.45);
  --mint: #2ef2b8;
  --mint-soft: rgba(46, 242, 184, 0.13);
  --mint-line: rgba(46, 242, 184, 0.44);
  --crimson: #fb7185;
  --amber: #f59e0b;

  --btn-pri-bg: #f5f5f7;
  --btn-pri-hover: #ffffff;
  --btn-pri-ink: #0a0b0e;

  --term-bg: rgba(8, 10, 17, 0.72);
  --dock-bg: rgba(18, 20, 30, 0.52);

  --win-shadow:
    0 24px 64px rgba(0, 0, 0, 0.62),
    0 0 0 0.5px rgba(0, 0, 0, 0.52),
    0 0.5px 0 rgba(255, 255, 255, 0.36) inset,
    0 0 0 0.5px rgba(255, 255, 255, 0.08) inset;
  --win-shadow-focus:
    0 36px 96px rgba(0, 0, 0, 0.8),
    0 0 0 0.5px rgba(0, 0, 0, 0.58),
    0 0.5px 0 rgba(255, 255, 255, 0.42) inset,
    0 0 0 0.5px rgba(165, 180, 252, 0.22) inset;

  --f-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Noto Sans SC", sans-serif;
  --f-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --f-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
  --spring: cubic-bezier(0.32, 1.24, 0.58, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
  --bg-carbon: #f0efe9;
  --menubar-bg: rgba(248, 247, 243, 0.72);
  --menubar-ink: rgba(17, 18, 22, 0.92);
  --win-bg: rgba(249, 248, 245, 0.72);
  --win-bar: rgba(242, 241, 236, 0.76);
  --win-sub: rgba(17, 18, 22, 0.04);
  --win-sub-hover: rgba(17, 18, 22, 0.068);
  --win-border: rgba(255, 255, 255, 0.68);
  --win-border-focus: rgba(79, 107, 255, 0.42);
  --hairline: rgba(17, 18, 22, 0.08);
  --win-edge-top: rgba(255, 255, 255, 0.98);

  --ink: #111216;
  --ink-2: #444652;
  --ink-3: #727482;

  --bio: #4f6bff;
  --bio-soft: rgba(79, 107, 255, 0.11);
  --bio-line: rgba(79, 107, 255, 0.38);
  --crimson: #e11d48;

  --btn-pri-bg: #111216;
  --btn-pri-hover: #25272e;
  --btn-pri-ink: #ffffff;

  --term-bg: rgba(10, 12, 20, 0.86);
  --dock-bg: rgba(248, 247, 243, 0.62);

  --win-shadow:
    0 22px 54px rgba(15, 23, 42, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.94) inset;
  --win-shadow-focus:
    0 32px 76px rgba(15, 23, 42, 0.26),
    0 1px 0 #ffffff inset;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg-carbon);
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sr-canvas { display: none; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Semantic Micro-Dots (Replacing Rainbow Badges) */
.dot-bio, .dot-mint, .dot-crimson, .dot-silver, .dot-dim {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.dot-bio { background: var(--bio); }
.dot-mint { background: var(--mint); box-shadow: 0 0 6px rgba(46, 242, 184, 0.65); }
.dot-crimson { background: var(--crimson); }
.dot-silver { background: #a1a1aa; }
.dot-dim { background: #52525b; }

/* ==================== WALLPAPER + ZERO-CPU PRECISION GRID & GPU WAVEFRONT ==================== */
.mac-wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  contain: strict;
  background: #050506;
}
.mac-wallpaper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.04) brightness(0.92);
  transition: filter 280ms var(--ease);
}
:root[data-theme="light"] .mac-wallpaper img {
  filter: saturate(0.92) brightness(1.24) contrast(0.94);
}
.wallpaper-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(244, 244, 246, 0.09) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 48%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 48%, #000 40%, transparent 100%);
}
/* Top-layer GPU-composited pointer ripple overlay (ABOVE backdrop-filter -> 0ms glass re-blur!) */
.click-fx-layer {
  position: fixed;
  inset: 0;
  z-index: 160;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}
.fx-ring {
  position: absolute;
  left: 0; top: 0;
  width: 112px; height: 112px;
  margin: -56px 0 0 -56px;
  border-radius: 50%;
  border: 1px solid rgba(165, 180, 252, 0.78);
  background: radial-gradient(circle, rgba(124, 147, 255, 0.16) 0%, rgba(124, 147, 255, 0.03) 56%, transparent 72%);
  will-change: transform, opacity;
}
.fx-ring-coral {
  border-color: rgba(251, 113, 133, 0.56);
  background: none;
}
.fx-dot {
  position: absolute;
  left: 0; top: 0;
  width: 24px; height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 246, 255, 0.85) 0%, rgba(124, 147, 255, 0.32) 48%, transparent 74%);
  will-change: transform, opacity;
}

/* ==================== TOP MACOS MENU BAR ==================== */
.mac-menubar {
  position: fixed;
  top: 0; left: 0; right: 0; height: 28px; z-index: 200;
  padding: 0 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  overflow: hidden;
  background: var(--menubar-bg);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  border-bottom: 0.5px solid var(--hairline);
  color: var(--menubar-ink);
  font-size: 12px;
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 2px; flex-shrink: 0; white-space: nowrap; }
.mb-apple {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 24px; height: 22px; border: none; border-radius: 5px;
  background: transparent; color: inherit; cursor: pointer;
}
.mb-item {
  height: 22px; padding: 0 7px; border: none; border-radius: 5px;
  background: transparent; color: inherit; font-family: inherit; font-size: 12px; font-weight: 500;
  text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; flex-shrink: 0; cursor: pointer;
  transition: background 140ms;
}
.mb-bold { font-weight: 700; }
.mb-item:hover, .mb-apple:hover, .mb-btn:hover { background: rgba(255, 255, 255, 0.1); }
:root[data-theme="light"] .mb-item:hover,
:root[data-theme="light"] .mb-btn:hover { background: rgba(0, 0, 0, 0.06); }
.mb-ext { color: var(--ink-2); }
.mb-ext:hover { color: var(--ink); }

.mb-stat {
  display: inline-flex; align-items: center; gap: 5px; padding: 0 5px;
  white-space: nowrap; flex-shrink: 0;
  font-family: var(--f-mono); font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--menubar-ink); opacity: 0.9;
}
.mb-stat-btn {
  height: 21px; border: none; border-radius: 5px; background: transparent; cursor: pointer;
  transition: background 140ms, opacity 140ms;
}
.mb-stat-btn:hover { background: rgba(255, 255, 255, 0.1); opacity: 1; }
:root[data-theme="light"] .mb-stat-btn:hover { background: rgba(0, 0, 0, 0.06); }
.mb-muted { opacity: 0.52; }
.mb-sep { width: 1px; height: 12px; background: rgba(255, 255, 255, 0.13); margin: 0 4px; }
:root[data-theme="light"] .mb-sep { background: rgba(17, 17, 20, 0.14); }
.mb-led { width: 5.5px; height: 5.5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 7px rgba(46, 242, 184, 0.7); }
body:not(.motion-paused) .mb-led { animation: ledPulse 2.6s ease-in-out infinite; }
@keyframes ledPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.mb-btn {
  height: 21px; padding: 0 6px; border: none; border-radius: 5px;
  background: transparent; color: var(--ink-2); font-family: var(--f-mono); font-size: 11px; cursor: pointer;
  transition: color 140ms, background 140ms;
}
.mb-btn:hover { color: var(--ink); }
.mb-ico-text {
  min-width: 24px; padding: 0 5px;
  font-family: var(--f-sans); font-size: 11.5px; font-weight: 600;
  color: var(--menubar-ink); opacity: 0.86;
}
.mb-ico-text:hover { opacity: 1; }
.mb-ico-btn {
  width: 24px; height: 21px; padding: 0; border: none; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--menubar-ink); opacity: 0.84; cursor: pointer;
  transition: opacity 140ms, background 140ms, color 140ms, transform 120ms var(--spring);
}
.mb-ico-btn:hover { opacity: 1; background: rgba(255, 255, 255, 0.11); }
:root[data-theme="light"] .mb-ico-btn:hover { background: rgba(0, 0, 0, 0.07); }
.mb-ico-btn:active { transform: scale(0.92); }
.mb-ico-btn.is-off { opacity: 0.42; }
.mb-ico-btn.is-off:hover { opacity: 0.78; }
.mb-cmd {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0.5px solid var(--hairline);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  padding: 0 8px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}
.mb-cmd:hover { border-color: var(--win-border-focus); background: rgba(255, 255, 255, 0.11); }
#hud-block { transition: color 240ms var(--ease); }
#hud-block.block-tick { color: var(--bio); }
.mb-wallet-btn {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0;
  height: 21px; padding: 0 10px; border-radius: 999px;
  border: 0.5px solid var(--win-border);
  background: rgba(255, 255, 255, 0.07);
  color: inherit; font-size: 11.5px; font-weight: 500; cursor: pointer;
  transition: background 150ms, border-color 150ms;
}
.mb-wallet-btn:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--win-border-focus); }
.wallet-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.42); transition: background 180ms; }
:root[data-theme="light"] .wallet-dot { background: rgba(17, 17, 20, 0.38); }
.mb-wallet-btn.connected .wallet-dot { background: var(--bio); }
.mb-clock { padding: 0 4px 0 6px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12px; }

/* ==================== NOTIFICATION & WALLET PILL ==================== */
.mac-notif {
  display: none; position: fixed; top: 38px; right: 16px; z-index: 250; width: 312px;
  padding: 12px 14px; border-radius: 13px; background: var(--win-bg);
  backdrop-filter: blur(36px) saturate(165%); border: 1px solid var(--win-border-focus); box-shadow: var(--win-shadow-focus);
}
.mac-notif.active { display: flex; flex-direction: column; gap: 8px; animation: notifIn 300ms var(--spring); }
@keyframes notifIn { from { opacity: 0; transform: translateX(20px) scale(0.96); } to { opacity: 1; transform: none; } }
.mn-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.mn-ico { width: 18px; height: 18px; border-radius: 4px; }
.mn-tag { margin-left: auto; font-family: var(--f-mono); font-size: 10px; color: var(--bio); }
.mn-close {
  width: 20px; height: 20px; padding: 0; border-radius: 6px; border: 0.5px solid var(--hairline);
  background: var(--win-sub); color: var(--ink-2); font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  transition: background 140ms, color 140ms, border-color 140ms;
}
.mn-close:hover { background: var(--win-sub-hover); color: var(--ink); border-color: var(--win-border-focus); }
.mn-body { font-size: 12px; color: var(--ink-2); }
.mn-actions { display: flex; gap: 6px; }

.wallet-pill-bar {
  display: none; position: fixed; top: 35px; left: 50%; transform: translateX(-50%); z-index: 180;
  padding: 4px 14px; border-radius: 999px; background: var(--menubar-bg); backdrop-filter: blur(24px);
  border: 0.5px solid var(--win-border); font-family: var(--f-mono); font-size: 11px; color: var(--menubar-ink);
  font-variant-numeric: tabular-nums; gap: 8px;
}

/* ==================== DESKTOP STAGE & DOG-EAR GLASS SHORTCUTS ==================== */
.mac-desktop { position: relative; z-index: 1; width: 100%; height: calc(100dvh - 28px); margin-top: 28px; overflow: hidden; }
.desktop-icons { position: absolute; top: 20px; right: 20px; z-index: 2; display: flex; flex-direction: column; gap: 18px; }
.desktop-icons:has(.mascot-bubble.show) { z-index: 90; }
.desk-icon {
  width: 86px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: none; background: transparent; color: rgba(244, 244, 246, 0.9); text-decoration: none;
  font-size: 11px; font-weight: 500; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85); cursor: pointer;
  transition: transform 180ms var(--spring), color 150ms;
}
.desk-icon:hover { transform: translateY(-2px); color: #ffffff; }

.di-thumb {
  width: 52px; height: 40px; border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}
.di-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.di-svg-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
  transition: filter 180ms var(--ease);
}
.desk-icon:hover .di-svg-wrap { filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.72)); }
.di-lbl {
  padding: 2px 6px; border-radius: 5px; line-height: 1.2;
  transition: background 140ms var(--ease);
}
.desk-icon:hover .di-lbl {
  background: rgba(124, 147, 255, 0.3);
  backdrop-filter: blur(8px);
}

/* Interactive Die-Cut Vinyl Comic Mascot Sticker (MacBook Sticker Vibe) */
.desk-sticker-slot {
  position: relative;
  margin-top: 16px;
  display: flex; flex-direction: column; align-items: center;
}
.desk-mascot-sticker {
  border: none; background: transparent; padding: 0; cursor: pointer;
  transform: rotate(-4deg);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.72)) drop-shadow(0 0 14px rgba(46, 242, 184, 0.22));
  transition: transform 220ms var(--spring), filter 200ms var(--ease);
}
.desk-mascot-sticker img { display: block; width: 70px; height: auto; pointer-events: none; }
.desk-mascot-sticker:hover {
  transform: rotate(3deg) scale(1.1) translateY(-4px);
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.82)) drop-shadow(0 0 18px rgba(124, 147, 255, 0.45));
}
.desk-mascot-sticker:active { transform: rotate(-2deg) scale(0.95); }
.mascot-bubble {
  position: absolute; right: calc(100% + 10px); top: 10px; z-index: 30;
  padding: 5px 10px; border-radius: 9px; white-space: nowrap; pointer-events: none;
  background: rgba(12, 15, 28, 0.94);
  border: 1px solid rgba(46, 242, 184, 0.55);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 12px rgba(46, 242, 184, 0.2);
  color: #eef2ff; font-family: var(--f-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em;
  opacity: 0; transform: translate3d(8px, 0, 0) scale(0.92);
  transition: opacity 180ms var(--ease), transform 220ms var(--spring);
}
.mascot-bubble::after {
  content: ""; position: absolute; right: -5px; top: 50%; margin-top: -4px;
  width: 8px; height: 8px; transform: rotate(45deg);
  background: rgba(12, 15, 28, 0.94);
  border-top: 1px solid rgba(46, 242, 184, 0.55);
  border-right: 1px solid rgba(46, 242, 184, 0.55);
}
.mascot-bubble.show { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }

/* Authentic Dog-Ear Frosted Dark Glass Document Icon */
.di-doc {
  position: relative; width: 42px; height: 50px; border-radius: 7px;
  background: linear-gradient(160deg, rgba(36, 36, 42, 0.88) 0%, rgba(16, 16, 20, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.52), 0 1px 0 rgba(255, 255, 255, 0.18) inset;
  backdrop-filter: blur(18px);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px 7px 6px;
  clip-path: polygon(0 0, 29px 0, 42px 13px, 42px 50px, 0 50px);
}
.di-doc::before {
  content: ""; position: absolute; top: 0; right: 0; width: 13px; height: 13px;
  background: linear-gradient(225deg, transparent 50%, rgba(255, 255, 255, 0.22) 50%);
}
.di-doc-lines { display: flex; flex-direction: column; gap: 3px; }
.di-doc-lines i { display: block; height: 1.5px; border-radius: 1px; background: rgba(255, 255, 255, 0.22); }
.di-doc-lines i:nth-child(2) { width: 82%; }
.di-doc-lines i:nth-child(3) { width: 58%; }
.di-doc-ext {
  font-family: var(--f-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  color: rgba(244, 244, 246, 0.88);
}
.di-doc-bio .di-doc-ext { color: var(--bio); }

/* ==================== MACOS SEQUOIA LIQUID GLASS WINDOWS (GPU COMPOSITED) ==================== */
.mac-win {
  position: absolute;
  display: flex; flex-direction: column;
  border-radius: 14px;
  background: var(--win-bg);
  backdrop-filter: blur(22px) saturate(185%);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  border: 1px solid var(--win-border);
  box-shadow: var(--win-shadow);
  overflow: hidden;
  contain: layout style;
  transition: box-shadow 180ms var(--ease), border-color 180ms var(--ease), opacity 160ms var(--ease), transform 190ms var(--spring);
}
body:not(.motion-paused) .win-enter {
  animation: macWake 420ms var(--spring) var(--enter-delay, 0ms) backwards;
}
@keyframes macWake {
  from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.975); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.mac-win.focused { border-color: var(--win-border-focus); box-shadow: var(--win-shadow-focus); }
.mac-win.focused::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  pointer-events: none;
  z-index: 6;
  background: radial-gradient(300px circle at var(--wx, 50%) 0px, rgba(46, 242, 184, 0.58), rgba(165, 180, 252, 0.56) 44%, transparent 74%);
  opacity: 0.94;
}
:root[data-theme="light"] .mac-win.focused::before {
  background: radial-gradient(280px circle at var(--wx, 50%) 0px, rgba(255, 255, 255, 0.98), transparent 72%);
}
.mac-win.closed { opacity: 0; pointer-events: none; transform: translate3d(0, 12px, 0) scale(0.96); }
.mac-win.is-dragging, .mac-win.is-resizing { transition: none !important; will-change: transform; }
.mac-win.is-dragging {
  box-shadow:
    0 46px 116px rgba(0, 0, 0, 0.88),
    0 0 0 0.5px rgba(165, 180, 252, 0.32),
    0 0.5px 0 rgba(255, 255, 255, 0.48) inset;
}
.mac-win.maximized {
  left: 16px !important; top: 14px !important;
  width: calc(100% - 32px) !important; height: calc(100% - 92px) !important;
}
.win-resize {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px;
  z-index: 8; cursor: nwse-resize;
}
.win-resize::after {
  content: ""; position: absolute; right: 4px; bottom: 4px; width: 6px; height: 6px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.22);
  border-bottom-right-radius: 2px;
  opacity: 0; transition: opacity 160ms;
}
.mac-win:hover .win-resize::after { opacity: 0.7; }
:root[data-theme="light"] .win-resize::after {
  border-right-color: rgba(17, 18, 22, 0.26);
  border-bottom-color: rgba(17, 18, 22, 0.26);
}
.win-resize:hover::after { opacity: 1; border-color: var(--bio); }

.win-titlebar {
  height: 36px; flex-shrink: 0; padding: 0 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, transparent 100%), var(--win-bar);
  border-bottom: 1px solid var(--hairline);
  cursor: grab;
}
.win-titlebar:active { cursor: grabbing; }

/* Authentic macOS Traffic Lights: Unfocused windows dim to neutral glass dots! */
.traffic-lights { display: flex; align-items: center; gap: 7px; }
.tl {
  width: 12px; height: 12px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; line-height: 1; color: rgba(0, 0, 0, 0.72);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.25) inset;
  transition: background 160ms;
}
.tl span { opacity: 0; transition: opacity 120ms; }
.traffic-lights:hover .tl span { opacity: 1; }
.tl-red { background: #ff5f56; }
.tl-yel { background: #ffbd2e; }
.tl-grn { background: #27c93f; }
.tl-dim { background: rgba(140, 140, 152, 0.3); cursor: default; }

.mac-win:not(.focused) .tl-red,
.mac-win:not(.focused) .tl-yel,
.mac-win:not(.focused) .tl-grn {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12) inset;
}
:root[data-theme="light"] .mac-win:not(.focused) .tl-red,
:root[data-theme="light"] .mac-win:not(.focused) .tl-yel,
:root[data-theme="light"] .mac-win:not(.focused) .tl-grn {
  background: rgba(17, 17, 20, 0.14);
}
.mac-win:not(.focused) .traffic-lights:hover .tl-red { background: #ff5f56; }
.mac-win:not(.focused) .traffic-lights:hover .tl-yel { background: #ffbd2e; }
.mac-win:not(.focused) .traffic-lights:hover .tl-grn { background: #27c93f; }

.win-title {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mac-win:not(.focused) .win-title { color: var(--ink-2); }
.win-title-right { display: flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-2); }

/* Minimalist Borderless Live Sync Label */
.status-badge-live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); font-weight: 500; font-size: 10px; letter-spacing: 0.05em;
}
.live-pulse-dot { width: 5.5px; height: 5.5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 7px rgba(46, 242, 184, 0.72); }

.mon-pill {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; flex-shrink: 0;
  padding: 2px 8px; border-radius: 5px;
  background: rgba(255, 255, 255, 0.055); border: 0.5px solid var(--win-border);
  color: var(--ink-2); font-family: var(--f-mono); font-size: 10px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* Compact macOS Segmented Control (拓扑 / 波形) */
.seg-ctrl {
  display: inline-flex; align-items: center; padding: 1.5px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.28); border: 0.5px solid var(--hairline);
}
:root[data-theme="light"] .seg-ctrl { background: rgba(17, 17, 20, 0.06); }
.seg-btn {
  height: 18px; padding: 0 8px; border: none; border-radius: 4.5px;
  background: transparent; color: var(--ink-2); font-family: var(--f-sans);
  font-size: 10.5px; font-weight: 500; cursor: pointer; transition: background 140ms, color 140ms;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active {
  background: rgba(255, 255, 255, 0.14); color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
:root[data-theme="light"] .seg-btn.active { background: #ffffff; color: #111114; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.pill-bio { color: var(--bio); background: var(--bio-soft); border-color: var(--bio-line); }
.pill-coral { color: var(--ink); border-color: rgba(244, 63, 94, 0.34); background: rgba(244, 63, 94, 0.08); }
.win-link { color: var(--ink-2); text-decoration: none; font-size: 11.5px; font-weight: 500; transition: color 140ms; }
.win-link:hover { color: var(--ink); }

/* ==================== PORCELAIN PRIMARY, CERAMIC BEAM & PRECISION SLIDERS ==================== */
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.mac-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 13px; border-radius: 7px;
  border: 1px solid var(--win-border);
  background: var(--win-sub);
  color: var(--ink); font-family: var(--f-sans); font-size: 12px; font-weight: 500;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transition: transform 140ms var(--spring), background 150ms, border-color 150ms, box-shadow 180ms;
}
.x-mention { color: #38a8ff; }
.mac-codebox { cursor: pointer; }
.mac-codebox:hover { border-color: var(--bio-line); }
.mac-btn:hover { background: var(--win-sub-hover); border-color: var(--win-border-focus); transform: translateY(-0.5px); }
.mac-btn:active { transform: scale(0.97); }

/* Flagship Porcelain White Primary Action (Apple / Linear Standard) */
.mac-btn-blue {
  background: var(--btn-pri-bg);
  border-color: transparent;
  color: var(--btn-pri-ink);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 8px 20px -10px rgba(255, 255, 255, 0.34);
}
.mac-btn-blue:hover {
  background: var(--btn-pri-hover);
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 24px -10px rgba(255, 255, 255, 0.42);
}

/* Signature Black Ceramic 1px GPU-Composited Optical Edge Button (Zero Main-Thread Paint) */
.mac-btn-beam {
  background: rgba(14, 15, 22, 0.94);
  border: 1px solid rgba(124, 147, 255, 0.42);
  color: #f5f5f7; font-weight: 600;
  z-index: 0; overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}
:root[data-theme="light"] .mac-btn-beam { background: #14151c; color: #f5f5f7; }
.mac-btn-beam::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 220px; height: 220px;
  margin: -110px 0 0 -110px;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 245deg, rgba(255, 255, 255, 0.65) 305deg, #7c93ff 345deg, transparent 360deg);
  z-index: -2; pointer-events: none; will-change: transform;
}
.mac-btn-beam::after {
  content: ""; position: absolute; inset: 1px; border-radius: calc(7px - 1px);
  background: #0e1017; z-index: -1; pointer-events: none;
}
body:not(.motion-paused) .mac-btn-beam::before { animation: beamGpuSpin 3.4s linear infinite; }
@keyframes beamGpuSpin { to { transform: rotate(360deg); } }
.mac-btn-beam:hover { border-color: rgba(165, 180, 252, 0.72); transform: translateY(-0.5px); }
.mac-btn-beam:hover::after { background: #151823; }

.mac-btn-sm { height: 28px; padding: 0 11px; font-size: 12px; }
.mac-btn-xs { height: 24px; padding: 0 9px; font-size: 11px; border-radius: 6px; }
.mac-btn.mac-btn-ico { width: 28px; min-width: 28px; padding: 0; color: var(--ink-2); }
.mac-btn.mac-btn-ico:hover { color: var(--ink); }
.btn-thumb { width: 20px; height: 14px; border-radius: 3px; object-fit: cover; }

/* macOS Sequoia Calibrated Precision Slider (4px track, 14px solid thumb, zero rainbow) */
.mac-slider {
  -webkit-appearance: none; appearance: none;
  flex: 0 0 auto; width: 100%; height: 4px; border-radius: 999px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink) var(--pct, 30%), rgba(255, 255, 255, 0.13) var(--pct, 30%));
}
.mon-slider-wrap .mac-slider { flex: 1; width: auto; }
:root[data-theme="light"] .mac-slider {
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink) var(--pct, 30%), rgba(17, 17, 20, 0.14) var(--pct, 30%));
}
.mac-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: #f4f4f6;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  transition: transform 140ms var(--spring);
}
.mac-slider::-webkit-slider-thumb:hover { transform: scale(1.14); background: #ffffff; }

/* Subtle Optical Surface Specular Follow */
.glass-spot {
  --mx: 50%; --my: 50%;
  position: relative;
  overflow: hidden;
}
.glass-spot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(180px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.055), transparent 72%);
  transition: opacity 220ms;
}
.glass-spot:hover::after { opacity: 1; }

.mac-label { font-size: 11.5px; color: var(--ink-2); font-weight: 500; }
:where(button, a, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--bio);
  outline-offset: 2px;
}
.mac-input, .mac-textarea {
  width: 100%; padding: 8px 11px; border-radius: 7px;
  border: 1px solid var(--hairline); background: var(--win-sub); color: var(--ink);
  font-family: var(--f-mono); font-size: 12px; user-select: text;
  transition: border-color 150ms, background 150ms, box-shadow 150ms;
}
.mac-input:focus, .mac-textarea:focus {
  outline: none;
  border-color: var(--bio-line);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 3px rgba(124, 147, 255, 0.22);
}
.mac-textarea { min-height: 92px; resize: vertical; }
.mac-codebox {
  padding: 9px 12px; border-radius: 7px; background: var(--win-sub); border: 1px solid var(--hairline);
  font-family: var(--f-mono); font-size: 11.5px; color: #d4d4d8;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text;
}
:root[data-theme="light"] .mac-codebox { color: #27272a; }

/* ==================== WINDOW 1: UNIFIED SEQUOIA GETH + SPATIAL 3D GLASS ==================== */
.win-titlebar-unified {
  height: 46px; padding: 0 13px; gap: 10px;
}
.tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.tb-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.tb-div { width: 1px; height: 14px; background: var(--hairline); margin: 0 2px; flex-shrink: 0; }
.gt-logo-sm { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--win-border); flex-shrink: 0; }
.gt-unified-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.gt-title { margin: 0; font-size: 13.5px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.serif-em { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 1.22em; color: var(--bio); letter-spacing: 0.01em; }
.gt-sub-inline { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }

/* Compact Ghostty Borderless Command Ribbon */
.geth-cmdbar {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 2px; padding: 5px 12px;
  background: rgba(8, 10, 17, 0.56); border-bottom: 1px solid var(--hairline);
  overflow-x: auto;
}
.cmd-prefix { font-family: var(--f-mono); font-size: 11px; color: var(--bio); margin-right: 6px; opacity: 0.8; }
.cmd-chip {
  height: 22px; padding: 0 5px; border-radius: 5px;
  border: 1px solid transparent; background: transparent;
  color: #9b9eb2; font-family: var(--f-mono); font-size: 10px; cursor: pointer; white-space: nowrap;
  transition: color 140ms, background 140ms, border-color 140ms;
}
.cmd-chip:hover { color: var(--bio); background: rgba(255, 255, 255, 0.065); border-color: rgba(255, 255, 255, 0.1); }
.cmd-chip.chip-flash { color: #ffffff; background: rgba(124, 147, 255, 0.24); border-color: var(--bio-line); }
.cmd-mesh-toggle { margin-left: auto; color: var(--bio); border-color: var(--bio-line); background: var(--bio-soft); }
.cmd-mesh-toggle.off { color: #71717a; border-color: transparent; background: transparent; }

/* SPATIAL VISION-PRO TRANSLUCENT 3D WEBGL REACTOR + SWISS TELEMETRY */
.geth-mesh-pane {
  height: clamp(224px, 34vh, 296px); flex-shrink: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 174px;
  background: rgba(7, 9, 16, 0.44);
  border-bottom: 1px solid var(--hairline);
}
.geth-mesh-pane.collapsed { display: none; }
.geth-mesh-pane.expanded { flex: 1; height: auto; min-height: 320px; }
.geth-mesh-pane.expanded + #cli-output { flex: 0 0 88px; }
.mesh-stage {
  position: relative; overflow: hidden;
  background:
    radial-gradient(64% 72% at 50% 50%, rgba(124, 147, 255, 0.14) 0%, rgba(18, 22, 46, 0.42) 48%, rgba(6, 8, 16, 0.72) 100%),
    radial-gradient(48% 42% at 72% 76%, rgba(251, 113, 133, 0.08) 0%, transparent 72%);
}
.mesh-stage::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 42px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 8, 16, 0.82) 0%, rgba(6, 8, 16, 0.25) 65%, transparent 100%);
}
.mesh-hud-tl { z-index: 2; }
.mesh-hud-bl { z-index: 2; }
#geth-mesh-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#geth-mesh-canvas:active { cursor: grabbing; }
.mesh-expand-btn {
  position: absolute; top: 8px; right: 9px; z-index: 3;
  width: 24px; height: 22px; border-radius: 5px;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 14, 22, 0.62); color: #b4b7c8;
  font-size: 12px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 140ms, border-color 140ms, background 140ms;
}
.mesh-expand-btn:hover { color: var(--bio); border-color: var(--bio-line); background: rgba(18, 22, 36, 0.86); }
.mesh-hud-tl {
  position: absolute; top: 9px; left: 11px; pointer-events: none;
  display: flex; align-items: center; gap: 9px; font-family: var(--f-mono);
}
.mh-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; font-weight: 600; color: #f5f5f7; letter-spacing: 0.06em;
}
.mh-sub { font-size: 9.5px; color: #8c90a6; font-variant-numeric: tabular-nums; }
.mesh-hud-bl {
  position: absolute; bottom: 8px; left: 11px; pointer-events: none;
  font-family: var(--f-mono); font-size: 9.5px; color: #c7cadb;
  padding: 2px 7px; border-radius: 4px;
  background: rgba(10, 12, 20, 0.62); border: 0.5px solid rgba(255, 255, 255, 0.11);
  font-variant-numeric: tabular-nums;
}
.mesh-mascot-stamp {
  position: absolute; bottom: 7px; right: 9px; z-index: 3;
  border: none; background: transparent; padding: 0; cursor: pointer;
  opacity: 0.86; transform: rotate(-6deg);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.72));
  transition: transform 200ms var(--spring), opacity 160ms, filter 180ms;
}
.mesh-mascot-stamp img { display: block; width: 32px; height: auto; pointer-events: none; }
.mesh-mascot-stamp:hover {
  opacity: 1; transform: rotate(4deg) scale(1.16) translateY(-2px);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 10px rgba(46, 242, 184, 0.45));
}
.mesh-mascot-stamp:active { transform: scale(0.92); }
.mesh-node-tip {
  position: absolute; top: 0; left: 0; z-index: 4; pointer-events: none;
  padding: 4px 8px; border-radius: 6px;
  background: rgba(10, 12, 22, 0.9);
  border: 0.5px solid rgba(165, 180, 252, 0.42);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
  color: #f5f5f7; font-family: var(--f-mono); font-size: 9.5px; line-height: 1.35;
  white-space: nowrap; opacity: 0; will-change: transform, opacity;
  transition: opacity 110ms var(--ease);
}
.mesh-node-tip.visible { opacity: 1; }
.mesh-node-tip b { color: #8aa0ff; font-weight: 600; }
.mesh-node-tip span { color: #9fa4bc; display: block; font-size: 8.8px; }
.bt-bar.bt-epoch-track i { background: linear-gradient(90deg, #7c93ff, #c7d2fe); }
.bt-kv b.epoch-super { color: #fbbf24; font-weight: 700; }

.mesh-btop {
  padding: 11px 13px; display: flex; flex-direction: column; gap: 9px;
  background: rgba(10, 12, 20, 0.58); border-left: 1px solid var(--hairline);
  font-family: var(--f-mono); font-variant-numeric: tabular-nums;
}
.bt-head { font-size: 9px; font-weight: 600; color: #7c8094; letter-spacing: 0.11em; }
.bt-row { display: flex; flex-direction: column; gap: 4px; }
.bt-k { display: flex; align-items: baseline; justify-content: space-between; font-size: 9px; color: #8c90a6; letter-spacing: 0.03em; }
.bt-k strong { color: #f5f5f7; font-weight: 600; font-size: 14.5px; line-height: 1.1; letter-spacing: -0.025em; }
.bt-bar { height: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.bt-bar i { display: block; height: 100%; border-radius: 999px; background: var(--bio); transition: width 320ms var(--ease); }
.bt-bar.bt-silver i { background: #b4b7c8; }
.bt-kv {
  margin-top: auto; padding-top: 7px; border-top: 1px solid rgba(255, 255, 255, 0.075);
  display: flex; flex-direction: column; gap: 3.5px; font-size: 9.5px;
}
.bt-kv > div { display: flex; justify-content: space-between; gap: 6px; color: #7c8094; }
.bt-kv-clickable {
  cursor: pointer; border-radius: 4px; padding: 1px 4px; margin: -1px -4px;
  transition: background 140ms, color 140ms;
}
.bt-kv-clickable:hover { background: rgba(124, 147, 255, 0.14); color: #d4d7ea; }
.bt-kv b { color: #e2e4f0; font-weight: 500; white-space: nowrap; }
.bt-kv b.mono-bio { color: var(--bio); font-weight: 600; }

.geth-screen {
  flex: 1; padding: 11px 14px; background: var(--term-bg); color: #d4d4dc;
  font-family: var(--f-mono); font-size: 11.4px; line-height: 1.66;
  overflow-y: auto; user-select: text; white-space: normal;
  font-variant-numeric: tabular-nums;
}
.geth-banner-pinned {
  position: relative; flex-shrink: 0;
  background: rgba(8, 10, 18, 0.84);
  border-bottom: 1px solid var(--hairline);
}
.geth-banner-slim {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 4px 10px;
  padding: 5px 14px; overflow: hidden;
  font-family: var(--f-mono); font-size: 10px; color: #9fa4bc; white-space: nowrap;
}
.geth-banner-slim span + span::before {
  content: "·"; margin-right: 10px; opacity: 0.42;
}
.gbs-k { color: #f5f5f7; font-weight: 700; letter-spacing: 0.04em; }
.gbs-ca-chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
  height: 19px; padding: 0 8px; border-radius: 999px;
  border: 0.5px solid rgba(46, 242, 184, 0.34); background: rgba(46, 242, 184, 0.08);
  color: #dffef4; font-family: var(--f-mono); font-size: 9.8px; font-weight: 600;
  cursor: pointer; flex-shrink: 0; transition: background 140ms, border-color 140ms, transform 120ms var(--spring);
}
.gbs-ca-chip:hover { background: rgba(46, 242, 184, 0.16); border-color: rgba(46, 242, 184, 0.65); }
.gbs-ca-chip:active { transform: scale(0.96); }
.gbs-ca-chip::before { display: none !important; }
.gbs-ca-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 6px rgba(46, 242, 184, 0.8); }
.gbs-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: rgba(255, 255, 255, 0.05); overflow: hidden;
}
.gbs-progress i {
  display: block; height: 100%;
  background: linear-gradient(90deg, rgba(124, 147, 255, 0.4), #7c93ff 65%, #2ef2b8);
  transition: width 360ms var(--ease);
}

.geth-line { white-space: pre-wrap; animation: logSlide 200ms var(--ease); }
@keyframes logSlide { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.g-info { color: var(--bio); font-weight: 600; }
.g-warn { color: var(--amber); font-weight: 600; }
.g-virus { color: #050506; background: var(--bio); padding: 0 4px; border-radius: 2px; font-weight: 700; margin-right: 4px; }
.g-epoch { color: #050506; background: #fbbf24; padding: 0 4px; border-radius: 2px; font-weight: 700; margin-right: 4px; }
.g-swap { color: #a5b4fc; font-weight: 600; }
.g-burn { color: var(--crimson); font-weight: 600; }
.g-time { color: #5b5b66; }
.g-key { color: #9898a3; }
.cli-line-eth { color: #f4f4f6; font-weight: 600; }
.cli-line-cyan { color: #d4d4d8; }
.cli-line-prompt { color: var(--bio); }
.cli-line-mag { color: var(--crimson); }

.geth-prompt-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: #070709; border-top: 1px solid rgba(255, 255, 255, 0.065);
}
.gp-prefix { font-family: var(--f-mono); font-weight: 700; color: var(--bio); font-size: 13px; }
.gp-input-wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.gp-ghost {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  pointer-events: none; font-family: var(--f-mono); font-size: 12px;
  color: rgba(152, 152, 163, 0.42); white-space: pre; overflow: hidden; max-width: 100%;
}
.gp-input { position: relative; z-index: 1; width: 100%; background: transparent; border: none; color: #f4f4f6; font-family: var(--f-mono); font-size: 12px; outline: none; user-select: text; }
.gp-input::placeholder { color: #52525c; }
.gp-cursor { width: 6px; height: 13px; background: var(--bio); border-radius: 1px; }
body:not(.motion-paused) .gp-cursor { animation: cursorBlink 1.1s steps(2) infinite; }
@keyframes cursorBlink { 0%, 100% { opacity: 0.9; } 50% { opacity: 0; } }
.gp-hint { font-family: var(--f-mono); font-size: 10px; color: #787886; white-space: nowrap; }

.win-statusbar {
  height: 26px; flex-shrink: 0; padding: 0 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--win-bar); border-top: 1px solid var(--hairline);
  font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-2); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.win-statusbar strong { color: var(--ink); font-weight: 600; transition: color 240ms var(--ease); }
.sb-spark-wrap { display: inline-flex; align-items: center; gap: 7px; }
.gt-spark { display: block; width: 52px; height: 14px; opacity: 0.92; }
.stat-pulse { color: var(--bio) !important; }

/* ==================== WINDOW 2 (EDITORIAL VITALIK) & WINDOW 3 (INSTRUMENTS MONITOR) ==================== */
.win-body { flex: 1; overflow-y: auto; padding: 12px 15px; display: flex; flex-direction: column; gap: 8px; }
.vitalik-body { gap: 7px; }
.vp-head { display: flex; align-items: center; gap: 10px; }
.vp-catalyst { margin-left: auto; font-size: 9px; letter-spacing: 0.06em; }
.vp-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--win-border); }
.vp-name { display: flex; align-items: center; gap: 5px; font-weight: 600; font-size: 13.5px; }
.vp-handle { font-family: var(--f-mono); font-size: 11px; color: var(--ink-2); }
.vp-quote {
  margin: 4px 0 0; padding-left: 12px; border-left: 1.5px solid var(--bio-line);
  font-size: 12.6px; line-height: 1.56; color: var(--ink); user-select: text;
  display: flex; flex-direction: column; gap: 9px;
}
.vp-quote p { margin: 0; }

/* Editorial Paradigm / SF Serif Underlines */
.hl-bio {
  font-family: var(--f-serif); font-style: italic; font-size: 1.24em; font-weight: 400;
  background: var(--bio-soft); color: var(--bio);
  border-bottom: 1px solid var(--bio-line);
  padding: 0 4px; border-radius: 3px;
}
.hl-blue {
  background: transparent; color: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  padding: 0 0 1px; font-weight: 500;
}
:root[data-theme="light"] .hl-blue { border-bottom-color: rgba(17, 17, 20, 0.36); }

.vp-zh { margin: 0; font-size: 12px; line-height: 1.54; color: var(--ink-2); padding-top: 8px; border-top: 1px solid var(--hairline); }
.vp-thesis-bar {
  display: flex; align-items: center; gap: 8px; margin-top: 2px;
  padding: 5px 9px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.032); border: 0.5px solid var(--hairline);
  font-family: var(--f-mono); font-size: 9.8px; color: var(--ink-2); white-space: nowrap;
}
:root[data-theme="light"] .vp-thesis-bar { background: rgba(17, 18, 22, 0.035); }
.vp-thesis-bar > span { display: inline-flex; align-items: center; gap: 5px; }
.vp-tb-sep { opacity: 0.45; }
.vp-tb-btn {
  margin-left: auto; border: none; background: transparent; padding: 0 2px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 600; color: var(--bio);
  cursor: pointer; transition: color 140ms;
}
.vp-tb-btn:hover { color: var(--mint); }
.vp-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.mon-body { gap: 10px; padding: 12px 14px; }
.omega-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 13px; border-radius: 9px;
  background: var(--win-sub); border: 1px solid var(--hairline);
}
.om-k { font-family: var(--f-mono); font-size: 10px; color: var(--ink-2); letter-spacing: 0.05em; }
.om-clock { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 23px; font-weight: 700; line-height: 1.18; letter-spacing: -0.02em; }
.om-meta { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.om-meta strong { color: var(--ink); font-weight: 500; }

.mon-canvas-wrap {
  position: relative; flex: 1; min-height: 112px; border-radius: 9px;
  background: rgba(8, 10, 18, 0.58);
  border: 1px solid var(--hairline); overflow: hidden;
}
:root[data-theme="light"] .geth-cmdbar,
:root[data-theme="light"] .geth-mesh-pane,
:root[data-theme="light"] .mon-canvas-wrap {
  background: rgba(11, 13, 24, 0.86);
}
#fission-tree-canvas { display: block; width: 100%; height: 100%; cursor: default; }
.mon-overlay-tl { position: absolute; top: 8px; left: 10px; pointer-events: none; display: flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.mon-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px rgba(46, 242, 184, 0.72); }
.mon-stat-big { font-size: 20px; font-weight: 700; color: #f4f4f6; }
.mon-stat-lbl { font-size: 10.5px; color: #858594; }
.mon-stat-lbl strong { color: #d4d4d8; }
.mon-overlay-tr { position: absolute; top: 9px; right: 10px; pointer-events: none; display: flex; gap: 9px; font-family: var(--f-mono); font-size: 9.5px; color: #858594; }
.lg-p { display: inline-flex; align-items: center; gap: 4px; }
.lg-p i { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.mon-overlay-br { position: absolute; bottom: 7px; right: 9px; pointer-events: none; font-family: var(--f-mono); font-size: 9.5px; color: rgba(152, 152, 163, 0.72); }
.mon-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mon-chain-bar { padding-top: 2px; }
.mon-rpc-meta {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0;
  font-family: var(--f-mono); font-size: 10.5px; font-variant-numeric: tabular-nums;
}
.mon-rpc-tag {
  padding: 2px 6px; border-radius: 5px; font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em;
  background: var(--bio-soft); border: 0.5px solid var(--bio-line); color: var(--bio);
  white-space: nowrap;
}
.mon-rpc-val { color: var(--ink-2); white-space: nowrap; }
.mon-sync-ico { width: 26px; padding: 0; font-size: 12.5px; }
.mon-sync-ico.spinning { opacity: 0.7; }
.mon-slider-wrap { flex: 1; display: flex; align-items: center; gap: 9px; font-family: var(--f-mono); font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mon-feed { display: flex; flex-direction: column; gap: 4px; font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.feed-item { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: logSlide 220ms var(--ease); }
.feed-item strong { color: var(--ink); font-weight: 600; }
.feed-item .coral { color: var(--bio); font-weight: 600; }
.feed-pill {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  padding: 1px 5px; border-radius: 4px; font-size: 9px; font-weight: 600; letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.075); border: 0.5px solid rgba(255, 255, 255, 0.14); color: var(--ink);
}
:root[data-theme="light"] .feed-pill { background: rgba(17, 18, 22, 0.06); border-color: rgba(17, 18, 22, 0.14); }
.feed-pill-bio {
  background: var(--bio-soft); border-color: var(--bio-line); color: var(--bio);
}

/* ==================== WINDOW 4: LINEAR × MACOS CONTAGION HUB ==================== */
.settings-split { flex: 1; display: grid; grid-template-columns: 208px minmax(0, 1fr); overflow: hidden; }
.settings-sidebar {
  padding: 12px 10px; background: rgba(0, 0, 0, 0.22);
  border-right: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 2px;
}
:root[data-theme="light"] .settings-sidebar { background: rgba(17, 17, 20, 0.035); }
.set-group-lbl { padding: 10px 10px 4px; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.12em; color: var(--ink-3); }
.set-nav {
  width: 100%; display: flex; align-items: center; gap: 9px;
  text-align: left; padding: 7px 10px; border: none; border-radius: 7px;
  background: transparent; color: var(--ink-2); font-family: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background 140ms, color 140ms;
}
.set-nav:hover { background: var(--win-sub-hover); color: var(--ink); }
.set-nav.active {
  background: rgba(255, 255, 255, 0.085);
  color: var(--ink); font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 2px 0 0 var(--bio);
}
:root[data-theme="light"] .set-nav.active {
  background: rgba(17, 17, 20, 0.08);
  box-shadow: inset 2px 0 0 var(--bio);
}
.sn-svg { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; transition: color 140ms; }
.set-nav:hover .sn-svg { color: var(--ink-2); }
.set-nav.active .sn-svg { color: var(--bio); }
.hub-mascot-badge {
  margin-top: auto; width: 100%; padding: 10px 8px 9px; border-radius: 10px;
  border: 0.5px solid var(--hairline); background: rgba(124, 147, 255, 0.055);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; color: var(--ink);
  transition: border-color 160ms, background 160ms, transform 180ms var(--spring);
}
.hub-mascot-badge img {
  display: block; width: 58px; height: auto; transform: rotate(-3deg);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.62));
  transition: transform 220ms var(--spring);
}
.hub-mascot-badge:hover {
  border-color: var(--bio-line); background: rgba(124, 147, 255, 0.11);
}
.hub-mascot-badge:hover img { transform: rotate(4deg) scale(1.09) translateY(-2px); }
.hmb-meta { display: flex; flex-direction: column; align-items: center; gap: 1px; font-family: var(--f-mono); }
.hmb-meta b { font-size: 9.5px; letter-spacing: 0.08em; color: var(--ink); }
.hmb-meta em { font-style: normal; font-size: 9px; color: var(--bio); }

.settings-content { padding: 18px 20px; overflow-y: auto; }
.hub-pane { display: none; flex-direction: column; gap: 13px; }
.hub-pane.active { display: flex; animation: paneIn 170ms var(--ease); }
@keyframes paneIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.mini-telemetry-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 10px 12px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.02); border: 1px solid var(--hairline);
  margin-top: 2px;
}
:root[data-theme="light"] .mini-telemetry-row { background: rgba(17, 17, 20, 0.025); }
.mt-cell { display: flex; flex-direction: column; gap: 3px; font-family: var(--f-mono); }
.mt-cell span { font-size: 9.5px; color: var(--ink-3); letter-spacing: 0.06em; }
.mt-cell strong { font-size: 11.5px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.hp-card {
  padding: 14px 15px; border-radius: 10px;
  background: var(--win-sub);
  border: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 6px;
}
.slider-card { gap: 11px; }
.hp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp-k { font-family: var(--f-mono); font-size: 10px; color: var(--ink-2); letter-spacing: 0.05em; text-transform: uppercase; }
.hp-k-dot { display: inline-flex; align-items: center; gap: 6px; }
.hp-big { font-family: var(--f-mono); font-size: 25px; font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.iq-big { font-family: var(--f-mono); font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.hp-sub { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.mono-bio { color: var(--bio); }
.mono-neutral { color: var(--ink); }

/* Monochrome Calibrated Ratio Bar (No Shimmer / No RGB Traffic Light) */
.hp-bar { display: flex; height: 4px; border-radius: 999px; overflow: hidden; gap: 3px; margin-top: 4px; }
.hp-bar i { display: block; height: 100%; border-radius: 999px; }

/* Tab 1 Cryptographic 3-Hop Lineage Proof Strip */
.lineage-proof-strip {
  padding: 9px 11px; border-radius: 9px;
  background: rgba(124, 147, 255, 0.055);
  border: 0.5px solid rgba(124, 147, 255, 0.22);
  display: flex; flex-direction: column; gap: 7px;
  font-family: var(--f-mono); cursor: pointer;
  transition: border-color 150ms, background 150ms;
}
.lineage-proof-strip:hover {
  border-color: var(--bio-line);
  background: rgba(124, 147, 255, 0.095);
}
.lp-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 9.5px; color: var(--ink-2); letter-spacing: 0.04em;
}
.lp-chain {
  display: flex; align-items: center; justify-content: space-between; gap: 5px;
  overflow-x: auto;
}
.lp-node {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px;
  padding: 4px 7px; border-radius: 6px;
  background: rgba(10, 12, 20, 0.52); border: 0.5px solid var(--hairline);
  font-size: 10px; color: var(--ink);
}
:root[data-theme="light"] .lp-node { background: rgba(255, 255, 255, 0.72); }
.lp-node em {
  font-style: normal; font-size: 9px; font-weight: 700; color: var(--ink-2);
  padding: 1px 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.07);
}
.lp-root { border-color: var(--bio-line); }
.lp-root em, .lp-g1 em { color: var(--bio); background: var(--bio-soft); }
.lp-node b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-arrow { color: var(--bio); opacity: 0.75; font-size: 11px; flex-shrink: 0; }

/* Tab 1 Monochrome Precision Tier Cascade */
.tier-cascade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 2px; }
.tier-card {
  padding: 13px; border-radius: 10px;
  background: var(--win-sub); border: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 160ms, background 160ms;
}
.tier-card:hover { border-color: var(--win-border-focus); background: var(--win-sub-hover); }
.tc-top { display: flex; align-items: center; justify-content: space-between; font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-2); }
.tc-gen { display: inline-flex; align-items: center; gap: 6px; }
.tc-pct { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tc-r0 { font-family: var(--f-mono); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tier-g1 .tc-r0 { color: var(--bio); }
.tier-g2 .tc-r0 { color: var(--ink); }
.tier-g3 .tc-r0 { color: var(--ink-2); }
.tc-desc { font-size: 11px; color: var(--ink-2); line-height: 1.48; }

.econ-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sch-node { cursor: pointer; transition: opacity 150ms; }
.sch-node:hover rect { stroke: rgba(255, 255, 255, 0.36); }
.sch-node.active rect { stroke: var(--bio); fill: #181a1c; }
.hp-card.econ-active { border-color: var(--bio-line); background: var(--bio-soft); }
[data-econ-card] { cursor: pointer; transition: border-color 150ms, background 150ms; }
[data-econ-card]:hover { border-color: var(--win-border-focus); }

.strain-input-wrap { position: relative; display: flex; align-items: center; }
.strain-input-wrap .mac-input { padding-right: 34px; }
.strain-cycle-btn {
  position: absolute; right: 5px; width: 24px; height: 24px; padding: 0;
  border-radius: 6px; border: 0.5px solid var(--hairline);
  background: var(--win-sub); color: var(--ink-2); font-size: 12.5px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 140ms, color 140ms, border-color 140ms, transform 180ms var(--spring);
}
.strain-cycle-btn:hover { background: var(--win-sub-hover); color: var(--bio); border-color: var(--bio-line); }
.strain-cycle-btn:active { transform: rotate(180deg) scale(0.92); }

/* Precision Instrument Chart Frame */
.chart-glass-frame {
  padding: 12px 14px; border-radius: 10px;
  background: #08080a;
  border: 1px solid var(--hairline);
}
.schematic-frame { padding: 8px 10px; }
#thesis-svg { width: 100%; height: auto; display: block; color: #e4e4e7; cursor: ew-resize; }
.mini-circuit-svg { width: 100%; height: auto; display: block; color: #e4e4e7; }
.curve-energy-pulse { stroke-dasharray: 22 466; opacity: 0.72; }
body:not(.motion-paused) .curve-energy-pulse { animation: curveFlow 3s linear infinite; }
@keyframes curveFlow { from { stroke-dashoffset: 488; } to { stroke-dashoffset: 0; } }

.beacon-ring { transform-box: fill-box; transform-origin: center; }
body:not(.motion-paused) .beacon-ring { animation: beaconPing 2.4s ease-out infinite; }
.ring-r { animation-delay: 1s; }
@keyframes beaconPing { 0% { opacity: 0.65; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1.9); } }

.circuit-pulse { stroke-dasharray: 18 178; stroke-linecap: round; opacity: 0.85; }
body:not(.motion-paused) .circuit-pulse { animation: circuitRun 2.2s linear infinite; }
.pulse-delay { animation-delay: -0.75s; }
.pulse-delay2 { animation-delay: -1.5s; }
@keyframes circuitRun { from { stroke-dashoffset: 196; } to { stroke-dashoffset: 0; } }
body.motion-paused .circuit-orb { display: none; }

.verdict-glass {
  padding: 10px 13px; border-radius: 8px;
  background: var(--win-sub);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--bio);
  font-size: 12px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.field { display: flex; flex-direction: column; gap: 5px; }
.burn-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.burn-tier-btn {
  padding: 13px; border-radius: 9px; border: 1px solid var(--hairline);
  background: var(--win-sub); color: var(--ink); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: border-color 150ms, background 150ms;
}
.burn-tier-btn:hover { background: var(--win-sub-hover); border-color: var(--win-border-focus); }
.burn-tier-btn strong { font-family: var(--f-mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.burn-tier-btn span { font-size: 11px; color: var(--ink-2); font-family: var(--f-mono); }
.burn-tier-btn.active {
  background: var(--bio-soft);
  border-color: var(--bio-line);
}
.burn-tier-btn.active strong { color: var(--bio); }

/* ==================== WINDOW 5: SOLIDITY IDE ==================== */
.ide-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--win-sub); border-bottom: 1px solid var(--hairline); }
.sol-tabs { display: flex; gap: 4px; }
.sol-tab { padding: 4px 10px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--ink-2); font-family: var(--f-mono); font-size: 11.5px; cursor: pointer; }
.sol-tab.active, .sol-tab:hover { background: var(--win-sub-hover); border-color: var(--hairline); color: var(--ink); }
.ca-ide-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; background: rgba(255, 255, 255, 0.025); border-bottom: 1px solid var(--hairline); }
.ca-tag { font-family: var(--f-mono); font-size: 10.5px; font-weight: 700; color: var(--bio); }
.ca-code { flex: 1; font-family: var(--f-mono); font-size: 11.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text; }
.ca-edit-inline { display: none; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--hairline); }
.ca-edit-inline.open { display: flex; }
.ide-jump-bar {
  display: flex; align-items: center; gap: 4px; padding: 6px 12px;
  background: rgba(10, 12, 22, 0.44); border-bottom: 1px solid var(--hairline);
  overflow-x: auto; flex-shrink: 0;
}
:root[data-theme="light"] .ide-jump-bar { background: rgba(17, 18, 22, 0.04); }
.ide-jump-lbl {
  font-family: var(--f-mono); font-size: 9.5px; font-weight: 600;
  color: var(--ink-3); letter-spacing: 0.06em; margin-right: 4px; flex-shrink: 0;
}
.ide-jump-chip {
  height: 21px; padding: 0 7px; border-radius: 5px;
  border: 0.5px solid var(--hairline); background: var(--win-sub);
  color: var(--ink-2); font-family: var(--f-mono); font-size: 10px;
  white-space: nowrap; flex-shrink: 0; cursor: pointer;
  transition: color 140ms, border-color 140ms, background 140ms;
}
.ide-jump-chip:hover, .ide-jump-chip.active {
  color: var(--bio); border-color: var(--bio-line); background: var(--bio-soft);
}
.ide-code {
  flex: 1; margin: 0; padding: 12px 14px 16px 0;
  background: var(--term-bg); color: #d4d4dc;
  font-family: var(--f-mono); font-size: 11.4px; line-height: 1.66;
  overflow: auto; user-select: text; font-variant-numeric: tabular-nums;
}
.sol-row { display: flex; padding-right: 12px; transition: background 240ms var(--ease); outline: none; }
.sol-row:hover { background: rgba(255, 255, 255, 0.028); }
.sol-row.sol-flash {
  background: rgba(124, 147, 255, 0.22);
  box-shadow: inset 2px 0 0 var(--bio);
}
.sol-ln {
  width: 44px; flex-shrink: 0; padding-right: 14px; text-align: right;
  color: #464652; user-select: none; border-right: 1px solid rgba(255, 255, 255, 0.05); margin-right: 14px;
}
.sol-src { white-space: pre; }
.sol-kw { color: #f4f4f6; font-weight: 600; }
.sol-type { color: #a1a1aa; }
.sol-fn { color: #8aa0ff; }
.sol-str { color: #a5b4fc; opacity: 0.94; }
.sol-num { color: #e4e4e7; }
.sol-cmt { color: #5b5b66; font-style: italic; }

/* ==================== MACOS SEQUOIA DARK TITANIUM DOCK ==================== */
.mac-dock {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 220;
  padding: 7px 11px; border-radius: 20px;
  background: var(--dock-bg);
  backdrop-filter: blur(22px) saturate(175%); -webkit-backdrop-filter: blur(22px) saturate(175%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.68),
    0 0 0 0.5px rgba(0, 0, 0, 0.5),
    0 0.5px 0 rgba(255, 255, 255, 0.36) inset;
  display: flex; align-items: flex-end; gap: 10px;
  will-change: transform;
}
.dock-app {
  --dock-scale: 1;
  --dock-lift: 0px;
  position: relative; border: none; background: transparent; padding: 0; cursor: pointer; text-decoration: none;
  transform-origin: bottom center;
  transform: translate3d(0, var(--dock-lift), 0) scale(var(--dock-scale));
  transition: transform 95ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.dock-app.bounce { animation: dockBounce 420ms var(--spring); }
@keyframes dockBounce { 0% { transform: translateY(0) scale(1.08); } 45% { transform: translateY(-18px) scale(1.18); } 100% { transform: translateY(var(--dock-lift)) scale(var(--dock-scale)); } }

.dock-app::before {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  padding: 4px 10px; border-radius: 6px; background: rgba(14, 14, 17, 0.94);
  border: 0.5px solid rgba(255, 255, 255, 0.14); color: #f4f4f6; font-size: 11px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 140ms;
}
.dock-app:hover::before { opacity: 1; }
.dock-app.running::after {
  content: ""; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  width: 3.5px; height: 3.5px; border-radius: 50%; background: rgba(244, 244, 246, 0.56);
  transition: width 160ms var(--spring), background 160ms, box-shadow 160ms;
}
.dock-app.running.active-focus::after {
  width: 10px; border-radius: 999px; background: var(--bio);
  box-shadow: 0 0 8px rgba(124, 147, 255, 0.8);
}
:root[data-theme="light"] .dock-app.running::after { background: rgba(17, 17, 20, 0.45); }
:root[data-theme="light"] .dock-app.running.active-focus::after { background: var(--bio); }

.dock-ico {
  position: relative;
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0.5px 0 rgba(255, 255, 255, 0.28) inset;
  overflow: hidden;
}
.dock-ico::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, transparent 44%);
}
/* Unified Brushed Dark Titanium Dock Tiles with Top-Light Optical Sheen */
.ico-titanium {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 48%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(180deg, #282b3a 0%, #131520 100%);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
}
.ico-img { border: 0.5px solid rgba(255, 255, 255, 0.18); }
.ico-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dock-sep { width: 1px; height: 30px; background: rgba(255, 255, 255, 0.14); margin: 0 2px 7px; }
:root[data-theme="light"] .dock-sep { background: rgba(17, 17, 20, 0.15); }

/* Clean Non-Colliding Disclaimer Safe Zone */
.desk-disclaimer {
  position: fixed; left: 28px; bottom: 12px; z-index: 4;
  max-width: calc(50vw - 260px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 10px; color: rgba(255, 255, 255, 0.44); pointer-events: none;
}
:root[data-theme="light"] .desk-disclaimer {
  color: rgba(244, 246, 255, 0.66);
  text-shadow: 0 1px 4px rgba(8, 10, 20, 0.65);
}

/* ==================== SPOTLIGHT / RAYCAST COMMAND PALETTE (⌘K · TOP-LAYER TRANSITIONS) ==================== */
.spotlight-dialog {
  width: min(560px, calc(100vw - 32px)); padding: 0; margin: 11vh auto auto;
  border-radius: 14px; border: 1px solid var(--win-border-focus);
  background: rgba(16, 16, 20, 0.92); backdrop-filter: blur(42px) saturate(165%);
  -webkit-backdrop-filter: blur(42px) saturate(165%);
  color: var(--ink); box-shadow: 0 38px 100px rgba(0, 0, 0, 0.84), 0 1px 0 rgba(255, 255, 255, 0.22) inset;
  overflow: hidden;
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.22s;
  transition-timing-function: var(--ease);
  transition-behavior: allow-discrete;
}
@media (prefers-reduced-motion: no-preference) {
  .spotlight-dialog {
    transform: translate3d(0, -10px, 0) scale(0.965);
  }
}
:root[data-theme="light"] .spotlight-dialog {
  background: rgba(250, 250, 252, 0.94);
  box-shadow: 0 32px 84px rgba(15, 23, 42, 0.32), 0 1px 0 #ffffff inset;
}
.spotlight-dialog::backdrop {
  background-color: rgb(0 0 0 / 0);
  backdrop-filter: blur(0px);
  transition-property: background-color, backdrop-filter, display, overlay;
  transition-duration: 0.22s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}
:is(.spotlight-dialog[open]):where(:not([data-closing])) {
  opacity: 1;
  @starting-style {
    opacity: 0;
  }
  @media (prefers-reduced-motion: no-preference) {
    transform: translate3d(0, 0, 0) scale(1);
    @starting-style {
      transform: translate3d(0, -10px, 0) scale(0.965);
    }
  }
  &::backdrop {
    background-color: rgb(0 0 0 / 0.52);
    backdrop-filter: blur(6px);
    @starting-style {
      background-color: rgb(0 0 0 / 0);
      backdrop-filter: blur(0px);
    }
  }
}
.sp-search-row {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  border-bottom: 1px solid var(--hairline); color: var(--ink-2);
}
.sp-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--ink); font-family: var(--f-sans); font-size: 14px; user-select: text;
}
.sp-input::placeholder { color: var(--ink-3); }
.sp-kbd {
  padding: 2px 6px; border-radius: 5px; font-family: var(--f-mono); font-size: 10px;
  color: var(--ink-2); background: var(--win-sub); border: 1px solid var(--hairline);
}
.sp-list { max-height: 332px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.sp-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 11px; border: none; border-radius: 8px; background: transparent;
  color: var(--ink); font-family: var(--f-sans); font-size: 12.5px; text-align: left; cursor: pointer;
  transition: background 110ms;
}
.sp-item:hover, .sp-item.active {
  background: rgba(255, 255, 255, 0.085);
  box-shadow: inset 2px 0 0 var(--bio);
}
:root[data-theme="light"] .sp-item:hover,
:root[data-theme="light"] .sp-item.active { background: rgba(17, 17, 20, 0.075); }
.sp-item-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-item-title { font-weight: 500; color: var(--ink); }
.sp-item-sub { font-size: 11px; color: var(--ink-2); font-family: var(--f-mono); }
.sp-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-top: 1px solid var(--hairline);
  background: var(--win-sub); font-family: var(--f-mono); font-size: 10px; color: var(--ink-3);
}

/* ==================== AUTHENTIC MACOS RIGHT-CLICK CONTEXT MENU ==================== */
.mac-ctx-menu {
  display: none; position: fixed; z-index: 9500; min-width: 216px;
  padding: 5px; border-radius: 10px;
  background: rgba(18, 18, 22, 0.92); backdrop-filter: blur(36px) saturate(165%);
  -webkit-backdrop-filter: blur(36px) saturate(165%);
  border: 1px solid var(--win-border-focus);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72), 0 1px 0 rgba(255, 255, 255, 0.16) inset;
  flex-direction: column; gap: 1px;
}
:root[data-theme="light"] .mac-ctx-menu {
  background: rgba(250, 250, 252, 0.94);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.24), 0 1px 0 #ffffff inset;
}
.mac-ctx-menu.open { display: flex; animation: ctxIn 130ms var(--ease); }
@keyframes ctxIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.ctx-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 6px 9px; border: none; border-radius: 6px; background: transparent;
  color: var(--ink); font-family: var(--f-sans); font-size: 12px; text-align: left; cursor: pointer;
  transition: background 100ms, color 100ms;
}
.ctx-item kbd { font-family: var(--f-mono); font-size: 10px; color: var(--ink-3); }
.ctx-item:hover { background: rgba(255, 255, 255, 0.1); }
:root[data-theme="light"] .ctx-item:hover { background: rgba(17, 17, 20, 0.08); }
.ctx-bio span { color: var(--bio); font-weight: 500; }
.ctx-sep { height: 1px; margin: 4px 6px; background: var(--hairline); }

@supports not selector(:popover-open) {
  [popover]:not(.\:popover-open) {
    display: none;
  }
}

.toast-popover {
  position: fixed; inset: 38px 18px auto auto; margin: 0;
  padding: 9px 14px; border-radius: 12px; border: 1px solid var(--win-border-focus);
  background: rgba(16, 16, 20, 0.92); backdrop-filter: blur(32px) saturate(165%);
  -webkit-backdrop-filter: blur(32px) saturate(165%); color: #f4f4f6;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.68), 0 1px 0 rgba(255, 255, 255, 0.18) inset;
  font-family: var(--f-mono); font-size: 11.5px; z-index: 9999;
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.22s;
  transition-timing-function: var(--ease);
  transition-behavior: allow-discrete;
}
@media (prefers-reduced-motion: no-preference) {
  .toast-popover {
    transform: translate3d(16px, 0, 0) scale(0.96);
  }
}
:root[data-theme="light"] .toast-popover {
  background: rgba(255, 255, 255, 0.94); color: #111114; border-color: rgba(17, 17, 20, 0.14);
}
.toast-popover:is(:popover-open, .\:popover-open, .is-open) {
  display: flex; align-items: center; gap: 10px;
}
.toast-popover:is(:popover-open, .\:popover-open, .is-open):where(:not([data-closing])) {
  opacity: 1;
  @starting-style {
    opacity: 0;
  }
  @media (prefers-reduced-motion: no-preference) {
    transform: translate3d(0, 0, 0) scale(1);
    @starting-style {
      transform: translate3d(16px, 0, 0) scale(0.96);
    }
  }
}
.toast-led { width: 6px; height: 6px; border-radius: 50%; background: var(--bio); flex-shrink: 0; }

/* View Transitions API Circular Optical Theme Wipe + Reduced-Motion Safety */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) { z-index: 9999; }
::view-transition-old(root) { z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .spotlight-dialog,
  .spotlight-dialog::backdrop,
  .toast-popover {
    transition-duration: 0.1s;
  }
  .mb-led,
  .mac-btn-beam::before,
  .gp-cursor,
  .curve-energy-pulse,
  .beacon-ring,
  .circuit-pulse,
  .win-enter {
    animation: none !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

@media (max-width: 1380px) {
  .mb-x-handle { display: none; }
}
@media (max-width: 1340px) {
  #shader-phase-hud { display: none; }
}
@media (max-width: 1200px) {
  .desktop-icons { display: none; }
}
@media (max-width: 960px) {
  html, body { overflow: auto; height: auto; }
  .mac-menubar { height: 34px; padding: 0 10px; }
  .mb-item:not(.mb-bold), .mb-stat, .mb-sep, #sound-toggle-btn, #motion-toggle-btn, .mb-clock { display: none; }
  .mac-desktop { height: auto; margin-top: 34px; overflow: visible; padding: 12px 12px 92px; display: flex; flex-direction: column; gap: 14px; }
  .mac-win { position: relative !important; left: auto !important; top: auto !important; width: 100% !important; height: auto !important; }
  .mac-win.closed { display: none; }
  .geth-screen { min-height: 220px; max-height: 280px; }
  .settings-split { grid-template-columns: 1fr; }
  .settings-sidebar { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--hairline); padding: 8px; }
  .set-group-lbl, .hub-mascot-badge { display: none; }
  .set-nav { width: auto; white-space: nowrap; flex-shrink: 0; }
  .tier-cascade-grid { grid-template-columns: 1fr; }
  .desk-disclaimer { position: static; max-width: none; white-space: normal; text-align: center; padding: 4px 8px 0; }
}
@media (max-width: 640px) {
  .win-titlebar-unified { height: auto; padding: 9px 11px; flex-wrap: wrap; gap: 8px; }
  .tb-right { width: 100%; justify-content: flex-end; }
  .status-badge-live, .tb-div { display: none; }
  .geth-mesh-pane { height: auto; grid-template-columns: 1fr; }
  .mesh-stage { height: 236px; }
  .mh-sub { display: none; }
  .mesh-btop { border-left: none; border-top: 1px solid var(--hairline); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 12px; }
  .bt-head, .bt-kv { display: none; }
  .hp-grid-2, .mini-telemetry-row { grid-template-columns: 1fr; }
  .mac-dock { bottom: 8px; padding: 6px 8px; gap: 6px; border-radius: 17px; }
  .dock-ico { width: 38px; height: 38px; border-radius: 10px; }
  .win-statusbar { overflow-x: auto; gap: 12px; }
}
