/* Shell styles: taken 1:1 from the reb-site, asset paths made local. */

* { margin:0; padding:0; box-sizing:border-box; }
html,body { width:100%; height:100%; overflow:hidden; font-family:"Space Grotesk","Inter",system-ui,sans-serif; background:#0a0e14; }

/* ============ Cursors (arrow + pointing hand + grab), tinted per wallpaper theme ============ */
html, body {
  --cur-arrow: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4.5 1.8 L4.5 20.4 L9.5 15.6 L12.4 22.2 L15.4 20.9 L12.5 14.4 L19.2 14.0 Z" fill="%232F6FD0" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round"/></svg>') 4 2, auto;
  --cur-hand: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24"><path d="M9.0 3.0A1.6 1.6 0 0 1 12.2 3.0L12.2 9.0C12.2 8.2 12.9 7.6 13.7 7.6C14.5 7.6 15.2 8.2 15.2 9.0L15.2 9.6C15.2 8.9 15.8 8.4 16.5 8.4C17.2 8.4 17.8 8.9 17.8 9.6L17.8 10.4C17.8 9.8 18.3 9.3 18.9 9.3C19.6 9.3 20.1 9.8 20.1 10.4L20.1 15.0C20.1 18.9 17.6 21.8 14.0 21.8L12.4 21.8C10.6 21.8 9.0 20.9 8.1 19.4L5.2 14.6C4.7 13.7 5.0 12.6 5.9 12.1C6.7 11.6 7.8 11.9 8.3 12.7L9.0 13.9Z" fill="%232F6FD0" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round" stroke-linecap="round"/></svg>') 10 2, pointer;
  cursor: var(--cur-arrow);
}
body[data-theme="purple"] { --cur-arrow: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4.5 1.8 L4.5 20.4 L9.5 15.6 L12.4 22.2 L15.4 20.9 L12.5 14.4 L19.2 14.0 Z" fill="%237B4FD1" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round"/></svg>') 4 2, auto; --cur-hand: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24"><path d="M9.0 3.0A1.6 1.6 0 0 1 12.2 3.0L12.2 9.0C12.2 8.2 12.9 7.6 13.7 7.6C14.5 7.6 15.2 8.2 15.2 9.0L15.2 9.6C15.2 8.9 15.8 8.4 16.5 8.4C17.2 8.4 17.8 8.9 17.8 9.6L17.8 10.4C17.8 9.8 18.3 9.3 18.9 9.3C19.6 9.3 20.1 9.8 20.1 10.4L20.1 15.0C20.1 18.9 17.6 21.8 14.0 21.8L12.4 21.8C10.6 21.8 9.0 20.9 8.1 19.4L5.2 14.6C4.7 13.7 5.0 12.6 5.9 12.1C6.7 11.6 7.8 11.9 8.3 12.7L9.0 13.9Z" fill="%237B4FD1" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round" stroke-linecap="round"/></svg>') 10 2, pointer; }
body[data-theme="pink"] { --cur-arrow: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4.5 1.8 L4.5 20.4 L9.5 15.6 L12.4 22.2 L15.4 20.9 L12.5 14.4 L19.2 14.0 Z" fill="%23D2447F" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round"/></svg>') 4 2, auto; --cur-hand: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24"><path d="M9.0 3.0A1.6 1.6 0 0 1 12.2 3.0L12.2 9.0C12.2 8.2 12.9 7.6 13.7 7.6C14.5 7.6 15.2 8.2 15.2 9.0L15.2 9.6C15.2 8.9 15.8 8.4 16.5 8.4C17.2 8.4 17.8 8.9 17.8 9.6L17.8 10.4C17.8 9.8 18.3 9.3 18.9 9.3C19.6 9.3 20.1 9.8 20.1 10.4L20.1 15.0C20.1 18.9 17.6 21.8 14.0 21.8L12.4 21.8C10.6 21.8 9.0 20.9 8.1 19.4L5.2 14.6C4.7 13.7 5.0 12.6 5.9 12.1C6.7 11.6 7.8 11.9 8.3 12.7L9.0 13.9Z" fill="%23D2447F" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round" stroke-linecap="round"/></svg>') 10 2, pointer; }
body[data-theme="green"] { --cur-arrow: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4.5 1.8 L4.5 20.4 L9.5 15.6 L12.4 22.2 L15.4 20.9 L12.5 14.4 L19.2 14.0 Z" fill="%232E7D52" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round"/></svg>') 4 2, auto; --cur-hand: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24"><path d="M9.0 3.0A1.6 1.6 0 0 1 12.2 3.0L12.2 9.0C12.2 8.2 12.9 7.6 13.7 7.6C14.5 7.6 15.2 8.2 15.2 9.0L15.2 9.6C15.2 8.9 15.8 8.4 16.5 8.4C17.2 8.4 17.8 8.9 17.8 9.6L17.8 10.4C17.8 9.8 18.3 9.3 18.9 9.3C19.6 9.3 20.1 9.8 20.1 10.4L20.1 15.0C20.1 18.9 17.6 21.8 14.0 21.8L12.4 21.8C10.6 21.8 9.0 20.9 8.1 19.4L5.2 14.6C4.7 13.7 5.0 12.6 5.9 12.1C6.7 11.6 7.8 11.9 8.3 12.7L9.0 13.9Z" fill="%232E7D52" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round" stroke-linecap="round"/></svg>') 10 2, pointer; }
body[data-theme="orange"] { --cur-arrow: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4.5 1.8 L4.5 20.4 L9.5 15.6 L12.4 22.2 L15.4 20.9 L12.5 14.4 L19.2 14.0 Z" fill="%23D2691E" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round"/></svg>') 4 2, auto; --cur-hand: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24"><path d="M9.0 3.0A1.6 1.6 0 0 1 12.2 3.0L12.2 9.0C12.2 8.2 12.9 7.6 13.7 7.6C14.5 7.6 15.2 8.2 15.2 9.0L15.2 9.6C15.2 8.9 15.8 8.4 16.5 8.4C17.2 8.4 17.8 8.9 17.8 9.6L17.8 10.4C17.8 9.8 18.3 9.3 18.9 9.3C19.6 9.3 20.1 9.8 20.1 10.4L20.1 15.0C20.1 18.9 17.6 21.8 14.0 21.8L12.4 21.8C10.6 21.8 9.0 20.9 8.1 19.4L5.2 14.6C4.7 13.7 5.0 12.6 5.9 12.1C6.7 11.6 7.8 11.9 8.3 12.7L9.0 13.9Z" fill="%23D2691E" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round" stroke-linecap="round"/></svg>') 10 2, pointer; }
body[data-theme="black"] { --cur-arrow: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4.5 1.8 L4.5 20.4 L9.5 15.6 L12.4 22.2 L15.4 20.9 L12.5 14.4 L19.2 14.0 Z" fill="%23111111" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round"/></svg>') 4 2, auto; --cur-hand: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24"><path d="M9.0 3.0A1.6 1.6 0 0 1 12.2 3.0L12.2 9.0C12.2 8.2 12.9 7.6 13.7 7.6C14.5 7.6 15.2 8.2 15.2 9.0L15.2 9.6C15.2 8.9 15.8 8.4 16.5 8.4C17.2 8.4 17.8 8.9 17.8 9.6L17.8 10.4C17.8 9.8 18.3 9.3 18.9 9.3C19.6 9.3 20.1 9.8 20.1 10.4L20.1 15.0C20.1 18.9 17.6 21.8 14.0 21.8L12.4 21.8C10.6 21.8 9.0 20.9 8.1 19.4L5.2 14.6C4.7 13.7 5.0 12.6 5.9 12.1C6.7 11.6 7.8 11.9 8.3 12.7L9.0 13.9Z" fill="%23111111" stroke="%23ffffff" stroke-width="1.2" stroke-linejoin="round" stroke-linecap="round"/></svg>') 10 2, pointer; }

/* every clickable target gets the themed pointing hand */
a, button, summary, label, select, input[type="range"], input[type="color"],
[role="button"], [onclick], .di, .node, .ios-photo, .st-tool, .st-brush, .st-tape-style {
  cursor: var(--cur-hand) !important;
}
/* draggable things keep grab feedback */
#loader .lock-slider-knob, #peach-guide, #peach-guide .peach, .stuck-emoji, #mobile-drawer .md-handle { cursor: grab !important; }
#loader .lock-slider-knob.dragging, #peach-guide.dragging .peach, .stuck-emoji:active, #mobile-drawer .md-handle:active { cursor: grabbing !important; }
/* text inputs keep a caret */
input[type="text"], input[type="email"], input[type="search"], input:not([type]), textarea, [contenteditable="true"] { cursor: text !important; }

/* ============ Loading screen ============ */
#loader {
  position:fixed; inset:0; z-index:99999;
  background:
    url("../assets/bg-blue-v4.svg") center/cover no-repeat,
    linear-gradient(180deg, #20559B 0%, #C0DCED 100%);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  transition:opacity 500ms ease; font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text",sans-serif;
  cursor:pointer; overflow:hidden; isolation:isolate;
}
@media (max-width:1024px) {
  #loader {
    background:
      url("../assets/bg-blue-mobile-v2.svg") center/cover no-repeat,
      linear-gradient(180deg, #20559B 0%, #C0DCED 100%);
  }
}

#loader::before {
  content:""; position:absolute; inset:-2px; pointer-events:none; z-index:0;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/></svg>");
  background-size:240px 240px; opacity:0.28; mix-blend-mode:overlay;
}
#loader > * { position:absolute; z-index:1; }
#loader.hide { opacity:0; pointer-events:none; }

/* iPhone/iPad-style lock clock */
#loader .lock-clock {
  display:flex; flex-direction:column; align-items:center; gap:2px;
  left:50%; top:calc(env(safe-area-inset-top, 0px) + 56px);
  transform:translateX(-50%); z-index:2; color:#fff; text-align:center;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",sans-serif;
  text-shadow:0 2px 24px rgba(20,40,70,0.35);
}
#loader .lock-date { font-size:15px; font-weight:600; letter-spacing:0.01em; color:rgba(255,255,255,0.92); }
#loader .lock-time {
  font-family:"Big Shoulders Display", -apple-system, sans-serif;
  font-size:clamp(130px, 17vw, 210px); font-weight:400; letter-spacing:-0.045em;
  line-height:0.9; margin-top:6px; font-variant-numeric:tabular-nums;
  color:rgba(255,255,255,0.42); transform:scaleY(1.12); transform-origin:50% 0%;
  text-shadow:none;
}

#loader .logo {
  width:88px; height:88px; object-fit:contain; opacity:1;
  animation:loaderSpin 4s linear infinite; transform-origin:50% 50%;
  filter:brightness(0) invert(1) drop-shadow(0 6px 18px rgba(20,40,70,0.45));
  left:50%; top:calc(env(safe-area-inset-top, 0px) + 58vh);
  transform:translateX(-50%);
}
#loader .lock-name {
  left:50%; top:calc(env(safe-area-inset-top, 0px) + 58vh + 106px);
  transform:translateX(-50%);
  font-size:22px; font-weight:600; letter-spacing:-0.01em; color:#ffffff; text-shadow:0 1px 16px rgba(20,40,70,0.35);
}
#loader .lock-role {
  left:50%; top:calc(env(safe-area-inset-top, 0px) + 58vh + 138px);
  transform:translateX(-50%);
  font-size:11px; letter-spacing:0.22em; text-transform:uppercase; color:rgba(255,255,255,0.75);
}

#loader .lock-cta {
  display:inline-flex; align-items:center; gap:10px;
  font-size:11px; letter-spacing:0.22em; text-transform:uppercase; color:rgba(255,255,255,0.9);
  padding:12px 20px; border:1px solid rgba(255,255,255,0.35); border-radius:999px;
  background:rgba(255,255,255,0.12); backdrop-filter:blur(6px); user-select:none;
  left:50%; bottom:calc(env(safe-area-inset-bottom, 0px) + 10vh);
  transform:translateX(-50%); white-space:nowrap;
}
#loader .lock-cta svg { width:12px; height:12px; }

#loader .lock-links {
  display:flex; flex-direction:column; align-items:center; gap:10px;
  left:50%; top:calc(env(safe-area-inset-top, 0px) + 300px);
  transform:translateX(-50%);
  opacity:0; transition:opacity 0.4s ease; pointer-events:none; z-index:2;
}
#loader.ready .lock-links { opacity:1; pointer-events:auto; }
#loader .lock-link {
  display:inline-flex; align-items:center; gap:6px; padding:8px 13px; border-radius:999px;
  font-size:11px; font-weight:600; letter-spacing:0.02em; color:rgba(255,255,255,0.95);
  text-decoration:none; background:rgba(255,255,255,0.13); border:1px solid rgba(255,255,255,0.28);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  transition:transform .18s ease, background .18s ease;
}
#loader .lock-link:hover { background:rgba(255,255,255,0.22); }
#loader .lock-link:active { transform:scale(0.92); }
#loader .lock-link svg { width:14px; height:14px; flex:none; }
#loader .lock-link-row { display:flex; gap:10px; }
#loader .lock-link-row.stacked { flex-direction:column; align-items:center; }

#loader .lock-hint {
  left:50%; bottom:28px; transform:translateX(-50%);
  font-size:10px; letter-spacing:0.2em; text-transform:uppercase; color:rgba(255,255,255,0.6); z-index:1;
  white-space:nowrap;
}

/* Loading state shown before the page is fully ready */
#loader .lock-loading {
  display:flex; flex-direction:column; align-items:center; gap:14px;
  transition:opacity 0.4s ease;
  left:50%; top:50%; transform:translate(-50%, -50%);
}
#loader .lock-progress {
  width:140px; height:4px; border-radius:999px; background:rgba(255,255,255,0.12);
  overflow:hidden; position:relative;
}
#loader .lock-progress-bar {
  width:0%; height:100%; border-radius:999px;
  background:linear-gradient(90deg, #60a5fa, #3b82f6);
  animation:progressLoop 1.8s ease-in-out infinite;
}
@keyframes progressLoop { 0% { width:0%; opacity:1; } 50% { width:100%; opacity:1; } 100% { width:100%; opacity:0; } }
#loader .lock-cta, #loader .lock-slider, #loader .lock-links { opacity:0; transition:opacity 0.4s ease; pointer-events:none; }
#loader.ready .lock-loading { opacity:0; pointer-events:none; }
#loader.ready .lock-cta, #loader.ready .lock-slider, #loader.ready .lock-links { opacity:1; pointer-events:auto; }

/* Slide-to-unlock (mobile / tablet only) */
#loader .lock-slider {
  display:none; width:min(320px, 78vw); margin-top:0; user-select:none; -webkit-user-select:none;
  left:50%; bottom:calc(env(safe-area-inset-bottom, 0px) + 48px);
  transform:translateX(-50%);
}
#loader .lock-slider-track { position:relative; height:64px; border-radius:999px; background:rgba(255,255,255,0.14); border:1px solid rgba(255,255,255,0.3); backdrop-filter:blur(6px); overflow:hidden; }
#loader .lock-slider-label { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding-left:56px; font-size:12px; letter-spacing:0.22em; text-transform:uppercase; color:rgba(255,255,255,0.55); pointer-events:none; background:linear-gradient(90deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.95) 50%, rgba(255,255,255,0.35) 100%); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; background-size:200% 100%; animation: lockShimmer 2.6s linear infinite; }
#loader .lock-slider-knob { position:absolute; top:4px; left:4px; width:56px; height:56px; border-radius:50%; background:#fff; color:#222; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 14px rgba(0,0,0,0.28); touch-action:none; cursor:grab; transition:transform 0.28s ease; }
#loader .lock-slider-knob.dragging { transition:none; cursor:grabbing; }
#loader .lock-slider-knob svg { width:22px; height:22px; }
@keyframes lockShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Touch / small screens: logo + name centered, socials under clock, slider at bottom */
@media (max-width: 1024px), (pointer: coarse) {
  #loader .lock-cta { display:none; }
  #loader .lock-slider { display:block; }
  #loader .lock-hint { bottom:20px; white-space:nowrap; }
  #loader .lock-clock { top:calc(env(safe-area-inset-top, 0px) + 36px); }
  #loader .lock-time { font-size:clamp(150px, 36vw, 260px); }
  #loader .logo { width:72px; height:72px; top:calc(env(safe-area-inset-top, 0px) + 56vh); }
  #loader .lock-name { top:calc(env(safe-area-inset-top, 0px) + 56vh + 88px); font-size:18px; }
  #loader .lock-role { top:calc(env(safe-area-inset-top, 0px) + 56vh + 118px); font-size:10px; }
  #loader .lock-links { top:calc(env(safe-area-inset-top, 0px) + 340px); gap:10px; }
  #loader .lock-link { padding:8px 12px; font-size:11px; }
  #loader .lock-link svg { width:14px; height:14px; }
}
@media (max-width: 480px) {
  #loader .lock-links { top:calc(env(safe-area-inset-top, 0px) + 320px); gap:8px; }
  #loader .lock-link-row { gap:6px; }
  #loader .lock-link { padding:7px 9px; font-size:10px; }
  #loader .lock-link svg { width:13px; height:13px; }
  #loader .lock-hint { bottom:18px; }
}
@keyframes loaderPulse { 0%,100% { opacity:0.55; } 50% { opacity:1; } }
@keyframes loaderSpin { from { transform:translateX(-50%) rotate(0deg); } to { transform:translateX(-50%) rotate(360deg); } }
#menubar .brand { cursor:pointer; }

/* ============ Case-study password gate ============ */
#pwGate { position:fixed; inset:0; z-index:8000; display:none; align-items:center; justify-content:center; background:rgba(10,14,22,0.72); backdrop-filter:blur(10px); font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif; }
#pwGate.on { display:flex; }
#pwGate .pw-card { width:min(360px,88vw); background:#fafafa; border-radius:14px; box-shadow:0 40px 100px rgba(0,0,0,0.55),0 0 0 1px rgba(0,0,0,0.12); overflow:hidden; }
#pwGate .pw-head { padding:22px 22px 8px; text-align:center; }
#pwGate .pw-lock { width:44px; height:44px; margin:0 auto 12px; display:flex; align-items:center; justify-content:center; border-radius:12px; background:#111; color:#fff; }
#pwGate .pw-title { font-size:15px; font-weight:600; color:#111; }
#pwGate .pw-sub { font-size:11px; color:#666; margin-top:4px; letter-spacing:0.03em; }
#pwGate .pw-body { padding:14px 22px 22px; display:flex; flex-direction:column; gap:10px; }
#pwGate input { width:100%; padding:10px 12px; border:1px solid rgba(0,0,0,0.15); border-radius:8px; font-size:13px; font-family:inherit; background:#fff; box-sizing:border-box; }
#pwGate input:focus { outline:none; border-color:#4A6FA0; box-shadow:0 0 0 3px rgba(74,111,160,0.18); }
#pwGate .pw-btns { display:flex; gap:8px; }
#pwGate button { flex:1; padding:9px 12px; border:1px solid rgba(0,0,0,0.14); border-radius:8px; background:#fff; font-family:inherit; font-size:12px; font-weight:600; cursor:pointer; }
#pwGate button.primary { background:#111; color:#fff; border-color:#111; }
#pwGate .pw-err { font-size:11px; color:#c33; min-height:14px; }
#pwGate .pw-note { margin-top:12px; text-align:left; }
#pwGate .pw-note p { margin:0 0 5px; font-size:11.5px; line-height:1.55; color:#4a463e; }
#pwGate .pw-note a { font-size:11.5px; color:#1a1a1a; text-decoration:underline; text-underline-offset:2px; }

