@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --bg: #05060a;
  --panel: rgba(15, 20, 30, 0.85);
  --border: rgba(255, 255, 255, 0.15);

  --yellow: #fcee09;
  --cyan: #00f0ff;
  --pink: #ff2bd6;
  --green: #00ff9d;

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.6);
  --bg-glow-a: rgba(0, 240, 255, 0.15);
  --bg-glow-b: rgba(255, 43, 214, 0.12);
  --settings-font-scale: 1;

  --topnav-height: 46px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--theme-font-family, "Press Start 2P", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", Arial, sans-serif);
}

body {
  background: radial-gradient(circle at top left, var(--bg-glow-a), transparent 60%),
              radial-gradient(circle at bottom right, var(--bg-glow-b), transparent 55%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;

  /* 删除 padding-top，交给 container 控制 */
  padding-top: 0;
}

.top-navbar,
.panel,
.card,
.btn,
.subtitle,
.status,
.footer,
.sidebar,
.cyber-news-terminal,
.global-music-player,
input,
button {
  font-size: calc(1em * var(--settings-font-scale));
}

/* 扫描线效果 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.2;
  z-index: 5;
}

/* HUD 噪点 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.06;
  z-index: 4;
}

/* 顶部栏 */
.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--topnav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;

  backdrop-filter: blur(12px) saturate(180%);
  background: rgba(10, 10, 20, 0.38);

  border-bottom: 2px solid rgba(0, 255, 157, 0.42);
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.28);

  z-index: 9999;
  color: #00ff9d;
  font-size: 12px;
  font-weight: bold;
}

.top-navbar .navbar-left,
.top-navbar .navbar-center,
.top-navbar .navbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-navbar .nav-brand {
  font-size: 13px;
  text-shadow: 0 0 8px rgba(0, 255, 157, 0.6);
  cursor: pointer;
}

body.blackwall-active {
  animation: blackwallPageJitter 0.16s steps(2, end) 10;
}

body.blackwall-active::before {
  opacity: 0.42;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 157, 0.08),
    rgba(0, 255, 157, 0.08) 1px,
    rgba(255, 43, 214, 0.05) 2px,
    transparent 5px
  );
}

.blackwall-whisper {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(0, 0, 0, 0.1), rgba(0, 255, 157, 0.06), rgba(255, 43, 214, 0.08)),
    rgba(0, 0, 0, 0.18);
  animation: blackwallOverlayIn 0.22s ease both;
}

.blackwall-whisper.closing {
  animation: blackwallOverlayOut 0.7s ease both;
}

.blackwall-whisper-card {
  width: min(520px, calc(100vw - 34px));
  border: 1px solid rgba(0, 255, 157, 0.46);
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.045),
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px,
      transparent 5px
    ),
    rgba(1, 8, 6, 0.88);
  box-shadow:
    0 0 34px rgba(0, 255, 157, 0.18),
    0 0 80px rgba(255, 43, 214, 0.12),
    inset 0 0 24px rgba(0, 0, 0, 0.66);
  padding: 22px;
  color: rgba(220, 255, 232, 0.96);
  text-align: left;
  transform: skewX(-1deg);
}

.blackwall-whisper-kicker {
  margin-bottom: 12px;
  color: rgba(255, 43, 214, 0.95);
  font-size: 9px;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(255, 43, 214, 0.28);
}

.blackwall-whisper-title {
  margin-bottom: 14px;
  color: rgba(0, 255, 157, 0.98);
  font-size: 16px;
  line-height: 1.7;
  text-shadow: 0 0 16px rgba(0, 255, 157, 0.32);
}

.blackwall-whisper-line {
  margin-top: 9px;
  color: rgba(235, 255, 244, 0.84);
  font-size: 9px;
  line-height: 1.9;
}

.blackwall-whisper-line::before {
  content: "> ";
  color: rgba(0, 255, 157, 0.96);
}

.blackwall-whisper-foot {
  margin-top: 16px;
  color: rgba(252, 238, 9, 0.9);
  font-size: 8px;
  line-height: 1.8;
}

.global-music-title.blackwall-corrupt {
  color: rgba(255, 43, 214, 0.98);
  text-shadow: 0 0 12px rgba(255, 43, 214, 0.38);
  animation: blackwallTextCorrupt 0.14s steps(2, end) infinite;
}

.city-district.blackwall-breach {
  fill: rgba(0, 0, 0, 0.86) !important;
  stroke: rgba(255, 43, 214, 1) !important;
  stroke-width: 7 !important;
  animation: blackwallDistrictPulse 0.28s ease-in-out infinite alternate;
}

@keyframes blackwallPageJitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(2px, 0); }
  100% { transform: translate(0, 0); }
}

@keyframes blackwallOverlayIn {
  from { opacity: 0; filter: blur(6px); }
  to { opacity: 1; filter: blur(0); }
}

@keyframes blackwallOverlayOut {
  to { opacity: 0; filter: blur(8px); }
}

@keyframes blackwallTextCorrupt {
  0% { transform: translateX(0); }
  50% { transform: translateX(1px); }
  100% { transform: translateX(-1px); }
}

@keyframes blackwallDistrictPulse {
  from { filter: drop-shadow(0 0 8px rgba(255, 43, 214, 0.4)); }
  to { filter: drop-shadow(0 0 22px rgba(255, 43, 214, 0.86)); }
}

.top-navbar .nav-link,
.top-navbar .nav-icon {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: 0.2s ease;
}

.top-navbar .nav-link:hover,
.top-navbar .nav-icon:hover {
  background: rgba(0, 255, 157, 0.12);
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.4);
}

/* container */
.container {
  width: min(100%, 1040px);
  max-width: 1040px;
  margin: auto;

  /* 关键：让内容整体下移，避免被顶部栏遮挡 */
  padding: calc(var(--topnav-height) + 24px) 18px 28px;

  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 10;
}

/* HUD topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.06);
}

.title {
  font-size: 16px;
  color: var(--yellow);
  text-shadow: 0 0 10px rgba(252, 238, 9, 0.3);
}

.subtitle {
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}

.status {
  font-size: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.05);
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.12);
}

.panel {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 20px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(252, 238, 9, 0.18);
  pointer-events: none;
}

.panel h2 {
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: 16px;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* 全局用户 HUD：内容来自 config/user-hud-config.js，皮肤可在设置中切换 */
.global-user-hud,
.topbar.user-hud-redesign {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 18px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.24);
  background: rgba(5, 9, 15, 0.78);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.global-user-hud::before,
.topbar.user-hud-redesign::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background: linear-gradient(120deg, rgba(0, 240, 255, 0.18), transparent 36%, rgba(252, 238, 9, 0.12));
}

.global-user-hud::after,
.topbar.user-hud-redesign::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.045), rgba(255,255,255,0.045) 1px, transparent 1px, transparent 18px);
}

.user-hud-main,
.user-hud-side {
  position: relative;
  z-index: 1;
}

.user-hud-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: min(100%, 520px);
}

.user-hud-frame {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  padding: 4px;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  border: 1px solid rgba(252, 238, 9, 0.46);
  background: rgba(0, 0, 0, 0.28);
}

.user-hud-frame .hud-avatar {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  border-color: rgba(0, 240, 255, 0.32);
}

.user-hud-kicker {
  margin-bottom: 7px;
  color: rgba(0, 240, 255, 0.82);
  font-size: 8px;
  letter-spacing: 2px;
}

.user-hud-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.72);
  font-size: 8px;
  line-height: 1.2;
}

.hud-chip strong {
  color: var(--yellow);
  font-weight: normal;
}

.hud-quote-chip {
  max-width: min(100%, 460px);
  align-items: baseline;
}

.hud-quote-label {
  color: rgba(0, 240, 255, 0.72);
}

.hud-quote-chip strong {
  max-width: 22em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-quote-chip em {
  color: rgba(255, 255, 255, 0.46);
  font-style: normal;
}

.hud-chip[data-tone="cyan"] strong { color: var(--cyan); }
.hud-chip[data-tone="pink"] strong { color: var(--pink); }
.hud-chip[data-tone="green"] strong { color: var(--green); }
.hud-chip[data-tone="red"] strong { color: #ff4b4b; }

.user-hud-side {
  min-width: 220px;
  display: grid;
  gap: 10px;
}

.user-hud-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 240, 255, 0.22);
  background: rgba(0, 240, 255, 0.04);
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 1px;
}

.user-hud-status strong {
  font-weight: normal;
}

.user-hud-status[data-tone="green"] { color: var(--green); border-color: rgba(0,255,157,0.28); }
.user-hud-status[data-tone="yellow"] { color: var(--yellow); border-color: rgba(252,238,9,0.32); }
.user-hud-status[data-tone="pink"] { color: var(--pink); border-color: rgba(255,43,214,0.32); }
.user-hud-status[data-tone="red"] { color: #ff4b4b; border-color: rgba(255,75,75,0.32); }

.user-hud-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.user-hud-stat {
  padding: 9px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
}

.user-hud-stat span,
.user-hud-footer {
  display: block;
  color: rgba(255, 255, 255, 0.45);
  font-size: 7px;
  letter-spacing: 1px;
}

.user-hud-stat strong {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 8px;
  font-weight: normal;
}

.user-hud-footer {
  color: rgba(252, 238, 9, 0.62);
  line-height: 1.6;
}

.user-hud-skin-glass .global-user-hud,
body.user-hud-skin-glass .topbar.user-hud-redesign,
.user-hud-skin-glass.topbar.user-hud-redesign {
  backdrop-filter: blur(18px) saturate(170%);
  background: linear-gradient(135deg, rgba(255,255,255,0.11), rgba(0,240,255,0.055)), rgba(8, 12, 20, 0.54);
  border-color: rgba(180, 240, 255, 0.28);
}

.user-hud-skin-terminal .global-user-hud,
body.user-hud-skin-terminal .topbar.user-hud-redesign,
.user-hud-skin-terminal.topbar.user-hud-redesign {
  background: repeating-linear-gradient(to bottom, rgba(0,255,157,0.055), rgba(0,255,157,0.055) 1px, transparent 1px, transparent 5px), rgba(1, 10, 5, 0.9);
  border-color: rgba(0,255,157,0.42);
  box-shadow: 0 0 28px rgba(0,255,157,0.12), inset 0 0 24px rgba(0,255,157,0.05);
}

.user-hud-skin-terminal .user-hud-frame,
body.user-hud-skin-terminal .user-hud-frame,
.user-hud-skin-terminal .user-hud-stat,
body.user-hud-skin-terminal .user-hud-stat,
.user-hud-skin-terminal .hud-chip {
  border-radius: 0;
  border-color: rgba(0,255,157,0.32);
}

.user-hud-skin-street .global-user-hud,
body.user-hud-skin-street .topbar.user-hud-redesign,
.user-hud-skin-street.topbar.user-hud-redesign {
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  background: linear-gradient(120deg, rgba(252,238,9,0.18), rgba(255,43,214,0.08) 48%, rgba(0,240,255,0.08)), rgba(14, 8, 20, 0.86);
  border-color: rgba(252,238,9,0.42);
}

.user-hud-skin-corporate .global-user-hud,
body.user-hud-skin-corporate .topbar.user-hud-redesign,
.user-hud-skin-corporate.topbar.user-hud-redesign {
  background: linear-gradient(90deg, rgba(255,255,255,0.11), rgba(255,45,58,0.08)), rgba(10, 8, 9, 0.9);
  border-color: rgba(255, 65, 78, 0.42);
}

.user-hud-skin-corporate .user-hud-kicker,
body.user-hud-skin-corporate .user-hud-kicker,
.user-hud-skin-corporate .user-hud-status {
  color: #ff4b58;
}

.user-hud-skin-blackice .global-user-hud,
body.user-hud-skin-blackice .topbar.user-hud-redesign,
.user-hud-skin-blackice.topbar.user-hud-redesign {
  background: radial-gradient(circle at 18% 30%, rgba(255,43,214,0.16), transparent 34%), linear-gradient(120deg, rgba(0,255,157,0.08), transparent), rgba(1, 2, 5, 0.94);
  border-color: rgba(255,43,214,0.38);
  animation: blackwallTextCorrupt 0.18s steps(2, end) infinite;
}

@media (max-width: 720px) {
  .global-user-hud,
  .topbar.user-hud-redesign {
    flex-direction: column;
  }

  .user-hud-stats {
    grid-template-columns: 1fr;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: 0.2s;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 43, 214, 0.5);
  box-shadow: 0 0 18px rgba(255, 43, 214, 0.15);
}

/* 主页模块拖拽排序：只影响本次会话中的卡片顺序。 */
.draggable-card {
  cursor: grab;
}

.draggable-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
  transform: scale(0.98);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(0, 240, 255, 0.15), transparent);
  transform: translateX(-120%);
  transition: 0.4s;
}

.card:hover::after {
  transform: translateX(120%);
}

.card-title {
  font-size: 11px;
  color: var(--yellow);
  margin-bottom: 12px;
}

.card-desc {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.8;
}

.night-city-panel {
  border-color: rgba(0, 240, 255, 0.22);
}

.night-city-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.night-city-head h2 {
  margin: 0;
}

.night-city-refresh {
  border: 1px solid rgba(0, 255, 157, 0.24);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(0, 255, 157, 0.05);
  color: rgba(0, 255, 157, 0.84);
  font-size: 8px;
  line-height: 1.4;
}

.night-city-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.night-city-map-wrap,
.night-city-data-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.night-city-map-wrap {
  position: relative;
  min-height: 390px;
  padding: 12px;
}

.night-city-map-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(0, 240, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
}

.night-city-map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 430px;
  display: block;
  filter: drop-shadow(0 0 14px rgba(0, 240, 255, 0.08));
}

