:root {
  --city-void: #03050b;
  --city-ink: #effcff;
  --city-soft: #9eb6c4;
  --city-cyan: #65efff;
  --city-violet: #b057ff;
  --city-magenta: #f45ad3;
  --city-gold: #e4b963;
  --city-green: #65e2a5;
  --city-red: #ff6c7e;
  --city-panel: rgba(4, 9, 18, 0.9);
  --city-panel-strong: rgba(3, 8, 16, 0.96);
  --city-line: rgba(101, 239, 255, 0.22);
  --city-line-strong: rgba(101, 239, 255, 0.48);
  --city-serif: "Cinzel", "Trajan Pro", Georgia, serif;
  --city-sans: "Segoe UI", Inter, system-ui, sans-serif;
}

body.lilith-city-reborn {
  margin: 0;
  min-height: 100vh;
  color: var(--city-ink);
  background:
    radial-gradient(circle at 50% -15%, rgba(116, 47, 161, 0.25), transparent 46%),
    linear-gradient(180deg, #03050b, #08040d 72%, #020306);
  font-family: var(--city-sans);
}

body.lilith-city-reborn * {
  box-sizing: border-box;
}

body.lilith-city-reborn button,
body.lilith-city-reborn a {
  font: inherit;
}

/* Village principal : la ville réelle devient le support, les bâtiments ne sont
   plus représentés par des pictogrammes flottants. */
body.lilith-city-reborn .vg-app {
  background:
    linear-gradient(180deg, rgba(1, 4, 10, 0.4), rgba(1, 4, 10, 0.94) 78%),
    url("/assets/belzelith-city-map-20260725.webp") center top / cover fixed no-repeat,
    #02040b;
}

body.lilith-city-reborn .city-map-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #02040b;
  scrollbar-color: rgba(101, 239, 255, 0.6) rgba(2, 8, 18, 0.9);
}

body.lilith-city-reborn .vg-village {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  padding: 0;
  background:
    linear-gradient(145deg, rgba(1, 7, 17, 0.04), rgba(18, 3, 28, 0.16)),
    url("/assets/belzelith-city-map-20260725.webp") center center / cover no-repeat;
}

body.lilith-city-reborn .vg-village::after {
  content: "NEXUS DISTRICT 01 · MONDE 01";
}

body.lilith-city-reborn .vg-grid {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: block;
  pointer-events: none;
}

body.lilith-city-reborn .city-command {
  z-index: 45;
}

body.lilith-city-reborn .building-zone,
body.lilith-city-reborn .building-zone[data-k] {
  --node: var(--city-cyan);
  --zone-shape: polygon(10% 8%, 88% 0, 100% 70%, 82% 100%, 14% 94%, 0 48%);
  position: absolute;
  left: var(--zone-x);
  top: var(--zone-y);
  z-index: 10;
  width: var(--zone-w);
  height: var(--zone-h);
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: var(--city-ink);
  background: transparent;
  box-shadow: none;
  clip-path: var(--zone-shape);
  transform: none;
  filter: none;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  transition: filter 160ms ease;
}

body.lilith-city-reborn .building-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 20%, color-mix(in srgb, var(--node) 18%, transparent)),
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--node) 8%, transparent), transparent);
  opacity: 0;
  transition: opacity 160ms ease;
}

body.lilith-city-reborn .building-zone::after {
  display: none;
}

body.lilith-city-reborn .building-zone:hover,
body.lilith-city-reborn .building-zone:focus-visible,
body.lilith-city-reborn .building-zone[aria-pressed="true"] {
  z-index: 30;
  transform: none;
  filter:
    drop-shadow(0 0 8px color-mix(in srgb, var(--node) 68%, transparent))
    brightness(1.16);
}

body.lilith-city-reborn .building-zone:hover::before,
body.lilith-city-reborn .building-zone:focus-visible::before,
body.lilith-city-reborn .building-zone[aria-pressed="true"]::before {
  opacity: 1;
}

body.lilith-city-reborn .building-zone:focus-visible {
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--node) 72%, white);
}

body.lilith-city-reborn .building-zone.locked {
  opacity: 0.64;
  filter: saturate(0.55);
}

