:root {
  --bg: #010309;
  --panel: rgba(2, 6, 16, .93);
  --line: rgba(45, 105, 190, .28);
  --line-hi: rgba(60, 160, 200, .6);
  --accent: #2a9fc2;
  --accent2: #6a58b8;
  --text: #9db8d8;
  --dim: rgba(130, 160, 200, .5);
  --mb-h: 30px;
  --tb-h: 44px;
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;           /* no scroll bars anywhere */
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

/* subtle CRT scanlines + vignette over everything (clicks pass through) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0, rgba(0, 0, 0, .12) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: multiply;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#desktop {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

/* ---------- Menu bar ---------- */
#menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--mb-h);
  z-index: 100001;
  display: flex;
  align-items: stretch;
  padding: 0 6px;
  background: linear-gradient(180deg, rgba(4, 11, 28, .94), rgba(3, 9, 24, .94));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 18px rgba(40, 150, 255, .12);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#menubar::after {                      /* animated scan line along the bar's edge */
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 160px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: mb-scan 6s linear infinite;
  pointer-events: none;
}
@keyframes mb-scan { from { left: -160px; } to { left: 100%; } }

.mb-logo {
  display: flex; align-items: center;
  padding: 0 12px 0 8px;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .2em; white-space: nowrap;
  color: #7df3ff;
  text-shadow: 0 0 12px rgba(95, 230, 255, .95), 0 0 28px rgba(60, 200, 255, .6);
  transition: text-shadow .3s, color .3s;
}
.mb-logo:hover { color: #c9f8ff; text-shadow: 0 0 12px #5fe6ff, 0 0 30px rgba(95, 230, 255, .8); }

#menus { display: flex; align-items: stretch; }
.menu { position: relative; display: flex; }
.menu > .menu-btn {
  position: relative; overflow: hidden;
  border: 0; background: transparent;
  color: #6fb4cc;
  text-shadow: none;
  padding: 0 14px;
  font: inherit; font-size: 11px; font-weight: 400; letter-spacing: .1em; text-transform: inherit;
  cursor: default;
  transition: color .2s, text-shadow .2s, background .25s;
}
.menu > .menu-btn::before {              /* glow rising from the bottom edge */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(60, 200, 255, .30), rgba(60, 200, 255, 0) 80%);
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.menu > .menu-btn::after {               /* underline that sweeps out from the centre */
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, #7df3ff, transparent);
  box-shadow: 0 0 10px #5fe6ff;
  transform: translateX(-50%) scaleX(0);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}
.menu > .menu-btn:hover,
.menu.open > .menu-btn {
  background: rgba(42, 159, 194, .14);
  color: #fff;
  text-shadow: 0 0 10px #7df3ff, 0 0 20px rgba(95, 230, 255, .7);
}
.menu > .menu-btn:hover::before,
.menu.open > .menu-btn::before { opacity: 1; }
.menu > .menu-btn:hover::after,
.menu.open > .menu-btn::after { transform: translateX(-50%) scaleX(1); }
.menu > .menu-btn:active { transform: translateY(1px); }

.dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 96px;
  padding: 2px 0;
  background: rgba(3, 9, 24, .96);
  border: 1px solid var(--line-hi);
  border-top: 0;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .7), 0 0 24px rgba(42, 159, 194, .2);
  text-transform: none;
  letter-spacing: .02em;
  font-size: 11px;
  transform-origin: top left;
}
.menu.open > .dropdown { display: block; animation: dd-open .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes dd-open {
  from { opacity: 0; transform: translateY(-6px) scaleY(.85); clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}

.dropdown .item {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; justify-content: space-between; gap: 12px;
  padding: 5px 14px;
  color: #8ef0ff;
  text-shadow: 0 0 6px rgba(95, 230, 255, .45);
  cursor: default;
  transition: color .15s, padding-left .2s, text-shadow .2s;
}
.menu.open .dropdown .item { animation: item-in .28s ease-out backwards; }
.menu.open .dropdown .item:nth-child(2) { animation-delay: .04s; }
.menu.open .dropdown .item:nth-child(3) { animation-delay: .08s; }
.menu.open .dropdown .item:nth-child(4) { animation-delay: .12s; }
.menu.open .dropdown .item:nth-child(5) { animation-delay: .16s; }
@keyframes item-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.dropdown .item::before {                /* highlight sweeping in from the left */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(60, 200, 255, .32), rgba(60, 200, 255, .06));
  transform: translateX(-101%);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
  z-index: -1;
}
.dropdown .item::after {                 /* bright accent bar that grows on the left */
  content: ""; position: absolute; left: 0; top: 50%;
  width: 2px; height: 0;
  background: #7df3ff; box-shadow: 0 0 8px #5fe6ff;
  transform: translateY(-50%);
  transition: height .2s ease-out;
}
.dropdown .item:hover {
  color: #fff; padding-left: 19px;
  text-shadow: 0 0 10px #7df3ff;
}
.dropdown .item:hover::before { transform: none; }
.dropdown .item:hover::after { height: 70%; }
.dropdown .item:active { background: rgba(125, 243, 255, .25); }
.dropdown .item.disabled { opacity: .35; pointer-events: none; }
.dropdown .item .key { font-family: var(--mono); font-size: 11px; color: #5fc8e0; }
.dropdown .item .chk { width: 8px; color: #7df3ff; }
.dropdown .sep { height: 1px; margin: 4px 0; background: var(--line); }

.mb-spacer { flex: 1; }
.mb-status {
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: #8ef0ff;
  text-shadow: 0 0 8px rgba(95, 230, 255, .5);
}
.mb-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3dffa0;
  box-shadow: 0 0 8px #3dffa0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }
#mb-clock {
  font-family: var(--mono); font-size: 12px; color: #fff;
  text-shadow: 0 0 6px rgba(255, 255, 255, .55);
  padding: 0 8px; align-self: center; letter-spacing: .1em;
}

/* ---------- Windows ---------- */
.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 260px;
  min-height: 150px;
  background: rgba(2, 6, 16, .75);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .65);
  overflow: hidden;
}
/* glowing corner brackets */
.win::before, .win::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  pointer-events: none;
  z-index: 6;
  border: 2px solid var(--accent);
  opacity: .55;
}
.win::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.win::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.win.active {
  border-color: var(--line-hi);
  box-shadow: 0 0 0 1px rgba(42, 159, 194, .2), 0 0 34px rgba(42, 159, 194, .22), 0 14px 50px rgba(0, 0, 0, .7);
}
.win.active::before, .win.active::after { opacity: 1; filter: drop-shadow(0 0 4px var(--accent)); }
.win.minimized { display: none; }
.win.closing { animation: holo-out .25s ease-in forwards; }
.win.max {
  left: 0 !important;
  top: var(--mb-h) !important;
  width: 100% !important;
  height: calc(100% - var(--mb-h) - var(--tb-h)) !important;
}