.city-district {
  fill: rgba(255, 255, 255, 0.025);
  stroke: var(--district-color);
  stroke-width: 3;
  stroke-linejoin: round;
  filter: url(#nightCityGlow);
  transition: fill 0.25s ease, stroke 0.25s ease, stroke-width 0.25s ease;
  pointer-events: all;
}

.city-district-group {
  cursor: pointer;
  pointer-events: all;
}

.city-district-group:nth-child(odd) .city-district {
  fill: rgba(0, 240, 255, 0.035);
}

.city-district-label {
  fill: rgba(245, 251, 255, 0.92);
  stroke: rgba(0, 0, 0, 0.7);
  stroke-width: 3;
  paint-order: stroke;
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: 16px;
  letter-spacing: 1px;
  pointer-events: none;
}

.city-district.is-attacked {
  stroke-width: 5;
}

.city-district.is-attacked.attack-green {
  fill: rgba(0, 255, 157, 0.58);
  stroke: rgba(0, 255, 157, 0.98);
}

.city-district.is-attacked.attack-yellow {
  fill: rgba(252, 238, 9, 0.62);
  stroke: rgba(252, 238, 9, 0.98);
}

.city-district.is-attacked.attack-red {
  fill: rgba(255, 43, 70, 0.66);
  stroke: rgba(255, 43, 70, 1);
}

.night-city-data-panel {
  position: sticky;
  top: calc(var(--topnav-height) + 12px);
  padding: 14px;
}

.night-city-stat {
  display: grid;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.night-city-stat span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 1px;
}

.night-city-stat strong {
  color: var(--yellow);
  font-size: 14px;
  line-height: 1.4;
  text-shadow: 0 0 12px rgba(252, 238, 9, 0.16);
}

.night-city-alert-title {
  margin-top: 14px;
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 1px;
}

.night-city-alerts {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.night-city-empty,
.night-city-alert {
  border-radius: 8px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 8px;
  line-height: 1.8;
}

.night-city-empty {
  color: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(0, 255, 157, 0.16);
}

.night-city-alert {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.night-city-alert.attack-green {
  border-color: rgba(0, 255, 157, 0.36);
  background: rgba(0, 255, 157, 0.07);
}

.night-city-alert.attack-yellow {
  border-color: rgba(252, 238, 9, 0.38);
  background: rgba(252, 238, 9, 0.08);
}

.night-city-alert.attack-red {
  border-color: rgba(255, 43, 70, 0.42);
  background: rgba(255, 43, 70, 0.08);
}

.night-city-alert-level {
  color: var(--yellow);
  margin-bottom: 6px;
}

.night-city-alert-text {
  color: rgba(255, 255, 255, 0.86);
}

.night-city-alert-crime,
.night-city-alert-response {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.62);
}

.night-city-case-log {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
  margin-top: 10px;
  padding-right: 4px;
  scrollbar-width: thin;
}

.night-city-log-panel {
  margin-top: 14px;
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 240, 255, 0.06), transparent 44%),
    rgba(0, 0, 0, 0.22);
  padding: 12px 14px 14px;
  overflow: hidden;
}

.night-city-log-panel .night-city-log-title {
  margin-top: 0;
}

.night-city-log-entry {
  border-left: 2px solid rgba(0, 240, 255, 0.36);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  padding: 8px 9px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 8px;
  line-height: 1.8;
}

.night-city-case-log::-webkit-scrollbar {
  width: 6px;
}

.night-city-case-log::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.24);
  border-radius: 99px;
}

body.is-subpage .night-city-panel {
  margin-top: 12px;
  padding: 14px;
}

body.is-subpage .night-city-head {
  margin-bottom: 10px;
}

body.is-subpage .night-city-head h2 {
  font-size: 12px;
}

body.is-subpage .night-city-refresh {
  padding: 6px 9px;
  font-size: 7px;
}

body.is-subpage .night-city-grid {
  grid-template-columns: minmax(0, 0.85fr) minmax(250px, 1fr);
  gap: 10px;
}

body.is-subpage .night-city-map-wrap {
  min-height: 210px;
  padding: 8px;
}

body.is-subpage .night-city-map {
  height: 220px;
}

body.is-subpage .city-district-label {
  font-size: 13px;
}

body.is-subpage .night-city-data-panel {
  position: static;
  padding: 10px;
}

body.is-subpage .night-city-stat {
  gap: 4px;
  padding: 7px 0;
}

body.is-subpage .night-city-stat strong {
  font-size: 12px;
}

body.is-subpage .night-city-alert-title {
  margin-top: 10px;
  font-size: 9px;
}

body.is-subpage .night-city-alerts {
  gap: 7px;
  margin-top: 7px;
  max-height: 132px;
  overflow: hidden;
}

body.is-subpage .night-city-alert,
body.is-subpage .night-city-empty {
  padding: 8px;
  line-height: 1.6;
}

body.is-subpage .night-city-log-title,
body.is-subpage .night-city-log-panel,
body.is-subpage .night-city-case-log {
  display: none;
}

.night-city-toast-box {
  position: fixed;
  bottom: 18px;
  right: 16px;
  z-index: 10080;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

/* 夜之城区域详情与访客扫描弹窗。 */
.night-city-detail-modal,
.visitor-scan {
  position: fixed;
  inset: 0;
  z-index: 11020;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
}

.night-city-detail-card,
.visitor-scan-card {
  width: min(520px, calc(100vw - 28px));
  border: 1px solid rgba(0,240,255,0.32);
  border-radius: 10px;
  background: rgba(5, 8, 14, 0.92);
  box-shadow: 0 0 34px rgba(0,240,255,0.16), inset 0 0 20px rgba(255,255,255,0.03);
  padding: 18px;
}

.night-city-detail-close {
  float: right;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
}

.night-city-detail-kicker,
.visitor-scan-kicker {
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.night-city-detail-card h3,
.visitor-scan-title {
  color: var(--yellow);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.night-city-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.night-city-detail-grid div,
.visitor-scan-row {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
  padding: 10px;
}

.night-city-detail-grid span,
.visitor-scan-row span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  margin-bottom: 7px;
}

.night-city-detail-grid strong,
.visitor-scan-row strong {
  color: var(--yellow);
  font-size: 10px;
}

.night-city-detail-title {
  margin: 12px 0 8px;
  color: var(--cyan);
  font-size: 9px;
}

.night-city-detail-case,
.night-city-detail-empty {
  display: grid;
  gap: 6px;
  border-left: 2px solid var(--cyan);
  border-radius: 8px;
  background: rgba(0,0,0,0.24);
  padding: 10px;
  color: rgba(255,255,255,0.72);
  font-size: 8px;
  line-height: 1.7;
}

.night-city-detail-case.attack-green { border-color: rgba(0,255,157,0.8); }
.night-city-detail-case.attack-yellow { border-color: rgba(252,238,9,0.9); }
.night-city-detail-case.attack-red { border-color: rgba(255,43,70,0.9); }

.visitor-scan {
  pointer-events: none;
  animation: blackwallOverlayIn 0.22s ease both;
}

.visitor-scan.closing {
  animation: blackwallOverlayOut 0.7s ease both;
}

.visitor-scan-card {
  width: min(430px, calc(100vw - 28px));
}

.visitor-scan-note {
  margin-top: 12px;
  color: rgba(255,255,255,0.72);
  font-size: 8px;
  line-height: 1.8;
}

.night-city-toast {
  border: 1px solid rgba(0, 240, 255, 0.36);
  border-radius: 8px;
  background: rgba(5, 8, 14, 0.94);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.16);
  color: var(--text);
  padding: 12px;
  animation: nightCityToastIn 0.24s ease both;
  backdrop-filter: blur(14px) saturate(145%);
}

.night-city-toast.attack-green {
  border-color: rgba(0, 255, 157, 0.46);
  box-shadow: 0 0 24px rgba(0, 255, 157, 0.13);
}

.night-city-toast.attack-yellow {
  border-color: rgba(252, 238, 9, 0.48);
  box-shadow: 0 0 24px rgba(252, 238, 9, 0.13);
}

.night-city-toast.attack-red {
  border-color: rgba(255, 43, 70, 0.52);
  box-shadow: 0 0 28px rgba(255, 43, 70, 0.18);
}

.night-city-toast.closing {
  animation: nightCityToastOut 0.45s ease both;
}

.night-city-toast-title {
  color: var(--yellow);
  font-size: 10px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.night-city-toast-line {
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
  line-height: 1.8;
}

@keyframes nightCityToastIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes nightCityToastOut {
  to {
    opacity: 0;
    transform: translateX(18px);
  }
}

@media (max-width: 860px) {
  .night-city-grid {
    grid-template-columns: 1fr;
  }

  .night-city-data-panel {
    position: static;
  }

  .night-city-map {
    height: 340px;
  }

  body.is-subpage .night-city-grid {
    grid-template-columns: 1fr;
  }

  body.is-subpage .night-city-map-wrap {
    min-height: 170px;
  }

  body.is-subpage .night-city-map {
    height: 180px;
  }

  body.is-subpage .night-city-alerts {
    max-height: 92px;
  }
}

.btn {
  display: inline-block;
  text-decoration: none;
  margin-top: 14px;
  font-size: 9px;
  color: var(--pink);
  border: 1px solid rgba(255, 43, 214, 0.35);
  padding: 10px 12px;
  border-radius: 10px;
  transition: 0.2s;
}

.btn:hover {
  background: rgba(255, 43, 214, 0.08);
  box-shadow: 0 0 18px rgba(255, 43, 214, 0.14);
}

/* footer */
.footer {
  margin-top: 18px;
  text-align: center;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.5);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: var(--topnav-height);
  left: -260px;
  width: 260px;
  height: calc(100vh - var(--topnav-height));
  background: rgba(3,3,10,0.95);
  border-right: 2px solid rgba(0, 255, 157, 0.42);
  padding: 16px;
  overflow-y: auto;
  transition: 0.25s ease;
  z-index: 9998;
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sidebar-title {
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(0,240,255,0.4);
}

.sidebar-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #0ff;
  cursor: pointer;
}

.sidebar-menu .sidebar-item {
  padding: 12px 8px;
  font-size: 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: 0.18s;
}

.sidebar-menu .sidebar-item:hover {
  background: rgba(0,240,255,0.08);
  box-shadow: 0 0 8px rgba(0,240,255,0.25);
}

.sidebar-divider {
  border-top: 1px solid rgba(0,240,255,0.2);
  margin: 12px 0;
}

/* Responsive */
@media screen and (max-width: 900px) {
  .top-navbar .navbar-center {
    display: none;
  }
}

@media screen and (max-width: 600px) {
  .top-navbar .navbar-right {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --topnav-height: 52px;
  }

  body {
    padding-bottom: 118px;
  }

  .top-navbar {
    padding: 0 10px;
  }

  .top-navbar .navbar-left,
  .top-navbar .navbar-center,
  .top-navbar .navbar-right {
    gap: 8px;
  }

  .top-navbar .nav-brand {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .container {
    width: min(100% - 18px, 980px);
    padding-top: calc(var(--topnav-height) + 12px);
  }

  .panel {
    padding: 14px;
    border-radius: 8px;
  }

  .card-grid,
  .grid,
  .ach-grid,
  .website-grid {
    grid-template-columns: 1fr !important;
  }

  .global-music-player {
    right: 10px;
    bottom: 100px;
    width: min(300px, calc(100vw - 20px));
  }

  .global-music-controls {
    gap: 7px;
  }

  .global-music-btn {
    width: 36px;
    height: 34px;
  }

  .global-music-playlist-list {
    max-height: 112px;
  }
}

/* Global Floating Music Player */
.cyber-news-terminal {
  position: fixed;
  left: 18px;
  top: calc(var(--topnav-height) + 14px);
  width: 316px;
  height: calc(100vh - var(--topnav-height) - 28px);
  z-index: 9000;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 157, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 255, 157, 0.1), transparent 26%),
    rgba(1, 8, 6, 0.96);
  box-shadow:
    0 0 22px rgba(0, 255, 157, 0.16),
    inset 0 0 22px rgba(0, 0, 0, 0.72);
  color: rgba(210, 255, 225, 0.92);
  backdrop-filter: blur(12px) saturate(140%);
}

.cyber-news-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0.07) 1px,
      transparent 1px,
      transparent 5px
    ),
    radial-gradient(circle at 20% 0%, rgba(0, 255, 157, 0.18), transparent 40%);
  opacity: 0.13;
  z-index: 1;
}

.cyber-news-terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.08) 46%, transparent 52%),
    linear-gradient(rgba(0, 255, 157, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 157, 0.05) 1px, transparent 1px);
  background-size: 160% 100%, 18px 18px, 18px 18px;
  animation: cyberNewsSweep 5.8s linear infinite;
  opacity: 0.12;
  z-index: 1;
}

.cyber-news-terminal > * {
  position: relative;
  z-index: 2;
}

.cyber-news-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
  padding: 12px 12px 8px;
  border-bottom: 1px solid rgba(0, 255, 157, 0.18);
  background: rgba(0, 0, 0, 0.24);
}

.cyber-news-dots {
  display: flex;
  gap: 5px;
}

.cyber-news-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.cyber-news-dots span:nth-child(1) {
  color: #ff4d6d;
  background: #ff4d6d;
}

.cyber-news-dots span:nth-child(2) {
  color: #fcee09;
  background: #fcee09;
}

.cyber-news-dots span:nth-child(3) {
  color: #00ff9d;
  background: #00ff9d;
}

.cyber-news-title {
  min-width: 0;
  overflow: hidden;
  color: rgba(0, 255, 157, 0.96);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  line-height: 1.7;
  text-shadow: 0 0 10px rgba(0, 255, 157, 0.26);
}

.cyber-news-subtitle {
  padding: 10px 14px 0;
  color: rgba(252, 238, 9, 0.84);
  font-size: 8px;
  line-height: 1.8;
  letter-spacing: 0.6px;
}

.cyber-news-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 14px 12px;
}

.cyber-news-control {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 7px;
}

.cyber-news-control select {
  min-width: 0;
  border: 1px solid rgba(0, 255, 157, 0.24);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.38);
  color: rgba(230, 255, 240, 0.94);
  outline: none;
  padding: 8px 7px;
  font-size: 9px;
}

