/* ─────────────────────────────────────────────────────────────
   TRIP-OS 3.0 · visual language
   hairlines · frosted glass · liquid chrome · holographic foil
   monospace annotation · Japanese print graphics
   ───────────────────────────────────────────────────────────── */

:root {
  --ink: #0d0d14;
  --ink-2: rgba(13, 13, 20, .62);
  --paper: #f4f4f8;
  --line: rgba(13, 13, 20, .13);
  --line-2: rgba(13, 13, 20, .3);
  --glass: rgba(247, 248, 252, .68);
  --acid: #c6ff00;
  --hot: #ff3ea5;
  --ice: #8fd6ff;
  --violet: #7b5cff;
  --red: #ff2e5b;

  --f-display: 'Dela Gothic One', 'Zen Kaku Gothic New', sans-serif;
  --f-body: 'Zen Kaku Gothic New', 'Hiragino Sans', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-dot: 'DotGothic16', ui-monospace, monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --bar: 28px;
  --chrome: linear-gradient(180deg, #fff 0%, #c9ccd9 38%, #f7f7fc 50%, #7c8197 53%, #dfe1ea 80%, #fff 100%);
  --holo: linear-gradient(115deg, #ffd1f4, #c7f4ff 25%, #eaffc2 50%, #d9ccff 75%, #ffd1f4);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: linear-gradient(160deg, #eef0f7, #e3e0f5 50%, #e6f3fb);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; color: inherit; }
:focus-visible { outline: 1px dashed var(--hot); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── custom cursor ───────────────────────────────────────── */

body.custom-cursor, body.custom-cursor * { cursor: none; }
body.custom-cursor input, body.custom-cursor textarea, body.custom-cursor select, body.custom-cursor [contenteditable] { cursor: text; }
body.custom-cursor .st-board, body.custom-cursor .gal-stage, body.custom-cursor .wk-stage { cursor: crosshair; }
body.custom-cursor input[type=range], body.custom-cursor input[type=color] { cursor: pointer; }
.cur-ring, .cur-dot, .cur-label { position: fixed; top: 0; left: 0; z-index: 9000; pointer-events: none; mix-blend-mode: difference; }
.cur-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1px solid #fff;
  transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), opacity .2s, background .2s;
}
.cur-ring.big { width: 74px; height: 74px; margin: -37px 0 0 -37px; }
.cur-ring.grab { width: 52px; height: 52px; margin: -26px 0 0 -26px; border-style: dashed; animation: spin 6s linear infinite; }
.cur-ring.link { width: 20px; height: 20px; margin: -10px 0 0 -10px; background: #fff; }
.cur-ring.small { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.cur-ring.down { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.cur-ring.hide, .cur-dot.hide, .cur-label.hide { opacity: 0; }
.cur-dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #fff; }
.cur-label { font: 500 9.5px/1 var(--f-mono); letter-spacing: .08em; color: #fff; white-space: nowrap; }

/* ── background, grain, frame ────────────────────────────── */

#bg { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
#bg.no-gl { display: none; }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-1%, 3%); } 80% { transform: translate(3%, 1%); } }

.frame { position: fixed; inset: 0; z-index: 2; pointer-events: none; color: var(--ink); }
.crop { position: absolute; width: 16px; height: 16px; border: 0 solid currentColor; opacity: .55; }
.crop.tl { top: calc(var(--bar) + 12px); left: 12px; border-width: 1px 0 0 1px; }
.crop.tr { top: calc(var(--bar) + 12px); right: 12px; border-width: 1px 1px 0 0; }
.crop.bl { bottom: calc(var(--bar) + 12px); left: 12px; border-width: 0 0 1px 1px; }
.crop.br { bottom: calc(var(--bar) + 12px); right: 12px; border-width: 0 1px 1px 0; }
.edge { position: absolute; top: 50%; font: 400 9.5px var(--f-mono); letter-spacing: .32em; opacity: .55; white-space: nowrap; writing-mode: vertical-rl; }
.edge.left { left: 14px; transform: translateY(-50%) rotate(180deg); }
.edge.right { right: 14px; transform: translateY(-50%); }
.edge.right span + span { margin-top: 28px; }
body[data-palette='night'] .frame, body[data-palette='dusk'] .frame,
body[data-palette='night'] .hero, body[data-palette='dusk'] .hero,
body[data-palette='night'] .hint, body[data-palette='dusk'] .hint { color: #eef0ff; }

/* ── hero ────────────────────────────────────────────────── */

.hero {
  position: fixed; left: 0; right: 0; z-index: 3; pointer-events: none; text-align: center;
  top: calc(24vh + clamp(70px, 13.5vw, 210px) * 1.02);
}
.hero-jp { display: inline-flex; align-items: center; gap: 14px; font: 500 11px var(--f-mono); letter-spacing: .42em; text-transform: uppercase; }
.hero-jp i { width: 48px; height: 1px; background: currentColor; opacity: .5; }
.hero-tag { margin: 10px 0 0; font: italic 400 clamp(20px, 2.5vw, 38px)/1.1 var(--f-serif); min-height: 1.2em; }

.hint {
  position: fixed; left: 40px; bottom: calc(var(--bar) + 14px); z-index: 3; margin: 0; pointer-events: none;
  font: 500 10px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; opacity: .6;
}

/* ── desktop ─────────────────────────────────────────────── */

#desktop { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
#chrome { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.thing { position: absolute; top: 0; left: 0; pointer-events: auto; touch-action: none; will-change: transform; }
.thing.held { z-index: 50 !important; }
#desktop.tidying .thing { transition: transform .9s var(--spring); }

.letter { z-index: 2; font-family: var(--f-display); line-height: 1; padding: 0 .02em; color: transparent; }
body.no-chrome .letter {
  background: var(--chrome); -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 1px rgba(13, 13, 20, .5); filter: drop-shadow(0 8px 12px rgba(20, 10, 60, .35));
}

.deco { color: var(--ink); filter: drop-shadow(0 6px 12px rgba(20, 10, 60, .12)); transition: filter .3s; }
.deco svg { width: 100%; height: auto; display: block; overflow: visible; }
.deco:hover { filter: drop-shadow(0 12px 20px rgba(20, 10, 60, .25)); }
.deco .spin-slow { animation: spin 40s linear infinite; }
.deco .spin-cd { animation: spin 7s linear infinite; }
.deco .holo { animation: holo 5s linear infinite; }
@keyframes holo { to { filter: hue-rotate(360deg); } }
/* nobody's touched the page for a while → stop the decorative loops (js/perf.js) */
body.idle *:not(.screensaver, .screensaver *), body.idle *::before, body.idle *::after { animation-play-state: paused !important; }
body[data-palette='night'] .deco.ink, body[data-palette='dusk'] .deco.ink { color: #eef0ff; }

/* app cards */
.card { z-index: 3; width: 232px; padding: 0; border: 0; background: none; text-align: left; perspective: 800px; }
.card.mini { width: 132px; }
.card-in {
  position: relative; display: block; padding: 10px 10px 11px; border-radius: 14px; overflow: hidden;
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 0 0 1px var(--line), 0 24px 50px -24px rgba(30, 20, 80, .45), inset 0 1px 0 #fff;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: box-shadow .3s, scale .4s var(--spring);
}
.card-in::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .85), transparent 45%), var(--holo);
  mix-blend-mode: soft-light;
}
.card:hover .card-in { scale: 1.035; box-shadow: 0 0 0 1px var(--line-2), 0 34px 60px -24px rgba(30, 20, 80, .55), inset 0 1px 0 #fff; }
.card:hover .card-in::after { opacity: 1; }
.card.held .card-in { scale: 1.06; }
.card.press .card-in { animation: press .5s var(--spring); }
@keyframes press { 30% { scale: .94; } }
.card-top { display: flex; align-items: center; gap: 8px; font: 500 10px var(--f-mono); letter-spacing: .12em; margin-bottom: 8px; }
.card-top b { font-weight: 700; padding: 1px 5px; background: var(--ink); color: #fff; border-radius: 3px; }
.card-en { flex: 1; }
.card-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 1px var(--ink); animation: blink 1.6s steps(2) infinite; }
.card-tag { font: 700 9px var(--f-mono); padding: 2px 6px; border-radius: 99px; background: var(--hot); color: #fff; letter-spacing: .1em; }
.card-viz { display: block; width: 100%; height: 86px; border-radius: 8px; background: rgba(255, 255, 255, .55); box-shadow: inset 0 0 0 1px var(--line); }
.card-bot { display: flex; align-items: baseline; gap: 8px; margin-top: 9px; }
.card-jp { font: 400 20px/1 var(--f-display); }
.card-sub { font: 400 9.5px var(--f-mono); letter-spacing: .04em; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.mini .card-jp { font-size: 14px; }

/* ── windows ─────────────────────────────────────────────── */

#windows { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.win {
  position: absolute; top: 0; left: 0; pointer-events: auto; user-select: text;
  background: var(--glass); -webkit-backdrop-filter: blur(26px) saturate(1.7); backdrop-filter: blur(26px) saturate(1.7);
  border: 1px solid rgba(255, 255, 255, .85); border-radius: 16px;
  box-shadow: 0 0 0 1px var(--line), 0 50px 100px -40px rgba(25, 15, 70, .55), inset 0 1px 0 #fff;
  rotate: var(--skew, 0deg); transition: rotate .25s;
  animation: win-in .62s var(--ease) both;
}
.win::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 40%; z-index: 5; pointer-events: none; border-radius: 16px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .7) 48%, rgba(198, 255, 0, .35) 50%, transparent);
  animation: scan .62s var(--ease) both;
}
@keyframes win-in {
  0% { clip-path: inset(48% 0 48% 0 round 16px); filter: blur(4px) brightness(1.8); scale: 1.03 .9; }
  55% { clip-path: inset(0 0 0 0 round 16px); filter: none; }
  100% { clip-path: inset(0 0 0 0 round 16px); scale: 1; }
}
@keyframes scan { from { transform: translateY(-40%); opacity: 1; } to { transform: translateY(260%); opacity: 0; } }
.win.dragging { transition: none; }
.win.melting { animation: win-out .55s var(--ease) forwards; pointer-events: none; }
@keyframes win-out {
  0% { clip-path: inset(0 round 16px); }
  50% { clip-path: inset(49.5% 0 49.5% 0 round 16px); filter: brightness(2.5); }
  100% { clip-path: inset(49.5% 50% 49.5% 50% round 16px); filter: brightness(4); opacity: 0; scale: 1.1 1; }
}
.win.boing { animation: boing .45s var(--spring); }
@keyframes boing { 30% { scale: 1.02 .98; } 60% { scale: .99 1.01; } }
.win.wiggle { animation: wiggle .5s; }
@keyframes wiggle { 20%, 60% { rotate: -1.2deg; } 40%, 80% { rotate: 1.2deg; } }

.win-bar {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px 0 12px;
  border-bottom: 1px solid var(--line); touch-action: none; user-select: none;
  font: 500 10.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
}
.win-no { padding: 2px 6px; border-radius: 3px; background: var(--ink); color: #fff; font-weight: 700; }
.win.focused .win-no { background: var(--acid); color: var(--ink); }
.win-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-title b { margin-left: 10px; font: 400 13px var(--f-display); letter-spacing: 0; }
.win-meta { color: var(--ink-2); font-size: 9.5px; }
.win-btn { position: relative; width: 16px; height: 16px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .6); transition: background .2s, scale .25s var(--spring); }
.win-btn:hover { scale: 1.2; background: var(--acid); }
.win-btn.close:hover { background: var(--hot); }
.win-btn i::before, .win-btn i::after { content: ''; position: absolute; left: 4px; right: 4px; top: 7px; height: 1px; background: var(--ink); }
.win-btn.close i::before { rotate: 45deg; }
.win-btn.close i::after { rotate: -45deg; }
.win-btn.roll i::after { display: none; }
.win.rolled .win-bar { border-bottom: 0; }
.win.rolled .win-body { display: none; }
.win-body { position: relative; padding: 18px; max-height: calc(100dvh - 130px); overflow: auto; border-radius: 0 0 16px 16px; }
.win.big .win-body { padding: 0; overflow: hidden; }
.win-body::-webkit-scrollbar { width: 8px; }
.win-body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }

.alert .win-body { padding: 16px; }
.alert-row { display: flex; gap: 14px; align-items: center; }
.alert-row p { margin: 0; font-size: 13px; line-height: 1.6; }
.alert-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--acid); font: 400 18px var(--f-display); }
.alert-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ── controls ────────────────────────────────────────────── */

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; text-decoration: none; color: var(--ink);
  font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--line-2);
  transition: background .2s, color .2s, translate .1s;
}
.pill:hover { background: var(--ink); color: #fff; }
.pill:active { translate: 0 1px; }
.pill.solid { background: var(--ink); color: #fff; }
.pill.solid:hover { background: var(--acid); color: var(--ink); }
.pill.acid { background: var(--acid); border-color: var(--ink); }
.pill.acid:hover { background: var(--ink); color: var(--acid); }
.pill.ghost { background: transparent; }
.pill:disabled { opacity: .35; pointer-events: none; }
.chip { font: 500 10px var(--f-mono); letter-spacing: .06em; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .6); transition: background .15s; }
.chip:hover { background: #fff; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── status bar + ticker ─────────────────────────────────── */

#statusbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--bar); z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; padding: 0 14px;
  font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #e8e9f2;
  background: rgba(13, 13, 20, .78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.sb-left, .sb-right { display: flex; align-items: center; gap: 12px; }
.sb-mode { color: var(--acid); }
.antenna { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.antenna i { width: 3px; background: rgba(255, 255, 255, .25); }
.antenna i.on { background: #fff; }
.meter { display: inline-flex; gap: 2px; align-items: center; }
.meter i { width: 3px; height: 9px; background: rgba(255, 255, 255, .15); }
.meter i.on { background: var(--acid); }
.meter i.on:nth-child(n + 10) { background: var(--hot); }
.sb-pill { font: inherit; background: transparent; border: 1px solid rgba(255, 255, 255, .25); border-radius: 99px; padding: 2px 10px; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.sb-pill:hover { border-color: var(--acid); color: var(--acid); }
.sb-pill.np.on { background: var(--acid); color: var(--ink); border-color: var(--acid); }

#ticker {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--bar); z-index: 1000; overflow: hidden;
  display: flex; align-items: center; background: var(--ink); color: #e8e9f2;
  font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
}
#ticker .track { display: inline-flex; white-space: nowrap; animation: marquee 120s linear infinite; }
#ticker span { padding: 0 22px; }
#ticker b { color: var(--acid); }
#ticker:hover .track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── fx: glyphs, toasts, menu ────────────────────────────── */

#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2000; }
.glyph {
  position: fixed; z-index: 1900; pointer-events: none; translate: -50% -50%;
  font: 400 64px/1 var(--f-display); color: transparent !important;
  background: var(--chrome); -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: .6px rgba(13, 13, 20, .6);
  filter: drop-shadow(0 6px 10px rgba(30, 20, 80, .35));
  animation: glyph 2.4s var(--ease) forwards;
}
.glyph::after { content: attr(data-k); position: absolute; left: 50%; top: 100%; translate: -50% 4px; font: 500 9px var(--f-mono); letter-spacing: .2em; color: var(--ink); -webkit-text-stroke: 0; }
@keyframes glyph {
  0% { scale: .2; opacity: 0; }
  12% { scale: 1.15; opacity: 1; }
  100% { transform: translate(var(--drift), -240px) rotate(var(--spin)); scale: .7; opacity: 0; }
}

#toasts { position: fixed; top: calc(var(--bar) + 14px); left: 50%; translate: -50% 0; z-index: 2100; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 99px;
  font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #fff;
  background: rgba(13, 13, 20, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: toast-in .5s var(--spring); transition: opacity .5s, translate .5s;
}
.toast::before { content: ''; width: 6px; height: 6px; background: var(--acid); animation: blink .8s steps(2) infinite; }
.toast.out { opacity: 0; translate: 0 -10px; }
@keyframes toast-in { from { scale: .6; opacity: 0; filter: blur(6px); } }

.ctx {
  position: fixed; z-index: 3000; list-style: none; margin: 0; padding: 6px; min-width: 270px; counter-reset: c;
  background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .85); border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -20px rgba(25, 15, 70, .5);
  animation: toast-in .3s var(--ease); transform-origin: top left;
}
.ctx li { counter-increment: c; display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: 7px; }
.ctx li::before { content: counter(c, decimal-leading-zero); font: 500 9.5px var(--f-mono); color: var(--ink-2); }
.ctx li b { font-weight: 700; font-size: 13px; }
.ctx li span { margin-left: auto; font: 400 9.5px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.ctx li:hover, .ctx li:focus { background: var(--ink); color: #fff; outline: none; }
.ctx li:hover::before, .ctx li:hover span { color: var(--acid); }

/* ── resident character ─────────────────────────────────── */

.alien { position: fixed; top: 0; left: 0; z-index: 6; pointer-events: none; will-change: transform; }
.alien-shadow { position: fixed; top: 0; left: 0; z-index: 5; width: 120px; height: 16px; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(20, 10, 50, .5), transparent); }
.alien-zz { position: fixed; top: 0; left: 0; z-index: 7; pointer-events: none; font: 500 13px var(--f-mono); color: var(--ink); opacity: 0; transition: opacity .4s; }
.alien-zz.on { opacity: 1; animation: zz 2s infinite; }
@keyframes zz { 50% { translate: 4px -6px; opacity: .5; } }
.pet-bubble {
  position: fixed; z-index: 8; translate: -50% -100%; pointer-events: none; max-width: 240px; text-align: center;
  padding: 7px 13px; border-radius: 12px; font: 500 12.5px/1.45 var(--f-body);
  background: rgba(255, 255, 255, .92); border: 1px solid var(--ink); box-shadow: 0 10px 30px -10px rgba(25, 15, 70, .4);
  opacity: 0; scale: .5; transform-origin: 50% 100%; transition: opacity .2s, scale .4s var(--spring);
}
.pet-bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; background: #fff; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
.pet-bubble.show { opacity: 1; scale: 1; }

/* ── screensaver ─────────────────────────────────────────── */

.screensaver { position: fixed; inset: 0; z-index: 4000; background: #050508; opacity: 0; pointer-events: none; transition: opacity 1.2s; }
.screensaver.on { opacity: 1; pointer-events: auto; }
.ss-logo { position: absolute; top: 0; left: 0; text-align: center; }
.ss-logo b {
  display: block; font: 400 110px/1 var(--f-display);
  background: linear-gradient(180deg, #fff, hsl(calc(var(--h, 300) * 1deg) 90% 75%) 45%, #fff 52%, hsl(calc(var(--h, 300) * 1deg + 60deg) 80% 45%) 56%, #fff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px hsl(calc(var(--h, 300) * 1deg) 100% 60% / .6));
}
.ss-logo span { font: 500 10px var(--f-mono); color: #fff; letter-spacing: .4em; opacity: .6; }
.ss-count { position: absolute; right: 20px; bottom: 20px; font: 500 10px var(--f-mono); letter-spacing: .14em; color: #6b6a80; }
.screensaver.corner { animation: corner 1s; }
@keyframes corner { 0%, 40%, 80% { background: var(--hot); } 20%, 60% { background: var(--acid); } }

/* ── boot ────────────────────────────────────────────────── */

#boot { position: fixed; inset: 0; z-index: 5000; background: #050508; color: #d8dbe8; font-family: var(--f-mono); display: grid; place-items: center; }
#boot::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
.boot-inner { width: min(620px, 88vw); }
.boot-logo b {
  position: relative; display: block; font: 400 clamp(80px, 16vw, 150px)/1 var(--f-display);
  background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.boot-logo b::before, .boot-logo b::after { content: attr(data-t); position: absolute; inset: 0; mix-blend-mode: screen; animation: glitch 2.4s steps(1) infinite; }
.boot-logo b::before { -webkit-text-fill-color: var(--hot); translate: -3px 0; opacity: .7; }
.boot-logo b::after { -webkit-text-fill-color: var(--ice); translate: 3px 0; opacity: .7; animation-delay: -1.2s; }
@keyframes glitch { 0%, 88%, 100% { clip-path: inset(0 0 100% 0); } 90% { clip-path: inset(20% 0 55% 0); } 93% { clip-path: inset(60% 0 10% 0); } 96% { clip-path: inset(40% 0 40% 0); } }
.boot-logo span { display: block; margin-top: 10px; font-size: 10px; letter-spacing: .36em; color: var(--acid); }
.boot-log { margin: 30px 0 18px; min-height: 9em; font-size: 11.5px; line-height: 1.85; letter-spacing: .06em; }
.boot-bar { position: relative; height: 1px; background: rgba(255, 255, 255, .15); }
.boot-bar i { position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--acid); transition: width .3s var(--ease); box-shadow: 0 0 12px var(--acid); }
.boot-bar span { position: absolute; right: 0; top: 8px; font-size: 10px; }
.boot-press { margin-top: 36px; font-size: 12px; letter-spacing: .3em; color: #fff; animation: blink 1.1s steps(2) infinite; }
.boot-press em { font-style: normal; margin-left: 12px; letter-spacing: .1em; color: var(--acid); }
.boot-press small { margin-left: 12px; opacity: .5; }
@keyframes blink { 50% { opacity: .25; } }
#boot.gone { animation: crt-off .9s ease-in forwards; pointer-events: none; }
@keyframes crt-off {
  0% { transform: scale(1, 1); }
  45% { transform: scale(1, .004); filter: brightness(5); }
  100% { transform: scale(0, .004); filter: brightness(10); opacity: 0; }
}

/* ── super trip ──────────────────────────────────────────── */

body.super-trip #desktop, body.super-trip #windows { animation: holo 2.6s linear infinite; }
body.super-trip .thing { animation: float 2s ease-in-out infinite alternate; }
body.super-trip .thing:nth-child(odd) { animation-delay: -1s; }
@keyframes float { to { translate: 0 -16px; rotate: 6deg; } }
@keyframes spin { to { rotate: 360deg; } }

/* ═══════════ apps ═══════════════════════════════════════ */

/* 音 SOUND — translucent MD walkman */
.md-side { min-width: 0; }
.md-top { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: center; }
.md-disc { position: relative; padding: 10px; border-radius: 20px; background: linear-gradient(160deg, rgba(255, 255, 255, .7), rgba(200, 210, 240, .35)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 0 0 1px var(--line); }
.md-disc svg { width: 160px; height: 160px; display: block; animation: spin 2.2s linear infinite paused; filter: drop-shadow(0 8px 12px rgba(20, 10, 60, .25)); }
.md.playing .md-disc svg { animation-play-state: running; }
.lcd {
  --lcd-ink: #10204d;
  background: linear-gradient(180deg, #b9d3ff, #d6e5ff); color: var(--lcd-ink); font-family: var(--f-dot);
  border-radius: 10px; padding: 9px 11px; box-shadow: inset 0 2px 10px rgba(16, 32, 77, .3), 0 0 0 1px rgba(16, 32, 77, .35);
}
.lcd-top { display: flex; justify-content: space-between; font-size: 12px; }
.lcd-marquee { overflow: hidden; white-space: nowrap; font-size: 19px; margin: 4px 0; }
.lcd-marquee span { display: inline-block; animation: marquee 16s linear infinite; }
.lcd-viz { width: 100%; height: 56px; display: block; }
.md-controls { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.md-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(13, 13, 20, .25); font-size: 14px;
  background: conic-gradient(from 0deg, #f4f5f9, #c9ccd8, #f4f5f9, #b8bcc9, #f4f5f9);
  box-shadow: 0 6px 14px -6px rgba(20, 10, 60, .45), inset 0 1px 0 #fff; transition: scale .15s;
}
.md-btn:active { scale: .92; }
.md-btn.play { width: 54px; height: 54px; background: var(--acid); border-color: var(--ink); }
.knob-wrap { margin-left: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; font: 500 9.5px var(--f-mono); letter-spacing: .3em; }
.knob {
  position: relative; width: 56px; height: 56px; border-radius: 50%; touch-action: none; rotate: var(--a, 0deg);
  background: conic-gradient(from 20deg, #fff, #b6bac8, #fff, #8e93a5, #fff, #c5c9d6, #fff);
  box-shadow: 0 0 0 1px rgba(13, 13, 20, .3), 0 8px 18px -6px rgba(20, 10, 60, .5), inset 0 0 0 6px rgba(255, 255, 255, .35);
}
.knob i { position: absolute; top: 6px; left: 50%; width: 2px; height: 14px; background: var(--hot); translate: -50% 0; }
.md-tracks { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--line); }
.md-tracks button {
  width: 100%; display: grid; grid-template-columns: 28px auto 1fr auto; gap: 12px; align-items: baseline;
  text-align: left; padding: 9px 6px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 13px; transition: background .2s, padding .3s var(--ease);
}
.md-tracks button:hover { background: rgba(255, 255, 255, .6); padding-left: 12px; }
.md-tracks li.on button { background: var(--ink); color: #fff; padding-left: 12px; }
.md-tracks b { font: 500 10px var(--f-mono); }
.md-tracks span { font-weight: 700; }
.md-tracks em { font: italic 16px var(--f-serif); opacity: .75; }
.md-tracks small { font: 500 9px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 99px; padding: 1px 7px; opacity: .7; }
.md-note { font: italic 15px var(--f-serif); opacity: .7; margin: 12px 0 0; }

/* 映 VISION — silver CRT */
.tv-case {
  display: grid; grid-template-columns: 1fr 88px; gap: 14px; padding: 16px; border-radius: 24px;
  background: linear-gradient(180deg, #f6f7fb, #cfd2de 48%, #eceef4 52%, #c4c7d4);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(0, 0, 0, .1), 0 0 0 1px rgba(13, 13, 20, .2), 0 20px 40px -20px rgba(20, 10, 60, .4);
}
.tv-screen { position: relative; aspect-ratio: 4 / 3; border-radius: 30px / 24px; overflow: hidden; background: #000; box-shadow: 0 0 0 6px #1c1c24, 0 0 0 7px rgba(255, 255, 255, .6); }
.tv-screen canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; filter: saturate(1.25) contrast(1.08) blur(.35px); transition: transform .35s ease-in, opacity .35s, filter .35s; }
.tv-screen.off canvas { transform: scale(1, .004); filter: brightness(4); opacity: 0; }
.tv-screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px); animation: flicker .12s infinite; }
@keyframes flicker { 50% { opacity: .85; } }
.tv-glass { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 28% 18%, rgba(255, 255, 255, .25), transparent 38%), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55)); }
.tv-osd { position: absolute; top: 12px; right: 16px; font-family: var(--f-dot); color: #4dff6a; text-shadow: 0 0 6px #4dff6a; text-align: right; opacity: 0; transition: opacity .3s; }
.tv-osd.show { opacity: 1; }
.tv-osd b { display: block; font-size: 26px; font-weight: 400; }
.tv-osd span { font-size: 13px; }
.tv-panel { display: flex; flex-direction: column; gap: 8px; }
.tv-brand { font: 700 9px var(--f-mono); letter-spacing: .14em; text-align: center; padding: 4px 0 6px; border-bottom: 1px solid var(--line-2); }
.tv-btn { font: 500 10px var(--f-mono); letter-spacing: .08em; border: 1px solid rgba(13, 13, 20, .25); border-radius: 8px; padding: 9px 4px; background: linear-gradient(180deg, #fff, #dcdee7); box-shadow: 0 2px 0 rgba(13, 13, 20, .2); }
.tv-btn:active { translate: 0 1px; box-shadow: none; }
.tv-btn.power { background: var(--red); color: #fff; font-size: 15px; }
.tv-guide { margin-top: 14px; display: grid; border-top: 1px solid var(--line); }
.tv-guide button { text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 8px 4px; font-size: 13px; font-weight: 700; transition: padding .3s var(--ease), background .2s; }
.tv-guide button:hover { padding-left: 10px; background: rgba(255, 255, 255, .6); }
.tv-guide button b { font: 500 10px var(--f-mono); margin-right: 10px; }
.tv-guide button em { font: italic 400 15px var(--f-serif); opacity: .65; margin-left: 6px; }
.tv-guide button.on { background: var(--ink); color: #fff; padding-left: 10px; }

/* 我 SPEC SHEET */
.spec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.spec-head h2 { margin: 0; font: 400 54px/0.9 var(--f-display); }
.spec-head p { margin: 0; text-align: right; font: 500 10px/1.6 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.spec-fig { position: relative; margin: 16px 0; height: 320px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 20px 20px, rgba(255, 255, 255, .5); }
.spec-fig img { position: absolute; left: 50%; top: 22px; height: 284px; translate: -50% 0; }
.spec-fig .callout { position: absolute; font: 500 9.5px var(--f-mono); letter-spacing: .06em; white-space: nowrap; background: rgba(255, 255, 255, .8); padding: 2px 6px 2px 2px; border-radius: 99px; }
.spec-fig .callout i { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; background: var(--ink); color: #fff; font-style: normal; font-size: 9px; }
.spec-fig svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.spec-fig .cap { position: absolute; left: 10px; top: 8px; font: 700 9.5px var(--f-mono); letter-spacing: .14em; }
.spec-bio { font-size: 14px; line-height: 1.8; margin: 0 0 14px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table th { width: 38%; text-align: left; vertical-align: top; padding: 9px 0; font: 500 10px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.spec-table th small { display: block; font-family: var(--f-body); letter-spacing: 0; text-transform: none; color: var(--ink-2); margin-top: 2px; }
.spec-table td { padding: 9px 0; border-bottom: 1px solid var(--line); line-height: 1.6; }
.spec-tags i { display: inline-block; font-style: normal; font: 500 10px var(--f-mono); padding: 2px 8px; margin: 2px 4px 2px 0; border: 1px solid var(--line-2); border-radius: 99px; background: rgba(255, 255, 255, .6); }
.spec-links a { font: 500 10.5px var(--f-mono); letter-spacing: .1em; color: var(--ink); margin-right: 14px; text-decoration: none; border-bottom: 1px solid var(--hot); }
.spec-links a:hover { background: var(--acid); }
.spec-serial { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; font: 500 10px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.spec-serial b { font: 400 20px var(--f-dot); letter-spacing: .1em; padding: 2px 10px; background: var(--ink); color: var(--acid); border-radius: 4px; }

/* ゴミ箱 */
.trash-note { font: 500 10px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.files { list-style: none; padding: 0; margin: 0 0 14px; border-top: 1px solid var(--line); }
.files button { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; font-size: 13px; transition: padding .3s var(--ease), background .2s; }
.files button:hover { background: rgba(255, 255, 255, .7); padding-left: 12px; }
.ficon { font: 500 8.5px var(--f-mono); font-style: normal; text-transform: uppercase; height: 38px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-2); border-radius: 4px 12px 4px 4px; }
.files small { font: 400 10px var(--f-mono); color: var(--ink-2); }

.noscript { position: fixed; inset: 0; display: grid; place-items: center; font-family: var(--f-mono); background: #050508; color: var(--acid); margin: 0; z-index: 9999; }

/* ── small screens ───────────────────────────────────────── */

@media (max-width: 700px) {
  .hero { top: calc(16vh + clamp(70px, 22vw, 210px) * 1.02); }
  .hero-jp { font-size: 9px; letter-spacing: .3em; }
  .hint, .edge { display: none; }
  .card { width: 168px; }
  .card.mini { width: 104px; }
  .card-viz { height: 58px; }
  .card-sub { display: none; }
  .sb-mode, #sb-batt, .meter { display: none; }
  .md-top { grid-template-columns: 1fr; justify-items: center; }
  .md-disc svg { width: 120px; height: 120px; }
  .md-side { width: 100%; }
  .tv-case { grid-template-columns: 1fr; padding: 12px; }
  .tv-panel { flex-direction: row; }
  .tv-panel > * { flex: 1; }
  .md-tracks em { display: none; }
  .spec-head h2 { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  #ticker .track, .lcd-marquee span, .deco svg, .grain, .boot-logo b::before, .boot-logo b::after, .tv-screen::after { animation: none !important; }
  .win, .toast { animation-duration: .01s; }
}
.alien-fx { position: fixed; top: 0; left: 0; z-index: 8; pointer-events: none; }
.md-seek { width: 100%; margin: 6px 0 0; accent-color: var(--lcd-ink); height: 14px; }

/* ═══ 創 STUDIO ═══════════════════════════════════════════ */
.win-body.studio {
  display: grid; grid-template-columns: 236px minmax(0, 1fr) 292px; grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: 'top top top' 'left stage right'; user-select: none;
}
.st-top { grid-area: top; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.st-seg { display: flex; gap: 4px; flex-wrap: wrap; }
.st-seg.end { margin-left: auto; }
.st-seg .fmt { display: grid; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255,255,255,.6); text-align: left; line-height: 1.1; }
.st-seg .fmt b { font: 700 13px var(--f-mono); }
.st-seg .fmt small { font: 500 8.5px var(--f-mono); letter-spacing: .08em; color: var(--ink-2); }
.st-seg .fmt.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.st-seg .fmt.on small { color: var(--acid); }
.st-seg .tpl { font: 500 10px var(--f-mono); letter-spacing: .08em; padding: 8px 11px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255,255,255,.6); }
.st-seg .tpl:hover { background: #fff; }
.st-seg .tpl.on { background: var(--ink); color: var(--acid); }
.st-seg .tpl.remix { background: var(--holo); border-color: var(--ink); font-weight: 700; }
.st-seg .tpl.remix:hover { animation: holo 6s linear infinite; } /* only while hovered: a looping gradient repaints every frame */
.st-left, .st-right { overflow: auto; padding: 12px; min-height: 0; }
.st-left { grid-area: left; border-right: 1px solid var(--line); }
.st-right { grid-area: right; border-left: 1px solid var(--line); }
.st-left h4, .st-right h4, .st-group h4 { margin: 14px 0 7px; font: 700 9.5px var(--f-mono); letter-spacing: .14em; color: var(--ink-2); }
.st-left h4:first-child { margin-top: 0; }
.st-adds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-adds .add { display: grid; justify-items: center; gap: 3px; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,.65); font: 500 9.5px var(--f-mono); letter-spacing: .08em; transition: background .15s, translate .15s; }
.st-adds .add b { font: 400 18px var(--f-display); }
.st-adds .add:hover { background: var(--ink); color: #fff; translate: 0 -1px; }
.st-cam { margin-top: 8px; display: grid; gap: 6px; }
.st-cam video { width: 100%; border-radius: 10px; transform: scaleX(-1); background: #000; }
.st-poses { display: flex; flex-wrap: wrap; gap: 4px; }
.st-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.st-thumbs .thumb { position: relative; padding: 0; border: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 5; background: #ddd; transition: scale .2s var(--spring), box-shadow .2s; }
.st-thumbs .thumb canvas, .st-thumbs .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-thumbs .thumb i { position: absolute; left: 3px; top: 3px; font: 700 7px var(--f-mono); font-style: normal; background: var(--ink); color: #fff; padding: 1px 3px; border-radius: 2px; }
.st-thumbs .thumb:hover { scale: 1.06; box-shadow: 0 0 0 2px var(--hot); z-index: 1; }
.st-minehead { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.st-src { display: flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.st-src button { border: 0; background: transparent; font: 600 8.5px var(--f-mono); letter-spacing: .06em; padding: 3px 7px; color: var(--ink-2); }
.st-src button.on { background: var(--ink); color: var(--acid); }
.st-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-thumbs .thumb .del { position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: rgba(13,13,20,.75); color: #fff; font: 600 11px/1 var(--f-mono); opacity: 0; transition: opacity .15s; }
.st-thumbs .thumb:hover .del { opacity: 1; }
.st-minedrop { width: 100%; padding: 14px 10px; border: 1.5px dashed var(--line-2); border-radius: 10px; background: rgba(255,255,255,.45); font: 500 10px/1.5 var(--f-mono); color: var(--ink-2); text-align: center; }
.st-minedrop b { font: 400 16px var(--f-display); color: var(--ink); }
.st-minedrop small { font-size: 8.5px; opacity: .8; }
.st-minedrop:hover { border-color: var(--hot); background: #fff; }
.st-fxthumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.st-fxthumbs .fxt { display: grid; gap: 2px; padding: 3px 3px 4px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.6); font: 500 7.5px var(--f-mono); letter-spacing: .04em; color: var(--ink-2); transition: box-shadow .15s, translate .15s; }
.st-fxthumbs .fxt canvas { width: 100%; aspect-ratio: 3 / 2; display: block; border-radius: 5px; }
.st-fxthumbs.light .fxt canvas { background: radial-gradient(circle at 50% 40%, #2a1b5c, #0b0820); }
.st-fxthumbs .fxt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-fxthumbs .fxt:hover { box-shadow: 0 0 0 1px var(--ink); translate: 0 -1px; background: #fff; }
.st-stickers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.st-stickers .stk { padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.6); color: var(--ink); aspect-ratio: 1; display: grid; place-items: center; }
.st-stickers .stk svg { width: 100%; height: 100%; }
.st-stickers .stk:hover { background: #fff; box-shadow: 0 0 0 1px var(--ink); }
.st-stage {
  grid-area: stage; position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden;
  background: repeating-conic-gradient(rgba(13,13,20,.04) 0 25%, transparent 0 50%) 0 0 / 22px 22px, rgba(220,222,232,.5);
}
.st-board { display: block; box-shadow: 0 0 0 1px rgba(13,13,20,.2), 0 30px 60px -20px rgba(20,10,60,.45); touch-action: none; }
.st-drop { position: absolute; inset: 12px; display: grid; place-items: center; border: 2px dashed var(--hot); border-radius: 14px; font: 700 12px var(--f-mono); letter-spacing: .2em; color: var(--hot); background: rgba(255,255,255,.6); opacity: 0; pointer-events: none; transition: opacity .2s; }
.st-stage.over .st-drop { opacity: 1; }
.st-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.st-head b { font: 700 10px var(--f-mono); letter-spacing: .12em; background: var(--ink); color: var(--acid); padding: 2px 6px; border-radius: 3px; }
.st-head span { flex: 1; font: 500 11px var(--f-mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-head .x { border: 0; background: none; font-size: 18px; line-height: 1; }
.st-group { margin-top: 4px; }
.st-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.st-row .chip { padding: 4px 8px; }
.st-group textarea, .st-group input[type=text], .st-group select { width: 100%; font: 500 13px var(--f-body); padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; resize: vertical; }
.st-group select { font: 500 11px var(--f-mono); margin-top: 6px; }
.st-slider { display: grid; grid-template-columns: 92px 1fr 34px; gap: 8px; align-items: center; margin: 4px 0; font: 500 9px var(--f-mono); letter-spacing: .08em; }
.st-slider input { width: 100%; accent-color: var(--ink); }
.st-slider b { font-weight: 500; text-align: right; color: var(--ink-2); }
.st-sw { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.st-sw .sw { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); padding: 0; }
.st-sw .sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }
.st-sw .sw.chrome { background: var(--chrome); }
.st-sw .sw.holo { background: var(--holo); }
.st-sw input[type=color], .st-row input[type=color] { width: 28px; height: 24px; padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: none; }
.ink { width: 30px; height: 22px; border-radius: 5px; border: 1px solid var(--line-2); padding: 0; }
.ink.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }
.st-pals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 6px; }
.pal { height: 20px; border-radius: 5px; border: 1px solid var(--line-2); padding: 0; }
.pal.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }
.st-layers { margin-top: 10px; border-top: 1px solid var(--line); }
.ly { display: grid; grid-template-columns: 22px 1fr 22px; gap: 6px; align-items: center; padding: 6px 6px; border-radius: 7px; font: 500 11px var(--f-mono); }
.ly:hover { background: rgba(255,255,255,.7); }
.ly.on { background: var(--ink); color: #fff; }
.ly i { font-style: normal; text-align: center; opacity: .7; }
.ly span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ly .eye { border: 0; background: none; color: inherit; font-size: 11px; }
.st-empty { font: 500 10px/1.6 var(--f-mono); color: var(--ink-2); }
.st-rec { position: absolute; left: 50%; top: 64px; translate: -50% 0; z-index: 6; min-width: 260px; padding: 10px 16px 14px; border-radius: 12px; background: rgba(13,13,20,.88); color: #fff; font: 500 11px var(--f-mono); letter-spacing: .08em; overflow: hidden; }
.st-rec b { color: #ff2e5b; margin-right: 8px; animation: blink .8s steps(2) infinite; }
.st-rec i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--acid); }
@media (max-width: 900px) {
  .win-body.studio { grid-template-columns: 1fr; grid-template-rows: auto 52vh auto auto; grid-template-areas: 'top' 'stage' 'right' 'left'; overflow: auto; }
  .st-left, .st-right { border: 0; border-top: 1px solid var(--line); overflow: visible; }
  .st-seg.end { margin-left: 0; }
}

/* ═══ 写 ARCHIVE ══════════════════════════════════════════ */
.gal { position: relative; background: #0b0a12; color: #eef0ff; }
.gal-stage { position: absolute; inset: 0; touch-action: none; overflow: hidden; background: radial-gradient(80% 60% at 50% 45%, #1d1838, #0b0a12 70%); }
.gal-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gal-hud { position: absolute; inset: 0; pointer-events: none; }
.gal-hud button { pointer-events: auto; }
.gal-tl { position: absolute; left: 22px; top: 18px; display: flex; gap: 18px; align-items: center; }
.gal-count { font: 500 11px var(--f-mono); letter-spacing: .14em; color: rgba(238,240,255,.6); }
.gal-count b { font: 400 30px var(--f-display); color: #fff; letter-spacing: 0; margin-right: 6px; }
.gal-filter { display: flex; gap: 4px; }
.gal-filter .chip { background: rgba(255,255,255,.06); color: #eef0ff; border-color: rgba(255,255,255,.2); }
.gal-filter .chip.on { background: var(--acid); color: var(--ink); border-color: var(--acid); }
.gal-bl { position: absolute; left: 22px; bottom: 54px; max-width: 60%; }
.gal-title { margin: 0; font: 400 clamp(28px, 4vw, 60px)/1 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-meta { display: flex; gap: 14px; margin-top: 10px; font: 500 10.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(238,240,255,.65); }
.gal-meta span:first-child { font-family: var(--f-body); letter-spacing: .05em; text-transform: none; color: var(--acid); }
.gal-btns { position: absolute; right: 22px; bottom: 54px; display: flex; gap: 6px; }
.gal-btns .pill { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.gal-btns .pill:hover { background: #fff; color: var(--ink); }
.gal-btns .pill.solid { background: #fff; color: var(--ink); }
.gal-ticks { position: absolute; left: 22px; right: 22px; bottom: 22px; display: flex; gap: 3px; }
.gal-ticks .tick { flex: 1; height: 12px; padding: 0; border: 0; background: none; position: relative; }
.gal-ticks .tick::after { content: ''; position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: rgba(255,255,255,.25); transition: height .3s, top .3s, background .3s; }
.gal-ticks .tick.on::after, .gal-ticks .tick:hover::after { top: 3px; height: 5px; background: var(--acid); }
.gal-detail, .gal-index { position: absolute; inset: 0; z-index: 3; background: rgba(8,7,14,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: win-in .5s var(--ease); }
.gal-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; padding: 28px; }
.gal-frame { display: grid; place-items: center; min-height: 0; }
.gal-media { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 40px 80px -30px #000; animation: develop 1.6s var(--ease); }
@keyframes develop { from { clip-path: inset(0 0 100% 0); filter: brightness(2) blur(8px); } }
.gal-info { align-self: center; }
.gal-no { font: 500 10px var(--f-mono); letter-spacing: .16em; color: var(--acid); }
.gal-info h3 { margin: 10px 0 6px; font: 400 40px/1.02 var(--f-display); }
.gal-info .jp { margin: 0 0 18px; font-size: 15px; opacity: .7; }
.gal-info dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; margin: 0 0 16px; font: 500 11px var(--f-mono); letter-spacing: .06em; }
.gal-info dt { color: rgba(238,240,255,.5); }
.gal-info .txt { font-size: 14px; line-height: 1.8; opacity: .85; }
.gal-dbtn { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.gal-dbtn .pill { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.gal-dbtn .pill.acid { background: var(--acid); color: var(--ink); }
.gal-dbtn .pill.solid { background: #fff; color: var(--ink); }
.gal-index { overflow: auto; padding: 22px 28px; }
.gal-ihead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font: 700 11px var(--f-mono); letter-spacing: .16em; }
.gal-index ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.15); }
.gal-index li { display: grid; grid-template-columns: 50px 1fr auto auto; gap: 20px; align-items: baseline; padding: 12px 6px; border-bottom: 1px solid rgba(255,255,255,.15); transition: padding .35s var(--ease), background .2s, color .2s; }
.gal-index li:hover { padding-left: 22px; background: var(--acid); color: var(--ink); }
.gal-index li b { font: 500 11px var(--f-mono); }
.gal-index li .t { font: 400 clamp(22px, 3vw, 40px)/1 var(--f-display); }
.gal-index li .j { font-size: 14px; opacity: .7; }
.gal-index li .m { font: 500 10px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
.gal-float { position: absolute; left: 0; top: 0; width: 240px; height: auto; pointer-events: none; border-radius: 6px; opacity: 0; transition: opacity .25s; box-shadow: 0 30px 60px -20px #000; }
.gal-float.on { opacity: 1; }
.gal-nogl { position: absolute; inset: 0; display: grid; place-items: center; font: 500 11px var(--f-mono); }
@media (max-width: 800px) { .gal-detail { grid-template-columns: 1fr; overflow: auto; } .gal-bl { max-width: 90%; bottom: 96px; } .gal-btns { left: 22px; right: auto; } .gal-index li { grid-template-columns: 34px 1fr; } .gal-index li .j, .gal-index li .m { display: none; } }

/* ═══ 作 WORKS ════════════════════════════════════════════ */
.wk { position: relative; background: #07060d; color: #eef0ff; }
.wk-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; background: radial-gradient(70% 70% at 50% 50%, #17132c, #07060d 75%); }
.wk-gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.wk-list { position: absolute; left: 20px; top: 20px; margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; max-height: calc(100% - 80px); overflow: auto; }
.wk-list li { display: flex; gap: 10px; align-items: baseline; padding: 5px 10px; border-radius: 6px; font: 500 11px var(--f-mono); letter-spacing: .06em; color: rgba(238,240,255,.55); transition: color .2s, padding .3s var(--ease), background .2s; }
.wk-list li:hover { color: #fff; padding-left: 16px; }
.wk-list li.on { background: rgba(255,255,255,.1); color: var(--acid); padding-left: 16px; }
.wk-list b { font-weight: 700; }
.wk-card { position: absolute; right: 20px; bottom: 20px; width: min(360px, calc(100% - 40px)); padding: 18px; border-radius: 14px; background: rgba(12,10,22,.72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 0 0 1px rgba(255,255,255,.12), inset 0 2px 0 var(--c, var(--acid)); }
.wk-no { display: flex; justify-content: space-between; font: 500 10px var(--f-mono); letter-spacing: .14em; color: var(--c, var(--acid)); }
.wk-card h3 { margin: 8px 0 4px; font: 400 30px/1.05 var(--f-display); }
.wk-card .jp { margin: 0 0 10px; opacity: .7; font-size: 14px; }
.wk-card .txt { font-size: 13.5px; line-height: 1.75; opacity: .85; margin: 0 0 10px; }
.wk-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.wk-tags i { font: 500 10px var(--f-mono); font-style: normal; padding: 2px 8px; border-radius: 99px; border: 1px solid rgba(255,255,255,.25); }
.wk-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.wk-btns .pill { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.wk-btns .pill.acid { background: var(--acid); color: var(--ink); }
.wk-hint { position: absolute; left: 20px; bottom: 20px; font: 500 9.5px var(--f-mono); letter-spacing: .14em; color: rgba(238,240,255,.45); }
@media (max-width: 800px) { .wk-list { display: none; } .wk-hint { display: none; } }

/* ═══════════════════════════════════════════════════════════
   PAGE LAYOUT v4 — hero world + editorial sections
   ═══════════════════════════════════════════════════════════ */
:root { --mp: 58px; --out: #2a0f5c; }
#page { position: fixed; inset: 0; z-index: 3; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; overscroll-behavior: contain; padding-bottom: var(--mp); }
#page::-webkit-scrollbar { width: 0; }

/* status bar with section nav */
#statusbar { gap: 16px; }
.sb-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.sb-nav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.sb-nav a { display: flex; gap: 6px; align-items: baseline; padding: 3px 10px; border-radius: 99px; color: rgba(232,233,242,.7); text-decoration: none; transition: background .2s, color .2s; }
.sb-nav a b { font-weight: 700; color: rgba(232,233,242,.45); }
.sb-nav a:hover { color: #fff; }
.sb-nav a.on { background: var(--acid); color: var(--ink); }
.sb-nav a.on b { color: var(--ink); }
.sb-right { display: flex; gap: 12px; align-items: center; }

/* hero */
section.hero { position: relative; top: auto; left: auto; right: auto; height: 100vh; min-height: 560px; text-align: left; pointer-events: auto; overflow: hidden; color: var(--out); touch-action: pan-y; }
.world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.world.far { filter: blur(.6px) saturate(1.05); }
.world.near { filter: blur(3px); z-index: 2; }
.hero-copy { position: absolute; left: 44px; top: 64px; z-index: 3; pointer-events: none; max-width: 520px; }
.hero-copy .kicker { display: inline-block; font: 500 10px var(--f-mono); letter-spacing: .24em; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.75); color: var(--ink); }
.hero-copy h1 { margin: 10px 0 0; display: flex; align-items: baseline; gap: 14px; font: 400 clamp(46px, 6vw, 86px)/1 var(--f-display); color: #fff; -webkit-text-stroke: 2px var(--out); paint-order: stroke fill; text-shadow: 0 6px 0 var(--out); }
.hero-copy h1 em { font: 700 clamp(14px, 1.4vw, 18px) var(--f-mono); letter-spacing: .3em; font-style: normal; -webkit-text-stroke: 0; text-shadow: none; color: var(--out); }
.hero-copy .hero-tag { margin: 12px 0 0; min-height: 1.3em; font: italic 400 clamp(20px, 2.2vw, 30px)/1.15 var(--f-serif); color: var(--out); }
.hero-scroll { position: absolute; right: 44px; bottom: calc(var(--mp) + 30px); z-index: 3; display: grid; justify-items: center; gap: 8px; font: 700 10px var(--f-mono); letter-spacing: .3em; color: var(--out); text-decoration: none; }
.hero-scroll i { width: 1px; height: 54px; background: var(--out); position: relative; overflow: hidden; }
.hero-scroll i::after { content: ''; position: absolute; left: -2px; width: 5px; height: 14px; background: var(--hot); animation: drip 1.6s var(--ease) infinite; }
@keyframes drip { from { top: -14px; } to { top: 54px; } }
.hero .crop { opacity: .7; color: var(--out); z-index: 3; }
body[data-palette='night'] .hero-copy .hero-tag, body[data-palette='night'] .hero-copy h1 em, body[data-palette='night'] .hero-scroll, body[data-palette='dusk'] .hero-copy .hero-tag, body[data-palette='dusk'] .hero-copy h1 em, body[data-palette='dusk'] .hero-scroll { color: #fff; }

/* sections */
.sec { position: relative; padding: 110px 44px 90px; background: rgba(250,248,255,.86); -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4); border-top: 1px solid rgba(255,255,255,.9); }
.sec.dark { background: #0b0a12; color: #eef0ff; border-top-color: rgba(255,255,255,.08); }
.sec-head { position: relative; display: grid; grid-template-columns: auto 1fr minmax(0, 420px); gap: 10px 34px; align-items: end; margin-bottom: 40px; padding-bottom: 22px; }
.sec-no { font: 400 clamp(90px, 12vw, 190px)/.78 var(--f-display); color: transparent; -webkit-text-stroke: 1.5px currentColor; opacity: .9; transform: translateY(30px); opacity: 0; transition: transform 1s var(--ease), opacity 1s; }
.sec-titles { display: flex; align-items: baseline; gap: 18px; }
.sec-titles h2 { margin: 0; font: 400 clamp(40px, 6vw, 96px)/.9 var(--f-display); min-height: .9em; }
.sec-jp { font: 400 clamp(26px, 3vw, 44px)/1 var(--f-display); color: var(--hot); }
.sec-desc { margin: 0; font: 400 14px/1.8 var(--f-body); color: inherit; opacity: 0; transform: translateY(14px); transition: opacity .9s .25s, transform .9s .25s var(--ease); }
.sec-line { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; opacity: .25; transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease); }
.sec-head.in .sec-no { transform: none; opacity: .9; }
.sec-head.in .sec-desc { opacity: .75; transform: none; }
.sec-head.in .sec-line { transform: scaleX(1); }

/* 01 sound — inline player, large */
.sound-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.sound-body > .md-top { grid-column: 1; grid-template-columns: 240px minmax(0, 1fr); padding: 22px; border-radius: 22px; background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(220,214,255,.55)); box-shadow: 0 0 0 1px var(--line), 0 40px 80px -40px rgba(42,15,92,.5); }
.sound-body .md-disc svg { width: 220px; height: 220px; }
.sound-body .lcd-marquee { font-size: 24px; }
.sound-body .lcd-viz { height: 80px; }
.sound-body > .md-tracks { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.sound-body .md-tracks button { padding: 14px 8px; font-size: 15px; }
.sound-body .md-tracks em { font-size: 19px; }
.sound-body > .md-note { grid-column: 1; }

/* 02 / 03 — full-bleed stages */
.sec-stage { position: relative; height: min(78vh, 760px); margin: 0 -44px; }
.archive-stage .gal-stage, .works-stage .wk-stage { position: absolute; inset: 0; }
.gal, .wk { position: relative; }

/* 04 studio teaser */
.studio-teaser { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.tz-frames { display: flex; gap: 22px; align-items: flex-end; justify-content: center; min-height: 460px; }
.tz-frame { position: relative; overflow: hidden; border-radius: 6px; box-shadow: 0 0 0 1px rgba(13,13,20,.15), 0 40px 70px -30px rgba(42,15,92,.55); animation: toast-in .8s var(--spring) both; }
.tz-frame:nth-child(2) { animation-delay: .1s; } .tz-frame:nth-child(3) { animation-delay: .2s; }
.tz-frame.f45 { width: 260px; aspect-ratio: 4 / 5; }
.tz-frame.f916 { width: 230px; aspect-ratio: 9 / 16; }
.tz-frame.f11 { width: 220px; aspect-ratio: 1; }
.tz-frame[data-bg='holo'] { background: radial-gradient(60% 50% at 20% 20%, #ffd1f4, transparent), radial-gradient(60% 60% at 80% 70%, #c7f4ff, transparent), #eaffc2; }
.tz-frame[data-bg='grid'] { background: linear-gradient(rgba(13,13,20,.1) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(90deg, rgba(13,13,20,.1) 1px, transparent 1px) 0 0 / 18px 18px, #f6f6f8; }
.tz-frame[data-bg='paper'] { background: #f3f0e8; }
.tz-frame[data-bg='acid'] { background: #c6ff00; }
.tz-img { position: absolute; width: 62%; height: auto; rotate: var(--r); animation: float 3s ease-in-out infinite alternate; }
.tz-img.k0 { left: 8%; top: 12%; width: 74%; }
.tz-img.k1 { right: -6%; top: 46%; width: 44%; animation-delay: -1s; filter: drop-shadow(0 0 0 #fff) drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff); }
.tz-img.k2 { left: -4%; bottom: 8%; width: 40%; animation-delay: -2s; }
.tz-img.s-arch { clip-path: inset(0 round 50% 50% 0 0); }
.tz-img.s-circle { clip-path: circle(46%); }
.tz-img.s-pill { clip-path: inset(0 round 999px); }
.tz-img.s-blob { clip-path: polygon(30% 2%, 70% 6%, 96% 34%, 90% 72%, 62% 96%, 26% 92%, 4% 64%, 6% 24%); }
.tz-img.s-torn { clip-path: polygon(0 3%, 12% 0, 25% 4%, 38% 1%, 52% 5%, 66% 0, 80% 4%, 100% 1%, 97% 20%, 100% 40%, 96% 60%, 100% 82%, 97% 100%, 80% 96%, 62% 100%, 45% 96%, 28% 100%, 10% 97%, 0 100%, 3% 78%, 0 56%, 4% 34%, 0 16%); }
.tz-img.s-star { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.tz-alien { position: absolute; right: 6%; bottom: 4%; width: 34%; rotate: var(--r); filter: drop-shadow(0 0 0 #fff) drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 3px 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(0 8px 10px rgba(20,10,60,.35)); animation: float 2.4s ease-in-out infinite alternate; }
.tz-title { position: absolute; left: 7%; bottom: 7%; font: 400 34px/1 var(--f-display); color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.tz-tape { position: absolute; left: 30%; top: 8%; width: 40%; height: 16px; background: rgba(255,209,244,.85); rotate: -6deg; }
.tz-info { position: absolute; left: 8px; top: 6px; font: 500 7px var(--f-mono); letter-spacing: .1em; mix-blend-mode: difference; color: #fff; }
.tz-label { position: absolute; right: 6px; top: 6px; z-index: 2; font: 700 8px var(--f-mono); letter-spacing: .1em; padding: 2px 6px; border-radius: 3px; background: var(--ink); color: var(--acid); }
.tz-feats { list-style: none; margin: 0 0 22px; padding: 0; border-top: 1px solid var(--line); }
.tz-feats li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tz-feats b { font: 700 10px var(--f-mono); letter-spacing: .14em; padding-top: 2px; }
.tz-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pill.big { font-size: 13px; padding: 13px 24px; }

/* 05 vision & 06 spec */
.vision-body { max-width: 760px; }
.spec-body { max-width: 760px; }

/* footer */
.foot { position: relative; padding: 70px 44px calc(var(--mp) + 40px); background: #0b0a12; color: #eef0ff; overflow: hidden; }
.foot-marquee { display: flex; white-space: nowrap; font: 400 clamp(60px, 9vw, 140px)/1 var(--f-display); color: transparent; -webkit-text-stroke: 1px rgba(238,240,255,.5); margin: 0 -44px 50px; }
.foot-marquee span { animation: marquee 40s linear infinite; padding-right: .3em; }
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.foot h4 { margin: 0 0 12px; font: 700 10px var(--f-mono); letter-spacing: .18em; color: var(--acid); }
.foot p { margin: 0 0 6px; font-size: 13px; opacity: .8; }
.foot p.big { font: 400 32px var(--f-dot); opacity: 1; }
.foot a { display: block; margin-bottom: 6px; color: #fff; font: 500 12px var(--f-mono); letter-spacing: .1em; text-decoration: none; }
.foot a:hover { color: var(--acid); }
.foot .pill { margin-top: 8px; background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.foot-copy { margin-top: 50px !important; font: 500 10px var(--f-mono) !important; letter-spacing: .12em; opacity: .5 !important; }

/* docked mini player */
.miniplayer { position: fixed; left: 12px; right: 12px; bottom: 10px; z-index: 900; height: calc(var(--mp) - 12px); display: grid; grid-template-columns: auto minmax(0, 1fr) 200px auto; gap: 16px; align-items: center; padding: 0 14px 0 8px; border-radius: 99px; background: rgba(13,13,20,.86); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); color: #eef0ff; box-shadow: 0 20px 40px -16px rgba(20,10,60,.6); font-family: var(--f-mono); }
.mp-left { display: flex; align-items: center; gap: 6px; }
.mp-disc { width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(#ffd1f4, #c7f4ff, #eaffc2, #d9ccff, #ffd1f4); box-shadow: inset 0 0 0 11px rgba(13,13,20,.35), inset 0 0 0 13px #eef0ff; animation: spin 2.4s linear infinite paused; }
.miniplayer.playing .mp-disc { animation-play-state: running; }
.mp-btn, .mp-play { border: 0; background: none; color: #eef0ff; font-size: 13px; width: 30px; height: 30px; border-radius: 50%; }
.mp-btn:hover { background: rgba(255,255,255,.12); }
.mp-play { background: var(--acid); color: var(--ink); width: 34px; height: 34px; }
.mp-mid { min-width: 0; }
.mp-meta { display: flex; gap: 12px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.mp-title { font: 700 12px var(--f-mono); letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; }
.mp-sub { font: 500 9.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(238,240,255,.5); }
.mp-bar { position: relative; height: 3px; margin-top: 7px; border-radius: 3px; background: rgba(255,255,255,.15); }
.mp-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--acid); }
.mp-viz { width: 200px; height: 34px; }
.mp-right { display: flex; align-items: center; gap: 14px; font-size: 10px; letter-spacing: .1em; }
.mp-tl { display: flex; gap: 8px; align-items: center; }
.mp-tl input { width: 90px; accent-color: var(--hot); }

/* character sits above the player, below windows */
.alien { z-index: 6; }
.pet-bubble { z-index: 8; }

@media (max-width: 900px) {
  .sb-nav a span { display: none; }
  .sec { padding: 80px 18px 60px; }
  .sec-head { grid-template-columns: 1fr; gap: 6px; }
  .sec-no { font-size: 80px; }
  .sec-stage { margin: 0 -18px; height: 72vh; }
  .sound-body { grid-template-columns: 1fr; }
  .sound-body > .md-top { grid-template-columns: 1fr; }
  .sound-body > .md-tracks { grid-column: 1; grid-row: auto; }
  .studio-teaser { grid-template-columns: 1fr; }
  .tz-frames { gap: 10px; min-height: 0; }
  .tz-frame.f45 { width: 34%; } .tz-frame.f916 { width: 30%; } .tz-frame.f11 { width: 30%; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .miniplayer { grid-template-columns: auto minmax(0, 1fr); }
  .mp-viz, .mp-right { display: none; }
  .hero-copy { left: 18px; } .hero-scroll { display: none; }
}
[hidden] { display: none !important; }
.sec-no { -webkit-text-stroke: 1.5px var(--ink); }
.sec.dark .sec-no { -webkit-text-stroke-color: #eef0ff; }
/* compact editorial heads so stages fit on screen */
.sec { padding-top: 84px; }
.sec-head { margin-bottom: 24px; padding-bottom: 16px; }
.sec-no { font-size: clamp(72px, 9vw, 140px); }
.sec-titles h2 { font-size: clamp(36px, 5vw, 76px); }
.sec-stage { height: calc(100vh - 250px); min-height: 460px; }
.gal-btns { top: 18px; bottom: auto; }
.wk-card { top: 20px; bottom: auto; }
.wk-hint { left: auto; right: 20px; bottom: 20px; text-align: right; }
.sb-brand b { white-space: nowrap; }
@media (max-width: 700px) {
  #statusbar { padding: 0 10px; gap: 8px; }
  .sb-right, .sb-brand b { display: none; }
  .sb-nav { justify-content: space-between; }
  .sb-nav a { padding: 3px 8px; }
  .mp-sub { display: none; }
  .hero-copy h1 { font-size: 44px; }
  .hero-copy .kicker { font-size: 8px; letter-spacing: .14em; }
}

/* ═══════════════════════════════════════════════════════════
   HERO v5 — CODE: the main visual is a live WebGL piece
   ═══════════════════════════════════════════════════════════ */
.code-gl, .code-hud { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.code-gl { z-index: 0; }
.code-hud { z-index: 1; }
section.hero.is-code { color: #fff; background: linear-gradient(#05040b 84%, rgba(250,248,255,.9) 99%); cursor: crosshair; }
section.hero.is-code + .sec { border-top: 0; }
.hero.is-code .hero-copy h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hero.is-code .hero-copy { top: 60px; left: 44px; max-width: 46vw; }
.hero.is-code .hero-copy .kicker { background: transparent; color: #fff; padding: 0; border-radius: 0; font: 500 10px var(--f-mono); letter-spacing: .3em; }
.hero.is-code .hero-copy .kicker::before { content: '■ '; color: var(--acid, #c6ff00); }
.hero.is-code .hero-tag { margin: 14px 0 0; max-width: 30ch; font: italic 400 clamp(22px, 2.4vw, 36px)/1.08 var(--f-serif); color: #fff; mix-blend-mode: difference; letter-spacing: -.01em; }
.hero.is-code .hero-scroll, .hero.is-code .crop { color: #fff; }
.hero.is-code .hero-scroll i { background: rgba(255,255,255,.6); }
.hero.is-code .hero-scroll i::after { background: var(--acid, #c6ff00); }

.code-ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.code-readout { position: absolute; top: 58px; right: 44px; margin: 0; font: 500 9.5px/1.65 var(--f-mono); letter-spacing: .06em; color: rgba(255,255,255,.72); text-align: right; white-space: pre; mix-blend-mode: difference; }
.code-lens { position: absolute; right: 44px; top: 50%; translate: 0 -50%; display: grid; gap: 4px; pointer-events: auto; }
.code-lens button {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 6px; min-width: 132px; padding: 7px 10px; border: 0; border-radius: 0;
  background: rgba(5,4,11,.55); color: #fff; font: 700 10px var(--f-mono); letter-spacing: .16em; text-align: left; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .15s, color .15s, box-shadow .15s, translate .2s var(--ease);
}
.code-lens button i { font-style: normal; opacity: .45; font-weight: 500; }
.code-lens button em { font: 700 11px var(--f-jp, 'Zen Kaku Gothic New'); font-style: normal; opacity: .6; }
.code-lens button:hover { translate: -4px 0; box-shadow: inset 0 0 0 1px #fff; }
.code-lens button.on { background: #c6ff00; color: #0d0d14; box-shadow: none; }
.code-lens button.on i, .code-lens button.on em { opacity: .8; }
.code-lens .code-ground { margin-top: 8px; display: block; text-align: center; min-width: 0; letter-spacing: .2em; }
.hero.light .code-lens button { background: rgba(255,255,255,.7); color: #0d0d14; box-shadow: inset 0 0 0 1px rgba(13,13,20,.2); }
.hero.light .code-lens button.on { background: #ff3ea5; color: #fff; box-shadow: none; }
section.hero.is-code.light { background: linear-gradient(#efede6 84%, rgba(250,248,255,.9) 99%); color: #0d0d14; }
.hero.is-code.light .hero-copy .kicker, .hero.is-code.light .hero-scroll, .hero.is-code.light .crop { color: #0d0d14; }
.hero.is-code.light .hero-scroll i { background: rgba(13,13,20,.5); }
.hero.is-code.light .hero-copy .kicker::before { color: #ff3ea5; }
.hero.is-code.light .hero-tag { color: #0d0d14; mix-blend-mode: normal; text-shadow: 0 0 12px #efede6, 0 0 2px #efede6; }
.hero-mode {
  position: absolute; z-index: 4; left: 44px; bottom: calc(var(--mp) + 30px); display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px;
  border: 0; border-radius: 99px; background: #fff; color: #0d0d14; font: 700 10px var(--f-mono); letter-spacing: .2em; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(13,13,20,.15), 0 12px 30px -12px rgba(0,0,0,.5); transition: background .2s, translate .2s var(--ease);
}
.hero-mode i { font-style: normal; color: #ff3ea5; }
.hero-mode em { font: 700 11px 'Zen Kaku Gothic New'; font-style: normal; opacity: .6; }
.hero-mode:hover { background: #c6ff00; translate: 0 -2px; }
.hero[data-mode='code'] .hero-mode { background: rgba(5,4,11,.6); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero[data-mode='code'] .hero-mode:hover { background: #fff; color: #0d0d14; }
@media (max-width: 700px) {
  .hero.is-code .hero-copy { inset: 84px 18px auto 16px; max-width: 62vw; }
  .hero.is-code .hero-copy .kicker { display: none; }
  .hero.is-code .hero-tag { margin: 0; }
  .code-readout { display: none; }
  .code-lens { top: 40px; bottom: auto; right: 12px; left: 12px; translate: none; display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .code-lens button { min-width: 0; grid-template-columns: auto auto; padding: 6px 9px; font-size: 9px; }
  .code-lens button em, .code-lens .code-ground { display: none; }
  .hero-mode { left: auto; right: 12px; top: 84px; bottom: auto; padding: 6px 10px; font-size: 9px; }
  .hero.is-code .hero-tag { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .code-lens button { transition: none; } }

/* ═══ 奏 JAM ═══════════════════════════════════════════════ */
.jam-head { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 14px; margin: 64px 0 16px; padding-top: 18px; border-top: 1px solid var(--line, rgba(13,13,20,.12)); }
.jam-head b { font: 400 clamp(34px, 4vw, 56px)/1 var(--f-display); }
.jam-head em { font: 900 28px 'Zen Kaku Gothic New'; font-style: normal; color: #ff3ea5; }
.jam-head span { justify-self: end; max-width: 46ch; font: 400 13px/1.7 'Zen Kaku Gothic New'; opacity: .7; }
.jam { border-radius: 22px; overflow: hidden; background: #05040b; color: #fff; box-shadow: 0 30px 80px -40px rgba(20,10,60,.7), 0 0 0 1px rgba(13,13,20,.2); }
.jam.armed { box-shadow: 0 30px 80px -40px rgba(20,10,60,.7), 0 0 0 2px #c6ff00; }
.jam-stage { position: relative; height: clamp(400px, 58vh, 620px); outline: none; cursor: crosshair; }
.jam-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.jam-ctrl { position: absolute; left: 16px; right: 16px; top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; z-index: 2; font: 700 10px var(--f-mono); letter-spacing: .12em; }
.jam-grp { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.jam-grp > i { font-style: normal; opacity: .45; padding: 0 8px; font-weight: 500; }
.jam-ctrl button { font: inherit; letter-spacing: inherit; color: #fff; background: transparent; border: 0; border-radius: 99px; padding: 6px 11px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.jam-ctrl button em { font: 700 10px 'Zen Kaku Gothic New'; font-style: normal; opacity: .55; }
.jam-ctrl button:hover { background: rgba(255,255,255,.12); }
.jam-ctrl button.on { background: #c6ff00; color: #0d0d14; }
.jam-ctrl .jam-play { background: #fff; color: #0d0d14; }
.jam-off output { min-width: 52px; text-align: center; font-weight: 500; }
.jam-arm { margin-left: auto; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.08); opacity: .7; }
.jam-arm.live { background: #c6ff00; color: #0d0d14; opacity: 1; }
.jam-keys { padding: 14px 16px 18px; display: grid; gap: 8px; background: linear-gradient(#0b0a14, #05040b); border-top: 1px solid rgba(255,255,255,.08); }
.jam-keys .row { display: flex; gap: 6px; align-items: stretch; }
.jam-keys .row > i { flex: 0 0 96px; font: 500 9px var(--f-mono); letter-spacing: .14em; opacity: .5; align-self: center; font-style: normal; }
.jam-keys .r2 { padding-left: 18px; } .jam-keys .r3 { padding-left: 36px; }
.cap { flex: 1 1 0; min-width: 0; max-width: 92px; height: 52px; display: grid; align-content: space-between; justify-items: start; padding: 6px 8px; border: 0; border-radius: 9px; color: #fff; cursor: pointer;
  background: linear-gradient(#24222f, #15131d); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -3px 0 rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06); transition: transform .06s, background .1s, box-shadow .1s; }
.cap b { font: 700 11px var(--f-mono); opacity: .8; }
.cap span { font: 700 12px 'Zen Kaku Gothic New'; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cap.drm span { font: 700 9px var(--f-mono); letter-spacing: .08em; color: #ff9ed8; }
.cap.chd span { color: #b69cff; font-size: 11px; }
.cap.space { flex: 2.4 1 0; max-width: 220px; }
.cap.space span { font: 700 9px var(--f-mono); letter-spacing: .1em; color: #c6ff00; }
.cap.on, .cap:active { transform: translateY(2px); background: linear-gradient(#c6ff00, #9fd400); color: #0d0d14; box-shadow: 0 0 24px rgba(198,255,0,.6); }
.cap.on span { color: #0d0d14 !important; }
.cap.ghost { box-shadow: 0 0 0 1px #c6ff00, 0 0 14px rgba(198,255,0,.35); }
.jam-keys.lanes { grid-template-columns: repeat(4, minmax(0, 120px)); justify-content: center; }
.cap.lane { max-width: none; height: 64px; justify-items: center; align-content: center; gap: 4px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.5), 0 0 0 1px var(--c); }
.cap.lane b { font-size: 20px; color: var(--c); opacity: 1; }
.cap.lane span { font: 500 9px var(--f-mono); letter-spacing: .12em; opacity: .7; }
.cap.lane.on { background: var(--c); }
.cap.lane.on b { color: #0d0d14; }
@media (max-width: 700px) {
  .jam-head { grid-template-columns: auto 1fr; } .jam-head span { grid-column: 1 / -1; justify-self: start; }
  .jam-stage { height: 64vh; }
  .jam-ctrl { gap: 4px; font-size: 9px; } .jam-arm { display: none; }
  .jam-keys .row > i { display: none; } .jam-keys .r2, .jam-keys .r3 { padding-left: 0; }
  .cap { height: 46px; padding: 4px 5px; } .cap b { font-size: 9px; } .cap span { font-size: 10px; }
}

/* ── MEOW SYNTH: an external app embedded as a near full-screen section (admin → 00 MODULES).
   The app scrolls its own panels (its scrollbar on the right, piano strip pinned at its bottom);
   when it reaches the end, the wheel hands back to the page. */
#meow { padding-bottom: 28px; }
#meow .sec-head { margin-bottom: 14px; }
.meow-frame { position: relative; height: calc(100dvh - 72px); min-height: 520px; margin: 0 -44px; border-top: 1px solid rgba(255,255,255,.14); border-bottom: 1px solid rgba(255,255,255,.14); overflow: hidden; background: #0d0d14; overscroll-behavior: contain; scroll-margin-top: 56px; }
.meow-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.meow-frame .meow-wait { position: absolute; inset: 0; display: grid; place-items: center; font: 500 11px 'JetBrains Mono', monospace; letter-spacing: .2em; color: rgba(255,255,255,.4); }
.meow-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
@media (max-width: 720px) { .meow-frame { margin: 0 -18px; height: calc(100dvh - 60px); } }
/* while MEOW SYNTH is on screen, nothing of the site covers it (its piano strip lives at the bottom) */
body[data-section="meow"] .miniplayer,
body[data-section="meow"] .alien, body[data-section="meow"] .alien-fx, body[data-section="meow"] .alien-shadow, body[data-section="meow"] .pet-bubble,
body[data-section="meow"] .cur-ring, body[data-section="meow"] .cur-dot, body[data-section="meow"] .cur-label { opacity: 0 !important; pointer-events: none !important; transition: opacity .3s; }
.meow-frame iframe { cursor: auto; }

/* ── admin EDITOR: the site inside the editor (?edit) ── */
.editing .sec { position: relative; outline: 1px dashed transparent; outline-offset: -6px; transition: outline-color .2s; }
.editing .sec:hover { outline-color: rgba(198,255,0,.55); }
.editing .sec.sel { outline: 2px solid #c6ff00; }
.editing .edit-tag { position: absolute; top: 10px; right: 10px; z-index: 5; font: 700 10px 'JetBrains Mono', monospace; letter-spacing: .12em; padding: 4px 8px; border-radius: 99px; background: #c6ff00; color: #0d0d14; opacity: 0; pointer-events: none; transition: opacity .2s; }
.editing .sec:hover .edit-tag, .editing .sec.sel .edit-tag { opacity: 1; }
.editing .editable { cursor: text; border-radius: 4px; outline: 1px dashed transparent; outline-offset: 4px; }
.editing .editable:hover { outline-color: rgba(198,255,0,.7); }
.editing .editable:focus { outline: 2px solid #ff3ea5; background: rgba(255,62,165,.06); }

/* ── responsive pass (phones / tablets) ── */
/* entrance animations must finish even when the page is idle (idle pauses loops) */
body.idle .tz-frame { animation-play-state: running !important; }
@media (max-width: 900px) {
  /* nav keeps its names and scrolls sideways instead of collapsing to numbers */
  .sb-nav { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent); }
  .sb-nav::-webkit-scrollbar { display: none; }
  .sb-nav a { flex: none; }
  .sb-nav a span { display: inline; }
}
@media (max-width: 700px) {
  .sb-nav { justify-content: flex-start; }
  .sb-nav a { padding: 4px 9px; font-size: 10px; }
  /* hero WORLD/CODE switch: bottom-left, clear of the section labels */
  .hero-mode { left: 14px; right: auto; top: auto; bottom: 92px; }
  /* archive HUD: buttons on the first row, counter + filters below */
  .gal-btns { top: 12px; left: 14px; right: 14px; bottom: auto; flex-wrap: wrap; }
  .gal-tl { top: 56px; left: 14px; right: 14px; gap: 10px; flex-wrap: wrap; }
  .gal-count b { font-size: 22px; }
  .gal-filter { flex-wrap: wrap; }
  /* studio teaser: bigger samples */
  .tz-frames { min-height: 220px; align-items: center; }
  /* things that need a mouse / keyboard */
  .foot { padding-bottom: 90px; }
}
@media (hover: none) { .foot-secrets p { display: none; } }