/* ---------- Hologram warp-in / out ---------- */
@keyframes holo-in {
  0%   { opacity: 0;  transform: scale(1.12); filter: blur(10px) brightness(2.2); }
  35%  { opacity: .9; transform: scale(.985) translateX(-4px) skewX(2deg); filter: blur(2px) brightness(1.6); }
  50%  { opacity: .55; transform: translateX(3px) skewX(-1.5deg); filter: blur(0) brightness(1.3); }
  65%  { opacity: 1;  transform: translateX(-1px); filter: brightness(1.1); }
  100% { opacity: 1;  transform: none; filter: none; }
}
@keyframes holo-out {
  from { opacity: 1; transform: none; filter: none; }
  to   { opacity: 0; transform: scale(.94); filter: blur(8px) brightness(1.8); }
}
@media (prefers-reduced-motion: reduce) {
  .win, .win.closing { animation: none; }
}

.win-title {
  display: flex;
  align-items: center;
  height: 22px;
  flex: none;
  padding-left: 10px;
  background: linear-gradient(90deg, rgba(12, 36, 80, .4), rgba(6, 16, 40, .25));
  border-bottom: 1px solid var(--line);
  cursor: default;
}
.win-title .t {
  flex: 1;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win.active .win-title .t { color: var(--accent); text-shadow: 0 0 8px rgba(42, 159, 194, .6); }
.win-btns { display: flex; height: 100%; }
.win-btns button {
  width: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 9px;
  cursor: pointer;
  transition: background .12s;
}
.win-btns button:hover { background: rgba(42, 159, 194, .2); }
.win-btns button.close:hover { background: #d8334a; }

.win-body {
  flex: 1;
  min-height: 0;
  padding: 16px;
  overflow: hidden;           /* no scroll bars anywhere */
  user-select: text;
  -webkit-user-select: text;
  font-size: 13px;
  line-height: 1.55;
}
.win-body h2 {
  margin: 0 0 8px;
  font: 700 15px var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.win-body p { margin: 0 0 10px; color: var(--text); }
.win-body .kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 18px;
  font-family: var(--mono);
  font-size: 12px;
}
.win-body .kv span:nth-child(odd) { color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.win-body .kv span:nth-child(even) { color: var(--accent); }

/* resize handles */
.rz { position: absolute; z-index: 5; }
.rz.n  { top: -3px;    left: 8px;  right: 8px;  height: 7px; cursor: ns-resize; }
.rz.s  { bottom: -3px; left: 8px;  right: 8px;  height: 7px; cursor: ns-resize; }
.rz.e  { right: -3px;  top: 8px;   bottom: 8px; width: 7px;  cursor: ew-resize; }
.rz.w  { left: -3px;   top: 8px;   bottom: 8px; width: 7px;  cursor: ew-resize; }
.rz.ne { top: -3px;    right: -3px;  width: 12px; height: 12px; cursor: nesw-resize; }
.rz.nw { top: -3px;    left: -3px;   width: 12px; height: 12px; cursor: nwse-resize; }
.rz.se { bottom: -3px; right: -3px;  width: 12px; height: 12px; cursor: nwse-resize; }
.rz.sw { bottom: -3px; left: -3px;   width: 12px; height: 12px; cursor: nesw-resize; }
.win.max .rz { display: none; }

/* ---------- Taskbar ---------- */
#taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--tb-h);
  z-index: 100000;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  background: rgba(3, 9, 24, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.tb-list { flex: 1; display: flex; gap: 6px; overflow: hidden; }
.tb-btn {
  max-width: 190px;
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-bottom: 2px solid rgba(42, 159, 194, .35);
  border-radius: 1px;
  background: rgba(30, 80, 170, .16);
  color: var(--text);
  font: 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.tb-btn:hover { background: rgba(42, 159, 194, .2); }
.tb-btn.active { border-bottom-color: var(--accent); background: rgba(42, 159, 194, .22); color: #fff; }

/* ---------- Music button (styled like the top bar) ---------- */
#music-btn {
  position: relative; flex: none;
  display: flex; align-items: center; gap: 9px;
  height: 30px; padding: 0 12px;
  font: inherit; font-size: 11px; font-weight: 400;
  letter-spacing: .1em; text-transform: uppercase;
  color: #6fb4cc;
  background: linear-gradient(180deg, rgba(4, 11, 28, .94), rgba(3, 9, 24, .94));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: 0 1px 18px rgba(40, 150, 255, .12);
  cursor: default; overflow: hidden; isolation: isolate;
  transition: color .2s, text-shadow .2s, background .25s;
}
#music-btn b { font-weight: 400; }
#music-btn::before {                       /* glow rising from the bottom, like the menu */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(60, 200, 255, .30), rgba(60, 200, 255, 0) 80%);
  opacity: 0; transition: opacity .25s; z-index: -1;
}
#music-btn::after {                        /* underline sweeping from the centre */
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, #7df3ff, transparent);
  box-shadow: 0 0 10px #5fe6ff;
  transform: translateX(-50%) scaleX(0);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
#music-btn:hover, #music-btn.on:hover {
  background: rgba(42, 159, 194, .14);
  color: #fff; text-shadow: 0 0 10px #7df3ff, 0 0 20px rgba(95, 230, 255, .7);
}
#music-btn:hover::before { opacity: 1; }
#music-btn:hover::after { transform: translateX(-50%) scaleX(1); }
#music-btn:active { transform: translateY(1px); }
#music-btn.on { color: #8ef0ff; }
#music-btn .eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
#music-btn .eq i {
  width: 2px; height: 14px; border-radius: 1px;
  background: linear-gradient(0deg, #2a9fc2, #7df3ff 70%, #fff);
  transform-origin: bottom; transform: scaleY(.14); opacity: .45;
  transition: transform .35s ease, opacity .3s;
}
#music-btn.on .eq i {
  opacity: 1; box-shadow: 0 0 8px rgba(95, 230, 255, .8);
  animation: eq-bar var(--d, .8s) ease-in-out var(--o, 0s) infinite;
}
@keyframes eq-bar {
  0%, 100% { transform: scaleY(.12); }
  25%      { transform: scaleY(calc(var(--h, .8) * .55)); }
  50%      { transform: scaleY(var(--h, .8)); }
  75%      { transform: scaleY(calc(var(--h, .8) * .3)); }
}

/* ---------- Volume pop-up (vertical slider rising above the music button) ---------- */
#music-wrap { position: relative; flex: none; margin-left: auto; display: flex; align-items: center; height: 30px; }
#music-wrap .vol {
  position: absolute; bottom: 100%; left: 50%;
  padding-bottom: 14px;                       /* invisible bridge so hover isn't lost between button and panel */
  transform: translate(-50%, 8px);
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease .35s, transform .25s ease .35s, visibility 0s linear .6s;
}
#music-wrap:hover .vol, #music-wrap:focus-within .vol {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
  transition-delay: 0s;
}
#music-wrap .panel {
  position: relative; width: 34px; height: 112px;
  background: linear-gradient(180deg, rgba(4, 11, 28, .96), rgba(3, 9, 24, .96));
  border: 1px solid var(--line-hi);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .6), 0 0 18px rgba(42, 159, 194, .2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
#music-wrap input[type=range] {
  -webkit-appearance: none; appearance: none;
  --p: 25%;
  position: absolute; left: 50%; top: 50%;
  width: 84px; height: 2px; margin: 0; padding: 0; outline: none; cursor: pointer;
  transform: translate(-50%, -50%) rotate(-90deg);     /* vertical: bottom = 0%, top = 100% */
  background: linear-gradient(90deg, #7df3ff var(--p), rgba(95, 230, 255, .22) var(--p));
  box-shadow: 0 0 8px rgba(95, 230, 255, .35);
}
#music-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 8px; height: 14px; border-radius: 1px; border: 0;
  background: #c9f8ff; box-shadow: 0 0 10px #5fe6ff;
  transition: transform .15s;
}
#music-wrap input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.2); }
#music-wrap input[type=range]::-moz-range-thumb {
  width: 8px; height: 14px; border-radius: 1px; border: 0;
  background: #c9f8ff; box-shadow: 0 0 10px #5fe6ff;
}