.cyber-news-control option {
  background: #03120b;
  color: #e8fff1;
}

.cyber-news-stream {
  height: calc(100% - 126px);
  overflow: hidden;
  padding: 2px 14px 16px;
  font-family: Consolas, "Courier New", "Microsoft YaHei", "PingFang SC", monospace;
  font-size: 12px;
  line-height: 1.9;
}

.cyber-news-line {
  margin-bottom: 11px;
  padding: 8px 9px;
  border-left: 2px solid rgba(0, 255, 157, 0.48);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(226, 255, 236, 0.94);
  text-shadow: 0 0 6px rgba(0, 255, 157, 0.12);
  word-break: break-word;
  animation: cyberNewsLineIn 0.34s ease both;
}

.cyber-news-line::before {
  content: "> ";
  color: rgba(0, 255, 157, 0.95);
}

.cyber-news-terminal.news-bg-blackwall {
  border-color: rgba(255, 43, 214, 0.34);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 43, 214, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(60, 0, 38, 0.58), rgba(1, 2, 8, 0.94));
  color: rgba(255, 225, 250, 0.9);
  box-shadow: 0 0 24px rgba(255, 43, 214, 0.13), inset 0 0 26px rgba(0, 0, 0, 0.76);
}

.cyber-news-terminal.news-bg-blackwall .cyber-news-title,
.cyber-news-terminal.news-bg-blackwall .cyber-news-line::before {
  color: rgba(255, 43, 214, 0.96);
}

.cyber-news-terminal.news-bg-blackwall-breach {
  border-color: rgba(0, 255, 157, 0.46);
  background:
    repeating-linear-gradient(0deg, rgba(0, 255, 157, 0.05), rgba(0, 255, 157, 0.05) 1px, transparent 1px, transparent 5px),
    radial-gradient(circle at 18% 12%, rgba(255, 43, 214, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(0, 18, 12, 0.74), rgba(0, 1, 3, 0.96));
  color: rgba(220, 255, 235, 0.94);
  box-shadow: 0 0 30px rgba(0, 255, 157, 0.16), inset 0 0 34px rgba(255, 43, 214, 0.08);
}

.cyber-news-terminal.news-bg-blackwall-breach .cyber-news-title,
.cyber-news-terminal.news-bg-blackwall-breach .cyber-news-line::before,
.cyber-news-terminal.news-bg-blackwall-breach .cyber-news-subtitle {
  color: rgba(0, 255, 157, 0.98);
}

.cyber-news-terminal.news-bg-neon {
  border-color: rgba(0, 240, 255, 0.36);
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 240, 255, 0.2), transparent 42%),
    radial-gradient(circle at 85% 100%, rgba(255, 43, 214, 0.18), transparent 46%),
    rgba(3, 6, 18, 0.92);
}

.cyber-news-terminal.news-bg-neon .cyber-news-title,
.cyber-news-terminal.news-bg-neon .cyber-news-line::before {
  color: rgba(0, 240, 255, 0.96);
}

.cyber-news-terminal.news-bg-amber {
  border-color: rgba(252, 175, 20, 0.36);
  background:
    linear-gradient(180deg, rgba(252, 175, 20, 0.13), transparent 34%),
    rgba(16, 9, 2, 0.92);
  color: rgba(255, 233, 190, 0.92);
}

.cyber-news-terminal.news-bg-amber .cyber-news-title,
.cyber-news-terminal.news-bg-amber .cyber-news-line::before,
.cyber-news-terminal.news-bg-amber .cyber-news-subtitle {
  color: rgba(252, 175, 20, 0.96);
}

@keyframes cyberNewsLineIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cyberNewsSweep {
  from {
    background-position: -120% 0, 0 0, 0 0;
  }
  to {
    background-position: 120% 0, 0 18px, 18px 0;
  }
}

@media (max-width: 1280px) {
  .cyber-news-terminal {
    display: none;
  }
}

@media (min-width: 1420px) {
  body.has-cyber-news-terminal .container {
    margin-left: 360px;
    margin-right: auto;
  }
}

.global-music-player {
  position: fixed;
  right: 18px;
  bottom: 18px;
  --music-player-scale: 1;
  width: min(calc(330px * var(--music-player-scale)), calc(100vw - 24px));
  max-height: calc(100vh - 70px);
  z-index: 10050;
  border: 1px solid rgba(0,240,255,0.36);
  background: rgba(5, 6, 12, 0.88);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 0 26px rgba(0,240,255,0.14), inset 0 0 18px rgba(255,255,255,0.03);
  border-radius: 10px;
  color: var(--text);
  overflow: hidden;
  user-select: none;
  will-change: left, top;
}

.global-music-player.dragging {
  transition: none;
}

.global-lyrics-spectrum {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.58;
  pointer-events: none;
  mix-blend-mode: screen;
}

.global-music-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 10px;
  cursor: grab;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(90deg, rgba(0,240,255,0.08), rgba(255,43,214,0.06));
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.global-music-player.dragging .global-music-header {
  cursor: grabbing;
}

.global-music-body,
.global-music-body * {
  user-select: auto;
}

.global-music-settings input[type="range"] {
  touch-action: pan-x;
}

.global-music-kicker {
  font-size: 8px;
  color: rgba(0,240,255,0.75);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.global-music-title {
  font-size: 10px;
  line-height: 1.6;
  color: rgba(252,238,9,0.95);
  text-shadow: 0 0 10px rgba(252,238,9,0.18);
  word-break: break-word;
}

.global-music-collapse {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1;
}

.global-music-body {
  position: relative;
  z-index: 1;
  padding: 12px;
}

.global-music-player.collapsed .global-music-body {
  display: none;
}

.global-music-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.global-music-btn {
  width: 42px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,240,255,0.05);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  font-family: "Segoe UI Symbol", "Segoe UI Emoji", Arial, sans-serif;
  font-size: 14px;
  transition: 0.18s ease;
}

.global-music-btn.primary {
  border-color: rgba(252,238,9,0.38);
  color: rgba(252,238,9,0.95);
}

.global-music-btn.shuffle {
  font-size: 10px;
  letter-spacing: 0.5px;
}

.global-music-btn.shuffle.active {
  border-color: rgba(255,43,214,0.55);
  background: rgba(255,43,214,0.14);
  color: rgba(255,255,255,0.96);
  box-shadow: 0 0 16px rgba(255,43,214,0.18);
}

.global-music-btn.playlist {
  font-size: 9px;
  letter-spacing: 0.5px;
}

.global-music-btn:hover,
.global-music-collapse:hover {
  border-color: rgba(255,43,214,0.42);
  box-shadow: 0 0 14px rgba(255,43,214,0.14);
  transform: translateY(-1px);
}

.global-music-progress {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 99px;
  cursor: pointer;
  overflow: hidden;
}

.global-music-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--yellow));
  border-radius: 99px;
  transition: width 0.12s linear;
}

.global-music-time {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 8px;
  color: rgba(255,255,255,0.58);
}

.global-music-playlist {
  display: none;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(0,0,0,0.22);
  overflow: hidden;
}

.global-music-playlist.open {
  display: block;
}

.global-music-playlist-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: var(--yellow);
  font-size: 8px;
  letter-spacing: 1px;
}

.global-music-playlist-head button {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}

.global-music-playlist-search {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,240,255,0.05);
  color: rgba(255,255,255,0.86);
  outline: none;
  padding: 9px 10px;
  font-size: 8px;
}

.global-music-playlist-list {
  display: grid;
  gap: 4px;
  max-height: 156px;
  overflow-y: auto;
  padding: 6px;
}

.global-music-playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,0.68);
  padding: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 8px;
}

.global-music-playlist-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.global-music-playlist-item strong,
.global-music-playlist-item em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-music-playlist-item strong {
  font: inherit;
}

.global-music-playlist-item em {
  color: rgba(255,255,255,0.42);
  font-size: 7px;
  font-style: normal;
}

.global-music-playlist-item small {
  color: rgba(0,240,255,0.65);
  font-size: 7px;
}

.global-music-playlist-item:hover,
.global-music-playlist-item.active {
  border-color: rgba(252,238,9,0.28);
  background: rgba(252,238,9,0.08);
  color: rgba(252,238,9,0.95);
}

.global-music-playlist-empty {
  padding: 12px;
  color: rgba(255,255,255,0.5);
  font-size: 8px;
}

.global-music-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(0,0,0,0.18);
}

.global-music-settings label {
  display: grid;
  gap: 6px;
  font-size: 8px;
  color: rgba(255,255,255,0.62);
}

.global-music-settings input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
}

.global-lyrics-panel {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10040;
  width: min(760px, calc(100vw - 36px));
  border: 1px solid rgba(0,240,255,0.22);
  border-radius: 10px;
  background: rgba(5, 6, 12, 0.42);
  backdrop-filter: blur(10px) saturate(130%);
  box-shadow: 0 0 24px rgba(0,240,255,0.09), inset 0 0 18px rgba(255,255,255,0.025);
  color: var(--text);
  overflow: hidden;
  max-height: calc(100dvh - var(--topnav-height) - 24px);
}

.global-lyrics-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
  background: linear-gradient(90deg, rgba(0,240,255,0.08), rgba(255,43,214,0.06));
  font-size: 8px;
  letter-spacing: 1px;
  color: rgba(0,240,255,0.72);
}

.global-lyrics-header span:last-child {
  max-width: 62%;
  overflow: hidden;
  color: rgba(252,238,9,0.88);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-music-lyrics {
  position: relative;
  z-index: 1;
  min-height: 54px;
  max-height: 86px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(255,255,255,0.66);
  text-align: center;
}

.global-music-lyric {
  padding: 0;
  transition: 0.2s ease;
  word-break: break-word;
}

.global-music-lyric.active {
  color: rgba(252,238,9,0.96);
  text-shadow: 0 0 10px rgba(252,238,9,0.22);
}

body.music-skin-compact .global-music-player {
  width: min(260px, calc(100vw - 24px));
}

body.music-skin-compact .global-lyrics-panel {
  width: min(640px, calc(100vw - 36px));
}

body.music-skin-compact .global-music-header {
  padding: 10px;
}

body.music-skin-glass .global-music-player {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 18px 44px rgba(0,0,0,0.34), inset 0 0 26px rgba(255,255,255,0.06);
}

body.music-skin-glass .global-lyrics-panel {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
}

body.music-skin-glass .global-music-header,
body.music-skin-glass .global-lyrics-header {
  background: rgba(255,255,255,0.08);
}

body.music-skin-terminal .global-music-player {
  background: rgba(0, 12, 5, 0.94);
  border-color: rgba(0,255,157,0.42);
  color: rgba(210,255,220,0.94);
  box-shadow: 0 0 28px rgba(0,255,157,0.12);
}

body.music-skin-terminal .global-lyrics-panel {
  background: rgba(0, 12, 5, 0.48);
  border-color: rgba(0,255,157,0.28);
}

body.music-skin-terminal .global-music-header,
body.music-skin-terminal .global-lyrics-header {
  background: rgba(0,255,157,0.08);
}

body.music-skin-terminal .global-music-title,
body.music-skin-terminal .global-music-lyric.active {
  color: rgba(0,255,157,0.96);
  text-shadow: 0 0 10px rgba(0,255,157,0.22);
}

body.music-skin-terminal .global-music-progress-bar {
  background: linear-gradient(90deg, rgba(0,255,157,0.95), rgba(185,255,90,0.85));
}

body.music-skin-blackwall-breach .global-music-player,
body.music-skin-blackwall-breach .global-lyrics-panel {
  background:
    repeating-linear-gradient(90deg, rgba(0,255,157,0.035), rgba(0,255,157,0.035) 1px, transparent 1px, transparent 7px),
    rgba(0, 4, 6, 0.82);
  border-color: rgba(0,255,157,0.42);
  box-shadow: 0 0 32px rgba(0,255,157,0.14), inset 0 0 24px rgba(255,43,214,0.06);
}

body.music-skin-blackwall-breach .global-music-header,
body.music-skin-blackwall-breach .global-lyrics-header {
  background: linear-gradient(90deg, rgba(0,255,157,0.12), rgba(255,43,214,0.08));
}

body.music-skin-blackwall-breach .global-music-title,
body.music-skin-blackwall-breach .global-music-lyric.active {
  color: rgba(0,255,157,0.98);
  text-shadow: 0 0 12px rgba(0,255,157,0.28);
}

body.music-skin-blackwall-breach .global-music-progress-bar {
  background: linear-gradient(90deg, rgba(0,255,157,0.96), rgba(255,43,214,0.82));
}

@media (max-width: 1120px) {
  .global-lyrics-panel {
    width: min(720px, calc(100vw - 24px));
  }

  .global-music-lyrics {
    min-height: 50px;
    max-height: 78px;
  }
}

@media (max-width: 640px) {
  :root {
    --topnav-height: 54px;
  }

  body {
    overflow-x: hidden;
  }

  .top-navbar {
    height: var(--topnav-height);
    padding: 8px 10px;
    gap: 8px;
  }

  .navbar-left,
  .navbar-right {
    gap: 6px;
  }

  .nav-brand {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .container {
    width: min(100% - 18px, 100%);
    margin-top: calc(var(--topnav-height) + 12px);
    padding-bottom: 180px;
  }

  .panel {
    padding: 14px;
    border-radius: 8px;
  }

  .grid,
  .ach-grid,
  .website-grid,
  .social-grid,
  .project-grid {
    grid-template-columns: 1fr !important;
  }

  .cyber-news-terminal {
    position: static;
    width: 100%;
    margin: 12px auto;
    max-height: 260px;
  }

  .eft-hud {
    right: 8px;
    top: auto;
    bottom: 96px;
    transform: scale(0.78);
    transform-origin: right bottom;
    max-width: min(280px, calc(100vw - 16px));
  }

  .night-city-panel {
    margin-inline: auto;
  }

  .night-city-map-wrap {
    min-height: 250px;
  }

  .night-city-map {
    height: 260px;
  }

  .global-music-player {
    width: min(330px, calc(100vw - 20px));
    right: 10px;
    left: auto;
    bottom: max(92px, env(safe-area-inset-bottom));
    top: auto;
  }

  .global-music-playlist.open {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(170px, calc(env(safe-area-inset-bottom) + 170px));
    z-index: 10090;
    max-height: 42vh;
  }

  .global-music-playlist-list {
    max-height: 30vh;
  }

  .global-lyrics-panel {
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(560px, calc(100vw - 20px));
  }

  .global-lyrics-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .global-lyrics-header span:last-child {
    max-width: 100%;
    text-align: left;
  }

  .global-music-lyrics {
    min-height: 48px;
    max-height: 72px;
    padding: 10px 14px;
    font-size: 10px;
  }
}

.settings-launcher {
  border: 0;
  background: transparent;
  color: var(--cyan);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
}

.top-navbar .navbar-left .settings-launcher {
  display: inline-flex;
  align-items: center;
}

.settings-launcher-icon {
  font-size: 1.05em;
  line-height: 1;
}

.settings-launcher.floating {
  position: fixed;
  right: 18px;
  bottom: 320px;
  z-index: 10060;
  width: 52px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(0,240,255,0.32);
  background: rgba(5,6,12,0.86);
  box-shadow: 0 0 18px rgba(0,240,255,0.12);
}

.settings-panel {
  position: fixed;
  right: 18px;
  top: calc(var(--topnav-height) + 10px);
  bottom: 18px;
  width: min(360px, calc(100vw - 24px));
  z-index: 10060;
  border: 1px solid rgba(0,240,255,0.32);
  background: rgba(5,6,12,0.92);
  backdrop-filter: blur(16px) saturate(150%);
  border-radius: 10px;
  box-shadow: 0 0 26px rgba(0,240,255,0.14);
  padding: 14px;
  color: var(--text);
  display: none;
  overflow-y: auto;
  scrollbar-width: thin;
}

.settings-panel.open {
  display: block;
}

.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.settings-title {
  font-size: 10px;
  color: var(--yellow);
  letter-spacing: 1px;
}

.settings-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}

.settings-row {
  margin-top: 12px;
}

.settings-section-title {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: var(--yellow);
  font-size: 9px;
  letter-spacing: 1px;
}

.settings-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-row label {
  display: block;
  font-size: 8px;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.settings-row select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  outline: none;
}

.settings-row select option {
  background: #071018;
  color: #f5fbff;
}

.settings-whisper {
  margin-top: 14px;
  padding: 10px;
  border: 1px solid rgba(0,255,157,0.16);
  border-radius: 8px;
  background: rgba(0,0,0,0.22);
  color: rgba(0,255,157,0.72);
  font-size: 8px;
  line-height: 1.7;
}

.settings-whisper.talking {
  animation: settingsWhisperPulse 1.2s ease;
}

.settings-easter-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12050;
  width: min(360px, calc(100vw - 36px));
  border: 1px solid rgba(0,255,157,0.42);
  border-radius: 10px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,43,214,0.18), transparent 38%),
    rgba(0, 4, 6, 0.94);
  box-shadow: 0 0 30px rgba(0,255,157,0.16);
  color: rgba(230,255,238,0.94);
  padding: 13px;
  font-size: 9px;
  line-height: 1.8;
  animation: settingsToastIn 0.28s ease both;
}

