/* ==========================================================================
   FZU DOCTOR // TERMINAL — design system
   Rhodes Island monochrome × Endfield industrial yellow
   ========================================================================== */

:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #07080a;
  --bg-1: #0c0e11;
  --bg-2: #12151a;
  --bg-3: #1a1e25;
  --glass: rgba(10, 12, 15, .72);

  /* ink */
  --fg: #eef0f2;
  --fg-1: #c4c9d0;
  --fg-2: #878e98;
  --fg-3: #565d67;

  /* hairlines */
  --line: rgba(238, 240, 242, .09);
  --line-2: rgba(238, 240, 242, .16);
  --line-3: rgba(238, 240, 242, .30);

  /* accents */
  --y: #ffe500;            /* Endfield industrial yellow */
  --y-ink: #0b0b0b;
  --c: #3ad4ff;            /* PRTS cyan */
  --o: #ff7a1a;            /* originium amber */
  --red: #ff4141;
  --ok: #46e28a;

  /* rarity */
  --r6: #ff7a1a;
  --r5: #ffcf3a;
  --r4: #b48cff;
  --r3: #58b4ff;
  --r2: #cfd86a;
  --r1: #9aa0a8;

  /* type */
  --f-en: "FZD Archivo", "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "FZD Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --f-zh-sys: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif;
  --f-body: "FZD Archivo", var(--f-zh-sys);
  --f-display: "FZD Archivo", "FZD Hei", var(--f-zh-sys);
  --f-hei: "FZD Hei", var(--f-zh-sys);

  /* motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-snap: cubic-bezier(.7, 0, .2, 1);

  /* layout */
  --gutter: clamp(16px, 4vw, 64px);
  --maxw: 1440px;
  --topbar-h: 64px;
  --cut: 14px;
}

/* Endfield light scope ---------------------------------------------------- */
.theme-ef {
  color-scheme: light;
  --bg: #e7e6e1;
  --bg-1: #efeee9;
  --bg-2: #f6f5f1;
  --bg-3: #ffffff;
  --glass: rgba(239, 238, 233, .8);
  --fg: #0d0e10;
  --fg-1: #2b2e33;
  --fg-2: #5e626a;
  --fg-3: #8d9098;
  --line: rgba(13, 14, 16, .10);
  --line-2: rgba(13, 14, 16, .18);
  --line-3: rgba(13, 14, 16, .38);
  --c: #0093c4;
  background: var(--bg);
  color: var(--fg);
}

/* reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.65;
  font-feature-settings: "tnum" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--y); color: #000; }
:focus-visible { outline: 2px solid var(--y); outline-offset: 3px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* scrollbar */
html { scrollbar-color: #3a4048 transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2a2f36; }
::-webkit-scrollbar-thumb:hover { background: var(--y); }
::-webkit-scrollbar-track { background: transparent; }

/* grain overlay — fixed, cheap, adds paper/film tooth to flat panels */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background-image: url("../img/noise.png");
  background-size: 160px;
  opacity: .055;
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-1%, 3%); }
  80% { transform: translate(4%, 1%); }
  100% { transform: translate(0, 0); }
}

/* typography -------------------------------------------------------------- */
.mono { font-family: var(--f-mono); letter-spacing: .04em; }
.hei { font-family: var(--f-hei); }
.caps { text-transform: uppercase; letter-spacing: .14em; }
.wide { font-stretch: 125%; }
.narrow { font-stretch: 75%; }
.dim { color: var(--fg-2); }
.dimmer { color: var(--fg-3); }
.y { color: var(--y); }
.c { color: var(--c); }
.o { color: var(--o); }
.theme-ef .y { color: var(--fg); background: var(--y); padding: 0 .2em; }