/* Ethnocentric is installed on the computer; this just gives it a reliable name to use. */
@font-face {
  font-family: 'ArcaneEthno';
  src: url('Ethnocentric-Regular.otf') format('opentype'),
       local('Ethnocentric'), local('Ethnocentric Rg'), local('Ethnocentric Regular'), local('Ethnocentric-Regular');
}

/* ---------- Intro ---------- */
#intro {
  position: fixed; inset: 0; z-index: 200000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(2, 6, 16, .62) 0%, rgba(2, 6, 16, .25) 55%, rgba(2, 6, 16, 0) 80%);
}
/* once the title has manifested, intro.js adds .live: everything below animates, then the intro fades out */
#intro.live { animation: in-out 1.1s ease-in 5.2s forwards; }
@keyframes in-out { to { opacity: 0; transform: scale(1.06); filter: blur(6px); } }

.in-stack { position: relative; display: flex; justify-content: center; perspective: 1100px; }

.in-welcome {
  position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 1.1em; text-align: center;
  white-space: nowrap;
  font-family: var(--mono); font-size: clamp(14px, 1.8vw, 24px);
  letter-spacing: .6em; text-indent: .6em; text-transform: uppercase;
  color: #8ef0ff; text-shadow: 0 0 12px rgba(95, 230, 255, .8);
  opacity: 0;
}
.live .in-welcome { animation: in-welcome 1.4s cubic-bezier(.2, .8, .2, 1) .15s forwards; }
@keyframes in-welcome {
  from { opacity: 0; letter-spacing: 1.2em; filter: blur(8px); }
  to   { opacity: 1; letter-spacing: .6em;  filter: blur(0); }
}