.settings-easter-toast div {
  color: rgba(0,255,157,0.98);
  margin-bottom: 5px;
}

.settings-easter-toast span {
  display: block;
  color: rgba(230,255,238,0.72);
}

.settings-easter-toast.closing {
  animation: settingsToastOut 0.75s ease both;
}

body.settings-blackwall-invasion::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 12000;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,255,157,0.12), rgba(0,255,157,0.12) 1px, transparent 1px, transparent 6px),
    radial-gradient(circle at 50% 45%, rgba(255,43,214,0.16), transparent 34%);
  mix-blend-mode: screen;
  animation: blackwallSettingBreach 0.32s steps(2, end) infinite;
}

@keyframes settingsWhisperPulse {
  0%, 100% { border-color: rgba(0,255,157,0.16); }
  50% { border-color: rgba(255,43,214,0.42); color: rgba(252,238,9,0.9); }
}

@keyframes settingsToastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes settingsToastOut {
  to { opacity: 0; transform: translateY(10px); }
}

@keyframes blackwallSettingBreach {
  0% { opacity: 0.18; transform: translateX(0); }
  50% { opacity: 0.35; transform: translateX(2px); }
  100% { opacity: 0.22; transform: translateX(-1px); }
}

body.cyber-news-hidden .cyber-news-terminal,
body.eft-hud-hidden .eft-side-panel {
  display: none !important;
}

body .eft-side-panel {
  opacity: var(--eft-hud-opacity, 1) !important;
  transform: scale(var(--eft-hud-scale, 1));
  transform-origin: top right;
}

body.eft-hud-size-small .eft-side-panel {
  width: calc(316px * 0.88) !important;
}

body.eft-hud-size-normal .eft-side-panel {
  width: 316px !important;
}

body.eft-hud-size-large .eft-side-panel {
  width: calc(316px * 1.12) !important;
}

/* 角色状态 HUD：PC/平板固定在右侧；只有手机端回到主页下方。 */
@media (min-width: 769px) {
  body:not(.eft-hud-hidden) .eft-side-panel {
    position: fixed !important;
    right: 18px !important;
    left: auto !important;
    top: calc(var(--topnav-height) + 14px) !important;
    bottom: 330px !important;
    max-width: calc(100vw - 36px) !important;
    overflow-y: auto !important;
    z-index: 9000 !important;
  }

  body.eft-hud-size-small:not(.eft-hud-hidden) .eft-side-panel {
    width: calc(316px * 0.88) !important;
  }

  body.eft-hud-size-normal:not(.eft-hud-hidden) .eft-side-panel {
    width: 316px !important;
  }

  body.eft-hud-size-large:not(.eft-hud-hidden) .eft-side-panel {
    width: calc(316px * 1.12) !important;
  }
}

/* 手机端空间有限，改回页面内展示，避免遮住主内容和播放器。 */
@media (max-width: 768px) {
  body:not(.eft-hud-hidden) .eft-side-panel {
    position: relative !important;
    right: auto !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    transform: none !important;
  }
}

/* 整站 UI 皮肤：设置里的“用户 HUD UI”会同步影响全局界面，不只影响顶部 HUD。 */
body[class*="user-hud-skin-"] .container {
  width: min(100%, 1040px) !important;
  max-width: 1040px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: calc(var(--topnav-height) + 24px) 18px 28px !important;
  gap: 20px !important;
}

@media (min-width: 1420px) {
  body.has-cyber-news-terminal[class*="user-hud-skin-"] .container {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

body[class*="user-hud-skin-"] .topbar.user-hud-redesign,
body[class*="user-hud-skin-"] .global-user-hud {
  padding: 13px 14px !important;
  gap: 14px !important;
  border-radius: 8px !important;
}

body[class*="user-hud-skin-"] .user-hud-frame {
  width: 58px !important;
  height: 58px !important;
}

body[class*="user-hud-skin-"] .topbar .title {
  font-size: 14px !important;
  letter-spacing: 2px !important;
}

body[class*="user-hud-skin-"] .topbar .subtitle {
  margin-top: 6px !important;
  font-size: 8px !important;
}

body[class*="user-hud-skin-"] .user-hud-side {
  min-width: 190px !important;
  gap: 7px !important;
}

body[class*="user-hud-skin-"] .user-hud-stat {
  padding: 7px 7px !important;
}

body[class*="user-hud-skin-"] .panel,
body[class*="user-hud-skin-"] .card,
body[class*="user-hud-skin-"] .topbar,
body[class*="user-hud-skin-"] .top-navbar,
body[class*="user-hud-skin-"] .settings-panel,
body[class*="user-hud-skin-"] .global-music-player,
body[class*="user-hud-skin-"] .cyber-news-terminal,
body[class*="user-hud-skin-"] .global-lyrics-panel {
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

body.user-hud-skin-glass .panel,
body.user-hud-skin-glass .card,
body.user-hud-skin-glass .topbar,
body.user-hud-skin-glass .settings-panel,
body.user-hud-skin-glass .global-music-player,
body.user-hud-skin-glass .global-lyrics-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.09), rgba(0,240,255,0.035)) !important;
  border-color: rgba(190, 245, 255, 0.24) !important;
  backdrop-filter: blur(18px) saturate(160%);
}

body.user-hud-skin-glass .card {
  border-radius: 10px !important;
}

body.user-hud-skin-terminal .top-navbar,
body.user-hud-skin-terminal .topbar,
body.user-hud-skin-terminal .panel,
body.user-hud-skin-terminal .card,
body.user-hud-skin-terminal .settings-panel,
body.user-hud-skin-terminal .global-music-player,
body.user-hud-skin-terminal .cyber-news-terminal,
body.user-hud-skin-terminal .global-lyrics-panel {
  border-radius: 0 !important;
  border-color: rgba(0, 255, 157, 0.34) !important;
  background:
    repeating-linear-gradient(to bottom, rgba(0,255,157,0.045), rgba(0,255,157,0.045) 1px, transparent 1px, transparent 5px),
    rgba(1, 9, 5, 0.92) !important;
  box-shadow: 0 0 18px rgba(0,255,157,0.1), inset 0 0 18px rgba(0,0,0,0.6) !important;
}

body.user-hud-skin-terminal .card-title,
body.user-hud-skin-terminal .panel h2 {
  color: var(--green) !important;
}

body.user-hud-skin-street .top-navbar,
body.user-hud-skin-street .topbar,
body.user-hud-skin-street .panel,
body.user-hud-skin-street .card,
body.user-hud-skin-street .settings-panel,
body.user-hud-skin-street .global-music-player,
body.user-hud-skin-street .global-lyrics-panel {
  border-color: rgba(252,238,9,0.34) !important;
  background:
    linear-gradient(135deg, rgba(252,238,9,0.1), rgba(255,43,214,0.08) 45%, rgba(0,240,255,0.045)),
    rgba(12, 7, 18, 0.9) !important;
  box-shadow: 8px 8px 0 rgba(255,43,214,0.08), 0 0 22px rgba(252,238,9,0.08) !important;
}

body.user-hud-skin-street .card {
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

body.user-hud-skin-corporate .top-navbar,
body.user-hud-skin-corporate .topbar,
body.user-hud-skin-corporate .panel,
body.user-hud-skin-corporate .card,
body.user-hud-skin-corporate .settings-panel,
body.user-hud-skin-corporate .global-music-player,
body.user-hud-skin-corporate .global-lyrics-panel {
  border-color: rgba(255,65,78,0.32) !important;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.075), rgba(255,65,78,0.055)),
    rgba(11, 8, 9, 0.92) !important;
  box-shadow: inset 4px 0 0 rgba(255,65,78,0.55), 0 0 18px rgba(255,65,78,0.08) !important;
}

body.user-hud-skin-corporate .card-title,
body.user-hud-skin-corporate .panel h2 {
  color: #ff4b58 !important;
}

body.user-hud-skin-blackice .top-navbar,
body.user-hud-skin-blackice .topbar,
body.user-hud-skin-blackice .panel,
body.user-hud-skin-blackice .card,
body.user-hud-skin-blackice .settings-panel,
body.user-hud-skin-blackice .global-music-player,
body.user-hud-skin-blackice .cyber-news-terminal,
body.user-hud-skin-blackice .global-lyrics-panel {
  border-color: rgba(255,43,214,0.34) !important;
  background:
    radial-gradient(circle at 16% 10%, rgba(255,43,214,0.12), transparent 32%),
    linear-gradient(135deg, rgba(0,255,157,0.055), rgba(0,0,0,0.12)),
    rgba(1, 2, 5, 0.94) !important;
  box-shadow: 0 0 22px rgba(255,43,214,0.12), inset 0 0 24px rgba(0,0,0,0.72) !important;
}

body[class*="user-hud-skin-"] .grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 14px !important;
}

body[class*="user-hud-skin-"] .card {
  padding: 16px !important;
  border-radius: 12px;
}

/* 统一用户 HUD：锁定每个页面的 HUD 结构和头像尺寸，避免子页面同名头像样式或脚本误伤。 */
#globalUserHud.topbar.user-hud-classic {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 18px !important;
  min-height: 0 !important;
  padding: 18px !important;
  overflow: hidden !important;
}

#globalUserHud.user-hud-classic .topbar-profile {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
}

#globalUserHud.user-hud-classic .hud-avatar {
  width: 66px !important;
  height: 66px !important;
  min-width: 66px !important;
  min-height: 66px !important;
  max-width: 66px !important;
  max-height: 66px !important;
  flex: 0 0 66px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(252,238,9,0.45) !important;
  background: rgba(252,238,9,0.05) !important;
  box-shadow: 0 0 22px rgba(252,238,9,0.12) !important;
  overflow: hidden !important;
  position: relative !important;
}

#globalUserHud.user-hud-classic .hud-avatar img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  filter: contrast(1.15) saturate(1.2);
  opacity: 0.92;
}

#globalUserHud.user-hud-classic .user-hud-identity {
  min-width: 0 !important;
}

#globalUserHud.user-hud-classic .title {
  font-size: 18px !important;
  letter-spacing: 3px !important;
}

#globalUserHud.user-hud-classic .subtitle {
  margin-top: 6px !important;
  font-size: 9px !important;
  letter-spacing: 1px !important;
}

#globalUserHud.user-hud-classic .status {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
}

@media (max-width: 640px) {
  #globalUserHud.user-hud-classic {
    align-items: flex-start !important;
  }

  #globalUserHud.user-hud-classic .hud-avatar {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    flex-basis: 54px !important;
  }
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.settings-reset {
  border: 1px solid rgba(255,43,214,0.32);
  background: rgba(255,43,214,0.06);
  color: var(--pink);
  border-radius: 8px;
  padding: 9px 11px;
  cursor: pointer;
}