.label {
  font: 500 11px/1.2 var(--f-mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.label--y { color: var(--y); }
.theme-ef .label--y { color: var(--fg); }

.h-display {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.h-zh {
  font-family: var(--f-hei);
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1.1;
}

/* layout ------------------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: clamp(88px, 12vw, 168px) 0; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }

/* components -------------------------------------------------------------- */

/* tag: [ TEXT ] */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  height: 22px; padding: 0 8px;
  font: 500 10.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--fg-1);
  border: 1px solid var(--line-2);
  white-space: nowrap;
}
.tag::before {
  content: ""; width: 5px; height: 5px; background: currentColor;
  transform: rotate(45deg); flex: none;
}
.tag--y { color: #000; background: var(--y); border-color: var(--y); }
.tag--c { color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.tag--o { color: var(--o); border-color: color-mix(in srgb, var(--o) 45%, transparent); }
.tag--plain::before { display: none; }

/* status dot */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); flex: none; }
.dot--ok { background: var(--ok); box-shadow: 0 0 0 0 rgba(70, 226, 138, .6); animation: ping 2s var(--ease-out) infinite; }
.dot--warn { background: var(--y); }
.dot--bad { background: var(--red); }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(70, 226, 138, .55); }
  100% { box-shadow: 0 0 0 10px rgba(70, 226, 138, 0); }
}

/* buttons with cut corners and a wipe fill */
.btn {
  --h: 52px;
  --bc: var(--line-3);
  --fill: var(--fg);
  --ink: var(--bg);
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: var(--h); padding: 0 20px 0 18px;
  font: 600 12.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--fg);
  border: 1px solid var(--bc);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  transition: color .35s var(--ease-out), border-color .35s;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--fill);
  transform: translateX(-101%);
  transition: transform .5s var(--ease-out);
}
.btn::after { /* diagonal edges of the two cut corners */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom left, transparent calc(50% - .6px), var(--bc) 50%, transparent calc(50% + .6px)) top right / var(--cut) var(--cut) no-repeat,
    linear-gradient(to top right, transparent calc(50% - .6px), var(--bc) 50%, transparent calc(50% + .6px)) bottom left / var(--cut) var(--cut) no-repeat;
}
.btn:hover, .btn:focus-visible { color: var(--ink); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn .btn__ix { font-size: 10px; color: var(--fg-3); transition: color .35s; }
.btn:hover .btn__ix { color: inherit; }
.btn .btn__arrow { width: 22px; height: 10px; flex: none; transition: transform .45s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--primary { --bc: var(--y); --fill: #fff; --ink: #000; color: #000; background: var(--y); }
.btn--primary .btn__ix { color: rgba(0, 0, 0, .5); }
.btn--sm { --h: 38px; padding: 0 14px; font-size: 11px; gap: 12px; --cut: 9px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-busy { pointer-events: none; opacity: .55; }
.theme-ef .btn--primary { --fill: #000; --ink: var(--y); }

/* panels with corner brackets */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, .008));
  border: 1px solid var(--line);
}
.theme-ef .panel { background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .45)); }
.brackets {
  --bc: var(--line-3);
  --bl: 12px;
  background:
    linear-gradient(var(--bc), var(--bc)) top left / var(--bl) 1px,
    linear-gradient(var(--bc), var(--bc)) top left / 1px var(--bl),
    linear-gradient(var(--bc), var(--bc)) top right / var(--bl) 1px,
    linear-gradient(var(--bc), var(--bc)) top right / 1px var(--bl),
    linear-gradient(var(--bc), var(--bc)) bottom left / var(--bl) 1px,
    linear-gradient(var(--bc), var(--bc)) bottom left / 1px var(--bl),
    linear-gradient(var(--bc), var(--bc)) bottom right / var(--bl) 1px,
    linear-gradient(var(--bc), var(--bc)) bottom right / 1px var(--bl);
  background-repeat: no-repeat;
}
.cut { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); }

/* industrial hazard band */
.hazard {
  --hz: var(--y);
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--hz) 0 8px, transparent 8px 16px);
}
.hazard--anim { background-size: 22.6px 22.6px; animation: hazard 1.4s linear infinite; }
@keyframes hazard { to { background-position: 22.6px 0; } }