body.lilith-city-reborn .building-zone .bn,
body.lilith-city-reborn .building-zone .bl,
body.lilith-city-reborn .building-zone .bw,
body.lilith-city-reborn .building-zone .bqn {
  position: absolute;
  z-index: 2;
  left: 50%;
  display: block;
  width: max-content;
  max-width: 88%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #f4fdff;
  background: transparent;
  box-shadow: none;
  line-height: 1.08;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 2px 3px #000,
    0 0 4px #000,
    0 0 9px var(--node);
  transform: translateX(-50%);
  backdrop-filter: none;
  pointer-events: none;
}

body.lilith-city-reborn .building-zone .bn {
  bottom: 18%;
  font-size: clamp(8px, 0.68vw, 11px);
  font-weight: 900;
  letter-spacing: 0.08em;
}

body.lilith-city-reborn .building-zone .bl {
  bottom: 10%;
  color: #ffe3a0;
  font: 800 clamp(7px, 0.58vw, 9px) / 1 var(--city-sans);
  letter-spacing: 0.06em;
}

body.lilith-city-reborn .building-zone .bw,
body.lilith-city-reborn .building-zone .bqn {
  top: 10%;
  color: #c8fbff;
  font-size: clamp(7px, 0.55vw, 9px);
  letter-spacing: 0.04em;
}

body.lilith-city-reborn .building-zone .bw {
  left: 9%;
  transform: none;
  text-align: left;
}

body.lilith-city-reborn .building-zone .bqn {
  left: auto;
  right: 8%;
  transform: none;
  text-align: right;
}

body.lilith-city-reborn .building-zone .bprog {
  position: absolute;
  z-index: 3;
  left: 18%;
  right: 18%;
  bottom: 5%;
  height: 3px;
  overflow: hidden;
  display: none;
  border-radius: 0;
  background: rgba(1, 8, 18, 0.78);
}

body.lilith-city-reborn .building-zone.building .bprog {
  display: block;
}

body.lilith-city-reborn .building-zone .bprog i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--node);
  box-shadow: 0 0 9px var(--node);
}

body.lilith-city-reborn .building-zone[data-k="main"],
body.lilith-city-reborn .building-zone[data-k="house"],
body.lilith-city-reborn .building-zone[data-k="store"] { --node: var(--city-gold); }
body.lilith-city-reborn .building-zone[data-k="wood"],
body.lilith-city-reborn .building-zone[data-k="clay"],
body.lilith-city-reborn .building-zone[data-k="iron"],
body.lilith-city-reborn .building-zone[data-k="farm"] { --node: var(--city-cyan); }
body.lilith-city-reborn .building-zone[data-k="sanct"],
body.lilith-city-reborn .building-zone[data-k="academy"] { --node: var(--city-magenta); }
body.lilith-city-reborn .building-zone[data-k="market"] { --node: var(--city-violet); }
body.lilith-city-reborn .building-zone[data-k="barracks"],
body.lilith-city-reborn .building-zone[data-k="stable"],
body.lilith-city-reborn .building-zone[data-k="wall"] { --node: var(--city-red); }