/* Unified Night City visual layer.
   This keeps existing layouts, but makes all pages feel like one coherent CP2077-style HUD. */
body {
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 240, 255, 0.16), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(255, 43, 214, 0.11), transparent 32%),
    linear-gradient(135deg, rgba(252, 238, 9, 0.035), transparent 28%),
    #05060a;
}

.top-navbar {
  border-bottom: 1px solid rgba(0, 240, 255, 0.42);
  background:
    linear-gradient(90deg, rgba(0, 240, 255, 0.08), rgba(255, 43, 214, 0.055), rgba(252, 238, 9, 0.035)),
    rgba(4, 7, 13, 0.78);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.12);
  color: rgba(230, 252, 255, 0.94);
}

.top-navbar .nav-brand,
.top-navbar .nav-link:hover,
.top-navbar .nav-icon:hover {
  color: var(--yellow);
  text-shadow: 0 0 12px rgba(252, 238, 9, 0.24);
}

.topbar,
.panel,
.card,
.settings-panel,
.sidebar,
.cyber-news-terminal,
.global-music-player,
.global-lyrics-panel,
.eft-side-panel,
.night-city-panel {
  border-radius: 8px !important;
  border-color: rgba(0, 240, 255, 0.18) !important;
  background:
    linear-gradient(135deg, rgba(0, 240, 255, 0.055), transparent 38%),
    linear-gradient(315deg, rgba(255, 43, 214, 0.04), transparent 42%),
    rgba(5, 8, 14, 0.82) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 0 24px rgba(0, 240, 255, 0.08) !important;
}

.panel h2,
.card-title,
.settings-title,
.cyber-news-title,
.global-music-title,
.global-lyrics-title {
  color: var(--yellow) !important;
  text-shadow: 0 0 14px rgba(252, 238, 9, 0.18);
}

.card,
.arcade-card,
.social-card,
.website-card,
.achievement-card,
.blog-card,
.project-card,
.history-card {
  border-radius: 8px !important;
  background:
    linear-gradient(135deg, rgba(0, 240, 255, 0.045), transparent 44%),
    rgba(255, 255, 255, 0.026) !important;
}

.card:hover,
.arcade-card:hover,
.social-card:hover,
.website-card:hover,
.achievement-card:hover,
.blog-card:hover,
.project-card:hover,
.history-card:hover {
  border-color: rgba(252, 238, 9, 0.55) !important;
  box-shadow: 0 0 20px rgba(252, 238, 9, 0.09), 0 0 24px rgba(0, 240, 255, 0.06) !important;
}

.btn,
button,
input,
textarea,
select {
  border-radius: 8px !important;
}

.btn,
button {
  border-color: rgba(0, 240, 255, 0.28) !important;
  background:
    linear-gradient(90deg, rgba(0, 240, 255, 0.08), rgba(255, 43, 214, 0.045)) !important;
  color: rgba(245, 252, 255, 0.9) !important;
}

.btn:hover,
button:hover {
  border-color: rgba(252, 238, 9, 0.62) !important;
  color: var(--yellow) !important;
}

input,
textarea,
select {
  border-color: rgba(0, 240, 255, 0.2) !important;
  background: rgba(0, 0, 0, 0.32) !important;
  color: rgba(245, 252, 255, 0.9) !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(252, 238, 9, 0.52) !important;
  box-shadow: 0 0 16px rgba(252, 238, 9, 0.1) !important;
}

/* Softer news HUD: keep it readable without visually shouting over the homepage. */
.cyber-news-terminal {
  left: 16px;
  top: calc(var(--topnav-height) + 18px);
  width: 292px;
  height: min(620px, calc(100vh - var(--topnav-height) - 42px));
  border-color: rgba(0, 240, 255, 0.2) !important;
  background:
    linear-gradient(180deg, rgba(0, 240, 255, 0.055), transparent 30%),
    linear-gradient(135deg, rgba(252, 238, 9, 0.035), transparent 38%),
    rgba(4, 7, 13, 0.68) !important;
  box-shadow:
    0 0 18px rgba(0, 240, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.018) !important;
  color: rgba(232, 246, 255, 0.78);
  opacity: 0.86;
}

.cyber-news-terminal:hover,
.cyber-news-terminal:focus-within {
  opacity: 0.98;
  border-color: rgba(252, 238, 9, 0.32) !important;
}

.cyber-news-terminal::before {
  opacity: 0.055;
}

.cyber-news-terminal::after {
  animation: none;
  opacity: 0.045;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}

.cyber-news-top {
  padding: 10px 11px 7px;
  border-bottom-color: rgba(0, 240, 255, 0.12);
  background: rgba(0, 0, 0, 0.16);
}

.cyber-news-dots span {
  width: 6px;
  height: 6px;
  opacity: 0.76;
}

.cyber-news-title {
  color: rgba(252, 238, 9, 0.88) !important;
  font-size: 8px;
  text-shadow: none;
}

.cyber-news-subtitle {
  padding: 8px 12px 0;
  color: rgba(0, 240, 255, 0.68) !important;
  font-size: 7px;
}

.cyber-news-controls {
  gap: 8px;
  padding: 9px 12px 10px;
}

.cyber-news-control {
  color: rgba(232, 246, 255, 0.52);
}

.cyber-news-control select {
  border-color: rgba(0, 240, 255, 0.16) !important;
  background: rgba(0, 0, 0, 0.22) !important;
  color: rgba(232, 246, 255, 0.76) !important;
  padding: 7px 6px;
  font-size: 8px;
}

.cyber-news-stream {
  height: calc(100% - 116px);
  padding: 2px 12px 14px;
  font-size: 10px;
  line-height: 1.75;
}

.cyber-news-line {
  margin-bottom: 8px;
  padding: 8px 9px;
  border-left-color: rgba(0, 240, 255, 0.24);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(232, 246, 255, 0.78);
  text-shadow: none;
}

.cyber-news-line::before {
  content: "N54 ";
  color: rgba(252, 238, 9, 0.76) !important;
}

body.has-cyber-news-terminal .container {
  transition: margin 0.2s ease;
}

@media (min-width: 1420px) {
  body.has-cyber-news-terminal .container {
    margin-left: 330px;
  }
}

/* Homepage focus layer: give first-time visitors one clear visual anchor before the live systems. */
.home-focus-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: stretch;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid rgba(252, 238, 9, 0.28);
  border-radius: 8px;
  padding: 28px;
  background:
    radial-gradient(circle at 80% 20%, rgba(252, 238, 9, 0.16), transparent 30%),
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(7, 12, 20, 0.94), rgba(9, 7, 18, 0.82));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(252, 238, 9, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.home-focus-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(252, 238, 9, 0.14), transparent 20%, transparent 78%, rgba(0, 240, 255, 0.12)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.032) 1px, transparent 1px, transparent 28px);
  opacity: 0.42;
}

.home-focus-panel::after {
  content: "PROFILE ENTRY";
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.08);
  font-size: 28px;
  letter-spacing: 2px;
}

.home-focus-copy,
.home-focus-status {
  position: relative;
  z-index: 1;
}

.home-focus-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 9px;
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 4px;
  background: rgba(0, 240, 255, 0.06);
  color: rgba(0, 240, 255, 0.88);
  font-size: 8px;
  letter-spacing: 1.4px;
}

.home-focus-panel h1 {
  margin: 0;
  color: var(--yellow);
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1.25;
  letter-spacing: 0;
  text-shadow:
    0 0 18px rgba(252, 238, 9, 0.22),
    3px 0 0 rgba(255, 43, 214, 0.18);
}

.home-focus-panel p {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(235, 246, 255, 0.78);
  font-size: 12px;
  line-height: 2;
}

.home-focus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.home-focus-btn {
  cursor: pointer;
  border: 1px solid rgba(0, 240, 255, 0.24);
  border-radius: 4px;
  padding: 11px 13px;
  background: rgba(0, 240, 255, 0.07);
  color: rgba(235, 246, 255, 0.86);
  font-size: 9px;
  line-height: 1;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.home-focus-btn.primary {
  border-color: rgba(252, 238, 9, 0.56);
  background: rgba(252, 238, 9, 0.16);
  color: var(--yellow);
  box-shadow: 0 0 18px rgba(252, 238, 9, 0.1);
}

.home-focus-btn:hover,
.home-focus-btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(252, 238, 9, 0.58);
  background: rgba(252, 238, 9, 0.13);
  outline: none;
}

.home-focus-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 24px;
}

.focus-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  margin: 0 auto 8px;
  color: var(--green);
  font-size: 12px;
}

.focus-ring span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 255, 157, 0.32);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.08);
}

.focus-ring span:nth-child(2) {
  inset: 18px;
  border-color: rgba(0, 240, 255, 0.24);
}

.focus-ring span:nth-child(3) {
  inset: 38px;
  border-style: dashed;
  border-color: rgba(252, 238, 9, 0.34);
}

.focus-ring strong {
  position: relative;
  color: var(--green);
  text-shadow: 0 0 14px rgba(0, 255, 157, 0.3);
}

.focus-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 9px 0;
  color: rgba(235, 246, 255, 0.52);
  font-size: 8px;
}

.focus-stat-row strong {
  color: rgba(252, 238, 9, 0.88);
  text-align: right;
}

.home-menu-panel {
  opacity: 0.92;
}

.home-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.home-section-head h2 {
  margin-bottom: 8px;
}

.home-section-head p {
  color: rgba(235, 246, 255, 0.52);
  font-size: 9px;
  line-height: 1.8;
}

.home-section-head > span {
  flex: 0 0 auto;
  border: 1px solid rgba(252, 238, 9, 0.22);
  border-radius: 4px;
  padding: 7px 9px;
  color: rgba(252, 238, 9, 0.78);
  font-size: 8px;
  background: rgba(252, 238, 9, 0.06);
}

.home-menu-panel .grid {
  gap: 14px;
}

.home-menu-panel .card {
  min-height: 164px;
}

.home-menu-panel .card-title {
  font-size: 11px;
}

.home-menu-panel .card-desc {
  color: rgba(235, 246, 255, 0.58);
}

.home-focus-panel + .night-city-panel {
  margin-top: 2px;
}

@media (max-width: 960px) {
  .home-focus-panel {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .home-focus-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 0 0;
  }

  .focus-ring {
    display: none;
  }
}

@media (max-width: 640px) {
  .home-focus-panel {
    min-height: 0;
    padding: 18px;
  }

  .home-focus-panel h1 {
    font-size: 28px;
  }

  .home-focus-panel p {
    font-size: 11px;
  }

  .home-focus-actions {
    flex-direction: column;
  }

  .home-focus-btn {
    width: 100%;
  }

  .home-focus-status {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .home-section-head {
    flex-direction: column;
  }
}

/* V0.6.28 complete UI rebuild: Afterlife command deck layout. */
:root {
  --ui-bg-0: #03050a;
  --ui-bg-1: #07101a;
  --ui-bg-2: #101526;
  --ui-panel: rgba(8, 14, 24, 0.78);
  --ui-panel-strong: rgba(10, 18, 30, 0.92);
  --ui-line: rgba(132, 226, 255, 0.2);
  --ui-line-strong: rgba(252, 238, 9, 0.36);
  --ui-text: rgba(238, 246, 255, 0.9);
  --ui-soft: rgba(238, 246, 255, 0.58);
  --ui-dim: rgba(238, 246, 255, 0.36);
  --ui-cyan: #6eeeff;
  --ui-yellow: #fcee09;
  --ui-pink: #ff4fd8;
  --ui-green: #36ffad;
  --ui-radius: 10px;
  --topnav-height: 58px;
}

html {
  background: var(--ui-bg-0);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 8%, rgba(0, 240, 255, 0.14), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(255, 43, 214, 0.11), transparent 30%),
    linear-gradient(180deg, rgba(252, 238, 9, 0.035), transparent 220px),
    linear-gradient(135deg, #03050a 0%, #07101a 48%, #100915 100%) !important;
  color: var(--ui-text) !important;
}

body::before {
  opacity: 0.11 !important;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background:
    linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.035), transparent),
    radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.28) 100%);
  mix-blend-mode: screen;
}

.top-navbar {
  height: 58px !important;
  padding: 0 22px !important;
  border-bottom: 1px solid rgba(110, 238, 255, 0.18) !important;
  background:
    linear-gradient(90deg, rgba(252, 238, 9, 0.08), transparent 18%, rgba(255, 79, 216, 0.06)),
    rgba(4, 8, 14, 0.88) !important;
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.02) inset !important;
}

.top-navbar .nav-brand {
  color: var(--ui-yellow) !important;
  font-size: 15px !important;
  letter-spacing: 1px;
  text-shadow: 0 0 18px rgba(252, 238, 9, 0.18) !important;
}

.top-navbar .nav-link,
.top-navbar .nav-icon,
.settings-launcher {
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  padding: 7px 10px !important;
  color: rgba(238, 246, 255, 0.72) !important;
  background: rgba(255, 255, 255, 0.025) !important;
}

.top-navbar .nav-link:hover,
.top-navbar .nav-icon:hover,
.settings-launcher:hover {
  color: var(--ui-yellow) !important;
  border-color: rgba(252, 238, 9, 0.3) !important;
  background: rgba(252, 238, 9, 0.08) !important;
  box-shadow: 0 0 18px rgba(252, 238, 9, 0.08) !important;
}

.container {
  width: min(100%, 1180px) !important;
  max-width: 1180px !important;
  padding: calc(var(--topnav-height) + 40px) 20px 72px !important;
  gap: 22px !important;
}

body.is-homepage .container {
  max-width: 1120px !important;
}

body.is-subpage .container,
body.is-games-page .container {
  max-width: 1160px !important;
}

body[class*="user-hud-skin-"] .container {
  width: min(100%, 1180px) !important;
  max-width: 1180px !important;
}

body.is-homepage[class*="user-hud-skin-"] .container {
  width: min(100%, 1120px) !important;
  max-width: 1120px !important;
}

