/* ==========================================================================
   wifi // Communication OS — styles
   palette: steel blue, cool grey, off-white, charcoal; electric blue + warning red
   ========================================================================== */
:root {
  --navy: #22253a;
  --charcoal: #1c1e2c;
  --slate: #33384e;
  --paper: #d9dbd5;
  --beige: #bdbca5;
  --eblue: #3d6bff;
  --eblue-hi: #7d9dff;
  --magenta: #ff2a6d;
  --red: #ff4f86;
  --cyan: #7fe3f0;
  --cyan-dim: rgba(127, 227, 240, .55);
  --deep: #0a1270;

  --f-pixel: "DotGothic16", "MS Gothic", "Osaka-Mono", "Courier New", monospace;
  --f-serif: "Times New Roman", Times, "Noto Serif JP", serif;
  --f-jp-serif: "Noto Serif JP", "Hiragino Mincho ProN", "MS Mincho", serif;
  --f-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-round: "M PLUS Rounded 1c", "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", sans-serif;
  --f-script: "Pinyon Script", "Snell Roundhand", "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; overflow: hidden; }
body { font-family: var(--f-sans); color: #eee; font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

#screen {
  position: fixed; inset: 0; overflow: hidden; background: #050506;
  border-radius: 1.6vmin;
  animation: flicker 6s infinite steps(1);
}

/* ---------------- scenes ---------------- */
.scene {
  position: absolute; inset: 0; overflow: hidden;
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility 0s linear .7s, filter .7s ease;
}
.scene.active { opacity: 1; visibility: visible; transition: opacity .7s ease, visibility 0s, filter .7s; }

.skip {
  position: absolute; right: 2.4vw; bottom: 2.4vh; z-index: 30;
  font: 13px var(--f-pixel); letter-spacing: .15em; color: rgba(30, 32, 44, .55);
  padding: 6px 10px;
}
.skip:hover { color: var(--red); }

/* ---------------- standby ---------------- */
#standby { background: #030304; display: grid; place-items: center; cursor: pointer; }
.standby-hint {
  position: absolute; left: 0; right: 0; top: 58%;
  text-align: center; font: 14px/1.9 var(--f-pixel); letter-spacing: .2em; color: #55586a;
  animation: blink-soft 2.4s ease-in-out infinite;
}
.standby-hint span { color: #3c3f4e; }
.standby-sound { position: absolute; bottom: 4vh; left: 0; right: 0; text-align: center; font: 11px var(--f-pixel); letter-spacing: .3em; color: #33354a; }
.power-btn { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.power-led {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff9aa8, #e8173c 55%, #6b0012);
  box-shadow: 0 0 12px 3px rgba(255, 30, 70, .55), 0 0 40px rgba(255, 30, 70, .25);
  animation: led 2.4s ease-in-out infinite;
}
.power-txt { font: 12px var(--f-sans); letter-spacing: .5em; color: #6b6e80; padding-left: .5em; }

/* ---------------- boot ---------------- */
.boot-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 50% 46%, #b9bad6 0%, #aeafc8 40%, transparent 75%),
    linear-gradient(90deg, #9fa293 0%, #a9aab8 30%, #aaaabd 70%, #a1a497 100%);
}
.chroma {
  color: #f6f3f4;
  text-shadow: -1.5px 0 0 rgba(232, 48, 82, .85), 1.5px 0 0 rgba(255, 120, 140, .7), 0 0 4px rgba(255, 70, 100, .6), 0 0 1px #fff;
  filter: blur(.35px);
}
.boot-header {
  position: absolute; left: 21.5%; top: 30%;
  font: 400 clamp(20px, 3.1vw, 44px) var(--f-sans); letter-spacing: .01em;
  opacity: 0; transition: opacity 1.2s ease;
}
.boot-credit {
  position: absolute; left: 63%; top: 62%;
  display: flex; flex-direction: column; align-items: flex-end; gap: .7em;
  font: 400 clamp(11px, 1.45vw, 19px) var(--f-sans);
  opacity: 0; transition: opacity 1.2s ease;
}
.boot-credit .jp { font-family: var(--f-pixel); }
.boot-status {
  position: absolute; left: 0; right: 0; top: 76%;
  text-align: center; font: clamp(18px, 2.7vw, 36px) var(--f-pixel); letter-spacing: .12em;
  color: #f4f4f8; text-shadow: 0 0 6px rgba(255, 255, 255, .7), 2px 2px 0 rgba(90, 90, 120, .35);
  filter: blur(.5px);
}
.boot-status .dots { display: inline-block; min-width: 2.5em; text-align: left; }
#boot.show-header .boot-header, #boot.show-credit .boot-credit { opacity: .95; }

.c-logo {
  position: absolute; left: 50%; top: 47%;
  width: min(58vmin, 560px); height: min(58vmin, 560px);
  transform: translate(-50%, -50%);
  overflow: visible;
  transition: transform 1s cubic-bezier(.6, 0, .3, 1), opacity 1s ease, filter 1s;
}
.c-logo .c-outer { fill: none; stroke: rgba(70, 72, 110, .55); stroke-width: 1.6; stroke-dasharray: 1131; stroke-dashoffset: 1131; transition: stroke-dashoffset 2.6s ease; }
.c-logo .c-seg { fill: rgba(52, 60, 110, .4); opacity: 0; transition: opacity .15s steps(1); }
.c-logo .c-solid { fill: rgba(40, 46, 90, .6); opacity: 0; transition: opacity .6s ease; }
.c-logo .c-inner { fill: none; stroke: rgba(40, 46, 90, .7); stroke-width: 16; opacity: 0; transform-origin: 200px 200px; transform: scale(.4); transition: transform .8s cubic-bezier(.2, .9, .2, 1), opacity .6s; }
.c-logo .c-os { font: 700 34px var(--f-sans); fill: rgba(60, 64, 110, .35); letter-spacing: 2px; }
.c-logo .c-tick { stroke: rgba(70, 72, 110, .45); stroke-width: 2; }
.c-logo.draw .c-outer { stroke-dashoffset: 0; }
.c-logo.resolved .c-seg { opacity: 0 !important; transition: opacity .5s; }
.c-logo.resolved .c-solid { opacity: 1; }
.c-logo.resolved .c-inner { opacity: 1; transform: scale(1); }
.c-logo.zoom { transform: translate(-50%, -50%) scale(2.2) rotate(-40deg); opacity: 0; filter: blur(6px); }

/* ---------------- logon ---------------- */
.logon-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, #cfcfc0 0%, #c3c2ab 55%, #aeac94 100%);
}
#logon { filter: blur(.25px) contrast(1.02); }
.dial {
  --d: min(108vh, 97vw);
  position: absolute; left: 50%; top: 51%;
  width: var(--d); height: var(--d);
  transform: translate(-50%, -50%);
  container-type: size;
}
.dial-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dial-wave { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dial-center { position: absolute; inset: 0; pointer-events: none; color: #1b1c24; }
.ghost-input {
  position: absolute; left: 30%; top: 44%; width: 42%; height: 9%;
  opacity: 0; border: 0; outline: 0; background: transparent; color: transparent; caret-color: transparent;
  font-size: 16px; /* prevents iOS zoom */
  cursor: text;
}

.dq, .da {
  position: absolute; left: 51.2%; transform: translate(-50%, -50%);
  white-space: nowrap; text-align: center;
  text-shadow: 0 0 1px rgba(0, 0, 0, .5);
  transition: opacity .3s;
}
.dq { top: 42.6%; font: 900 4.3cqw var(--f-jp-serif); letter-spacing: .02em; }
.da { top: 56.6%; font: 700 4.15cqw var(--f-serif); letter-spacing: .02em; }
.dq .blue {
  font-family: var(--f-round); font-weight: 800; color: var(--eblue);
  text-shadow: 0 0 .5cqw #8aa6ff, 0 0 1.4cqw rgba(61, 107, 255, .7);
}
.da.accept {
  color: var(--magenta); font-family: var(--f-round); font-weight: 800; font-size: 5cqw;
  text-shadow: 0 0 .6cqw #ff7aa2, 0 0 2cqw rgba(255, 42, 109, .8);
  animation: accept-flash .16s steps(2) 6;
}
.dentry {
  position: absolute; left: 30.4%; width: 41.6%; top: 45.3%; height: 6.4%;
  display: flex; align-items: center; justify-content: center;
}
.dentry.empty { justify-content: flex-start; padding-left: 1.4cqw; }
.dentry.hidden { visibility: hidden; }
.typed {
  font: 800 5.4cqw/1 var(--f-round); letter-spacing: .05em;
  color: #3e6cff;
  text-shadow: 0 0 .25cqw #bcd0ff, 0 0 .9cqw #5a82ff, 0 0 2cqw rgba(61, 107, 255, .65);
  filter: blur(.45px);
  white-space: pre;
}
.typed .ch { display: inline-block; animation: char-pop .22s cubic-bezier(.2, .8, .3, 1.2); }
.dcursor {
  width: 4.1cqw; height: 4.1cqw; margin-left: .5cqw;
  background: #7393e9; box-shadow: inset 0 0 0 .25cqw #6283e0, 0 0 .8cqw rgba(90, 120, 230, .5);
  animation: blink 1.05s steps(1) infinite;
}
.dentry:not(.empty) .dcursor { width: 2.4cqw; height: 4.4cqw; }
.dial.locked .dcursor { display: none; }
.drule {
  position: absolute; left: 30.4%; width: 41.6%; top: 52.1%; height: .95cqw;
  border-top: .22cqw solid #2a2b33; border-bottom: .22cqw solid #2a2b33;
}
.dhint {
  position: absolute; left: 51.2%; top: 31.5%; transform: translateX(-50%);
  font: 1.45cqw var(--f-pixel); letter-spacing: .14em; color: rgba(40, 42, 60, .6);
  white-space: nowrap; text-align: center;
}
.dhint b { color: var(--red); font-weight: 400; }
.dhint-go {
  pointer-events: auto; padding: .25cqw .8cqw;
  font: inherit; letter-spacing: inherit; color: var(--eblue);
  border-bottom: 1px dotted rgba(61, 107, 255, .6);
  text-shadow: 0 0 .6cqw rgba(90, 130, 255, .45);
  transition: color .18s, border-color .18s;
}
.dhint-go:hover { color: var(--magenta); border-bottom-color: var(--magenta); }
.dial.err .dq { color: #d8173f; animation: shake .35s; }
.dial.voice .drule { transform: scaleX(.85); transition: transform .5s; }

/* dial SVG parts */
.dial-svg .d-part { transform-box: view-box; transform-origin: 500px 500px; }
.dial-svg .d-label { font: 400 31px var(--f-sans); fill: #f2f2f5; letter-spacing: .5px; transition: transform .9s cubic-bezier(.6, 0, .25, 1); }
.dial-svg .d-label .r { fill: var(--red); }
.dial-svg .d-ray { stroke: #15161c; stroke-width: 2.2; stroke-dasharray: 2400; stroke-dashoffset: 2400; }
.dial-svg .d-block { transition: transform .9s cubic-bezier(.6, 0, .25, 1); }
.dial.voice .d-block { transform: rotate(18deg); }
.dial.voice .d-label { transform: translate(90px, -54px); }
.dial.intro .d-ray { animation: ray 1.4s cubic-bezier(.3, .7, .2, 1) forwards; }
.dial.intro .d-ring { animation: ring-in 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.dial.intro .d-outer { animation: outer-in 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.dial.intro .d-spiral { animation: spiral-in 1.3s cubic-bezier(.2, .8, .2, 1) .1s both; }
.dial.intro .d-block-wrap { animation: block-in 1s cubic-bezier(.2, .8, .2, 1) .25s both; }
.dial.intro .d-disc { animation: fade-in .8s ease both; }
.dial.intro .d-blue { animation: blue-blink .9s steps(1) .7s both; }
.dial.intro .d-dot { animation: dot-pop .3s steps(1) both; }
.dial.intro .d-thin { animation: fade-in .6s ease .6s both; }
.dial.intro .dial-center > * { animation: fade-in .5s ease .9s both; }
.dial.leave { animation: dial-leave 1s cubic-bezier(.6, 0, .4, 1) forwards; }

.hud-bl { position: absolute; left: 0; bottom: 2.5vh; width: min(30vmin, 300px); height: auto; filter: blur(.4px); }

/* ---------------- hub ---------------- */
#hub { font-family: var(--f-serif); color: var(--cyan); }
.hub-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 45% 55% at 30% 52%, rgba(40, 70, 230, .9) 0%, rgba(20, 40, 190, .6) 40%, transparent 75%),
    radial-gradient(ellipse 80% 90% at 50% 50%, #0d1aa0 0%, #08107c 45%, #050a55 75%, #02052e 100%);
}
.emblem {
  position: absolute; left: 30%; top: 52%;
  width: min(92vh, 66vw); height: min(92vh, 66vw);
  transform: translate(-50%, -50%);
  opacity: .62; filter: blur(3px);
  animation: breathe 7s ease-in-out infinite;
}
.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hub-lines .ln { filter: drop-shadow(0 0 3px rgba(140, 230, 255, .8)); opacity: .8; }
#orb { filter: blur(1px); mix-blend-mode: screen; }

.banner {
  position: absolute; left: -1vmin; top: 47vmin;
  transform-origin: 0 0; transform: rotate(-50deg);
  pointer-events: none; white-space: nowrap;
}
.banner-band {
  padding: .6vmin 3vmin .6vmin 22vmin; margin-left: -20vmin;
  background: linear-gradient(90deg, rgba(40, 150, 190, .15), rgba(50, 170, 200, .45) 40%, rgba(50, 170, 200, .35));
  font: 400 clamp(26px, 5.4vmin, 60px) var(--f-serif); color: #b6f4ff; letter-spacing: .02em;
  text-shadow: 0 0 10px rgba(120, 230, 255, .8);
  filter: blur(.4px);
}
.banner-script {
  margin: .6vmin 0 0 8vmin;
  font: 400 clamp(18px, 3.6vmin, 40px) var(--f-script); color: #a8ecff;
  text-shadow: 0 0 8px rgba(120, 230, 255, .7);
}
.hub-title {
  position: absolute; left: 63%; top: 10.5vh;
  font: italic 400 clamp(22px, 2.7vw, 40px) var(--f-serif); color: #8eeaf5;
  text-shadow: 0 0 10px rgba(110, 225, 255, .75), 0 0 2px #fff;
  letter-spacing: .01em;
  transition: opacity .25s;
}
.hub-title.swap { opacity: 0; }

.mi {
  position: absolute; left: var(--x); top: var(--y);
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  text-align: left; color: #7fe3f0;
  animation: fade-in .8s ease both;
}
.mi:nth-child(1) { animation-delay: .5s; } .mi:nth-child(2) { animation-delay: .65s; }
.mi:nth-child(3) { animation-delay: .8s; } .mi:nth-child(4) { animation-delay: .95s; }
.mi:nth-child(5) { animation-delay: 1.1s; }
.mi-dot {
  grid-row: span 2; width: 12px; height: 12px; border-radius: 50%;
  background: #9ff4ff; box-shadow: 0 0 10px 3px rgba(80, 220, 255, .7);
  opacity: .55; transition: opacity .2s, transform .2s;
}
.mi-t {
  display: inline-flex; align-items: center; gap: 10px;
  font: italic 400 clamp(20px, 2.35vw, 34px) var(--f-serif);
  text-shadow: 0 0 9px rgba(100, 220, 255, .7);
  transition: color .2s, text-shadow .2s, letter-spacing .3s;
}
.mi-jp { font: 11px var(--f-pixel); letter-spacing: .3em; color: rgba(140, 220, 255, .5); }
.mi-live {
  font: normal 10px/1 var(--f-pixel); letter-spacing: .2em; padding: 3px 6px;
  color: #ffe3ec; background: rgba(255, 42, 109, .32); border: 1px solid rgba(255, 79, 134, .85);
  text-shadow: 0 0 6px rgba(255, 79, 134, .95); box-shadow: 0 0 12px rgba(255, 42, 109, .45);
}
.mi.is-live .mi-dot {
  background: var(--magenta); opacity: 1;
  box-shadow: 0 0 12px 4px rgba(255, 42, 109, .85);
  animation: led 1.1s ease-in-out infinite;
}
.mi:hover .mi-t, .mi:focus-visible .mi-t, .mi.on .mi-t { color: #fff; text-shadow: 0 0 6px #fff, 0 0 18px rgba(100, 230, 255, 1); letter-spacing: .04em; }
.mi:hover .mi-dot, .mi:focus-visible .mi-dot, .mi.on .mi-dot { opacity: 1; transform: scale(1.3); }
.mi:focus { outline: none; }

.hub-status {
  position: absolute; right: 2vw; bottom: 2.2vh; display: flex; gap: 18px; align-items: center;
  font: 12px var(--f-pixel); letter-spacing: .12em; color: rgba(150, 220, 255, .55);
}
.hub-status button { color: rgba(150, 220, 255, .7); }
.hub-status button:hover { color: #fff; text-shadow: 0 0 6px #7fe3f0; }

/* now playing capsule */
.np {
  position: absolute; left: 2.5vw; bottom: 8.5vh;
  width: min(520px, 38vw); height: 74px;
  transform: rotate(8deg); transform-origin: 0 50%;
  display: flex; align-items: center; gap: 6px; padding: 0 34px 0 30px;
  color: #e6f4ff; font-family: var(--f-pixel);
  isolation: isolate;
  animation: fade-in 1s ease .6s both;
}
.np::before {
  content: ""; position: absolute; inset: -6px -10px; z-index: -1; border-radius: 999px;
  background: radial-gradient(ellipse 60% 70% at 35% 40%, #6d88ff 0%, #3657ff 35%, #1f3ae6 65%, rgba(25, 40, 220, .2) 100%);
  filter: blur(7px);
  box-shadow: 0 0 50px 10px rgba(50, 80, 255, .55);
}
.np-btn { font-size: 13px; letter-spacing: -2px; padding: 8px 6px; color: #dfe9ff; text-shadow: 0 0 6px #9db4ff; }
.np-btn:hover { color: #fff; text-shadow: 0 0 10px #fff; }
.np-play { font-size: 20px; width: 34px; }
.np-info { flex: 1; min-width: 0; padding-left: 8px; }
.np-title { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 6px rgba(200, 220, 255, .8); }
.np-sub { font-size: 11px; letter-spacing: .1em; color: rgba(210, 225, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-sub b { color: #fff; font-weight: 400; }
.np-scope { width: 90px; height: 36px; opacity: .9; }

/* panels — Copland OS windows */
.panel {
  position: absolute; z-index: 10;
  left: var(--l, auto); right: var(--r, auto); top: var(--t); width: var(--w); height: var(--h);
  max-height: calc(100vh - var(--t) - 4vh);
  display: none; flex-direction: column;
  background: linear-gradient(180deg, rgba(10, 22, 120, .84), rgba(4, 10, 72, .9));
  border: 1px solid rgba(140, 232, 255, .55);
  box-shadow: inset 0 0 0 1px rgba(20, 40, 170, .7), inset 0 0 40px rgba(40, 90, 255, .15), 0 0 30px rgba(60, 150, 255, .25), 0 24px 60px rgba(0, 0, 25, .6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  color: #c4f2ff;
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-color: #bff6ff; border-style: solid; pointer-events: none;
}
.panel::before { left: -4px; top: -4px; border-width: 2px 0 0 2px; }
.panel::after { right: -4px; bottom: -4px; border-width: 0 2px 2px 0; }
.panel.open { display: flex; animation: panel-in .38s cubic-bezier(.2, .8, .2, 1); }
.panel.closing { animation: panel-out .22s ease forwards; }
.panel-bar {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 7px 16px;
  border-bottom: 1px solid rgba(140, 232, 255, .35);
  background: linear-gradient(90deg, rgba(60, 170, 220, .22), transparent 70%);
  cursor: grab; user-select: none; touch-action: none;
}
.panel-bar:active { cursor: grabbing; }
.panel-title { font: italic 400 22px var(--f-serif); color: #9ff0ff; text-shadow: 0 0 8px rgba(110, 225, 255, .8); white-space: nowrap; }
.panel-jp { font: 11px var(--f-pixel); letter-spacing: .25em; color: rgba(150, 225, 255, .55); white-space: nowrap; }
.panel-x { margin-left: auto; width: 28px; height: 28px; font: 20px/1 var(--f-sans); color: #9ff0ff; border: 1px solid rgba(140, 232, 255, .35); }
.panel-x:hover { background: rgba(255, 79, 134, .25); color: #fff; border-color: var(--red); }
.panel-body { flex: 1; overflow: auto; min-height: 0; }
.panel-foot { padding: 9px 16px; border-top: 1px solid rgba(140, 232, 255, .25); font: 12px var(--f-pixel); letter-spacing: .08em; color: rgba(170, 230, 255, .6); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.panel-foot a { color: #9ff0ff; }

.panel-body::-webkit-scrollbar, .term-out::-webkit-scrollbar { width: 8px; }
.panel-body::-webkit-scrollbar-thumb, .term-out::-webkit-scrollbar-thumb { background: rgba(120, 200, 255, .35); }
.panel-body::-webkit-scrollbar-track, .term-out::-webkit-scrollbar-track { background: rgba(0, 0, 40, .3); }

/* beat list */
.beat-row {
  display: grid; grid-template-columns: 34px 30px 1fr auto auto; gap: 12px; align-items: center;
  padding: 11px 16px; border-bottom: 1px solid rgba(140, 232, 255, .12);
  font: 14px var(--f-pixel); cursor: pointer; position: relative;
  transition: background .15s;
}
.beat-row:hover { background: rgba(80, 160, 255, .12); }
.beat-row.playing { background: linear-gradient(90deg, rgba(61, 107, 255, .35), rgba(61, 107, 255, .08)); }
.beat-row .bn { color: rgba(160, 225, 255, .5); }
.beat-row .bp { font-size: 16px; color: #9ff0ff; text-shadow: 0 0 6px #5ad; }
.beat-row .bt { min-width: 0; }
.beat-row .bt b { display: block; font: italic 400 19px var(--f-serif); color: #e2f8ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 6px rgba(120, 220, 255, .5); }
.beat-row .bt small { font-size: 11px; letter-spacing: .08em; color: rgba(160, 225, 255, .6); }
.beat-row .bprice { color: #9ff0ff; font-size: 13px; white-space: nowrap; }
.beat-row .bkind { font-style: normal; opacity: .62; font-size: 11px; letter-spacing: .06em; }
.beat-row .bbuy {
  font: 12px var(--f-pixel); letter-spacing: .15em; padding: 5px 10px;
  border: 1px solid rgba(255, 79, 134, .7); color: #ff9dbc; text-decoration: none;
}
.beat-row .bbuy:hover { background: var(--red); color: #fff; }
.beat-row .bprog { position: absolute; left: 0; bottom: -1px; height: 2px; background: #7d9dff; box-shadow: 0 0 8px #7d9dff; width: 0; }

/* beat search */
.beat-search { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid rgba(140, 232, 255, .25); background: rgba(2, 5, 36, .35); }
.beat-search .bs-k { font: 11px var(--f-pixel); letter-spacing: .25em; color: rgba(150, 225, 255, .55); }
.beat-search input {
  flex: 1; min-width: 0; -webkit-appearance: none; appearance: none;
  background: transparent; border: 0; border-bottom: 1px dotted rgba(140, 232, 255, .4); border-radius: 0;
  color: #e2f8ff; font: 14px var(--f-pixel); padding: 4px 2px; outline: none;
}
.beat-search input::placeholder { color: rgba(160, 225, 255, .4); }
.beat-search input:focus { border-bottom-color: #9ff0ff; box-shadow: 0 6px 10px -8px rgba(127, 227, 240, .8); }
.beat-row[hidden] { display: none; }

/* links — the Wired node map */
.wired { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; padding: 22px 24px 18px 20px; }
.wmap { position: relative; width: min(430px, 56vh, 34vw); aspect-ratio: 1; margin-bottom: 14px; }
.wsvg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wr { fill: none; stroke: rgba(140, 232, 255, .55); stroke-width: 1.2; }
.wr.dim { stroke: rgba(140, 232, 255, .22); }
.wt line { stroke: rgba(160, 235, 255, .4); stroke-width: 1; }
.wt line.lg { stroke: rgba(190, 245, 255, .85); stroke-width: 1.6; }
.wseg { fill: rgba(125, 157, 255, .6); }
.wseg.hi { fill: var(--red); filter: drop-shadow(0 0 4px var(--red)); }
.wx { stroke: rgba(140, 232, 255, .1); stroke-dasharray: 3 6; }
.wdot { fill: #bff6ff; filter: drop-shadow(0 0 4px #7fe3f0); }
.wl { fill: none; stroke: rgba(140, 232, 255, .26); stroke-width: 1.2; transition: stroke .2s, stroke-width .2s; }
.wl.on { stroke: rgba(205, 248, 255, .95); stroke-width: 1.8; filter: drop-shadow(0 0 4px rgba(127, 227, 240, .9)); }
.wl.hot { stroke: #fff; stroke-dasharray: 7 5; animation: wl-hot .5s linear 3; }
.wp { fill: #e6fbff; filter: drop-shadow(0 0 3px #7fe3f0); }
.wsweep {
  position: absolute; inset: 3.5%; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: conic-gradient(from 0deg, rgba(127, 227, 240, .24), rgba(127, 227, 240, 0) 20%, transparent);
  animation: sweep 7s linear infinite;
}
.wcore {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 21%; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(circle, rgba(61, 107, 255, .6), rgba(10, 22, 120, .85) 70%);
  border: 2px solid rgba(190, 245, 255, .8);
  box-shadow: 0 0 18px rgba(80, 160, 255, .7), inset 0 0 0 5px rgba(10, 22, 120, .9), inset 0 0 0 7px rgba(140, 232, 255, .45);
}
.wcore b { font: italic 400 clamp(15px, 2.2vmin, 22px) var(--f-serif); color: #e8fbff; text-shadow: 0 0 8px rgba(130, 230, 255, .9); line-height: 1.05; }
.wcore small { font: 8px var(--f-pixel); letter-spacing: .05em; white-space: nowrap; color: rgba(160, 225, 255, .65); }
.wn { position: absolute; transform: translate(-50%, -50%); text-decoration: none; outline: none; z-index: 1; }
.wn-c {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  font: 13px var(--f-pixel); color: #dff8ff; background: rgba(8, 18, 110, .92);
  border: 1.5px solid rgba(160, 235, 255, .7); box-shadow: 0 0 10px rgba(80, 170, 255, .45);
  transition: transform .2s, background .2s, box-shadow .2s;
}
.wn-l {
  position: absolute; left: 50%; top: calc(100% + 2px); transform: translateX(-50%); white-space: nowrap;
  font: italic 400 13px var(--f-serif); color: rgba(200, 245, 255, .78); text-shadow: 0 0 6px rgba(120, 220, 255, .6), 0 1px 2px rgba(2, 5, 36, .9);
  transition: color .2s;
}
.wn.is-live .wn-c {
  border-color: var(--red); color: #fff; background: rgba(120, 14, 52, .9);
  box-shadow: 0 0 14px rgba(255, 42, 109, .85);
}
.wn.is-live .wn-c::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid rgba(255, 79, 134, .85); animation: node-ping 1.3s ease-out infinite;
}
.wn.on, .wn:focus-visible { z-index: 2; }
.wn.on .wn-c, .wn:focus-visible .wn-c { background: var(--eblue); color: #fff; transform: scale(1.14); box-shadow: 0 0 0 4px rgba(61, 107, 255, .25), 0 0 22px rgba(120, 170, 255, .95); }
.wn.is-live.on .wn-c { background: var(--magenta); box-shadow: 0 0 0 4px rgba(255, 42, 109, .3), 0 0 24px rgba(255, 79, 134, 1); }
.wn.on .wn-c::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(190, 245, 255, .8); animation: node-ping 1.4s ease-out infinite; }
.wn.on .wn-l { color: #fff; }
.wro { display: flex; flex-direction: column; min-width: 0; padding-left: 20px; border-left: 1px solid rgba(140, 232, 255, .25); font: 13px var(--f-pixel); }
.wro-k { font-size: 11px; letter-spacing: .2em; color: rgba(160, 225, 255, .55); }
.wro-jp { margin-left: 8px; letter-spacing: .25em; }
.wro-t { margin: 8px 0 16px; font: italic 400 34px/1.1 var(--f-serif); color: #e8fbff; text-shadow: 0 0 10px rgba(130, 230, 255, .8); overflow-wrap: anywhere; }
.wro-dl { display: grid; grid-template-columns: 62px 1fr; gap: 8px 10px; }
.wro-dl dt { color: rgba(160, 225, 255, .5); letter-spacing: .1em; }
.wro-dl dd { color: #bfe9ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wro-led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: led 1.6s infinite; }
.wro-led.live { background: var(--magenta); box-shadow: 0 0 10px var(--magenta); animation: blink .9s steps(1) infinite; }
.wro-live { color: #ff9dbc; font-weight: 400; letter-spacing: .12em; text-shadow: 0 0 8px rgba(255, 42, 109, .8); }
.wro-msg { margin-top: 16px; min-height: 1.5em; color: #9ff0ff; }
.wro-go { align-self: flex-start; margin-top: 18px; padding: 8px 18px; border: 1px solid rgba(255, 79, 134, .75); color: #ff9dbc; text-decoration: none; letter-spacing: .18em; font-size: 13px; cursor: pointer; }
.wro-go:hover { background: var(--red); color: #fff; }
.wro-log { margin-top: 12px; min-height: 4.8em; font-size: 12px; line-height: 1.6; color: #6f9bff; text-shadow: 0 0 5px rgba(80, 130, 255, .8); }
.wro-log div { animation: line-in .12s steps(2); }
.wro-log .ok { color: var(--cyan); }
.wro-log b { color: var(--red); font-weight: 400; }
.t-dimmer { opacity: .6; }

/* mail */
.mail { display: grid; grid-template-rows: auto 1fr; }
.mail-list { border-bottom: 1px solid rgba(140, 232, 255, .25); }
.mail-item { display: grid; grid-template-columns: 16px 70px 1fr auto; gap: 10px; width: 100%; text-align: left; padding: 9px 16px; font: 13px var(--f-pixel); border-bottom: 1px solid rgba(140, 232, 255, .08); }
.mail-item:hover { background: rgba(80, 160, 255, .12); }
.mail-item.sel { background: rgba(61, 107, 255, .3); }
.mail-item .mu { width: 8px; height: 8px; border-radius: 50%; align-self: center; }
.mail-item.unread .mu { background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 1s steps(1) infinite; }
.mail-item .mf { color: #9ff0ff; }
.mail-item .md { color: rgba(160, 225, 255, .5); }
.mail-view { padding: 16px 20px; font: 14px/1.75 var(--f-pixel); white-space: pre-wrap; color: #cfefff; overflow: auto; }
.mail-view h3 { font: italic 400 22px var(--f-serif); color: #e2f8ff; margin-bottom: 8px; text-shadow: 0 0 6px rgba(120, 220, 255, .5); }
.mail-view .meta { font-size: 11px; letter-spacing: .1em; color: rgba(160, 225, 255, .55); margin-bottom: 14px; }
.mail-compose { display: inline-block; margin-top: 16px; padding: 6px 14px; border: 1px solid rgba(255, 79, 134, .7); color: #ff9dbc; text-decoration: none; letter-spacing: .15em; font-size: 12px; }
.mail-compose:hover { background: var(--red); color: #fff; }

/* ---------------- Now Playing deck ---------------- */
.np-prog { position: absolute; left: 30px; bottom: 9px; height: 2px; width: 0; max-width: calc(100% - 64px); background: #fff; box-shadow: 0 0 8px #bcd0ff; opacity: .85; transition: width .25s linear; }
.np-info { cursor: pointer; }

.deck { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; padding: 20px 24px 20px 20px; }
.deck-dial { position: relative; width: min(400px, 58vh, 30vw); aspect-ratio: 1; container-type: inline-size; align-self: center; }
.deck-cv, .deck-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.deck-svg { overflow: visible; touch-action: none; }
.dk-ring { fill: none; stroke: rgba(140, 232, 255, .5); stroke-width: 1.2; }
.dk-ticks line { stroke: rgba(160, 235, 255, .35); stroke-width: 1; }
.dk-ticks line.md { stroke: rgba(180, 240, 255, .55); }
.dk-ticks line.lg { stroke: rgba(200, 248, 255, .9); stroke-width: 1.8; }
.dk-track { fill: rgba(30, 50, 170, .55); stroke: rgba(140, 232, 255, .25); stroke-width: .8; cursor: pointer; }
.dk-arc { fill: #3d6bff; filter: drop-shadow(0 0 5px rgba(90, 140, 255, .95)); pointer-events: none; }
.dk-seg { fill: rgba(40, 46, 110, .9); stroke: rgba(140, 232, 255, .35); stroke-width: .6; }
.dk-seg.red { fill: var(--red); filter: drop-shadow(0 0 4px var(--red)); stroke: none; }
.dk-orbit { fill: none; stroke: rgba(140, 232, 255, .3); }
.dk-head { cursor: grab; }
.dk-head circle { fill: #050a55; stroke: #ff4f86; stroke-width: 2.4; filter: drop-shadow(0 0 5px rgba(255, 79, 134, .9)); }
.dk-head circle.in { fill: #ff4f86; stroke: none; }
.deck-dial[data-state="stopped"] .dk-head { opacity: .35; }
.dk-bpm { fill: rgba(127, 227, 240, .25); }
.dk-bpm.hit { animation: bpm-hit .35s ease-out; }
.deck-badge {
  position: absolute; left: 1%; top: 9%; padding: 3px 12px 4px; transform: rotate(-38deg);
  font: 400 clamp(13px, 4.6cqw, 19px) var(--f-sans); color: #f2f2f5; letter-spacing: .03em;
  background: #262a5c; border: 1px solid rgba(160, 235, 255, .35); pointer-events: none;
}
.deck-badge .r { color: var(--red); }
.deck-center { position: absolute; inset: 0; pointer-events: none; text-align: center; }
.deck-center > div { position: absolute; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; }
.dc-q { top: 41%; font: 900 5cqw var(--f-jp-serif); color: #1f2238; }
.dc-t { top: 53.6%; max-width: 44cqw; overflow: hidden; text-overflow: ellipsis; font: 700 6.2cqw var(--f-serif); color: #1c1e2c; }
.dc-a { top: 59.4%; font: 800 4.2cqw/1 var(--f-round); color: var(--eblue); letter-spacing: .04em; filter: blur(.2px); }
.dc-a.flash { color: var(--magenta); animation: accept-flash .22s steps(1) 4; }
.deck-dial[data-state="stopped"] .dc-t { color: #6b6e80; }

.deck-side { min-width: 0; display: flex; flex-direction: column; font: 13px var(--f-pixel); padding-left: 22px; border-left: 1px solid rgba(140, 232, 255, .25); }
.deck-k { font-size: 11px; letter-spacing: .2em; color: rgba(160, 225, 255, .55); display: flex; align-items: center; gap: 8px; }
.deck-k b { color: #cfeeff; font-weight: 400; }
.deck-k.sm { margin-top: 16px; margin-bottom: 7px; font-size: 10px; }
.deck-jp { letter-spacing: .25em; }
.deck-mode { margin-left: auto; padding: 1px 7px; border: 1px solid rgba(140, 232, 255, .4); letter-spacing: .15em; font-size: 10px; }
.deck-mode:empty { display: none; }
.deck-t { margin: 6px 0 4px; font: italic 400 34px/1.1 var(--f-serif); color: #e8fbff; text-shadow: 0 0 10px rgba(130, 230, 255, .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-meta { color: rgba(170, 230, 255, .7); letter-spacing: .06em; font-size: 12px; }
.deck-meta b { color: #fff; font-weight: 400; }
.deck-wave { position: relative; height: 54px; margin-top: 16px; cursor: pointer; touch-action: none; border-top: 1px solid rgba(140, 232, 255, .15); border-bottom: 1px solid rgba(140, 232, 255, .15); }
.deck-wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.deck-tip { position: absolute; top: -20px; transform: translateX(-50%); padding: 1px 6px; font-size: 11px; color: #fff; background: rgba(61, 107, 255, .85); opacity: 0; pointer-events: none; transition: opacity .15s; }
.deck-wave.hov .deck-tip { opacity: 1; }
.deck-time { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11px; letter-spacing: .1em; color: rgba(170, 230, 255, .65); }
.deck-tx { display: flex; align-items: center; gap: 4px; margin-top: 12px; flex-wrap: wrap; }
.dx { font-size: 14px; letter-spacing: -2px; padding: 6px 8px; color: #dfe9ff; text-shadow: 0 0 6px #9db4ff; }
.dx.big { width: 46px; height: 46px; border-radius: 50%; font-size: 19px; letter-spacing: 0; border: 1.5px solid rgba(190, 245, 255, .75); background: rgba(61, 107, 255, .35); box-shadow: 0 0 14px rgba(90, 140, 255, .6); }
.dx:hover { color: #fff; text-shadow: 0 0 10px #fff; }
.dx.big:hover { background: var(--eblue); }
.dpill { padding: 4px 7px; font: 11px var(--f-pixel); letter-spacing: .04em; white-space: nowrap; color: rgba(170, 230, 255, .6); border: 1px solid rgba(140, 232, 255, .3); }
.dpill:first-of-type { margin-left: auto; }
.dpill b { font-weight: 400; color: inherit; }
.dpill.on { color: #fff; border-color: #9ff0ff; background: rgba(61, 107, 255, .35); text-shadow: 0 0 6px #9db4ff; }
.dpill:hover { border-color: #9ff0ff; }
.deck-vol { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 11px; letter-spacing: .12em; color: rgba(170, 230, 255, .6); outline: none; }
.deck-vol .vb { display: flex; gap: 3px; }
.deck-vol i { width: 10px; height: 12px; border: 1px solid rgba(140, 232, 255, .45); cursor: pointer; }
.deck-vol i.on { background: var(--cyan); box-shadow: 0 0 6px rgba(127, 227, 240, .8); border-color: var(--cyan); }
.deck-vol:focus-visible .vb { outline: 1px dotted #9ff0ff; outline-offset: 3px; }
.deck-lic { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.lic { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 9px; text-align: left; border: 1px solid rgba(255, 79, 134, .55); color: #ffb3cb; transition: background .15s; }
.lic b { font: 400 10px var(--f-pixel); letter-spacing: .1em; color: rgba(255, 190, 210, .75); }
.lic span { font: 14px var(--f-pixel); color: #fff; }
.lic:hover { background: var(--red); }
.lic:hover b { color: #fff; }
.lic.lic-single { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; padding: 8px 12px; }
.lic.lic-single b { font-size: 11px; letter-spacing: .14em; }
.deck-next { list-style: none; }
.deck-next li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 5px 4px; border-bottom: 1px solid rgba(140, 232, 255, .1); cursor: pointer; }
.deck-next li:hover { background: rgba(80, 160, 255, .14); }
.deck-next .n { color: rgba(160, 225, 255, .5); }
.deck-next .t { font: italic 400 16px var(--f-serif); color: #e2f8ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-next .m { color: rgba(160, 225, 255, .55); font-size: 11px; }
.deck-none { color: rgba(160, 225, 255, .4); cursor: default !important; }

/* ---------------- Live Broadcast monitor ---------------- */
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--magenta); box-shadow: 0 0 8px var(--magenta), 0 0 16px rgba(255, 42, 109, .7);
  animation: led 1.1s ease-in-out infinite;
}
.live-status {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px;
  border: 1px solid rgba(255, 79, 134, .75); background: rgba(110, 12, 48, .45);
  color: #ffd0df !important; letter-spacing: .18em;
  box-shadow: 0 0 14px rgba(255, 42, 109, .35);
}
.live-status:hover { background: var(--magenta); color: #fff !important; text-shadow: none !important; }

.live-panel {
  border-color: rgba(160, 236, 255, .7);
  box-shadow:
    inset 0 0 0 1px rgba(28, 52, 190, .75),
    inset 0 0 44px rgba(61, 107, 255, .18),
    0 0 34px rgba(60, 150, 255, .3),
    0 0 18px rgba(255, 42, 109, .16),
    0 26px 64px rgba(0, 0, 25, .72);
  transition: width .22s ease;
}
.live-panel.with-chat { --w: min(860px, 64vw) !important; }
.live-panel .panel-bar {
  background: linear-gradient(90deg, rgba(255, 42, 109, .24), rgba(60, 170, 220, .2) 48%, transparent 85%);
}
.live-panel.is-offline .panel-bar {
  background: linear-gradient(90deg, rgba(60, 170, 220, .22), transparent 70%);
}
.live-panel.is-offline .panel-ctls { display: none; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px;
  font: 11px var(--f-pixel); letter-spacing: .2em; color: #ffe3ec;
  background: rgba(255, 42, 109, .28); border: 1px solid rgba(255, 79, 134, .8);
  text-shadow: 0 0 6px rgba(255, 79, 134, .9);
}
.live-pill.offline {
  color: rgba(185, 238, 255, .8); background: rgba(10, 26, 120, .55);
  border-color: rgba(140, 232, 255, .42); text-shadow: none;
}
.live-pill.offline .live-dot {
  background: var(--cyan); box-shadow: 0 0 6px rgba(127, 227, 240, .7);
  animation: led 2.4s ease-in-out infinite;
}
.panel-ctls { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.panel-ctls + .panel-x { margin-left: 4px; }
.panel-ctl {
  padding: 3px 9px; font: 11px var(--f-pixel); letter-spacing: .12em;
  color: rgba(175, 232, 255, .75); border: 1px solid rgba(140, 232, 255, .35);
  background: rgba(6, 14, 86, .55);
}
.panel-ctl:hover { color: #fff; border-color: #9ff0ff; }
.panel-ctl.on { color: #fff; border-color: #9ff0ff; background: rgba(61, 107, 255, .45); text-shadow: 0 0 6px #9db4ff; }

.live-body {
  display: grid; grid-template-columns: 1fr; overflow: hidden;
  background: #02041c;
}
.live-panel.with-chat .live-body { grid-template-columns: 1fr 270px; }
.live-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background:
    radial-gradient(ellipse 70% 65% at 50% 50%, rgba(32, 60, 180, .32), rgba(2, 4, 28, .96)),
    #02041c;
  overflow: hidden;
}
.live-video, .live-video iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.live-offline {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 26px; text-align: center;
  background:
    radial-gradient(ellipse 72% 68% at 50% 48%, rgba(28, 56, 185, .36) 0%, rgba(4, 10, 62, .92) 70%, #02041c 100%);
}
.lo-noise {
  position: absolute; inset: 0; pointer-events: none; opacity: .28;
  background:
    repeating-linear-gradient(90deg, rgba(127, 227, 240, .06) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(127, 227, 240, .05) 0 1px, transparent 1px 28px);
}
.lo-wave {
  width: min(320px, 78%); height: 42px; margin-bottom: 6px;
  filter: drop-shadow(0 0 6px rgba(127, 227, 240, .75));
}
.lo-k {
  font: 11px var(--f-pixel); letter-spacing: .2em; color: rgba(160, 228, 255, .62);
}
.lo-jp { margin-left: 6px; letter-spacing: .24em; }
.lo-t {
  margin: 6px 0 8px;
  font: italic 400 clamp(24px, 2.6vw, 34px)/1.1 var(--f-serif); color: #e8fbff;
  text-shadow: 0 0 12px rgba(127, 227, 240, .75);
}
.lo-sub {
  max-width: 38ch; font: 12px/1.6 var(--f-pixel); letter-spacing: .05em;
  color: rgba(175, 232, 255, .68);
}
.lo-go {
  margin-top: 16px; padding: 7px 16px;
  font: 12px var(--f-pixel); letter-spacing: .16em; text-decoration: none;
  border: 1px solid rgba(255, 79, 134, .75); color: #ffb3cb;
  background: rgba(60, 10, 36, .35);
  transition: background .15s, color .15s;
}
.lo-go:hover { background: var(--red); color: #fff; }
.live-crt {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 18, .22) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 115% 110% at 50% 50%, transparent 66%, rgba(4, 10, 64, .58) 100%);
  box-shadow: inset 0 0 0 1px rgba(127, 227, 240, .28), inset 0 0 22px rgba(61, 107, 255, .28);
}
.live-crt::before, .live-crt::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border-color: rgba(159, 240, 255, .65); border-style: solid;
}
.live-crt::before { left: 8px; bottom: 8px; border-width: 0 0 1.5px 1.5px; }
.live-crt::after { right: 8px; bottom: 8px; border-width: 0 1.5px 1.5px 0; }
.lhud {
  position: absolute; top: 8px; padding: 2px 7px;
  font: 10px var(--f-pixel); letter-spacing: .18em; color: rgba(205, 248, 255, .88);
  background: rgba(3, 8, 52, .68); border: 1px solid rgba(127, 227, 240, .32);
  text-shadow: 0 0 6px rgba(127, 227, 240, .85);
  transition: opacity .2s ease;
}
.lhud.tl { left: 8px; }
.lhud.tr { right: 8px; color: #ffb3cb; border-color: rgba(255, 79, 134, .45); text-shadow: 0 0 6px rgba(255, 42, 109, .8); }
.live-panel.is-offline .lhud.tr { display: none; }
.live-stage:hover .lhud { opacity: .12; }

.live-chat {
  border-left: 1px solid rgba(140, 232, 255, .28);
  background: rgba(2, 5, 34, .92); min-height: 0; position: relative;
}
.live-chat iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}

.live-foot { align-items: center; flex-wrap: nowrap; }
.lf-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lf-info b {
  font: italic 400 17px/1.15 var(--f-serif); color: #e6fbff;
  text-shadow: 0 0 8px rgba(127, 227, 240, .65);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lf-info small {
  font: 11px var(--f-pixel); letter-spacing: .08em; color: rgba(165, 228, 255, .62);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#liveTwitchLink {
  white-space: nowrap; padding: 4px 10px;
  border: 1px solid rgba(255, 79, 134, .65); color: #ffb3cb; text-decoration: none;
  letter-spacing: .12em;
}
#liveTwitchLink:hover { background: var(--red); color: #fff; }

/* Corner mini-monitor (PiP) */
.live-panel.mini {
  left: auto !important; top: auto !important;
  right: 2vw !important; bottom: 6vh !important;
  width: min(340px, 36vw) !important; height: auto !important;
}
.live-panel.mini .panel-bar { padding: 5px 8px 5px 10px; gap: 8px; cursor: default; }
.live-panel.mini .panel-title { font-size: 17px; }
.live-panel.mini .panel-jp,
.live-panel.mini #liveChatBtn,
.live-panel.mini .live-foot,
.live-panel.mini .lhud { display: none; }

/* ---------------- terminal ---------------- */
.term-scope { width: 110px; height: 22px; margin-left: auto; opacity: .9; }
.term-scope + .panel-x { margin-left: 0; }
.term-host { display: flex; flex-direction: column; background: rgba(2, 5, 36, .55); position: relative; }
.term {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  padding: 12px 14px 10px;
  font: 15px/1.5 var(--f-pixel); color: #6f9bff;
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0;
  text-shadow: 0 0 5px rgba(80, 130, 255, .85), 0 0 1px rgba(170, 200, 255, .9);
  cursor: text;
}
.term-out { flex: 1; overflow-y: auto; white-space: pre-wrap; word-break: break-word; min-height: 0; }
.term-out .l { min-height: 1.5em; animation: line-in .12s steps(2); }
.term-line { display: flex; flex-wrap: wrap; white-space: pre-wrap; word-break: break-all; padding-top: 2px; }
.term-prompt { white-space: pre; }
.term-cur { background: #7da4ff; color: #020630; text-shadow: none; box-shadow: 0 0 8px rgba(110, 150, 255, .9); animation: blink 1.05s steps(1) infinite; }
.term:not(.focus) .term-cur { background: transparent; box-shadow: inset 0 0 0 1px #7da4ff; color: inherit; animation: none; }
.term-input { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; font-size: 16px; pointer-events: none; }
.t-id { color: var(--red); text-shadow: 0 0 6px rgba(255, 79, 134, .8); }
.t-path { color: var(--cyan); text-shadow: 0 0 6px rgba(127, 227, 240, .7); }
.t-dim { color: #4660b8; text-shadow: none; }
.t-hi { color: #cfe0ff; text-shadow: 0 0 6px rgba(150, 190, 255, .9); }
.t-red { color: var(--red); text-shadow: 0 0 6px rgba(255, 79, 134, .8); }
.t-mag { color: var(--magenta); text-shadow: 0 0 8px rgba(255, 42, 109, .9); }
.t-cyan { color: var(--cyan); text-shadow: 0 0 6px rgba(127, 227, 240, .7); }
.t-jp { color: #cfe0ff; }
.term a, .term .cmd { color: var(--cyan); text-decoration: none; cursor: pointer; border-bottom: 1px dotted rgba(127, 227, 240, .5); }
.term a:hover, .term .cmd:hover { color: #fff; background: rgba(61, 107, 255, .35); }
.term .live { color: #cfe0ff; }
.term .art { color: #5b86ff; line-height: 1.15; }
.term.feeding .term-cur { opacity: .35; }

/* ---------------- CRT glass ---------------- */
#reflection {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none;
  opacity: 0; transition: opacity 1.4s ease; mix-blend-mode: multiply;
}
#screen[data-scene="boot"] #reflection { opacity: .95; mix-blend-mode: normal; }
#screen[data-scene="logon"] #reflection { opacity: .16; }
#screen[data-scene="hub"] #reflection { opacity: .1; mix-blend-mode: screen; }

.crt-fx { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.crt-fx > div { position: absolute; inset: 0; border-radius: inherit; }
.grille {
  background: repeating-linear-gradient(90deg, rgba(18, 18, 30, .26) 0 1.6px, rgba(255, 255, 255, .025) 1.6px 3.2px, transparent 3.2px 7px);
  transition: opacity 1s;
}
#screen[data-scene="standby"] .grille { opacity: .3; }
#screen[data-scene="hub"] .grille { opacity: .35; }
.scan { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .1) 0 1px, transparent 1px 3px); opacity: .55; }
.roll {
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, .055) 45%, rgba(255, 255, 255, .09) 50%, rgba(255, 255, 255, .055) 55%, transparent 100%);
  height: 28vh; inset: auto 0 auto 0; top: -30vh;
  animation: roll 8.5s linear infinite;
}
.glass { background: radial-gradient(ellipse 60% 45% at 28% 18%, rgba(255, 255, 255, .07), transparent 70%); }
.vignette {
  box-shadow: inset 0 0 14vmin rgba(0, 0, 0, .55), inset 0 0 3vmin rgba(0, 0, 0, .7);
  background: radial-gradient(ellipse 120% 110% at 50% 50%, transparent 60%, rgba(0, 0, 0, .35) 100%);
}
#flash { position: absolute; inset: 0; z-index: 45; pointer-events: none; background: #fff; opacity: 0; }
#flash.go { animation: flash .5s ease-out; }
#flash.blue { background: #7d9dff; }

#poweron { position: absolute; inset: 0; z-index: 60; pointer-events: none; background: #000; display: none; }
#poweron::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 100%;
  background: #f4f6ff; box-shadow: 0 0 40px 10px rgba(220, 230, 255, .8);
  transform: translateY(-50%) scaleY(.004) scaleX(0);
}
#poweron.on { display: block; animation: power-bg 1.1s ease forwards; }
#poweron.on::before { animation: power-line 1.1s cubic-bezier(.5, 0, .2, 1) forwards; }
#poweron.off { display: block; background: transparent; animation: none; }
#poweron.off::before { animation: power-off .55s cubic-bezier(.7, 0, .8, .4) forwards; }

/* ---------------- keyframes ---------------- */
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes blink-soft { 0%, 100% { opacity: .9; } 50% { opacity: .35; } }
@keyframes led { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes flicker {
  0% { opacity: 1; } 3% { opacity: .985; } 6% { opacity: 1; } 41% { opacity: .99; } 42% { opacity: 1; }
  77% { opacity: .975; } 78% { opacity: 1; } 91% { opacity: .99; } 92% { opacity: 1; }
}
@keyframes roll { from { transform: translateY(0); } to { transform: translateY(160vh); } }
@keyframes char-pop { from { transform: scale(1.7) translateY(-8%); filter: blur(4px); opacity: 0; } to { transform: none; filter: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translate(-50%, -50%); } 25% { transform: translate(-53%, -50%); } 75% { transform: translate(-47%, -50%); } }
@keyframes accept-flash { 0% { opacity: 1; } 50% { opacity: .2; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ray { to { stroke-dashoffset: 0; } }
@keyframes ring-in { from { transform: rotate(-70deg) scale(.82); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes outer-in { from { transform: scale(1.18); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spiral-in { from { transform: rotate(-120deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes block-in { from { transform: rotate(40deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes blue-blink { 0% { opacity: 0; } 20% { opacity: 1; } 40% { opacity: 0; } 60%, 100% { opacity: 1; } }
@keyframes dot-pop { from { opacity: 0; } to { opacity: 1; } }
@keyframes dial-leave { 0% { transform: translate(-50%, -50%); opacity: 1; filter: none; } 100% { transform: translate(-50%, -50%) scale(1.25) rotate(25deg); opacity: 0; filter: blur(8px); } }
@keyframes breathe { 0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(1); } 50% { opacity: .7; transform: translate(-50%, -50%) scale(1.02); } }
@keyframes panel-in { from { opacity: 0; transform: scaleY(.02) scaleX(.6); filter: brightness(3); } 60% { transform: scaleY(1.02) scaleX(1); } to { opacity: 1; transform: none; filter: none; } }
@keyframes panel-out { to { opacity: 0; transform: scaleY(.02) scaleX(.8); filter: brightness(3); } }
@keyframes line-in { from { opacity: .3; } to { opacity: 1; } }
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes bpm-hit { 0% { fill: #fff; filter: drop-shadow(0 0 8px #7fe3f0); } 100% { fill: rgba(127, 227, 240, .25); } }
@keyframes wl-hot { to { stroke-dashoffset: -24; } }
@keyframes node-ping { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
@keyframes power-bg { 0%, 55% { background: #000; } 100% { background: transparent; } }
@keyframes power-line {
  0% { transform: translateY(-50%) scaleY(.004) scaleX(0); opacity: 1; }
  30% { transform: translateY(-50%) scaleY(.004) scaleX(1); opacity: 1; }
  60% { transform: translateY(-50%) scaleY(1) scaleX(1); opacity: .95; }
  100% { transform: translateY(-50%) scaleY(1) scaleX(1); opacity: 0; }
}
@keyframes power-off {
  0% { transform: translateY(-50%) scaleY(1) scaleX(1); opacity: 0; background: #000; }
  10% { opacity: .9; background: #f4f6ff; }
  55% { transform: translateY(-50%) scaleY(.004) scaleX(1); opacity: 1; }
  100% { transform: translateY(-50%) scaleY(.004) scaleX(0); opacity: 1; }
}

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .emblem { left: 50%; width: min(80vh, 90vw); height: min(80vh, 90vw); }
  .hub-title { left: auto; right: 5vw; }
  .mi { left: calc(var(--x) + 8%); }
  .panel[data-panel="links"] { --w: min(800px, 88vw) !important; }
  .wmap { width: min(430px, 56vh, 46vw); }
  .panel[data-panel="player"] { --w: min(820px, 90vw) !important; }
  .live-panel { --w: min(640px, 86vw) !important; }
  .live-panel.with-chat { --w: min(880px, 92vw) !important; }
  .deck-dial { width: min(400px, 58vh, 40vw); }
}
@media (max-width: 760px) {
  #screen { border-radius: 0; }
  .boot-header { left: 8%; top: 24%; }
  .boot-credit { left: auto; right: 10%; top: 66%; }
  .dial { --d: min(100vh, 128vw); }
  .dhint { font-size: 2.1cqw; top: 31%; }
  .hud-bl { width: 34vw; }
  .banner { top: 60vmin; }
  .banner-band { font-size: 20px; }
  .banner-script { font-size: 15px; }
  .hub-title { top: 6vh; right: 6vw; }
  .emblem { top: 40%; }
  .hub-menu { position: absolute; left: 0; right: 0; bottom: 18.5vh; display: grid; grid-template-columns: 1fr 1fr; gap: 11px 10px; padding: 0 7vw; }
  .mi { position: static; }
  .mi-t { font-size: 20px; }
  .lo-sub { font-size: 11px; }
  .lo-wave { height: 30px; margin-bottom: 2px; }
  .lo-go { margin-top: 10px; padding: 6px 12px; font-size: 11px; }
  .np { left: 4vw; right: 4vw; width: auto; bottom: 7vh; transform: rotate(3deg); height: 64px; padding: 0 22px; }
  .np-scope { display: none; }
  .hub-status { left: 4vw; right: 4vw; justify-content: space-between; bottom: 1.6vh; gap: 8px; font-size: 11px; }
  .panel { left: 2vw !important; right: 2vw !important; top: 9vh !important; width: auto !important; height: auto !important; bottom: 3vh; max-height: none; }
  .term { font-size: 13px; }
  .term-scope { width: 60px; }
  .beat-row { grid-template-columns: 26px 1fr auto auto; gap: 10px; }
  .beat-row .bn, .beat-row .bkind { display: none; }
  .beat-row .bprice { font-size: 12px; }
  .wired { grid-template-columns: 1fr; padding: 16px 16px 12px; }
  .wmap { width: min(100%, 50vh); justify-self: center; }
  .wn-c { width: 32px; height: 32px; font-size: 11px; }
  .wn-l { font-size: 11px; }
  .wro { padding: 14px 0 0; border-left: 0; border-top: 1px solid rgba(140, 232, 255, .25); }
  .wro-t { font-size: 28px; margin-bottom: 12px; }
  .deck { grid-template-columns: 1fr; padding: 14px 16px 16px; }
  .deck-dial { width: min(100%, 46vh); justify-self: center; }
  .deck-side { padding: 12px 0 0; border-left: 0; border-top: 1px solid rgba(140, 232, 255, .25); }
  .deck-t { font-size: 28px; }
  .live-panel .panel-jp { display: none; }
  .live-panel.is-offline .live-stage { aspect-ratio: auto; min-height: 245px; }
  .live-panel:not(.with-chat) { bottom: auto; }
  .live-panel.with-chat .live-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: 100%; }
  .live-panel.with-chat .live-chat { border-left: 0; border-top: 1px solid rgba(140, 232, 255, .28); min-height: 180px; }
  .live-panel.mini { left: auto !important; right: 3vw !important; top: auto !important; bottom: 16vh !important; width: min(270px, 70vw) !important; }
  .np-prog { left: 22px; max-width: calc(100% - 44px); bottom: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  #screen { animation: none; }
  .roll { display: none; }
  .emblem { animation: none; }
  .wsweep, .wp { display: none; }
}