/* Case node lock badge — centered over the folder body (JS reparents it inside .folder .body) */
.node { position:relative; }
.folder { position:relative; }
.folder .cs-lock-badge, .node > .cs-lock-badge, .photo-node .thumb .cs-lock-badge { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:26px; height:26px; border-radius:50%; background:rgba(15,18,24,0.86); color:#fff; display:flex; align-items:center; justify-content:center; box-shadow:0 6px 14px rgba(0,0,0,0.38), 0 0 0 2px rgba(255,255,255,0.6); pointer-events:none; z-index:5; backdrop-filter:blur(4px); }
.folder .cs-lock-badge svg, .node > .cs-lock-badge svg, .photo-node .thumb .cs-lock-badge svg { width:13px; height:13px; }
.node.unlocked .cs-lock-badge { display:none; }
/* mobile-only Photos folder */
.photos-mobile { display:none !important; }

/* ============ Mobile iOS-style status bar + hamburger sheet ============ */
#mobile-statusbar { display:none; }
#mobile-sheet { display:none; }
@media (max-width:1024px) {
  /* Hide the desktop macOS-style menubar on mobile */
  #menubar { display:none !important; }
  /* Bump layer down to clear the new status bar */
  #layer-wrap { top:44px !important; }

  #mobile-statusbar {
    display:flex; align-items:center; justify-content:space-between;
    position:fixed; top:0; left:0; right:0; height:44px; z-index:220;
    padding:0 18px 0 22px;
    color:#ffffff; font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif;
    text-shadow:0 1px 2px rgba(0,0,0,0.18);
    pointer-events:auto;
  }
  body[data-theme="black"] #mobile-statusbar { color:#ffffff; }
  #mobile-statusbar .ms-clock {
    font-size:16px; font-weight:600; letter-spacing:0.01em;
    font-variant-numeric:tabular-nums;
  }
  #mobile-statusbar .ms-logo {
    position:absolute; left:calc(50% - 14px); top:8px;
    width:28px; height:28px; object-fit:contain; pointer-events:none;
    display:block !important; visibility:visible !important; opacity:1 !important;
    /* mask the artwork so the mark is always pure white on any wallpaper */
    background-color:#ffffff !important;
    -webkit-mask:url('../assets/mark.svg') center/contain no-repeat;
    mask:url('../assets/mark.svg') center/contain no-repeat;
    filter:drop-shadow(0 1px 2px rgba(0,0,0,0.25)) !important;
    animation:menubarSpin 6s linear infinite;
    transform-origin:50% 50%;
  }
  @keyframes menubarSpin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
  #mobile-statusbar .ms-right {
    display:flex; align-items:center; gap:12px;
  }
  #mobile-statusbar .ms-social {
    display:inline-flex; align-items:center; justify-content:center;
    width:20px; height:20px; border-radius:0;
    color:currentColor; opacity:0.85;
    background:none; border:0; backdrop-filter:none; -webkit-backdrop-filter:none;
    filter:drop-shadow(0 1px 2px rgba(0,0,0,0.3));
    transition:opacity .18s ease, transform .18s ease;
  }
  #mobile-statusbar .ms-social:active { transform:scale(0.88); opacity:1; background:none; }
  #mobile-statusbar .ms-social svg { width:16px; height:16px; }

  #mobile-statusbar .ms-hamburger {
    margin-left:4px; height:28px; width:28px; padding:0; cursor:pointer;
    border-radius:8px; color:currentColor;
    background:rgba(255,255,255,0.14);
    border:1px solid rgba(255,255,255,0.28);
    backdrop-filter:blur(12px) saturate(1.4); -webkit-backdrop-filter:blur(12px) saturate(1.4);
    display:inline-flex; align-items:center; justify-content:center; gap:2.5px;
    transition:transform .18s ease, background .18s ease;
  }
  #mobile-statusbar .ms-hamburger:active { transform:scale(0.88); background:rgba(255,255,255,0.26); }
  body[data-theme="black"] #mobile-statusbar .ms-hamburger {

    background:rgba(255,255,255,0.10); border-color:rgba(255,255,255,0.2);
  }
  #mobile-statusbar .ms-hamburger span {
    display:block; width:3.5px; height:3.5px; border-radius:50%;
    background:currentColor; opacity:0.92;
  }

  /* Hamburger sheet */
  #mobile-sheet { display:block; position:fixed; inset:0; z-index:400; pointer-events:none; }
  #mobile-sheet.open { pointer-events:auto; }
  #mobile-sheet .msh-scrim {
    position:absolute; inset:0; background:rgba(10,14,22,0.35);
    opacity:0; transition:opacity .22s ease;
  }
  #mobile-sheet.open .msh-scrim { opacity:1; }
  #mobile-sheet .msh-panel {
    position:absolute; inset:0; width:100%;
    background:rgba(248,247,245,0.90); backdrop-filter:blur(34px) saturate(1.5);
    -webkit-backdrop-filter:blur(34px) saturate(1.5);
    border-left:0;
    padding:calc(env(safe-area-inset-top,0) + 22px) 26px calc(env(safe-area-inset-bottom,0) + 26px);
    transform:translateY(-100%); opacity:0;
    transition:transform .34s cubic-bezier(.4,.14,.3,1), opacity .28s ease;
    display:flex; flex-direction:column; gap:14px;
    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif; color:#111;
  }
  body[data-theme="black"] #mobile-sheet .msh-panel {
    background:rgba(20,21,24,0.94); color:#f2f1ee;
  }
  #mobile-sheet.open .msh-panel { transform:translateY(0); opacity:1; }
  #mobile-sheet .msh-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
  #mobile-sheet .msh-brand { display:flex; align-items:flex-start; gap:9px; }
  #mobile-sheet .msh-logo {
    width:20px; height:20px; margin-top:4px; object-fit:contain; flex:none;
    background-color:currentColor;
    -webkit-mask:url('../assets/mark.svg') center/contain no-repeat;
    mask:url('../assets/mark.svg') center/contain no-repeat;
    animation:menubarSpin 8s linear infinite; transform-origin:50% 50%; opacity:0.85;
  }
  #mobile-sheet .msh-name { font-size:16px; font-weight:400; letter-spacing:-0.01em; line-height:1.15; }
  #mobile-sheet .msh-role { margin-top:4px; font-size:9px; opacity:0.45; letter-spacing:0.14em; text-transform:uppercase; line-height:1.5; }
  #mobile-sheet .msh-close {
    border:0; background:transparent; color:inherit; cursor:pointer;
    padding:4px 0 0; font-family:inherit;
    font-size:9.5px; letter-spacing:0.18em; text-transform:uppercase; opacity:0.5;
  }
  #mobile-sheet .msh-close:active { opacity:1; }
  #mobile-sheet .msh-nav { display:flex; flex-direction:column; margin-top:28px; }
  #mobile-sheet .msh-nav button,
  #mobile-sheet .msh-nav a {
    display:flex; align-items:baseline; justify-content:space-between; gap:10px;
    padding:13px 0; font-size:15px; font-weight:400; letter-spacing:-0.005em; color:inherit;
    background:transparent; border:0; text-align:left; cursor:pointer;
    border-bottom:1px solid rgba(0,0,0,0.07); text-decoration:none;
    font-family:inherit; transition:opacity .18s ease, padding-left .18s ease;
  }
  #mobile-sheet .msh-nav button:first-child,
  #mobile-sheet .msh-nav a:first-child { border-top:1px solid rgba(0,0,0,0.07); }
  #mobile-sheet .msh-nav button:active,
  #mobile-sheet .msh-nav a:active { opacity:0.55; padding-left:5px; }
  body[data-theme="black"] #mobile-sheet .msh-nav button,
  body[data-theme="black"] #mobile-sheet .msh-nav a { border-bottom-color:rgba(255,255,255,0.09); }
  body[data-theme="black"] #mobile-sheet .msh-nav button:first-child,
  body[data-theme="black"] #mobile-sheet .msh-nav a:first-child { border-top-color:rgba(255,255,255,0.09); }
  #mobile-sheet .msh-nav span { opacity:0.32; font-size:9px; letter-spacing:0.08em; }
  #mobile-sheet .msh-sep { display:none; }
  #mobile-sheet .msh-foot { margin-top:auto; padding-top:22px; display:flex; flex-direction:column; gap:8px; }
  #mobile-sheet .msh-foot .msh-kicker { font-size:9px; letter-spacing:0.2em; text-transform:uppercase; opacity:0.35; }
  #mobile-sheet .msh-foot a {
    color:inherit; text-decoration:none; font-size:11.5px; letter-spacing:0.05em;
    text-transform:uppercase; opacity:0.7; border-bottom:1px solid currentColor;
    align-self:flex-start; padding-bottom:1px;
  }
  #mobile-sheet .msh-socials { display:flex; align-items:center; gap:18px; margin-top:18px; }
  #mobile-sheet .msh-socials a {
    display:inline-flex; align-items:center; justify-content:center;
    width:22px; height:22px; color:inherit; opacity:0.6; border:0;
    transition:opacity .18s ease, transform .18s ease;
  }
  #mobile-sheet .msh-socials a:active { opacity:1; transform:scale(0.9); }
  #mobile-sheet .msh-socials svg { width:18px; height:18px; }
}

#stage {
  position:relative; width:100%; height:100%; overflow:hidden;
  transition:background 1s ease;
}
.grain { display:none !important; }
.tech-grid { display:none !important; }
.bp-line, .crosshair, .dot-cluster, .coord { display:none !important; }
/* per-theme accent tokens */
:root { --accent:#4A6FA0; --accent-soft:rgba(74,111,160,0.75); --accent-glow:rgba(74,111,160,0.25); --hub-1:#e7f1fb; --hub-2:#7fa3c8; --hub-3:#24384e; }
body[data-theme="blue"]    { --accent:#4A6FA0; --accent-soft:rgba(74,111,160,0.78); --accent-glow:rgba(74,111,160,0.25); --hub-1:#eef8ff; --hub-2:#87acd3; --hub-3:#2e4963; }
body[data-theme="green"] { --accent:#4a6b47; --accent-soft:rgba(74,107,71,0.72);   --accent-glow:rgba(74,107,71,0.25); --hub-1:#f0f2dc; --hub-2:#6f8a58; --hub-3:#243f2b; }
body[data-theme="orange"] { --accent:#a97a4a; --accent-soft:rgba(169,122,74,0.72);  --accent-glow:rgba(169,122,74,0.25); --hub-1:#ffe6bf; --hub-2:#bf7f43; --hub-3:#57361f; }
body[data-theme="black"]  { --accent:#ffffff; --accent-soft:rgba(255,255,255,0.7);--accent-glow:rgba(255,255,255,0.3); --hub-1:#ffffff; --hub-2:#d7d7d7; --hub-3:#646464; }

body[data-theme="black"] .tech-grid { display:none !important; }

#layer-wrap { position:absolute; top:38px; left:0; right:0; bottom:102px; overflow:hidden; }
/* desktop: nudge the icon field (and, via the sync script, the intro block) right for breathing room from the award badges */
@media (min-width:1025px) and (pointer:fine) { #layer-wrap { transform:translateX(10px); } }
#layer { position:absolute; left:50%; top:50%; width:2200px; height:1300px; padding-top:190px; transform-origin:center center; transform:translate(-50%,-50%); will-change:transform; }

/* ============ TOP MENU BAR ============ */
#menubar { display:flex; justify-content:space-between; align-items:center;
  position:fixed; top:0; left:0; right:0; height:38px; z-index:200;
  padding:0 16px; gap:12px; white-space:nowrap;
  background:rgba(255,255,255,0.5);
  backdrop-filter:blur(16px) saturate(160%);
  border-bottom:1px solid rgba(0,0,0,0.08);
  font-size:11px; letter-spacing:0.04em; color:rgba(40,40,40,0.85);
  transition:background 0.6s, color 0.6s;
}
body[data-theme="black"] #menubar { background:rgba(0,0,0,0.65); color:rgba(220,228,240,0.9); border-bottom:1px solid rgba(255,255,255,0.1); }
#menubar .left { display:flex; align-items:center; gap:2px; flex:1; min-width:0; }
#brand-stack {
  position:fixed; top:104px; left:222px; transform:none; z-index:180;
  display:flex; flex-direction:column; align-items:flex-start; gap:5px; text-align:left;
  width:min(560px, calc(100vw - 560px)); color:rgba(28,28,32,0.9); pointer-events:auto;
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif;
}
body[data-theme="black"] #brand-stack { color:rgba(230,236,245,0.94); }
#brand-stack .avail { display:inline-flex; align-items:center; gap:7px; font-size:10.5px; letter-spacing:0.16em; text-transform:uppercase; font-weight:700; }
#brand-stack .avail .dot { width:7px; height:7px; border-radius:50%; background:#5aa06a; box-shadow:0 0 0 2px rgba(90,160,106,0.22); animation:availPulse 1.15s ease-in-out infinite; }
#brand-stack .hero-lede { font-size:10.5px; line-height:1.45; margin:0; max-width:100%; opacity:0.78; font-weight:500; letter-spacing:0.01em; text-align:left; }
#brand-stack .hero-portrait {
  width:168px; height:168px; border-radius:50%; object-fit:cover; display:block; flex:0 0 auto;
  margin:0; border:0; box-shadow:none;
}
#brand-stack .hero-rule { width:34px; height:1px; background:currentColor; opacity:0.28; margin:6px 0 2px; }
#brand-stack .hero-row { display:flex; flex-direction:row; align-items:center; gap:20px; width:100%; }
#brand-stack .hero-col { display:flex; flex-direction:column; align-items:flex-start; gap:5px; min-width:0; flex:1 1 auto; }
#brand-stack .hero-more {
  align-self:flex-start; margin-top:6px; background:transparent; border:0; padding:0; cursor:pointer;
  color:inherit; font-family:inherit; font-size:10px; font-weight:700; letter-spacing:0.08em;
  text-transform:uppercase; opacity:0.75; display:inline-flex; align-items:center; gap:5px;
  border-bottom:1px solid currentColor; line-height:1.4;
}
#brand-stack .hero-more:hover { opacity:1; }
#brand-stack .hero-lede a { color:inherit; font-weight:700; text-decoration:none; border-bottom:1px solid currentColor; }
#brand-stack .hero-lede a:hover { opacity:0.7; }
@media (max-width:1024px) {
  #brand-stack { left:26px; width:min(430px, calc(100vw - 300px)); gap:4px; }
  #brand-stack .hero-lede { font-size:9.5px; max-width:100%; }
  #brand-stack .hero-portrait { width:132px; height:132px; border-radius:50%; margin-bottom:0; }
}
@keyframes availPulse {
  0%,100% { box-shadow:0 0 0 2px rgba(90,160,106,0.22), 0 0 0 0 rgba(90,160,106,0.55); }
  50%     { box-shadow:0 0 0 2px rgba(90,160,106,0.22), 0 0 0 8px rgba(90,160,106,0); }
}
#copyright { position:fixed; left:16px; bottom:10px; z-index:180; font-size:10px; letter-spacing:0.08em; color:rgba(40,40,40,0.6); text-transform:uppercase; pointer-events:none; }
body[data-theme="black"] #copyright { color:rgba(220,228,240,0.55); }

/* ============ Services widget theming (inherits .widget layout in rail) ============ */
body[data-theme="black"] #services-widget ul li { color:#f4f2ee !important; border-bottom-color:rgba(255,255,255,0.10) !important; }
body[data-theme="black"] #services-widget ul li span:last-child { color:#8590a0 !important; }
body[data-theme="black"] #services-widget a[href^="mailto"] { background:#f4f2ee !important; color:#141416 !important; }
#menubar .center { display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
#menubar .right { flex:1; justify-content:flex-end; min-width:0; overflow:hidden; }
#menubar .brand { font-weight:700; letter-spacing:0.05em; display:flex; align-items:center; gap:8px; font-size:12px; }
#menubar .brand-logo {
  width:18px; height:18px; object-fit:contain;
  filter:brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0,0,0,0.25));
  animation:menubarSpin 6s linear infinite;
  transform-origin:50% 50%;
}
@keyframes menubarSpin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
#menubar .tagline-inline { font-size:11px; letter-spacing:0.02em; opacity:0.55; font-style:italic; overflow:hidden; text-overflow:ellipsis; }
#menubar .brand { font-size:13px !important; }
#menubar .social { color:inherit; display:inline-flex; opacity:0.65; transition:opacity 0.15s; }
#menubar .social:hover { opacity:1; }
#menubar .social svg { width:14px; height:14px; }
#menubar .menu-item { opacity:0.6; cursor:default; }
#menubar .right { display:flex; align-items:center; gap:14px; opacity:0.85; }
#menubar .status-dot { width:5px; height:5px; border-radius:50%; background:#5aa06a; box-shadow:0 0 0 2px rgba(90,160,106,0.2); }

/* ============ macOS-style menubar dropdowns ============ */
#menubar .center { gap:2px; }
.mb-menu { position:relative; }
.mb-menu > .mb-trigger {
  display:inline-flex; align-items:center; padding:3px 10px; border-radius:6px;
  font-size:13px; font-weight:400; letter-spacing:0.01em; color:inherit;
  background:transparent; border:0; cursor:pointer; font-family:inherit;
  transition:background 0.12s;
}
.mb-menu > .mb-trigger:hover,
.mb-menu.open > .mb-trigger { background:rgba(0,0,0,0.06); }
body[data-theme="black"] .mb-menu > .mb-trigger:hover,
body[data-theme="black"] .mb-menu.open > .mb-trigger { background:rgba(255,255,255,0.1); }
.mb-dropdown {
  position:absolute; top:calc(100% + 4px); left:0; min-width:230px;
  background:rgba(245,247,252,0.94); backdrop-filter:blur(24px) saturate(180%);
  border:1px solid rgba(0,0,0,0.1); border-radius:10px;
  box-shadow:0 12px 32px rgba(20,30,60,0.22), 0 2px 6px rgba(0,0,0,0.08);
  padding:5px; z-index:9999; display:none;
  font-size:13px; color:#1a1a1f; letter-spacing:0;
}
.mb-menu.open .mb-dropdown { display:block; }
.mb-dropdown a, .mb-dropdown button {
  display:flex; align-items:center; gap:10px; width:100%;
  padding:6px 10px; border-radius:5px; border:0; background:transparent;
  color:inherit; text-decoration:none; font:inherit; text-align:left;
  cursor:pointer; white-space:nowrap;
}
.mb-dropdown a:hover, .mb-dropdown button:hover { background:#3d7bff; color:#fff; }
.mb-dropdown .mb-sep { height:1px; background:rgba(0,0,0,0.09); margin:5px 6px; }
.mb-dropdown .mb-shortcut { margin-left:auto; opacity:0.55; font-size:11.5px; }
body[data-theme="black"] .mb-dropdown { background:rgba(30,32,42,0.94); color:rgba(230,235,245,0.95); border-color:rgba(255,255,255,0.08); }
body[data-theme="black"] .mb-dropdown .mb-sep { background:rgba(255,255,255,0.08); }
/* ---- cursor identity chip + panel ---- */
#mbCursorMenu > .mb-trigger { display:inline-flex; align-items:center; gap:6px; }
.cur-chip-glyph { width:18px; height:18px; border-radius:5px; background:rgba(255,255,255,0.9); box-shadow:0 0 0 1px rgba(0,0,0,0.12); display:inline-flex; align-items:center; justify-content:center; font-size:11px; line-height:1; }
body[data-theme="black"] .cur-chip-glyph { background:rgba(255,255,255,0.16); box-shadow:0 0 0 1px rgba(255,255,255,0.14); }
#curChipName { max-width:96px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cur-panel { min-width:236px; padding:10px 12px 12px; }
.cur-panel .cur-sec { font:600 8px 'Space Grotesk',sans-serif; letter-spacing:0.16em; text-transform:uppercase; opacity:0.5; margin:8px 0 6px; }
.cur-panel .cur-sec:first-child { margin-top:2px; }
.cur-panel input[type="text"] { width:100%; box-sizing:border-box; padding:7px 9px; border-radius:7px; border:1px solid rgba(0,0,0,0.14); background:rgba(255,255,255,0.85); font:500 12.5px inherit; color:inherit; }
body[data-theme="black"] .cur-panel input[type="text"] { background:rgba(255,255,255,0.08); border-color:rgba(255,255,255,0.14); }
.cur-emoji { display:grid; grid-template-columns:repeat(8,1fr); gap:3px; }
.cur-emoji button { width:100%; padding:3px 0 !important; border-radius:6px; font-size:14px; line-height:1.3; text-align:center; display:block; background:transparent; border:0; cursor:pointer; }
.cur-emoji button.active { background:rgba(0,0,0,0.1); }
body[data-theme="black"] .cur-emoji button.active { background:rgba(255,255,255,0.16); }
.cur-colors { display:flex; gap:7px; flex-wrap:wrap; }
.cur-colors button { width:20px; height:20px; padding:0 !important; border-radius:50%; border:2px solid rgba(255,255,255,0.9); box-shadow:0 0 0 1px rgba(0,0,0,0.18); cursor:pointer; }
.cur-colors button.active { box-shadow:0 0 0 2px rgba(255,255,255,0.9); }
.cur-live { display:flex; align-items:center; gap:7px; margin-top:11px; font-size:11.5px; opacity:0.8; cursor:pointer; }
.cur-status { margin-top:6px; font:500 10px 'Space Grotesk',sans-serif; letter-spacing:0.06em; opacity:0.5; }
.cur-warn { margin-top:6px; font:500 10px 'Space Grotesk',sans-serif; letter-spacing:0.04em; line-height:1.4; color:#c0392b; }
.cur-panel a:hover, .cur-panel button:hover { background:transparent; color:inherit; }
/* trailing name tag for the local cursor */
#myCursorTag, .peer-cursor { position:fixed; z-index:9998; pointer-events:none; will-change:transform; top:0; left:0; }
.cur-tag { display:inline-flex; align-items:center; gap:4px; padding:2px 7px; border-radius:999px; font:600 10px 'Space Grotesk',-apple-system,sans-serif; letter-spacing:0.04em; color:#fff; white-space:nowrap; box-shadow:0 4px 12px rgba(0,0,0,0.22); }
.peer-cursor { transition:transform 0.09s linear; }
.peer-cursor svg { display:block; filter:drop-shadow(0 2px 4px rgba(0,0,0,0.25)); }
.peer-cursor .cur-tag { margin:2px 0 0 12px; }
.cur-react-bar { position:fixed; z-index:9999; top:0; left:0; display:none; gap:2px; padding:4px 5px; border-radius:999px; background:rgba(255,255,255,0.72); backdrop-filter:blur(14px) saturate(160%); -webkit-backdrop-filter:blur(14px) saturate(160%); border:1px solid rgba(255,255,255,0.6); box-shadow:0 8px 22px rgba(0,0,0,0.18); pointer-events:auto; }
.cur-react-bar.on { display:flex; animation:scale-in 0.14s ease-out; }
.cur-react-bar button { border:0; background:transparent; font-size:15px; line-height:1; padding:3px 4px; border-radius:999px; cursor:pointer; transition:transform 0.12s ease, background 0.12s ease; }
.cur-react-bar button:hover { transform:scale(1.25); background:rgba(0,0,0,0.06); }
.cur-pop { position:fixed; z-index:10000; top:0; left:0; pointer-events:none; font-size:22px; animation:curPopUp 1.15s ease-out forwards; }
.cur-pop .cur-pop-who { display:block; font:600 9px 'Space Grotesk',-apple-system,sans-serif; letter-spacing:0.05em; color:#fff; background:rgba(17,17,17,0.72); padding:2px 6px; border-radius:999px; margin-top:2px; white-space:nowrap; }
@keyframes curPopUp { 0% { opacity:0; transform:translate(var(--px),var(--py)) scale(0.6); } 20% { opacity:1; transform:translate(var(--px),calc(var(--py) - 10px)) scale(1.1); } 100% { opacity:0; transform:translate(var(--px),calc(var(--py) - 54px)) scale(1); } }
@media (max-width:900px){ #mbCursorMenu { display:none; } #myCursorTag { display:none !important; } }

/* Brand item — same color as siblings, just bold */
.brand-menu { display:inline-flex; align-items:center; }
.brand-menu > .brand-trigger {
  padding:3px 10px; gap:8px; font-weight:700;
  margin-right:6px;
}
.brand-menu .brand-logo { width:16px; height:16px; opacity:0.9; }
.brand-menu > .brand-lock {
  display:inline-flex; align-items:center; justify-content:center;
  padding:3px 6px; border-radius:6px; background:transparent; border:0;
  cursor:pointer; font-family:inherit; color:inherit;
  transition:background 0.12s;
}
.brand-menu > .brand-lock:hover { background:rgba(0,0,0,0.06); }
body[data-theme="black"] .brand-menu > .brand-lock:hover { background:rgba(255,255,255,0.1); }
.brand-menu > .brand-trigger { margin-left:-2px; }

/* ============ Mascot helper (Mac) ============ */
#peach-guide {
  position:fixed; left:auto; right:26px; bottom:34px; top:auto; z-index:9998;
  font-family:'JetBrains Mono','IBM Plex Mono',ui-monospace,monospace;
  pointer-events:auto;
}
@keyframes peachIn { from { transform:translateY(6px) scale(0.98); opacity:0; } to { transform:translateY(0) scale(1); opacity:1; } }
#peach-guide .peach-wrap { position:relative; width:76px; height:76px; touch-action:none; }
#peach-guide .peach {
  width:76px; height:76px; filter:none;
  user-select:none; cursor:pointer; transition:transform 0.15s;
  display:block;
}
#peach-guide .mac-label {
  position:absolute; left:50%; bottom:calc(100% + 6px); transform:translateX(-50%);
  font:600 9px 'JetBrains Mono','IBM Plex Mono',ui-monospace,monospace;
  letter-spacing:0.18em; text-transform:lowercase; white-space:nowrap;
  color:#f4f6fa; padding:6px 11px; border-radius:16px;
  background:rgba(255,255,255,0.1); backdrop-filter:blur(10px) saturate(140%);
  -webkit-backdrop-filter:blur(10px) saturate(140%);
  border:1px solid rgba(255,255,255,0.22);
  box-shadow:0 4px 14px rgba(0,0,0,0.18);
  pointer-events:none;
}
#peach-guide.show { z-index:100000; }
#peach-guide.dragging .peach { cursor:grabbing; }
#peach-guide { cursor:grab; }
#peach-guide .bubble {
  display:none;
  position:absolute; left:auto; right:calc(100% + 14px); bottom:0; top:auto;
  width:300px; max-width:calc(100vw - 120px);
  padding:0 0 14px;
  background:#FCFBF9;
  color:#4a4740;
  border:1px solid rgba(0,0,0,0.06);
  border-radius:18px; overflow:hidden;
  box-shadow:0 24px 60px rgba(28,24,20,0.28);
  font-size:12.5px; line-height:1.6; letter-spacing:0.01em;
  animation:peachIn 0.28s cubic-bezier(.2,.9,.3,1.2);
}
#peach-guide.show .bubble { display:block; }
#peach-guide .bubble::before {
  content:''; position:absolute; left:auto; right:-6px; bottom:22px;
  width:10px; height:10px; background:#FCFBF9;
  border-right:1px solid rgba(0,0,0,0.06);
  border-top:1px solid rgba(0,0,0,0.06);
  transform:rotate(45deg);
}
#peach-guide .bubble::after {
  content:''; display:block; position:absolute; top:0; left:0; right:0; height:74px;
  background:linear-gradient(160deg,#DEE4F7 0%,#DCD6F2 52%,#EDE8F8 100%);
  pointer-events:none;
}
#peach-guide .bubble .step {
  position:relative; z-index:1; height:74px; padding:0 18px;
  display:flex; align-items:flex-end; gap:5px; padding-bottom:12px;
  font-size:0;
}
#peach-guide .bubble .step i {
  width:14px; height:3px; border-radius:2px; background:rgba(70,60,52,0.22);
  transition:background .2s, width .2s;
}
#peach-guide .bubble .step i.on { background:rgba(70,60,52,0.62); }
#peach-guide .bubble h4 {
  margin:16px 18px 6px; font-size:19px; font-weight:400; letter-spacing:-0.01em; line-height:1.25;
  color:#2d2a26; font-family:'Instrument Serif','Iowan Old Style',Georgia,serif;
}
#peach-guide .bubble p { margin:0 18px 14px; color:#7d786f; font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif; }
#peach-guide .bubble .row { display:flex; gap:8px; align-items:center; justify-content:flex-end; padding:0 18px; }
#peach-guide .bubble button {
  border:1px solid #2d2a26;
  background:#2d2a26; color:#faf9f7;
  padding:8px 20px; border-radius:999px;
  font:500 11.5px -apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif;
  letter-spacing:0.02em; cursor:pointer;
  transition:background 0.15s, color 0.15s, transform 0.1s;
}
#peach-guide .bubble button:hover { background:#413d37; border-color:#413d37; }
#peach-guide .bubble button:active { transform:translateY(1px); }
#peach-guide .bubble button.ghost { background:transparent; border-color:transparent; color:#a09b92; padding:8px 8px; }
#peach-guide .bubble button.ghost:hover { color:#2d2a26; }