body.is-subpage[class*="user-hud-skin-"] .container,
body.is-games-page[class*="user-hud-skin-"] .container {
  width: min(100%, 1160px) !important;
  max-width: 1160px !important;
}

.topbar,
.panel,
.card,
.settings-panel,
.sidebar,
.global-music-player,
.global-lyrics-panel,
.eft-side-panel,
.night-city-panel,
.login-panel,
.terminal-box {
  border-radius: var(--ui-radius) !important;
  border: 1px solid var(--ui-line) !important;
  background:
    linear-gradient(135deg, rgba(110, 238, 255, 0.075), transparent 34%),
    linear-gradient(315deg, rgba(255, 79, 216, 0.055), transparent 42%),
    var(--ui-panel) !important;
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset !important;
  backdrop-filter: blur(18px) saturate(145%);
}

.panel {
  padding: 24px !important;
  overflow: hidden;
}

.panel::before {
  border-color: rgba(252, 238, 9, 0.08) !important;
}

.panel h2,
.card-title,
.settings-title,
.global-music-title,
.global-lyrics-title,
.night-city-head h2 {
  color: var(--ui-yellow) !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  letter-spacing: 0.4px !important;
  text-shadow: 0 0 16px rgba(252, 238, 9, 0.16) !important;
}

.subtitle,
.text,
.card-desc,
.history-desc,
.project-desc,
.social-desc,
.website-desc,
.blog-content,
.achievement-desc {
  color: var(--ui-soft) !important;
  line-height: 1.9 !important;
}

#globalUserHud.topbar.user-hud-classic {
  min-height: 92px;
  align-items: center !important;
  border-color: rgba(252, 238, 9, 0.24) !important;
  background:
    linear-gradient(90deg, rgba(252, 238, 9, 0.1), transparent 32%),
    linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(255, 79, 216, 0.045)),
    rgba(6, 10, 18, 0.82) !important;
}

#globalUserHud .hud-avatar {
  width: 58px !important;
  height: 58px !important;
  border-radius: 14px !important;
  border-color: rgba(252, 238, 9, 0.38) !important;
}

#globalUserHud .title {
  font-size: 17px !important;
  color: var(--ui-yellow) !important;
}

#globalUserHud .subtitle {
  max-width: 620px;
  margin-top: 6px !important;
  font-size: 9px !important;
}

.hud-strip {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.hud-strip span {
  justify-content: center;
  border: 1px solid rgba(110, 238, 255, 0.16);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(4, 10, 18, 0.58);
  color: rgba(238, 246, 255, 0.68);
}

.home-focus-panel {
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.52fr) !important;
  min-height: 380px !important;
  padding: 34px !important;
  border-color: rgba(252, 238, 9, 0.42) !important;
  background:
    radial-gradient(circle at 82% 24%, rgba(252, 238, 9, 0.18), transparent 28%),
    radial-gradient(circle at 18% 16%, rgba(110, 238, 255, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(13, 20, 32, 0.96), rgba(10, 7, 20, 0.88)) !important;
}

.home-focus-panel h1 {
  font-size: clamp(34px, 5vw, 64px) !important;
  line-height: 1.12 !important;
}

.home-focus-panel p {
  max-width: 720px !important;
  color: rgba(238, 246, 255, 0.74) !important;
  font-size: 12px !important;
}

.home-focus-actions {
  gap: 12px !important;
}

.home-focus-btn,
.btn,
.cyber-btn,
.settings-reset,
.night-city-detail-close,
.global-music-btn,
.global-music-collapse {
  border-radius: 999px !important;
  border: 1px solid rgba(110, 238, 255, 0.22) !important;
  background: rgba(110, 238, 255, 0.07) !important;
  color: rgba(238, 246, 255, 0.84) !important;
}

.home-focus-btn.primary,
.cyber-btn,
.btn:hover {
  border-color: rgba(252, 238, 9, 0.48) !important;
  background: rgba(252, 238, 9, 0.13) !important;
  color: var(--ui-yellow) !important;
}

.grid,
.ach-grid,
.website-grid,
.social-grid,
.project-grid,
.game-grid {
  gap: 16px !important;
}

.card,
.arcade-card,
.social-card,
.website-card,
.achievement-card,
.blog-card,
.project-card,
.history-card,
.game-card {
  position: relative;
  border: 1px solid rgba(110, 238, 255, 0.16) !important;
  border-radius: 10px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(255, 255, 255, 0.028) !important;
  box-shadow: none !important;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease !important;
}

.card:hover,
.arcade-card:hover,
.social-card:hover,
.website-card:hover,
.achievement-card:hover,
.blog-card:hover,
.project-card:hover,
.history-card:hover,
.game-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(252, 238, 9, 0.42) !important;
  background:
    linear-gradient(135deg, rgba(252, 238, 9, 0.085), rgba(110, 238, 255, 0.045)),
    rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22), 0 0 22px rgba(252, 238, 9, 0.07) !important;
}

.home-menu-panel {
  opacity: 1 !important;
}

.home-menu-panel .card {
  min-height: 150px !important;
}

.night-city-panel {
  border-color: rgba(110, 238, 255, 0.22) !important;
}

.night-city-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.7fr) !important;
}

.night-city-map-wrap,
.night-city-data-panel,
.night-city-log-panel {
  border-radius: 10px !important;
  background: rgba(2, 7, 13, 0.38) !important;
}

.cyber-news-terminal {
  width: 280px !important;
  opacity: 0.72 !important;
  border-color: rgba(110, 238, 255, 0.14) !important;
}

.cyber-news-terminal:hover,
.cyber-news-terminal:focus-within {
  opacity: 0.96 !important;
}

.eft-side-panel {
  width: 292px !important;
  opacity: 0.9 !important;
}

.global-music-player {
  border-color: rgba(110, 238, 255, 0.22) !important;
}

.global-lyrics-panel {
  left: 50% !important;
  transform: translateX(-50%) !important;
  max-width: min(760px, calc(100vw - 38px)) !important;
  border-color: rgba(110, 238, 255, 0.2) !important;
}

.settings-panel {
  width: min(420px, calc(100vw - 28px)) !important;
}

.settings-row select,
.input,
input,
textarea,
select {
  border-radius: 8px !important;
  border-color: rgba(110, 238, 255, 0.2) !important;
  background: rgba(2, 7, 13, 0.62) !important;
  color: var(--ui-text) !important;
}

body.is-subpage .container::before,
body.is-games-page .container::before {
  content: "ARCHIVE ACCESS";
  display: block;
  width: fit-content;
  margin-bottom: -8px;
  border: 1px solid rgba(252, 238, 9, 0.26);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(252, 238, 9, 0.07);
  color: rgba(252, 238, 9, 0.78);
  font-size: 8px;
  letter-spacing: 1px;
}

body.is-subpage .panel:first-of-type,
body.is-games-page .panel:first-of-type {
  padding-top: 30px !important;
}

body.is-subpage .panel:first-of-type h2,
body.is-games-page .panel:first-of-type h2 {
  font-size: clamp(18px, 3.2vw, 30px) !important;
  line-height: 1.35 !important;
  margin-bottom: 18px !important;
}

body.is-subpage .night-city-panel {
  margin-top: 8px !important;
  opacity: 0.82 !important;
}

body.is-login-page {
  display: grid;
  place-items: center;
  padding: 24px !important;
}

body.is-login-page .login-bg {
  background:
    radial-gradient(circle at 22% 22%, rgba(0, 240, 255, 0.2), transparent 30%),
    radial-gradient(circle at 78% 18%, rgba(255, 79, 216, 0.16), transparent 28%),
    linear-gradient(135deg, #03050a, #0b111d 52%, #130815) !important;
}

body.is-login-page .login-wrap {
  width: min(980px, calc(100vw - 28px)) !important;
  display: grid !important;
  place-items: center !important;
}

body.is-login-page .login-panel {
  width: min(620px, 100%) !important;
  padding: 30px !important;
  border-color: rgba(252, 238, 9, 0.32) !important;
}

body.is-login-page .login-title {
  color: var(--ui-yellow) !important;
  font-size: clamp(22px, 5vw, 42px) !important;
  line-height: 1.2 !important;
}

body.is-login-page .login-subtitle {
  color: var(--ui-soft) !important;
}

body.is-login-page .terminal-box {
  min-height: 150px !important;
  color: rgba(110, 238, 255, 0.84) !important;
}

body.arcade-focus-mode .panel.game-shell,
body.arcade-focus-mode .game-shell,
body.arcade-focus-mode .game-detail-panel {
  max-width: min(1120px, calc(100vw - 32px)) !important;
  margin-inline: auto !important;
}

@media (min-width: 1420px) {
  body.has-cyber-news-terminal .container {
    margin-left: 320px !important;
  }
}

@media (max-width: 1280px) {
  .cyber-news-terminal {
    display: none !important;
  }

  body.has-cyber-news-terminal .container {
    margin-left: auto !important;
  }
}

@media (max-width: 960px) {
  .container {
    padding-inline: 14px !important;
  }

  .home-focus-panel,
  .night-city-grid {
    grid-template-columns: 1fr !important;
  }

  .hud-strip {
    grid-template-columns: 1fr !important;
  }

  .panel {
    padding: 18px !important;
  }
}

@media (max-width: 640px) {
  .top-navbar {
    height: 54px !important;
    padding-inline: 10px !important;
  }

  .top-navbar .navbar-center {
    display: none !important;
  }

  .home-focus-panel {
    min-height: 0 !important;
    padding: 20px !important;
  }

  .home-focus-panel h1 {
    font-size: 30px !important;
  }

  #globalUserHud.topbar.user-hud-classic {
    align-items: flex-start !important;
  }

  .grid,
  .ach-grid,
  .website-grid,
  .social-grid,
  .project-grid,
  .game-grid {
    grid-template-columns: 1fr !important;
  }
}

/* V0.6.35 rollback polish: calmer pixel HUD layout after reverting the experimental Neo Tech layer. */
:root {
  --polish-panel: rgba(7, 12, 20, 0.82);
  --polish-card: rgba(255, 255, 255, 0.032);
  --polish-line: rgba(0, 240, 255, 0.2);
  --polish-line-hot: rgba(252, 238, 9, 0.36);
  --polish-soft: rgba(235, 246, 255, 0.64);
  --polish-dim: rgba(235, 246, 255, 0.46);
  --topnav-height: 52px;
}

body {
  background:
    radial-gradient(circle at 20% 8%, rgba(0, 240, 255, 0.13), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(255, 43, 214, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(252, 238, 9, 0.035), transparent 260px),
    var(--bg) !important;
  font-size: 12px !important;
}

.top-navbar {
  height: var(--topnav-height) !important;
  padding-inline: 18px !important;
}

.top-navbar .nav-brand {
  font-size: 14px !important;
}

.top-navbar .nav-link,
.top-navbar .nav-icon,
.settings-launcher {
  font-size: 8px !important;
  padding: 6px 9px !important;
}

.container {
  width: min(100%, 1100px) !important;
  max-width: 1100px !important;
  padding: calc(var(--topnav-height) + 24px) 18px 64px !important;
  gap: 16px !important;
}

body[class*="user-hud-skin-"] .container,
body.is-homepage[class*="user-hud-skin-"] .container,
body.is-subpage[class*="user-hud-skin-"] .container,
body.is-games-page[class*="user-hud-skin-"] .container {
  width: min(100%, 1100px) !important;
  max-width: 1100px !important;
}

body.is-homepage .container {
  display: flex !important;
  flex-direction: column !important;
}

body.is-homepage #globalUserHud { order: 0; }
body.is-homepage .hud-strip { order: 1; }
body.is-homepage .home-focus-panel { order: 2; }
body.is-homepage .home-menu-panel { order: 3; }
body.is-homepage .container > .panel:not(.home-menu-panel):not(.night-city-panel):not(.eft-side-panel) { order: 4; }
body.is-homepage .night-city-panel { order: 5; }
body.is-homepage .footer { order: 10; }

body.is-homepage .cyber-news-terminal,
body.is-subpage .cyber-news-terminal,
body.is-games-page .cyber-news-terminal {
  display: block !important;
  width: 232px !important;
  height: min(360px, calc(100vh - var(--topnav-height) - 38px)) !important;
  left: 12px !important;
  top: calc(var(--topnav-height) + 12px) !important;
  opacity: 0.58 !important;
  border-color: rgba(0, 240, 255, 0.12) !important;
  background:
    linear-gradient(180deg, rgba(0, 240, 255, 0.035), transparent 28%),
    rgba(3, 7, 12, 0.52) !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.045) !important;
}

body.is-homepage .cyber-news-terminal:hover,
body.is-subpage .cyber-news-terminal:hover,
body.is-games-page .cyber-news-terminal:hover,
body.is-homepage .cyber-news-terminal:focus-within,
body.is-subpage .cyber-news-terminal:focus-within,
body.is-games-page .cyber-news-terminal:focus-within {
  opacity: 0.94 !important;
}

body.is-homepage .cyber-news-top,
body.is-subpage .cyber-news-top,
body.is-games-page .cyber-news-top {
  padding: 7px 8px 5px !important;
}

body.is-homepage .cyber-news-title,
body.is-subpage .cyber-news-title,
body.is-games-page .cyber-news-title {
  font-size: 7px !important;
}

body.is-homepage .cyber-news-subtitle,
body.is-subpage .cyber-news-subtitle,
body.is-games-page .cyber-news-subtitle,
body.is-homepage .cyber-news-controls,
body.is-subpage .cyber-news-controls,
body.is-games-page .cyber-news-controls {
  display: none !important;
}

body.is-homepage .cyber-news-stream,
body.is-subpage .cyber-news-stream,
body.is-games-page .cyber-news-stream {
  height: calc(100% - 34px) !important;
  padding: 8px !important;
  font-size: 8px !important;
  line-height: 1.75 !important;
}

body.is-homepage .cyber-news-line,
body.is-subpage .cyber-news-line,
body.is-games-page .cyber-news-line {
  margin-bottom: 6px !important;
  padding: 6px 7px !important;
  color: rgba(235, 246, 255, 0.62) !important;
}

