/* ==========================================================================
   ILLMEN OS
   ========================================================================== */

:root {
  --void: #020208;
  --night: #07040f;
  --navy: #120a2e;
  --navy-2: #1c1046;
  --violet: #5b3fc4;
  --violet-hi: #8f74ff;
  --violet-deep: #1a0c3d;
  --ice: #cfdcff;
  --ice-hi: #eef2ff;
  --pearl: #f3f7ff;
  --pink: #d39bff;
  --ink: #e8f0ff;
  --ink-dim: #9aa8d4;
  --ink-faint: #5f6a99;

  --ui: Tahoma, Verdana, "Segoe UI", "Trebuchet MS", system-ui, sans-serif;
  --pixel: "Silkscreen", "Lucida Console", Monaco, monospace;
  --gothic: "UnifrakturMaguntia", "Old English Text MT", "Times New Roman", serif;
  --mono: "Lucida Console", "Courier New", monospace;

  --tb-h: 48px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--void);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 13px;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body { position: fixed; inset: 0; overscroll-behavior: none; }

button { font: inherit; color: inherit; }
img { display: block; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--ice-hi); outline-offset: 2px; }

.noscript {
  position: fixed; inset: 0; display: grid; place-items: center;
  font-family: var(--pixel); color: var(--ice); background: var(--void);
}

/* ==========================================================================
   1. INTRO — PYRAMID
   ========================================================================== */

#intro {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at 50% 55%, #120a30 0%, #06030f 45%, #010106 100%);
  user-select: none; -webkit-user-select: none;
}
#intro.is-breaking { background: transparent; pointer-events: none; }
#intro.is-gone { display: none; }
#void { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#pyramid-hit {
  position: absolute;
  left: 50%; top: 47%;
  width: min(62vw, 46vh, 360px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 0; border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
#pyramid-hit:focus-visible { outline: 1px dashed rgba(232, 238, 255, .5); outline-offset: 6px; }

.intro-hint {
  position: absolute; left: 0; right: 0;
  bottom: calc(14vh + var(--safe-b));
  margin: 0; text-align: center;
  font-family: var(--pixel); font-size: 12px; letter-spacing: .5em;
  text-indent: .5em;
  color: var(--ice-hi);
  text-shadow: 0 0 12px rgba(200, 212, 255, .8);
  animation: hint 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes hint { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.intro-bios {
  position: absolute;
  top: calc(16px + var(--safe-t)); left: calc(18px + var(--safe-l));
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--pixel); font-size: 10px; letter-spacing: .12em;
  color: rgba(200, 212, 255, .42);
  pointer-events: none;
}
.bios-blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.intro-sound {
  position: absolute;
  right: calc(16px + var(--safe-r)); bottom: calc(16px + var(--safe-b));
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 14px;
  border: 1px solid rgba(200, 212, 255, .25); border-radius: 20px;
  background: rgba(10, 14, 50, .45);
  font-family: var(--pixel); font-size: 10px; letter-spacing: .14em;
  color: var(--ink-dim);
  cursor: pointer;
}
.intro-sound[aria-pressed="true"] { color: var(--ice-hi); border-color: rgba(232, 238, 255, .6); }

#intro.is-breaking .intro-hint,
#intro.is-breaking .intro-bios,
#intro.is-breaking .intro-sound { opacity: 0; transition: opacity .25s steps(3); }

/* speaker glyph (pure CSS) */
.snd-ico {
  position: relative; display: inline-block; width: 16px; height: 14px;
}
.snd-ico::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 9px; height: 8px;
  background: currentColor;
  clip-path: polygon(0 25%, 35% 25%, 100% 0, 100% 100%, 35% 75%, 0 75%);
}
.snd-ico::after {
  content: ""; position: absolute; left: 10px; top: 5px; width: 6px; height: 4px;
  border-top: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
[aria-pressed="true"] > .snd-ico::after {
  left: 10px; top: 2px; width: 7px; height: 10px;
  border: 2px solid currentColor; border-left: 0;
  border-radius: 0 10px 10px 0; transform: none;
}

/* ==========================================================================
   2. DESKTOP
   ========================================================================== */

#desktop {
  position: fixed; inset: 0;
  overflow: hidden;
  background: var(--night);
}
body.is-locked #desktop { visibility: hidden; }
body.is-revealing #desktop { visibility: visible; }

.wallpaper {
  position: absolute; inset: 0;
  background-color: #0b0620;
  background-size: cover;
  background-position: 50% 50%;
}
/* darken the icon column so labels stay readable */
.wallpaper::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(2,2,8,.45) 0%, rgba(2,2,8,0) 28%);
}

/* water drifting across the screen glass (js/water.js) */
#water { position: absolute; inset: 0; z-index: 9; pointer-events: none; }

/* the live orb (js/orb.js) */
#orb {
  position: absolute; z-index: 1;
  pointer-events: none;
  width: 0; height: 0;
}
#orb.orb-fallback {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,248,255,.95) 0 14%, rgba(200,215,255,.45) 26%, rgba(150,130,255,.12) 45%, transparent 62%);
}