/* ============ Emoji picker ============ */
#emoji-picker {
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%);
  z-index:9999; display:none;
  background:rgba(248,249,252,0.98); backdrop-filter:blur(24px) saturate(160%);
  border:1px solid rgba(0,0,0,0.1); border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,0.28); padding:14px 16px 12px;
  width:340px; font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif;
}
#emoji-picker.show { display:block; }
#emoji-picker h4 { margin:0 0 8px; font-size:12px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:#4a4a55; }
#emoji-picker .grid { display:grid; grid-template-columns:repeat(8,1fr); gap:2px; }
#emoji-picker .grid button { border:0; background:transparent; font-size:22px; padding:5px; border-radius:6px; cursor:pointer; }
#emoji-picker .grid button:hover { background:rgba(60,120,220,0.15); transform:scale(1.15); }
#emoji-picker .hint { margin-top:8px; font-size:11px; color:#7a7a85; }
#emoji-picker .close-x { position:absolute; top:8px; right:10px; border:0; background:transparent; font-size:18px; color:#888; cursor:pointer; }
body[data-theme="black"] #emoji-picker { background:rgba(28,30,38,0.98); color:#e6ebf5; border-color:rgba(255,255,255,0.08); }
body[data-theme="black"] #emoji-picker h4 { color:#b0b5c2; }

/* Floating stuck emojis */
.stuck-emoji {
  position:fixed; z-index:150; font-size:34px; cursor:grab;
  user-select:none; pointer-events:auto;
  filter:drop-shadow(0 4px 10px rgba(0,0,0,0.25));
  animation:emojiPop 0.4s cubic-bezier(.2,.9,.3,1.4);
}
@keyframes emojiPop { from { transform:scale(0.2) rotate(-30deg); opacity:0; } to { transform:scale(1) rotate(0); opacity:1; } }
.stuck-emoji:active { cursor:grabbing; }

@media (max-width:1024px) {
  .mb-menu > .mb-trigger { font-size:11px; padding:3px 7px; }
  .mb-dropdown { min-width:200px; font-size:12px; }
  #peach-guide { left:auto; right:12px; top:auto; bottom:calc(env(safe-area-inset-bottom, 0px) + 178px); z-index:180; }
  #peach-guide .peach-wrap { width:60px; height:60px; }
  #peach-guide .peach { width:60px; height:60px; }
  #peach-guide .mac-label { font-size:8px; padding:3px 7px; }
  #peach-guide .bubble {
    left:auto; right:calc(100% + 14px); top:auto; bottom:0;
    width:240px; max-width:calc(100vw - 100px); font-size:12px;
  }
  #emoji-picker { width:min(320px, calc(100vw - 24px)); }
}

.theme-toggle {
  display:flex; align-items:center; gap:7px; cursor:pointer;
  padding:4px 10px; border-radius:20px; border:1px solid rgba(0,0,0,0.15);
  background:rgba(255,255,255,0.6); font-size:10px; letter-spacing:0.08em; text-transform:uppercase;
  transition:background 0.2s;
}
body[data-theme="black"] .theme-toggle { border-color:rgba(255,255,255,0.2); background:rgba(255,255,255,0.08); }
.theme-toggle:hover { filter:brightness(1.08); }
.theme-toggle .swatch { width:10px; height:10px; border-radius:50%; transition:background 0.5s; }

/* ============ BLUEPRINT CHROME — constant across every theme ============ */
.bp-line { position:absolute; height:1px; left:0; right:0; background:rgba(74,111,160,0.22); z-index:1; pointer-events:none; transition:background 0.6s; }
body[data-theme="black"] .bp-line { background:rgba(120,180,255,0.14); }
.bp-line.v { height:auto; width:1px; top:0; bottom:0; left:auto; right:auto; }
.crosshair { position:absolute; width:18px; height:18px; z-index:3; pointer-events:none; }
.crosshair::before, .crosshair::after { content:''; position:absolute; background:rgba(74,111,160,0.55); }
body[data-theme="black"] .crosshair::before,
body[data-theme="black"] .crosshair::after { background:rgba(140,200,255,0.5); }
.crosshair::before { left:50%; top:0; width:1px; height:100%; transform:translateX(-50%); }
.crosshair::after  { top:50%; left:0; height:1px; width:100%; transform:translateY(-50%); }
.dot-cluster { position:absolute; z-index:3; pointer-events:none; display:grid; grid-template-columns:repeat(4,5px); grid-auto-rows:5px; gap:5px; }
.dot-cluster span { width:2px; height:2px; border-radius:50%; background:rgba(74,111,160,0.5); }
.coord { position:absolute; z-index:3; pointer-events:none; font-size:10px; letter-spacing:0.08em; color:rgba(51,77,110,0.65); line-height:1.6; }
body[data-theme="black"] .coord { color:rgba(210,220,235,0.7); }

.bp-tagline {
  position:absolute; left:70px; bottom:130px; z-index:3;
  font-size:11px; letter-spacing:0.12em; color:rgba(51,77,110,0.8);
  text-transform:uppercase; display:flex; flex-direction:column; gap:6px;
}
body[data-theme="black"] .bp-tagline { color:rgba(220,228,240,0.85); }
.bp-tagline .row1 { display:flex; align-items:center; gap:18px; }
.bp-tagline .div { width:1px; height:14px; background:currentColor; opacity:0.4; }
.bp-tagline .tags { display:flex; gap:10px; opacity:0.75; }
.bp-tagline .sub { font-size:9px; letter-spacing:0.06em; text-transform:none; opacity:0.6; font-style:italic; }

.callout { position:absolute; z-index:6; pointer-events:none; }
.callout svg { position:absolute; top:0; left:0; overflow:visible; }
.callout-marker { position:absolute; width:7px; height:7px; border:1.3px solid rgba(74,111,160,0.75); transform:translate(-50%,-50%); background:rgba(223,233,245,0.6); }
.callout-label { position:absolute; font-size:8px; letter-spacing:0.1em; color:rgba(74,111,160,0.85); white-space:nowrap; text-transform:uppercase; }
body[data-theme="black"] .callout-marker { background:rgba(20,26,38,0.7); border-color:rgba(210,220,235,0.6); }
body[data-theme="black"] .callout-label { color:rgba(210,220,235,0.8); }

/* ============ ROCK / SPECIMEN CENTERPIECE ============ */
.rock-hub-wrap {
  position:absolute; left:1100px; top:650px; width:640px; height:580px;
  transform:translate(-50%,-50%); z-index:5; pointer-events:none;
  display:flex; align-items:center; justify-content:center;
}
.rock-hub-wrap::before {
  content:''; display:none;
}
.rock-hub {
  position:relative; z-index:1; width:100%; height:100%; object-fit:contain;
  filter:url(#knockoutLight) drop-shadow(0 34px 44px rgba(30,50,80,0.28));
  animation:none;
  transform-origin:center center;
  transition:opacity 0.5s;
  mix-blend-mode:normal;
}
.rock-hub:not([src]) { opacity:0; }
body[data-theme="black"] .rock-hub {
  mix-blend-mode:normal;
  filter:url(#knockoutDark) drop-shadow(0 0 40px rgba(255,255,255,0.18));
  -webkit-mask-image:none;
          mask-image:none;
}
@keyframes spin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
.rock-glow {
  position:absolute; left:1100px; top:670px; width:460px; height:460px;
  transform:translate(-50%,-50%); z-index:4; pointer-events:none;
  transition:background 1s;
}

/* ============ SHARED NODE CHROME — identical across themes ============ */
.node { position:absolute; display:flex; flex-direction:column; align-items:center; z-index:10; cursor:pointer; transform:rotate(var(--rot,0deg)); }
.node:hover { transform:rotate(var(--rot,0deg)); z-index:50; }
.node-label {
  margin-top:4px; font-size:13px; letter-spacing:0.01em; text-transform:none; font-weight:500;
  color:rgba(35,55,85,0.92); text-align:center; white-space:nowrap;
  padding:2px 7px; border-radius:2px; transition:color 0.3s, background 0.15s;
}
body[data-theme="black"] .node-label { color:rgba(220,228,240,0.75); }
.node-sub { display:none !important; }

.folder {
  position:relative; width:150px; height:120px;
  filter:drop-shadow(0 6px 10px rgba(30,50,80,0.28));
}
/* flat — no hover scale on desktop icons */
.folder .tab {
  position:absolute; top:0; left:0; width:42%; height:17px;
  background:linear-gradient(180deg,#5aa4f2 0%,#3689df 100%);
  border-radius:2px 8px 0 0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.5), 0 1px 0 rgba(20,60,120,0.18);
}
/* Paper sliver peeking between tab and front body */
.folder::before {
  content:''; position:absolute; left:4px; right:6px; top:12px; height:7px; z-index:1;
  background:linear-gradient(180deg,#fdfdfd 0%,#e8ecf1 100%);
  border-radius:2px 2px 0 0;
  box-shadow:0 1px 0 rgba(0,0,0,0.1);
}
.folder .body {
  position:absolute; top:14px; left:0; right:0; bottom:0; z-index:2;
  background:linear-gradient(180deg,#7fb8fb 0%,#3d8be3 55%,#3583dc 100%);
  border-radius:3px 10px 10px 10px;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.75),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    inset 0 -18px 30px rgba(20,60,120,0.15);
}
.folder .body::after { display:none; }
/* Selection: soft gray rounded backdrop like Finder icon-view */
.node.folder-node.selected .folder,
.node.selected .folder { filter:drop-shadow(0 6px 10px rgba(30,50,80,0.28)); }
.folder-glyph {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:42px; filter:drop-shadow(0 1px 1px rgba(0,0,0,0.25));
  pointer-events:none;
}
/* Icon-sized tiles — Bookshelf, Watchlist, Notes match dock-icon scale */
.icon-tile {
  width:116px; height:116px; padding:6px; box-sizing:border-box;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(180deg,#ffffff,#eef1f5);
  border:1px solid rgba(0,0,0,0.14);
  border-radius:16px;
  box-shadow:0 6px 14px rgba(20,30,50,0.28), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform .18s ease;
}
.icon-tile > img, .icon-tile > svg { width:100%; height:100%; object-fit:contain; display:block; }
body[data-theme="black"] .icon-tile { background:linear-gradient(180deg,#2a2a30,#161619); border-color:rgba(255,255,255,0.18); }
/* App-specific tile colors — soft pastel/neumorphic on-brand gradients */
/* Soft, airy, on-brand tile backgrounds. Barely tinted whites so app glyphs pop. */
#n-bookshelf .icon-tile { background:linear-gradient(160deg,#fffaf2 0%,#fbecd6 55%,#f2d6ae 100%); border-color:rgba(200,160,110,0.32); box-shadow:0 8px 18px rgba(200,155,105,0.18), inset 0 1.5px 0 rgba(255,255,255,0.95), inset 0 -6px 14px rgba(210,165,115,0.12); }
#n-watchlist .icon-tile { background:linear-gradient(160deg,#fffafa 0%,#fbe4e1 55%,#f2c6c1 100%); border-color:rgba(215,170,165,0.32); box-shadow:0 8px 18px rgba(215,165,160,0.18), inset 0 1.5px 0 rgba(255,255,255,0.95), inset 0 -6px 14px rgba(215,160,155,0.10); }
#n-photos .icon-tile    { padding:6px; overflow:hidden; }
/* Subtle app-icon lift to distinguish apps from files/folders on desktop */
#n-pk01, #n-bookshelf, #n-fal, #n-watchlist, #n-stickies, #n-notebook, #n-photos { filter:drop-shadow(0 4px 8px rgba(20,30,50,0.18)); }

/* ============ Forward aesthetic v4 — clear transparent glass ============ */
/* App icons match the awards ribbons and weather widgets: frosted, see-through. */
#n-pk01 .icon-tile,
#n-stickies .note-thumb,
#n-notebook .nb-thumb,
#n-bookshelf .icon-tile,
#n-watchlist .icon-tile,
#n-photos .icon-tile,
#n-fal .icon-tile {
  position:relative; overflow:hidden;
  background: rgba(255,255,255,0.14) !important;
  border:1px solid rgba(255,255,255,0.28) !important;
  box-shadow:
    0 8px 24px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -6px 14px rgba(255,255,255,0.05) !important;
  backdrop-filter:blur(16px) saturate(160%);
  -webkit-backdrop-filter:blur(16px) saturate(160%);
}
/* Soft top-left sheen */
#n-pk01 .icon-tile::before,
#n-stickies .note-thumb::before,
#n-bookshelf .icon-tile::before,
#n-watchlist .icon-tile::before,
#n-photos .icon-tile::before,
#n-fal .icon-tile::before,
#n-notebook .nb-thumb::after {
  content:''; position:absolute; inset:0; pointer-events:none; border-radius:inherit;
  background: linear-gradient(150deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 55%);
  opacity:0.9;
}
/* Chess king: bright rim-light so the dark piece reads on clear glass */
#n-fal .icon-tile img {
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.50)) drop-shadow(0 10px 18px rgba(10,20,40,0.30));
}

#n-notebook .nb-thumb::before {
  display:none;
}
#n-stickies .note-thumb > span { position:relative; z-index:2; filter:drop-shadow(0 1px 3px rgba(0,0,0,0.35)); }
/* Hide legacy sticky note decorative lines when we're using an emoji tile */
#n-stickies .note-thumb::before,
#n-stickies .note-thumb::after { display:none; }
/* Unified emoji glyph inside app tiles — small centered glyph, like bookshelf/watchlist */
.tile-emoji {
  position:relative; z-index:2;
  font-size:42px; line-height:1;
  display:flex; align-items:center; justify-content:center;
  width:100%; height:100%;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
#n-pk01 .icon-tile > svg,
#n-pk01 .icon-tile > img,
#n-bookshelf .icon-tile > img,
#n-watchlist .icon-tile > img,
#n-notebook .nb-thumb > svg {
  position:relative; z-index:1;
  filter:drop-shadow(0 1px 4px rgba(0,0,0,0.28));
}

/* ---------- Notebook icon (minimal NOTES. tile) ---------- */
.nb-thumb {
  width:116px; height:116px; padding:6px; box-sizing:border-box; border-radius:16px; overflow:hidden; position:relative;
  background:linear-gradient(160deg,#f2f2f0 0%,#e6e6e3 100%);
  box-shadow:0 8px 18px rgba(30,40,60,0.18), inset 0 1.5px 0 rgba(255,255,255,0.9), inset 0 -2px 6px rgba(0,0,0,0.04);
  display:flex; align-items:center; justify-content:center;
}
.nb-thumb::before {
  content:'notebook'; font:600 10px 'JetBrains Mono','Courier New',monospace;
  color:#1a1a1a; letter-spacing:0.04em;
}

/* ---------- Notebook modal (minimal, monospace) ---------- */
#notebookModal .nb-frame {
  width:min(860px,94vw); height:min(600px,88vh);
  background:#ececea; border-radius:14px; overflow:hidden;
  box-shadow:0 40px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.10);
  display:flex; flex-direction:column;
  font-family:'JetBrains Mono','Courier New',ui-monospace,monospace;
  color:#1a1a1a;
}
#notebookModal .nb-titlebar {
  height:44px; background:transparent; border-bottom:1px solid rgba(0,0,0,0.06);
  display:flex; align-items:center; padding:0 16px; gap:14px; flex-shrink:0;
}
#notebookModal .nb-back {
  display:none; background:transparent; border:0; padding:4px 8px;
  font:600 12px 'JetBrains Mono','Courier New',monospace; color:#3a3a38;
  cursor:pointer; letter-spacing:0.04em; margin-left:4px;
}
#notebookModal .nb-back::before { content:'‹ '; color:#8a8a86; }
#notebookModal .nb-brand {
  font:600 13px inherit; color:#1a1a1a; letter-spacing:0.06em;
  text-transform:lowercase;
}
#notebookModal .nb-brand::before { content:'— '; color:#c9c9c5; }
#notebookModal .nb-body { flex:1; display:flex; min-height:0; }
#notebookModal .nb-sidebar {
  width:220px; background:transparent; border-right:1px solid rgba(0,0,0,0.06);
  padding:20px 0; overflow:auto; flex-shrink:0;
}
#notebookModal .nb-side-h {
  font:600 10px inherit; color:#8a8a86; text-transform:lowercase; letter-spacing:0.14em;
  padding:0 20px 12px;
}
#notebookModal .nb-item {
  display:block; width:100%; text-align:left; background:transparent; border:0;
  padding:8px 20px; font:500 13px inherit; color:#3a3a38; cursor:pointer;
  border-left:2px solid transparent; letter-spacing:0.01em;
}
#notebookModal .nb-item:hover { color:#1a1a1a; }
#notebookModal .nb-item.active { color:#1a1a1a; font-weight:700; border-left-color:#1a1a1a; }
#notebookModal .nb-page {
  flex:1; overflow:auto; padding:28px 44px 60px; background:#f5f5f3;
  font-size:13px; line-height:22px; color:#1a1a1a;
}
#notebookModal .nb-datebar {
  font:500 12px inherit; color:#8a8a86; margin-bottom:26px; letter-spacing:0.02em;
}
#notebookModal .nb-datebar .sep { margin:0 8px; color:#c9c9c5; }
#notebookModal .nb-title-box {
  font:800 15px inherit; color:#1a1a1a; margin-bottom:22px; letter-spacing:0.01em;
}
#notebookModal .nb-content p { margin:0 0 18px; }
#notebookModal .nb-content strong { color:#1a1a1a; font-weight:700; }
#notebookModal .nb-content h4 {
  margin:24px 0 10px; font:600 11px inherit; color:#8a8a86;
  letter-spacing:0.14em; text-transform:lowercase;
}
#notebookModal .nb-content h4::before { content:'— '; color:#c9c9c5; }

/* Reading page — compact, easy to scan */
#notebookModal .nb-sidebar { width:164px; padding:18px 0; }
#notebookModal .nb-side-h { padding:0 16px 10px; }
#notebookModal .nb-item { padding:7px 16px; font-size:12px; }
#notebookModal .nb-page {
  padding:26px 32px 44px;
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Helvetica Neue',sans-serif;
  font-size:13.5px; line-height:1.62; color:#3a3a36;
}
#notebookModal .nb-page > * { max-width:66ch; }
#notebookModal .nb-datebar {
  display:flex; align-items:baseline; justify-content:space-between; gap:14px;
  font:500 9.5px 'JetBrains Mono','Courier New',monospace; color:#9a9a94;
  letter-spacing:0.16em; text-transform:uppercase;
  margin:0 0 12px; padding-bottom:10px; border-bottom:1px solid rgba(0,0,0,0.07);
}
#notebookModal .nb-title-box {
  font-family:inherit; font-size:19px; font-weight:600; line-height:1.25;
  letter-spacing:-0.005em; color:#17170f; margin:0 0 8px;
}
#notebookModal .nb-content .nb-dek {
  font-size:13px; line-height:1.5; color:#8d8d84; margin:0 0 16px; font-style:normal;
}
#notebookModal .nb-content p { margin:0 0 13px; }
#notebookModal .nb-content .nb-dek + p::first-letter {
  float:none; font-size:inherit; line-height:inherit; font-weight:inherit;
  margin:0; color:inherit;
}
#notebookModal .nb-content strong { color:#17170f; font-weight:600; }
#notebookModal .nb-content h4 {
  margin:20px 0 8px; font:600 9.5px 'JetBrains Mono','Courier New',monospace;
  color:#9a9a94; letter-spacing:0.18em; text-transform:uppercase;
}
#notebookModal .nb-content h4::before { content:''; }
#notebookModal .nb-content h4::after { content:none; }
#notebookModal .nb-end {
  margin:22px 0 0; font-size:12px; color:#c2c2b8; letter-spacing:0.3em;
}