body.is-homepage .eft-side-panel,
body.is-subpage .eft-side-panel,
body.is-games-page .eft-side-panel {
  display: block !important;
  width: 236px !important;
  right: 12px !important;
  top: calc(var(--topnav-height) + 12px) !important;
  bottom: auto !important;
  max-height: 360px !important;
  overflow: hidden !important;
  opacity: 0.68 !important;
  padding: 12px !important;
}

body.eft-hud-size-small.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-normal.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-large.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-small.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-normal.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-large.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-small.is-games-page:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-normal.is-games-page:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-large.is-games-page:not(.eft-hud-hidden) .eft-side-panel {
  width: 236px !important;
}

body.is-homepage .eft-side-panel:hover,
body.is-subpage .eft-side-panel:hover,
body.is-games-page .eft-side-panel:hover {
  opacity: 0.96 !important;
  overflow-y: auto !important;
}

body.is-homepage .eft-side-panel .eft-panel-title,
body.is-subpage .eft-side-panel .eft-panel-title,
body.is-games-page .eft-side-panel .eft-panel-title {
  margin-bottom: 8px !important;
}

body.is-homepage .eft-side-panel .eft-panel-title h2,
body.is-subpage .eft-side-panel .eft-panel-title h2,
body.is-games-page .eft-side-panel .eft-panel-title h2 {
  font-size: 10px !important;
}

body.is-homepage .eft-side-panel .eft-body-wrap,
body.is-subpage .eft-side-panel .eft-body-wrap,
body.is-games-page .eft-side-panel .eft-body-wrap {
  max-height: 145px !important;
}

body.is-homepage .eft-side-panel .eft-grid,
body.is-subpage .eft-side-panel .eft-grid,
body.is-games-page .eft-side-panel .eft-grid {
  gap: 8px !important;
}

body.is-homepage .eft-side-panel .eft-limb-row,
body.is-subpage .eft-side-panel .eft-limb-row,
body.is-games-page .eft-side-panel .eft-limb-row {
  grid-template-columns: 34px 1fr 42px !important;
  gap: 6px !important;
}

body.is-homepage .eft-side-panel .eft-limb-name,
body.is-homepage .eft-side-panel .eft-limb-value,
body.is-homepage .eft-side-panel .eft-stat-label,
body.is-homepage .eft-side-panel .eft-stat-value,
body.is-subpage .eft-side-panel .eft-limb-name,
body.is-subpage .eft-side-panel .eft-limb-value,
body.is-subpage .eft-side-panel .eft-stat-label,
body.is-subpage .eft-side-panel .eft-stat-value,
body.is-games-page .eft-side-panel .eft-limb-name,
body.is-games-page .eft-side-panel .eft-limb-value,
body.is-games-page .eft-side-panel .eft-stat-label,
body.is-games-page .eft-side-panel .eft-stat-value {
  font-size: 7px !important;
}

.topbar,
.panel,
.card,
.settings-panel,
.sidebar,
.global-music-player,
.global-lyrics-panel,
.eft-side-panel,
.night-city-panel {
  border-radius: 8px !important;
  border-color: var(--polish-line) !important;
  background:
    linear-gradient(135deg, rgba(0, 240, 255, 0.06), transparent 34%),
    linear-gradient(315deg, rgba(255, 43, 214, 0.045), transparent 42%),
    var(--polish-panel) !important;
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025) !important;
}

.panel {
  padding: 20px !important;
}

.panel h2,
.night-city-head h2,
.settings-title,
.global-music-title,
.global-lyrics-title {
  color: var(--yellow) !important;
  font-size: clamp(12px, 1.7vw, 18px) !important;
  line-height: 1.75 !important;
  margin-bottom: 14px !important;
}

.subtitle,
.text,
.card-desc,
.history-desc,
.project-desc,
.social-desc,
.website-desc,
.blog-content,
.achievement-desc {
  color: var(--polish-soft) !important;
  font-size: 9px !important;
  line-height: 2 !important;
}

#globalUserHud.topbar.user-hud-classic {
  min-height: 78px !important;
  padding: 14px 16px !important;
}

#globalUserHud.user-hud-classic .hud-avatar {
  width: 50px !important;
  height: 50px !important;
  border-radius: 10px !important;
}

#globalUserHud.user-hud-classic .title {
  font-size: clamp(13px, 2vw, 18px) !important;
  line-height: 1.5 !important;
}

#globalUserHud.user-hud-classic .subtitle {
  font-size: 8px !important;
  line-height: 1.9 !important;
}

.hud-strip {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.hud-strip span {
  padding: 8px 10px !important;
  color: var(--polish-dim) !important;
  font-size: 8px !important;
}

.home-focus-panel {
  min-height: 330px !important;
  grid-template-columns: minmax(0, 1fr) 230px !important;
  gap: 18px !important;
  padding: 26px !important;
  border-radius: 10px !important;
}

.home-focus-kicker {
  font-size: 8px !important;
}

.home-focus-panel h1 {
  font-size: clamp(25px, 4.6vw, 44px) !important;
  line-height: 1.35 !important;
}

.home-focus-panel p {
  max-width: 640px !important;
  margin-top: 14px !important;
  font-size: 9px !important;
  line-height: 2.15 !important;
}

.home-focus-actions {
  gap: 9px !important;
  margin-top: 18px !important;
}

.home-focus-btn,
.btn,
.cyber-btn,
.global-music-btn,
.global-music-collapse {
  min-height: 32px !important;
  padding: 8px 11px !important;
  font-size: 8px !important;
  line-height: 1.6 !important;
}

.focus-ring {
  width: 142px !important;
  height: 142px !important;
  font-size: 9px !important;
}

.focus-stat-row {
  padding: 7px 0 !important;
  font-size: 8px !important;
}

.home-menu-panel .grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.home-menu-panel .card {
  min-height: 138px !important;
  padding: 15px !important;
}

.home-menu-panel .card:nth-child(1),
.home-menu-panel .card:nth-child(4) {
  grid-column: span 2;
}

.card-title,
.social-name,
.website-name,
.project-title,
.history-title,
.achievement-title,
.blog-title {
  font-size: 11px !important;
  line-height: 1.8 !important;
}

.card-code {
  color: var(--cyan) !important;
  font-size: 8px !important;
}

.night-city-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr) !important;
  gap: 14px !important;
}

body.is-homepage .night-city-panel {
  opacity: 0.82 !important;
}

body.is-homepage .night-city-head {
  align-items: center !important;
}

body.is-homepage .night-city-head h2::after {
  content: " / SECONDARY LIVE MODULE";
  color: var(--polish-dim);
  font-size: 8px;
}

body.is-homepage .night-city-grid {
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1fr) !important;
}

body.is-homepage .night-city-map-wrap {
  max-height: 340px;
  overflow: hidden;
}

body.is-homepage .night-city-map {
  max-height: 330px !important;
}

body.is-homepage .night-city-log-panel,
body.is-homepage .night-city-case-log {
  display: none !important;
}

.night-city-stat strong {
  font-size: 18px !important;
}

body.is-subpage .container,
body.is-games-page .container {
  display: flex !important;
  flex-direction: column !important;
}

body.is-subpage .night-city-panel,
body.is-games-page .night-city-panel {
  display: none !important;
}

body.is-subpage #globalUserHud,
body.is-games-page #globalUserHud {
  order: 0;
}

body.is-subpage .container::before,
body.is-games-page .container::before {
  order: 1;
  content: "ARCHIVE ACCESS";
  width: fit-content;
  margin-bottom: -6px;
  border: 1px solid rgba(252, 238, 9, 0.24);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(252, 238, 9, 0.06);
  color: rgba(252, 238, 9, 0.78);
  font-size: 8px;
}

body.is-subpage .container > .panel:not(.night-city-panel):not(.eft-side-panel),
body.is-games-page .container > .panel:not(.night-city-panel):not(.eft-side-panel) {
  order: 2;
}

body.is-subpage .night-city-panel,
body.is-games-page .night-city-panel {
  order: 6;
}

body.is-subpage .footer,
body.is-games-page .footer {
  order: 10;
}

body.is-subpage .panel:first-of-type,
body.is-games-page .panel:first-of-type {
  min-height: 190px;
  padding: 24px !important;
}

body.is-subpage .panel:first-of-type h2,
body.is-games-page .panel:first-of-type h2 {
  font-size: clamp(18px, 3vw, 30px) !important;
  line-height: 1.5 !important;
}

body.is-subpage .panel:first-of-type .text,
body.is-games-page .panel:first-of-type .text,
body.is-subpage .panel:first-of-type p,
body.is-games-page .panel:first-of-type p {
  max-width: 78ch;
}

body.is-subpage .panel:not(.night-city-panel):not(.eft-side-panel),
body.is-games-page .panel:not(.night-city-panel):not(.eft-side-panel) {
  background:
    linear-gradient(90deg, rgba(252, 238, 9, 0.045), transparent 220px),
    linear-gradient(135deg, rgba(0, 240, 255, 0.045), transparent 34%),
    rgba(7, 12, 20, 0.86) !important;
}

body.is-login-page .login-wrap {
  width: min(920px, calc(100vw - 28px)) !important;
}

body.is-login-page .login-panel {
  padding: 24px !important;
}

body.is-login-page .login-title {
  font-size: clamp(18px, 4vw, 32px) !important;
  line-height: 1.55 !important;
}

body.is-login-page .login-subtitle,
body.is-login-page .terminal-box {
  font-size: 9px !important;
  line-height: 2 !important;
}

@media (max-width: 960px) {
  body.is-homepage .cyber-news-terminal,
  body.is-subpage .cyber-news-terminal,
  body.is-games-page .cyber-news-terminal,
  body.is-homepage .eft-side-panel,
  body.is-subpage .eft-side-panel,
  body.is-games-page .eft-side-panel {
    position: static !important;
    width: 100% !important;
    max-height: 220px !important;
    height: auto !important;
    opacity: 0.86 !important;
    order: 8;
  }

  .home-focus-panel,
  .night-city-grid,
  .home-menu-panel .grid {
    grid-template-columns: 1fr !important;
  }

  .home-menu-panel .card:nth-child(1),
  .home-menu-panel .card:nth-child(4) {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: 12px !important;
  }

  .home-focus-panel h1,
  body.is-subpage .panel:first-of-type h2,
  body.is-games-page .panel:first-of-type h2 {
    font-size: 24px !important;
  }
}

/* V0.6.38 font ladder fix: normalize pixel text sizes across inline page styles and HUD widgets. */
:root {
  --pixel-font-xs: calc(8px * var(--settings-font-scale, 1));
  --pixel-font-sm: calc(9px * var(--settings-font-scale, 1));
  --pixel-font-md: calc(10px * var(--settings-font-scale, 1));
  --pixel-font-lg: calc(12px * var(--settings-font-scale, 1));
  --pixel-font-xl: calc(14px * var(--settings-font-scale, 1));
}

body {
  font-size: var(--pixel-font-md) !important;
  line-height: 1.9 !important;
}

.top-navbar,
.container,
.panel,
.card,
.sidebar,
.settings-panel,
.global-music-player,
.global-lyrics-panel,
.cyber-news-terminal,
.eft-side-panel {
  font-size: var(--pixel-font-md) !important;
}

.top-navbar .nav-brand {
  font-size: var(--pixel-font-lg) !important;
  line-height: 1.25 !important;
}

.sidebar-close-btn {
  font-size: var(--pixel-font-xl) !important;
  line-height: 1 !important;
}

.top-navbar .nav-link,
.top-navbar .nav-icon,
.settings-launcher,
.sidebar-menu .sidebar-item,
.btn,
.home-focus-btn,
.cyber-btn,
.global-music-btn,
.global-music-collapse,
.hud-chip,
.status,
.hud-strip span,
.card-code,
.bio-tag,
.skill-head,
.info-key,
.cyber-news-title,
.cyber-news-line,
.eft-limb-name,
.eft-limb-value,
.eft-stat-label,
.eft-stat-value {
  font-size: var(--pixel-font-xs) !important;
  line-height: 1.75 !important;
}

#globalUserHud.user-hud-classic .title,
.home-focus-panel h1,
body.is-subpage .panel:first-of-type h2,
body.is-games-page .panel:first-of-type h2 {
  font-size: clamp(calc(18px * var(--settings-font-scale, 1)), calc(3vw * var(--settings-font-scale, 1)), calc(28px * var(--settings-font-scale, 1))) !important;
  line-height: 1.45 !important;
}

#globalUserHud.user-hud-classic .subtitle,
.subtitle,
.text,
.card-desc,
.history-desc,
.project-desc,
.social-desc,
.website-desc,
.blog-content,
.achievement-desc,
.home-focus-panel p,
.info-block,
.info-value,
.bio-role,
.night-city-alert-text,
.night-city-alert-crime,
.night-city-alert-response {
  font-size: var(--pixel-font-sm) !important;
  line-height: 2 !important;
}

.panel h2,
.night-city-head h2,
.settings-title,
.global-music-title,
.global-lyrics-title,
.info-title,
.card-title,
.social-name,
.website-name,
.project-title,
.history-title,
.achievement-title,
.blog-title,
.bio-name {
  font-size: var(--pixel-font-lg) !important;
  line-height: 1.75 !important;
}

.bio-grid,
.bio-card,
.avatar-box,
.info-line,
.project-card,
.history-card,
.achievement-card,
.blog-card,
.social-card,
.website-card {
  font-size: var(--pixel-font-md) !important;
}

.cyber-news-terminal {
  font-size: var(--pixel-font-sm) !important;
}

.cyber-news-stream {
  font-size: var(--pixel-font-xs) !important;
}

.eft-side-panel .eft-panel-title h2 {
  font-size: var(--pixel-font-md) !important;
  line-height: 1.7 !important;
}

.global-music-title,
.global-lyrics-title {
  font-size: var(--pixel-font-sm) !important;
}