.in-title {
  display: flex; align-items: center; justify-content: center;
  font-family: 'ArcaneEthno', 'Ethnocentric', 'Ethnocentric Rg', Impact, sans-serif;
  font-weight: 400; letter-spacing: .05em; line-height: 1.05;
  font-size: clamp(26px, 5.2vw, 84px);
  white-space: nowrap;
  transform-style: preserve-3d;
  opacity: 0;                                                    /* intro.js reveals it with the manifestation effect */
}
.live .in-title { animation: in-sway 5.6s cubic-bezier(.45, 0, .55, 1) both; }
@keyframes in-sway {                                            /* slow spatial tilt so the depth layers separate */
  0%   { transform: rotateX(0)    rotateY(0); }
  35%  { transform: rotateX(8deg) rotateY(-18deg); }
  100% { transform: rotateX(2deg) rotateY(14deg); }
}
.in-title span {
  position: relative; display: inline-block;
  transform-style: preserve-3d;
  color: transparent; -webkit-text-fill-color: transparent;       /* real text only reserves the width */
}
.in-title span i { position: absolute; left: 0; top: 0; font-style: normal; pointer-events: none; }

/* colour fringes: a burst when the title goes live, then a faint permanent shimmer */
.in-title .ca, .in-title .cb {
  -webkit-text-fill-color: transparent;
  mix-blend-mode: screen; opacity: .55;
  transform: translateX(calc(var(--dx) * .012em));
}
.in-title .ca { background: #00e5ff; -webkit-background-clip: text; background-clip: text; --dx: -1; }
.in-title .cb { background: #9a7bff; -webkit-background-clip: text; background-clip: text; --dx:  1; }
.live .in-title .ca, .live .in-title .cb { animation: in-burst 1.2s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * .04s) both; }
@keyframes in-burst {
  0%   { opacity: .95; transform: translateX(calc(var(--dx) * .14em)); }
  100% { opacity: .55; transform: translateX(calc(var(--dx) * .012em)); }
}

/* soft light behind the letter, set back in depth */
.in-title .bloom {
  color: #38d6ff; -webkit-text-fill-color: #38d6ff;
  filter: blur(.2em); opacity: .85;
  transform: translateZ(-.45em) scale(1.04);
}

/* glass face: bright top fading to cool blue, with a light band that keeps sweeping across */
.in-title .face {
  -webkit-text-fill-color: transparent; color: transparent;
  background:
    linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .9) 50%, transparent 60%) -160% 0 / 320% 100% no-repeat,
    linear-gradient(180deg, #ffffff 0%, #d6fbff 35%, #7fdcff 70%, #3aa7ff 100%);
  -webkit-background-clip: text; background-clip: text;
}
.live .in-title .face { animation: in-sheen 3.2s ease-in-out calc(.5s + var(--i) * .09s) infinite; }
@keyframes in-sheen {
  0%   { background-position: -160% 0, 0 0; }
  50%, 100% { background-position: 260% 0, 0 0; }
}