/* pseudo barcode */
.barcode {
  height: 26px; width: 120px; color: var(--fg-2);
  background:
    repeating-linear-gradient(90deg,
      currentColor 0 2px, transparent 2px 3px, currentColor 3px 4px, transparent 4px 7px,
      currentColor 7px 10px, transparent 10px 11px, currentColor 11px 12px, transparent 12px 15px,
      currentColor 15px 16px, transparent 16px 18px, currentColor 18px 21px, transparent 21px 23px);
}

/* scrolling ticker */
.ticker {
  position: relative; overflow: hidden; white-space: nowrap;
  border-block: 1px solid var(--line);
  font: 500 11px/1 var(--f-mono); letter-spacing: .22em; text-transform: uppercase;
  color: var(--fg-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track { display: inline-flex; gap: 48px; padding: 13px 0; animation: ticker 48s linear infinite; }
.ticker__track > span { display: inline-flex; align-items: center; gap: 48px; }
.ticker__track > span::after { content: "◆"; color: var(--y); font-size: 8px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* section heading */
.sec-head {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  column-gap: clamp(16px, 3vw, 40px);
  margin-bottom: clamp(40px, 6vw, 80px);
}
.sec-head__idx {
  grid-row: span 2;
  font: 800 clamp(64px, 11vw, 168px)/.78 var(--f-en);
  font-stretch: 125%;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-3);
}
.sec-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.sec-head__title {
  font: 900 clamp(34px, 5.2vw, 72px)/1 var(--f-display);
  letter-spacing: .01em;
}
.sec-head__title small {
  display: block; margin-top: 10px;
  font: 600 clamp(11px, 1vw, 13px)/1.3 var(--f-mono); letter-spacing: .3em; color: var(--fg-2);
}
.sec-head__rule {
  grid-column: 1 / -1;
  height: 1px; margin-top: clamp(20px, 3vw, 36px);
  background: linear-gradient(90deg, var(--line-3), var(--line) 60%, transparent);
  transform-origin: left;
}
.sec-head__rule::before {
  content: ""; display: block; width: 64px; height: 3px; margin-top: -1px; background: var(--y);
}

/* key/value list */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 13px; }
.kv dt { font: 500 10.5px/1.9 var(--f-mono); letter-spacing: .16em; color: var(--fg-3); text-transform: uppercase; }
.kv dd { color: var(--fg); }

/* stars */
.stars { display: inline-flex; gap: 1px; font-family: var(--f-hei); letter-spacing: 0; }

/* inputs */
.field { display: grid; gap: 8px; }
.field > span { font: 500 10.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.input, .textarea, .select {
  width: 100%; min-height: 46px; padding: 12px 14px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line-2);
  border-radius: 0;
  color: var(--fg);
  font: 400 14px/1.4 var(--f-mono);
  transition: border-color .25s, background .25s;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--y); background: rgba(255, 229, 0, .04); }
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }

/* segmented switch */
.seg { display: inline-flex; border: 1px solid var(--line-2); }
.seg button {
  padding: 10px 16px; font: 600 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg-2); transition: color .25s, background .25s;
}
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.seg button:hover:not([aria-pressed="true"]):not([aria-selected="true"]) { color: var(--fg); }