body.lilith-city-reborn .building-zone[data-k="main"] {
  --zone-x: 7%; --zone-y: 1%; --zone-w: 34%; --zone-h: 36%;
  --zone-shape: polygon(8% 12%, 32% 0, 75% 0, 100% 54%, 81% 100%, 22% 92%, 0 48%);
}
body.lilith-city-reborn .building-zone[data-k="house"] {
  --zone-x: 41%; --zone-y: 8%; --zone-w: 20%; --zone-h: 22%;
  --zone-shape: polygon(4% 20%, 28% 4%, 88% 0, 100% 80%, 68% 100%, 6% 86%);
}
body.lilith-city-reborn .building-zone[data-k="wood"] {
  --zone-x: 0%; --zone-y: 28%; --zone-w: 20%; --zone-h: 28%;
  --zone-shape: polygon(0 10%, 76% 0, 100% 72%, 74% 100%, 0 88%);
}
body.lilith-city-reborn .building-zone[data-k="clay"] {
  --zone-x: 18%; --zone-y: 27%; --zone-w: 23%; --zone-h: 31%;
  --zone-shape: polygon(14% 0, 92% 6%, 100% 72%, 72% 100%, 0 88%, 3% 24%);
}
body.lilith-city-reborn .building-zone[data-k="iron"] {
  --zone-x: 61%; --zone-y: 28%; --zone-w: 22%; --zone-h: 31%;
  --zone-shape: polygon(12% 3%, 83% 0, 100% 76%, 68% 100%, 0 88%, 4% 24%);
}
body.lilith-city-reborn .building-zone[data-k="farm"] {
  --zone-x: 27%; --zone-y: 69%; --zone-w: 23%; --zone-h: 31%;
  --zone-shape: polygon(8% 0, 92% 6%, 100% 100%, 0 100%, 0 18%);
}
body.lilith-city-reborn .building-zone[data-k="sanct"] {
  --zone-x: 53%; --zone-y: 1%; --zone-w: 24%; --zone-h: 40%;
  --zone-shape: polygon(40% 0, 64% 0, 95% 42%, 100% 82%, 70% 100%, 16% 92%, 0 48%);
}
body.lilith-city-reborn .building-zone[data-k="store"] {
  --zone-x: 39%; --zone-y: 58%; --zone-w: 19%; --zone-h: 25%;
  --zone-shape: polygon(4% 10%, 94% 0, 100% 78%, 72% 100%, 0 91%);
}
body.lilith-city-reborn .building-zone[data-k="market"] {
  --zone-x: 35%; --zone-y: 36%; --zone-w: 31%; --zone-h: 34%;
  --zone-shape: polygon(8% 5%, 91% 0, 100% 78%, 72% 100%, 0 85%, 2% 22%);
}
body.lilith-city-reborn .building-zone[data-k="barracks"] {
  --zone-x: 0%; --zone-y: 48%; --zone-w: 31%; --zone-h: 43%;
  --zone-shape: polygon(0 5%, 88% 0, 100% 66%, 75% 100%, 0 95%);
}
body.lilith-city-reborn .building-zone[data-k="stable"] {
  --zone-x: 64%; --zone-y: 59%; --zone-w: 36%; --zone-h: 41%;
  --zone-shape: polygon(4% 8%, 100% 0, 100% 100%, 0 100%, 0 24%);
}
body.lilith-city-reborn .building-zone[data-k="academy"] {
  --zone-x: 78%; --zone-y: 30%; --zone-w: 22%; --zone-h: 34%;
  --zone-shape: polygon(24% 0, 90% 8%, 100% 82%, 67% 100%, 0 86%, 4% 26%);
}
body.lilith-city-reborn .building-zone[data-k="wall"] {
  --zone-x: 40%; --zone-y: 0%; --zone-w: 15%; --zone-h: 18%;
  --zone-shape: polygon(0 0, 100% 0, 92% 87%, 8% 100%);
}

body.lilith-city-reborn .citizen.actor .actor-icon {
  position: relative;
  display: block;
  min-width: 0;
  width: 10px;
  height: 18px;
  padding: 0;
  color: transparent;
  font-size: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.lilith-city-reborn .citizen.actor.pedestrian .actor-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--actor);
  box-shadow: 0 0 8px var(--actor);
}

body.lilith-city-reborn .citizen.actor.pedestrian .actor-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 7px;
  height: 11px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #eafcff, var(--actor));
  clip-path: polygon(22% 0, 78% 0, 100% 57%, 74% 57%, 70% 100%, 52% 100%, 50% 61%, 30% 100%, 12% 100%, 26% 57%, 0 57%);
  filter: drop-shadow(0 0 5px var(--actor));
}