/* thin outline floating in front of the letter */
.in-title .edge {
  color: transparent; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(220, 252, 255, .95);
  filter: drop-shadow(0 0 5px rgba(95, 230, 255, .9));
  transform: translateZ(.28em);
}

.in-line {
  position: absolute; top: 100%; left: 50%; margin-top: .45em; margin-left: calc(min(62vw, 760px) / -2);
  height: 1px; width: min(62vw, 760px);
  background: linear-gradient(90deg, transparent, rgba(125, 243, 255, .85), transparent);
  transform: scaleX(0); opacity: 0;
}
.live .in-line { animation: in-line 1.6s cubic-bezier(.2, .8, .2, 1) .3s forwards; }
.in-line::after {                                       /* small light travelling along the line */
  content: ""; position: absolute; top: -1px; left: 0; width: 90px; height: 3px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  box-shadow: 0 0 14px #7df3ff; opacity: 0;
}
.live .in-line::after { animation: in-travel 2.2s ease-in-out 1.9s infinite; }
@keyframes in-line { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes in-travel { from { left: -12%; opacity: 0; } 20%, 80% { opacity: 1; } to { left: 100%; opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  #intro .in-welcome, #intro .in-line { opacity: 1; transform: none; animation: none; }
  #intro .in-title, #intro .in-title .face, #intro .in-title .ca, #intro .in-title .cb { animation: none; }
  #intro.live { animation: in-out .6s ease-in 3s forwards; }
}

/* ---------- Entry screen ("Enter" button) ---------- */
#gate {
  position: fixed; inset: 0; z-index: 300000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: radial-gradient(ellipse at center, rgba(2, 6, 16, .5) 0%, rgba(2, 6, 16, .82) 100%);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: opacity .7s ease, transform .7s ease, filter .7s ease;
}
#gate.leaving { opacity: 0; transform: scale(1.05); filter: blur(6px); pointer-events: none; }

#gate-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 24px;
  padding: 0; background: none; border: 0; cursor: pointer; outline: none;
  font-family: 'ArcaneEthno', 'Ethnocentric', 'Ethnocentric Rg', Impact, sans-serif;
  color: #ffffff;
}
#gate-btn svg {
  width: clamp(190px, 19vw, 280px); height: auto; overflow: visible;
  filter: drop-shadow(0 0 8px rgba(70, 130, 230, .4));
  transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .5s ease, filter .3s;
}
#gate-btn svg circle { fill: none; stroke: #7fb0e8; }
#gate-btn svg g { transform-box: fill-box; transform-origin: center; }
.r1 circle { stroke: rgba(127, 176, 232, .55); stroke-width: 1.4; stroke-dasharray: 1.2 6.4; }
.r2 circle { stroke: #d4e6ff; stroke-width: 2; stroke-dasharray: 110 50 30 60; stroke-linecap: round; transition: stroke .3s; }
.r3 circle { stroke: rgba(127, 176, 232, .38); stroke-width: 1; stroke-dasharray: 250 40 80 30; }
.r1 { animation: g-spin 46s linear infinite; }
.r2 { animation: g-spin 16s linear infinite reverse; }
.r3 { animation: g-spin 26s linear infinite; }
@keyframes g-spin { to { transform: rotate(360deg); } }

#gate-btn svg .halo { fill: url(#g-core); stroke: none; opacity: .7; transform-box: fill-box; transform-origin: center; animation: g-breathe 2.8s ease-in-out infinite; transition: opacity .3s; }
#gate-btn svg .core-ring { stroke: #b8d4f8; stroke-width: 1.6; transform-box: fill-box; transform-origin: center; animation: g-breathe 2.8s ease-in-out infinite; }
#gate-btn svg .ping { stroke: #7fb0e8; stroke-width: 1.2; transform-box: fill-box; transform-origin: center; animation: g-ping 2.8s ease-out infinite; }
#gate-btn svg .tri { fill: #fff; stroke: none; filter: drop-shadow(0 0 5px #8fb8f0); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes g-breathe { 50% { transform: scale(1.07); opacity: .9; } }
@keyframes g-ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.9); opacity: 0; } }