.watermark {
  position: absolute;
  right: calc(18px + var(--safe-r));
  bottom: calc(var(--tb-h) + var(--safe-b) + 14px);
  text-align: right;
  pointer-events: none;
  color: rgba(232, 238, 255, .5);
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.wm-name { display: block; font-family: var(--gothic); font-size: 40px; line-height: 1; color: rgba(243,247,255,.55); }
.wm-sub { display: block; margin-top: 4px; font-size: 11px; letter-spacing: .02em; }

/* compression-block artifacts that flash briefly */
.artifacts { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.artifact {
  position: absolute;
  image-rendering: pixelated;
  animation: art-flash var(--d, 180ms) steps(2) forwards;
}
@keyframes art-flash {
  0% { opacity: 1; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(var(--shift, 8px)); }
  100% { opacity: 0; transform: translateX(var(--shift, 8px)); }
}

/* ---- desktop icons ---- */
#icons {
  position: absolute; z-index: 10;
  top: calc(18px + var(--safe-t)); left: calc(14px + var(--safe-l));
  display: grid;
  grid-auto-flow: row;
  gap: 14px;
}
.dicon {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 104px; padding: 8px 4px 6px;
  border: 1px solid transparent; border-radius: 6px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
  animation: icon-in .5s cubic-bezier(.2,1.4,.4,1) both;
  animation-delay: calc(var(--i, 0) * 90ms + 200ms);
}
body.is-locked .dicon, body.is-revealing .dicon { animation-play-state: paused; }
@keyframes icon-in { from { opacity: 0; transform: translateY(10px) scale(.8); } }
.dicon img {
  width: 64px; height: 64px; object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.55));
  pointer-events: none;
  -webkit-user-drag: none;
}
.dicon .lbl {
  max-width: 100%;
  padding: 1px 5px 2px;
  font-size: 12px; font-weight: bold; letter-spacing: .04em;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,.9);
  border-radius: 2px;
}
.dicon:hover { background: rgba(200, 212, 255, .08); border-color: rgba(200, 212, 255, .18); }
.dicon.is-selected { background: rgba(140, 100, 255, .22); border-color: rgba(190, 220, 255, .55); }
.dicon.is-selected .lbl { background: #5b3fc4; text-shadow: none; }
.dicon.is-selected img { filter: drop-shadow(0 4px 6px rgba(0,0,0,.55)) brightness(.85) sepia(.3) hue-rotate(180deg) saturate(1.6); }
/* small deliberate misalignments */
.dicon[data-app="music"] { transform: translateX(9px); }
.dicon[data-app="unreleased"] { margin-top: 18px; transform: translateX(-3px) rotate(-1.5deg); }

.lbl .corrupt { color: var(--violet-hi); }

/* ---- windows ---- */
#windows { position: absolute; inset: 0; z-index: 20; pointer-events: none; }

.win {
  --tb-a: #5b3fc4;
  --tb-b: #120a30;
  --win-bg: rgba(9, 5, 22, .84);
  --edge: rgba(205, 205, 255, .38);
  position: absolute;
  display: flex; flex-direction: column;
  min-width: 280px; min-height: 180px;
  max-width: calc(100vw - 16px);
  max-height: calc(100% - var(--tb-h) - var(--safe-b) - 16px);
  border: 1px solid var(--edge);
  border-radius: 11px 11px 6px 6px;
  background: var(--win-bg);
  box-shadow:
    0 0 0 1px rgba(0,0,0,.6),
    0 18px 50px rgba(20, 6, 60, .75),
    0 0 40px rgba(91, 63, 196, .25),
    inset 0 1px 0 rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  pointer-events: auto;
  overflow: hidden;
  transform-origin: 50% 40%;
  animation: win-open .32s cubic-bezier(.2, 1.3, .4, 1) both;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .win { --win-bg: rgba(7, 9, 30, .96); }
}
@keyframes win-open {
  0% { opacity: 0; transform: scale(.86) translateY(14px); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.win.is-closing { animation: win-close .18s steps(4) forwards; }
@keyframes win-close { to { opacity: 0; transform: scale(.94) translateY(6px); } }
.win.is-minimizing { animation: win-min .26s cubic-bezier(.6, 0, .9, .4) forwards; }
@keyframes win-min { to { opacity: 0; transform: translate(var(--mx, 0), var(--my, 300px)) scale(.15); } }
.win.is-min { display: none; }
.win.is-inactive { filter: saturate(.7) brightness(.82); }
.win.is-inactive .tb { filter: saturate(.5); }

/* glass sweep on open */
.win::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.22) 48%, transparent 60%);
  transform: translateX(-120%);
  animation: sweep .9s .12s ease-out both;
}
@keyframes sweep { to { transform: translateX(120%); } }

.win.is-max {
  left: calc(4px + var(--safe-l)) !important; top: calc(4px + var(--safe-t)) !important;
  width: calc(100% - 8px - var(--safe-l) - var(--safe-r)) !important;
  height: calc(100% - var(--tb-h) - var(--safe-b) - var(--safe-t) - 8px) !important;
  max-height: none;
}

/* title bar */
.tb {
  position: relative; flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 6px 0 10px;
  background: linear-gradient(180deg, var(--tb-a) 0%, var(--tb-b) 100%);
  border-bottom: 1px solid rgba(0,0,0,.6);
  cursor: grab;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.tb:active { cursor: grabbing; }
/* warped gloss */
.tb::before {
  content: ""; position: absolute; left: -2%; right: -2%; top: 0; height: 58%;
  border-radius: 0 0 60% 40% / 0 0 100% 70%;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.08));
  pointer-events: none;
}
.tb-ico { position: relative; width: 20px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.tb-title {
  position: relative; flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: bold; font-size: 12.5px; letter-spacing: .02em;
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
  transform: translateY(1px) skewX(-4deg);
}
.tb-btns { position: relative; display: flex; gap: 5px; flex: 0 0 auto; }
.tb-btn {
  position: relative;
  width: 24px; height: 22px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(130,100,220,.25) 50%, rgba(24,10,60,.6) 51%, rgba(140,110,255,.45));
  box-shadow: inset 0 0 3px rgba(255,255,255,.3), 0 1px 2px rgba(0,0,0,.6);
  cursor: pointer;
  touch-action: manipulation;
}
.tb-btn:hover { filter: brightness(1.25); }
.tb-btn:active { filter: brightness(.85); }
.tb-btn::before, .tb-btn::after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 2px rgba(0,0,0,.7); }
.tb-btn[data-act="min"]::before { left: 6px; right: 6px; bottom: 5px; height: 3px; }
.tb-btn[data-act="min"]::after { display: none; }
.tb-btn[data-act="max"]::before { left: 6px; right: 6px; top: 5px; bottom: 5px; background: transparent; border: 2px solid #fff; border-top-width: 3px; }
.tb-btn[data-act="max"]::after { display: none; }
.tb-btn[data-act="close"] {
  width: 30px;
  background: linear-gradient(180deg, rgba(255,220,255,.5), rgba(170,80,220,.4) 50%, rgba(60,10,90,.8) 51%, rgba(200,110,255,.6));
}
.tb-btn[data-act="close"]::before, .tb-btn[data-act="close"]::after {
  left: 50%; top: 50%; width: 13px; height: 2.5px; margin: -1.25px 0 0 -6.5px;
}
.tb-btn[data-act="close"]::before { transform: rotate(45deg); }
.tb-btn[data-act="close"]::after { transform: rotate(-45deg); }

.win-body { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.statusbar {
  flex: 0 0 auto;
  display: flex; gap: 10px; align-items: center;
  min-height: 22px; padding: 3px 10px;
  border-top: 1px solid rgba(205, 205, 255,.16);
  background: linear-gradient(180deg, rgba(26,16,60,.8), rgba(6,4,16,.9));
  font-size: 11px; color: var(--ink-dim);
  white-space: nowrap; overflow: hidden;
}
.statusbar > span { overflow: hidden; text-overflow: ellipsis; }
.statusbar .sb-fill { flex: 1 1 auto; }
.statusbar .sb-cell { padding-left: 10px; border-left: 1px solid rgba(205, 205, 255,.16); }

/* stuck pixels: a corrupted detail on some windows */
.dead-px {
  position: absolute; z-index: 6; width: 3px; height: 3px; pointer-events: none;
  background: #cfe7ff; box-shadow: 3px 0 #5b3fc4, 0 3px #0b0b1a, 3px 3px #cfe7ff;
}

/* shared buttons inside apps */
.aero-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 30px; padding: 4px 12px;
  border: 1px solid rgba(232, 238, 255,.45); border-radius: 15px;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(160,130,255,.12) 50%, rgba(20,10,50,.55) 51%, rgba(140,100,255,.3));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 3px rgba(0,0,0,.5);
  font-size: 12px; font-weight: bold; color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,.7);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
.aero-btn:hover { filter: brightness(1.18); }
.aero-btn:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.6); }
.aero-btn.is-on { border-color: var(--ice-hi); box-shadow: inset 0 0 8px rgba(200, 212, 255,.6); }