/* toast */
.toasts { position: fixed; z-index: 120; right: 16px; bottom: 16px; display: grid; gap: 8px; pointer-events: none; }
.toast {
  min-width: 240px; max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px 12px 14px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-left: 3px solid var(--y);
  font: 400 13px/1.5 var(--f-body);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  animation: toast-in .45s var(--ease-out) both;
}
.toast--bad { border-left-color: var(--red); }
.toast--ok { border-left-color: var(--ok); }
.toast.is-out { animation: toast-out .35s var(--ease-io) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

/* ==========================================================================
   HUD: top bar, rails, menu, cursor
   ========================================================================== */
.topbar {
  position: fixed; z-index: 80; inset: 0 0 auto 0;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter);
  transition: background .4s, border-color .4s, transform .5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.topbar.is-solid {
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.topbar.is-hidden { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand__mark { width: 30px; height: 30px; color: var(--fg); }
.brand__mark .m-y { color: var(--y); }
.brand__txt { display: grid; line-height: 1; }
.brand__name { font: 800 15px/1 var(--f-en); font-stretch: 125%; letter-spacing: .04em; }
.brand__sub { margin-top: 5px; font: 500 9px/1 var(--f-mono); letter-spacing: .28em; color: var(--fg-2); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  position: relative; display: grid; gap: 4px; padding: 8px 14px;
  font: 600 13px/1 var(--f-body); color: var(--fg-1);
  transition: color .25s;
}
.nav a small { font: 500 9px/1 var(--f-mono); letter-spacing: .2em; color: var(--fg-3); transition: color .25s; }
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--y); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-out);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav a:hover small, .nav a[aria-current="page"] small { color: var(--y); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: none; }
.topbar__meta { display: flex; align-items: center; gap: 14px; padding-left: 18px; border-left: 1px solid var(--line); }
.clock { display: grid; justify-items: end; line-height: 1; }
.clock__t { font: 600 15px/1 var(--f-mono); letter-spacing: .06em; }
.clock__z { margin-top: 5px; font: 500 9px/1 var(--f-mono); letter-spacing: .22em; color: var(--fg-3); }
.sys { display: inline-flex; align-items: center; gap: 8px; font: 500 10px/1 var(--f-mono); letter-spacing: .18em; color: var(--fg-2); }

.burger { display: none; width: 44px; height: 44px; margin-left: auto; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--fg); transition: transform .45s var(--ease-out), opacity .3s; }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; right: 17px; }
.burger span:nth-child(3) { top: 28px; }
.menu-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.menu {
  position: fixed; z-index: 79; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--topbar-h) + 24px) var(--gutter) 40px;
  background: var(--bg);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--ease-snap);
  visibility: hidden;
}
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; }
.menu a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.menu a b { font: 900 clamp(30px, 9vw, 44px)/1 var(--f-display); }
.menu a small { font: 500 10px/1 var(--f-mono); letter-spacing: .2em; color: var(--fg-3); }
.menu a i { font: normal 500 11px/1 var(--f-mono); color: var(--y); width: 26px; }