.g-label {
  font-size: clamp(24px, 2.6vw, 40px); text-transform: uppercase;
  letter-spacing: .3em; text-indent: .3em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .95), 0 0 10px rgba(0, 0, 0, .8), 0 0 22px rgba(90, 150, 240, .55);
  transition: letter-spacing .35s cubic-bezier(.2, .8, .2, 1), text-indent .35s cubic-bezier(.2, .8, .2, 1), color .25s, text-shadow .25s;
}
#gate-btn:hover svg, #gate-btn:focus-visible svg { transform: scale(1.08); filter: drop-shadow(0 0 16px rgba(80, 140, 235, .7)); }
#gate-btn:hover .r2 circle, #gate-btn:focus-visible .r2 circle { stroke: #fff; }
#gate-btn:hover .halo, #gate-btn:focus-visible .halo { opacity: 1; }
#gate-btn:hover .tri, #gate-btn:focus-visible .tri { transform: translateX(2px); }
#gate-btn:hover .g-label, #gate-btn:focus-visible .g-label {
  color: #fff; letter-spacing: .38em; text-indent: .38em; text-shadow: 0 2px 12px rgba(0, 0, 0, .95), 0 0 14px #8fb8f0, 0 0 30px rgba(90, 150, 240, .8);
}
#gate-btn:active svg { transform: scale(1.02); }
#gate.leaving svg { transform: scale(2.1); opacity: 0; }