/* ==========================================================================
   APP: PHOTO ALBUM  (light aero / pearl)
   ========================================================================== */
.win[data-app="photos"] {
  --tb-a: #ebeeff; --tb-b: #6b52c9;
  --edge: rgba(240, 248, 255, .6);
  --win-bg: rgba(14, 8, 34, .84);
}
.win[data-app="photos"] .tb-title { color: #0b1240; text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.ph { display: grid; grid-template-columns: 150px 1fr; height: 100%; }
.ph-side {
  padding: 12px 10px; overflow: hidden;
  border-right: 1px solid rgba(232, 238, 255,.14);
  background: linear-gradient(180deg, rgba(232, 238, 255,.10), rgba(232, 238, 255,.02));
  font-size: 11.5px; color: var(--ink-dim);
}
.ph-side h4 { margin: 0 0 8px; font-size: 11px; color: var(--ice-hi); letter-spacing: .06em; }
.ph-tree { list-style: none; margin: 0 0 16px; padding: 0; line-height: 1.8; }
.ph-tree li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-tree .on { color: #fff; background: rgba(140,100,255,.3); padding: 0 4px; border-radius: 2px; }
.ph-tree .warn { color: var(--pink); }
.ph-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ph-tools {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(232, 238, 255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0));
}
.ph-tools .spacer { flex: 1; }
.ph-tools .count { font-size: 11px; color: var(--ink-dim); }
.ph-stage { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 18px 18px 30px; }

.ph-scatter { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 0; padding: 6px; }
.ph-card {
  position: relative;
  width: 170px; margin: -6px -10px;
  padding: 8px 8px 26px;
  border: 0; border-radius: 2px;
  background: linear-gradient(180deg, #f4f7ff, #d8e1f5);
  box-shadow: 0 10px 22px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.3);
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0px));
  transition: transform .2s cubic-bezier(.2,1.3,.4,1), box-shadow .2s;
  cursor: zoom-in;
  touch-action: manipulation;
}
.ph-card:nth-child(odd) { z-index: 1; }
.ph-card:hover, .ph-card:focus-visible { z-index: 3; transform: rotate(0deg) scale(1.06); box-shadow: 0 16px 30px rgba(0,0,0,.6), 0 0 0 2px var(--ice-hi); }
.ph-card .cap {
  position: absolute; left: 8px; right: 8px; bottom: 6px;
  font-family: var(--mono); font-size: 10.5px; color: #1a2150;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
}
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.ph-grid .ph-card { width: auto; margin: 0; --r: 0deg !important; --y: 0px !important; }

.ph-img { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: #0b1030; }
.ph-img img { width: 100%; height: 100%; object-fit: cover; }

/* placeholder art for photos with no file yet */
.ph-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background:
    radial-gradient(circle at 70% 28%, rgba(255,255,255,.85) 0 7%, rgba(232, 238, 255,.25) 8% 18%, transparent 30%),
    linear-gradient(180deg, #0a0f36 0%, #2f4c9a 55%, #a9c8f0 56%, #0a1030 100%);
  color: rgba(255,255,255,.85);
  text-align: center;
}
.ph-ph::before {
  content: ""; width: 36%; aspect-ratio: 3/4; margin-top: 18%;
  background:
    radial-gradient(ellipse 34% 26% at 50% 28%, rgba(4,4,20,.85) 98%, transparent 100%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(4,4,20,.85) 98%, transparent 100%);
}
.ph-ph span {
  position: absolute; left: 6px; top: 6px;
  padding: 2px 5px; border-radius: 2px;
  background: rgba(4,4,20,.65);
  font-family: var(--pixel); font-size: 8px; letter-spacing: .1em;
}

/* viewer */
.ph-viewer { position: absolute; inset: 0; display: flex; flex-direction: column; background: rgba(3,4,16,.94); z-index: 4; }
.ph-viewer[hidden] { display: none; }
.ph-v-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 16px 56px; }
.ph-v-frame {
  position: relative; height: 100%; max-height: 100%; aspect-ratio: 4/5; max-width: 100%;
  padding: 10px 10px 34px;
  background: linear-gradient(180deg, #f4f7ff, #d0dbf2);
  box-shadow: 0 20px 50px rgba(0,0,0,.7);
  transform: rotate(-1deg);
}
.ph-v-frame .ph-img { height: 100%; aspect-ratio: auto; }
.ph-v-frame .cap { position: absolute; left: 10px; right: 10px; bottom: 9px; font-family: var(--mono); font-size: 12px; color: #1a2150; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-v-frame .ph-img img { object-fit: contain; background: #05061a; }
.ph-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; padding: 0;
  font-size: 18px;
}
.ph-nav.prev { left: 8px; } .ph-nav.next { right: 8px; }
.ph-v-bar { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-top: 1px solid rgba(232, 238, 255,.14); flex-wrap: wrap; }
.ph-v-bar .meta { flex: 1; min-width: 0; font-family: var(--mono); font-size: 11px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   APP: MERCH  (black chrome)
   ========================================================================== */
.win[data-app="merch"] {
  --tb-a: #8e95ad; --tb-b: #0b0c16;
  --edge: rgba(220, 228, 255, .5);
  --win-bg: rgba(3, 3, 10, .9);
}
.mc { display: flex; flex-direction: column; min-height: 100%; }
.mc-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid rgba(220,228,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.07), transparent);
}
.mc-tag { font-family: var(--pixel); font-size: 10px; letter-spacing: .2em; padding: 3px 8px; border: 1px solid rgba(220,228,255,.4); border-radius: 3px; color: var(--ice-hi); }
.mc-head .mc-title { font-family: var(--gothic); font-size: 26px; line-height: 1; color: var(--pearl); }
.mc-head .spacer { flex: 1; }
.mc-head .mc-cart { font-family: var(--pixel); font-size: 10px; color: var(--ink-faint); letter-spacing: .1em; }
.mc-stage {
  position: relative;
  display: grid; place-items: center;
  min-height: 250px; padding: 24px 16px 18px;
  background:
    radial-gradient(ellipse 60% 22% at 50% 92%, rgba(200, 212, 255,.18), transparent 70%),
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(80,50,160,.35), transparent 70%),
    linear-gradient(180deg, #05050f, #000);
  overflow: hidden;
}
.mc-stage::before { /* reflective floor */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background: linear-gradient(180deg, rgba(200, 212, 255,.06), transparent);
  border-top: 1px solid rgba(200, 212, 255,.12);
}
.mc-shirt { position: relative; width: min(220px, 56%); animation: shirt-float 6s ease-in-out infinite; }
.mc-shirt svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 24px rgba(0,0,0,.8)) drop-shadow(0 0 30px rgba(91,63,196,.35)); }
@keyframes shirt-float { 50% { transform: translateY(-8px) rotate(-1deg); } }
.mc-status { position: relative; margin-top: 16px; text-align: center; }
.mc-status .big { font-family: var(--pixel); font-size: 15px; letter-spacing: .24em; color: var(--pearl); text-shadow: 0 0 14px rgba(200, 212, 255,.6); }
.mc-status .small { margin-top: 6px; font-size: 11px; color: var(--ink-dim); }
.mc-load { width: min(260px, 70vw); height: 14px; margin: 10px auto 0; padding: 2px; border: 1px solid rgba(232, 238, 255,.35); border-radius: 3px; background: #02020a; }
.mc-load i {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, #d8e2ff 0 8px, transparent 8px 10px);
  box-shadow: 0 0 8px rgba(200, 212, 255,.7);
  animation: mc-load 7s steps(14) infinite;
}
@keyframes mc-load { 0% { width: 0; } 70% { width: 99%; } 100% { width: 99%; } }
.mc-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; padding: 14px; }
.mc-slot {
  position: relative; aspect-ratio: 1 / 1.15;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1px dashed rgba(232, 238, 255,.22); border-radius: 8px;
  background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(0,0,0,.4));
  color: var(--ink-faint); font-family: var(--pixel); font-size: 9px; letter-spacing: .14em;
}
.mc-slot svg { width: 46%; opacity: .25; }
.mc-item { border-style: solid; padding: 10px; color: var(--ink); font-family: var(--ui); font-size: 12px; letter-spacing: 0; text-align: center; justify-content: flex-start; aspect-ratio: auto; }
.mc-item img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.mc-item .price { color: var(--ice); font-weight: bold; }