@media (max-width: 720px) {
  #notebookModal .nb-frame { height:92vh; }
  #notebookModal .nb-body { position:relative; }
  #notebookModal .nb-sidebar {
    width:100%; border-right:0; padding:20px 0;
  }
  #notebookModal .nb-side-h { padding:0 22px 12px; }
  #notebookModal .nb-item { padding:12px 22px; font-size:13px; border-left:0; border-bottom:1px solid rgba(0,0,0,0.05); color:#555; font-weight:400; }
  #notebookModal .nb-item.active { border-left:0; color:#555; font-weight:400; }
  #notebookModal .nb-page { padding:20px 20px 40px; font-size:14px; line-height:1.6; }
  #notebookModal .nb-title-box { font-size:18px; }
  #notebookModal .nb-content .nb-dek { font-size:13px; margin-bottom:16px; }
  #notebookModal .nb-frame[data-view="list"] .nb-page { display:none; }
  #notebookModal .nb-frame[data-view="note"] .nb-sidebar { display:none; }
  #notebookModal .nb-frame[data-view="note"] .nb-back { display:inline-block; }
}
.node.icon-node.selected .icon-tile { transform: scale(1.06); }
.note-thumb {
  width:116px; height:116px; padding:6px; box-sizing:border-box; border-radius:16px; overflow:hidden;
  background:linear-gradient(160deg,#fffdf6 0%,#fbf5df 55%,#f5ead0 100%);
  border:1px solid rgba(200,180,120,0.35);
  box-shadow:0 8px 18px rgba(200,180,120,0.22), inset 0 1.5px 0 rgba(255,255,255,0.95), inset 0 -6px 14px rgba(220,195,140,0.12);
  position:relative; font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif;
}
.note-thumb::before { content:''; position:absolute; left:6px; right:6px; top:6px; height:8px; background:linear-gradient(180deg,#f8de7e,#efc85a); border-radius:3px; box-shadow:0 1px 2px rgba(160,120,20,0.15); }
.note-thumb::after { content:''; position:absolute; left:12px; right:10px; top:22px; height:34px; background:repeating-linear-gradient(180deg, rgba(120,95,30,0.22) 0 1px, transparent 1px 9px); opacity:0.7; }
.note-thumb span { display:none; }
/* stickies uses an emoji glyph on the glass tile — force visible */
#n-stickies .note-thumb > span.tile-emoji { display:flex !important; }
.lovable-mark { width:100%; height:100%; border-radius:12px; overflow:hidden; display:grid; place-items:center; background:transparent; }
.lovable-mark img { width:100%; height:100%; object-fit:cover; display:block; border-radius:12px; }
/* ============ Collection modal (Bookshelf + Watchlist) ============ */
#collectionModal { position:fixed; inset:0; z-index:6000; display:none; align-items:center; justify-content:center; background:rgba(10,14,22,0.6); backdrop-filter:blur(8px); }
#collectionModal.open { display:flex; }
#collectionModal .cm-card {
  width:min(900px, 94vw); max-height:90vh; background:#f2f2f2; border-radius:16px; overflow:hidden;
  box-shadow:0 40px 100px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.15);
  display:flex; flex-direction:column; font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Helvetica Neue',sans-serif;
}
#collectionModal .cm-head {
  height:38px; background:linear-gradient(#ececef,#dcdce0); border-bottom:1px solid rgba(0,0,0,0.12);
  display:flex; align-items:center; padding:0 14px; gap:8px; position:relative;
}
#collectionModal .cm-head .dot.close {
  position:relative; z-index:2;
  width:20px; height:20px; border-radius:50%;
  background:#ff5f57; border:1px solid rgba(0,0,0,0.18);
  cursor:pointer; padding:0; display:inline-flex; align-items:center; justify-content:center;
  color:transparent; transition: color .12s ease;
}
#collectionModal .cm-head .dot.close:hover { color:rgba(0,0,0,0.55); }
#collectionModal .cm-head .dot.close svg { display:block; pointer-events:none; }
#collectionModal .cm-head .cm-title { position:absolute; left:0; right:0; text-align:center; font-size:13px; color:#333; font-weight:600; letter-spacing:0.01em; pointer-events:none; }
#collectionModal .cm-body { overflow-y:auto; padding:22px 26px 28px; }