.g-hint {
  font-family: var(--mono); font-size: 12px; letter-spacing: .3em; text-indent: .3em; text-transform: uppercase;
  color: #b6d0f0; text-shadow: 0 1px 8px rgba(0, 0, 0, .9); animation: g-blink 2.4s ease-in-out infinite;
}
@keyframes g-blink { 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  #gate-btn svg *, .g-hint { animation: none !important; }
  #gate { transition: opacity .2s; }
}

/* ---------- UNDER CONSTRUCTION sign (persistent; sits on the background, behind windows and bars) ---------- */
#uc {
  position: fixed; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.uc-stack {
  display: flex; flex-direction: column; align-items: stretch; gap: .75em;
  perspective: 1000px;
  font-size: clamp(16px, 2.6vw, 40px);               /* em units below follow this */
}
.in-title.uc-title {
  opacity: 1; font-size: clamp(18px, 3vw, 46px); letter-spacing: .1em;
  align-self: center;
}
/* hazard-stripe bars: amber and near-black, stripes marching sideways, with a light sweep */
.uc-bar {
  position: relative; overflow: hidden; height: .55em; min-height: 9px;
  border: 1px solid rgba(240, 180, 50, .6);
  background: linear-gradient(135deg, #e9ad2e 25%, #0c0f18 25% 50%, #e9ad2e 50% 75%, #0c0f18 75%) 0 0 / 1.1em 1.1em;
  box-shadow: 0 0 16px rgba(233, 173, 46, .3), 0 0 40px rgba(233, 173, 46, .12);
  opacity: .92;
}
.uc-bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%) -120% 0 / 240% 100% no-repeat;
}
#uc.live .uc-bar { animation: uc-march 2.4s linear infinite; }
#uc.live .uc-bar::after { animation: uc-glint 3.6s ease-in-out 1s infinite; }
@keyframes uc-march { to { background-position: 1.1em 0; } }
@keyframes uc-glint { 0% { background-position: -120% 0; } 55%, 100% { background-position: 220% 0; } }

/* the sign keeps swaying gently once it is live (the ARCANE DRIFT title settles; this one doesn't fade) */
#uc.live .in-title { animation: uc-sway 8s ease-in-out infinite alternate; }
@keyframes uc-sway {
  from { transform: rotateX(4deg) rotateY(-13deg); }
  to   { transform: rotateX(4deg) rotateY(13deg); }
}

@media (prefers-reduced-motion: reduce) {
  #uc.live .uc-bar, #uc.live .uc-bar::after, #uc.live .in-title, #uc .in-title * { animation: none !important; }
}

/* ---------- Disabled menu (Category, for now) ---------- */
.menu > .menu-btn:disabled {
  color: #4a6682; text-shadow: none; opacity: .75; cursor: not-allowed;
  background: transparent;
}
.menu > .menu-btn:disabled::before, .menu > .menu-btn:disabled::after { display: none; }
.menu > .menu-btn:disabled:hover, .menu > .menu-btn:disabled:active { background: transparent; color: #4a6682; text-shadow: none; transform: none; }