/* ==========================================================================
   APP: MUSIC  (public — ice glass media player)
   ========================================================================== */
.win[data-app="music"] {
  --tb-a: #c3b2ff; --tb-b: #2a1470;
  --edge: rgba(190, 225, 255, .6);
  --win-bg: rgba(10, 6, 28, .86);
  border-radius: 22px 22px 14px 14px;
}
.win[data-app="music"] .tb { border-radius: 22px 22px 0 0; }

.mp { display: grid; grid-template-columns: minmax(220px, 0.9fr) 1.1fr; min-height: 100%; }
.mp-now {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(200, 212, 255,.25), transparent 60%),
    linear-gradient(180deg, rgba(36,18,90,.5), rgba(4,6,24,.6));
  border-right: 1px solid rgba(200, 212, 255,.18);
}
.mp-art {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  background: #0a0518;
  box-shadow: 0 10px 26px rgba(0,0,0,.6), inset 0 0 0 1px rgba(232, 238, 255,.35);
}
.mp-art img { width: 100%; height: 100%; object-fit: cover; }
.mp-art::after { content: ""; position: absolute; inset: 0 0 55% 0; background: linear-gradient(180deg, rgba(255,255,255,.28), transparent); border-radius: 12px 12px 50% 50% / 12px 12px 18% 18%; pointer-events: none; }
.art-ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(232, 238, 255,.5) 0 10%, rgba(200, 212, 255,.12) 11% 30%, transparent 31%),
    conic-gradient(from 200deg at 50% 42%, #160a38, #3a1f9c, #160a38, #060820, #160a38);
}
.art-ph b { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-family: var(--pixel); font-size: 9px; letter-spacing: .18em; color: rgba(232, 238, 255,.6); font-weight: normal; }
.art-ph svg { width: 34%; opacity: .85; }
.mp-meta .t { font-size: 18px; font-weight: bold; color: #fff; text-shadow: 0 0 10px rgba(200, 212, 255,.5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-meta .a { font-size: 12px; color: var(--ice); }
.mp-prog { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--ink-dim); }
.mp-prog input { flex: 1; }
.mp-ctrls { display: flex; justify-content: center; align-items: center; gap: 10px; }
.orb {
  position: relative; width: 40px; height: 40px; padding: 0;
  border: 1px solid rgba(232, 238, 255,.6); border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.6), rgba(160,130,255,.35) 40%, rgba(30,12,80,.9) 70%);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.6);
  cursor: pointer; touch-action: manipulation;
}
.orb.big { width: 56px; height: 56px; }
.orb:disabled { opacity: .35; cursor: not-allowed; }
.orb:not(:disabled):hover { filter: brightness(1.2); }
.orb svg { position: absolute; inset: 0; margin: auto; width: 44%; height: 44%; fill: #fff; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.mp-links { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-msg { font-family: var(--pixel); font-size: 9px; letter-spacing: .12em; color: var(--pink); text-align: center; min-height: 12px; }

.mp-list { display: flex; flex-direction: column; min-width: 0; }
.mp-list-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid rgba(200, 212, 255,.14);
  font-family: var(--pixel); font-size: 10px; letter-spacing: .16em; color: var(--ice-hi);
}
.mp-list-head .n { margin-left: auto; color: var(--ink-faint); }
.trk {
  display: grid; grid-template-columns: 28px 40px 1fr auto; align-items: center; gap: 10px;
  width: 100%; padding: 8px 14px;
  border: 0; border-bottom: 1px solid rgba(200, 212, 255,.07);
  background: transparent; text-align: left;
  cursor: pointer; touch-action: manipulation;
}
.trk:hover { background: rgba(200, 212, 255,.08); }
.trk.is-current { background: linear-gradient(90deg, rgba(140,100,255,.35), rgba(140,100,255,.05)); }
.trk .no { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); text-align: right; }
.trk .th { width: 40px; height: 40px; border-radius: 6px; overflow: hidden; position: relative; background: #160a38; }
.trk .th img { width: 100%; height: 100%; object-fit: cover; }
.trk .th .art-ph b { display: none; }
.trk .nm { min-width: 0; }
.trk .nm b { display: block; font-size: 13px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trk .nm small { display: block; font-size: 11px; color: var(--ink-dim); }
.trk .st { font-family: var(--pixel); font-size: 8.5px; letter-spacing: .1em; color: var(--ink-faint); }
.trk .st.ok { color: var(--ice); }

.empty-state {
  display: grid; place-items: center; text-align: center; gap: 8px;
  padding: 40px 20px; color: var(--ink-dim);
}
.empty-state .big { font-family: var(--pixel); font-size: 13px; letter-spacing: .2em; color: var(--ice-hi); }
.empty-state .small { font-size: 11.5px; max-width: 280px; }

/* range input (progress) */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 22px; background: transparent; cursor: pointer; touch-action: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--ice) var(--p, 0%), rgba(232, 238, 255,.15) var(--p, 0%));
  box-shadow: inset 0 1px 2px rgba(0,0,0,.6);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(232, 238, 255,.15); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--ice); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #fff, #d8e2ff 60%, #5b3fc4);
  border: 1px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.6);
}
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #cfe7ff; border: 1px solid #fff; }
input[type="range"]:disabled { opacity: .4; cursor: not-allowed; }

/* ==========================================================================
   APP: UNRELEASED  (hidden — black glass, violet, sealed)
   ========================================================================== */