/* ============ my shelf — floating covers, no cards ============ */
#collectionModal .cm-body:has(.myshelf) { padding:0; }
.myshelf { background:#f5f4f2; padding:20px 26px 22px; min-height:100%; }
.myshelf .ms-head { text-align:center; margin:0 0 16px; }
.myshelf .ms-name {
  font:400 16px/1.35 -apple-system,BlinkMacSystemFont,'SF Pro Display',sans-serif;
  letter-spacing:-0.02em; color:#2c2c2c; max-width:520px; margin:0 auto;
}
.myshelf .ms-handle { display:none; }
.myshelf .ms-sec { margin:0 0 16px; }
.myshelf .ms-sec-label {
  font:500 10px/1 -apple-system,BlinkMacSystemFont,sans-serif; letter-spacing:0.18em;
  text-transform:lowercase; color:#a6a29c; margin:0 0 10px; text-align:left;
  padding-bottom:6px; border-bottom:1px solid rgba(0,0,0,0.08);
}
.myshelf .ms-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px 18px; align-items:end; }
.myshelf .ms-card { background:none; border:0; padding:0; display:flex; flex-direction:column; align-items:center; gap:6px; }
.myshelf .ms-art { display:flex; align-items:flex-end; justify-content:center; width:100%; }
.myshelf .ms-art img {
  display:block; max-width:100%; max-height:112px; width:auto; border-radius:2px;
  box-shadow:0 12px 22px rgba(30,26,20,0.18), 0 2px 5px rgba(30,26,20,0.12);
  transform:rotate(-1.4deg); transition:transform .22s ease, box-shadow .22s ease;
}
.myshelf .ms-card:nth-child(even) .ms-art img { transform:rotate(1.6deg); }
.myshelf .ms-card:hover .ms-art img { transform:translateY(-5px) rotate(0deg); box-shadow:0 20px 32px rgba(30,26,20,0.22); }
.myshelf .ms-meta { display:flex; flex-direction:column; align-items:center; gap:2px; opacity:0; transition:opacity .2s ease; }
.myshelf .ms-card:hover .ms-meta { opacity:1; }
.myshelf .ms-kind { display:none; }
.myshelf .ms-title { font:500 11px/1.3 -apple-system,BlinkMacSystemFont,sans-serif; color:#4b4741; text-align:center; }
.myshelf .ms-sub { font:400 10px/1.3 -apple-system,BlinkMacSystemFont,sans-serif; color:#a29e98; text-align:center; }
@media (max-width: 900px) { .myshelf { padding:16px 16px 20px; } .myshelf .ms-grid { grid-template-columns:repeat(4,1fr); gap:12px 12px; } .myshelf .ms-name { font-size:14px; } .myshelf .ms-art img { max-height:88px; } .myshelf .ms-meta { opacity:1; } }
.myshelf .ms-suggest { margin-top:0; padding-top:0; border-top:0; }
.myshelf .ms-suggest label { display:block; font:600 10.5px/1 -apple-system,BlinkMacSystemFont,sans-serif; letter-spacing:0.12em; text-transform:lowercase; color:#5a6773; margin-bottom:6px; }
.myshelf .ms-suggest-row { display:flex; gap:6px; max-width:340px; }
.myshelf .ms-suggest input {
  flex:1; min-width:0; padding:7px 10px; border-radius:7px; border:1px solid rgba(0,0,0,0.12);
  background:#fff; font:11.5px -apple-system,BlinkMacSystemFont,sans-serif; color:#33302b; outline:none;
}
.myshelf .ms-suggest input:focus { border-color:rgba(0,0,0,0.28); }
.myshelf .ms-suggest button {
  padding:7px 14px; border-radius:7px; border:1px solid rgba(0,0,0,0.16);
  background:#33302b; color:#fff; font:600 11px -apple-system,BlinkMacSystemFont,sans-serif; cursor:pointer;
}
.myshelf .ms-suggest button:hover { opacity:0.85; }
.myshelf .ms-suggest-note { font:400 10px/1.4 -apple-system,BlinkMacSystemFont,sans-serif; color:#a29e98; margin-top:6px; }
.myshelf .ms-tabs { display:flex; gap:14px; border-bottom:1px solid rgba(0,0,0,0.08); padding-bottom:6px; }
.myshelf .ms-tab {
  padding:0; border:0; background:none; cursor:pointer; color:#a6a29c;
  font:500 10px/1 -apple-system,BlinkMacSystemFont,sans-serif; letter-spacing:0.14em; text-transform:lowercase;
}
.myshelf .ms-tab.is-active { color:#3d4650; font-weight:600; }
.myshelf .ms-tab .count { color:#bdb9b3; font-weight:400; margin-left:3px; letter-spacing:0.04em; }
.myshelf .ms-panel[hidden] { display:none; }
.myshelf .ms-empty { border:0 !important; background:none !important; padding:0 !important; color:#bdb9b3; }
.myshelf .ms-suggest-list { list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:5px; max-height:130px; overflow-y:auto; }
.myshelf .ms-suggest-list li {

  display:flex; gap:8px; align-items:baseline; font:400 11px/1.4 -apple-system,BlinkMacSystemFont,sans-serif; color:#4b4741;
  padding:6px 9px; border-radius:6px; background:rgba(0,0,0,0.035);
}
.myshelf .ms-suggest-list .who { font-size:10px; color:#a29e98; margin-left:auto; white-space:nowrap; }
.myshelf .ms-articles { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(4,1fr); gap:12px 14px; }
.myshelf .ms-articles a { display:block; text-decoration:none; }
.myshelf .ms-articles a:hover .ms-art-title { text-decoration:underline; }
.myshelf .ms-art-thumb {
  display:block; width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:3px;
  box-shadow:0 8px 16px rgba(30,26,20,0.16), 0 1px 3px rgba(30,26,20,0.1);
  transition:transform .2s ease;
}
.myshelf .ms-articles a:hover .ms-art-thumb { transform:translateY(-3px); }
.myshelf .ms-art-title { display:block; margin-top:6px; font:500 10.5px/1.35 -apple-system,BlinkMacSystemFont,sans-serif; color:#2c3238; }
.myshelf .ms-art-src { display:block; margin-top:2px; font:600 8.5px/1 -apple-system,BlinkMacSystemFont,sans-serif; letter-spacing:0.14em; text-transform:uppercase; color:#a29e98; }
.myshelf .ms-foot { display:grid; grid-template-columns:1.5fr 1fr; gap:20px; align-items:start; padding-top:12px; border-top:1px solid rgba(0,0,0,0.08); }
.myshelf .ms-foot .ms-suggest { margin-top:0; }
.myshelf .ms-suggest-blurb { font:400 10px/1.5 -apple-system,BlinkMacSystemFont,sans-serif; color:#7d8792; margin-top:6px; max-width:52ch; }
.myshelf .ms-lists { display:flex; flex-direction:column; }
.myshelf .ms-archive-list { list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:5px; max-height:130px; overflow-y:auto; }
.myshelf .ms-archive-list[hidden] { display:none; }
.myshelf .ms-archive-list li {
  display:flex; align-items:baseline; gap:8px; padding:6px 9px; border-radius:6px;
  background:rgba(0,0,0,0.035); font:400 11px/1.35 -apple-system,BlinkMacSystemFont,sans-serif; color:#3b4249;
}
.myshelf .ms-archive-list .who { font-size:10px; color:#a29e98; margin-left:auto; white-space:nowrap; }
.myshelf .ms-archive-note { font:400 10px/1.4 -apple-system,BlinkMacSystemFont,sans-serif; color:#a29e98; margin-top:6px; }
@media (max-width: 760px) { .myshelf .ms-foot { grid-template-columns:1fr; gap:10px; } .myshelf .ms-articles { grid-template-columns:repeat(2,1fr); gap:10px; } }
@media (max-width: 560px) { .myshelf .ms-grid { grid-template-columns:repeat(2,1fr); gap:12px 12px; } .myshelf .ms-art img { max-height:96px; } }

/* ============ my shelf v2 — horizontal cover rail (beige) ============ */
#collectionModal .cm-body:has(.msh) { padding:0; }
.msh {
  background:#f5f4f2; color:#3d3a35; padding:6px 0 20px; min-height:100%;
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Helvetica Neue',sans-serif;
}
.msh .msh-filters { display:none; }
.msh .msh-rail {
  display:flex; align-items:center; gap:14px; overflow-x:auto; overflow-y:hidden;
  padding:26px 26px 18px; scroll-snap-type:x proximity; scrollbar-width:thin;
}
.msh .msh-rail::-webkit-scrollbar { height:6px; }
.msh .msh-rail::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.14); border-radius:3px; }
.msh .msh-item {
  flex:0 0 auto; background:none; border:0; padding:0; cursor:pointer; scroll-snap-align:center;
  width:110px; height:154px; transition:transform .22s ease, filter .22s ease, box-shadow .22s ease;
  filter:saturate(0.92);
}
.msh .msh-item img { display:block; width:100%; height:100%; object-fit:cover; border-radius:6px;
  box-shadow:0 10px 20px rgba(40,34,26,0.16), 0 0 0 1px rgba(0,0,0,0.05); }
.msh .msh-item .msh-noimg { display:flex; align-items:center; justify-content:center; width:100%; height:100%; border-radius:6px; background:rgba(40,34,26,0.07); box-shadow:0 10px 20px rgba(40,34,26,0.16), 0 0 0 1px rgba(0,0,0,0.05); font:600 34px/1 -apple-system,BlinkMacSystemFont,sans-serif; color:rgba(40,34,26,0.4); }
.msh .msh-item:hover { transform:translateY(-5px); filter:none; }
.msh .msh-item.is-active { filter:none; transform:translateY(-7px); }
.msh .msh-item.is-active img { box-shadow:0 20px 34px rgba(40,34,26,0.24), 0 0 0 1px rgba(0,0,0,0.06); }
.msh .msh-detail { text-align:center; padding:0 26px; min-height:62px; }
.msh .msh-d-kind { font:600 8.5px/1 -apple-system,BlinkMacSystemFont,sans-serif; letter-spacing:0.2em; text-transform:uppercase; color:#a29e98; }
.msh .msh-d-title { font:600 13px/1.3 -apple-system,BlinkMacSystemFont,sans-serif; color:#332f2a; margin:6px 0 2px; }
.msh .msh-d-sub { font:400 10.5px/1.4 -apple-system,BlinkMacSystemFont,sans-serif; color:#a29e98; }
.msh .msh-d-link { display:inline-block; margin-top:7px; font:600 9px/1 -apple-system,BlinkMacSystemFont,sans-serif; letter-spacing:0.14em; text-transform:uppercase; color:#4b4741; text-decoration:none; border-bottom:1px solid rgba(0,0,0,0.28); padding-bottom:2px; }
.msh .msh-d-desc { max-width:48ch; margin:6px auto 0; color:#77716a; font:400 11px/1.5 -apple-system,BlinkMacSystemFont,sans-serif; }
.msh .msh-d-link:hover { border-bottom-color:#4b4741; }
.msh .msh-foot { margin:16px 26px 0; padding-top:14px; border-top:1px solid rgba(0,0,0,0.08);
  display:grid; grid-template-columns:1.4fr 1fr; gap:22px; align-items:start; }
.msh .ms-suggest label { display:block; font:600 10px/1 -apple-system,BlinkMacSystemFont,sans-serif; letter-spacing:0.12em; color:#5a6773; margin-bottom:7px; }
.msh .ms-tabs { display:flex; gap:14px; padding-bottom:6px; border-bottom:1px solid rgba(0,0,0,0.08); }
.msh .ms-tab {
  appearance:none; background:none; border:0; padding:0; cursor:pointer;
  font:400 10px/1 -apple-system,BlinkMacSystemFont,sans-serif; letter-spacing:0.08em; color:#8d8880;
}
.msh .ms-tab.is-active { color:#3d4650; font-weight:600; }
.msh .ms-tab .count { color:#bdb9b3; font-weight:400; margin-left:3px; }
.msh .ms-panel[hidden] { display:none; }
.msh .ms-suggest-list, .msh .ms-archive-list { list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:4px; max-height:120px; overflow-y:auto; }
.msh .ms-suggest input {
  flex:1; min-width:0; background:#fff; border:1px solid rgba(0,0,0,0.14);
  border-radius:3px; padding:6px 8px; color:#332f2a; font:400 11px/1.3 -apple-system,BlinkMacSystemFont,sans-serif; outline:none;
}
.msh .ms-suggest input::placeholder { color:#b8b3ac; }
.msh .ms-suggest button { background:#332f2a; color:#f5f4f2; border:0; border-radius:3px; padding:6px 12px; cursor:pointer;
  font:600 9px/1 -apple-system,BlinkMacSystemFont,sans-serif; letter-spacing:0.14em; text-transform:uppercase; }
.msh .ms-suggest-row { display:flex; gap:6px; max-width:320px; }
.msh .ms-suggest-note, .msh .ms-suggest-blurb, .msh .ms-archive-note { color:#a29e98; font:400 10px/1.45 -apple-system,BlinkMacSystemFont,sans-serif; }
.msh .ms-suggest-list li, .msh .ms-archive-list li {
  display:flex; gap:8px; align-items:baseline; border:0; background:none; padding:3px 0;
  font:400 10.5px/1.4 -apple-system,BlinkMacSystemFont,sans-serif; color:#4b4741;
}
.msh .ms-suggest-list .who, .msh .ms-archive-list .who { color:#a29e98; margin-left:auto; }
.msh .ms-empty { color:#bdb9b3; }
@media (max-width: 760px) {
  .msh .msh-rail { padding:18px 14px 14px; gap:10px; }
  .msh .msh-item { width:92px; height:128px; }
  .msh .msh-item.is-active { transform:translateY(-6px); }
  .msh .msh-detail, .msh .msh-foot { padding-left:16px; padding-right:16px; }
  .msh .msh-foot { margin-left:0; margin-right:0; grid-template-columns:1fr; gap:14px; }
}


/* ============ Unified window title bar across every modal ============ */
#caseHubModal .ch-head,
#caseModal .cs-header,
#caseModal2 .cs-header,
#caseModal3 .cs-header,
#caseModal4 .cs-header,
#collectionModal .cm-head,
#trashModal .trash-head,
#notebookModal .nb-titlebar,
#stickiesModal #stickiesHeader,
#aboutModal > div > div:first-child,
#servicesModal > div > div:first-child,
#pk01Modal #pk01Card > div:first-child,
#chessModal .chm-bar,
#previewModal > div > div:first-child {
  min-height:44px !important; height:44px !important;
  background:#eef1f7 !important;
  border-bottom:1px solid rgba(0,0,0,0.06) !important;
  display:flex !important; align-items:center !important;
  padding:0 16px !important; gap:8px !important;
  position:relative; flex-shrink:0;
}
#chessModal #chessClose,
#caseHubModal .ch-close,
#caseModal #csClose,
#caseModal2 #cs2Close,
#collectionModal .cm-head .dot.close,
#trashModal .trash-close,
#notebookModal #notebookClose,
#stickiesModal #stickiesClose,
#aboutModal #aboutClose,
#servicesModal #servicesClose,
#pk01Modal #pk01Close,
#previewModal #pvClose,
#composeModal #cmpBarClose,
.win-dot {
  width:14px !important; height:14px !important; border-radius:50% !important;
  border:1px solid rgba(0,0,0,0.10) !important; padding:0 !important;
  flex:0 0 auto; display:inline-block !important;
}
.win-dot { background:#c9ccd4 !important; }
#composeModal #cmpBarClose { background:#ff5f57 !important; cursor:pointer; }
#caseHubModal .ch-close svg, #caseModal #csClose svg, #caseModal2 #cs2Close svg,
#collectionModal .cm-head .dot.close svg { display:none !important; }
#caseHubModal .ch-title,
#collectionModal .cm-head .cm-title,
#trashModal .trash-title { font-size:12px !important; color:#5a6472 !important; font-weight:600 !important; }

/* One centered window title for every app window */
.win-title {
  position:absolute; left:0; right:0; text-align:center;
  font:600 13px/1 -apple-system,BlinkMacSystemFont,'SF Pro Text','Helvetica Neue',sans-serif !important;
  letter-spacing:0.01em; color:#333 !important; text-transform:none !important; pointer-events:none;
}
.win-oldtitle { display:none !important; }
/* On narrow screens the stickies header buttons collide with the centered title */
@media (max-width:720px) {
  #stickiesModal #stickiesHeader .win-title { display:none !important; }
  #stickiesModal #stickiesHeader { gap:8px; padding:8px 10px; }
  #stickiesModal #stickiesHeader .st-tab,
  #stickiesModal #stickiesHeader #stClear { padding:5px 9px; font-size:9px !important; letter-spacing:0.1em; }
}

/* Bookshelf: minimal editorial (libra.re-inspired) — 3D books floating on hairline shelf */
.bookshelf {
  display:flex; flex-direction:column; gap:8px;
  background:#ffffff; padding:8px 4px 4px; border-radius:8px;
  font-family:'Space Grotesk','SF Pro Text',-apple-system,BlinkMacSystemFont,sans-serif;
}
.bookshelf .shelf-label {
  font-size:11px; letter-spacing:0.22em; text-transform:uppercase;
  color:#a19c93; font-weight:600; padding:14px 6px 10px;
  border-bottom:1px solid rgba(0,0,0,0.06); margin-bottom:14px;
}
.bookshelf .shelf-row {
  display:flex; align-items:flex-end; justify-content:flex-start; gap:18px;
  padding:18px 16px 10px; flex-wrap:nowrap;
}
.bookshelf .shelf-plank {
  height:1px; margin:0 6px 24px;
  background:rgba(0,0,0,0.08);
}
.bookshelf .book {
  position:relative; flex:1 1 0; min-width:0; cursor:pointer;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,0.18));
  transition:transform 0.2s ease;
}
.bookshelf .book .cover {
  position:relative; display:block; width:100%;
}
.bookshelf .book .cover img {
  display:block; width:100%; height:auto; border-radius:2px;
  background:#eee;
}
.bookshelf .book .cover::after {
  content:none;
}
.bookshelf .book:hover { transform:translateY(-4px); }
.bookshelf .book .caption {
  position:absolute; left:50%; bottom:calc(100% + 10px); transform:translateX(-50%);
  background:#1a1a1a; color:#fff; font-size:10px; letter-spacing:0.14em; text-transform:uppercase;
  padding:6px 10px; border-radius:4px; white-space:nowrap; opacity:0; pointer-events:none;
  transition:opacity 0.15s; max-width:240px; overflow:hidden; text-overflow:ellipsis; font-weight:600;
}
.bookshelf .book:hover .caption { opacity:1; }

/* Mobile/tablet: enlarge collection modal and wrap books onto two rows so covers are legible */
@media (max-width: 900px) {
  #collectionModal .cm-card { width:min(720px, 97vw); max-height:94vh; }
  #collectionModal .cm-body { padding:18px 14px 22px; }
  .bookshelf .shelf-row { flex-wrap:wrap; gap:14px 12px; padding:14px 4px 8px; justify-content:center; }
  .bookshelf .book { flex:0 0 calc(25% - 12px); max-width:calc(25% - 12px); }
}
@media (max-width: 560px) {
  .bookshelf .book { flex:0 0 calc(33.333% - 10px); max-width:calc(33.333% - 10px); }
}

/* Watchlist: dark cinema — full-bleed dark surface with floating posters */
.watchlist-cinema {
  margin:-22px -26px -28px; padding:36px 36px 44px;
  background:radial-gradient(ellipse at 30% -10%, #1c1c22 0%, #0d0d10 60%, #050506 100%);
  color:#e8e6e0; min-height:60vh;
  font-family:'Space Grotesk','SF Pro Text',-apple-system,BlinkMacSystemFont,sans-serif;
}
.watchlist-cinema .wl-head {
  display:flex; align-items:baseline; justify-content:space-between; gap:16px;
  padding-bottom:22px; margin-bottom:28px; border-bottom:1px solid rgba(255,255,255,0.08);
}
.watchlist-cinema .wl-title { font-size:12px; letter-spacing:0.32em; text-transform:uppercase; color:#c8c4b8; font-weight:600; }
.watchlist-cinema .wl-count { font-size:10px; letter-spacing:0.24em; text-transform:uppercase; color:rgba(255,255,255,0.35); }
.posters { display:grid; grid-template-columns:repeat(auto-fill, minmax(130px, 1fr)); gap:24px 18px; }
.poster-card {
  background:transparent; border-radius:2px; overflow:visible; box-shadow:none;
  transition:transform 0.25s ease; cursor:pointer;
}
.poster-card:hover { transform:translateY(-6px); }
.poster-card .poster-img {
  width:100%; aspect-ratio:2/3; background:#111; overflow:hidden; border-radius:2px;
  box-shadow:0 20px 40px rgba(0,0,0,0.55), 0 4px 10px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.04);
  transition:box-shadow 0.25s ease;
}
.poster-card:hover .poster-img { box-shadow:0 30px 60px rgba(0,0,0,0.7), 0 6px 14px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.08); }
.poster-card .poster-img img { width:100%; height:100%; object-fit:cover; display:block; }
.poster-card .poster-meta { padding:10px 2px 2px; }
.poster-card .poster-title { font-size:11px; font-weight:600; color:#f2efe6; letter-spacing:0.01em; line-height:1.3; }
.poster-card .poster-sub { font-size:9px; color:rgba(255,255,255,0.4); margin-top:3px; letter-spacing:0.16em; text-transform:uppercase; }

/* iOS Photos "Library" view */
.ios-photos { position:relative; }
.ios-photos-head { padding:2px 2px 14px; }
.ios-photos-title { font-size:32px; font-weight:800; letter-spacing:-0.01em; color:#111; font-family:-apple-system,BlinkMacSystemFont,'SF Pro Display',sans-serif; }
.ios-photos-sub { font-size:12px; color:rgba(0,0,0,0.5); margin-top:2px; letter-spacing:0.02em; }
body[data-theme="black"] .ios-photos-title { color:#f2f4f8; }
body[data-theme="black"] .ios-photos-sub { color:rgba(255,255,255,0.55); }
.ios-photos-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(84px, 1fr)); gap:3px; border-radius:6px; overflow:hidden; }
.ios-photo { position:relative; aspect-ratio:1/1; background:#0a0a0a; overflow:hidden; }
.ios-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.ios-photos-tabs {
  display:flex; align-items:center; justify-content:space-around;
  margin:18px auto 2px; padding:10px 14px; max-width:340px;
  background:rgba(240,240,245,0.85); backdrop-filter:blur(20px);
  border-radius:999px; color:rgba(0,0,0,0.55);
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif; font-size:11px; letter-spacing:0.02em;
  box-shadow:0 8px 24px rgba(0,0,0,0.08);
}
body[data-theme="black"] .ios-photos-tabs { background:rgba(30,32,38,0.75); color:rgba(255,255,255,0.6); }
.ios-photos-tabs .ios-tab { display:flex; flex-direction:column; align-items:center; gap:2px; padding:2px 8px; }
.ios-photos-tabs .ios-tab svg { width:20px; height:20px; }
.ios-photos-tabs .ios-tab.active { color:#1877e6; font-weight:600; }
@media (max-width:560px) {
  .ios-photos-title { font-size:26px; }
  .ios-photos-grid { grid-template-columns:repeat(4, 1fr); gap:2px; }
}

/* Photo carousel/lightbox — iOS-style full screen viewer */
.ios-lightbox {
  position:fixed; inset:0; z-index:7000; background:#000;
  display:none; flex-direction:column;
  animation:iosLbIn 0.18s ease-out;
}
.ios-lightbox.open { display:flex; }
@keyframes iosLbIn { from { opacity:0; transform:scale(0.98); } to { opacity:1; transform:scale(1); } }
.ios-lb-top {
  position:absolute; top:0; left:0; right:0; z-index:2;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px; color:#fff;
  background:linear-gradient(180deg, rgba(0,0,0,0.55), transparent);
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif; font-size:14px;
}
.ios-lb-top .ios-lb-close { background:transparent; border:0; color:#fff; font-size:16px; cursor:pointer; padding:6px 10px; }
.ios-lb-count { font-variant-numeric:tabular-nums; letter-spacing:0.02em; }
.ios-lb-stage {
  flex:1; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory;
  display:flex; scrollbar-width:none;
}
.ios-lb-stage::-webkit-scrollbar { display:none; }
.ios-lb-slide {
  flex:0 0 100%; scroll-snap-align:center;
  display:flex; align-items:center; justify-content:center; padding:44px 8px;
}
.ios-lb-slide img { max-width:100%; max-height:100%; object-fit:contain; user-select:none; -webkit-user-drag:none; }
.ios-lb-strip {
  display:flex; gap:4px; overflow-x:auto; padding:10px 12px 14px;
  background:rgba(0,0,0,0.85); scrollbar-width:none;
}
.ios-lb-strip::-webkit-scrollbar { display:none; }
.ios-lb-thumb {
  flex:0 0 44px; height:44px; border-radius:4px; overflow:hidden;
  opacity:0.5; transition:opacity 0.15s, transform 0.15s; cursor:pointer;
  border:2px solid transparent;
}
.ios-lb-thumb.active { opacity:1; border-color:#fff; transform:scale(1.05); }
.ios-lb-thumb img { width:100%; height:100%; object-fit:cover; }
.ios-photo { cursor:pointer; }
.ios-photo:active { opacity:0.85; }

.photo-node .thumb {
  position:relative; width:var(--pw,140px); height:var(--ph,140px); border:none; background:transparent; padding:0;
  border-radius:3px; overflow:hidden;
  box-shadow:0 10px 22px rgba(20,30,50,0.32), 0 3px 6px rgba(20,30,50,0.18), 0 1px 0 rgba(255,255,255,0.15) inset;
}
/* smaller, icon-scale photos so they don't compete with app icons */
.photo-node .thumb { width:calc(var(--pw,140px) * 0.78); height:calc(var(--ph,140px) * 0.78); }
/* flat — no hover lift on desktop photos */
.photo-node .thumb img { display:block; width:100%; height:100%; object-fit:cover; -webkit-user-drag:none; user-drag:none; user-select:none; pointer-events:none; }
.node, .node * { -webkit-user-drag:none; }
/* Finder-style selection: soft gray rounded backdrop + blue label pill */
.node .selection-ring { position:absolute; inset:-8px -10px -6px -10px; border-radius:10px; background:rgba(120,130,145,0.32); backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); opacity:0; pointer-events:none; transition:opacity 0.08s; z-index:-1; }
.node.selected .selection-ring { opacity:1; }
body[data-theme="black"] .node .selection-ring { background:rgba(180,190,205,0.28); }
.photo-node .thumb::after { display:none; }
.node.selected .node-label { background:#1877e6; color:#fff; border-radius:6px; padding:2px 9px; text-shadow:none; }
.node.selected .node-sub { color:rgba(255,255,255,0.9); background:#1877e6; border-radius:6px; padding:1px 7px; }
.node.trashed { display:none !important; }
@media (max-width:560px) {
  #previewModal { padding:6px; }
  #previewModal.resume-preview > div { width:min(94vw, 360px) !important; max-height:92dvh !important; border-radius:10px !important; }
  #previewModal.resume-preview #pvScroll { overflow:hidden !important; }
  #previewModal.resume-preview #pvScroll > div:first-child { padding:8px !important; }
  #previewModal.resume-preview #pvImg { width:auto !important; max-width:100% !important; max-height:66dvh !important; object-fit:contain !important; }
  #previewModal.resume-preview #pvScroll > div:nth-child(3) { display:none !important; }
  #previewModal.resume-preview #pvTitle { font-size:18px !important; }
  #previewModal.resume-preview #pvSub { font-size:11px !important; }
  #previewModal.resume-preview #pvScroll > div:nth-child(2) { padding:8px 16px 12px !important; }
}

/* ============ Case study modal refinements ============ */
.cs-card, #caseModal2 .cs-card, #caseModal3 .cs-card { position:relative; width:min(980px,94vw); max-height:92vh; border-radius:16px; overflow:hidden; box-shadow:0 40px 100px rgba(0,0,0,0.55),0 0 0 1px rgba(0,0,0,0.15); display:flex; flex-direction:column; font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif; }
#caseModal4 .cs-card { position:relative; width:min(980px,94vw); max-height:92vh; border-radius:16px; overflow:hidden; box-shadow:0 40px 100px rgba(0,0,0,0.55),0 0 0 1px rgba(0,0,0,0.15); display:flex; flex-direction:column; font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif; }
/* All case studies — unified neutral #fafafa / detail boxes #f0f0f0 */
.cs-card, #caseModal2 .cs-card, #caseModal3 .cs-card, #caseModal4 .cs-card { background:#fafafa; }
.cs-tag, #caseModal2 .cs-tag, #caseModal3 .cs-tag, #caseModal4 .cs-tag { background:#f0f0f0; color:#3a3a3a; }
.cs-metric, #caseModal2 .cs-metric, #caseModal3 .cs-metric, #caseModal4 .cs-metric { background:#f0f0f0; }
.cs-artifact, #caseModal2 .cs-artifact, #caseModal3 .cs-artifact, #caseModal4 .cs-artifact { background:#f0f0f0; }
.cs-artifact.contain img, .cs-artifact.contain video,
#caseModal2 .cs-artifact.contain img, #caseModal2 .cs-artifact.contain video,
#caseModal3 .cs-artifact.contain img, #caseModal3 .cs-artifact.contain video,
#caseModal4 .cs-artifact.contain img, #caseModal4 .cs-artifact.contain video { background:#f0f0f0; }
.cs-scroll { overflow-y:auto; padding:0; }
.cs-banner { position:relative; background:#f0f0f0; box-shadow:inset 0 -1px 0 rgba(0,0,0,0.06); }
.cs-banner img.cs-banner-img { width:100%; height:clamp(320px,52vh,520px); object-fit:cover; display:block; }
.cs-banner video.cs-banner-video { width:100%; height:clamp(320px,52vh,520px); object-fit:cover; display:block; background:#f0f0f0; }
/* Footer demo — video shares row with a bigger findings sidecar (findings dominant) */
.cs-footer-row { margin:18px 26px 26px; display:grid; grid-template-columns:1fr 1.2fr; gap:14px; align-items:stretch; }
.cs-footer-video { border-radius:12px; overflow:hidden; background:#f0f0f0; box-shadow:0 8px 20px rgba(0,0,0,0.08); display:flex; flex-direction:column; }
.cs-footer-video video { width:100%; display:block; max-height:260px; object-fit:contain; background:#f0f0f0; flex:1; }
.cs-footer-video .cs-section-title { padding:10px 14px; background:#f0f0f0; color:#303033; }
.cs-findings { background:#f0f0f0; border-radius:12px; padding:16px 18px; display:flex; flex-direction:column; gap:10px; }
.cs-findings .cs-section-title { padding:0 0 4px; color:#8a8380; }
.cs-finding { display:flex; gap:8px; align-items:flex-start; font-size:12.5px; line-height:1.45; color:#2a2a2e; }
.cs-finding .num { flex:0 0 auto; font-weight:700; font-size:16px; color:#111; min-width:44px; text-align:left; letter-spacing:-0.01em; }
.cs-finding .lbl { font-weight:600; }
.cs-finding .txt { color:#555; font-size:11.5px; margin-top:1px; display:block; }
@media (max-width:1024px) { .cs-footer-row { grid-template-columns:1fr; } }
.cs-hero-copy { position:absolute; left:0; right:0; bottom:0; padding:22px 30px; color:#fff; background:linear-gradient(180deg,transparent,rgba(0,0,0,0.55)); }
.cs-kicker, .cs-section-title { font-size:11px; letter-spacing:0.18em; text-transform:uppercase; opacity:0.75; }
.cs-title { font-size:30px; font-weight:700; letter-spacing:0; margin-top:2px; }
.cs-subtitle { font-size:13px; opacity:0.85; margin-top:2px; }
.cs-tags { padding:18px 26px 6px; display:flex; flex-wrap:wrap; gap:6px; }
.cs-tag { font-size:11px; letter-spacing:0.08em; padding:5px 10px; border-radius:999px; background:#f0f0f0; color:#3a3a3a; }
.cs-copy { padding:12px 30px 4px; font-size:15.5px; line-height:1.65; color:#2a2a2e; max-width:840px; }
.cs-copy p + p { margin-top:10px; }
.cs-metrics { padding:16px 26px 6px; display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.cs-metric { text-align:center; padding:12px 8px; background:#f0f0f0; border-radius:12px; }
.cs-metric strong { display:block; font-size:20px; color:#111; }
.cs-metric span { display:block; font-size:11.5px; color:#555; margin-top:3px; letter-spacing:0.04em; }
.cs-artifacts { padding:18px 30px 28px; display:grid; grid-template-columns:1.9fr 1fr; gap:16px; align-items:stretch; }
.cs-artifacts.triple { grid-template-columns:1.9fr 1fr; }
/* Case 01 LAIC — balanced pairing, both align to bottom */
#caseModal .cs-artifacts.paired { grid-template-columns:1.15fr 1fr; align-items:stretch; }
#caseModal .cs-artifacts.paired .cs-artifact { min-height:460px; }
#caseModal .cs-artifacts.paired .cs-artifact img,
#caseModal .cs-artifacts.paired .cs-artifact video { max-height:none; height:100%; }
.cs-artifact { background:#f0f0f0; border-radius:14px; padding:0; border:1px solid rgba(0,0,0,0.08); box-shadow:0 6px 16px rgba(0,0,0,0.06); display:flex; flex-direction:column; overflow:hidden; position:relative; }
.cs-section-title { color:#8a8380; margin:0; padding:10px 14px 6px; font-size:10.5px; }
.cs-artifact img, .cs-artifact video { width:100%; flex:1; min-height:0; height:100%; object-fit:contain; display:block; background:transparent; }
.cs-artifact.contain img, .cs-artifact.contain video { object-fit:contain; background:#f0f0f0; padding:10px; }
.cs-artifact.tall { grid-row:span 2; min-height:560px; }
.cs-artifact.tall img, .cs-artifact.tall video { object-fit:contain; padding:14px; }
.cs-artifacts .cs-artifact:not(.tall) { min-height:270px; }
.cs-artifacts .cs-artifact:not(.tall) video { max-height:280px; padding:10px; background:#f0f0f0; }
.cs-placeholder { min-height:240px; padding:24px; display:grid; place-items:center; text-align:center; color:#49453f; font-size:13px; line-height:1.5; background:repeating-linear-gradient(135deg,rgba(255,255,255,0.42) 0 10px,rgba(255,255,255,0.18) 10px 20px); }
.note-doc { color:#2b2722; }
.note-doc h2 { font-size:22px; margin:0 0 10px; letter-spacing:0; }
.note-doc p { margin:0 0 10px; font-size:14px; line-height:1.55; }
.note-doc ul { margin:8px 0 0 18px; font-size:13px; line-height:1.6; }
@media (max-width:1024px) {
  .cs-card { width:94vw; max-height:88vh; }
  .cs-artifacts, .cs-metrics { grid-template-columns:1fr; }
  .cs-title { font-size:24px; }
}

@keyframes drift { 0%,100% { transform:translateY(0px); } 50% { transform:translateY(-4px); } }

/* ============ Long-form case study (editorial) ============ */
.lc { padding:0 0 40px; color:#1c1c1f; background:
   radial-gradient(900px 520px at 8% 2%, rgba(120,150,255,0.10), transparent 60%),
   radial-gradient(760px 520px at 96% 22%, rgba(255,170,190,0.12), transparent 62%),
   radial-gradient(900px 620px at 40% 78%, rgba(150,225,210,0.10), transparent 64%),
   linear-gradient(180deg,#fcfcfd,#f6f7fa 55%,#fbfaf8); }
.lc-sec { padding:34px 34px 0; max-width:900px; }
.lc-sec.wide { max-width:none; }
.lc-num { font-size:10px; letter-spacing:0.26em; text-transform:uppercase; color:#9a9aa2; font-weight:700; }
.lc-h { margin:6px 0 12px; font-size:clamp(26px,3.6vw,42px); line-height:1.02; letter-spacing:-0.03em; font-weight:700; color:#111; }
.lc-lede { font-size:16px; line-height:1.55; color:#25252a; max-width:64ch; }
.lc-lede .dim { color:#8d8d95; }
.lc p { margin:0 0 12px; font-size:14.5px; line-height:1.62; color:#3a3a41; max-width:66ch; }
.lc h3 { margin:22px 0 8px; font-size:15px; font-weight:700; letter-spacing:-0.01em; color:#141417; }
.lc-rule { height:1px; background:rgba(0,0,0,0.1); margin:26px 34px 0; }
.lc-meta { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:18px 0 0; border-top:1px solid rgba(0,0,0,0.1); padding-top:14px; }
.lc-meta div span { display:block; font-size:9.5px; letter-spacing:0.2em; text-transform:uppercase; color:#9a9aa2; font-weight:700; margin-bottom:5px; }
.lc-meta div strong { font-weight:600; font-size:12.5px; line-height:1.5; color:#2c2c32; }
.lc-goal { margin:20px 0 0; padding:14px 16px; border-radius:12px; background:#111; color:#f2f2ef; font-size:13.5px; line-height:1.55; }
.lc-goal b { display:block; font-size:9.5px; letter-spacing:0.22em; text-transform:uppercase; color:#8f8f96; margin-bottom:6px; }
.lc-qs { display:flex; flex-wrap:wrap; gap:7px; margin:14px 0 16px; }
.lc-q { font-size:12.5px; padding:7px 12px; border-radius:999px; background:#fff; border:1px solid rgba(0,0,0,0.1); color:#33333a; box-shadow:0 2px 6px rgba(0,0,0,0.04); }
/* ecosystem diagram */
.lc-eco { margin:18px 0 0; padding:22px 18px; border-radius:16px; background:linear-gradient(160deg,rgba(255,255,255,0.9),rgba(240,243,250,0.6)); border:1px solid rgba(255,255,255,0.7); }
.lc-eco-core { width:112px; margin:0 auto 6px; text-align:center; padding:10px 0; border-radius:10px; background:#111; color:#fff; font-size:11.5px; font-weight:700; letter-spacing:0.02em; }
.lc-eco-stem { width:1px; height:18px; margin:0 auto; background:rgba(0,0,0,0.22); }
.lc-eco-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.lc-eco-grid span { position:relative; font-size:11.5px; color:#3a3a41; background:#fff; border:1px solid rgba(0,0,0,0.09); border-radius:8px; padding:9px 8px; text-align:center; }
.lc-eco-cap { margin:12px 0 0; font-size:11px; color:#8d8d95; text-align:center; }
/* generic artifact frame */
.lc-frame { margin:18px 0 0; border-radius:18px; overflow:hidden; border:1px solid rgba(255,255,255,0.7); background:linear-gradient(165deg,rgba(255,255,255,0.92),rgba(246,247,251,0.72)); box-shadow:0 18px 44px rgba(30,40,80,0.08), inset 0 1px 0 rgba(255,255,255,0.85); backdrop-filter:blur(6px); }
.lc-frame-h { padding:10px 14px; font-size:9.5px; letter-spacing:0.2em; text-transform:uppercase; color:#8d8d95; font-weight:700; border-bottom:1px solid rgba(120,130,170,0.14); background:linear-gradient(180deg,rgba(255,255,255,0.85),rgba(255,255,255,0.35)); }
.lc-frame-b { padding:14px; }
.lc-frame img, .lc-frame video { display:block; width:100%; height:auto; max-height:420px; object-fit:contain; background:transparent; }
/* editorial split: copy left, visual right */
.lc-split { display:grid; grid-template-columns:0.86fr 1.14fr; gap:26px; align-items:start; margin:20px 0 0; }
.lc-split > .lc-frame { margin:0; }
.lc-split .lc-split-copy { padding-top:2px; }
.lc-split .lc-split-copy p { max-width:42ch; }
.lc-split .lc-split-copy p:last-child { margin-bottom:0; }
.lc-split .lc-split-copy h3 { margin-bottom:8px; }
@media (max-width:900px) { .lc-split { grid-template-columns:1fr; gap:16px; } }

/* Editorial hero band for the L·AI·C banner */
.lc-hero { display:grid; grid-template-columns:1.25fr 0.75fr; gap:26px; align-items:end; padding:22px 30px 4px; }
.lc-hero .lc-hero-kicker { font-size:9.5px; letter-spacing:0.24em; text-transform:uppercase; color:#8d8d95; font-weight:700; }
.lc-hero .lc-hero-title { font-size:clamp(34px,5.6vw,62px); line-height:0.95; letter-spacing:-0.02em; margin:8px 0 0; font-weight:700; color:#17171b; }
.lc-hero .lc-hero-sub { font-size:13.5px; line-height:1.5; color:#5c5c66; margin:0 0 4px; max-width:34ch; }
@media (max-width:900px) { .lc-hero { grid-template-columns:1fr; gap:12px; align-items:start; padding:18px 20px 2px; } .lc-hero .lc-hero-sub { max-width:none; } }
/* floating glass back-to-top */
.lc-back { position:absolute; right:20px; bottom:20px; z-index:40; display:inline-flex; align-items:center; gap:8px; padding:10px 15px; border:1px solid rgba(255,255,255,0.55); border-radius:999px; background:rgba(255,255,255,0.42); backdrop-filter:blur(14px) saturate(1.4); box-shadow:0 14px 34px rgba(20,28,60,0.18), inset 0 1px 0 rgba(255,255,255,0.8); color:#1c1c22; font-size:11.5px; letter-spacing:0.12em; text-transform:uppercase; font-weight:700; cursor:pointer; opacity:0; transform:translateY(10px); pointer-events:none; transition:opacity .25s ease, transform .25s ease; }
.lc-back.show { opacity:1; transform:translateY(0); pointer-events:auto; }
.lc-back svg { width:11px; height:11px; }
.lc-grid2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:18px 0 0; }
.lc-grid3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:18px 0 0; }
/* discovery boards */
.lc-board { position:relative; min-height:168px; background:
  linear-gradient(rgba(0,0,0,0.045) 1px,transparent 1px) 0 0/100% 22px,
  linear-gradient(90deg,rgba(0,0,0,0.045) 1px,transparent 1px) 0 0/22px 100%, #fbfbf9; padding:12px; }
.lc-sticky { display:inline-block; font-size:10.5px; line-height:1.35; padding:7px 8px; margin:4px; width:88px; min-height:52px; color:#3a3628; box-shadow:0 3px 8px rgba(0,0,0,0.1); }
.lc-sticky.y { background:#fdf0a8; } .lc-sticky.p { background:#ffd7dd; }
.lc-sticky.b { background:#cfe4fb; } .lc-sticky.g { background:#d6f0d8; }
.lc-sticky.r1 { transform:rotate(-2deg); } .lc-sticky.r2 { transform:rotate(1.6deg); } .lc-sticky.r3 { transform:rotate(-1deg); }
.lc-cluster-t { font-size:9.5px; letter-spacing:0.16em; text-transform:uppercase; color:#9a9aa2; font-weight:700; margin:2px 0 4px 4px; }
/* competitor matrix */
.lc-matrix { width:100%; border-collapse:collapse; font-size:11.5px; }
.lc-matrix th { text-align:left; font-weight:700; font-size:9.5px; letter-spacing:0.16em; text-transform:uppercase; color:#9a9aa2; padding:0 8px 8px; }
.lc-matrix td { padding:7px 8px; border-top:1px solid rgba(0,0,0,0.07); color:#3a3a41; }
.lc-dot { display:inline-block; width:12px; height:12px; border-radius:50%; background:#d9d9d9; margin-right:4px; vertical-align:-2px; }
.lc-dot.on { background:#5b6cff; }
/* insight cards */
.lc-ins { background:linear-gradient(165deg,rgba(255,255,255,0.95),rgba(244,246,252,0.72)); border:1px solid rgba(255,255,255,0.75); border-radius:18px; padding:17px; display:flex; flex-direction:column; gap:9px; box-shadow:0 16px 38px rgba(30,40,80,0.08), inset 0 1px 0 rgba(255,255,255,0.9); }
.lc-ins-ico { width:34px; height:34px; border-radius:11px; display:grid; place-items:center; background:linear-gradient(150deg,#7d8cff,#b7a4ff 55%,#ffb3c7); color:#fff; font-size:15px; box-shadow:0 8px 18px rgba(120,110,220,0.28); }
.lc-ins b { font-size:13.5px; letter-spacing:-0.01em; color:#141417; line-height:1.35; }
.lc-ins span.txt { font-size:12.5px; line-height:1.55; color:#54545c; }
.lc-ins-vis { margin-top:auto; border-radius:10px; background:#f2f2f0; border:1px solid rgba(0,0,0,0.06); padding:10px; font-size:10.5px; color:#6a6a72; line-height:1.5; }
.lc-bar { height:6px; border-radius:99px; background:#e2e2e4; overflow:hidden; margin:5px 0 3px; }
.lc-bar i { display:block; height:100%; background:linear-gradient(90deg,#7d8cff,#c4a6ff 60%,#ffb3c7); }
/* conversation flow */
.lc-chat { display:flex; flex-direction:column; gap:8px; }
.lc-bub { max-width:78%; font-size:12.5px; line-height:1.45; padding:9px 12px; border-radius:14px; }
.lc-bub.u { align-self:flex-end; background:linear-gradient(135deg,#6f7fff,#9d8cff); color:#fff; border-bottom-right-radius:5px; box-shadow:0 8px 20px rgba(110,120,255,0.25); }
.lc-bub.a { align-self:flex-start; background:#fff; color:#2c2c32; border:1px solid rgba(0,0,0,0.08); border-bottom-left-radius:5px; }
.lc-bub.a small { display:block; margin-top:5px; font-size:10px; color:#8d8d95; }
/* intent map / flow chips */
.lc-flow { display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:11.5px; color:#3a3a41; }
.lc-node { padding:7px 10px; border-radius:8px; background:#fff; border:1px solid rgba(0,0,0,0.1); }
.lc-node.dark { background:#111; color:#fff; border-color:#111; }
.lc-arrow { color:#a9a9b1; }
.lc-intent { display:grid; gap:8px; }
.lc-intent-row { display:grid; grid-template-columns:118px 1fr; gap:10px; align-items:start; font-size:11.5px; }
.lc-intent-row b { font-size:11px; letter-spacing:0.04em; color:#141417; }
.lc-tagline { display:flex; flex-wrap:wrap; gap:5px; }
.lc-tagline em { font-style:normal; font-size:10.5px; padding:4px 8px; border-radius:99px; background:#eeeef1; color:#54545c; }
/* prompt library */
.lc-prompt { font-family:'JetBrains Mono',ui-monospace,monospace; font-size:11px; line-height:1.6; color:#2c2c32; background:#fff; border:1px solid rgba(0,0,0,0.08); border-radius:10px; padding:11px 12px; }
.lc-prompt .k { color:#5b6cff; }
.lc-prompt + .lc-prompt { margin-top:8px; }
/* device mockups */
.lc-devices { display:flex; gap:22px; justify-content:center; align-items:flex-start; flex-wrap:wrap; margin:22px 0 0; }
.lc-phone { width:236px; max-width:32%; border-radius:30px; background:#0f0f11; padding:7px; box-shadow:0 26px 60px rgba(20,26,48,0.26); }
.lc-phone-screen { border-radius:24px; overflow:hidden; background:#f2f2f0; aspect-ratio:900/1828; display:flex; }
.lc-phone-screen img, .lc-phone-screen video { width:100%; height:100%; object-fit:contain; }
@media (max-width:900px) { .lc-phone { width:150px; max-width:31%; padding:5px; border-radius:22px; } .lc-phone-screen { border-radius:18px; } }
.lc-quote { margin:24px 0 0; padding:20px 22px; border-left:2px solid #111; font-size:16px; line-height:1.5; color:#1c1c1f; letter-spacing:-0.01em; max-width:60ch; }
.lc-quote span { display:block; margin-top:8px; font-size:11px; letter-spacing:0.18em; text-transform:uppercase; color:#9a9aa2; }
@media (max-width:900px) {
  .lc-sec { padding:26px 20px 0; }
  .lc-rule { margin:20px 20px 0; }
  .lc-grid2, .lc-grid3, .lc-meta, .lc-eco-grid { grid-template-columns:1fr; display:grid; }
  .lc-eco-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .lc-h { font-size:26px; }
}

#lineSvg { position:absolute; inset:0; width:2200px; height:1300px; z-index:3; pointer-events:none; overflow:visible; }

/* ============ DOCK ============ */
.dock-wrap { position:fixed; bottom:0; left:0; right:0; z-index:300; display:flex; flex-direction:column; align-items:center; padding-bottom:14px; pointer-events:none; }
.dock-section-label { font-size:8px; letter-spacing:0.14em; text-transform:uppercase; color:rgba(51,77,110,0.55); margin-bottom:6px; transition:color 0.5s; }
body[data-theme="black"] .dock-section-label { color:rgba(210,220,235,0.5); }
.dock {
  pointer-events:auto; display:flex; align-items:flex-end; gap:8px;
  background:rgba(223,233,245,0.55); backdrop-filter:blur(22px) saturate(160%);
  border:1px solid rgba(255,255,255,0.5); border-radius:16px; padding:9px 14px;
  box-shadow:0 10px 34px rgba(30,50,80,0.18), inset 0 1px 0 rgba(255,255,255,0.6);
  transition:background 0.5s;
}
body[data-theme="black"] .dock { background:rgba(20,26,40,0.6); border-color:rgba(255,255,255,0.12); }
.di { display:flex; flex-direction:column; align-items:center; position:relative; cursor:pointer; transform-origin:bottom center; }
.di-lbl {
  position:absolute; bottom:calc(100% + 34px); left:50%; transform:translateX(-50%) translateY(6px);
  background:rgba(255,255,255,0.22);
  color:#ffffff;
  font:500 10.5px 'JetBrains Mono','IBM Plex Mono',ui-monospace,monospace;
  letter-spacing:0.14em; text-transform:lowercase;
  padding:7px 12px; border-radius:999px; white-space:nowrap; opacity:0; z-index:400;
  border:1px solid rgba(255,255,255,0.35);
  backdrop-filter:blur(16px) saturate(160%);
  -webkit-backdrop-filter:blur(16px) saturate(160%);
  transition:opacity 0.15s, transform 0.15s; pointer-events:none;
  text-shadow:0 1px 2px rgba(0,0,0,0.35);
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
}
.di-lbl::after { content:''; position:absolute; top:100%; left:50%; transform:translateX(-50%); border:4px solid transparent; border-top-color:rgba(255,255,255,0.22); }
.di:hover .di-lbl { opacity:1; transform:translateX(-50%) translateY(0); }
.di-icon {
  width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:transparent; box-shadow:0 3px 10px rgba(30,50,80,0.22);
  transition:transform 0.2s cubic-bezier(0.34,1.56,0.64,1); transform-origin:bottom center;
  overflow:hidden;
}
.di:hover .di-icon { transform:translateY(-10px) scale(1.18); box-shadow:0 8px 18px rgba(30,50,80,0.28); }
body[data-theme="black"] .di-icon { background:transparent; }
.di-icon svg { width:60%; height:60%; }
.di-icon img { width:100%; height:100%; object-fit:cover; border-radius:12px; display:block; }
.di-dot { width:3px; height:3px; border-radius:50%; background:rgba(74,111,160,0.6); margin-top:4px; opacity:0; transition:opacity 0.15s; }
.di.active .di-dot { opacity:1; }
.ddiv { width:1px; height:30px; background:rgba(74,111,160,0.25); margin:0 3px; align-self:center; }

/* ============ Forward aesthetic — dock chrome ============ */
.dock {
  background:
    linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.45) 50%, transparent 60%),
    linear-gradient(180deg, rgba(240,244,252,0.55), rgba(200,210,225,0.45)) !important;
  background-blend-mode:overlay, normal;
  border:1px solid rgba(255,255,255,0.55) !important;
  box-shadow:
    0 14px 40px rgba(20,30,50,0.28),
    0 1.5px 0 rgba(255,255,255,0.85) inset,
    0 -6px 14px rgba(0,0,0,0.10) inset !important;
}
body[data-theme="black"] .dock {
  background:
    linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.10) 50%, transparent 60%),
    linear-gradient(180deg, rgba(30,34,44,0.75), rgba(12,14,20,0.85)) !important;
  background-blend-mode:screen, normal;
  border:1px solid rgba(255,255,255,0.14) !important;
  box-shadow:
    0 14px 40px rgba(0,0,0,0.55),
    0 1px 0 rgba(255,255,255,0.10) inset !important;
}
.di-icon {
  position:relative;
  background:
    radial-gradient(120% 80% at 25% 15%, rgba(255,255,255,0.55), transparent 55%),
    linear-gradient(160deg, rgba(150,180,220,0.35), rgba(60,80,110,0.35)) !important;
  border:1px solid rgba(255,255,255,0.35);
  box-shadow:
    0 4px 12px rgba(20,30,50,0.28),
    0 1px 0 rgba(255,255,255,0.55) inset,
    0 -4px 10px rgba(0,0,0,0.15) inset !important;
  backdrop-filter:blur(10px) saturate(160%);
}
.di-icon::after {
  content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:linear-gradient(115deg, transparent 42%, rgba(255,255,255,0.55) 50%, transparent 58%);
  mix-blend-mode:overlay; opacity:0.7;
}
body[data-theme="black"] .di-icon {
  background:
    radial-gradient(120% 80% at 25% 15%, rgba(255,255,255,0.22), transparent 55%),
    linear-gradient(160deg, rgba(80,90,110,0.6), rgba(20,25,35,0.7)) !important;
  border-color:rgba(255,255,255,0.18);
}
.di-icon svg, .di-icon img { position:relative; z-index:1; }

/* NIGHT: monochrome white details on pure black */
body[data-theme="black"] { background:#000; }
body[data-theme="black"] .bp-line { background:rgba(255,255,255,0.13); }
body[data-theme="black"] .crosshair::before,
body[data-theme="black"] .crosshair::after { background:rgba(255,255,255,0.55); }
body[data-theme="black"] .coord { color:rgba(255,255,255,0.7); }
body[data-theme="black"] .dot-cluster span { background:rgba(255,255,255,0.55); }
body[data-theme="black"] .node-label { color:rgba(255,255,255,0.85); }
body[data-theme="black"] .node-sub { color:rgba(255,255,255,0.5); }
body[data-theme="black"] .folder .tab { background:rgba(255,255,255,0.85) !important; }
body[data-theme="black"] .folder .tab { background:#ffffff !important; }
body[data-theme="black"] .folder .body { background:linear-gradient(180deg,#ffffff 0%,#e8e8e8 100%); border-color:rgba(255,255,255,0.9); }
body[data-theme="black"] .folder .body::after { border-color:rgba(0,0,0,0.15); }
body[data-theme="black"] .dock-section-label { color:rgba(255,255,255,0.55); }
body[data-theme="black"] .dock { background:rgba(255,255,255,0.05); border-color:rgba(255,255,255,0.15); }
body[data-theme="black"]  { --accent:#ffffff; --accent-soft:rgba(255,255,255,0.55); --accent-glow:rgba(255,255,255,0.3); }
body[data-theme="black"] .tech-grid { opacity:0.42; }

/* FOREST: dark scrim behind text so labels stay legible over green hills */
body[data-theme="green"] .node-label,
body[data-theme="green"] .node-sub {
  color:#ffffff;
  text-shadow:0 1px 3px rgba(0,0,0,0.75), 0 0 8px rgba(0,0,0,0.55);
}
body[data-theme="green"] .bp-tagline,
body[data-theme="green"] #brand-stack,
body[data-theme="green"] #copyright {
  color:#ffffff;
  text-shadow:0 1px 2px rgba(0,0,0,0.6);
}
body[data-theme="green"] #copyright { color:rgba(255,255,255,0.92); }

/* SKY: bright wallpaper — force white copy with soft shadow for legibility */
body[data-theme="blue"] .node-label,
body[data-theme="blue"] .node-sub {
  color:#ffffff;
  text-shadow:0 1px 3px rgba(30,50,80,0.6), 0 0 10px rgba(30,50,80,0.35);
}
body[data-theme="blue"] #brand-stack,
body[data-theme="blue"] .bp-tagline,
body[data-theme="blue"] #copyright {
  color:#ffffff;
  text-shadow:0 1px 3px rgba(30,50,80,0.5);
}
body[data-theme="blue"] #brand-stack .avail { color:#ffffff; }

/* Tech Stack dock label — brighten on colorful wallpapers */
body[data-theme="blue"] .dock-section-label,
body[data-theme="green"] .dock-section-label,
body[data-theme="orange"] .dock-section-label {
  color:rgba(255,255,255,0.9);
  text-shadow:0 1px 3px rgba(30,40,60,0.45);
}

/* Synth icon reads heavier than the rest — scale it down a touch */
#n-pk01 .icon-tile { width:96px; height:96px; }
@media (max-width:1024px) { #layer #n-pk01 .icon-tile img { transform:scale(0.84); } }

/* Case-study folder image picks up the active theme */
.cs-folder-img { transition:filter .25s ease; }
body[data-theme="purple"] .cs-folder-img,
body[data-theme="purple"] #layer #n-cases .folder img.cs-folder-img { filter:hue-rotate(105deg) saturate(1.15) drop-shadow(0 10px 18px rgba(10,20,40,0.30)) !important; }
body[data-theme="green"] .cs-folder-img,
body[data-theme="green"] #layer #n-cases .folder img.cs-folder-img { filter:hue-rotate(-95deg) saturate(0.9) drop-shadow(0 10px 18px rgba(10,20,40,0.30)) !important; }
body[data-theme="black"] .cs-folder-img,
body[data-theme="black"] #layer #n-cases .folder img.cs-folder-img { filter:grayscale(1) brightness(1.75) contrast(0.9) drop-shadow(0 10px 18px rgba(10,20,40,0.30)) !important; }

/* ============ Per-theme folder colors ============ */
body[data-theme="blue"] .folder .tab   { background:linear-gradient(180deg,#5aa7ff,#3d8fe8); }
body[data-theme="blue"] .folder .body  { background:linear-gradient(180deg,#7ab8ff 0%,#4a95e8 100%); }
body[data-theme="green"] .folder .tab  { background:linear-gradient(180deg,#94b47a,#6c8e55); }
body[data-theme="green"] .folder .body { background:linear-gradient(180deg,#a9c58a 0%,#6e8e57 100%); }
body[data-theme="orange"] .folder .tab  { background:linear-gradient(180deg,#e9a58c,#c9765f); }
body[data-theme="orange"] .folder .body { background:linear-gradient(180deg,#f0b79f 0%,#c97a63 100%); }
/* PURPLE / PLUM: pink folders + white copy so it reads on the purple gradient */
body[data-theme="purple"] .folder .tab  { background:linear-gradient(180deg,#ffb3ce,#e879a8); }
body[data-theme="purple"] .folder .body { background:linear-gradient(180deg,#ffc4d8 0%,#e070a2 100%); }
body[data-theme="purple"] .node-label,
body[data-theme="purple"] .node-sub {
  color:#ffffff;
  text-shadow:0 1px 3px rgba(40,20,60,0.7), 0 0 10px rgba(40,20,60,0.4);
}
body[data-theme="purple"] #brand-stack,
body[data-theme="purple"] .bp-tagline,
body[data-theme="purple"] #copyright {
  color:#ffffff;
  text-shadow:0 1px 3px rgba(40,20,60,0.55);
}
body[data-theme="purple"] #brand-stack .avail { color:#ffffff; }
body[data-theme="purple"] .dock-section-label {
  color:rgba(255,255,255,0.92);
  text-shadow:0 1px 3px rgba(40,20,60,0.5);
}

@media (max-width:1024px) {
  #menubar { height:42px; padding:0 10px; gap:8px; font-size:9px; }
  #menubar .brand { font-size:11px !important; gap:6px; }
  #menubar .brand-logo { width:18px; height:18px; }
  #menubar .tagline-inline, #menubar .status-dot, #menubar .right > span:nth-of-type(1) { display:none; }
  #menubar .right { gap:8px; flex:0 1 auto; }
  #layer-wrap { top:42px; bottom:0; }
  .di-icon { width:56px; height:56px; border-radius:14px; }
  .di-icon img { border-radius:14px; }
  .dock { gap:5px; padding:8px 10px; max-width:calc(100vw - 18px); }
}

/* Mobile: compact wallpaper pill; keep hero copy clear of right-edge overlays;
   widget rail is centered/stacked below the hero (see later override). */
@media (max-width:1024px) {
  #wallpaper-picker {
    top:50px; right:10px; width:auto; padding:5px 8px; gap:6px;
    box-shadow:0 6px 16px rgba(30,50,80,0.18);
  }
  #wallpaper-picker .wp-title { display:none; }
  #wallpaper-picker .wp-grid { gap:5px; }
  .wp-swatch { width:22px; height:22px; }
  .wp-swatch svg { width:12px; height:12px; }
  #brand-stack {
    top:52px; left:18px;
    width:calc(100vw - 36px);
  }
  #brand-stack .hero-lede {
    max-width:100%;
    font-size:9px; line-height:1.4;
  }
  #brand-stack .avail { font-size:9px; letter-spacing:0.12em; }
  #brand-stack .hero-portrait { width:60px; height:60px; border-radius:50%; margin-bottom:0; }
  #brand-stack .hero-row { gap:11px; }
  #brand-stack .hero-more { font-size:8.5px; }
}
@media (min-width:561px) and (max-width:1024px) {
  #brand-stack { width:min(430px, calc(100vw - 300px)) !important; }
}
@media (max-width:560px) {
  #brand-stack { width:calc(100vw - 52px) !important; padding-right:6px; box-sizing:border-box; }
  #brand-stack .hero-lede { max-width:100%; overflow-wrap:break-word; }
  #brand-stack .hero-row { flex-direction:column; align-items:flex-start; gap:8px; }
  #brand-stack .hero-portrait { width:58px; height:58px; }
}

/* ============ Wallpaper picker (aligned to widget rail width) ============ */
#wallpaper-picker {
  position:fixed; top:48px; right:14px; z-index:210; width:300px; box-sizing:border-box;
  background:rgba(255,255,255,0.55); backdrop-filter:blur(18px) saturate(160%);
  border:1px solid rgba(0,0,0,0.08); border-radius:14px; padding:8px 12px;
  box-shadow:0 10px 30px rgba(30,50,80,0.14);
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  font-family:"Space Grotesk","Inter",system-ui,sans-serif;
  transition:background 0.4s, color 0.4s, border-color 0.4s;
}
body[data-theme="black"] #wallpaper-picker { background:rgba(0,0,0,0.55); border-color:rgba(255,255,255,0.14); color:#fff; }
#wallpaper-picker .wp-title {
  font-size:9px; letter-spacing:0.16em; text-transform:uppercase;
  color:rgba(40,40,40,0.7); flex:0 0 auto;
}
body[data-theme="black"] #wallpaper-picker .wp-title { color:rgba(220,228,240,0.8); }
#wallpaper-picker .wp-grid { display:flex; gap:6px; }
.wp-swatch {
  width:26px; height:26px; border-radius:50%; cursor:pointer; padding:0; overflow:hidden;
  border:1.5px solid rgba(255,255,255,0.85); position:relative;
  display:inline-flex; align-items:center; justify-content:center;
  color:rgba(60,60,70,0.9);
  box-shadow:0 1px 4px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.35);
  transition:filter 0.15s, border-color 0.15s, box-shadow 0.15s;
}
body[data-theme="black"] .wp-swatch { color:rgba(230,235,245,0.95); }
.wp-swatch:hover { filter:brightness(1.08); box-shadow:0 2px 6px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(255,255,255,0.5); }
.wp-swatch.active { border-color:#ffffff; box-shadow:0 0 0 2px rgba(255,255,255,0.9), 0 2px 8px rgba(0,0,0,0.2); }
.wp-swatch svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
/* pastel-colored icon tint per swatch — soft, scene-matched */
.wp-swatch[data-theme="blue"]    { color:#f2b45c; }   /* soft sun */
.wp-swatch[data-theme="green"] { color:#6fae7a; }   /* fern */
.wp-swatch[data-theme="orange"] { color:#d47a86; }   /* dusty rose */
.wp-swatch[data-theme="black"]  { color:#eef1f8; }   /* crescent moon on dark */
.wp-swatch[data-theme="black"] { border-color:rgba(255,255,255,0.4); }

/* ============ Right-side widget rail ============ */
#widget-rail { position:fixed; top:104px; right:14px; z-index:200; display:flex; flex-direction:column; gap:10px; width:300px; max-height:calc(100vh - 120px); }
.widget {
  background:rgba(255,255,255,0.55); backdrop-filter:blur(18px) saturate(160%);
  border:1px solid rgba(0,0,0,0.08); border-radius:14px; padding:10px;
  box-shadow:0 10px 30px rgba(30,50,80,0.14);
  font-family:"Space Grotesk","Inter",system-ui,sans-serif; color:rgba(30,40,60,0.9);
  transition:background 0.4s, color 0.4s, border-color 0.4s;
}
body[data-theme="black"] .widget { background:rgba(0,0,0,0.55); border-color:rgba(255,255,255,0.14); color:#fff; }
.widget .w-title { font-size:9px; letter-spacing:0.14em; text-transform:uppercase; opacity:0.65; margin-bottom:6px; }
#weather-widget { padding:0; background:transparent; border:none; box-shadow:none; }
#weather-widget > .w-title { display:none; }
.wx-pair { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.wx-card {
  position:relative; border-radius:14px; padding:10px;
  min-height:130px; display:flex; flex-direction:column; justify-content:space-between;
  color:inherit; font-family:"Space Grotesk","Inter",system-ui,sans-serif;
  background:rgba(255,255,255,0.55); backdrop-filter:blur(18px) saturate(160%);
  border:1px solid rgba(0,0,0,0.08);
  box-shadow:0 10px 30px rgba(30,50,80,0.14);
  overflow:hidden;
}
body[data-theme="black"] .wx-card { background:rgba(0,0,0,0.55); border-color:rgba(255,255,255,0.14); color:#fff; }
.wx-loc { display:flex; align-items:center; gap:4px; font-size:11px; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; opacity:0.75; }
.wx-loc svg { width:9px; height:9px; opacity:0.7; }
.wx-temp { font-size:34px; font-weight:700; line-height:1; letter-spacing:-0.02em; margin-top:4px; }
.wx-foot { display:flex; align-items:center; gap:6px; font-size:10.5px; opacity:0.8; }
.wx-emoji { font-size:14px; line-height:1; }
#music-widget { padding:12px 12px 14px; display:grid; grid-template-columns:56px 1fr; grid-template-rows:auto auto; gap:6px 12px; align-items:center; }
#music-widget .w-title { grid-column:1 / -1; }
.mp-cover { grid-row:2 / span 2; width:56px; height:56px; border-radius:50%; background:radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), rgba(0,0,0,0) 55%), var(--accent, #4A6FA0); display:flex; align-items:center; justify-content:center; box-shadow:0 4px 10px rgba(0,0,0,0.25); overflow:hidden; }
.mp-disc { width:100%; height:100%; border-radius:50%; background:repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.08) 0 2px, transparent 2px 4px), #1a1a1e; display:flex; align-items:center; justify-content:center; animation:mpspin 8s linear infinite paused; }
#music-widget.playing .mp-disc { animation-play-state:running; }
.mp-hole { width:12px; height:12px; border-radius:50%; background:var(--accent, #4A6FA0); box-shadow:0 0 0 2px rgba(0,0,0,0.4); }
@keyframes mpspin { to { transform:rotate(360deg); } }
.mp-meta { min-width:0; }
.mp-track { font-size:12px; font-weight:600; letter-spacing:0.03em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mp-artist { font-size:10px; opacity:0.65; letter-spacing:0.08em; text-transform:uppercase; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mp-controls { display:flex; align-items:center; gap:8px; }
.mp-btn { width:26px; height:26px; border-radius:50%; border:1px solid rgba(0,0,0,0.12); background:rgba(255,255,255,0.55); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; color:inherit; padding:0; transition:transform .12s, background .15s; }
.mp-btn:hover { transform:scale(1.06); background:rgba(255,255,255,0.85); }
.mp-btn.mp-play { width:32px; height:32px; background:var(--accent,#4A6FA0); color:#fff; border-color:transparent; }
.mp-btn.mp-play:hover { background:var(--accent,#4A6FA0); filter:brightness(1.08); }
body[data-theme="black"] .mp-btn { background:rgba(255,255,255,0.08); border-color:rgba(255,255,255,0.18); color:#fff; }
body[data-theme="black"] .mp-btn.mp-play { background:#fff; color:#000; }
/* Apple Music embed inside music widget */
#music-widget { padding:10px 12px 12px; display:block; }
#music-widget .mp-embed { border-radius:12px; overflow:hidden; margin-top:6px; background:transparent; }
#music-widget .mp-embed iframe { width:100%; border:0; display:block; background:transparent; }
/* T-Rex runner widget */
#snake-widget { padding:10px; }
#snake-widget .dino-wrap { position:relative; border-radius:10px; overflow:hidden; background:#f7f7f7; border:1px solid rgba(0,0,0,0.08); touch-action:none; user-select:none; aspect-ratio:600/180; }
#snake-widget .dino-wrap canvas { display:block; width:100%; height:100%; }
body[data-theme="black"] #snake-widget .dino-wrap { background:#0b0c0f; border-color:rgba(255,255,255,0.08); }
#snake-widget canvas { display:block; width:100%; height:100%; image-rendering:pixelated; cursor:pointer; touch-action:none; user-select:none; }
#music-widget .mp-fallback { display:block; margin-top:8px; font-size:10px; letter-spacing:0.12em; text-transform:lowercase; opacity:0.55; text-decoration:none; color:inherit; }
#music-widget .mp-fallback:hover { opacity:0.9; }
#snake-widget .dino-overlay {
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:4px; font-size:9px; letter-spacing:0.18em; text-transform:uppercase; opacity:0.85;
  background:rgba(247,247,247,0.65); backdrop-filter:blur(2px); transition:opacity 0.2s;
  color:#535353; cursor:pointer; border:0; padding:0; font-family:inherit;
}
body[data-theme="black"] #snake-widget .dino-overlay { background:rgba(11,12,15,0.55); color:#eaeaea; }
#snake-widget .dino-overlay .k { font-size:18px; letter-spacing:0; }
#snake-widget .dino-hi { font-family:'JetBrains Mono','Courier New',monospace; font-size:10px; letter-spacing:0.1em; opacity:0.55; }
#snake-widget .game-meta { display:flex; justify-content:space-between; margin-top:8px; font-size:9px; letter-spacing:0.14em; text-transform:uppercase; opacity:0.7; font-family:'JetBrains Mono','Courier New',monospace; }

/* ============ Chess widget ============ */
.ch-app { padding:10px 12px 11px; }
.ch-app .w-title { display:flex; justify-content:space-between; align-items:center; }
.ch-app .ch-side { font-size:8px; letter-spacing:0.14em; text-transform:uppercase; opacity:0.5; }
.ch-app .ch-board {
  margin-top:7px; display:grid;
  grid-template-columns:repeat(8, minmax(0,1fr));
  grid-template-rows:repeat(8, minmax(0,1fr));
  aspect-ratio:1/1; width:100%;
  container-type:inline-size;
  border-radius:10px; overflow:hidden; box-shadow:inset 0 0 0 1px rgba(0,0,0,0.12);
  user-select:none; touch-action:manipulation;
}
body[data-theme="black"] .ch-app .ch-board { box-shadow:inset 0 0 0 1px rgba(255,255,255,0.14); }
.ch-app .ch-sq {
  position:relative; display:flex; align-items:center; justify-content:center;
  width:100%; height:100%; min-width:0; min-height:0; overflow:hidden;
  font-size:8.4cqw; line-height:1; cursor:pointer;
  background:rgba(255,255,255,0.62); color:#1b1c1f; border:0; padding:0; margin:0;
  font-family:"Segoe UI Symbol","Apple Symbols","DejaVu Sans",serif;
  transition:background .14s ease;
}
@supports not (font-size:1cqw) { .ch-app .ch-sq { font-size:clamp(13px, 3.4vw, 30px); } }
.ch-app .ch-sq span { pointer-events:none; display:block; line-height:1; }
.ch-app .ch-sq.dark { background:rgba(120,132,150,0.42); }
body[data-theme="black"] .ch-app .ch-sq { background:rgba(255,255,255,0.14); color:#f2f3f5; }
body[data-theme="black"] .ch-app .ch-sq.dark { background:rgba(255,255,255,0.05); }
.ch-app .ch-sq.sel { box-shadow:inset 0 0 0 2px rgba(255,255,255,0.9); }
.ch-app .ch-sq.last { box-shadow:inset 0 0 0 2px rgba(255,255,255,0.4); }
.ch-app .ch-sq.chk { box-shadow:inset 0 0 0 2px rgba(214,72,60,0.85); }
.ch-app .ch-sq.mv::after {
  content:''; position:absolute; width:22%; height:22%; border-radius:50%;
  background:rgba(20,24,32,0.32);
}
body[data-theme="black"] .ch-app .ch-sq.mv::after { background:rgba(255,255,255,0.45); }
.ch-app .ch-sq.cap::after { width:64%; height:64%; border-radius:50%; background:transparent; box-shadow:inset 0 0 0 2px rgba(20,24,32,0.3); }
body[data-theme="black"] .ch-app .ch-sq.cap::after { box-shadow:inset 0 0 0 2px rgba(255,255,255,0.4); }
.ch-app .ch-meta { display:flex; justify-content:space-between; align-items:center; margin-top:8px; font-size:9px; letter-spacing:0.13em; text-transform:uppercase; opacity:0.7; font-family:'JetBrains Mono','Courier New',monospace; }
.ch-app .ch-meta button { font:inherit; letter-spacing:inherit; text-transform:inherit; color:inherit; background:transparent; border:0; cursor:pointer; opacity:0.75; padding:0; }
.ch-app .ch-meta button:hover { opacity:1; text-decoration:underline; }
/* prevent hover-repaint glitches around the right rail */
#widget-rail, #wallpaper-picker { contain:layout paint; isolation:isolate; will-change:transform; }
#widget-rail .widget { transform:translateZ(0); isolation:isolate; }
/* Awards widget */
#awards-widget .w-title { display:flex; justify-content:space-between; align-items:center; }
#awards-widget .w-title .aw-count { opacity:0.55; letter-spacing:0.14em; }
#awards-widget .aw-grid { display:flex; gap:12px; margin-top:6px; align-items:center; justify-content:flex-start; }
/* Desktop: awards live in the left edge stack, not the right rail */
@media (min-width:1025px){ #awards-widget { display:none !important; } }
.aw-badge { position:relative; display:block; width:58px; height:58px; border-radius:50%; overflow:hidden; transition:transform 0.18s ease, box-shadow 0.18s ease; flex:0 0 auto; }
.aw-badge:hover { transform:translateY(-2px) scale(1.08); box-shadow:0 8px 18px rgba(0,0,0,0.25); }
.aw-badge img { width:100%; height:100%; display:block; }
.aw-badge .aw-day { display:block; }
.aw-badge .aw-night { display:none; }
body[data-theme="black"] .aw-badge .aw-day { display:none; }
body[data-theme="black"] .aw-badge .aw-night { display:block; }
.aw-caption { font-size:9px; opacity:0.6; letter-spacing:0.06em; margin-top:8px; text-align:left; }
/* Hide broken-image icon for locked assets before signed URLs load */
img[data-locked][src=""] { visibility:hidden; }
.photo-node[data-kind="resume"] .thumb {
  background:
    linear-gradient(180deg, #fdfcf7 0%, #f2ede0 100%);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.12);
  position:relative;
}
.photo-node[data-kind="resume"] .thumb::before {
  content:"";
  position:absolute; inset:14% 18%;
  background:
    linear-gradient(#c8c0aa, #c8c0aa) top/100% 8% no-repeat,
    repeating-linear-gradient(180deg, transparent 0 6px, rgba(60,50,30,0.18) 6px 7px);
  opacity:0.55;
  pointer-events:none;
}
body[data-theme="black"] .photo-node[data-kind="resume"] .thumb {
  background:linear-gradient(180deg, #2b2b30 0%, #1e1e22 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.08), 0 4px 10px rgba(0,0,0,0.4);
}

/* Mobile drawer is hidden on desktop/tablet */
#mobile-drawer { display:none; }

/* ============ Recycle bin + hedgehog ============ */
.trash-di .di-icon { background:rgba(255,255,255,0.32); }
.trash-di.drag-over .di-icon { transform:translateY(-12px) scale(1.22) !important; box-shadow:0 0 0 2px rgba(47,123,255,0.65), 0 12px 24px rgba(30,50,80,0.28); }
#trashModal { position:fixed; inset:0; z-index:6200; display:none; align-items:center; justify-content:center; background:rgba(10,14,22,0.54); backdrop-filter:blur(8px); }
#trashModal.open { display:flex; }
#trashModal .trash-card { width:min(520px,92vw); max-height:78vh; background:#f6f3ee; border-radius:16px; overflow:hidden; box-shadow:0 30px 80px rgba(0,0,0,0.5),0 0 0 1px rgba(0,0,0,0.12); font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif; }
#trashModal .trash-head { height:38px; background:linear-gradient(#ececef,#dcdce0); border-bottom:1px solid rgba(0,0,0,0.12); display:flex; align-items:center; padding:0 14px; gap:8px; position:relative; }
#trashModal .trash-close { width:20px; height:20px; border-radius:50%; background:#ff5f57; border:1px solid rgba(0,0,0,0.18); padding:0; }
#trashModal .trash-title { position:absolute; left:0; right:0; text-align:center; font-size:13px; color:#333; font-weight:600; pointer-events:none; }
#trashModal .trash-body { padding:16px; overflow:auto; max-height:calc(78vh - 38px); }
.trash-empty { padding:34px 16px; text-align:center; color:#777; font-size:13px; }
.trash-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border-radius:10px; background:#fff; box-shadow:0 1px 0 rgba(0,0,0,0.06); margin-bottom:8px; }
.trash-row-name { font-size:13px; color:#222; }
.restore-btn { border:0; border-radius:999px; padding:6px 10px; background:#111; color:#fff; font-size:11px; letter-spacing:0.08em; text-transform:uppercase; }
#hedgehog { position:fixed; left:16px; right:auto; top:auto; bottom:36px; z-index:260; width:58px; height:58px; display:flex; align-items:center; justify-content:center; pointer-events:auto; filter:drop-shadow(0 10px 18px rgba(0,0,0,0.28)); touch-action:none; user-select:none; }
@media (max-width:900px) { #hedgehog { left:16px; right:auto; top:auto; bottom:120px; } }
#hedgehog .critter { width:52px; height:52px; overflow:visible; animation:critterBob 3.4s ease-in-out infinite; transition:transform .12s; }
#hedgehog.dragging { filter:drop-shadow(0 18px 26px rgba(0,0,0,0.35)); }
#hedgehog.dragging .critter { animation:none; transform:scale(1.08); }
#hedgehog .critter .body { fill: var(--sprout-body, #f6c9a8); transition:fill .6s ease; }
#hedgehog .critter .foot { fill: var(--sprout-foot, #e8a983); transition:fill .6s ease; }
#hedgehog .critter .cheek { fill: var(--sprout-cheek, #f2a68f); transition:fill .6s ease; }
#hedgehog .critter .leaf1 { fill: var(--sprout-leaf1, #7bbf7a); transition:fill .6s ease; }
#hedgehog .critter .leaf2 { fill: var(--sprout-leaf2, #8fd18e); transition:fill .6s ease; }
body[data-theme="blue"]    { --sprout-body:#dbeaf7; --sprout-foot:#afc8df; --sprout-cheek:#8fb7d9; --sprout-leaf1:#6895bd; --sprout-leaf2:#93b9d8; }
body[data-theme="green"] { --sprout-body:#d7e6cf; --sprout-foot:#a9c199; --sprout-cheek:#c4a068; --sprout-leaf1:#7fa663; --sprout-leaf2:#a0c47f; }
body[data-theme="orange"] { --sprout-body:#efd4b4; --sprout-foot:#c99c74; --sprout-cheek:#d98266; --sprout-leaf1:#a05e3a; --sprout-leaf2:#c58a5a; }
body[data-theme="black"]  { --sprout-body:#2e3450; --sprout-foot:#20263e; --sprout-cheek:#5a4a78; --sprout-leaf1:#8a9bd0; --sprout-leaf2:#b8c4e6; }
#hedgehog .hedge-bubble { position:absolute; left:52px; right:auto; top:-8px; bottom:auto; min-width:150px; background:rgba(255,250,242,0.96); color:#2b2320; border:1px solid rgba(0,0,0,0.08); border-radius:12px; padding:8px 11px; font:11px/1.3 -apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif; box-shadow:0 10px 24px rgba(0,0,0,0.18); opacity:0; transform:translateY(6px); transition:opacity .2s, transform .2s; pointer-events:none; white-space:nowrap; }
#hedgehog.say .hedge-bubble, #hedgehog:hover .hedge-bubble { opacity:1; transform:translateY(0); }
body[data-theme="black"] #hedgehog .hedge-bubble { background:rgba(20,20,20,0.94); color:#fff7ec; border-color:rgba(255,255,255,0.12); }
@keyframes critterBob { 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-3px); } }
@keyframes critterBlink { 0%,92%,100%{ transform:scaleY(1); } 95%{ transform:scaleY(0.1); } }
#hedgehog .eye { transform-origin:center; animation:critterBlink 4.2s ease-in-out infinite; }
@media (max-width:1024px) {
  /* --------- MOBILE LAYOUT (final) ---------
     Bottom is a drag-up drawer. When closed, only a slim handle peeks
     above the dock. Drag/tap the handle to reveal weather / music /
     wallpaper / snake. Sprout sits above the drawer on the left. */

  /* Mobile: uniform 72px rounded-square tiles (iPhone home-screen rhythm).
     All specifics live below inside #layer overrides so folders, photos,
     notes, and icon tiles share the same footprint. */
  .node .cs-lock-badge { width:26px; height:26px; }
  .node .cs-lock-badge svg { width:13px; height:13px; }

  /* Mobile desktop: use a real scrollable grid instead of squeezing the
     2200px desktop canvas into the phone. The old scaled canvas was what
     created the hard horizontal clipping band where icons seemed to vanish. */
  #stage { overflow:hidden; }
  #layer-wrap {
    top:42px !important; bottom:0 !important;
    overflow:hidden !important;
    /* extra top padding so first icon row clears the hero copy */
    padding:250px 8px 120px;
  }
  #layer {
    position:relative !important;
    left:auto !important; top:auto !important;
    width:100% !important; height:100% !important;
    padding:0 !important;
    transform:none !important; transform-origin:top left !important; will-change:auto;
    display:grid; grid-template-columns:repeat(4, minmax(0, 1fr));
    column-gap:6px; row-gap:2px; align-items:start; align-content:start; justify-items:center;
    grid-auto-rows:max-content;
  }
  #lineSvg, .bp-line, .crosshair, .dot-cluster, .coord { display:none !important; }
  #layer .node {
    position:relative !important; left:auto !important; top:auto !important;
    width:76px; justify-self:center;
    display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
    transform:none !important;
    min-height:80px;
  }
  #layer .node:hover { transform:none !important; }
  #layer .node-label {
    font-size:9.5px !important; line-height:1.2 !important;
    margin-top:5px !important; width:76px; text-align:center;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  #layer .node-sub {
    display:none !important;
  }
  /* iPhone home-screen rhythm: every tile is a uniform 60px rounded square */
  #layer .folder,
  #layer .photo-node .thumb,
  #layer .note-thumb,
  #layer .nb-thumb,
  #layer .icon-tile {
    width:60px !important;
    height:60px !important;
    border-radius:14px !important;
    box-sizing:border-box;
  }
  #layer .icon-tile { padding:6px !important; }
  /* Photos on mobile: keep the shared glass style — just center the emoji */
  #layer #n-photos .icon-tile {
    padding:0 !important;
    display:flex !important; align-items:center !important; justify-content:center !important;
  }
  #layer #n-photos .photos-flower {
    width:78% !important; height:78% !important;
    display:block !important; margin:0 !important;
    object-fit:contain;
  }
  /* Case-study folder on mobile/tablet: glass tile with 📁 emoji, matching other apps */
  #layer [id^="n-case"] .folder {
    width:60px !important; height:60px !important; margin-top:0 !important;
    position:relative; overflow:hidden;
    background: rgba(255,255,255,0.14) !important;
    border:1px solid rgba(255,255,255,0.28) !important;
    border-radius:14px !important;
    box-shadow:
      0 8px 24px rgba(0,0,0,0.18),
      inset 0 1px 0 rgba(255,255,255,0.35),
      inset 0 -6px 14px rgba(255,255,255,0.05) !important;
    backdrop-filter:blur(16px) saturate(160%);
  }
  #layer [id^="n-case"] .folder .tab,
  #layer [id^="n-case"] .folder::before { display:none !important; }
  #layer [id^="n-case"] .folder::after {
    content:'📁';
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    font-size:34px; line-height:1; z-index:2;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  }
  /* Soft top-left sheen to match other glass tiles */
  #layer [id^="n-case"] .folder > .body::before,
  #layer .photo-node[data-kind="resume"] .thumb > i.sheen {
    display:none;
  }
  #layer [id^="n-case"] .folder .body {
    background: linear-gradient(150deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 55%) !important;
  }
  #layer .photo-node[data-kind="resume"] .thumb {
    background:
      linear-gradient(150deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 55%),
      rgba(255,255,255,0.14) !important;
  }
  #layer [id^="n-case"] .folder .body {
    position:absolute !important; inset:0 !important;
    background:transparent !important; border:0 !important; border-radius:14px !important;
    top:0 !important;
  }
  /* Small block lock badge, centered on the tile */
  #layer [id^="n-case"] .cs-lock-badge {
    position:absolute !important;
    top:50% !important; left:50% !important;
    right:auto !important; bottom:auto !important;
    transform:translate(-50%,-50%) !important;
     width:11px !important; height:11px !important;
     display:flex !important; align-items:center; justify-content:center;
    background:rgba(15,18,24,0.86) !important;
    border:0 !important;
    border-radius:50% !important;
    box-shadow:0 3px 7px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.6) !important;
    backdrop-filter:blur(4px);
    z-index:6;
  }
  #layer [id^="n-case"] .cs-lock-badge svg {
    width:6px !important; height:6px !important; color:#ffffff;
  }
  @media (min-width: 561px) {
    #layer [id^="n-case"] .cs-lock-badge { width:14px !important; height:14px !important; }
    #layer [id^="n-case"] .cs-lock-badge svg { width:8px !important; height:8px !important; }
  }
  /* Case-study tiles: white label on the blue tile */
  #layer [id^="n-case"] .node-label {
    color:#ffffff !important;
    text-shadow:0 1px 2px rgba(0,0,0,0.22);
  }
  #layer [id^="n-case"].selected .node-label,
  #layer [id^="n-case"] .node-label { background:transparent !important; }
  /* Resume on mobile/tablet: glass tile with 📄 emoji, matching other apps */
  #layer .photo-node[data-kind="resume"] .thumb {
    position:relative; overflow:hidden;
    background: rgba(255,255,255,0.14) !important;
    border:1px solid rgba(255,255,255,0.28) !important;
    border-radius:14px !important;
    box-shadow:
      0 8px 24px rgba(0,0,0,0.18),
      inset 0 1px 0 rgba(255,255,255,0.35),
      inset 0 -6px 14px rgba(255,255,255,0.05) !important;
    backdrop-filter:blur(16px) saturate(160%);
  }
  #layer .photo-node[data-kind="resume"] .thumb::before { display:none !important; }
  #layer .photo-node[data-kind="resume"] .thumb::after {
    content:'📄';
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    font-size:34px; line-height:1; z-index:2;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  }
  #layer .photo-node[data-kind="resume"] .thumb img { display:none !important; }
  /* Note-thumb: hide desktop paper-line decorations at this small size */
  #layer .note-thumb::before { left:4px; right:4px; top:4px; height:5px; border-radius:2px; }
  #layer .note-thumb::after { display:none; }
  /* Photo thumbs: square, filling the tile */
  #layer .photo-node .thumb { border-radius:14px; }
  /* case study folders sit in the same uniform square footprint as other tiles */
   /* order: case studies first, resume kept on row 1, notebook on row 2 */
  #layer .node { order: 5; }
  #layer #n-cases     { order: 1; }
  #layer #n-stickies  { order: 2; }
  #layer #n-bookshelf { order: 3; }
  #layer #n-resume    { order: 4; }
  #layer #n-notebook  { order: 5; }
  #layer #n-fal       { order: 6; }
  #layer #n-pk01      { order: 7; }
  #layer #n-watchlist { order: 7; }
  #layer #n-photos    { order: 8; }
  /* Hide individual photos on mobile — replaced by aggregated Photos folder. Keep resume (a PDF). */
  #layer .photo-node:not(#n-resume) { display:none !important; }
  #layer .photos-mobile { display:flex !important; }

  /* Dock — bottom, above copyright, sitting on the drawer handle */
  .dock-wrap {
    position:fixed; top:auto; left:0; right:0;
    bottom:78px; z-index:210; padding-bottom:0;
  }
  .dock-section-label {
    display:block; margin-bottom:4px; font-size:8px;
    color:rgba(255,255,255,0.9); text-shadow:0 1px 2px rgba(0,0,0,0.35);
  }
  .di-lbl { font-size:9.5px; padding:5px 10px; bottom:calc(100% + 14px); z-index:20; }
  .dock {
    gap:5px; padding:6px 9px; border-radius:16px;
    max-width:calc(100vw - 16px); overflow:visible;
    flex-wrap:nowrap;
  }
  .dock::-webkit-scrollbar { display:none; }
  .di { position:relative; }
  .di-icon { width:30px; height:30px; border-radius:8px; }
  .di-icon img { border-radius:8px; }
  .di:hover .di-icon, .di:active .di-icon { transform:translateY(-6px) scale(1.15); z-index:5; }
  .di-lbl { font-size:10px; padding:4px 8px; bottom:calc(100% + 10px); z-index:20; }

  /* ------- Bottom Drawer (mobile only) ------- */
  #mobile-drawer {
    display:flex; flex-direction:column;
    position:fixed; left:0; right:0; bottom:0; z-index:180;
    height:calc(100vh - 44px); padding:0 10px 10px;
    background:rgba(255,255,255,0.72);
    backdrop-filter:blur(22px) saturate(1.2);
    -webkit-backdrop-filter:blur(22px) saturate(1.2);
    border-top:1px solid rgba(255,255,255,0.5);
    border-radius:22px 22px 0 0;
    box-shadow:0 -12px 30px rgba(0,0,0,0.14);
    transform:translateY(calc(100% - 46px));
    transition:transform .32s cubic-bezier(.4,.14,.3,1);
    touch-action:none;
  }
  body[data-theme="black"] #mobile-drawer {
    background:rgba(20,22,28,0.78); border-top-color:rgba(255,255,255,0.08);
  }
  #mobile-drawer.open { transform:translateY(0); z-index:350; }
  /* When drawer is open, hide everything behind it */
  body.drawer-open .dock-wrap,
  body.drawer-open #hedgehog,
  body.drawer-open #copyright,
  body.drawer-open #stage,
  body.drawer-open #wallpaper-picker-desktop { visibility:hidden; }
  #mobile-drawer .md-handle {
    height:46px; display:flex; align-items:center; justify-content:center;
    cursor:grab; flex-shrink:0;
  }
  #mobile-drawer .md-handle:active { cursor:grabbing; }
  #mobile-drawer .md-grip {
    width:44px; height:5px; border-radius:3px;
    background:rgba(0,0,0,0.28);
  }
  body[data-theme="black"] #mobile-drawer .md-grip { background:rgba(255,255,255,0.4); }
  #mobile-drawer .md-body {
    flex:1; min-height:0; overflow:hidden;
    display:flex; flex-direction:column;
    gap:8px; padding:2px 4px 6px;
  }

  /* Reset the widgets so they flow inside the drawer grid */
  #widget-rail {
    position:static !important; top:auto; right:auto; left:auto; bottom:auto;
    display:contents; width:auto; max-width:none; max-height:none;
    padding:0; contain:none; will-change:auto; pointer-events:auto;
  }
  #widget-rail .widget { transform:none !important; pointer-events:auto; }
  #weather-widget {
    order:2; width:100%; padding:0 !important;
    display:block; background:transparent !important; border:0 !important; box-shadow:none !important;
  }
  #weather-widget .wx-pair {
    width:100%; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:0; align-items:stretch; text-align:left;
    background:rgba(255,255,255,0.55); border:1px solid rgba(255,255,255,0.6);
    border-radius:16px; overflow:hidden;
    box-shadow:0 6px 20px rgba(0,0,0,0.08);
  }
  #weather-widget .wx-card { width:100%; min-width:0; min-height:94px; box-sizing:border-box;
    padding:10px 12px; justify-content:space-between; gap:4px;
    align-items:flex-start; text-align:left;
    background:transparent !important; border:0 !important; box-shadow:none !important;
    border-radius:0 !important; }
  #weather-widget .wx-card + .wx-card { border-left:1px solid rgba(0,0,0,0.12) !important; }
  body[data-theme="black"] #weather-widget .wx-pair { background:rgba(20,22,28,0.6); border-color:rgba(255,255,255,0.14); }
  body[data-theme="black"] #weather-widget .wx-card + .wx-card { border-left-color:rgba(255,255,255,0.14) !important; }
  #weather-widget .wx-loc, #weather-widget .wx-foot { justify-content:flex-start; }
  #weather-widget .wx-loc { font-size:9px; }
  #weather-widget .wx-temp { font-size:22px; margin-top:2px; }
  #weather-widget .wx-foot { font-size:10px; }
  #weather-widget .wx-emoji { font-size:12px; }

  #music-widget {
    position:static !important; width:auto; min-width:0;
    order:3;
    grid-template-columns:36px 1fr; gap:4px 8px; padding:8px 10px;
  }
  .mp-cover { width:36px; height:36px; }
  .mp-hole { width:9px; height:9px; }
  .mp-track { font-size:11px; }
  .mp-artist { font-size:9px; }
  .mp-controls { gap:6px; }
  .mp-btn { width:22px; height:22px; }
  .mp-btn.mp-play { width:26px; height:26px; }
  #music-widget .w-title { font-size:8px; margin-bottom:3px; }

  #wallpaper-picker {
    position:static !important; top:auto !important; right:auto !important;
    left:auto !important; bottom:auto !important; margin:0;
    order:1;
    width:auto; padding:10px 14px;
    display:flex; flex-direction:row; align-items:center; justify-content:center; gap:14px;
  }
  #wallpaper-picker .wp-title { display:none; }
  #wallpaper-picker .wp-grid {
    display:flex; flex-direction:row; gap:14px;
  }
  .wp-swatch { width:22px; height:22px; }
  .wp-swatch svg { width:11px; height:11px; }


  #awards-widget {
    display:none !important;
  }
  #awards-widget .aw-grid { display:grid; grid-template-columns:1fr 1fr; justify-content:stretch; gap:8px; }
  #awards-widget .aw-badge {
    width:auto; height:44px; border-radius:12px;
    display:flex; align-items:center; justify-content:center;
    background:rgba(255,255,255,0.22);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,0.28), 0 6px 14px rgba(30,50,80,0.12);
  }
  #awards-widget .aw-badge img { width:34px; height:34px; object-fit:contain; }
  body[data-theme="black"] #awards-widget .aw-badge { background:rgba(255,255,255,0.08); box-shadow:inset 0 0 0 1px rgba(255,255,255,0.12); }

  /* Services widget on mobile/tablet — frosted glass, matches desktop */
  #services-widget {
    position:fixed !important;
    top:150px !important; left:14px !important; right:14px !important;
    width:auto !important; margin:0 !important;
    z-index:180 !important;
    display:block !important;
    padding:8px 12px 9px;
    background:rgba(255,255,255,0.55) !important;
    color:rgba(30,40,60,0.9) !important;
    border:1px solid rgba(0,0,0,0.08) !important;
    border-radius:16px;
    backdrop-filter:blur(18px) saturate(160%) !important;
    -webkit-backdrop-filter:blur(18px) saturate(160%) !important;
    box-shadow:0 10px 30px rgba(30,50,80,0.14);
  }
  body[data-theme="black"] #services-widget {
    background:rgba(0,0,0,0.55) !important;
    color:#fff !important;
    border-color:rgba(255,255,255,0.14) !important;
    box-shadow:0 12px 28px rgba(0,0,0,0.45);
  }
  #services-widget .w-title { opacity:0.55; font-size:9px; letter-spacing:0.14em; text-transform:uppercase; margin-bottom:2px; }
  #services-widget ul { margin:0 0 6px !important; }
  #services-widget ul li {
    color:inherit !important;
    border-bottom-color:rgba(0,0,0,0.08) !important;
    padding:3px 0 !important;
    font-size:10.5px !important;
  }
  #services-widget ul li button.svc-item { padding:3px 0 !important; font-size:10.5px !important; }
  #services-widget ul li span:last-child {
    font-size:8px !important;
  }
  #services-widget a[href^="mailto"] {
    padding:8px 12px !important;
    font-size:10px !important;
  }
  #services-widget #servicesOpen {
    padding:6px 10px !important;
    font-size:9.5px !important;
    border-radius:8px !important;
  }
  body[data-theme="black"] #services-widget ul li {
    border-bottom-color:rgba(255,255,255,0.10) !important;
  }
  body[data-theme="black"] #services-widget ul li span:last-child { color:#8590a0 !important; }
  body[data-theme="black"] #services-widget a[href^="mailto"] {
    background:#f4f2ee !important; color:#141416 !important;
  }

  /* Sprout — perched above the drawer on the LEFT */
  #hedgehog {
    left:12px !important; right:auto !important; top:auto !important;
    bottom:130px !important;
  }

  /* Copyright: bottom-center, above the drawer handle */
  #copyright { left:0; right:0; bottom:56px; text-align:center; z-index:181; }
}

/* ------- Tablet: lift the dock so copyright is visible ------- */
@media (min-width:1025px) and (max-width:1024px) {
  .dock-wrap { padding-bottom:34px; }
  #copyright { bottom:12px; }
}

/* ============ EXPERIMENT: bare illustrated icons + catalog captions ============ */
#layer .node { width:210px; align-items:stretch !important; }
#layer #n-photos { width:224px; }
#layer #n-pk01 .icon-tile,
#layer #n-bookshelf .icon-tile,
#layer #n-fal .icon-tile,
#layer #n-watchlist .icon-tile,
#layer #n-photos .icon-tile,
#layer #n-stickies .note-thumb,
#layer #n-notebook .nb-thumb,
#layer #n-cases .folder,
#layer #n-resume .thumb {
  width:186px !important; height:186px !important; padding:0 !important; margin:0 auto !important;
  background:none !important; border:0 !important; box-shadow:none !important;
  backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
  border-radius:0 !important; overflow:visible !important;
}
#layer #n-photos .icon-tile { width:208px !important; height:208px !important; }
#layer #n-cases .folder { width:186px !important; height:186px !important; }
#layer #n-resume .thumb { width:144px !important; height:187px !important; border-radius:1px !important; overflow:hidden !important; }
#layer #n-pk01 .icon-tile::before, #layer #n-pk01 .icon-tile::after,
#layer #n-bookshelf .icon-tile::before, #layer #n-bookshelf .icon-tile::after,
#layer #n-fal .icon-tile::before, #layer #n-fal .icon-tile::after,
#layer #n-watchlist .icon-tile::before, #layer #n-watchlist .icon-tile::after,
#layer #n-photos .icon-tile::before, #layer #n-photos .icon-tile::after,
#layer #n-stickies .note-thumb::before, #layer #n-stickies .note-thumb::after,
#layer #n-notebook .nb-thumb::before, #layer #n-notebook .nb-thumb::after,
#layer #n-cases .folder::before, #layer #n-cases .folder::after,
#layer #n-resume .thumb::before, #layer #n-resume .thumb::after { content:none !important; display:none !important; }
#layer #n-pk01 .icon-tile img,
#layer #n-bookshelf .icon-tile img,
#layer #n-fal .icon-tile img,
#layer #n-watchlist .icon-tile img,
#layer #n-photos .icon-tile img,
#layer #n-stickies .note-thumb img,
#layer #n-notebook .nb-thumb img,
#layer #n-cases .folder img,
#layer #n-resume .thumb img {
  display:block !important; width:100% !important; height:100% !important; object-fit:contain !important;
  filter: drop-shadow(0 10px 18px rgba(10,20,40,0.30));
}
#layer #n-resume .thumb img { object-fit:cover !important; filter:none !important; }
#layer #n-fal .icon-tile img { filter: drop-shadow(0 0 10px rgba(255,255,255,0.50)) drop-shadow(0 10px 18px rgba(10,20,40,0.30)) !important; }

#layer .node-label, #layer .node-sub { display:none !important; }
#layer .photo-node:not(#n-resume) { display:none !important; }
#layer .photos-mobile { display:flex !important; }
/* lock always dead-centre on the folder / thumb */
#layer .cs-lock-badge { top:50% !important; left:50% !important; transform:translate(-50%,-50%) !important; }

/* --- catalog caption (index lives on every tile, desktop + touch) --- */
.node-cap {
  display:none !important;
  width:100%; grid-template-columns:1fr auto; column-gap:10px;
  border-top:1px solid rgba(255,255,255,0.42);
  padding:9px 0 14px; margin-bottom:2px;
  font-family:'JetBrains Mono','Courier New',monospace;
  color:rgba(255,255,255,0.95); text-align:left; pointer-events:none;
  text-shadow:0 1px 2px rgba(0,0,0,0.22);
}
.node-cap .cn { grid-column:1; grid-row:1; font-size:16px; letter-spacing:0.06em; }
.node-cap .cd { grid-column:1; grid-row:2; font-size:12px; margin-top:4px; color:rgba(255,255,255,0.62); letter-spacing:0.03em; }
.node-cap .cx { grid-column:2; grid-row:1 / span 2; font-style:normal; font-size:12px; color:rgba(255,255,255,0.62); }
.node:hover .node-cap { border-top-color:rgba(255,255,255,0.85); }

/* --- small label under every app icon --- */
.node[data-label]::after {
  content: attr(data-label);
  position:absolute; left:50%; top:200px; transform:translateX(-50%);
  white-space:nowrap; pointer-events:none;
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif;
  font-size:12px; font-weight:600; letter-spacing:0.01em;
  color:rgba(255,255,255,0.96); text-shadow:0 1px 3px rgba(0,0,0,0.42);
}
@media (max-width: 1024px), (pointer: coarse) {
  .node[data-label]::after { top:96px; font-size:9.5px; font-weight:500; }
}
@media (max-width: 560px) {
  .node[data-label]::after { top:72px; }
}

/* --- desktop: labels reveal on hover + soft idle float (jnpr labs feel) --- */
@media (min-width: 1025px) and (pointer: fine) {
  .node[data-label]::after {
    opacity:0;
    transform:translateX(-50%) translateY(4px);
    transition:opacity 260ms ease, transform 320ms cubic-bezier(0.22,0.61,0.36,1);
  }
  .node[data-label]:hover::after,
  .node[data-label]:focus-visible::after,
  .node[data-label].selected::after {
    opacity:1;
    transform:translateX(-50%) translateY(0);
  }
  .node[data-label] .icon-tile,
  .node[data-label] > img {
    animation: nodeFloat 7.5s ease-in-out infinite;
    will-change: transform;
  }
  .node[data-label]:nth-of-type(2n) .icon-tile,
  .node[data-label]:nth-of-type(2n) > img { animation-duration: 9s; animation-delay: -2.4s; }
  .node[data-label]:nth-of-type(3n) .icon-tile,
  .node[data-label]:nth-of-type(3n) > img { animation-duration: 8.2s; animation-delay: -4.1s; }
  .node[data-label]:nth-of-type(5n) .icon-tile,
  .node[data-label]:nth-of-type(5n) > img { animation-duration: 10.5s; animation-delay: -1.2s; }
  @keyframes nodeFloat {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50%      { transform: translate3d(0, -4.5px, 0); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .node[data-label] .icon-tile,
  .node[data-label] > img { animation: none !important; }
}

@media (max-width: 1024px), (pointer: coarse) {
  #layer #n-pk01 .icon-tile,
  #layer #n-bookshelf .icon-tile,
  #layer #n-fal .icon-tile,
  #layer #n-watchlist .icon-tile,
  #layer #n-photos .icon-tile,
  #layer #n-stickies .note-thumb,
  #layer #n-notebook .nb-thumb,
  #layer #n-cases .folder,
  #layer #n-resume .thumb {
    width:64px !important; height:64px !important; margin:0 auto !important;
    background:none !important; border:0 !important; box-shadow:none !important;
    backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
    border-radius:0 !important; padding:0 !important;
  }
  #layer #n-photos .icon-tile { width:72px !important; height:72px !important; }
  #layer #n-cases .folder { width:64px !important; height:64px !important; }
  #layer #n-resume .thumb { width:44px !important; height:57px !important; overflow:hidden !important; }
  #layer #n-resume .thumb img { display:block !important; }
  #layer { grid-template-columns:repeat(3, minmax(0, 1fr)) !important; row-gap:12px !important; column-gap:8px !important; padding-bottom:120px !important; }
  #layer .node { width:100% !important; min-height:0 !important; align-items:stretch !important; justify-content:flex-start !important; }
  .node-cap { padding:5px 0 7px; grid-template-columns:1fr auto; column-gap:4px; }
  .node-cap .cn { font-size:8.5px; letter-spacing:0.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .node-cap .cd { display:none; }
  .node-cap .cx { font-size:8px; grid-row:1; }
  #layer .cs-lock-badge { width:11px !important; height:11px !important; box-shadow:0 3px 7px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.6) !important; }
  #layer .cs-lock-badge svg { width:6px !important; height:6px !important; }
   /* match desktop catalog order: cases, stickies, shelf, resume, notebook, chess, synth, photos */
   #layer #n-cases     { order:1 !important; }
   #layer #n-stickies  { order:2 !important; }
   #layer #n-bookshelf { order:3 !important; }
   #layer #n-resume    { order:4 !important; }
   #layer #n-notebook  { order:5 !important; }
   #layer #n-fal       { order:6 !important; }
   #layer #n-pk01      { order:7 !important; }
   #layer #n-watchlist { order:7 !important; }
   #layer #n-photos    { order:8 !important; }
  #layer-wrap { padding-top:255px !important; overflow-y:auto !important; -webkit-overflow-scrolling:touch; }
}
/* mobile only: tighter icon rhythm — pull rows and columns in closer */
@media (max-width: 560px) {
  #layer {
    row-gap:12px !important;
    column-gap:2px !important;
    max-width:320px !important;
    margin:0 auto !important;
  }
  #layer .node { min-height:92px !important; }
}
@media (min-width: 561px) and (max-width: 1024px), (min-width:561px) and (pointer: coarse) {
  #layer { grid-template-columns:repeat(4, minmax(0, 1fr)) !important; column-gap:32px !important; row-gap:36px !important; }
  #layer #n-pk01 .icon-tile,
  #layer #n-bookshelf .icon-tile,
  #layer #n-watchlist .icon-tile,
  #layer #n-photos .icon-tile,
  #layer #n-fal .icon-tile,
  #layer #n-stickies .note-thumb,
  #layer #n-notebook .nb-thumb { width:96px !important; height:96px !important; }
  #layer #n-photos .icon-tile { width:108px !important; height:108px !important; }
  #layer #n-cases .folder { width:96px !important; height:96px !important; }
  #layer .cs-lock-badge { width:14px !important; height:14px !important; }
  #layer .cs-lock-badge svg { width:8px !important; height:8px !important; }
  #layer #n-resume .thumb { width:64px !important; height:83px !important; }
  .node-cap .cn { font-size:11px; }
  .node-cap .cx { font-size:10px; }
  #layer-wrap { padding-top:240px !important; padding-bottom:160px !important; }
}
/* ============ /EXPERIMENT ============ */