.rail {
  position: fixed; z-index: 70; top: calc(var(--topbar-h) + 24px); bottom: 24px;
  width: 28px; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
}
.rail--l { left: 18px; }
.rail--r { right: 18px; }
.rail__ruler {
  flex: 1; width: 9px; margin: 16px 0;
  background:
    repeating-linear-gradient(180deg, var(--line-3) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(180deg, var(--line-2) 0 1px, transparent 1px 8px);
  background-size: 9px 40px, 4px 8px;
  background-position: 0 var(--ro, 0px), 5px var(--ro, 0px);
  background-repeat: repeat-y;
  position: relative;
}
.rail__thumb {
  position: absolute; left: -3px; width: 15px; height: 2px; background: var(--y);
  top: calc(var(--p, 0) * 100%);
  box-shadow: 0 0 12px var(--y);
}
.rail__v {
  writing-mode: vertical-rl;
  font: 500 9.5px/1 var(--f-mono); letter-spacing: .32em; text-transform: uppercase; color: var(--fg-3);
  white-space: nowrap;
}
.rail__v b { color: var(--fg); font-weight: 600; }

/* music player (inserted by player.js) */
.bgm { position: relative; display: inline-flex; flex: none; }
.bgm__btn, .bgm__more {
  display: inline-flex; align-items: center; gap: 9px; height: 32px;
  border: 1px solid var(--line-2); color: var(--fg-2);
  font: 600 10px/1 var(--f-mono); letter-spacing: .2em;
  transition: color .3s, border-color .3s, background .3s;
}
.bgm__btn { padding: 0 11px; }
.bgm__more { width: 26px; justify-content: center; border-left: 0; }
.bgm__more svg { width: 9px; height: 6px; transition: transform .3s var(--ease-out); }
.bgm__more[aria-expanded="true"] svg { transform: rotate(180deg); }
.bgm__btn:hover, .bgm__more:hover { color: var(--fg); border-color: var(--line-3); }
.bgm__btn[aria-pressed="true"] { color: var(--y); border-color: rgba(255, 229, 0, .5); background: rgba(255, 229, 0, .05); }
.bgm__btn.is-armed { animation: bgm-armed 1.8s ease-in-out infinite; }
@keyframes bgm-armed { 50% { border-color: rgba(255, 229, 0, .55); } }
.bgm__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bgm__bars i { width: 2px; height: calc(2px + var(--h, 0) * 10px); background: currentColor; }
.bgm__btn:not([aria-pressed="true"]) .bgm__bars i:nth-child(odd) { height: 4px; }

.bgmp {
  position: absolute; right: 0; top: calc(100% + 12px); z-index: 5;
  width: 340px; max-height: min(620px, calc(100vh - var(--topbar-h) - 24px)); overflow: auto;
  padding: 16px; background: rgba(10, 12, 15, .96); border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-family: var(--f-body); letter-spacing: 0;
  animation: toast-in .35s var(--ease-out) both;
}
.bgmp::before { content: ""; position: absolute; left: 0; top: 0; width: 48px; height: 2px; background: var(--y); }
.bgmp__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bgmp__src { font-size: 9.5px; letter-spacing: .16em; color: var(--y); }
.bgmp__now { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; }
.bgmp__cover {
  width: 56px; height: 56px; display: grid; place-items: center;
  font: 800 13px/1 var(--f-en); font-style: normal; letter-spacing: .06em; color: #000;
  background: linear-gradient(135deg, transparent 0 70%, rgba(0, 0, 0, .25) 70%), var(--y);
}
.is-synth .bgmp__cover { color: var(--y); background: repeating-linear-gradient(-45deg, rgba(255, 229, 0, .22) 0 6px, transparent 6px 12px), #0b0d10; border: 1px solid var(--line-2); }
.bgmp__title { display: block; font-size: 14px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bgmp__album { display: block; margin-top: 4px; font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bgmp__prog { height: 2px; margin-top: 14px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bgmp__prog i { display: block; height: 100%; background: var(--y); transform-origin: left; transform: scaleX(0); }
.bgmp__time { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: var(--fg-3); }
.is-synth .bgmp__prog, .is-synth .bgmp__time, .is-synth [data-act="prev"], .is-synth [data-act="next"] { visibility: hidden; }
.bgmp__ctl { display: flex; align-items: center; gap: 6px; margin: 10px 0 14px; }
.bgmp__ctl button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--fg-1); border: 1px solid var(--line); transition: color .2s, border-color .2s; }
.bgmp__ctl button:hover { color: var(--y); border-color: rgba(255, 229, 0, .5); }
.bgmp__ctl svg { width: 12px; height: 12px; }
.bgmp__play { width: 40px !important; height: 40px !important; background: var(--y); color: #000 !important; border-color: var(--y) !important; }
.bgmp__vol { flex: 1; margin-left: 6px; accent-color: var(--y); min-width: 0; }
.bgmp__seg { display: flex; margin-bottom: 12px; }
.bgmp__seg button { flex: 1; }
.bgmp__list { border-top: 1px solid var(--line); }
.bgmp__list button { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; width: 100%; padding: 8px 4px; text-align: left; border-bottom: 1px solid var(--line); transition: background .2s; }
.bgmp__list button:hover { background: rgba(255, 255, 255, .03); }
.bgmp__list .mono { grid-row: span 2; font-size: 10px; color: var(--fg-3); padding-top: 2px; }
.bgmp__list b { font-size: 13px; font-weight: 600; color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bgmp__list small { font-size: 11px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bgmp__list li.is-on b, .bgmp__list li.is-on .mono { color: var(--y); }
.bgmp__credit { margin-top: 12px; font-size: 11px; line-height: 1.7; color: var(--fg-3); }
.bgmp__credit a { color: var(--fg-2); border-bottom: 1px solid var(--line-3); }
@media (max-width: 980px) {
  .bgm { margin-left: auto; }
  .bgm + .burger { margin-left: 4px; }
  .bgmp { position: fixed; left: 12px; right: 12px; top: calc(var(--topbar-h) + 6px); width: auto; }
}

/* custom cursor (fine pointers only) */
.cursor { position: fixed; z-index: 200; left: 0; top: 0; pointer-events: none; mix-blend-mode: difference; }
.cursor__dot, .cursor__ring { position: absolute; left: 0; top: 0; will-change: transform; }
.cursor__dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; background: #fff; }
.cursor__ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), opacity .3s;
}
.cursor__ring::before, .cursor__ring::after { content: ""; position: absolute; inset: 0; }
.cursor__ring::before {
  background:
    linear-gradient(#fff, #fff) top left / 8px 1px, linear-gradient(#fff, #fff) top left / 1px 8px,
    linear-gradient(#fff, #fff) top right / 8px 1px, linear-gradient(#fff, #fff) top right / 1px 8px,
    linear-gradient(#fff, #fff) bottom left / 8px 1px, linear-gradient(#fff, #fff) bottom left / 1px 8px,
    linear-gradient(#fff, #fff) bottom right / 8px 1px, linear-gradient(#fff, #fff) bottom right / 1px 8px;
  background-repeat: no-repeat;
}
.cursor.is-hover .cursor__ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.cursor.is-down .cursor__ring { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
.cursor__label {
  position: absolute; left: 22px; top: 18px; white-space: nowrap;
  font: 500 9px/1 var(--f-mono); letter-spacing: .14em; color: #fff; opacity: .75;
}
@media (hover: hover) and (pointer: fine) {
  .has-cursor, .has-cursor a, .has-cursor button, .has-cursor [role="slider"] { cursor: none; }
  .has-cursor input, .has-cursor textarea, .has-cursor select { cursor: auto; }
}

/* footer ------------------------------------------------------------------ */
.footer { position: relative; border-top: 1px solid var(--line); padding: 64px 0 40px; background: var(--bg); }
.footer__top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer__big { font: 800 clamp(40px, 7vw, 96px)/.85 var(--f-en); font-stretch: 125%; letter-spacing: -.02em; }
.footer__big span { color: var(--y); }
.footer h4 { margin-bottom: 14px; }
.footer li { padding: 6px 0; font-size: 13px; }
.footer li a { color: var(--fg-1); transition: color .2s; }
.footer li a:hover { color: var(--y); }
.footer__legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line);
  font: 400 11.5px/1.7 var(--f-body); color: var(--fg-3);
}
.footer__legal p { max-width: 760px; }

/* reveal ------------------------------------------------------------------ */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="clip"] { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); transition: clip-path 1.2s var(--ease-snap); transition-delay: var(--d, 0s); }
.js [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0); }
.js .sec-head .sec-head__rule { transform: scaleX(0); transition: transform 1.4s var(--ease-snap) .2s; }
.js .sec-head.is-in .sec-head__rule { transform: none; }

/* responsive -------------------------------------------------------------- */
@media (max-width: 1180px) {
  .rail { display: none; }
}
@media (max-width: 980px) {
  .nav, .topbar__meta { display: none; }
  .burger { display: block; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__top > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  :root { --topbar-h: 58px; }
  .footer__top { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .grain { display: none; }
}
