:root {
  --gold: #f3d68e;
  --cyan: #32e1f0;
  --magenta: #e050ff;
  --ink: #dfe9ff;
  --muted: #8fa6c8;
  --glass: rgba(7, 11, 24, 0.66);
  --bar-h: 48px;
  --task-h: 44px;
}
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;            /* nothing on the site scrolls */
  overscroll-behavior: none;
  background: #03040a;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#space {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}
body.no-webgl #space { display: none; }
body.no-webgl {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(224, 80, 255, 0.22), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(50, 225, 240, 0.2), transparent 55%),
    #03040a;
}

/* Top menu */
#menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--bar-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(10, 14, 30, 0.9), rgba(6, 8, 18, 0.75));
  border-bottom: 1px solid rgba(50, 225, 240, 0.35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}
.brand {
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.22em;
  color: #f5e6b8;
  text-shadow: 0 0 10px rgba(224, 80, 255, 0.6);
  white-space: nowrap;
}
.menu { display: flex; gap: 6px; flex-wrap: nowrap; }
.menu button {
  font: 600 12px/1 "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.14em;
  color: #cfe9ff;
  background: rgba(50, 225, 240, 0.06);
  border: 1px solid rgba(50, 225, 240, 0.35);
  border-radius: 3px;
  padding: 10px 14px;
  cursor: pointer;
  transition: color .18s, border-color .18s, box-shadow .18s, transform .18s;
}
.menu button:hover,
.menu button:focus-visible {
  color: #fff;
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(50, 225, 240, 0.28);
  transform: translateY(-1px);
  outline: none;
}
.menu .gold {
  color: #fbe3a0;
  border-color: rgba(243, 214, 142, 0.85);
  background: linear-gradient(120deg, rgba(224, 80, 255, 0.22), rgba(50, 225, 240, 0.16));
  text-shadow: 0 0 6px rgba(255, 220, 140, 0.45);
}
.clock {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* Desktop surface */
#desktop {
  position: fixed;
  top: var(--bar-h);
  bottom: var(--task-h);
  left: 0; right: 0;
  z-index: 1;
  overflow: hidden;
}
.welcome {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
/* THE VEIL: a solid gold metal logo, tilted into 3D with a stacked extrusion and a moving sheen */
.welcome-title {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: clamp(40px, 8vw, 112px);
  letter-spacing: 0.2em;
  line-height: 1.1;
  padding: 0 0.2em;
  position: relative;
  color: transparent;
  background: linear-gradient(180deg, #fffdf2 0%, #f7dc8e 28%, #b0822f 48%, #fbe7a8 56%, #d9b064 74%, #7a5620 100%);
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  transform: perspective(900px) rotateX(16deg);
  transform-origin: 50% 80%;
  filter:
    drop-shadow(0 1px 0 #6b4a18)
    drop-shadow(0 2px 0 #5c3f14)
    drop-shadow(0 3px 0 #4d3410)
    drop-shadow(0 4px 0 #3e2a0c)
    drop-shadow(0 5px 0 #301f08)
    drop-shadow(0 6px 0 #241606)
    drop-shadow(0 22px 26px rgba(0, 0, 0, 0.85))
    drop-shadow(0 0 22px rgba(243, 214, 142, 0.25));
  animation: veilFloat 7s ease-in-out infinite;
}
.welcome-title::after {
  content: attr(data-text);
  position: absolute;
  left: 0; right: 0; top: 0;
  padding: inherit;
  letter-spacing: inherit;
  font: inherit;
  text-align: center;
  inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.85) 50%, transparent 65%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: veilSheen 4.5s ease-in-out infinite;
  pointer-events: none;
}
.welcome { perspective: 1200px; }
@keyframes veilFloat {
  0%, 100% { transform: perspective(900px) rotateX(16deg) translateY(0); }
  50% { transform: perspective(900px) rotateX(12deg) translateY(-6px); }
}
@keyframes veilSheen {
  0% { background-position: 150% 0; }
  60%, 100% { background-position: -150% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-title, .welcome-title::after { animation: none; }
}
.welcome-sub {
  margin-top: 14px;
  color: var(--muted);
  letter-spacing: 0.2em;
  font-size: 13px;
}

/* Taskbar */
#taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--task-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: rgba(6, 8, 18, 0.85);
  border-top: 1px solid rgba(50, 225, 240, 0.3);
  overflow: hidden;
}
.task {
  font: 600 11px/1 "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.12em;
  color: #cfe9ff;
  background: rgba(50, 225, 240, 0.06);
  border: 1px solid rgba(50, 225, 240, 0.3);
  border-radius: 3px;
  padding: 9px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.task.active { border-color: var(--gold); color: #fbe3a0; }

/* Windows: 3D depth, glass frame, animated open/close/minimise */
.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: var(--glass);
  border: 1px solid rgba(50, 225, 240, 0.45);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65), 0 0 26px rgba(224, 80, 255, 0.18);
  overflow: hidden;
  backdrop-filter: blur(14px) saturate(1.2);
  opacity: 0;
  transform: perspective(1400px) rotateX(10deg) scale(0.94) translateZ(-60px);
  transition: opacity .28s ease, transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .2s ease, border-color .2s ease;
}
.win.open { opacity: 1; transform: perspective(1400px) rotateX(0) scale(1) translateZ(0); }
.win.closing { opacity: 0; transform: perspective(1400px) rotateX(-8deg) scale(0.9) translateZ(-90px); }
.win.min { opacity: 0; pointer-events: none; transform: perspective(1400px) scale(0.6) translateY(45vh); }
.win.active {
  border-color: rgba(243, 214, 142, 0.75);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(243, 214, 142, 0.22);
}
.win.dragging { transition: none; }
.win-bar {
  flex: 0 0 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  background: linear-gradient(90deg, rgba(40, 10, 70, 0.85), rgba(8, 30, 44, 0.85));
  border-bottom: 1px solid rgba(243, 214, 142, 0.35);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.win-bar:active { cursor: grabbing; }
.win-title {
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.16em;
  font-size: 13px;
  color: #f5e6b8;
}
.win-btns { display: flex; gap: 6px; }
.win-btns button {
  width: 30px; height: 24px;
  background: none;
  color: #cfe9ff;
  border: 1px solid rgba(50, 225, 240, 0.35);
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.win-btns button:hover { border-color: var(--cyan); }
.win-btns .win-close:hover { border-color: #ff5c8a; color: #ff9ab8; }
.win-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;   /* content is laid out to fit; no scroll bars */
  padding: 16px;
}

/* Placeholder layouts for the apps that get built next */
.dim { color: var(--muted); margin: 6px 0; line-height: 1.5; }
.win h4 {
  margin: 0 0 8px;
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.12em;
  color: #f5e6b8;
  font-size: 13px;
}
.panel {
  height: 100%;
  background: rgba(3, 6, 14, 0.6);
  border: 1px solid rgba(50, 225, 240, 0.2);
  border-radius: 6px;
  padding: 12px;
  overflow: hidden;
}
.chat-grid { height: 100%; display: grid; grid-template-columns: 200px 1fr 190px; gap: 12px; }
.stub { height: 100%; display: grid; place-content: center; text-align: center; }
.stub-title {
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.18em;
  font-size: 22px;
  color: #fbe3a0;
  text-shadow: 0 0 12px rgba(224, 80, 255, 0.5);
}
.enter-btn {
  margin-top: 18px;
  font: 700 13px/1 "Segoe UI", sans-serif;
  letter-spacing: 0.2em;
  color: #fbe3a0;
  background: linear-gradient(120deg, rgba(224, 80, 255, 0.25), rgba(50, 225, 240, 0.2));
  border: 1px solid rgba(243, 214, 142, 0.8);
  border-radius: 3px;
  padding: 14px 22px;
  cursor: not-allowed;
  opacity: 0.8;
}

/* Small screens: windows fill the desktop, the menu wraps onto two rows */
@media (max-width: 760px) {
  :root { --bar-h: 92px; }
  #menubar { flex-wrap: wrap; align-content: center; gap: 8px 10px; padding: 8px 10px; }
  .brand { font-size: 14px; }
  .clock { display: none; }
  .menu { flex-wrap: wrap; justify-content: center; width: 100%; gap: 6px; }
  .menu button { padding: 9px 10px; font-size: 11px; }
  .win { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
  .win-bar { cursor: default; }
  .chat-grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
}
@media (prefers-reduced-motion: reduce) {
  .win, .win.open, .win.closing, .win.min { transition: opacity .2s linear; transform: none; }
}

/* Music player */
.mp { height: 100%; display: grid; grid-template-columns: minmax(270px, 0.95fr) 1.05fr; gap: 14px; }
.mp-left, .mp-right { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.mp-lcd {
  background: linear-gradient(180deg, #02060c, #041421);
  border: 1px solid rgba(50, 225, 240, 0.5);
  border-radius: 6px;
  padding: 12px 14px;
  box-shadow: inset 0 0 18px rgba(50, 225, 240, 0.15), 0 0 16px rgba(50, 225, 240, 0.2);
  font-family: Consolas, "Courier New", monospace;
}
.mp-title {
  color: #7ff7ff; font-size: 17px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(50, 225, 240, 0.8);
}
.mp-sub { color: #e28bff; font-size: 11px; letter-spacing: 0.12em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-time {
  font-size: 30px; color: #fbe3a0; margin-top: 6px;
  text-shadow: 0 0 10px rgba(243, 214, 142, 0.6);
  font-variant-numeric: tabular-nums;
}
.mp-viz {
  flex: 1; min-height: 90px; width: 100%;
  border-radius: 6px;
  background: rgba(2, 5, 12, 0.7);
  border: 1px solid rgba(224, 80, 255, 0.3);
}
.mp-seek { width: 100%; accent-color: #e050ff; }
.mp-transport { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mp button {
  font: 600 12px/1 "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.08em;
  color: #cfe9ff;
  background: rgba(50, 225, 240, 0.06);
  border: 1px solid rgba(50, 225, 240, 0.35);
  border-radius: 3px;
  padding: 9px 11px;
  cursor: pointer;
  transition: color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.mp button:hover:not(:disabled), .mp button:focus-visible {
  color: #fff; border-color: var(--cyan); box-shadow: 0 0 12px rgba(50, 225, 240, 0.45); outline: none;
}
.mp button:disabled { opacity: 0.35; cursor: default; }
.mp .mp-big { padding: 9px 20px; color: #fbe3a0; border-color: rgba(243, 214, 142, 0.85); background: linear-gradient(120deg, rgba(224, 80, 255, 0.22), rgba(50, 225, 240, 0.16)); }
.mp .mp-tog.on { border-color: var(--gold); color: #fbe3a0; }
.mp-vol { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.12em; color: var(--muted); }
.mp-vol input { flex: 1; accent-color: #32e1f0; }
.mp-status { font-size: 12px; color: var(--muted); min-height: 16px; }
.mp-search { display: flex; gap: 10px; align-items: center; }
.mp-search input {
  flex: 1; min-width: 0;
  background: rgba(3, 6, 14, 0.7);
  border: 1px solid rgba(50, 225, 240, 0.35);
  color: var(--ink);
  padding: 9px 10px;
  border-radius: 4px;
  font: inherit;
}
.mp-search input:focus { outline: none; border-color: var(--gold); }
.mp-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; overflow: hidden; }
.mp-list li {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 4px;
  background: rgba(50, 225, 240, 0.04);
  border: 1px solid transparent;
  cursor: pointer; font-size: 13px;
  transition: background .15s, border-color .15s, transform .15s;
}
.mp-list li:hover { background: rgba(224, 80, 255, 0.1); border-color: rgba(224, 80, 255, 0.35); transform: translateX(3px); }
.mp-list li.now { border-color: rgba(243, 214, 142, 0.75); background: linear-gradient(90deg, rgba(243, 214, 142, 0.14), transparent); }
.mp-list li.mp-empty { display: block; text-align: center; color: var(--muted); background: none; border: none; cursor: default; padding: 24px 10px; transform: none; }
.mp-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.mp-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-a { color: var(--muted); font-size: 12px; white-space: nowrap; max-width: 36%; overflow: hidden; text-overflow: ellipsis; }
.mp-pager { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); letter-spacing: 0.1em; min-height: 28px; }
.mp-pager button { padding: 5px 10px; }
@media (max-width: 760px) {
  .mp { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .mp-viz { min-height: 60px; flex: 0 0 70px; }
  .mp-time { font-size: 24px; }
}

/* ===== 3026 interface: deep space, cool chrome, glass panels, cut corners ===== */
:root {
  --ink: #e6f4fb;
  --muted: #7d98aa;
  --line: rgba(150, 215, 240, 0.22);
  --accent: #7fe3ff;
  --gold: #e9d9a6;
}
body { background: #02040a; }
body::before {
  /* faint HUD grid and scanlines over the scene, under the windows */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(120, 210, 240, 0.035) 0 1px, transparent 1px 4px),
    linear-gradient(rgba(120, 210, 240, 0.045) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(120, 210, 240, 0.045) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, transparent 85%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, transparent 85%);
}

/* Top bar */
#menubar {
  background: linear-gradient(180deg, rgba(8, 13, 22, 0.78), rgba(5, 8, 14, 0.55));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px) saturate(1.2);
  padding: 0 22px;
}
.brand {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.34em;
  color: var(--ink);
  text-shadow: none;
}
.menu { gap: 4px; }
.menu button,
.menu .gold {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #bfe3f1;
  background: rgba(127, 227, 255, 0.04);
  border: none;
  border-radius: 0;
  padding: 11px 16px;
  box-shadow: inset 0 0 0 1px rgba(127, 227, 255, 0.22);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  text-shadow: none;
  transform: none;
}
.menu button:hover,
.menu button:focus-visible {
  color: #ffffff;
  background: rgba(127, 227, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(127, 227, 255, 0.7), 0 0 18px rgba(127, 227, 255, 0.2);
  transform: none;
}
.menu .gold { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(233, 217, 166, 0.45); }
.menu .gold:hover { background: rgba(233, 217, 166, 0.12); box-shadow: inset 0 0 0 1px rgba(233, 217, 166, 0.85), 0 0 18px rgba(233, 217, 166, 0.2); }
.clock {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* Title: chrome with a mirror reflection and a single light sweep */
.welcome-title {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: clamp(40px, 7.4vw, 104px);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  line-height: 1.05;
  padding: 0;
  color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, #e4f6ff 42%, #8fb8cc 50%, #f2fbff 56%, #6f96aa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 22px rgba(127, 227, 255, 0.18));
  transform: perspective(1000px) rotateX(10deg);
  transform-origin: 50% 100%;
  -webkit-box-reflect: below 10px linear-gradient(transparent 58%, rgba(255, 255, 255, 0.28));
  animation: veilIn 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.welcome-title::after { display: none; }
.welcome-sub {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 28px;
  animation: veilIn 2.4s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes veilIn {
  from { opacity: 0; transform: perspective(1000px) rotateX(22deg) translateY(16px); filter: blur(8px) drop-shadow(0 0 22px rgba(127, 227, 255, 0.18)); }
  to   { opacity: 1; transform: perspective(1000px) rotateX(10deg) translateY(0); filter: drop-shadow(0 0 22px rgba(127, 227, 255, 0.18)); }
}

/* Glass windows: frosted, lit from above, cut corners */
.win {
  background: linear-gradient(180deg, rgba(22, 32, 46, 0.66), rgba(7, 11, 19, 0.74));
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(1.1);
}
.win.active {
  border-color: rgba(127, 227, 255, 0.5);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(127, 227, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.win-bar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  border-bottom: 1px solid var(--line);
}
.win-title {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: var(--ink);
}
.win-btns button { border-radius: 0; border-color: var(--line); color: var(--muted); font-family: "JetBrains Mono", Consolas, monospace; }
.win-btns button:hover { border-color: var(--accent); color: var(--ink); }
.win-btns .win-close:hover { border-color: #ff7b8f; color: #ffb3bf; }
.win h4 { font-family: "Orbitron", "Segoe UI", sans-serif; font-weight: 500; letter-spacing: 0.2em; color: var(--ink); }
.panel { background: rgba(4, 8, 14, 0.5); border: 1px solid var(--line); border-radius: 2px; }
.dim { color: var(--muted); font-size: 13px; }
.stub-title { font-family: "Orbitron", "Segoe UI", sans-serif; font-weight: 500; letter-spacing: 0.26em; color: var(--ink); text-shadow: none; }
.enter-btn {
  font-family: "JetBrains Mono", Consolas, monospace;
  letter-spacing: 0.24em;
  color: var(--ink);
  background: rgba(127, 227, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 0;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

/* Taskbar */
#taskbar {
  background: linear-gradient(180deg, rgba(8, 13, 22, 0.7), rgba(4, 7, 12, 0.85));
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.task {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #bfe3f1;
  background: rgba(127, 227, 255, 0.05);
  border: none;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(127, 227, 255, 0.22);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.task.active { color: #ffffff; box-shadow: inset 0 -2px 0 var(--accent), inset 0 0 0 1px rgba(127, 227, 255, 0.5); }

@media (max-width: 760px) {
  .welcome-title { letter-spacing: 0.18em; text-indent: 0.18em; }
}

/* Site pages (windows) */
.menu button { font-size: 10px; padding: 10px 11px; letter-spacing: 0.16em; }
.pg { height: 100%; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.pg-kicker { font-family: "JetBrains Mono", Consolas, monospace; font-size: 10px; letter-spacing: 0.3em; color: var(--accent); opacity: 0.85; }
.pg-title { margin: 0; font-family: "Orbitron", "Segoe UI", sans-serif; font-weight: 500; font-size: clamp(22px, 3vw, 34px); letter-spacing: 0.14em; color: var(--ink); }
.pg-hero { margin: 8px 0 0; font-family: "Orbitron", "Segoe UI", sans-serif; font-weight: 500; font-size: clamp(30px, 5vw, 64px); letter-spacing: 0.16em; line-height: 1.1; color: var(--ink); }
.pg-hero span { display: block; background: linear-gradient(180deg, #ffffff, #8fb8cc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pg-home { justify-content: center; }
.pg-rule { width: 240px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.pg-lead { margin: 0; font-family: "Orbitron", "Segoe UI", sans-serif; letter-spacing: 0.3em; color: var(--gold); font-size: 14px; }
.pg-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.pg-actions button, .pg-row button, .pg-link, .pg-form button {
  font-family: "JetBrains Mono", Consolas, monospace; font-size: 11px; font-weight: 600; letter-spacing: 0.2em;
  color: var(--ink); background: rgba(127, 227, 255, 0.06); border: none; padding: 12px 16px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(127, 227, 255, 0.3);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  text-decoration: none; display: inline-block;
}
.pg-actions button:hover, .pg-row button:hover, .pg-link:hover, .pg-form button:hover { background: rgba(127, 227, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(127, 227, 255, 0.7); }
.pg-actions button:disabled, .pg-row button:disabled { opacity: 0.4; cursor: default; }
.pg-ghost { background: none !important; color: var(--muted) !important; }
.pg-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; height: 100%; min-height: 0; }
.pg-gallery, .pg-info { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.pg-frame { position: relative; flex: 1; min-height: 0; background: #05080f; border: 1px solid var(--line); overflow: hidden; }
.pg-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-fallback { position: absolute; inset: 0; display: grid; place-content: center; color: var(--muted); letter-spacing: 0.3em; font-family: "JetBrains Mono", Consolas, monospace; }
.pg-count { position: absolute; right: 10px; bottom: 8px; font-family: "JetBrains Mono", Consolas, monospace; font-size: 11px; color: var(--ink); background: rgba(0,0,0,.5); padding: 4px 8px; }
.pg-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pg-specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.pg-specs div { border-left: 1px solid var(--line); padding-left: 10px; }
.pg-specs dt { font-family: "JetBrains Mono", Consolas, monospace; font-size: 10px; letter-spacing: 0.2em; color: var(--muted); }
.pg-specs dd { margin: 3px 0 0; font-size: 14px; color: var(--ink); }
.pg-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-family: "JetBrains Mono", Consolas, monospace; font-size: 11px; color: #bfe3f1; }
.pg-note { font-size: 13px; color: var(--gold); }
.pg-names { margin: 0; padding-left: 22px; columns: 3; color: var(--ink); line-height: 1.9; overflow: hidden; max-height: 100%; }
.pg-form { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.pg-form label { display: flex; flex-direction: column; gap: 5px; font-family: "JetBrains Mono", Consolas, monospace; font-size: 10px; letter-spacing: 0.2em; color: var(--muted); }
.pg-form label.jn-in { flex-direction: row; align-items: center; gap: 8px; }
.pg-form input, .pg-form select { background: rgba(3, 6, 14, 0.7); border: 1px solid var(--line); color: var(--ink); padding: 10px; font: 14px "Segoe UI", system-ui, sans-serif; border-radius: 0; }
.pg-form input:focus, .pg-form select:focus { outline: none; border-color: var(--accent); }
.pg-form label[hidden] { display: none; }
.pg-error { min-height: 18px; margin: 0; color: #ff9aa8; font-size: 13px; }
@media (max-width: 760px) {
  .pg-split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow: hidden; }
  .pg-names { columns: 2; }
  .pg-levels, .pg-specs { grid-template-columns: 1fr; }
}


/* ===== Professional theme: readable, calm, system fonts only (works offline) ===== */
:root {
  --ink: #e9eef4;
  --muted: #aab6c4;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #9cc4e4;
  --gold: #e0cb93;
}
html, body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}
#space { opacity: 0.28; }
body::before { display: none; }
body.no-webgl { background: #0c1117; }

#menubar {
  background: rgba(12, 16, 22, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: none;
  gap: 14px;
  padding: 0 18px;
}
.brand {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-shadow: none;
}
.menu { gap: 2px; }
.menu button,
.menu .gold {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #c9d4e0;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 8px 11px;
  box-shadow: none;
  clip-path: none;
  text-shadow: none;
}
.menu button:hover,
.menu button:focus-visible,
.menu .gold:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  transform: none;
  outline: none;
}
.menu .gold { color: var(--gold); }
.clock {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.welcome-title {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(36px, 5vw, 68px);
  letter-spacing: 0.04em;
  line-height: 1.2;
  padding: 0;
  color: var(--ink);
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: var(--ink);
  filter: none;
  transform: none;
  -webkit-box-reflect: none;
  animation: none;
}
.welcome-title::after { display: none; }
.welcome-sub {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
  margin-top: 14px;
  animation: none;
}

.win {
  background: rgba(20, 26, 35, 0.97);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: none;
}
.win.active {
  border-color: rgba(156, 196, 228, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.win-bar {
  height: 42px;
  flex: 0 0 42px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
  padding: 0 10px 0 16px;
}
.win-title {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}
.win-btns button {
  width: 34px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--muted);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
}
.win-btns button:hover { background: rgba(255, 255, 255, 0.08); border: none; color: #fff; }
.win-btns .win-close:hover { background: #8a2b36; color: #fff; }
.win-body { padding: 22px; }
.win h4 {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}
.panel { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); border-radius: 6px; }
.dim { color: var(--muted); font-size: 14px; line-height: 1.6; }

.pg-kicker {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 1;
}
.pg-title {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0;
  color: var(--ink);
}
.pg-hero {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(32px, 4.5vw, 56px);
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: var(--ink);
}
.pg-hero span { display: block; background: none; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-fill-color: var(--ink); color: var(--ink); font-weight: 600; }
.pg-rule { width: 120px; height: 1px; background: rgba(156, 196, 228, 0.5); }
.pg-lead { font-family: "Segoe UI", system-ui, sans-serif; font-size: 16px; font-weight: 600; letter-spacing: 0.02em; color: var(--gold); }
.pg-actions { gap: 10px; }
.pg-actions button, .pg-row button, .pg-link, .pg-form button {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  background: rgba(156, 196, 228, 0.14);
  border: 1px solid rgba(156, 196, 228, 0.35);
  border-radius: 6px;
  padding: 10px 16px;
  box-shadow: none;
  clip-path: none;
}
.pg-actions button:hover, .pg-row button:hover, .pg-link:hover, .pg-form button:hover {
  background: rgba(156, 196, 228, 0.24);
  box-shadow: none;
}
.pg-actions button:disabled, .pg-row button:disabled { opacity: 0.5; }
.pg-ghost { background: none !important; border: 1px solid var(--line) !important; color: var(--muted) !important; }
.pg-specs dt {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.pg-specs dd { font-size: 15px; line-height: 1.5; color: var(--ink); }
.pg-specs div { border-left: 2px solid rgba(156, 196, 228, 0.35); }
.pg-levels { font-family: "Segoe UI", system-ui, sans-serif; font-size: 14px; color: var(--ink); line-height: 1.8; }
.pg-count { font-family: "Segoe UI", system-ui, sans-serif; font-size: 13px; background: rgba(0, 0, 0, 0.6); border-radius: 4px; }
.pg-fallback { font-family: "Segoe UI", system-ui, sans-serif; letter-spacing: 0; color: var(--muted); font-size: 16px; }
.pg-frame { border: 1px solid var(--line); border-radius: 6px; }
.pg-names { font-size: 15px; line-height: 1.9; }
.pg-note { font-size: 14px; color: var(--gold); }
.pg-form label {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}
.pg-form input, .pg-form select {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: var(--ink);
  padding: 10px 12px;
}
.pg-form input:focus, .pg-form select:focus { border-color: var(--accent); }
.pg-error { font-size: 14px; color: #f2a3ad; }
.stub-title {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  text-shadow: none;
}
.enter-btn {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: 6px;
  clip-path: none;
  background: rgba(156, 196, 228, 0.12);
  border: 1px solid var(--line);
}

#taskbar {
  background: rgba(12, 16, 22, 0.97);
  border-top: 1px solid var(--line);
  backdrop-filter: none;
  padding: 0 12px;
}
.task {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: #c9d4e0;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  box-shadow: none;
  clip-path: none;
}
.task.active { background: rgba(156, 196, 228, 0.2); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

/* Music player: same layout, readable type */
.mp-title { font-family: "Segoe UI", system-ui, sans-serif; font-weight: 600; font-size: 17px; letter-spacing: 0; color: var(--ink); text-shadow: none; }
.mp-sub, .mp-status, .mp-count, .mp-a, .mp-vol, .mp-pager { font-family: "Segoe UI", system-ui, sans-serif; letter-spacing: 0; font-size: 13px; color: var(--muted); }
.mp-lcd { background: #0b1017; border-color: var(--line); box-shadow: none; font-family: "Segoe UI", system-ui, sans-serif; }
.mp-time { font-family: "Segoe UI", system-ui, sans-serif; font-weight: 300; color: var(--ink); text-shadow: none; }
.mp-viz { border-color: var(--line); background: #0b1017; }
.mp button { font-family: "Segoe UI", system-ui, sans-serif; font-size: 13px; letter-spacing: 0; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--ink); }
.mp .mp-big { color: var(--ink); background: rgba(156, 196, 228, 0.18); border-color: rgba(156, 196, 228, 0.45); }
.mp .mp-tog.on { border-color: rgba(224, 203, 147, 0.7); color: var(--gold); }
.mp-list li { font-size: 14px; }
.mp-list li.now { border-color: rgba(224, 203, 147, 0.6); }
.mp-search input { font-family: "Segoe UI", system-ui, sans-serif; font-size: 14px; border: 1px solid var(--line); }


/* ===== Menu groups and horizontal submenus ===== */
.menu .mg-btn .caret { font-size: 10px; opacity: 0.7; margin-left: 2px; }
.menu .mg-btn.open { color: #ffffff; background: rgba(255, 255, 255, 0.1); }
.substrip {
  position: fixed;
  top: var(--bar-h);
  left: 0; right: 0;
  z-index: 1001;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px 18px;
  min-height: 44px;
  background: rgba(16, 22, 30, 0.98);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.substrip[hidden] { display: none; }
.substrip button {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #c9d4e0;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}
.substrip button:hover, .substrip button:focus-visible {
  background: rgba(156, 196, 228, 0.16);
  color: #ffffff;
  outline: none;
}
@media (max-width: 760px) {
  .substrip { padding: 6px 10px; }
  .substrip button { font-size: 12px; padding: 7px 9px; }
}

/* MMORPG window: the Citadel game fills the window edge to edge */
.win.win-mmo { background: #05060c; backdrop-filter: none; }
.win-mmo .win-body { padding: 0; background: #05060c; }
.mmo, .mmo-frame { display: block; width: 100%; height: 100%; border: 0; }
.win.dragging .mmo-frame, .win.min .mmo-frame { pointer-events: none; }

/* ===== Menu buttons: hover animation, and a lit state for the menu that is open =====
   Lit means its dropdown is open, or its window is the one in front. */
.menu button {
  position: relative;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.menu button::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px; bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
}
.menu button:hover,
.menu button:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}
.menu button:hover::after,
.menu button:focus-visible::after { opacity: 0.75; transform: scaleX(1); }
.menu button:active { transform: translateY(0); }
.menu button.lit,
.menu .mg-btn.open {
  color: #ffffff;
  background: rgba(156, 196, 228, 0.16);
  box-shadow: inset 0 0 0 1px rgba(156, 196, 228, 0.35);
}
.menu button.lit::after,
.menu .mg-btn.open::after { opacity: 1; transform: scaleX(1); }
/* while a dropdown is open, it is the selected menu; the window in front keeps only its underline */
.menu.strip-open button.lit:not(.open) { color: #c9d4e0; background: transparent; box-shadow: none; }
.menu.strip-open button.lit:not(.open)::after { opacity: 0.45; }
.menu .gold::after { background: var(--gold); }
.menu .gold.lit,
.menu .gold:hover { color: var(--gold); background: rgba(224, 203, 147, 0.14); box-shadow: inset 0 0 0 1px rgba(224, 203, 147, 0.4); }
.menu .mg-btn .caret { display: inline-block; transition: transform .22s ease; }
.menu .mg-btn.open .caret { transform: rotate(180deg); }
.substrip button { position: relative; transition: color .18s ease, background-color .18s ease; }
.substrip button.lit { color: #ffffff; background: rgba(156, 196, 228, 0.16); box-shadow: inset 0 -2px 0 var(--accent); }
.substrip.anim { animation: strip-in .22s cubic-bezier(.2, .8, .2, 1); }
.substrip.anim button { animation: strip-item .28s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
.substrip.out { opacity: 0; transform: translateY(-6px); transition: opacity .15s ease, transform .15s ease; }
@keyframes strip-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes strip-item { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .menu button, .menu button::after, .menu .mg-btn .caret, .substrip button { transition: none; }
  .menu button:hover, .menu button:focus-visible { transform: none; }
  .substrip.anim, .substrip.anim button { animation: none; }
  .substrip.out { transition: none; }
}

/* ===== Compact submenu and centred button text =====
   Every menu button has a fixed height with its text centred both ways; the accent line
   sits on the box's bottom edge so it never crowds the words. The submenu is a small bar
   that hugs its items and sits under the button that opened it. */
.menu button,
.menu .gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  line-height: 1;
  text-align: center;
}
.menu .mg-btn .caret { margin: 0; line-height: 1; font-size: 9px; }
.menu button::after { left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; }
.substrip {
  top: calc(var(--bar-h) + 4px);
  left: 12px;
  right: auto;
  width: max-content;
  max-width: calc(100vw - 24px);
  min-height: 0;
  padding: 4px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 22, 30, 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.substrip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  line-height: 1;
  text-align: center;
}
.substrip button.lit { box-shadow: inset 0 -2px 0 var(--accent); }

/* ===== Menu bar layout: creator sections on the left; company, contact and account on the right ===== */
#menubar .brand {
  flex: none;
  background: none;
  border: 0;
  padding: 0 6px 0 0;
  cursor: pointer;
  transition: color .18s ease, opacity .18s ease;
}
#menubar .brand:hover, #menubar .brand:focus-visible { color: #ffffff; outline: none; opacity: 0.85; }
.menu-right { margin-left: auto; align-items: center; }
.clock { margin-left: 6px; }
.acct { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.menu .icon-btn { width: 34px; padding: 0; font-size: 16px; }
.menu .join-btn {
  color: #14171d;
  background: var(--gold);
  font-weight: 600;
  padding: 0 16px;
}
.menu .join-btn::after { display: none; }
.menu .join-btn:hover, .menu .join-btn:focus-visible, .menu .join-btn.lit {
  color: #14171d;
  background: #f0dda8;
  box-shadow: 0 0 0 1px rgba(224, 203, 147, 0.6), 0 4px 14px rgba(224, 203, 147, 0.25);
}
.menu .me-btn { max-width: 190px; }
.menu .me-btn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; }
.soon-tag {
  margin-left: 8px;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
}
@media (max-width: 1360px) { .clock { display: none; } }
@media (max-width: 1180px) {
  .menu button, .menu .gold { padding: 0 9px; font-size: 12px; }
  #menubar { gap: 8px; }
}
@media (max-width: 760px) {
  :root { --bar-h: 128px; }
  .menu-right { margin-left: 0; }
}

/* =====================================================================
   SCI-FI MENU BAR (2027 refresh)
   Glass bar with a light sweeping along its edge; HUD corner brackets on hover;
   one gliding light under the menus that follows the pointer and rests under
   the open or active menu; dropdown panels that open with a sweep and blur-in.
   Fonts are ones Windows already has (Bahnschrift, Cascadia), so nothing downloads.
   ===================================================================== */
:root {
  --sf-font: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --sf-mono: "Cascadia Mono", "Cascadia Code", Consolas, monospace;
  --sf-cyan: #7fe3ff;
  --sf-violet: #a78bfa;
  --sf-gold: #e0cb93;
  --sf-ink: #eaf4fb;
  --sf-dim: #a3b6c9;
  --sf-panel: rgba(9, 14, 23, 0.94);
}
@property --sf-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

#menubar {
  background: linear-gradient(180deg, rgba(9, 14, 24, 0.84), rgba(6, 10, 18, 0.7));
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border-bottom: 1px solid rgba(127, 227, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
#menubar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(127, 227, 255, 0) 32%, rgba(127, 227, 255, 0.8) 46%, rgba(167, 139, 250, 0.8) 54%, rgba(127, 227, 255, 0) 68%, transparent 100%);
  background-size: 260% 100%;
  animation: sf-sweep 9s linear infinite;
  opacity: 0.65;
  pointer-events: none;
}
@keyframes sf-sweep { from { background-position: 130% 0; } to { background-position: -130% 0; } }

/* brand: the Veil eye and the name */
#menubar .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sf-font);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--sf-ink);
}
#menubar .brand:hover, #menubar .brand:focus-visible { color: #ffffff; opacity: 1; text-shadow: 0 0 14px rgba(127, 227, 255, 0.45); }
.brand-mark {
  position: relative;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--sf-gold);
  box-shadow: 0 0 10px rgba(127, 227, 255, 0.3);
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 4.5px;
  border-radius: 50%;
  background: radial-gradient(circle, #0b1220 32%, #4fb6ff 36%, #1d6aa8 100%);
  animation: sf-pulse 3.6s ease-in-out infinite;
}
@keyframes sf-pulse { 50% { box-shadow: 0 0 10px 2px rgba(79, 182, 255, 0.65); } }

/* menu buttons */
#menubar .menu { gap: 2px; }
#menubar .menu button,
#menubar .menu .gold {
  height: 36px;
  padding: 0 13px;
  font-family: var(--sf-font);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--sf-dim);
  background: transparent;
  border-radius: 4px;
  box-shadow: none;
  transform: none;
  transition: color .2s ease, text-shadow .2s ease;
}
#menubar .menu button::after { display: none; }
#menubar .menu button::before {
  --c: rgba(127, 227, 255, 0.6);
  --f: rgba(127, 227, 255, 0.06);
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) left top / 8px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1px 8px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 8px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 1px 8px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 8px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 1px 8px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 8px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 1px 8px no-repeat,
    linear-gradient(var(--f), var(--f));
  opacity: 0;
  transform: scale(1.1);
  transition: opacity .2s ease, transform .28s cubic-bezier(.2, .8, .2, 1);
}
#menubar .menu button:hover,
#menubar .menu button:focus-visible,
#menubar .menu button.lit,
#menubar .menu .mg-btn.open {
  color: #ffffff;
  background: transparent;
  box-shadow: none;
  transform: none;
  outline: none;
  text-shadow: 0 0 12px rgba(127, 227, 255, 0.45);
}
#menubar .menu button:hover::before,
#menubar .menu button:focus-visible::before,
#menubar .menu button.lit::before,
#menubar .menu .mg-btn.open::before { opacity: 1; transform: scale(1); }
#menubar .menu .gold { color: var(--sf-gold); }
#menubar .menu .gold::before { --c: rgba(224, 203, 147, 0.7); --f: rgba(224, 203, 147, 0.07); }
#menubar .menu .gold:hover, #menubar .menu .gold.lit { color: #f6e7bd; background: transparent; box-shadow: none; text-shadow: 0 0 12px rgba(224, 203, 147, 0.45); }
#menubar .menu.strip-open button.lit:not(.open) { color: var(--sf-dim); text-shadow: none; }
#menubar .menu.strip-open button.lit:not(.open)::before { opacity: 0.35; }
#menubar .menu .mg-btn .caret { font-size: 9px; opacity: 0.7; }

/* the gliding light */
.menu-beam {
  position: absolute;
  left: 0; bottom: -1px;
  width: 40px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--sf-cyan) 18%, #d5f6ff 50%, var(--sf-cyan) 82%, transparent);
  box-shadow: 0 0 10px rgba(127, 227, 255, 0.85), 0 0 24px rgba(127, 227, 255, 0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), width .4s cubic-bezier(.2, .8, .2, 1), opacity .25s ease;
}
.menu-beam.on { opacity: 1; }
.menu-beam.gold {
  background: linear-gradient(90deg, transparent, var(--sf-gold) 18%, #fff3cf 50%, var(--sf-gold) 82%, transparent);
  box-shadow: 0 0 10px rgba(224, 203, 147, 0.85), 0 0 24px rgba(224, 203, 147, 0.4);
}

/* right side: music and account */
#menubar .menu-right { gap: 8px; }
#menubar .menu .icon-btn { width: 38px; padding: 0; }
.icon-btn .note { width: 17px; height: 17px; fill: currentColor; }
.icon-btn .eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.icon-btn .eq i { width: 3px; height: 6px; border-radius: 1px; background: var(--sf-cyan); box-shadow: 0 0 6px rgba(127, 227, 255, 0.6); animation: sf-eq .9s ease-in-out infinite; }
.icon-btn .eq i:nth-child(2) { animation-delay: -.3s; }
.icon-btn .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes sf-eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.icon-btn.playing .note { display: none; }
.icon-btn.playing .eq { display: inline-flex; }

#menubar .menu .acct-btn {
  gap: 9px;
  height: 38px;
  padding: 0 14px 0 5px;
  border: 1px solid transparent;
  border-radius: 19px;
  letter-spacing: 0.12em;
  color: var(--sf-ink);
  background:
    linear-gradient(rgba(10, 16, 26, 0.96), rgba(10, 16, 26, 0.96)) padding-box,
    conic-gradient(from var(--sf-angle), rgba(127, 227, 255, 0.75), rgba(167, 139, 250, 0.55), rgba(224, 203, 147, 0.75), rgba(127, 227, 255, 0.75)) border-box;
  animation: sf-spin 7s linear infinite;
  transition: box-shadow .25s ease, color .2s ease;
}
@keyframes sf-spin { to { --sf-angle: 360deg; } }
#menubar .menu .acct-btn::before { display: none; }
#menubar .menu .acct-btn:hover,
#menubar .menu .acct-btn.open,
#menubar .menu .acct-btn.lit {
  background:
    linear-gradient(rgba(12, 20, 32, 0.96), rgba(12, 20, 32, 0.96)) padding-box,
    conic-gradient(from var(--sf-angle), rgba(127, 227, 255, 0.95), rgba(167, 139, 250, 0.75), rgba(224, 203, 147, 0.95), rgba(127, 227, 255, 0.95)) border-box;
  box-shadow: 0 0 18px rgba(127, 227, 255, 0.22);
}
.acct-avatar {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  color: #cfeeff;
  background: radial-gradient(circle at 35% 30%, #2b4b68, #0f1926);
  border: 1px solid rgba(127, 227, 255, 0.35);
}
.acct-avatar svg { width: 15px; height: 15px; fill: currentColor; }
.acct-avatar b { display: none; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.acct-btn.signed-in .acct-avatar svg { display: none; }
.acct-btn.signed-in .acct-avatar b { display: block; }
.acct-label { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#menubar .clock { font-family: var(--sf-mono); font-size: 12px; letter-spacing: 0.08em; color: rgba(163, 182, 201, 0.75); }

/* dropdown panels */
.substrip {
  top: calc(var(--bar-h) + 9px);
  padding: 5px;
  gap: 2px;
  border: 1px solid rgba(127, 227, 255, 0.18);
  border-radius: 6px;
  background: var(--sf-panel);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.substrip::before {
  content: "";
  position: absolute;
  top: -5px;
  left: calc(var(--notch, 40px) - 5px);
  width: 9px; height: 9px;
  background: rgb(10, 15, 24);
  border-left: 1px solid rgba(127, 227, 255, 0.22);
  border-top: 1px solid rgba(127, 227, 255, 0.22);
  transform: rotate(45deg);
}
.substrip::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 227, 255, 0.6), transparent);
  pointer-events: none;
}
.substrip.anim { animation: sf-panel .34s cubic-bezier(.2, .8, .2, 1); }
@keyframes sf-panel {
  from { opacity: 0; transform: translateY(-6px) scale(.985); clip-path: inset(0 0 100% 0 round 6px); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 6px); }
}
.substrip button {
  height: 34px;
  padding: 0 14px;
  font-family: var(--sf-font);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--sf-dim);
  border-radius: 4px;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.substrip button:hover,
.substrip button:focus-visible { color: #ffffff; background: rgba(127, 227, 255, 0.09); box-shadow: inset 2px 0 0 var(--sf-cyan); outline: none; }
.substrip button.lit { color: #ffffff; background: rgba(127, 227, 255, 0.12); box-shadow: inset 2px 0 0 var(--sf-cyan); }
.substrip.anim button { animation: sf-item .36s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(70ms + var(--i, 0) * 45ms); }
@keyframes sf-item { from { opacity: 0; transform: translateY(-4px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.substrip button.cta { margin-left: 4px; font-weight: 600; color: #14171d; background: linear-gradient(180deg, #eedcaa, #d6bd80); box-shadow: none; }
.substrip button.cta:hover, .substrip button.cta:focus-visible { color: #14171d; background: #f4e4b8; box-shadow: 0 0 16px rgba(224, 203, 147, 0.35); }
.soon-tag {
  margin-left: 9px;
  padding: 3px 6px;
  border: 1px solid rgba(127, 227, 255, 0.28);
  border-radius: 3px;
  background: transparent;
  font-family: var(--sf-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--sf-cyan);
  opacity: 0.85;
}

@media (max-width: 1180px) {
  #menubar .menu button, #menubar .menu .gold { padding: 0 9px; letter-spacing: 0.08em; font-size: 12px; }
  #menubar .brand { letter-spacing: 0.2em; }
}
@media (max-width: 760px) {
  .menu-beam { display: none; }
  #menubar::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #menubar::after, .brand-mark::before, #menubar .menu .acct-btn, .icon-btn .eq i { animation: none; }
  .menu-beam { transition: opacity .2s linear; }
  .substrip.anim, .substrip.anim button { animation: none; }
}

/* ===== Sign-in extras: forgot-password link and messages ===== */
.pg-form[hidden] { display: none; }
.pg-form .pg-linkbtn {
  align-self: flex-start;
  margin-top: -4px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font: 500 13px var(--sf-font);
  letter-spacing: 0.02em;
  color: var(--sf-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(127, 227, 255, 0.35);
  cursor: pointer;
}
.pg-form .pg-linkbtn:hover, .pg-form .pg-linkbtn:focus-visible { color: #ffffff; background: none; box-shadow: none; text-decoration-color: currentColor; outline: none; }
.pg-form .pg-linkbtn[hidden] { display: none; }
.pg-ok { margin: 0; font-size: 14px; line-height: 1.5; color: #93e6b4; }
.pg-ok:empty { display: none; }

/* ---------- members only: the sign-in window that opens after the intro (gate.js) ---------- */
.gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; transition: opacity .4s ease; }
.gate[hidden] { display: none; }
.gate.leaving { opacity: 0; pointer-events: none; }
.gate .gate-win { position: relative; left: auto; top: auto; width: min(940px, 100%); max-height: calc(100vh - 32px); }
.gate .win-bar { cursor: default; touch-action: auto; }
.gate .win-body { overflow: auto; padding: 0; }
.gate-lock { font-family: "JetBrains Mono", Consolas, monospace; font-size: 10px; letter-spacing: 0.3em; color: var(--accent); }
/* the key art on the left (THE VEIL, where creators see beyond), the sign-in form on the right */
.gate-body { display: grid; grid-template-columns: 340px 1fr; min-height: 510px; }
.gate-art { position: relative; margin: 0; overflow: hidden; background: radial-gradient(120% 70% at 50% 40%, #121a33 0%, #060a16 70%); border-right: 1px solid rgba(243, 214, 142, 0.28); }
.gate-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; animation: gateArt 1.6s cubic-bezier(.2, .8, .2, 1) both; }
.gate-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(4, 6, 14, 0.75); }
@keyframes gateArt { from { opacity: 0; transform: scale(1.06); filter: brightness(1.6) blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.gate-main { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 28px 30px 24px; min-width: 0; }
.gate .pg-info { gap: 10px; }
.gate .pg-form { max-width: none; }
.gate .pg-linkbtn { align-self: flex-start; }
.gate .pg-ok { margin: 0; color: #9fe8c4; font-size: 13px; min-height: 18px; }
@media (max-width: 760px) {
  .gate { padding: 0; place-items: stretch; }
  .gate .gate-win { max-height: none; }
  .gate-body { grid-template-columns: 1fr; min-height: 0; }
  .gate-art { height: 210px; border-right: 0; border-bottom: 1px solid rgba(243, 214, 142, 0.28); }
  .gate-art img { object-fit: cover; object-position: 50% 36%; }
  .gate-main { padding: 18px 16px 22px; }
}
@media (prefers-reduced-motion: reduce) { .gate-art img { animation: none; } }

/* The site is dark: native controls (the country list when it opens, date pickers, scroll bars) are drawn dark too */
:root { color-scheme: dark; }
select option, select optgroup { background: #0b1220; color: #e6f4fb; }
select option:checked { background: #1d3a66; color: #ffffff; }
select option:disabled { color: #6f8297; }

/* Page windows: when a screen is too short for everything, the text column scrolls instead of being cut off */
.pg-info { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; scrollbar-color: rgba(156, 196, 228, 0.35) transparent; padding-right: 6px; }
.pg-info::-webkit-scrollbar { width: 6px; }
.pg-info::-webkit-scrollbar-thumb { background: rgba(156, 196, 228, 0.35); border-radius: 3px; }
.pg-fallback[hidden] { display: none; }
/* About the Citadel: a little tighter so it fits on laptop screens */
.pg-citadel .pg-info { gap: 8px; }
.pg-citadel .pg-specs { gap: 4px 16px; }
.pg-citadel .pg-specs dd { font-size: 14px; line-height: 1.35; }
.pg-citadel .pg-levels { line-height: 1.45; font-size: 13.5px; }
.pg-citadel .dim { margin: 2px 0; font-size: 13.5px; }

/* ---------- joining, step 2: choose a membership (gate.js) ---------- */
.gate.wide .gate-win { width: min(1240px, 100%); }
.gate.wide .gate-body { grid-template-columns: 1fr; min-height: 0; }
.gate.wide .gate-art { display: none; }
.gate.wide .gate-main { padding: 22px 26px 22px; }
.gate-plans { gap: 14px; }
.pl-billing { display: inline-flex; align-self: flex-start; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 3px; }
.pl-bill { padding: 7px 16px !important; border-radius: 999px !important; background: none !important; box-shadow: none !important; color: var(--muted) !important; font-size: 12px; letter-spacing: 0.12em; }
.pl-bill small { margin-left: 6px; font-size: 10px; letter-spacing: 0.08em; color: var(--gold); }
.pl-bill.on { background: rgba(127, 227, 255, 0.16) !important; color: var(--ink) !important; }
.pl-tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pl-tier { display: flex !important; flex-direction: column; align-items: stretch; gap: 10px; min-height: 250px; padding: 16px 14px 14px !important; text-align: left; border: 1px solid var(--line) !important; border-radius: 8px !important; background: rgba(6, 10, 22, 0.6) !important; box-shadow: none !important; color: var(--ink) !important; cursor: pointer; transition: border-color .2s, transform .2s, background .2s; }
.pl-tier:hover { border-color: rgba(243, 214, 142, 0.55) !important; transform: translateY(-2px); }
.pl-tier.on { border-color: var(--gold) !important; background: linear-gradient(180deg, rgba(243, 214, 142, 0.12), rgba(6, 10, 22, 0.6)) !important; box-shadow: 0 0 0 1px rgba(243, 214, 142, 0.35), 0 10px 30px rgba(0, 0, 0, 0.35) !important; }
.pl-name { font-family: "Cinzel", Georgia, serif; font-size: 15px; letter-spacing: 0.16em; color: #f5e6b8; }
.pl-price { display: flex; align-items: baseline; gap: 6px; }
.pl-price b { font-size: 28px; font-weight: 600; letter-spacing: 0.02em; color: #ffffff; }
.pl-price small { font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }
.pl-perks { flex: 1; margin: 0; padding: 0 0 0 16px; font-size: 13px; line-height: 1.55; color: var(--ink); text-transform: none; letter-spacing: 0; }
.pl-perks li::marker { color: var(--gold); }
.pl-pick { align-self: stretch; text-align: center; padding: 7px 0; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; letter-spacing: 0.18em; color: var(--muted); }
.pl-tier.on .pl-pick { border-color: var(--gold); color: #1a1406; background: var(--gold); }
.pl-note { margin: 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 1100px) { .pl-tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .pl-tiers { grid-template-columns: 1fr 1fr; }
  .pl-tier { min-height: 0; }
}
@media (max-width: 440px) { .pl-tiers { grid-template-columns: 1fr; } }

/* a short message at the top of the site, e.g. after paying (gate.js) */
.gate-notice { position: fixed; top: 76px; left: 50%; z-index: 90; transform: translateX(-50%); display: flex; align-items: flex-start; gap: 12px; width: min(620px, calc(100% - 24px)); padding: 14px 14px 14px 18px; background: rgba(10, 16, 30, 0.96); border: 1px solid rgba(243, 214, 142, 0.6); border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); color: var(--ink); font-size: 14px; line-height: 1.5; animation: noticeIn .4s cubic-bezier(.2, .8, .2, 1) both; transition: opacity .35s, transform .35s; }
.gate-notice p { margin: 0; flex: 1; }
.gate-notice button { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.gate-notice.out { opacity: 0; transform: translate(-50%, -10px); }
@keyframes noticeIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* joining: birthdate and gender side by side */
.gate .jn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gate .jn-pair[hidden] { display: none; }
.gate .jn-pair label { min-width: 0; }
.gate input[type="date"] { min-height: 40px; }
@media (max-width: 440px) { .gate .jn-pair { grid-template-columns: 1fr; } }

/* ---------- the welcome screen (home) ---------- */
.welcome { display: none !important; }
.wl { position: absolute; inset: 0; display: grid; grid-template-columns: auto minmax(0, 760px); align-items: center; justify-content: center; gap: clamp(28px, 5vw, 72px); padding: 28px clamp(20px, 4vw, 56px); overflow-y: auto; }
.wl-emblem { position: relative; width: clamp(200px, 22vw, 320px); aspect-ratio: 1; border-radius: 50%; animation: wlIn 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.wl-emblem img { position: absolute; inset: 9%; width: 82%; height: 82%; border-radius: 50%; object-fit: cover; object-position: 50% 12%; transform: scale(1.06); box-shadow: 0 0 60px rgba(79, 182, 255, 0.25), 0 0 0 1px rgba(243, 214, 142, 0.35); }
.wl-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(243, 214, 142, 0.45); border-top-color: transparent; border-bottom-color: rgba(243, 214, 142, 0.12); animation: wlSpin 24s linear infinite; }
.wl-ring2 { inset: 4%; border-color: rgba(127, 227, 255, 0.28); border-left-color: transparent; animation-duration: 36s; animation-direction: reverse; }
.wl-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wl-kicker { font-family: "JetBrains Mono", Consolas, monospace; font-size: 11px; letter-spacing: 0.3em; color: var(--accent); animation: wlUp .7s .1s both; }
.wl-title { margin: 0; font-family: "Cinzel", Georgia, serif; font-weight: 600; font-size: clamp(28px, 3.4vw, 48px); letter-spacing: 0.04em; line-height: 1.15; color: #f5e6b8; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.8); animation: wlUp .7s .2s both; }
.wl-sub { margin: 0 0 8px; color: var(--muted); font-size: 15px; animation: wlUp .7s .3s both; }
.wl-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.wl-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 118px; padding: 14px 14px 12px; text-align: left; color: var(--ink); background: rgba(8, 13, 26, 0.62); border: 1px solid var(--line); border-radius: 8px; backdrop-filter: blur(10px); cursor: pointer; animation: wlUp .6s calc(.35s + var(--i) * .05s) both; transition: border-color .2s, transform .2s, background .2s; }
.wl-tile:hover, .wl-tile:focus-visible { border-color: rgba(243, 214, 142, 0.6); background: rgba(16, 24, 44, 0.75); transform: translateY(-3px); outline: none; }
.wl-icon { font-size: 20px; line-height: 1; color: var(--gold); }
.wl-name { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; color: #ffffff; display: flex; align-items: center; gap: 6px; }
.wl-text { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
@keyframes wlSpin { to { transform: rotate(360deg); } }
@keyframes wlIn { from { opacity: 0; transform: scale(0.9); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes wlUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 1100px) { .wl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .wl { grid-template-columns: 1fr; justify-items: center; align-content: start; text-align: center; }
  .wl-main { align-items: center; }
  .wl-emblem { width: 160px; }
  .wl-tiles { width: 100%; }
  .wl-tile { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .wl-ring, .wl-emblem, .wl-kicker, .wl-title, .wl-sub, .wl-tile { animation: none; } }

/* the moving backdrop behind the welcome screen: mountains, the Citadel and mist (vista.js).
   It is a fixed layer under #desktop; vista.js sets its position and faintness (0.5, or 0.4 on phones). */
.vista { position: fixed; z-index: 0; pointer-events: none; }

/* =====================================================================
   PHONES (760px and narrower)
   A slim bar: the logo (home) on the left; music and the menu button on the right.
   The menu button slides out a drawer with every section, submenu and the account menu.
   Windows open solid and full-screen with a large close button.
   ===================================================================== */
.nav-toggle, .nav-drawer, .nav-scrim { display: none; }
@media (max-width: 760px) {
  :root { --bar-h: 56px; --task-h: 48px; }
  #menubar { flex-wrap: nowrap; gap: 6px; padding: 0 8px 0 14px; height: var(--bar-h); }
  #menubar .brand { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: 0.24em; padding: 6px 0; margin-right: auto; }
  #menubar .menu:not(.menu-right) { display: none; }
  #menubar .menu-right { display: flex; margin-left: 0; width: auto; flex-wrap: nowrap; gap: 4px; }
  #menubar .menu .acct-btn { padding: 0 4px; min-width: 0; border: 0; background: none; box-shadow: none; }
  #menubar .acct-label, #menubar .acct-btn .caret { display: none; }
  #menubar .menu .icon-btn { width: 42px; height: 42px; }
  .substrip { display: none !important; }

  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; padding: 0; background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
  .nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s ease, opacity .2s ease; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-scrim { display: block; position: fixed; inset: var(--bar-h) 0 0 0; z-index: 1500; background: rgba(2, 4, 9, 0.6); opacity: 0; transition: opacity .25s ease; }
  .nav-scrim.open { opacity: 1; }
  .nav-scrim[hidden], .nav-drawer[hidden] { display: none; }
  .nav-drawer { display: flex; flex-direction: column; position: fixed; top: var(--bar-h); right: 0; bottom: 0; width: min(86vw, 340px); z-index: 1600; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px calc(24px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #0d1422, #070b13); border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6); transform: translateX(104%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
  .nav-drawer.open { transform: none; }
  .nd-who { display: flex; align-items: center; gap: 12px; padding: 4px 4px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
  .nd-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-weight: 700; color: #f5e6b8; background: rgba(156, 196, 228, 0.12); border: 1px solid rgba(243, 214, 142, 0.45); }
  .nd-name { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; color: var(--ink); }
  .nd-sec { padding: 10px 0 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .nd-head { padding: 4px 6px 6px; font-family: "JetBrains Mono", Consolas, monospace; font-size: 10.5px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); }
  .nd-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px; text-align: left; font-size: 15px; color: var(--ink); background: none; border: 0; border-radius: 6px; cursor: pointer; }
  .nd-item:active, .nd-item:hover, .nd-item:focus-visible { background: rgba(156, 196, 228, 0.12); outline: none; }
  .nd-item.lit { color: #ffffff; background: rgba(156, 196, 228, 0.1); box-shadow: inset 3px 0 0 var(--accent); }
  .nd-top { font-weight: 600; letter-spacing: 0.04em; border-bottom: 1px solid rgba(255, 255, 255, 0.06); border-radius: 0; min-height: 50px; }
  .nd-item.gold { color: var(--gold); }
  .nd-out { color: #ffb3bf; }

  /* windows: solid, full-screen, easy to close */
  #desktop .win { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; background: #0a0f18; }
  #desktop .win.open { transform: none; }
  #desktop .win:not(.open) { transform: translateY(18px); }
  #desktop .win.min { transform: translateY(40px); }
  #desktop .win-bar { flex: 0 0 52px; height: 52px; padding: 0 6px 0 16px; background: #0f1724; cursor: default; touch-action: auto; }
  #desktop .win-title { font-size: 12px; letter-spacing: 0.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #desktop .win-btns { gap: 4px; }
  #desktop .win-btns button { width: 44px; height: 40px; font-size: 24px; color: var(--ink); border-color: rgba(255, 255, 255, 0.18); font-family: "Segoe UI", system-ui, sans-serif; }
  #desktop .win-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 14px 24px; }

  /* the taskbar: open windows scroll sideways */
  #taskbar { overflow-x: auto; padding: 0 8px env(safe-area-inset-bottom); scrollbar-width: none; }
  #taskbar::-webkit-scrollbar { display: none; }
  .task { flex: 0 0 auto; padding: 10px 12px; }

  /* welcome screen */
  .wl { padding: 18px 14px 28px; gap: 16px; }
  .wl-emblem { width: 132px; }
  .wl-title { font-size: 26px; }
  .wl-sub { font-size: 14px; }
  .wl-tiles { gap: 10px; }
  .wl-tile { padding: 12px; }
  .wl-name { flex-wrap: wrap; row-gap: 4px; }
}
@media (max-width: 380px) {
  #menubar .brand { letter-spacing: 0.16em; font-size: 12px; }
}

/* membership cards: the "Everything in ..." line and the yearly gifts */
.pl-perks .pl-inc { color: var(--gold); font-weight: 600; list-style: none; margin-left: -16px; margin-bottom: 2px; }
.pl-perks .pl-gift { color: var(--muted); }
.pl-perks { font-size: 12.5px; line-height: 1.5; }

/* No scroll bars anywhere. On computers content shrinks to fit its box (fit.js);
   on phones, long content scrolls by swiping, with no bar showing. */
html, body, * { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
.gate .win-body, .pg-info, .wl { scrollbar-width: none; }
.pl-perks .pl-gift { color: var(--muted); font-size: 12px; }

/* =====================================================================
   AI ACADEMY window (academy.js)
   ===================================================================== */
.aca { display: flex; flex-direction: column; gap: 10px; }
.aca.is-fixed { height: 100%; }   /* the lesson view: lesson and tutor share the window; other views size to their content and shrink to fit */
.aca-crumbs { display: flex; align-items: center; gap: 8px; min-height: 22px; font-family: "JetBrains Mono", Consolas, monospace; font-size: 11px; letter-spacing: 0.2em; }
.aca-crumb { background: none; border: 0; padding: 2px 0; color: var(--accent); font: inherit; letter-spacing: inherit; cursor: pointer; }
.aca-crumb:hover, .aca-crumb:focus-visible { color: #ffffff; outline: none; text-decoration: underline; }
.aca-crumb.is-here { color: var(--muted); cursor: default; }
.aca-sep { color: var(--muted); opacity: 0.6; }
.aca-view { display: flex; flex-direction: column; }
.aca.is-fixed .aca-view { flex: 1; min-height: 0; }
.aca.is-fixed .aca-view > * { flex: 1; min-height: 0; }
.aca-lead { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.aca-text { margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.aca-h3 { margin: 4px 0 8px; font-family: "JetBrains Mono", Consolas, monospace; font-size: 11px; font-weight: 600; letter-spacing: 0.24em; color: var(--gold); }
.aca-list { margin: 0 0 10px; padding-left: 18px; font-size: 13.5px; line-height: 1.55; }
.aca-list li::marker { color: var(--gold); }
.aca-fine { margin: 8px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.aca-fine a, .aca-terms a { color: var(--gold); }
.aca-msgline { color: var(--muted); font-size: 14px; }
.aca-status { margin: 4px 0 0; min-height: 0; font-size: 12px; color: var(--muted); }
.aca-status:empty { display: none; }
.aca-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; font: 600 12px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: 0.1em; color: var(--ink); background: rgba(156, 196, 228, 0.06); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; white-space: nowrap; }
.aca-btn:hover:not(:disabled), .aca-btn:focus-visible { border-color: var(--accent); color: #ffffff; outline: none; }
.aca-btn:disabled { opacity: 0.45; cursor: default; }
.aca-btn.aca-primary { color: #11161f; background: linear-gradient(180deg, #ecd9a2, #cdb377); border-color: transparent; }
.aca-btn.aca-primary:hover:not(:disabled) { filter: brightness(1.08); color: #11161f; }
.aca-btn.aca-ghost { background: none; }
.aca-btn.is-done { color: #9fe8c4; border-color: rgba(159, 232, 196, 0.5); }
.aca-link { background: none; border: 0; padding: 4px 2px; color: var(--accent); font-size: 12.5px; cursor: pointer; }
.aca-link:hover { color: #ffffff; text-decoration: underline; }

/* courses */
.aca-courses { display: flex; flex-direction: column; gap: 6px; }
.aca-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.aca-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: rgba(8, 13, 24, 0.55); border: 1px solid var(--line); border-radius: 8px; }
.aca-card.is-owned { border-color: rgba(233, 217, 166, 0.55); }
.aca-card-name { font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: 16px; letter-spacing: 0.18em; color: #f5e6b8; }
.aca-card-price b { font-size: 26px; font-weight: 700; color: #ffffff; }
.aca-card-price small { font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em; }
.aca-card-blurb { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink); }
.aca-card-facts { margin: 0; padding-left: 16px; font-size: 12.5px; line-height: 1.55; color: var(--muted); flex: 1; }
.aca-card-facts li::marker { color: var(--gold); }
.aca-card-progress { margin: 0; font-size: 12px; color: #9fe8c4; }
.aca-card-actions { display: flex; flex-wrap: nowrap; gap: 8px; align-items: flex-start; }
.aca-card-actions .aca-buy { min-width: 0; }
.aca-card-actions .aca-buy { flex: 1; }
.aca-card-actions .aca-btn { width: 100%; }
.aca-card-actions > .aca-btn { width: auto; }

/* one course */
.aca-course { display: flex; flex-direction: column; gap: 10px; }
.aca-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.aca-head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 240px; }
.aca-price-big { font-size: 24px; font-weight: 700; color: #ffffff; }
.aca-progress { font-size: 12.5px; color: var(--muted); }
.aca-bar { width: 240px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.aca-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.aca-row { display: flex; gap: 8px; }
.aca-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.aca-tab { padding: 9px 14px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font: 600 11.5px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: 0.16em; cursor: pointer; }
.aca-tab:hover { color: var(--ink); }
.aca-tab.is-on { color: #ffffff; border-bottom-color: var(--gold); }
.aca-panel { padding-top: 4px; }
.aca-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.aca-weeks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
.aca-week { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; text-align: left; color: var(--ink); background: rgba(8, 13, 24, 0.45); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.aca-week:hover, .aca-week:focus-visible { border-color: var(--accent); outline: none; }
.aca-week-n { flex: 0 0 auto; font-family: "JetBrains Mono", Consolas, monospace; font-size: 13px; color: var(--gold); }
.aca-week.is-done .aca-week-n { color: #9fe8c4; }
.aca-week-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.aca-week-txt b { font-size: 13px; font-weight: 600; }
.aca-week-txt span { font-size: 12px; line-height: 1.4; color: var(--muted); }
.aca-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.aca-table th, .aca-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.aca-table th { font-weight: 600; color: var(--gold); letter-spacing: 0.06em; }

/* one week: the lesson beside the tutor */
.aca-weekview { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 14px; }
.aca-lesson { display: flex; flex-direction: column; min-height: 0; padding: 4px 4px 0 0; }
.aca-lesson-title { margin: 4px 0 0; font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: 22px; letter-spacing: 0.06em; color: #f5e6b8; }
.aca-lesson-body { flex: 1; min-height: 0; margin-top: 14px; overflow: hidden; }
.aca-lesson-body .aca-btn { margin-top: 6px; }
.aca-pager { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.aca-dots { display: flex; gap: 6px; }
.aca-dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.08); cursor: pointer; }
.aca-dot.is-on { background: var(--gold); border-color: var(--gold); }
.aca-weeknav { margin-left: auto; display: flex; gap: 10px; }
.aca-tutor { display: flex; flex-direction: column; min-height: 0; background: rgba(6, 10, 18, 0.55); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.aca-tutor-head { padding: 10px 14px; font-family: "JetBrains Mono", Consolas, monospace; font-size: 10.5px; letter-spacing: 0.24em; color: var(--accent); border-bottom: 1px solid var(--line); }
.aca-log { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.aca-msg { max-width: 92%; padding: 9px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.aca-msg p { margin: 0 0 6px; } .aca-msg p:last-child { margin: 0; }
.aca-msg-tutor { align-self: flex-start; background: rgba(156, 196, 228, 0.1); border: 1px solid rgba(156, 196, 228, 0.18); }
.aca-msg-user { align-self: flex-end; background: rgba(233, 217, 166, 0.14); border: 1px solid rgba(233, 217, 166, 0.25); }
.aca-msg-error { align-self: stretch; color: #ffb3bf; background: rgba(255, 123, 143, 0.08); border: 1px solid rgba(255, 123, 143, 0.3); }
.aca-msg.is-pending { color: var(--muted); font-style: italic; }
.aca-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.aca-input { flex: 1; resize: none; min-height: 40px; padding: 8px 10px; font: 13px/1.4 "Segoe UI", system-ui, sans-serif; color: var(--ink); background: rgba(3, 6, 14, 0.7); border: 1px solid var(--line); border-radius: 6px; scrollbar-width: none; }
.aca-input:focus { outline: none; border-color: var(--accent); }

@media (max-width: 1100px) {
  .aca-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aca-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .aca-cards, .aca-cols, .aca-weeks, .aca-weekview { grid-template-columns: 1fr; }
  .aca-head { flex-direction: column; }
  .aca-head-side { align-items: stretch; min-width: 0; }
  .aca-bar { width: 100%; }
  .aca-tabs { overflow-x: auto; scrollbar-width: none; }
  .aca-tab { white-space: nowrap; }
  .aca.is-fixed { height: auto; }
  .aca-lesson-body { overflow: visible; }
  .aca-tutor { height: 60vh; }
}

/* =====================================================================
   THE EXCLUSIVE window (exclusive.js)
   ===================================================================== */
.ex-contest { display: flex; flex-direction: column; gap: 12px; }
.ex-msgline { color: var(--muted); font-size: 14px; margin: 6px 0; }
.ex-error { margin: 0; color: #ffb3bf; font-size: 13px; min-height: 0; }
.ex-error:empty { display: none; }
.ex-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ex-head-side { display: flex; align-items: center; gap: 10px; }
.ex-phase { padding: 6px 12px; border-radius: 999px; font: 700 11px/1 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.2em; color: var(--muted); border: 1px solid var(--line); }
.ex-phase-submissions, .ex-phase-voting { color: #11161f; background: linear-gradient(180deg, #ecd9a2, #cdb377); border-color: transparent; }
.ex-phase-closed { color: #9fe8c4; border-color: rgba(159, 232, 196, 0.5); }
.ex-brief { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; max-width: 900px; }
.ex-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.ex-top:not(:has(.ex-clock)) { grid-template-columns: 1fr; }
.ex-clock { padding: 14px 18px; background: rgba(8, 13, 24, 0.55); border: 1px solid var(--line); border-radius: 10px; }
.ex-clock-label { font: 600 11px/1 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.24em; color: var(--gold); margin-bottom: 10px; }
.ex-clock-cells { display: flex; gap: 10px; }
.ex-cell { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 8px 6px; border-radius: 8px; background: rgba(156, 196, 228, 0.07); }
.ex-cell b { font: 700 30px/1 "Cinzel", Georgia, serif; color: #f5e6b8; }
.ex-cell span { margin-top: 6px; font-size: 10px; letter-spacing: 0.18em; color: var(--muted); }
.ex-clock-at { margin-top: 10px; font-size: 12px; color: var(--muted); }
.ex-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ex-side .aca-text { margin: 0; max-width: 640px; }
.ex-left { margin: 0; font-weight: 600; color: var(--gold); font-size: 14px; }
.ex-discord { text-decoration: none; }
.ex-listbox { display: flex; flex-direction: column; gap: 10px; }
.ex-listhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ex-listhead .aca-h3 { margin: 0; }
.ex-count { font-size: 12.5px; color: var(--muted); }
.ex-filter { padding: 7px 10px; font: 13px "Segoe UI", system-ui, sans-serif; color: var(--ink); background: rgba(3, 6, 14, 0.7); border: 1px solid var(--line); border-radius: 6px; }
.ex-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ex-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: rgba(8, 13, 24, 0.55); border: 1px solid var(--line); border-radius: 8px; }
.ex-card.is-mine { border-color: rgba(127, 227, 255, 0.4); }
.ex-card.is-winner { border-color: rgba(233, 217, 166, 0.8); box-shadow: 0 0 24px rgba(233, 217, 166, 0.18); }
.ex-pic { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #05080f; cursor: zoom-in; }
.ex-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.ex-pic:hover img { transform: scale(1.04); }
.ex-badge { position: absolute; top: 8px; left: 8px; padding: 4px 8px; border-radius: 4px; font: 700 10.5px/1 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.2em; color: #11161f; background: linear-gradient(180deg, #ecd9a2, #cdb377); }
.ex-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-meta b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-meta span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-votes { font-size: 12.5px; color: var(--gold); font-weight: 600; }
.ex-vote { width: 100%; }
.ex-vote.is-on { color: #9fe8c4; border-color: rgba(159, 232, 196, 0.5); }
.ex-pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ex-pager:empty { display: none; }
.ex-page { font-size: 12.5px; color: var(--muted); }
.ex-owner { display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.ex-panel { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: rgba(8, 13, 24, 0.45); border: 1px solid var(--line); border-radius: 8px; }
.ex-panel .aca-text { margin: 0; }
.ex-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-input { padding: 8px 10px; font: 13px "Segoe UI", system-ui, sans-serif; color: var(--ink); background: rgba(3, 6, 14, 0.7); border: 1px solid var(--line); border-radius: 6px; color-scheme: dark; }
.ex-grid-owner { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ex-grid-owner .ex-row .aca-btn { flex: 1; min-height: 30px; padding: 0 8px; font-size: 11px; }
.aca-btn.ex-danger { color: #ffb3bf; border-color: rgba(255, 123, 143, 0.4); }
.ex-lightbox { position: fixed; inset: 0; z-index: 5000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: rgba(2, 4, 9, 0.88); cursor: zoom-out; }
.ex-lightbox img { max-width: 100%; max-height: calc(100% - 90px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); cursor: default; }
.ex-lightbox-cap { color: var(--ink); font-size: 14px; }
@media (max-width: 1100px) {
  .ex-grid, .ex-grid-owner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-owner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ex-head { flex-direction: column; }
  .ex-top { grid-template-columns: 1fr; }
  .ex-cell { min-width: 0; flex: 1; }
  .ex-cell b { font-size: 24px; }
  .ex-listhead { flex-direction: column; align-items: flex-start; }
}
/* computers: the contest fills the window and the entries share what is left, two rows, so nothing is cut off or shrunk */
@media (min-width: 761px) {
  .ex-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .ex-contest { flex: 1; min-height: 0; }
  .ex-listbox { flex: 1; min-height: 0; }
  .ex-grid { flex: 1; min-height: 0; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .ex-card { min-height: 0; }
  .ex-pic { flex: 1; min-height: 60px; aspect-ratio: auto; }
  .ex-owner { flex: 1; min-height: 0; align-items: stretch; }
  .ex-owner > .ex-panel:last-child { min-height: 0; }
  .ex-owner .ex-grid { flex: 1; min-height: 0; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  /* two columns here, so a page of eight is four rows */
  .ex-grid { grid-template-rows: repeat(4, minmax(0, 1fr)); }
}

/* THE EXCLUSIVE medallion */
.ex-head { justify-content: flex-start; align-items: center; }
.ex-head-side { margin-left: auto; }
.ex-titles { min-width: 0; }
.ex-emblem { position: relative; flex: 0 0 auto; width: 64px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px rgba(233, 217, 166, 0.45), 0 0 22px rgba(180, 90, 255, 0.35); }
.ex-emblem img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; transform: scale(1.3); display: block; }
.ex-emblem.is-big { width: clamp(150px, 16vw, 230px); overflow: visible; box-shadow: none; animation: wlIn 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.ex-emblem.is-big img { position: absolute; inset: 8%; width: 84%; height: 84%; border-radius: 50%; box-shadow: 0 0 60px rgba(180, 90, 255, 0.35), 0 0 0 1px rgba(233, 217, 166, 0.4); }
.ex-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(233, 217, 166, 0.5); border-top-color: transparent; border-bottom-color: rgba(233, 217, 166, 0.12); animation: wlSpin 24s linear infinite; }
.ex-ring2 { inset: 3.5%; border-color: rgba(190, 120, 255, 0.4); border-left-color: transparent; animation-duration: 36s; animation-direction: reverse; }
.ex-top.has-emblem { grid-template-columns: auto auto minmax(0, 1fr); }
.ex-top.has-emblem:not(:has(.ex-clock)) { grid-template-columns: auto minmax(0, 1fr); }
@media (max-width: 760px) {
  .ex-head { flex-direction: row; flex-wrap: wrap; }
  .ex-emblem { width: 52px; }
  .ex-top.has-emblem, .ex-top.has-emblem:not(:has(.ex-clock)) { grid-template-columns: 1fr; justify-items: center; }
  .ex-emblem.is-big { width: 170px; }
}
@media (prefers-reduced-motion: reduce) { .ex-ring, .ex-emblem.is-big { animation: none; } }
/* entry cards: the vote button sits on the picture's bottom edge */
.ex-frame { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ex-frame .ex-pic { flex: 1; }
.ex-frame .ex-vote { position: absolute; left: 8px; right: 8px; bottom: 8px; width: auto; min-height: 32px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
.ex-frame .ex-vote.is-on { background: rgba(6, 12, 20, 0.85); }
.ex-own { position: absolute; right: 8px; bottom: 8px; padding: 5px 9px; border-radius: 4px; font: 700 10.5px/1 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.16em; color: var(--accent); background: rgba(6, 12, 20, 0.85); border: 1px solid rgba(127, 227, 255, 0.4); }
.ex-meta em { font-style: normal; color: var(--gold); font-weight: 600; }
.ex-card { gap: 6px; padding: 8px; }
@media (max-width: 760px) { .ex-frame .ex-pic { aspect-ratio: 4 / 3; } }
/* short screens (small laptops): a compact countdown leaves room for the entries */
@media (min-width: 761px) and (max-height: 820px) {
  .ex-contest { gap: 8px; }
  .ex-head .ex-emblem:not(.is-big) { width: 44px; }
  .ex-head .pg-title { font-size: 22px; }
  .ex-clock { padding: 8px 12px; display: flex; align-items: center; gap: 12px; }
  .ex-clock-label { margin: 0; writing-mode: horizontal-tb; max-width: 90px; line-height: 1.4; }
  .ex-cell { min-width: 48px; padding: 5px 4px; }
  .ex-cell b { font-size: 20px; }
  .ex-cell span { margin-top: 3px; font-size: 9px; }
  .ex-clock-at { display: none; }
  .ex-brief, .ex-side .aca-text { font-size: 13px; }
  .ex-emblem.is-big { width: 130px; }
}

/* adding an entry (submissions) */
.ex-upload { border-style: dashed; border-color: rgba(233, 217, 166, 0.45); }
.ex-drop { display: flex; align-items: center; justify-content: center; cursor: pointer; background: rgba(156, 196, 228, 0.05); }
.ex-drop.is-over { background: rgba(233, 217, 166, 0.12); outline: 2px dashed rgba(233, 217, 166, 0.7); outline-offset: -6px; }
.ex-drop:disabled { cursor: progress; }
.ex-drop-hint { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); }
.ex-drop-hint b { font-size: 30px; line-height: 1; color: var(--gold); font-weight: 400; }
.ex-drop-hint span { font: 700 11px/1 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.2em; color: var(--ink); }
.ex-drop-hint small { font-size: 11.5px; }
.ex-drop img { cursor: pointer; }
.ex-name { width: 100%; padding: 7px 9px; font: 13px "Segoe UI", system-ui, sans-serif; color: var(--ink); background: rgba(3, 6, 14, 0.7); border: 1px solid var(--line); border-radius: 6px; }
.ex-name:focus { outline: none; border-color: var(--accent); }
.ex-send { width: 100%; min-height: 32px; }
.ex-note { margin: 0; font-size: 12px; color: var(--muted); min-height: 0; }
.ex-note:empty { display: none; }
.ex-frame .ex-remove { position: absolute; right: 8px; top: 8px; min-height: 28px; padding: 0 10px; font-size: 10.5px; color: #ffb3bf; background: rgba(6, 12, 20, 0.85); border-color: rgba(255, 123, 143, 0.45); }

/* =====================================================================
   CHAT: the buddy list (Trillian style), chat windows, Discord (community.js, chat.js)
   ===================================================================== */
.win.win-buddies .win-body, .win.win-im .win-body, .win.win-discord .win-body { padding: 0; }
.ch { height: 100%; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(14, 22, 38, 0.9), rgba(6, 10, 18, 0.92)); }
.ch-me { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(156, 196, 228, 0.10), rgba(156, 196, 228, 0.02)); }
.ch-me-box { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.ch-me-name { font-size: 14px; font-weight: 700; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-status { align-self: flex-start; padding: 2px 6px; font: 600 11.5px "Segoe UI", system-ui, sans-serif; color: var(--ink); background: rgba(3, 6, 14, 0.6); border: 1px solid var(--line); border-radius: 4px; }
.ch-st-online { color: #8af0a8; } .ch-st-away { color: #ffd479; } .ch-st-busy { color: #ff9aa8; }
.ch-note-input { width: 100%; padding: 3px 6px; font: italic 12px "Segoe UI", system-ui, sans-serif; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 4px; }
.ch-note-input:hover, .ch-note-input:focus { border-color: var(--line); background: rgba(3, 6, 14, 0.5); outline: none; color: var(--ink); }
.ch-input { width: 100%; padding: 7px 9px; font: 13px "Segoe UI", system-ui, sans-serif; color: var(--ink); background: rgba(3, 6, 14, 0.7); border: 1px solid var(--line); border-radius: 6px; }
.ch-input:focus { outline: none; border-color: var(--accent); }
.ch-search { margin: 8px 10px; width: auto; }
.ch-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 0 6px 8px; }
.ch-sec { margin-top: 4px; }
.ch-sec-head { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 6px; background: none; border: 0; border-radius: 4px; color: var(--accent); font: 700 11px/1 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; text-align: left; }
.ch-sec-head:hover { background: rgba(156, 196, 228, 0.07); }
.ch-caret { width: 10px; color: var(--muted); }
.ch-add { margin: 0 0 4px 22px; padding: 3px 8px; font: 700 10.5px/1.4 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.12em; color: var(--gold); background: none; border: 1px dashed rgba(233, 217, 166, 0.45); border-radius: 4px; cursor: pointer; }
.ch-add:hover { background: rgba(233, 217, 166, 0.08); }
.ch-row { display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 18px; border-radius: 6px; cursor: default; user-select: none; outline: none; }
.ch-row:hover { background: rgba(156, 196, 228, 0.08); }
.ch-row.is-sel, .ch-row:focus-visible { background: linear-gradient(90deg, rgba(127, 227, 255, 0.18), rgba(127, 227, 255, 0.06)); box-shadow: inset 0 0 0 1px rgba(127, 227, 255, 0.3); }
.ch-row.is-off { opacity: 0.55; }
.ch-row-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ch-row-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ch-row-top b { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-sub { font-size: 11.5px; font-style: italic; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-citadel { flex: 0 0 auto; padding: 1px 5px; border-radius: 3px; font: 700 9px/1.5 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.1em; color: #11161f; background: linear-gradient(180deg, #ecd9a2, #cdb377); }
.ch-av { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; font-weight: 700; font-size: 13px; color: #f5e6b8; background: rgba(156, 196, 228, 0.14); border: 1px solid rgba(233, 217, 166, 0.35); }
.ch-av img { width: 100%; height: 100%; object-fit: cover; }
.ch-av-me { width: 44px; height: 44px; font-size: 18px; }
.ch-av-sm { width: 22px; height: 22px; font-size: 11px; }
.ch-av-group { border-radius: 8px; color: var(--accent); }
.ch-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ch-online { background: radial-gradient(circle at 35% 35%, #c8ffd6, #2fcf66 60%); box-shadow: 0 0 6px rgba(47, 207, 102, 0.7); }
.ch-away { background: radial-gradient(circle at 35% 35%, #fff1c6, #f0b429 60%); box-shadow: 0 0 6px rgba(240, 180, 41, 0.6); }
.ch-busy { background: radial-gradient(circle at 35% 35%, #ffd0d6, #e5484d 60%); box-shadow: 0 0 6px rgba(229, 72, 77, 0.6); }
.ch-offline { background: #4a5566; }
.ch-badge { flex: 0 0 auto; min-width: 20px; padding: 2px 6px; border-radius: 10px; font: 700 11px/1.2 "Segoe UI", system-ui, sans-serif; text-align: center; color: #11161f; background: #ff7b8f; }
.ch-empty { margin: 14px 12px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.ch-foot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.ch-foot-txt { flex: 1; }
.ch-foot-txt.is-error { color: #ffb3bf; }
.ch-tool { background: none; border: 0; cursor: pointer; font-size: 15px; padding: 2px 4px; }
/* choosing members (new group / add people) */
.ch, .im { position: relative; }
.ch-pick { position: absolute; inset: 8px; z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #0b1220; border: 1px solid rgba(233, 217, 166, 0.45); border-radius: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); }
.ch-pick .aca-h3 { margin: 0; }
.ch-pick-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 2px; }
.ch-pick-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ch-pick-row:hover { background: rgba(156, 196, 228, 0.08); }
.ch-pick-row span { flex: 1; }
.ch-pick-acts { display: flex; justify-content: flex-end; gap: 8px; }
.ch-note { margin: 0; font-size: 12px; color: #ffb3bf; }
.ch-note:empty { display: none; }

/* a chat window */
.im { height: 100%; display: flex; flex-direction: column; background: rgba(6, 10, 18, 0.9); }
.im-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(156, 196, 228, 0.10), rgba(156, 196, 228, 0.02)); }
.im-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.im-who b { font-size: 14px; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-who span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-status { display: flex; align-items: center; gap: 6px; }
.im-tools { display: flex; gap: 4px; }
.im-tool { min-width: 28px; height: 26px; padding: 0 7px; font: 700 11px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: 0.06em; color: var(--ink); background: rgba(156, 196, 228, 0.07); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.im-tool:hover { border-color: var(--accent); }
.im-tool.is-on, .im-tool.im-danger { color: #ffb3bf; border-color: rgba(255, 123, 143, 0.4); }
.im-log { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; -webkit-user-select: text; user-select: text; }
.im-line { margin: 0 0 3px; overflow-wrap: anywhere; white-space: pre-wrap; }
.im-time { color: #6f7f93; font-size: 11.5px; margin-right: 5px; font-family: "JetBrains Mono", Consolas, monospace; }
.im-name { color: #ff8f8f; margin-right: 5px; }
.im-line.is-mine .im-name { color: #7fb8ff; }
.im-text { color: var(--ink); }
.im-day { margin: 8px 0 6px; text-align: center; font: 700 10.5px/1 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.im-sys { margin: 4px 0; font-size: 12px; font-style: italic; color: var(--muted); }
.im-sys.is-error { color: #ffb3bf; }
.im-typing { min-height: 18px; padding: 0 12px; font-size: 11.5px; font-style: italic; color: var(--muted); }
.im-form { display: flex; gap: 8px; padding: 8px 10px 10px; border-top: 1px solid var(--line); }
.im-form.is-off { opacity: 0.5; }
.im-input { flex: 1; resize: none; min-height: 44px; padding: 8px 10px; font: 13.5px/1.4 "Segoe UI", system-ui, sans-serif; color: var(--ink); background: rgba(3, 6, 14, 0.75); border: 1px solid var(--line); border-radius: 6px; scrollbar-width: none; }
.im-input:focus { outline: none; border-color: var(--accent); }
.im-send { align-self: stretch; }

/* a new message: the window's taskbar button flashes */
.task.flash { animation: imFlash 1s ease-in-out infinite; }
@keyframes imFlash { 0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 123, 143, 0.4); } 50% { background: rgba(255, 123, 143, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 123, 143, 0.9); color: #ffffff; } }
/* unread count on COMMUNITY and the phone menu button */
[data-unread] { position: relative; }
[data-unread]::after { content: attr(data-unread); position: absolute; top: 2px; right: 0; min-width: 16px; padding: 1px 4px; border-radius: 8px; font: 700 10px/1.3 "Segoe UI", system-ui, sans-serif; color: #11161f; background: #ff7b8f; pointer-events: none; }

/* Discord window (drawn by the site from Discord's widget data) */
.dc { height: 100%; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(14, 22, 38, 0.92), rgba(6, 10, 18, 0.94)); }
.dc-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 20% 0%, rgba(110, 120, 255, 0.22), transparent 70%), linear-gradient(180deg, rgba(156, 196, 228, 0.10), rgba(156, 196, 228, 0.02)); }
.dc-kicker { font: 600 10.5px/1 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.26em; color: var(--accent); }
.dc-name { margin-top: 6px; font: 700 20px/1.2 "Cinzel", Georgia, serif; letter-spacing: 0.04em; color: #f5e6b8; }
.dc-count { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.dc-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 6px 10px 10px; }
.dc-sec { margin: 12px 4px 6px; font: 700 10.5px/1 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.18em; color: var(--accent); }
.dc-chan { margin: 6px 4px 2px; font-size: 12.5px; font-weight: 600; color: var(--gold); }
.dc-member { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 6px; }
.dc-member:hover { background: rgba(156, 196, 228, 0.07); }
.dc-member .ch-row-txt b { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-av { position: relative; overflow: visible; width: 30px; height: 30px; }
.dc-av img { border-radius: 50%; }
.dc-av .ch-dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border: 2px solid #0b1220; }
.dc-online { background: #2fcf66; } .dc-idle { background: #f0b429; } .dc-dnd { background: #e5484d; }
.dc-foot { padding: 10px; display: flex; justify-content: center; border-top: 1px solid var(--line); background: rgba(6, 10, 18, 0.9); }
.dc-foot .aca-btn { text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .task.flash { animation: none; background: rgba(255, 123, 143, 0.3); } }
@media (max-width: 760px) {
  #desktop .win-buddies .win-body, #desktop .win-im .win-body, #desktop .win-discord .win-body { padding: 0; overflow: hidden; }
}

/* Discord in the buddy list, and Settings > Discord */
.ch-veil { flex: 0 0 auto; padding: 1px 5px; border-radius: 3px; font: 700 9px/1.5 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.1em; color: #ffffff; background: linear-gradient(180deg, #7b86ff, #5865f2); }
.ch-dc-note { margin: 2px 12px 6px 22px; font-size: 11.5px; color: var(--muted); }
.ch-dc-note:empty { display: none; }
.ac-discord { margin: 14px 0 6px; padding: 12px 14px; background: rgba(8, 13, 24, 0.5); border: 1px solid var(--line); border-radius: 8px; max-width: 620px; }
.ac-discord .aca-h3 { margin: 0 0 8px; }
.ac-dc-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ac-dc-row .dim { flex: 1 1 260px; margin: 0; }
.ac-dc-who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ac-dc-who b { color: #ffffff; }
.ac-dc-who span { font-size: 12px; color: var(--muted); }
.ac-dc-connect { text-decoration: none; background: linear-gradient(180deg, #7b86ff, #5865f2) !important; color: #ffffff !important; }
.ac-dc-connect.is-off { opacity: 0.45; pointer-events: none; }
.ac-note { margin: 0 0 10px; font-size: 13px; }
.ac-note-ok { color: #9fe8c4; } .ac-note-bad { color: #ffb3bf; }
.ac-discord > .dim { margin: 8px 0 0; font-size: 12.5px; }

/* ---------- Luxyra Veil (Marketplace) ---------- */
.lx-card {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: 220px; border: 1px solid rgba(228, 138, 184, 0.35); border-radius: 6px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, rgba(228, 138, 184, 0.22), transparent 60%),
              radial-gradient(ellipse at 20% 90%, rgba(127, 227, 255, 0.10), transparent 55%), #070912;
}
.lx-ring { position: absolute; width: 230px; height: 230px; border-radius: 50%; border: 1px solid rgba(228, 138, 184, 0.28);
  box-shadow: 0 0 40px rgba(228, 138, 184, 0.15), inset 0 0 30px rgba(228, 138, 184, 0.10); animation: lxSpin 40s linear infinite; }
.lx-ring::before { content: ''; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; margin-left: -3px; border-radius: 50%;
  background: #e48ab8; box-shadow: 0 0 12px #e48ab8; }
@keyframes lxSpin { to { transform: rotate(360deg); } }
.lx-mark { position: relative; font-family: Cinzel, Georgia, serif; font-size: 64px; letter-spacing: 0.04em; color: #f3c9de;
  text-shadow: 0 0 24px rgba(228, 138, 184, 0.55); line-height: 1; }
.lx-mark span { color: var(--gold); margin-left: -0.08em; }
.lx-tag { position: relative; font-family: Cinzel, Georgia, serif; font-size: 15px; letter-spacing: 0.32em; color: #f3c9de; }
.lx-sub { position: relative; font-size: 12px; letter-spacing: 0.2em; color: var(--muted, #9aa7bd); text-transform: uppercase; }
.lx-lines { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lx-lines li { font-size: 12px; padding: 4px 10px; border: 1px solid rgba(228, 138, 184, 0.35); border-radius: 999px; color: #f3c9de; background: rgba(228, 138, 184, 0.08); }
.pg-luxyra .lx-go { border-color: rgba(228, 138, 184, 0.7); color: #f3c9de; }
.pg-luxyra .lx-go:hover { background: rgba(228, 138, 184, 0.16); box-shadow: inset 0 0 0 1px rgba(228, 138, 184, 0.9); }
@media (prefers-reduced-motion: reduce) { .lx-ring { animation: none; } }
@media (max-width: 760px) { .lx-card { min-height: 170px; } .lx-mark { font-size: 48px; } .lx-ring { width: 170px; height: 170px; } }

/* ---------- voice calls (voice.js, in the chat windows) ---------- */
.im-calltool { color: #8ff0c0; border-color: rgba(120, 230, 170, 0.45); font-size: 13px; }
.im-calltool:hover { border-color: #8ff0c0; background: rgba(120, 230, 170, 0.12); }
.im-call { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: rgba(156, 196, 228, 0.06); }
.im-call[hidden] { display: none; }
.im-call.is-live { background: linear-gradient(90deg, rgba(60, 200, 130, 0.16), rgba(60, 200, 130, 0.04)); border-bottom-color: rgba(120, 230, 170, 0.35); }
.im-call.is-ringing { background: linear-gradient(90deg, rgba(60, 200, 130, 0.22), rgba(60, 200, 130, 0.06)); animation: imRing 1.2s ease-in-out infinite; }
@keyframes imRing { 50% { box-shadow: inset 0 0 0 1px rgba(120, 230, 170, 0.75); } }
.im-call-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.im-call-info b { font-size: 13px; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-call-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-call-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.im-call-led { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px #3ddc84; animation: imLed 1.6s ease-in-out infinite; }
@keyframes imLed { 50% { opacity: 0.35; } }
.im-call-time { margin-left: auto; font: 12px "JetBrains Mono", Consolas, monospace; color: #8ff0c0; }
.im-call-people { display: flex; flex-wrap: wrap; gap: 5px; }
.im-call-p { display: inline-flex; align-items: center; gap: 5px; max-width: 140px; padding: 2px 8px 2px 6px; border-radius: 999px; font-size: 11.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(156, 196, 228, 0.08); border: 1px solid var(--line); transition: box-shadow 0.15s, border-color 0.15s; }
.im-call-mic { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: #6f7f93; }
.im-call-p.is-talk { border-color: #3ddc84; box-shadow: 0 0 0 1px #3ddc84, 0 0 10px rgba(61, 220, 132, 0.45); }
.im-call-p.is-talk .im-call-mic { background: #3ddc84; }
.im-call-p.is-muted .im-call-mic { background: #ff7b8f; }
.im-call-p.is-wait { opacity: 0.6; }
.im-call-actions { flex: 0 0 auto; display: flex; gap: 6px; }
.im-call-btn { min-height: 30px; padding: 6px 11px; font-size: 11px; letter-spacing: 0.08em; }
.im-call-btn.is-on { color: #ffb3bf; border-color: rgba(255, 123, 143, 0.5); }
.im-call-yes { background: linear-gradient(180deg, #4ee39a, #23b06a); color: #04140b; border-color: #4ee39a; }
.im-call-end { color: #ffd0d7; background: rgba(220, 60, 80, 0.22); border-color: rgba(255, 123, 143, 0.6); }
.im-call-end:hover { background: rgba(220, 60, 80, 0.38); }
.ch-oncall { flex: 0 0 auto; padding: 1px 5px; border-radius: 3px; font: 700 9px/1.5 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.08em; color: #04140b; background: linear-gradient(180deg, #7cf0b4, #3ddc84); }
@media (prefers-reduced-motion: reduce) { .im-call.is-ringing, .im-call-led { animation: none; } }
@media (max-width: 760px) { .im-call { flex-wrap: wrap; } .im-call-actions { width: 100%; } .im-call-actions .im-call-btn { flex: 1; padding: 10px; } }

/* ---------- resizing windows (desktop.js resizeWin) ---------- */
.win-grip { position: absolute; z-index: 5; touch-action: none; }
.win-grip-s { left: 16px; right: 16px; bottom: 0; height: 7px; cursor: ns-resize; }
.win-grip-n { left: 90px; right: 90px; top: 0; height: 5px; cursor: ns-resize; }
.win-grip-se { right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; }
.win-grip-sw { left: 0; bottom: 0; width: 16px; height: 16px; cursor: nesw-resize; }
.win-grip-se::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 8px; height: 8px; border-right: 2px solid rgba(156, 196, 228, 0.35); border-bottom: 2px solid rgba(156, 196, 228, 0.35); border-radius: 0 0 2px 0; }
.win:hover .win-grip-se::after { border-color: var(--accent); }
.win.resizing { transition: none !important; user-select: none; }
.win.resizing iframe { pointer-events: none; }
@media (max-width: 760px) { .win-grip { display: none; } }

/* ---------- membership badges ---------- */
.tier-badge { display: inline-block; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55)); }
.ch-tier { width: 18px; height: 18px; margin-left: 5px; vertical-align: -4px; flex: 0 0 auto; }
.pl-tier.has-badge { padding-top: 12px !important; }
.pl-badge { width: 74px; height: 74px; align-self: center; margin: 0 0 2px; transition: transform .3s; }
.pl-tier:hover .pl-badge, .pl-tier.on .pl-badge { transform: scale(1.06) rotate(-4deg); }
.pl-tier { position: relative; }
.pl-current { position: absolute; top: 10px; right: 10px; padding: 2px 7px; border-radius: 999px; font: 700 9px/1.5 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.12em; color: #04140b; background: #3ddc84; }
.pl-tier.is-current { border-color: rgba(61, 220, 132, 0.7) !important; }
@media (max-width: 760px) { .pl-badge { width: 56px; height: 56px; } }

/* ---------- Members Hall (members.js) ---------- */
.mh-gold { --acc: #f3d68e; --acc2: #b8913f; }
.mh-cyan { --acc: #7fe3ff; --acc2: #2a8fb8; }
.mh-violet { --acc: #c4a4ff; --acc2: #7346c9; }
.mh-rose { --acc: #ff9ec7; --acc2: #c4467d; }
.mh-emerald { --acc: #7cf0b4; --acc2: #1f9a62; }
.mh-ember { --acc: #ffb27a; --acc2: #c8582a; }
.mh { height: 100%; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.mh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.mh-head .pg-title { margin: 2px 0 0; }
.mh-count { margin: 0 0 4px; font-size: 13px; }
.mh-view { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.mh-tools { display: flex; align-items: flex-end; gap: 12px; }
.mh-tabs { flex: 1; min-width: 0; }
.mh-search { width: 220px; height: 34px; padding: 0 12px; font: 13px "Segoe UI", system-ui, sans-serif; color: var(--ink); background: rgba(3, 6, 14, 0.7); border: 1px solid var(--line); border-radius: 999px; }
.mh-search:focus { outline: none; border-color: var(--accent); }
.mh-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-rows: 196px; gap: 12px; align-content: start; }
.mh-empty { grid-column: 1 / -1; }
.mh-pager { justify-content: center; }
.mh-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 16px 12px 12px; min-width: 0; text-align: center; cursor: pointer; color: var(--ink);
  background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--acc) 16%, transparent), rgba(6, 10, 22, 0.7) 70%); border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent); border-radius: 10px;
  transition: transform .2s, border-color .2s, box-shadow .2s; font: inherit; }
.mh-card:hover, .mh-card:focus-visible { transform: translateY(-3px); border-color: var(--acc); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px color-mix(in srgb, var(--acc) 40%, transparent); outline: none; }
.mh-card.is-you { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 50%, transparent); }
.mh-emblem { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; }
.mh-you { position: absolute; top: 9px; left: 9px; padding: 1px 6px; border-radius: 3px; font: 700 9px/1.5 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.1em; color: #0b0f18; background: var(--acc); }
.mh-where { position: absolute; bottom: 8px; right: 8px; }
.mh-tal { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; font: 700 24px "Cinzel", Georgia, serif; color: #0b0f18;
  background: radial-gradient(circle at 35% 30%, var(--acc), var(--acc2)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 60%, transparent), 0 0 18px color-mix(in srgb, var(--acc) 30%, transparent); }
.mh-tal img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mh-tal-big { width: 128px; height: 128px; font-size: 48px; }
.mh-on { position: absolute; right: 2px; bottom: 2px; width: 13px; height: 13px; border-radius: 50%; background: #3ddc84; border: 2px solid #070b14; }
.mh-tal-big .mh-on { width: 20px; height: 20px; right: 6px; bottom: 6px; }
.mh-name { max-width: 100%; font-size: 15px; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-line { max-width: 100%; font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; min-height: 32px; }
.mh-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.mh-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font: 700 9.5px/1.5 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.1em; color: var(--ink); background: rgba(156, 196, 228, 0.1); border: 1px solid var(--line); white-space: nowrap; }
.mh-badge-img { width: 15px; height: 15px; margin-left: -4px; }
.mh-b-owner { color: #1a1406; background: linear-gradient(180deg, #f6e2a6, #cfae62); border-color: #f3d68e; }
.mh-b-mod { color: #e9e2ff; background: rgba(140, 100, 230, 0.25); border-color: rgba(196, 164, 255, 0.6); }
.mh-b-tier2 { color: #cfe0ff; border-color: rgba(90, 130, 255, 0.6); background: rgba(40, 70, 200, 0.22); }
.mh-b-tier3 { color: #ffd3d3; border-color: rgba(230, 60, 60, 0.6); background: rgba(160, 20, 30, 0.25); }
.mh-b-tier4 { color: #c9ffe0; border-color: rgba(60, 220, 130, 0.6); background: rgba(20, 140, 80, 0.22); }
.mh-b-tier5 { color: #fff7e0; border-color: rgba(243, 214, 142, 0.8); background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(243, 214, 142, 0.14)); }
.mh-b-group { color: var(--acc, var(--gold)); }
.mh-b-wait { color: #ffd59a; border-color: rgba(255, 190, 100, 0.55); background: rgba(200, 120, 20, 0.18); }
.mh-stars { font-size: 12px; letter-spacing: 2px; color: var(--gold); }
.mh-pron { font-size: 11.5px; color: var(--muted); }
.mh-profile { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(250px, 300px) 1fr; gap: 20px; }
.mh-side { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px; text-align: center; border-radius: 12px; min-height: 0;
  background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--acc) 18%, transparent), rgba(6, 10, 22, 0.65) 70%); border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent); }
.mh-back { align-self: flex-start; min-height: 30px; padding: 0 10px; font-size: 11px; }
.mh-pname { margin: 4px 0 0; font: 600 24px "Cinzel", Georgia, serif; color: #ffffff; letter-spacing: 0.04em; }
.mh-pdisp { font-size: 12.5px; color: var(--muted); }
.mh-tagline { margin: 0; font-size: 13.5px; color: var(--acc); }
.mh-emblem-big { width: 84px; height: 84px; }
.mh-facts { width: 100%; margin: 4px 0 0; display: grid; gap: 4px; text-align: left; }
.mh-facts div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid rgba(156, 196, 228, 0.08); }
.mh-facts dt { font: 600 10px/1.6 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.14em; color: var(--muted); }
.mh-facts dd { margin: 0; font-size: 12.5px; color: var(--ink); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-acts { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.mh-acts .aca-btn { flex: 1; }
.mh-call:not(:disabled):not(.is-locked) { color: #8ff0c0; border-color: rgba(120, 230, 170, 0.5); }
.is-locked { opacity: 0.7; }
.mh-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mh-main .aca-tab.is-empty { opacity: 0.55; }
.mh-text { flex: 1; min-height: 0; padding: 16px 4px 0; font-size: 14.5px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.mh-text p { margin: 0 0 12px; }
.mh-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mh-links li { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(156, 196, 228, 0.05); white-space: normal; }
.mh-links a { color: var(--accent); text-decoration: none; }
.mh-links a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .mh-tools { flex-direction: column; align-items: stretch; }
  .mh-search { width: 100%; }
  .mh-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; overflow-y: auto; }
  .mh-card { padding: 12px 8px 10px; }
  .mh-profile { grid-template-columns: 1fr; overflow-y: auto; }
  .mh-tal-big { width: 96px; height: 96px; }
}

/* ---------- Profile, Membership, Settings, Admin (account.js) ---------- */
.ac { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.ac-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.ac-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.ac-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.ac-status { margin: 0; padding: 9px 12px; border-radius: 8px; font-size: 13px; color: var(--ink); background: rgba(156, 196, 228, 0.07); border: 1px solid var(--line); }
.ac-status.is-ok { border-color: rgba(61, 220, 132, 0.45); background: rgba(61, 220, 132, 0.08); }
.ac-status.is-wait { border-color: rgba(255, 190, 100, 0.5); background: rgba(200, 120, 20, 0.1); }
.ac-status .pg-linkbtn { padding: 0; font-size: 13px; }
.ac-form { display: flex; flex-direction: column; min-height: 0; }
.ac-pane { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; min-height: 0; }
.ac-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ac-label { font: 600 10.5px/1.4 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.16em; color: var(--muted); }
.ac-hint { margin: 0; font-size: 11.5px; color: #7f93ad; }
.ac-input { width: 100%; padding: 9px 11px; font: 14px/1.45 "Segoe UI", system-ui, sans-serif; color: var(--ink); background: rgba(3, 6, 14, 0.75); border: 1px solid var(--line); border-radius: 7px; box-sizing: border-box; }
.ac-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(127, 227, 255, 0.12); }
.ac-area { resize: none; scrollbar-width: none; }
select.ac-input { padding: 8px 10px; }
.ac-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ac-swatches { display: flex; gap: 8px; padding: 4px 0; }
.ac-swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; background: radial-gradient(circle at 35% 30%, var(--acc), var(--acc2)); border: 2px solid transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15); }
.ac-swatch.is-on { border-color: #ffffff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 45%, transparent); }
.ac-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.ac-actions .ac-note { margin: 0; }
.ac-preview { display: flex; flex-direction: column; gap: 8px; }
.ac-card { width: 220px; height: 210px; align-self: flex-start; cursor: default; }
.ac-card:hover { transform: none; }
.ac-tal { display: flex; flex-direction: column; gap: 8px; }
.ac-tal-row { display: flex; gap: 14px; align-items: flex-start; }
.ac-tal-pics { display: flex; gap: 10px; }
.ac-tal-pic { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.ac-tal-pic .mh-tal-big { width: 92px; height: 92px; font-size: 36px; }
.ac-tal-pic.is-pending .mh-tal { box-shadow: 0 0 0 2px rgba(255, 190, 100, 0.7); background: #111; }
.ac-tal-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.ac-danger { color: #ffd0d7 !important; background: rgba(220, 60, 80, 0.18) !important; border-color: rgba(255, 123, 143, 0.55) !important; }
.ac-danger:hover { background: rgba(220, 60, 80, 0.32) !important; }
.ac-tabs { flex-wrap: wrap; }
.ac-settings { gap: 14px; }
.ac-settings .aca-h3 { margin: 6px 0 0; }
.ac-specs { margin: 0; }
.ac-toggle { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(156, 196, 228, 0.04); cursor: pointer; }
.ac-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ac-switch { flex: 0 0 auto; position: relative; width: 40px; height: 22px; margin-top: 1px; border-radius: 999px; background: rgba(156, 196, 228, 0.18); border: 1px solid var(--line); transition: background .2s; }
.ac-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #c8d6ea; transition: transform .2s; }
.ac-toggle input:checked + .ac-switch { background: rgba(61, 220, 132, 0.55); border-color: rgba(61, 220, 132, 0.8); }
.ac-toggle input:checked + .ac-switch::after { transform: translateX(18px); background: #ffffff; }
.ac-toggle input:focus-visible + .ac-switch { box-shadow: 0 0 0 3px rgba(127, 227, 255, 0.3); }
.ac-toggle input:disabled + .ac-switch { opacity: 0.5; }
.ac-toggle-txt { display: flex; flex-direction: column; gap: 3px; }
.ac-toggle-txt b { font-size: 14px; color: #ffffff; font-weight: 600; }
.ac-toggle-txt small { font-size: 12px; color: var(--muted); }
.ac-plans .pl-tiers { flex: 1; min-height: 0; }
.ac-plan-form { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; max-width: none; width: 100%; }
.ac-plan-actions { align-items: center; flex-wrap: wrap; }
.ac-plan-actions .ac-note { margin: 0; flex-basis: 100%; }
.ac-now { display: flex; align-items: center; gap: 12px; }
.ac-now-badge { width: 54px; height: 54px; }
/* admin */
.ad-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(280px, 0.9fr) 1.3fr; gap: 18px; }
.ad-left { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.ad-left .mh-search { width: 100%; }
.ad-rows { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.ad-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 46px; text-align: left; color: var(--ink); background: rgba(156, 196, 228, 0.05); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font: inherit; }
.ad-row:hover { border-color: rgba(127, 227, 255, 0.5); }
.ad-row.is-sel { border-color: var(--gold); background: rgba(243, 214, 142, 0.08); }
.ad-row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ad-row-txt b { font-size: 13.5px; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-row-txt span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-tags { display: flex; align-items: center; gap: 4px; }
.ad-right { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ad-pick { margin: auto 0; text-align: center; }
.ad-head { display: flex; align-items: center; gap: 14px; }
.ad-head .mh-tal-big { width: 76px; height: 76px; font-size: 30px; --acc: #f3d68e; --acc2: #b8913f; }
.ad-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ad-who .mh-pname { font-size: 20px; margin: 0; }
.ad-who .dim { font-size: 12px; }
.ad-sec { display: flex; flex-direction: column; gap: 8px; }
.ad-sec:empty { display: none; }
.ad-sec .aca-h3 { margin: 0; }
.ad-inline { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.ad-inline .ac-field { flex: 1; min-width: 140px; }
.ad-inline .mh-tal-big { width: 72px; height: 72px; --acc: #ffbe64; --acc2: #8a5a1a; }
.ad-about { max-height: 3.2em; overflow: hidden; }
@media (max-width: 760px) {
  .ac-grid, .ad-grid { grid-template-columns: 1fr; overflow-y: auto; }
  .ac-pair { grid-template-columns: 1fr; }
}

/* ---------- names: membership badge on the left, colour by role (plans.js nameTag) ---------- */
.name-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; vertical-align: bottom; }
.name-tag .nt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-badge { width: 18px; height: 18px; flex: 0 0 auto; }
.mh-pname .nt-badge { width: 28px; height: 28px; }
.role-free { color: inherit; }
.role-owner { color: #f3d68e; }
.role-mod { color: #c4a4ff; }
.role-tier5 { color: #fbf7ec; text-shadow: 0 0 8px rgba(255, 255, 255, 0.35); }
.role-tier4 { color: #6ff0a8; }
.role-tier3 { color: #ff7a7a; }
.role-tier2 { color: #86a8ff; }
.im-name .name-tag { vertical-align: -4px; }
.im-name .nt-badge { width: 16px; height: 16px; }
.mh-card .mh-name { display: flex; justify-content: center; }

/* ---------- AI CONNECT (aiconnect.js): a studio in one window ---------- */
.win.win-connect .win-body { padding: 0; }
.ax { position: relative; height: 100%; display: grid; grid-template-columns: 210px 1fr; min-height: 0; background:
  radial-gradient(90% 60% at 70% -10%, rgba(127, 227, 255, 0.10), transparent 60%),
  radial-gradient(60% 50% at 100% 0%, rgba(214, 120, 255, 0.10), transparent 60%), #060a14; }
.ax-side { display: flex; flex-direction: column; gap: 6px; padding: 16px 12px; border-right: 1px solid var(--line); background: rgba(4, 7, 15, 0.7); min-height: 0; }
.ax-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font: 700 15px "Cinzel", Georgia, serif; letter-spacing: 0.14em; color: #f5e6b8; }
.ax-logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-size: 18px; color: #04140b; background: linear-gradient(135deg, #7fe3ff, #c4a4ff 60%, #f3d68e); box-shadow: 0 0 18px rgba(127, 227, 255, 0.35); }
.ax-nav { display: flex; flex-direction: column; gap: 3px; }
.ax-nav-head { margin: 14px 10px 4px; font: 600 10px/1 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.24em; color: #6f83a0; }
.ax-nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 500 14px "Segoe UI", system-ui, sans-serif; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.ax-nav-item:hover { background: rgba(156, 196, 228, 0.08); }
.ax-nav-item.is-on { background: linear-gradient(90deg, rgba(127, 227, 255, 0.18), rgba(127, 227, 255, 0.04)); color: #ffffff; box-shadow: inset 2px 0 0 #7fe3ff; }
.ax-ico { width: 20px; text-align: center; font-size: 15px; color: #9fd8ef; }
.ax-nav-item.is-on .ax-ico { color: #7fe3ff; }
.ax-credits { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(156, 196, 228, 0.04); }
.ax-cr-label { font: 600 9.5px/1.3 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.18em; color: #6f83a0; }
.ax-cr-num { font-size: 18px; color: #ffffff; }
.ax-cr-sub { font-size: 11.5px; color: var(--muted); }
.ax-bar { height: 6px; border-radius: 999px; background: rgba(156, 196, 228, 0.12); overflow: hidden; }
.ax-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7fe3ff, #c4a4ff); }
.ax-cr-btn { min-height: 32px; font-size: 10.5px; }
.ax-cr-more { align-self: flex-start; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; color: #7fe3ff !important; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ax-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 18px 22px 16px; gap: 12px; }
.ax-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ax-title { display: flex; align-items: baseline; gap: 14px; min-width: 0; flex-wrap: wrap; }
.ax-title h2 { margin: 0; font: 600 24px "Cinzel", Georgia, serif; letter-spacing: 0.06em; color: #ffffff; }
.ax-sub { font-size: 12.5px; color: var(--muted); }
.ax-back { min-height: 30px; font-size: 11px; align-self: center; }
.ax-top-tools { display: flex; gap: 8px; }
.ax-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ax-chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(156, 196, 228, 0.04); color: var(--ink); font: 500 12.5px "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.ax-chip:hover { border-color: rgba(127, 227, 255, 0.5); }
.ax-chip.is-on { background: rgba(127, 227, 255, 0.16); border-color: #7fe3ff; color: #ffffff; }
.ax-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.ax-wait { margin: auto; }
.ax-empty, .ax-lock { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 520px; }
.ax-empty p { margin: 0; color: var(--muted); font-size: 15px; }
.ax-empty-ico { font-size: 34px; color: #f3d68e; text-shadow: 0 0 18px rgba(243, 214, 142, 0.5); }
.ax-lock h3 { margin: 0; font: 600 15px "Cinzel", Georgia, serif; letter-spacing: 0.1em; color: #f5e6b8; }
.ax-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-rows: 280px; gap: 12px; align-content: start; }
.ax-grid-lib { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-rows: 220px; }
.ax-grid-proj { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-rows: 230px; }
.ax-pager { justify-content: center; }
/* a creation card */
.ax-job { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(8, 13, 26, 0.85); }
.ax-job-body { flex: 1; min-height: 0; display: flex; position: relative; background: #03060d; }
.ax-making { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; }
.ax-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(127, 227, 255, 0.18); border-top-color: #7fe3ff; animation: axSpin 0.9s linear infinite; }
@keyframes axSpin { to { transform: rotate(360deg); } }
.ax-elapsed { font: 12px "JetBrains Mono", Consolas, monospace; color: var(--muted); }
.ax-job.is-running .ax-job-body, .ax-job.is-queued .ax-job-body { background: linear-gradient(120deg, #050912, #0b1426, #050912); background-size: 300% 300%; animation: axShimmer 3s ease infinite; }
@keyframes axShimmer { 50% { background-position: 100% 50%; } }
.ax-err { margin: auto; padding: 14px; font-size: 13px; color: #ffb3bf; text-align: center; }
.ax-ptext { margin: 0; padding: 14px; font-size: 13px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; }
.ax-outs { flex: 1; display: grid; gap: 2px; min-height: 0; }
.ax-outs.n2 { grid-template-columns: 1fr 1fr; }
.ax-outs.n3, .ax-outs.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.ax-out { padding: 0; border: 0; background: #000; cursor: zoom-in; min-height: 0; overflow: hidden; }
.ax-media { width: 100%; height: 100%; object-fit: cover; display: block; }
.ax-audio { width: 100%; height: 100%; display: grid; place-items: center; gap: 8px; padding: 12px; background: radial-gradient(circle at 50% 40%, rgba(196, 164, 255, 0.22), transparent 70%); }
.ax-wave { font-size: 46px; color: #c4a4ff; text-shadow: 0 0 20px rgba(196, 164, 255, 0.6); }
.ax-audio audio { width: 100%; max-width: 420px; }
.ax-job-foot { flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; padding: 9px 11px 10px; border-top: 1px solid rgba(156, 196, 228, 0.08); }
.ax-jprompt { margin: 0; font-size: 12.5px; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-jmeta { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.ax-jmeta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-when { flex: 0 0 auto; }
.ax-jacts { display: flex; gap: 6px; }
.ax-act { padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(156, 196, 228, 0.05); color: var(--ink); font: 600 10px/1.4 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.08em; cursor: pointer; }
.ax-act:hover { border-color: #7fe3ff; }
.ax-del { margin-left: auto; color: #ffb3bf; }
/* library cards */
.ax-lib { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #03060d; cursor: zoom-in; font: inherit; color: var(--ink); text-align: left; }
.ax-lib:hover { border-color: rgba(127, 227, 255, 0.6); }
.ax-lib-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); opacity: 0; transition: opacity .2s; }
.ax-lib:hover .ax-lib-cap, .ax-lib:focus-visible .ax-lib-cap { opacity: 1; }
.ax-lib-prompt { display: block; height: 100%; padding: 14px; font-size: 12.5px; line-height: 1.5; overflow: hidden; background: linear-gradient(160deg, rgba(243, 214, 142, 0.08), transparent); }
.ax-count, .ax-liked { position: absolute; top: 8px; padding: 2px 8px; border-radius: 999px; font: 700 11px/1.5 "JetBrains Mono", Consolas, monospace; background: rgba(0, 0, 0, 0.7); }
.ax-count { right: 8px; } .ax-liked { left: 8px; color: #ff8fb4; }
/* projects */
.ax-proj { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8, 13, 26, 0.8); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.ax-proj:hover { border-color: rgba(127, 227, 255, 0.6); transform: translateY(-2px); }
.ax-proj b { font-size: 14px; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-proj-cover { flex: 1; min-height: 0; display: grid; place-items: center; border-radius: 10px; overflow: hidden; background: #03060d; }
.ax-proj-new { align-items: center; justify-content: center; border-style: dashed; }
/* home */
.ax-home { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 18px; }
.ax-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 6px; text-align: center; }
.ax-hero h3 { margin: 0; font: 600 30px "Cinzel", Georgia, serif; letter-spacing: 0.04em; background: linear-gradient(90deg, #7fe3ff, #c4a4ff 50%, #f3d68e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ax-kicker { font: 600 10.5px/1.4 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.24em; color: #7fe3ff; }
.ax-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ax-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; min-height: 140px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8, 13, 26, 0.8); color: var(--muted); text-align: left; font: 12.5px/1.45 "Segoe UI", system-ui, sans-serif; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
.ax-tile b { font-size: 16px; color: #ffffff; }
.ax-tile:hover { transform: translateY(-3px); border-color: var(--tc); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px color-mix(in srgb, var(--tc) 40%, transparent); }
.ax-tile-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; font-size: 18px; color: #04140b; background: var(--tc); }
.ax-t-prompt { --tc: #f3d68e; } .ax-t-image { --tc: #7fe3ff; } .ax-t-video { --tc: #ff9ec7; } .ax-t-music { --tc: #c4a4ff; } .ax-t-audio { --tc: #7cf0b4; }
.ax-recent { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.ax-recent-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ax-thumb { aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #03060d; cursor: zoom-in; }
/* the composer */
.ax-composer { flex: 0 0 auto; display: flex; flex-direction: column; }
.ax-composer[hidden] { display: none; }
.ax-ctabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ax-ctab { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; background: rgba(8, 13, 26, 0.75); color: var(--muted); font: 600 13px "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.ax-ctab:hover { color: #ffffff; }
.ax-ctab.is-on { color: #ffffff; background: linear-gradient(180deg, rgba(127, 227, 255, 0.22), rgba(10, 18, 34, 0.95)); border-color: rgba(127, 227, 255, 0.55); }
.ax-cbox { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid rgba(127, 227, 255, 0.35); border-radius: 0 0 16px 16px; background: rgba(10, 16, 30, 0.95); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35); }
.ax-text { width: 100%; box-sizing: border-box; resize: none; padding: 6px 2px; border: 0; background: transparent; color: #ffffff; font: 15px/1.5 "Segoe UI", system-ui, sans-serif; scrollbar-width: none; }
.ax-text:focus { outline: none; }
.ax-text::placeholder { color: #6f83a0; }
.ax-lyrics { border-top: 1px dashed rgba(156, 196, 228, 0.2); padding-top: 8px; font-size: 14px; }
.ax-crow { display: flex; align-items: center; gap: 10px; }
.ax-copts { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ax-chipbox { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(156, 196, 228, 0.05); }
.ax-chip-label { font: 600 9.5px/1 "JetBrains Mono", Consolas, monospace; letter-spacing: 0.14em; color: #6f83a0; }
.ax-sel { max-width: 190px; padding: 5px 8px; border: 0; border-radius: 999px; background: rgba(3, 6, 14, 0.8); color: #ffffff; font: 600 12.5px "Segoe UI", system-ui, sans-serif; }
.ax-sel:focus { outline: 1px solid #7fe3ff; }
.ax-inp { width: 150px; }
.ax-cost { flex: 0 0 auto; font: 600 12px "JetBrains Mono", Consolas, monospace; color: #f3d68e; }
.ax-send { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 0; font-size: 20px; font-weight: 700; color: #04140b; background: linear-gradient(135deg, #7fe3ff, #c4a4ff); cursor: pointer; box-shadow: 0 0 18px rgba(127, 227, 255, 0.35); transition: transform .15s, opacity .15s; }
.ax-send:hover:not(:disabled) { transform: scale(1.06); }
.ax-send:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.ax-note { margin: 6px 4px 0; font-size: 12.5px; color: var(--muted); }
.ax-note:empty { display: none; }
.ax-note.is-bad { color: #ffb3bf; }
/* the viewer */
.ax-viewer { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 58px 24px 24px; background: rgba(2, 4, 10, 0.86); backdrop-filter: blur(6px); }
.ax-viewer[hidden] { display: none; }
.ax-view-close { position: absolute; top: 12px; right: 24px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(10, 16, 30, 0.9); color: #ffffff; font-size: 16px; cursor: pointer; }
.ax-view { width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 340px; gap: 20px; min-height: 0; }
.ax-view-media { display: flex; flex-direction: column; gap: 10px; min-height: 0; align-items: center; justify-content: center; }
.ax-view-media > .ax-media { max-width: 100%; max-height: calc(100% - 80px); width: auto; height: auto; object-fit: contain; border-radius: 12px; }
.ax-view-media > .ax-audio { max-width: 520px; height: 260px; border: 1px solid var(--line); border-radius: 16px; }
.ax-ptext-big { -webkit-line-clamp: 30; max-width: 760px; font-size: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8, 13, 26, 0.9); }
.ax-strip { display: flex; gap: 8px; }
.ax-strip-btn { width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; }
.ax-strip-btn.is-on { border-color: #7fe3ff; }
.ax-view-side { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8, 13, 26, 0.92); min-height: 0; overflow: hidden; }
.ax-view-prompt { margin: 0; font-size: 14px; line-height: 1.55; color: #ffffff; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 10; -webkit-box-orient: vertical; }
.ax-view-lyrics { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; }
.ax-view-acts { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.ax-view-acts .aca-btn { flex: 1 1 auto; text-decoration: none; }
.ax-view-acts .is-liked { color: #ff8fb4; border-color: rgba(255, 143, 180, 0.6); }
.ax-field { display: flex; flex-direction: column; gap: 4px; flex-basis: 100%; }
@media (prefers-reduced-motion: reduce) { .ax-spin, .ax-job.is-running .ax-job-body, .ax-job.is-queued .ax-job-body { animation: none; } }
@media (max-width: 1100px) { .ax-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ax-tiles .ax-tile:nth-child(n+4) { display: none; } }
@media (max-width: 760px) {
  .ax { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .ax-side { flex-direction: row; align-items: center; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .ax-brand, .ax-nav-head, .ax-credits { display: none; }
  .ax-nav { flex-direction: row; }
  .ax-nav-item { padding: 8px 10px; white-space: nowrap; }
  .ax-main { padding: 12px; }
  .ax-stage { overflow-y: auto; }
  .ax-grid, .ax-grid-lib { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .ax-tiles { grid-template-columns: 1fr 1fr; } .ax-tiles .ax-tile:nth-child(n+4) { display: flex; }
  .ax-ctab span:last-child { display: none; }
  .ax-view { grid-template-columns: 1fr; overflow-y: auto; }
  .ax-copts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}
.ax-send.is-busy { position: relative; opacity: 0.8 !important; }
.ax-send.is-busy::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; border: 3px solid rgba(4, 20, 11, 0.25); border-top-color: #04140b; animation: axSpin 0.8s linear infinite; }

/* ---------- phones: fixes from the mobile check ---------- */
.ac-status .pg-linkbtn { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; color: #7fe3ff !important; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 760px) {
  /* Profile and Admin: the columns stack and the window scrolls, nothing sits on top of anything */
  .ac-grid, .ad-grid { grid-auto-rows: max-content; align-content: start; }
  .ac-col, .ad-left, .ad-right, .ac-form, .ac-pane { min-height: auto; }
  .ac-actions { margin-top: 4px; }
  .ac-card { width: 100%; max-width: 260px; }
  .ac-tal-row { flex-direction: column; }
  /* Membership: the tier cards one under another, full height, scrolling */
  .ac-plans .ac-body, .ac-plan-form { overflow-y: auto; min-height: 0; }
  .ac-plans .pl-tiers { flex: none; min-height: auto; grid-template-columns: 1fr; }
  .ac-plans .pl-tier { min-height: 0; }
  .ac-now { align-items: flex-start; }
  /* tab rows swipe sideways instead of wrapping onto three lines */
  .ac-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ac-tabs .aca-tab { flex: 0 0 auto; }
  /* AI Connect: every setting shows (two rows), bigger controls */
  .ax-copts { flex-wrap: wrap; overflow: visible; }
  .ax-crow { flex-wrap: wrap; }
  .ax-crow .ax-cost { margin-left: auto; }
  .ax-sel { min-height: 34px; font-size: 14px; }
  .ax-chip-label { font-size: 10.5px; }
  .ax-act { padding: 8px 12px; font-size: 11px; }
  .ax-view-side { overflow: visible; }
  .ax-viewer { overflow-y: auto; place-items: start center; }
  .ax-text { font-size: 16px; }   /* 16px stops phones zooming in when typing */
  /* chat: comfortable tap areas */
  .ch-sec-head { min-height: 38px; }
  .ch-row { min-height: 52px; }
  .ch-status { min-height: 32px; font-size: 13px; }
  .ch-note-input { min-height: 34px; font-size: 16px; }
  .ch-add { min-height: 34px; }
  .ch-tool { min-width: 40px; min-height: 36px; }
  .im-input, .ac-input, .mh-search, .aca-input { font-size: 16px; }
  /* sign in */
  .pg-form .pg-linkbtn { min-height: 36px; display: inline-flex; align-items: center; }
  .pg-form label.jn-in { min-height: 36px; }
  .pg-form label.jn-in input { width: 20px; height: 20px; }
  .gate-lock, .soon-tag { font-size: 10.5px; }
  /* music seek and volume: easier to grab */
  .mp input[type="range"] { height: 30px; }
}
@media (max-width: 760px) {
  .ac-grid, .ad-grid { grid-template-columns: minmax(0, 1fr); }
  .ac-tabs, .mh-tabs, .ac-body > *, .ad-left > * { min-width: 0; max-width: 100%; }
  .mh-badge, .mh-you, .pl-current, .mh-facts dt, .pl-bill small { font-size: 10.5px; }
  .ac-status .pg-linkbtn { display: inline-block; padding: 6px 0 !important; }
}
@media (max-width: 760px) {
  /* Settings and Admin tabs: all visible as a neat grid, none hidden off the side */
  .ac-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; border-bottom: 0; gap: 4px; }
  .ad-left .ac-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-tabs .aca-tab { min-height: 38px; padding: 8px 4px; margin: 0; border: 1px solid var(--line); border-radius: 8px; letter-spacing: 0.08em; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ac-tabs .aca-tab.is-on { border-color: var(--gold); background: rgba(243, 214, 142, 0.1); }
}
@media (max-width: 760px) {
  /* AI Connect on phones: the results get real room, the composer sits below them, the window scrolls */
  .ax-main { display: block; overflow-y: auto; padding: 10px 12px 14px; }
  .ax-top { margin-bottom: 8px; }
  .ax-title .ax-sub { display: none; }
  .ax-stage { min-height: 52vh; overflow: visible; margin-bottom: 12px; }
  .ax-grid { flex: none; }
  .ax-home { min-height: 0; }
  .ax-hero h3 { font-size: 22px; }
  .ax-tile { min-height: 0; padding: 12px; }
  .ax-tile span:last-child { display: none; }
  .ax-text { min-height: 56px; }
}
.nav-drawer { max-width: 100vw; box-sizing: border-box; }

/* Music player: folders, uploads and the owners' tools */
.mp-right { position: relative; }
.mp-bar { display: flex; gap: 8px; align-items: center; }
.mp-bar select, .mp-sheet select, .mp-sheet input[type="text"] {
  flex: 1; min-width: 0; background: rgba(3, 6, 14, 0.75); color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px;
  font: 14px "Segoe UI", system-ui, sans-serif;
}
.mp-bar select:focus, .mp-sheet select:focus, .mp-sheet input:focus { outline: none; border-color: var(--gold); }
.mp-bar select option, .mp-sheet select option { background: #0b1017; color: var(--ink); }
.mp .mp-up { white-space: nowrap; color: var(--gold); border-color: rgba(224, 203, 147, 0.55); }
.mp-fold-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.mp-fold-tools button { padding: 5px 9px !important; font-size: 12px !important; }
.mp .mp-danger { color: #ffb4b4 !important; border-color: rgba(255, 122, 122, 0.7) !important; }
.mp-list li { grid-template-columns: 30px minmax(0, 1fr) auto 26px; min-height: 36px; box-sizing: border-box; }
.mp-list li .mp-a { max-width: 170px; }
.mp-wait { margin-left: 8px; font-style: normal; font-size: 10px; letter-spacing: 0.1em; color: #ffd27a; border: 1px solid rgba(255, 210, 122, 0.5); border-radius: 3px; padding: 1px 5px; vertical-align: 1px; }
.mp .mp-more { padding: 2px 0 !important; width: 26px; font-size: 15px !important; line-height: 1 !important; background: none !important; border-color: transparent !important; color: var(--muted) !important; }
.mp .mp-more:hover { color: var(--ink) !important; border-color: var(--line) !important; }
.mp-right.sheet-open > :not(.mp-sheet) { visibility: hidden; }
.mp-sheet { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 9px; padding: 4px 2px; }
.mp-sheet[hidden] { display: none; }
.mp-sheet-h { margin: 0 0 2px; font: 600 13px "Segoe UI", system-ui, sans-serif; letter-spacing: 0.14em; color: var(--gold); }
.mp-field { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; align-items: center; font: 12px "Segoe UI", system-ui, sans-serif; letter-spacing: 0.1em; color: var(--muted); }
.mp-field input[type="file"] { min-width: 0; color: var(--muted); font: 13px "Segoe UI", system-ui, sans-serif; }
.mp-field input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 3px; background: rgba(255, 255, 255, 0.06); color: var(--ink); cursor: pointer; font: inherit; }
.mp-check { display: flex; gap: 9px; align-items: flex-start; font: 13px/1.35 "Segoe UI", system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.mp-check input { margin-top: 2px; accent-color: #e0cb93; }
.mp-sheet-note { margin: 0; font: 12px/1.4 "Segoe UI", system-ui, sans-serif; color: var(--muted); }
.mp-sheet-msg { margin: 0; min-height: 17px; font: 13px "Segoe UI", system-ui, sans-serif; color: #ffd27a; }
.mp-sheet-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.mp-progress { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.mp-progress[hidden] { display: none; }
.mp-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #e050ff, #32e1f0); transition: width .2s; }
@media (max-width: 760px) {
  .mp-field { grid-template-columns: 1fr; gap: 4px; }
  .mp-bar select, .mp-sheet select, .mp-sheet input[type="text"] { font-size: 16px; }
  .mp-list li { min-height: 44px; }
  .mp .mp-more { width: 36px; font-size: 18px !important; }
  .mp-list li .mp-a { max-width: 90px; }
  .mp-right.sheet-open > :not(.mp-sheet) { display: none; }
  .mp-sheet { position: static; }
  .mp-sheet-row { margin-top: 6px; }
}