@media (max-width: 760px) {
  #globalUserHud.user-hud-classic .title,
  .home-focus-panel h1,
  body.is-subpage .panel:first-of-type h2,
  body.is-games-page .panel:first-of-type h2 {
    font-size: calc(18px * var(--settings-font-scale, 1)) !important;
  }

  .top-navbar .nav-brand {
    font-size: var(--pixel-font-md) !important;
  }
}

/* V0.6.39 settings console rebuild: restore live controls and make the panel easier to scan. */
.settings-panel {
  width: min(440px, calc(100vw - 24px)) !important;
  padding: 0 !important;
  border-radius: 12px !important;
  border-color: color-mix(in srgb, var(--ui-cyan, #00f0ff) 42%, transparent) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 86px),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--ui-pink, #ff2bd6) 18%, transparent), transparent 32%),
    rgba(3, 7, 12, 0.94) !important;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    0 0 30px color-mix(in srgb, var(--ui-cyan, #00f0ff) 10%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035) !important;
}

.settings-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 15px 16px 12px !important;
  margin: 0 !important;
  border-bottom: 1px solid color-mix(in srgb, var(--ui-cyan, #00f0ff) 22%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--ui-yellow, #fcee09) 10%, transparent), transparent 52%),
    rgba(3, 7, 12, 0.92);
  backdrop-filter: blur(16px) saturate(150%);
}

.settings-kicker {
  margin-bottom: 5px;
  color: color-mix(in srgb, var(--ui-cyan, #00f0ff) 82%, white 8%);
  font-size: var(--pixel-font-xs) !important;
  letter-spacing: 1.4px;
}

.settings-title {
  margin: 0 !important;
  color: var(--ui-yellow, var(--yellow)) !important;
  font-size: var(--pixel-font-lg) !important;
  line-height: 1.55 !important;
}

.settings-close {
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  color: var(--ui-text, var(--text)) !important;
}

.settings-section {
  margin: 12px 12px 0 !important;
  padding: 12px !important;
  border: 1px solid color-mix(in srgb, var(--ui-cyan, #00f0ff) 16%, transparent);
  border-radius: 10px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--ui-cyan, #00f0ff) 7%, transparent), transparent 42%),
    rgba(255, 255, 255, 0.032);
}

.settings-section-title {
  margin: 0 0 10px !important;
  padding: 0 0 8px !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ui-yellow, var(--yellow)) !important;
  font-size: var(--pixel-font-sm) !important;
  line-height: 1.7 !important;
  letter-spacing: 0.8px !important;
}

.settings-row {
  margin-top: 10px !important;
}

.settings-row:first-of-type {
  margin-top: 0 !important;
}

.settings-row label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px !important;
  color: var(--ui-soft, var(--muted)) !important;
  font-size: var(--pixel-font-xs) !important;
  line-height: 1.7 !important;
  letter-spacing: 0.7px !important;
}

.settings-row select {
  min-height: 34px;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  border: 1px solid color-mix(in srgb, var(--ui-cyan, #00f0ff) 24%, transparent) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.32) !important;
  color: var(--ui-text, var(--text)) !important;
  font-size: var(--pixel-font-sm) !important;
  line-height: 1.7 !important;
}

.settings-row select:focus {
  border-color: var(--ui-yellow, var(--yellow)) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ui-yellow, #fcee09) 16%, transparent);
}

.settings-actions {
  padding: 12px !important;
  margin: 0 !important;
}

.settings-reset {
  width: 100%;
  min-height: 34px !important;
  justify-content: center;
  font-size: var(--pixel-font-xs) !important;
}

.settings-whisper {
  margin: 0 12px 12px !important;
  border-radius: 10px !important;
  color: color-mix(in srgb, var(--ui-green, #00ff9d) 76%, white 8%) !important;
  font-size: var(--pixel-font-xs) !important;
}

@media (max-width: 560px) {
  .settings-panel {
    left: 10px !important;
    right: 10px !important;
    top: calc(var(--topnav-height) + 8px) !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
  }

  .settings-grid-row {
    grid-template-columns: 1fr !important;
  }
}

/* V0.6.40 settings priority fix: keep news terminal and role HUD controls authoritative. */
body.cyber-news-hidden .cyber-news-terminal,
body.cyber-news-hidden.is-homepage .cyber-news-terminal,
body.cyber-news-hidden.is-subpage .cyber-news-terminal,
body.cyber-news-hidden.is-games-page .cyber-news-terminal,
body.eft-hud-hidden .eft-side-panel,
body.eft-hud-hidden.is-homepage .eft-side-panel,
body.eft-hud-hidden.is-subpage .eft-side-panel,
body.eft-hud-hidden.is-games-page .eft-side-panel {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.eft-hud-opacity-solid .eft-side-panel,
body.eft-hud-opacity-solid.is-homepage .eft-side-panel,
body.eft-hud-opacity-solid.is-subpage .eft-side-panel,
body.eft-hud-opacity-solid.is-games-page .eft-side-panel {
  opacity: 1 !important;
}

body.eft-hud-opacity-soft .eft-side-panel,
body.eft-hud-opacity-soft.is-homepage .eft-side-panel,
body.eft-hud-opacity-soft.is-subpage .eft-side-panel,
body.eft-hud-opacity-soft.is-games-page .eft-side-panel {
  opacity: 0.82 !important;
}

body.eft-hud-opacity-ghost .eft-side-panel,
body.eft-hud-opacity-ghost.is-homepage .eft-side-panel,
body.eft-hud-opacity-ghost.is-subpage .eft-side-panel,
body.eft-hud-opacity-ghost.is-games-page .eft-side-panel {
  opacity: 0.62 !important;
}

body.eft-hud-opacity-solid .eft-side-panel:hover,
body.eft-hud-opacity-soft .eft-side-panel:hover,
body.eft-hud-opacity-ghost .eft-side-panel:hover {
  opacity: 0.96 !important;
}

body.eft-hud-size-small.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-small.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-small.is-games-page:not(.eft-hud-hidden) .eft-side-panel {
  width: 212px !important;
  max-height: 310px !important;
  padding: 10px !important;
}

body.eft-hud-size-normal.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-normal.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-normal.is-games-page:not(.eft-hud-hidden) .eft-side-panel {
  width: 236px !important;
  max-height: 360px !important;
  padding: 12px !important;
}

body.eft-hud-size-large.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-large.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
body.eft-hud-size-large.is-games-page:not(.eft-hud-hidden) .eft-side-panel {
  width: 268px !important;
  max-height: 430px !important;
  padding: 14px !important;
}

@media (max-width: 960px) {
  body.eft-hud-size-small.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-small.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-small.is-games-page:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-normal.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-normal.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-normal.is-games-page:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-large.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-large.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-large.is-games-page:not(.eft-hud-hidden) .eft-side-panel {
    width: 100% !important;
    transform: none !important;
  }

  body.eft-hud-size-small.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-small.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-small.is-games-page:not(.eft-hud-hidden) .eft-side-panel {
    max-height: 180px !important;
    padding: 10px !important;
  }

  body.eft-hud-size-normal.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-normal.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-normal.is-games-page:not(.eft-hud-hidden) .eft-side-panel {
    max-height: 220px !important;
    padding: 12px !important;
  }

  body.eft-hud-size-large.is-homepage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-large.is-subpage:not(.eft-hud-hidden) .eft-side-panel,
  body.eft-hud-size-large.is-games-page:not(.eft-hud-hidden) .eft-side-panel {
    max-height: 300px !important;
    padding: 14px !important;
  }
}

/* V0.6.41 readability and edge snap: larger navbar/music text plus snapped mini player. */
.top-navbar .nav-brand {
  font-size: calc(14px * var(--settings-font-scale, 1)) !important;
  line-height: 1.35 !important;
}

.top-navbar .nav-link,
.top-navbar .nav-icon,
.top-navbar .settings-launcher {
  font-size: calc(10px * var(--settings-font-scale, 1)) !important;
  line-height: 1.65 !important;
}

.global-music-player {
  transition:
    left 0.2s ease,
    top 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease !important;
}

.global-music-player.dragging {
  transition: none !important;
  transform: none !important;
  opacity: 1 !important;
  will-change: left, top;
}

.global-music-player.edge-snapped {
  transform: scale(0.86);
  opacity: 0.82;
  box-shadow:
    0 0 18px rgba(0, 240, 255, 0.1),
    inset 0 0 14px rgba(255, 255, 255, 0.025) !important;
}

.global-music-player.edge-snapped:hover,
.global-music-player.edge-snapped:focus-within {
  transform: scale(1);
  opacity: 1;
}

.global-music-player.edge-snapped[data-snap-edge="left"] {
  transform-origin: left center;
}

.global-music-player.edge-snapped[data-snap-edge="right"] {
  transform-origin: right center;
}

.global-music-player.edge-snapped[data-snap-edge="top"] {
  transform-origin: center top;
}

.global-music-player.edge-snapped[data-snap-edge="bottom"] {
  transform-origin: center bottom;
}

.global-music-kicker,
.global-music-time,
.global-music-settings label,
.global-music-playlist-head,
.global-music-playlist-search,
.global-music-playlist-item,
.global-music-playlist-empty {
  font-size: calc(9px * var(--settings-font-scale, 1)) !important;
  line-height: 1.7 !important;
}

.global-music-title,
.global-lyrics-title {
  font-size: calc(12px * var(--settings-font-scale, 1)) !important;
  line-height: 1.75 !important;
}

.global-music-btn,
.global-music-collapse {
  font-size: calc(12px * var(--settings-font-scale, 1)) !important;
}

.global-music-btn.primary {
  font-size: calc(14px * var(--settings-font-scale, 1)) !important;
}

.global-music-btn.shuffle,
.global-music-btn.playlist {
  font-size: calc(9px * var(--settings-font-scale, 1)) !important;
}

@media (max-width: 760px) {
  .top-navbar .nav-brand {
    font-size: calc(12px * var(--settings-font-scale, 1)) !important;
  }

  .top-navbar .nav-link,
  .top-navbar .nav-icon,
  .top-navbar .settings-launcher {
    font-size: calc(9.5px * var(--settings-font-scale, 1)) !important;
  }
}

/* V0.6.44 customizable background image: fixed cover image with a readability overlay. */
body.site-background-enabled {
  background:
    linear-gradient(
      rgba(3, 5, 10, var(--site-background-overlay, 0.76)),
      rgba(3, 5, 10, var(--site-background-overlay, 0.76))
    ),
    radial-gradient(circle at 15% 8%, var(--bg-glow-a), transparent 34%),
    radial-gradient(circle at 82% 12%, var(--bg-glow-b), transparent 36%),
    var(--site-background-image) center center / cover fixed no-repeat,
    var(--bg) !important;
}

.settings-text-input {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px !important;
  border: 1px solid color-mix(in srgb, var(--ui-cyan, #00f0ff) 24%, transparent) !important;
  border-radius: 8px !important;
  outline: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.32) !important;
  color: var(--ui-text, var(--text)) !important;
  font-size: var(--pixel-font-sm) !important;
  line-height: 1.7 !important;
}

.settings-text-input:focus {
  border-color: var(--ui-yellow, var(--yellow)) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ui-yellow, #fcee09) 16%, transparent);
}

.theme-world-widget {
  position: fixed;
  right: 18px;
  bottom: 156px;
  z-index: 9400;
  width: min(292px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
  backdrop-filter: blur(14px);
}
.theme-world-kicker { color: var(--muted); font-size: 9px; letter-spacing: 1px; }
.theme-world-title { margin-top: 8px; color: var(--yellow); font-size: 12px; line-height: 1.6; }
.theme-world-description { margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.theme-world-stage { position: relative; min-height: 92px; margin-top: 10px; overflow: hidden; border: 1px solid var(--border); background: rgba(0,0,0,.16); }
.theme-world-status { margin-top: 9px; color: var(--cyan); font-size: 9px; line-height: 1.6; }
.theme-spell-target {
  position: absolute; width: 32px; height: 32px; border: 1px solid rgba(255,229,168,.84); border-radius: 50%;
  background: rgba(255,143,200,.28); color: #fff1cb; cursor: pointer; animation: themeSpellFloat 1.6s ease-in-out infinite alternate;
}
.theme-spell-target.is-hit { transform: scale(1.8); opacity: 0; }
.theme-route-card {
  width: 100%; min-height: 92px; padding: 12px; border: 0; background: rgba(78,54,32,.22); color: var(--text);
  cursor: pointer; font: inherit; font-size: 11px; line-height: 1.8; text-align: left;
}
.theme-route-card.is-checked { animation: themeDossierStamp .34s ease; }
.theme-heart-line { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; }
.theme-heart-line i { width: 8px; height: 8px; border-radius: 50%; background: #168b8d; transition: transform .16s ease, background .16s ease; }
.theme-heart-button { width: 100%; padding: 8px; border: 1px solid rgba(22,139,141,.36); background: rgba(255,255,255,.5); color: #126f71; cursor: pointer; }
.theme-world-clinic.is-beating .theme-heart-line i { transform: scale(1.8); background: #e1594d; }
@keyframes themeSpellFloat { to { transform: translateY(-10px) scale(1.08); } }
@keyframes themeDossierStamp { 50% { background: rgba(212,88,66,.3); transform: scale(.98); } }
@media (max-width: 760px) {
  .theme-world-widget { right: 10px; bottom: 132px; width: min(250px, calc(100vw - 20px)); }
  body[data-home-layout="shrine"] .home-menu-panel .grid,
  body[data-home-layout="dossier"] .home-menu-panel .grid,
  body[data-home-layout="clinic"] .home-menu-panel .grid { grid-template-columns: minmax(0, 1fr) !important; grid-auto-flow: row !important; }
  body[data-home-layout="shrine"] .home-menu-panel .card,
  body[data-home-layout="dossier"] .home-menu-panel .card,
  body[data-home-layout="clinic"] .home-menu-panel .card { grid-column: auto !important; grid-row: auto !important; min-width: 0; min-height: 0; }
}