body.lilith-city-reborn .citizen.actor.drone .actor-icon {
  width: 31px;
  height: 10px;
  border-radius: 8px 8px 3px 3px;
  border: 1px solid color-mix(in srgb, var(--actor) 70%, white);
  background:
    radial-gradient(circle at 50% 50%, #f9ffff 0 12%, transparent 14%),
    linear-gradient(90deg, transparent 0 8%, var(--actor) 10% 24%, #07111d 26% 74%, var(--actor) 76% 90%, transparent 92%);
  box-shadow: 0 0 13px color-mix(in srgb, var(--actor) 65%, transparent);
}

body.lilith-city-reborn .citizen.actor.vehicle .actor-icon {
  width: 36px;
  height: 14px;
  min-width: 36px;
  border: 1px solid color-mix(in srgb, var(--actor) 65%, white);
  border-radius: 8px 11px 4px 4px;
  background:
    radial-gradient(circle at 19% 100%, #02040a 0 13%, transparent 15%),
    radial-gradient(circle at 80% 100%, #02040a 0 13%, transparent 15%),
    linear-gradient(135deg, color-mix(in srgb, var(--actor) 60%, #0a1020), #050812 68%);
  box-shadow:
    -7px 2px 8px color-mix(in srgb, var(--actor) 48%, transparent),
    0 0 11px rgba(0, 0, 0, 0.7);
}

body.lilith-city-reborn .citizen.actor small {
  display: none;
}

/* Page du clan / cité BELZELITH */
.clan-city-shell {
  width: min(1540px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 70px;
}

.clan-command {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--city-line);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(2, 8, 18, 0.96), rgba(17, 5, 25, 0.93), rgba(2, 8, 18, 0.96));
  box-shadow: 0 24px 70px -45px var(--city-cyan);
  backdrop-filter: blur(18px);
}

.clan-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.clan-sigil {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  transform: rotate(45deg);
  border: 1px solid var(--city-cyan);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(101, 239, 255, 0.16), rgba(176, 87, 255, 0.3));
  box-shadow: 0 0 23px rgba(101, 239, 255, 0.2);
}

.clan-sigil::before,
.clan-sigil::after {
  content: "";
  position: absolute;
  background: linear-gradient(180deg, #f9f0d1, var(--city-gold));
}

.clan-sigil::before {
  inset: 9px 18px 9px 18px;
}

.clan-sigil::after {
  inset: 18px 9px 18px 9px;
}

.clan-brand h1 {
  margin: 0;
  font: 700 clamp(20px, 3vw, 31px) / 1 var(--city-serif);
  letter-spacing: 0.16em;
  color: #fff4d0;
}

.clan-brand p {
  margin: 5px 0 0;
  color: var(--city-soft);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.clan-command-stats {
  display: flex;
  gap: 8px;
}

.command-stat {
  min-width: 92px;
  padding: 8px 11px;
  border: 1px solid rgba(101, 239, 255, 0.15);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}

.command-stat span {
  display: block;
  color: var(--city-soft);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.command-stat strong {
  display: block;
  margin-top: 3px;
  color: #fff2c2;
  font: 700 17px / 1.1 var(--city-serif);
}

.clan-return {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(228, 185, 99, 0.38);
  border-radius: 9px;
  color: #ffe6a4;
  background: rgba(38, 26, 7, 0.58);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.clan-scene-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: #02040b;
  scrollbar-color: rgba(101, 239, 255, 0.6) rgba(2, 8, 18, 0.9);
}

.clan-scene {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--city-line-strong);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(2, 5, 13, 0.02), rgba(2, 5, 13, 0.16) 48%, rgba(2, 5, 13, 0.82)),
    url("/assets/belzelith-city-map-20260725.webp") center center / cover no-repeat;
  box-shadow:
    0 0 0 1px rgba(244, 90, 211, 0.1),
    0 40px 110px -65px var(--city-cyan),
    inset 0 0 100px rgba(1, 2, 8, 0.28);
}

.clan-scene::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(1, 4, 11, 0.54), transparent 21%, transparent 76%, rgba(1, 4, 11, 0.34)),
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(101, 239, 255, 0.025) 5px);
}

.scene-status {
  position: absolute;
  z-index: 12;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: none;
}

.scene-status span {
  padding: 7px 10px;
  border: 1px solid rgba(101, 239, 255, 0.32);
  border-radius: 7px;
  color: #bafaff;
  background: rgba(1, 10, 21, 0.82);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.scene-status .secure {
  border-color: rgba(101, 226, 165, 0.38);
  color: #a8ffd3;
}

.scene-status .pending {
  border-color: rgba(228, 185, 99, 0.4);
  color: #ffe3a0;
}

.scene-status .insecure,
.scene-status .error {
  border-color: rgba(255, 108, 126, 0.44);
  color: #ffc0c8;
}

.district-zone {
  --district: var(--city-cyan);
  position: absolute;
  z-index: 14;
  display: block;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: #effeff;
  background: transparent;
  box-shadow: none;
  clip-path: var(--zone-shape);
  cursor: pointer;
  touch-action: manipulation;
  transition: filter 150ms ease, background 150ms ease;
}

.district-zone span,
.district-zone small {
  position: absolute;
  z-index: 2;
  left: 50%;
  display: block;
  width: max-content;
  max-width: 84%;
  padding: 0;
  border: 0;
  color: #f5feff;
  background: transparent;
  text-align: center;
  text-shadow: 0 2px 4px #000, 0 0 9px var(--district);
  transform: translateX(-50%);
  pointer-events: none;
}

.district-zone span {
  bottom: 17%;
  font-size: clamp(9px, 0.72vw, 12px);
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.district-zone small {
  bottom: 10%;
  color: #d7f9ff;
  font-size: clamp(7px, 0.56vw, 9px);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 150ms ease;
}

.district-zone:hover,
.district-zone:focus-visible,
.district-zone.active {
  z-index: 20;
  background:
    linear-gradient(180deg, transparent 18%, color-mix(in srgb, var(--district) 17%, transparent));
  filter:
    drop-shadow(0 0 10px color-mix(in srgb, var(--district) 72%, transparent))
    brightness(1.14);
  outline: none;
}

.district-zone:hover small,
.district-zone:focus-visible small,
.district-zone.active small {
  opacity: 1;
}

.district-zone:focus-visible {
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--district) 75%, white);
}

.district-zone.fortress {
  --district: var(--city-gold);
  --zone-shape: polygon(8% 12%, 32% 0, 75% 0, 100% 54%, 81% 100%, 22% 92%, 0 48%);
  left: 7%; top: 1%; width: 34%; height: 36%;
}
.district-zone.energy {
  --district: var(--city-magenta);
  --zone-shape: polygon(40% 0, 64% 0, 95% 42%, 100% 82%, 70% 100%, 16% 92%, 0 48%);
  left: 53%; top: 1%; width: 24%; height: 40%;
}
.district-zone.training {
  --district: var(--city-red);
  --zone-shape: polygon(0 5%, 88% 0, 100% 66%, 75% 100%, 0 95%);
  left: 0; top: 48%; width: 31%; height: 43%;
}
.district-zone.market {
  --district: var(--city-violet);
  --zone-shape: polygon(8% 5%, 91% 0, 100% 78%, 72% 100%, 0 85%, 2% 22%);
  left: 35%; top: 36%; width: 31%; height: 34%;
}
.district-zone.transit {
  --district: var(--city-cyan);
  --zone-shape: polygon(4% 8%, 100% 0, 100% 100%, 0 100%, 0 24%);
  left: 64%; top: 59%; width: 36%; height: 41%;
}

.air-lane,
.street-lane {
  position: absolute;
  z-index: 7;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.air-lane i {
  position: absolute;
  left: -60px;
  top: var(--y);
  width: 31px;
  height: 9px;
  border: 1px solid rgba(101, 239, 255, 0.74);
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(90deg, transparent, #65efff 20%, #06101c 42% 68%, #b057ff);
  box-shadow: -18px 2px 16px rgba(101, 239, 255, 0.45);
  animation: clanAirTraffic var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.street-lane i {
  position: absolute;
  left: -70px;
  bottom: var(--bottom);
  width: 46px;
  height: 15px;
  border: 1px solid rgba(244, 90, 211, 0.66);
  border-radius: 10px 13px 4px 4px;
  background:
    radial-gradient(circle at 18% 100%, #02040a 0 13%, transparent 15%),
    radial-gradient(circle at 81% 100%, #02040a 0 13%, transparent 15%),
    linear-gradient(135deg, #912778, #060912 65%);
  box-shadow: -20px 4px 19px rgba(244, 90, 211, 0.38);
  animation: clanStreetTraffic var(--duration) linear infinite;
  animation-delay: var(--delay);
}

@keyframes clanAirTraffic {
  to { translate: calc(100vw + 120px) -80px; }
}

@keyframes clanStreetTraffic {
  to { translate: calc(100vw + 140px) 28px; }
}

.scene-readout {
  position: absolute;
  z-index: 15;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  pointer-events: none;
}

.scene-readout-copy {
  max-width: 640px;
  padding: 16px 18px;
  border: 1px solid rgba(101, 239, 255, 0.27);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(2, 9, 18, 0.92), rgba(23, 5, 28, 0.82));
  backdrop-filter: blur(16px);
}

.scene-readout-copy span {
  color: var(--city-cyan);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scene-readout-copy h2 {
  margin: 5px 0 4px;
  color: #fff1c2;
  font: 700 clamp(23px, 4vw, 42px) / 1 var(--city-serif);
  letter-spacing: 0.06em;
}

.scene-readout-copy p {
  margin: 0;
  color: #c2d3dd;
  line-height: 1.5;
}

.scene-readout-meta {
  padding: 12px 14px;
  border: 1px solid rgba(101, 226, 165, 0.34);
  border-radius: 10px;
  color: #b9ffda;
  background: rgba(2, 24, 19, 0.86);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

.scene-readout-meta[data-state="pending"] {
  border-color: rgba(228, 185, 99, 0.38);
  color: #ffe2a1;
  background: rgba(35, 23, 5, 0.86);
}

.scene-readout-meta[data-state="insecure"],
.scene-readout-meta[data-state="error"] {
  border-color: rgba(255, 108, 126, 0.38);
  color: #ffc0c8;
  background: rgba(34, 5, 12, 0.86);
}

.clan-operations {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 14px;
  margin-top: 14px;
}

.ops-column {
  display: grid;
  gap: 14px;
  align-content: start;
}

.ops-panel {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--city-line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(3, 13, 25, 0.94), rgba(22, 6, 30, 0.91));
  box-shadow: 0 25px 65px -50px var(--city-cyan);
}

.ops-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(transparent, var(--city-cyan), transparent);
  opacity: 0.58;
}

.ops-panel h2 {
  margin: 0 0 8px;
  color: #fff1c1;
  font: 700 20px / 1.2 var(--city-serif);
}

.ops-panel p {
  margin: 0 0 13px;
  color: var(--city-soft);
  line-height: 1.55;
}

.identity-line,
.system-message {
  margin: 9px 0;
  padding: 10px 12px;
  border: 1px solid rgba(101, 239, 255, 0.13);
  border-radius: 8px;
  color: var(--city-soft);
  background: rgba(255, 255, 255, 0.025);
}

.system-message.good {
  border-color: rgba(101, 226, 165, 0.28);
  color: #aaf9cf;
}

.system-message.bad {
  border-color: rgba(255, 108, 126, 0.3);
  color: #ffc0c8;
}

.ops-button,
.ops-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid rgba(228, 185, 99, 0.5);
  border-radius: 8px;
  color: #170e1e;
  background: linear-gradient(180deg, #ffe7a4, #d6a749);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.ops-button.secondary,
.ops-link.secondary {
  color: #bdf8ff;
  border-color: rgba(101, 239, 255, 0.3);
  background: rgba(5, 24, 36, 0.72);
}

.ops-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.progress-track {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  margin: 14px 0;
}

.progress-track .step {
  height: 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track .step.on {
  background: linear-gradient(90deg, var(--city-violet), var(--city-gold));
  box-shadow: 0 0 11px rgba(176, 87, 255, 0.35);
}

.domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
}

.domain-card {
  position: relative;
  min-height: 128px;
  padding: 15px;
  border: 1px solid rgba(101, 239, 255, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(5, 22, 33, 0.76), rgba(22, 7, 31, 0.76)),
    radial-gradient(circle at 90% 10%, rgba(101, 239, 255, 0.12), transparent 42%);
}

.domain-card.protected {
  border-color: rgba(101, 226, 165, 0.36);
}

.domain-card strong {
  display: block;
  color: #fff0bd;
  font-family: var(--city-serif);
  font-size: 17px;
}

.domain-card span {
  display: block;
  margin-top: 6px;
  color: var(--city-soft);
}

.domain-card .shield-state {
  color: #9dffca;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.domain-card .ops-link,
.domain-card .ops-button {
  width: 100%;
  margin-top: 13px;
  font-size: 12px;
}

.discord-dock {
  border-color: rgba(112, 126, 255, 0.33);
  background:
    radial-gradient(circle at 100% 0, rgba(88, 101, 242, 0.18), transparent 42%),
    linear-gradient(145deg, rgba(7, 14, 31, 0.94), rgba(18, 8, 31, 0.93));
}

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

.discord-actions .ops-link {
  min-width: 0;
  color: #eef0ff;
  border-color: rgba(132, 144, 255, 0.42);
  background: rgba(88, 101, 242, 0.62);
  text-align: center;
}

.clan-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.clan-links .ops-link {
  font-size: 12px;
}

@media (max-width: 980px) {
  .clan-command {
    grid-template-columns: 1fr auto;
  }

  .clan-command-stats {
    grid-column: 1 / -1;
    order: 3;
  }

  .command-stat {
    flex: 1;
  }

  .clan-operations {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body.lilith-city-reborn {
    background-attachment: scroll;
  }

  body.lilith-city-reborn .vg-app {
    background-attachment: scroll;
  }

  .clan-city-shell {
    width: min(100% - 12px, 1540px);
    padding-top: 6px;
  }

  .clan-command {
    position: relative;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .clan-return {
    position: static;
    order: 2;
    width: 100%;
    min-height: 35px;
    padding: 0 10px;
    font-size: 11px;
  }

  .clan-brand {
    padding-right: 0;
  }

  .clan-brand p {
    font-size: 9px;
  }

  .clan-command-stats {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .command-stat {
    min-width: 104px;
  }

  body.lilith-city-reborn .city-map-viewport,
  .clan-scene-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    border-radius: 13px;
  }

  body.lilith-city-reborn .vg-village,
  .clan-scene {
    width: 900px;
    max-width: none;
    min-height: 506px !important;
    aspect-ratio: 16 / 9;
    border-radius: 13px;
    background-position: center;
  }

  .scene-status {
    left: 9px;
    right: 9px;
    top: 9px;
  }

  .scene-status span {
    padding: 6px 8px;
    font-size: 8px;
  }

  body.lilith-city-reborn .building-zone .bn,
  .district-zone span {
    font-size: 11px;
  }

  body.lilith-city-reborn .building-zone .bl,
  .district-zone small {
    font-size: 9px;
  }

  .scene-readout {
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .scene-readout-meta {
    justify-self: start;
  }

  .ops-panel {
    padding: 16px;
  }

  .discord-actions {
    grid-template-columns: 1fr;
  }

}

body.building-dialog-open {
  overflow: hidden;
}

.building-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: clamp(12px, 3vw, 32px);
  border: 0;
  background: transparent;
  color: var(--ink, #f6f1ff);
  place-items: center;
  overflow: hidden;
}

.building-dialog[open] {
  display: grid;
}

.building-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 42%, rgba(72, 28, 118, 0.28), transparent 48%),
    rgba(2, 3, 11, 0.84);
  backdrop-filter: blur(8px);
}

.building-dialog-panel {
  width: min(820px, 100%);
  max-height: min(900px, calc(100dvh - 32px));
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(102, 224, 255, 0.38);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(8, 15, 31, 0.98), rgba(12, 7, 26, 0.99)),
    #090b17;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.72),
    0 0 42px rgba(69, 214, 255, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.building-dialog-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid rgba(125, 109, 255, 0.2);
  background: rgba(7, 12, 26, 0.96);
  backdrop-filter: blur(14px);
}

.building-dialog-kicker {
  margin: 0 0 7px;
  color: #64e8ff;
  font: 700 10px/1.2 var(--mono, monospace);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.building-dialog-head h2 {
  margin: 0;
  color: #fff;
  font: 700 clamp(24px, 4vw, 38px)/1.05 var(--serif, serif);
  letter-spacing: 0.015em;
}

.building-dialog-head p:last-child {
  margin: 9px 0 0;
  color: rgba(228, 225, 244, 0.66);
  font-size: 13px;
}

.building-dialog-close {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 18px;
  border: 1px solid rgba(102, 224, 255, 0.42);
  border-radius: 12px;
  background: rgba(55, 206, 238, 0.08);
  color: #dffaff;
  font: 700 11px/1 var(--sans, sans-serif);
  letter-spacing: 0.04em;
  cursor: pointer;
}

.building-dialog-close:hover,
.building-dialog-close:focus-visible {
  border-color: #6deaff;
  background: rgba(55, 206, 238, 0.17);
  outline: none;
  box-shadow: 0 0 0 3px rgba(55, 206, 238, 0.13);
}

.building-dialog-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 26px 0;
}

.building-dialog-meta span {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(153, 123, 255, 0.18);
  border-radius: 12px;
  background: rgba(94, 53, 154, 0.1);
}

.building-dialog-meta small,
.cost-item small {
  display: block;
  margin-bottom: 5px;
  color: rgba(220, 213, 243, 0.58);
  font: 600 9px/1.15 var(--sans, sans-serif);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.building-dialog-meta b {
  display: block;
  overflow: hidden;
  color: #f8f5ff;
  font: 700 12px/1.35 var(--sans, sans-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.building-dialog-content {
  padding: 14px 26px 26px;
}

.building-dialog-content #sel {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.building-dialog-content #sel h3 {
  display: none;
}

.building-dialog-content #sel .desc {
  max-width: 70ch;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.55;
}

.building-dialog-content .effect {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.building-dialog-content .effect-line {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid rgba(107, 223, 255, 0.14);
  border-radius: 12px;
  background: rgba(24, 47, 76, 0.22);
}

.building-dialog-content .effect-line small {
  color: rgba(220, 231, 245, 0.58);
  font-size: 10px;
}

.building-dialog-content .effect-line b {
  color: #fff;
  font-size: 14px;
}

.building-dialog-content .effect-next {
  color: #6deaff;
  font-size: 10px;
}

.building-cost-title {
  margin: 0 0 8px;
  color: rgba(240, 233, 255, 0.82);
  font: 700 11px/1.2 var(--sans, sans-serif);
}

.building-dialog-content .cost {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.building-dialog-content .cost-item {
  display: block;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(232, 182, 76, 0.16);
  border-radius: 10px;
  background: rgba(232, 182, 76, 0.055);
}

.building-dialog-content .cost-item b {
  color: #f4dd9b;
  font: 700 13px/1.2 var(--mono, monospace);
}

.building-dialog-content .cost-item b.no {
  color: #ff7a8b;
}

.building-dialog-content .up {
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  text-decoration: none;
}

.building-action-reason {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
}

.building-action-reason.ready {
  color: #68e6bc;
}

.building-action-reason.blocked {
  color: rgba(255, 187, 198, 0.78);
}

.building-subsection {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid rgba(153, 123, 255, 0.18);
  border-radius: 13px;
  background: rgba(84, 44, 137, 0.08);
}

.building-subsection .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #f2eaff;
  font: 700 12px/1.3 var(--sans, sans-serif);
}

.building-subsection .section-title b {
  color: #6deaff;
}

.building-subsection .section-title span {
  margin-left: auto;
  color: rgba(220, 213, 243, 0.58);
  font-size: 10px;
  font-weight: 500;
}

.building-dialog-content .jctl button,
.building-dialog-content .urow .ub button,
.building-dialog-content .sbtn {
  min-width: 44px;
  min-height: 44px;
}

.building-dialog-content .urow {
  min-height: 58px;
  padding: 8px 0;
  border-top: 1px solid rgba(153, 123, 255, 0.1);
}

@media (max-width: 680px) {
  .building-dialog {
    padding: 0;
    place-items: stretch;
  }

  .building-dialog-panel {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border-width: 0;
    border-radius: 0;
  }

  .building-dialog-head {
    gap: 12px;
    padding: 16px 14px 14px;
  }

  .building-dialog-head h2 {
    font-size: 24px;
  }

  .building-dialog-head p:last-child {
    display: none;
  }

  .building-dialog-close {
    min-width: 118px;
    padding: 0 12px;
  }

  .building-dialog-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 12px 0;
  }

  .building-dialog-content {
    padding: 12px 12px 28px;
  }

  .building-dialog-content .effect {
    grid-template-columns: 1fr;
  }

  .building-dialog-content .cost {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (prefers-reduced-motion: reduce) {
  .air-lane,
  .street-lane {
    display: none;
  }

  .district-zone,
  body.lilith-city-reborn .building-zone {
    transition: none;
  }
}