.win[data-app="unreleased"] {
  --tb-a: #3a2477; --tb-b: #07030f;
  --edge: rgba(160, 130, 255, .45);
  --win-bg: rgba(4, 2, 10, .93);
  border-radius: 6px 14px 6px 6px;
}
.win[data-app="unreleased"] .tb-title { color: #d8ccff; letter-spacing: .08em; }
.un { position: relative; display: flex; flex-direction: column; min-height: 100%; }
.un-stripe {
  height: 10px; flex: 0 0 auto;
  background: repeating-linear-gradient(-45deg, #2a1660 0 10px, #07030f 10px 20px);
  border-bottom: 1px solid rgba(160,130,255,.35);
}
.un-head { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.un-head img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(143,116,255,.5)); }
.un-head h3 { margin: 0; font-family: var(--pixel); font-weight: normal; font-size: 13px; letter-spacing: .2em; color: #e6deff; }
.un-head p { margin: 4px 0 0; font-size: 11px; color: #8a7fb8; }
.un-stamp {
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%) rotate(-8deg);
  padding: 4px 10px;
  border: 3px double #b49cff; border-radius: 4px;
  font-family: var(--pixel); font-size: 12px; letter-spacing: .14em; line-height: 1.25;
  color: #b49cff; text-align: center;
  opacity: .85; mix-blend-mode: screen;
}
.un-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.un-table th {
  position: sticky; top: 0; z-index: 1;
  padding: 6px 10px; text-align: left;
  font-family: var(--pixel); font-weight: normal; font-size: 9px; letter-spacing: .14em; color: #8a7fb8;
  background: #0b0618; border-bottom: 1px solid rgba(160,130,255,.25);
}
.un-row td { padding: 0; border-bottom: 1px solid rgba(160,130,255,.08); }
.un-row button {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 80px 92px 74px; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px;
  border: 0; background: transparent; text-align: left;
  font-family: var(--mono); font-size: 12px; color: #cfc4ff;
  cursor: pointer; touch-action: manipulation;
}
.un-row button:hover { background: rgba(143,116,255,.1); }
.un-row .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.un-row .redact { display: inline-block; height: 11px; width: 70%; background: #cfc4ff; opacity: .85; vertical-align: middle; }
.un-row .lock { color: #b49cff; font-family: var(--pixel); font-size: 9px; letter-spacing: .12em; }
.un-row.is-denied button { animation: deny .32s steps(6); background: rgba(180,60,255,.12); }
@keyframes deny { 0%,100% { transform: none; } 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.un-row.is-glitch .fn { visibility: hidden; }
.un-row.is-glitch .fn::after { visibility: visible; content: attr(data-alt); }
.un-row.is-playable button { color: #fff; }
.un-row.is-playable .lock { color: var(--ice); }
.un-thead-row th:nth-child(1) { width: auto; }
.un-foot { margin-top: auto; padding: 10px 16px; font-family: var(--pixel); font-size: 9px; letter-spacing: .14em; color: #6d6299; }
.un-player { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid rgba(160,130,255,.2); }
.un-player[hidden] { display: none; }
.un-player .orb { background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.5), rgba(140,100,255,.35) 40%, rgba(30,10,70,.95) 70%); }
.un-player .nm { flex: 0 1 auto; min-width: 0; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.un-player input { flex: 1; }
.un-deny-msg { min-height: 16px; padding: 0 16px 6px; font-family: var(--pixel); font-size: 9px; letter-spacing: .14em; color: var(--pink); }

/* ==========================================================================
   SYSTEM DIALOG (small)
   ========================================================================== */
.win[data-app="dialog"] { --tb-a: #6c7fb8; --tb-b: #141a44; min-height: 0; }
.dlg { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.dlg-ico { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; font-weight: bold; font-size: 20px; background: radial-gradient(circle at 40% 30%, #fff, #d8e2ff 50%, #4a2a9f); color: #0a0f36; }
.dlg p { margin: 0 0 6px; line-height: 1.45; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px 14px; }

/* ==========================================================================
   START MENU
   ========================================================================== */
#start-menu {
  position: absolute; z-index: 60;
  left: calc(4px + var(--safe-l)); bottom: calc(var(--tb-h) + var(--safe-b) + 4px);
  display: grid; grid-template-columns: 38px 1fr;
  width: 300px; max-width: calc(100vw - 8px);
  max-height: calc(100% - var(--tb-h) - var(--safe-b) - var(--safe-t) - 10px);
  overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid rgba(205, 205, 255,.5);
  border-radius: 10px 10px 4px 4px;
  overflow: hidden;
  background: rgba(6, 8, 28, .92);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(10,4,40,.8), 0 0 30px rgba(91,63,196,.3);
  animation: sm-open .2s cubic-bezier(.2,1.2,.4,1);
  transform-origin: 0 100%;
}
#start-menu[hidden] { display: none; }
@keyframes sm-open { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.sm-band {
  position: relative;
  background: linear-gradient(0deg, #f3f7ff 0%, #9fc3f5 30%, #2a3d9a 60%, #0c0620 85%, #000 100%);
  border-right: 1px solid rgba(255,255,255,.25);
}
.sm-band span {
  position: absolute; left: 50%; bottom: 14px;
  transform: translateX(-50%) rotate(-90deg); transform-origin: 50% 50%;
  white-space: nowrap;
  font-family: var(--gothic); font-size: 26px; line-height: 1; color: #0a0f36;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
  translate: 0 -60px;
}
.sm-band small { position: absolute; top: 10px; left: 0; right: 0; text-align: center; font-family: var(--pixel); font-size: 8px; color: rgba(232, 238, 255,.6); }
.sm-body { display: flex; flex-direction: column; padding: 6px; }
.sm-user { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid rgba(205, 205, 255,.16); }
.sm-user img { width: 38px; height: 38px; border-radius: 6px; object-fit: contain; }
.sm-user b { font-family: var(--gothic); font-size: 24px; font-weight: normal; }
.sm-user small { display: block; font-size: 10.5px; color: var(--ink-dim); }
.sm-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 42px; padding: 6px 8px;
  border: 0; border-radius: 5px;
  background: transparent; text-align: left;
  font-size: 13px; font-weight: bold; color: #fff;
  cursor: pointer; touch-action: manipulation;
}
.sm-item img { width: 30px; height: 30px; object-fit: contain; }
.sm-item small { display: block; font-weight: normal; font-size: 10.5px; color: var(--ink-dim); }
.sm-item:hover, .sm-item:focus-visible { background: linear-gradient(180deg, #7a5ae0, #3a1f9e); outline: none; }
.sm-item:hover small, .sm-item:focus-visible small { color: #dce8ff; }
.sm-sep { height: 1px; margin: 6px 4px; background: rgba(205, 205, 255,.16); }
.sm-foot { display: flex; gap: 6px; padding: 6px 2px 2px; }
.sm-foot .aero-btn { flex: 1; font-size: 11px; padding: 4px 8px; }
.sm-glyph { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; }

/* ==========================================================================
   TASKBAR
   ========================================================================== */
#taskbar {
  position: absolute; z-index: 50;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tb-h) + var(--safe-b));
  padding: 0 calc(6px + var(--safe-r)) var(--safe-b) var(--safe-l);
  display: flex; align-items: center; gap: 6px;
  background:
    linear-gradient(180deg, rgba(175,150,255,.35) 0, rgba(30,16,70,.85) 2px, rgba(10,6,26,.92) 50%, rgba(2,2,12,.96) 51%, rgba(14,8,34,.95) 100%);
  border-top: 1px solid rgba(205, 205, 255,.45);
  box-shadow: 0 -6px 24px rgba(10,4,40,.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
#start-btn {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  height: 100%; padding: 0 16px 0 4px;
  border: 0;
  background: radial-gradient(ellipse 80% 120% at 30% 100%, rgba(143,116,255,.45), transparent 70%);
  cursor: pointer; touch-action: manipulation;
  flex: 0 0 auto;
}
#start-btn::after { content: ""; position: absolute; right: 0; top: 8px; bottom: 8px; width: 1px; background: rgba(205, 205, 255,.25); }
#start-btn:hover .start-orb, #start-btn[aria-expanded="true"] .start-orb { filter: brightness(1.3) drop-shadow(0 0 8px rgba(200, 212, 255,.8)); }
.start-orb { width: 40px; height: 40px; margin-top: -10px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.7)); transition: filter .15s; }
.start-label { font-family: var(--gothic); font-size: 22px; line-height: 1; color: var(--pearl); text-shadow: 0 0 10px rgba(200, 212, 255,.5); }

#tasks { flex: 1 1 auto; min-width: 0; display: flex; gap: 4px; overflow: hidden; }
.task {
  display: flex; align-items: center; gap: 6px;
  flex: 0 1 170px; min-width: 40px; height: 34px; padding: 0 10px 0 6px;
  border: 1px solid rgba(205, 205, 255,.25); border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.02) 50%, rgba(0,0,0,.25) 51%, rgba(255,255,255,.04));
  font-size: 12px; color: var(--ink);
  cursor: pointer; touch-action: manipulation;
  overflow: hidden;
}
.task img { width: 20px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task.is-active { background: linear-gradient(180deg, rgba(120,90,230,.6), rgba(40,20,110,.6)); border-color: rgba(232, 238, 255,.6); box-shadow: inset 0 0 8px rgba(200, 212, 255,.35); }
.task.is-min { opacity: .65; }

#tray {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 10px;
  border: 1px solid rgba(205, 205, 255,.2); border-radius: 4px;
  background: rgba(0,0,0,.25);
  flex: 0 0 auto;
}
.tray-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-dim); cursor: pointer; border-radius: 4px; touch-action: manipulation; }
.tray-btn[aria-pressed="true"] { color: var(--ice-hi); }
.tray-btn:hover { background: rgba(255,255,255,.08); }
.tray-sig { width: 12px; height: 12px; background: conic-gradient(var(--ice) 0 50%, #2a1450 50% 100%); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
#clock { font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
#clock.is-corrupt { color: var(--violet-hi); font-family: var(--pixel); font-size: 10px; }

/* tray notice balloon */
#notice {
  position: absolute; z-index: 55;
  right: calc(10px + var(--safe-r)); bottom: calc(var(--tb-h) + var(--safe-b) + 10px);
  width: 260px; max-width: calc(100vw - 20px);
  padding: 10px 30px 10px 12px;
  border: 1px solid rgba(232, 238, 255,.5); border-radius: 8px;
  background: linear-gradient(180deg, #f3f7ff, #c9dbf7);
  color: #0a0f36;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
  animation: sm-open .3s cubic-bezier(.2,1.2,.4,1);
}
#notice[hidden] { display: none; }
#notice b { display: block; font-size: 12px; margin-bottom: 2px; }
#notice span { font-size: 11.5px; }
#notice button { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border: 0; border-radius: 4px; background: transparent; color: #0a0f36; font-weight: bold; cursor: pointer; }
#notice::after { content: ""; position: absolute; right: 40px; bottom: -8px; width: 14px; height: 14px; background: #c9dbf7; transform: rotate(45deg); border-right: 1px solid rgba(232, 238, 255,.5); border-bottom: 1px solid rgba(232, 238, 255,.5); }


/* ---- desktop icon lock (UNRELEASED) ---- */
.dicon-art { position: relative; display: inline-block; line-height: 0; }
.dicon-lock {
  position: absolute; right: -9px; bottom: -5px; width: 26px; height: 30px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.85)) drop-shadow(0 0 6px rgba(160,130,255,.6));
  pointer-events: none;
}
.dicon-lock svg { width: 100%; height: 100%; display: block; }
.dicon-tag {
  margin-top: -2px;
  padding: 1px 4px 2px;
  font-family: var(--pixel); font-size: 8px; letter-spacing: .06em; line-height: 1.2;
  color: #efe9ff; white-space: nowrap;
  background: rgba(18, 7, 46, .82);
  border: 1px solid rgba(180, 156, 255, .65); border-radius: 2px;
  box-shadow: 0 0 8px rgba(143, 116, 255, .45);
}

/* ---- MUSIC: SoundCloud embed ---- */
.mp-now > [hidden] { display: none !important; }
.mp-sc {
  position: relative; width: 100%; border-radius: 12px; overflow: hidden;
  background: #0a0518;
  box-shadow: 0 10px 26px rgba(0,0,0,.6), inset 0 0 0 1px rgba(232, 238, 255,.35);
}
.mp-sc iframe { display: block; width: 100%; height: 300px; border: 0; }

/* ---- UNRELEASED: lock screen ---- */
.un.is-locked { height: 100%; min-height: 0; overflow: hidden; }
.un.is-locked > :not(.un-lock) { filter: blur(3px) brightness(.4) saturate(.6); pointer-events: none; }
.un-lock {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 20px; text-align: center;
  background: radial-gradient(ellipse at 50% 46%, rgba(91, 63, 196, .38), rgba(4, 2, 10, .5) 62%);
}
.un-padlock {
  width: 108px; height: 126px; padding: 0; border: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 0 18px rgba(143, 116, 255, .65)) drop-shadow(0 8px 10px rgba(0,0,0,.7));
  animation: pl-bob 3.2s ease-in-out infinite;
  touch-action: manipulation;
}
.un-padlock svg { width: 100%; height: 100%; display: block; }
.un-padlock.is-shake { animation: pl-shake .45s linear; }
@keyframes pl-bob { 50% { transform: translateY(-6px); } }
@keyframes pl-shake { 0%,100% { transform: none; } 20% { transform: translateX(-8px) rotate(-6deg); } 40% { transform: translateX(7px) rotate(5deg); } 60% { transform: translateX(-5px) rotate(-3deg); } 80% { transform: translateX(3px); } }
.un-lock-t {
  font-family: var(--pixel); font-size: 22px; letter-spacing: .2em; line-height: 1.2;
  color: #f1edff;
  text-shadow: 0 0 14px rgba(180, 156, 255, .95), 0 2px 0 #2a1460;
}
.un-lock-s { font-family: var(--pixel); font-size: 9px; letter-spacing: .16em; color: #8a7fb8; }

/* ==========================================================================
   APP: 1-800-ILLMENCD  (CD waitlist — late-night infomercial on a dark aero set)
   ========================================================================== */
.win[data-app="cd"] {
  --tb-a: #b9a8ff; --tb-b: #1b0d55;
  --edge: rgba(200, 212, 255, .6);
  --win-bg: rgba(7, 4, 20, .93);
}
.cd { position: relative; display: flex; flex-direction: column; min-height: 100%; isolation: isolate; }
.cd-bg-wrap { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #05020c; }
.cd-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05); }
.cd-bg-shade {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, rgba(5,2,12,.2) 0%, rgba(5,2,12,.5) 38%, rgba(5,2,12,.78) 62%, rgba(5,2,12,.88) 100%);
}
.cd-banner { position: relative; }
.cd-snd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  padding: 5px 9px; border-radius: 6px;
  font-family: var(--pixel); font-size: 9px; letter-spacing: .1em; color: #eef2ff;
  background: rgba(10, 5, 28, .7); border: 1px solid rgba(207,220,255,.55);
  cursor: pointer; touch-action: manipulation;
}
.cd-snd:hover { background: rgba(60, 30, 140, .75); }
.cd-snd[aria-pressed="true"] { color: #ffe36b; border-color: #ffe36b; }
.cd-banner {
  display: flex; justify-content: center;
  padding: 14px 12px 12px;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 120%, rgba(143,116,255,.3), transparent 70%),
    linear-gradient(180deg, rgba(18,8,48,.85), rgba(5,2,12,.55));
  border-bottom: 1px solid rgba(200, 212, 255, .2);
}
.cd-phone {
  display: inline-block;
  padding: 6px 18px 7px;
  font-family: "Arial Black", "Arial Bold", Arial, sans-serif; font-weight: 900; font-style: italic;
  font-size: clamp(22px, 4.6vw, 38px); letter-spacing: .01em; line-height: 1;
  color: #ffe36b;
  text-shadow: 3px 3px 0 #8a1c1c, 0 0 18px rgba(255, 227, 107, .25);
  background: linear-gradient(180deg, #5873ff 0%, #2a3cc4 55%, #1b2690 100%);
  border: 2px solid #eef2ff; border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.55);
  transform: rotate(-1.5deg);
}
.cd-main { display: grid; grid-template-columns: minmax(200px, 250px) 1fr; gap: 22px; padding: 20px 20px 18px; align-items: start; }
.cd-left { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cd-jewel { position: relative; width: 82%; aspect-ratio: 1; margin-right: 18%; }
.cd-disc {
  position: absolute; top: 4%; left: 4%; width: 92%; height: 92%; border-radius: 50%;
  transform: translateX(22%);
  background:
    radial-gradient(circle, #0c0618 0 7%, #e9ecff 7.5% 9%, rgba(160,150,210,.9) 9.5% 17%, transparent 17.5%),
    conic-gradient(from 30deg, #dfe4ff, #b49cff, #f4f6ff, #9fd6ff, #e9ecff, #a483ff, #f4f6ff, #c7b6ff, #dfe4ff);
  box-shadow: 0 6px 16px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.8);
  animation: cd-spin 9s linear infinite;
}
.cd-disc i { position: absolute; inset: 0; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 3px, rgba(255,255,255,.07) 3px 4px); }
@keyframes cd-spin { to { transform: translateX(22%) rotate(360deg); } }
.cd-case {
  position: absolute; inset: 0;
  border-radius: 5px;
  background: linear-gradient(135deg, #1c0f3c, #05020c);
  border: 2px solid rgba(238, 242, 255, .85);
  box-shadow: 0 12px 26px rgba(0,0,0,.7), inset 0 0 0 1px rgba(0,0,0,.6);
  overflow: hidden;
}
.cd-hinge { position: absolute; left: 0; top: 0; bottom: 0; width: 9%; background: linear-gradient(90deg, rgba(255,255,255,.28), rgba(255,255,255,.06)); border-right: 1px solid rgba(255,255,255,.25); }
.cd-glare { position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255,255,255,.32) 0 18%, transparent 34% 62%, rgba(255,255,255,.1) 70%, transparent 80%); pointer-events: none; }
.cd-cover { position: absolute; top: 5%; bottom: 5%; left: 13%; right: 5%; overflow: hidden; background: #07030f; }
.cd-cover img { width: 100%; height: 100%; object-fit: cover; }
.cd-static {
  position: absolute; inset: -20%;
  background:
    repeating-linear-gradient(0deg, rgba(232,238,255,.06) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 30% 30%, rgba(143,116,255,.35), transparent 50%),
    radial-gradient(circle at 70% 75%, rgba(207,220,255,.18), transparent 45%),
    linear-gradient(135deg, #1a0c3d, #05020c);
  animation: cd-static 1.4s steps(4) infinite;
}
@keyframes cd-static { 25% { transform: translate(3%, -2%); } 50% { transform: translate(-2%, 3%); } 75% { transform: translate(2%, 2%); } }
.cd-unrev {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--pixel); text-align: center;
}
.cd-unrev b {
  font-weight: normal; font-size: clamp(13px, 1.6vw, 17px); letter-spacing: .16em; color: #eef2ff;
  padding: 2px 6px; background: rgba(0,0,0,.55);
  text-shadow: 2px 0 0 rgba(143,116,255,.8), -2px 0 0 rgba(159,214,255,.5);
}
.cd-caption { font-family: var(--pixel); font-size: 9px; letter-spacing: .16em; color: var(--ink-dim); text-align: center; }

.cd-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 14px; border-radius: 12px; background: rgba(5, 2, 14, .62); border: 1px solid rgba(207,220,255,.2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cd-standby { font-family: var(--pixel); font-size: 11px; letter-spacing: .18em; color: #ffe36b; text-shadow: 0 0 10px rgba(255,227,107,.35); animation: cd-blink 1.6s steps(2) infinite; }
@keyframes cd-blink { 50% { opacity: .45; } }
.cd-copy { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.cd-form { display: flex; flex-direction: column; gap: 8px; }
.cd-form[hidden], .cd-done[hidden] { display: none; }
.cd-lbl { font-family: var(--pixel); font-size: 10px; letter-spacing: .14em; color: var(--ice-hi); }
.cd-row { display: flex; gap: 8px; }
.cd-row input {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 12px;
  font: 15px var(--ui); color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(30,16,70,.55));
  border: 1px solid rgba(207, 220, 255, .55); border-radius: 8px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6);
  outline: none;
}
.cd-row input::placeholder { color: rgba(207,220,255,.45); }
.cd-row input:focus { border-color: #eef2ff; box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 0 0 3px rgba(143,116,255,.45); }
.cd-call {
  flex: 0 0 auto; height: 44px; padding: 0 16px;
  font-family: "Arial Black", Arial, sans-serif; font-weight: 900; font-style: italic; font-size: 14px; letter-spacing: .02em;
  color: #ffe36b; text-shadow: 2px 2px 0 #8a1c1c;
  background: linear-gradient(180deg, #6a83ff, #2a3cc4 55%, #1b2690);
  border: 2px solid #eef2ff; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.6);
  cursor: pointer; touch-action: manipulation;
}
.cd-call:hover { filter: brightness(1.15); }
.cd-call:active { transform: translateY(1px); }
.cd-call:disabled { opacity: .6; cursor: wait; }
.cd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cd-msg { min-height: 14px; font-family: var(--pixel); font-size: 9px; letter-spacing: .12em; color: var(--ice); }
.cd-msg.err { color: var(--pink); }
.cd-fine { margin: 0; font-size: 11px; color: var(--ink-faint); }
.cd-done { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border: 1px solid rgba(207,220,255,.35); border-radius: 10px; background: linear-gradient(180deg, rgba(91,63,196,.25), rgba(5,2,12,.4)); }
.cd-done-big { font-family: "Arial Black", Arial, sans-serif; font-style: italic; font-size: 20px; color: #ffe36b; text-shadow: 2px 2px 0 #8a1c1c; }
.cd-done p { margin: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }


/* ==========================================================================
   MOBILE / TOUCH
   ========================================================================== */
@media (max-width: 720px), (max-height: 520px) {
  :root { --tb-h: 54px; }

  #icons {
    left: calc(12px + var(--safe-l)); right: calc(12px + var(--safe-r));
    top: calc(22px + var(--safe-t));
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    gap: 22px 12px;
  }
  .dicon { width: 100%; max-width: 150px; padding: 12px 6px 10px; }
  .dicon img { width: 76px; height: 76px; }
  .dicon .lbl { font-size: 13px; }
  .dicon[data-app="music"], .dicon[data-app="unreleased"] { transform: none; margin-top: 0; }
  .dicon[data-app="unreleased"] img { transform: rotate(-2deg); }

  .watermark { left: calc(16px + var(--safe-l)); }
  .wm-name { font-size: 32px; }
  .wm-sub { font-size: 10px; }
  .wallpaper::after { background: linear-gradient(180deg, rgba(2,2,8,.5) 0%, rgba(2,2,8,0) 45%); }

  /* windows become full panels */
  .win {
    left: calc(6px + var(--safe-l)) !important;
    right: calc(6px + var(--safe-r)) !important;
    top: calc(6px + var(--safe-t)) !important;
    bottom: calc(var(--tb-h) + var(--safe-b) + 6px) !important;
    width: auto !important; height: auto !important;
    min-width: 0; max-width: none; max-height: none;
    border-radius: 14px 14px 8px 8px;
  }
  .win[data-app="dialog"] { top: auto !important; }
  .tb { height: 44px; cursor: default; padding-left: 12px; }
  .tb-btn { width: 36px; height: 32px; }
  .tb-btn[data-act="close"] { width: 40px; }
  .tb-btn[data-act="max"] { display: none; }
  .tb-title { font-size: 13px; }
  .win[data-app="music"] { border-radius: 18px 18px 10px 10px; }
  .win[data-app="music"] .tb { border-radius: 18px 18px 0 0; }

  .start-label { display: none; }
  #start-btn { padding: 0 10px 0 8px; }
  .start-orb { margin-top: -6px; }
  .task { flex-basis: 48px; padding: 0 8px; justify-content: center; }
  .task span { display: none; }
  .tray-sig { display: none; }
  #tray { padding: 0 6px; gap: 2px; }
  .tray-btn { width: 40px; height: 40px; }

  #start-menu { left: calc(6px + var(--safe-l)); right: calc(6px + var(--safe-r)); width: auto; }

  .ph { grid-template-columns: 1fr; }
  .ph-side { display: none; }
  .ph-card { width: 46%; margin: -4px -5px; }
  .ph-stage { padding: 12px 6px 24px; }
  .ph-v-stage { padding: 12px 8px 60px; }
  .ph-v-frame { height: auto; width: 100%; max-height: 100%; }
  .ph-nav { top: auto; bottom: 8px; transform: none; width: 44px; height: 44px; }
  .ph-nav.prev { left: calc(50% - 54px); } .ph-nav.next { right: calc(50% - 54px); }

  .mp { grid-template-columns: 1fr; }
  .mp-now { border-right: 0; border-bottom: 1px solid rgba(200, 212, 255,.18); }
  .mp-art { width: min(100%, 220px); margin: 0 auto; }
  .orb { width: 48px; height: 48px; }
  .orb.big { width: 62px; height: 62px; }
  .trk { padding: 10px 12px; }

  .un-head { padding-right: 16px; flex-wrap: wrap; }
  .un-stamp { position: static; transform: rotate(-4deg); margin-left: auto; font-size: 10px; }
  .un-row button { grid-template-columns: 20px minmax(0, 1fr) 70px; padding: 12px 10px; }
  .un-row .c-size, .un-row .c-date, .un-table .h-size, .un-table .h-date { display: none; }

  #notice { left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); width: auto; }
}

/* phone landscape: short screens */
@media (max-height: 520px) and (orientation: landscape) {
  #icons { grid-template-columns: repeat(4, minmax(0, 130px)); justify-content: center; top: calc(14px + var(--safe-t)); }
  .dicon img { width: 64px; height: 64px; }
  .watermark { display: none; }
  .tb { height: 38px; }
  .mp { grid-template-columns: minmax(200px, .8fr) 1.2fr; }
  .mp-now { border-bottom: 0; border-right: 1px solid rgba(200, 212, 255,.18); }
  .mp-art { width: min(100%, 140px); }
  .ph-card { width: 22%; }
  .ph-v-frame { height: 100%; width: auto; }
  #pyramid-hit { width: min(46vh, 300px); }
  .intro-hint { bottom: calc(8vh + var(--safe-b)); }
}

@media (max-width: 360px) {
  .dicon img { width: 64px; height: 64px; }
  #tray #clock { min-width: 0; font-size: 11px; }
}


/* new apps on small screens */
@media (max-width: 720px), (max-height: 520px) {
  .dicon-lock { width: 30px; height: 34px; right: -10px; }
  .dicon-tag { font-size: 8.5px; }
  .cd-main { grid-template-columns: 1fr; padding: 16px 14px; gap: 16px; }
  .cd-jewel { width: min(62%, 210px); margin-right: 14%; }
  .cd-banner { flex-wrap: wrap; align-items: center; gap: 8px; }
  .cd-snd { position: static; transform: none; }
  .cd-bg-shade { background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px), linear-gradient(180deg, rgba(5,2,12,.25) 0%, rgba(5,2,12,.5) 35%, rgba(5,2,12,.82) 70%); }
  .mp-sc iframe { height: 280px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  #icons { grid-template-columns: repeat(5, minmax(0, 120px)); }
  .cd-main { grid-template-columns: minmax(150px, 190px) 1fr; }
  .cd-jewel { width: 80%; }
  .mp-sc iframe { height: 200px; }
  .un-padlock { width: 76px; height: 90px; }
}
@media (max-width: 380px) {
  .cd-row { flex-direction: column; }
  .cd-call { width: 100%; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .artifacts { display: none; }
  .mc-load i { width: 99%; }
  .cd-disc, .cd-static, .cd-standby, .un-padlock { animation: none !important; }
}
body.reduce-fx .artifacts { display: none; }
