.ai-town-shell {
  position: relative;
  z-index: 10;
  min-height: calc(100vh - 96px);
  background: #02040a;
  color: #fff;
  overflow: hidden;
}
.ai-town-top {
  min-height: 112px;
  padding: 22px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #00f0ff2e;
  background: linear-gradient(90deg, #040711, #0d0716 52%, #040b14);
  box-shadow: 0 14px 60px #000;
}
.ai-town-top p {
  font: 700 8px monospace;
  letter-spacing: 0.28em;
  color: #a78bfa;
}
.ai-town-top h1 {
  margin-top: 4px;
  font: 900 clamp(28px, 4vw, 48px)/0.95 Arial;
  letter-spacing: -0.04em;
}
.ai-town-top h1 span {
  color: #00eaff;
  text-shadow: 0 0 30px #00eaff40;
}
.ai-town-top small {
  display: block;
  margin-top: 7px;
  font: 7px monospace;
  letter-spacing: 0.18em;
  color: #46546a;
}
.ai-town-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-town-actions > div {
  min-width: 160px;
  padding: 10px 13px;
  border: 1px solid #ffffff17;
  font: 8px monospace;
  color: #76859a;
}
.ai-town-actions > div i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #f59e0b;
}
.ai-town-actions > div i.live {
  background: #34d399;
  box-shadow: 0 0 12px #34d399;
}
.ai-town-actions > div small {
  margin-left: 13px;
  color: #3c485a;
}
.ai-town-actions button {
  padding: 12px 16px;
  border: 1px solid #00f0ff73;
  font: 800 8px monospace;
  letter-spacing: 0.12em;
  color: #67e8f9;
  background: #02060c;
}
.ai-town-actions button:hover {
  background: #00eaff;
  color: #020407;
}
.ai-town-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 760px;
}
.ai-town-world {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 18%, #ff00771f, transparent 22%),
    radial-gradient(circle at 20% 30%, #00ebff1a, transparent 25%),
    linear-gradient(#030817 0 27%, #07111c 27%);
  isolation: isolate;
}
.ai-town-world.three-active {
  min-height: 720px;
  background: #02050d;
}
.ai-town-world.three-active > .ai-skyline,
.ai-town-world.three-active > .ai-rain,
.ai-town-world.three-active > .ai-road,
.ai-town-world.three-active > .ai-building,
.ai-town-world.three-active > .ai-relay,
.ai-town-world.three-active > .ai-entity {
  display: none;
}
.veyra-3d-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  background: #02050d;
}
.veyra-webgl {
  display: block;
  width: 100%;
  height: 100%;
}
.veyra-3d-start {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: grid;
  gap: 5px;
  min-width: min(430px, calc(100% - 32px));
  border: 1px solid #00f0ff8f;
  padding: 13px 18px;
  color: #00f0ff;
  background: #02050de8;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 35px #00f0ff1c;
}
.veyra-3d-start b {
  font: 800 10px monospace;
  letter-spacing: 0.18em;
}
.veyra-3d-start span {
  color: #8190a8;
  font: 7px monospace;
}
.veyra-3d-stage.is-locked .veyra-3d-start {
  opacity: 0;
}
.veyra-crosshair {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #00f0ff;
  font: 16px monospace;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 10px #00f0ff;
}
.veyra-3d-stage.is-locked .veyra-crosshair {
  opacity: 0.8;
}
.veyra-district-hud {
  position: absolute;
  z-index: 6;
  left: 16px;
  top: 16px;
  display: grid;
  gap: 3px;
  min-width: 210px;
  border-left: 2px solid #00f0ff;
  padding: 10px 13px;
  background: linear-gradient(90deg, #02050ded, #02050d66);
  pointer-events: none;
}
.veyra-district-hud small {
  color: #65748b;
  font: 7px monospace;
  letter-spacing: 0.16em;
}
.veyra-district-hud b {
  color: white;
  font: 900 13px monospace;
}
.veyra-district-hud span {
  color: #00f0ff;
  font: 6px monospace;
}
.ai-town-world.three-active > .ai-interact {
  z-index: 8;
}
.ai-town-world:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: linear-gradient(#ffffff05 1px, transparent 1px);
  background-size: 100% 4px;
}
.ai-skyline {
  position: absolute;
  z-index: -2;
  inset: 0 0 42%;
  display: flex;
  align-items: flex-end;
  gap: 2%;
  opacity: 0.8;
}
.ai-skyline i {
  flex: 1;
  height: 65%;
  border: 1px solid #00f0ff1f;
  background:
    repeating-linear-gradient(90deg, transparent 0 13px, #00f0ff14 14px 15px),
    linear-gradient(#07101d, #040913);
  clip-path: polygon(
    10% 100%,
    10% 28%,
    35% 28%,
    35% 9%,
    58% 9%,
    58% 0,
    73% 0,
    73% 35%,
    92% 35%,
    92% 100%
  );
}
.ai-skyline i:nth-child(2) {
  height: 100%;
}
.ai-skyline i:nth-child(3) {
  height: 76%;
}
.ai-skyline i:nth-child(4) {
  height: 91%;
}
.ai-skyline i:nth-child(5) {
  height: 58%;
}
.ai-rain {
  position: absolute;
  z-index: 35;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background: repeating-linear-gradient(
    105deg,
    transparent 0 31px,
    #a0e6ff80 32px,
    transparent 33px 68px
  );
  animation: aiRain 1.2s linear infinite;
}
.ai-road {
  position: absolute;
  z-index: -1;
  background: #080c14;
  border: 1px solid #00f0ff0f;
  box-shadow: inset 0 0 50px #000;
}
.road-a {
  left: -5%;
  right: -5%;
  height: 19%;
  top: 53%;
  transform: rotate(-6deg);
}
.road-b {
  width: 17%;
  top: 26%;
  bottom: -5%;
  left: 53%;
  transform: rotate(4deg);
}
.ai-building {
  position: absolute;
  z-index: 3;
  width: 18%;
  min-width: 125px;
  height: 15%;
  padding: 13px;
  border: 1px solid #00f0ff2e;
  background: linear-gradient(145deg, #060f1af5, #0e0714fa);
  box-shadow:
    0 18px 35px #0009,
    inset 0 0 25px #00f0ff09;
  text-align: left;
}
.ai-building:before {
  content: "";
  position: absolute;
  inset: 7px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 16px,
    #00f0ff12 17px 18px
  );
}
.ai-building b,
.ai-building span {
  position: relative;
  z-index: 2;
  display: block;
  font-family: monospace;
}
.ai-building b {
  font-size: 9px;
  letter-spacing: 0.13em;
  color: #d9faff;
}
.ai-building span {
  margin-top: 7px;
  font-size: 6px;
  color: #53657c;
}
.ai-building.broadcast {
  border-color: #a855f74d;
  height: 18%;
}
.ai-building.market {
  border-color: #f59e0b47;
}
button.ai-building {
  cursor: pointer;
}
.ai-relay {
  position: absolute;
  z-index: 8;
  color: #334155;
  text-align: center;
}
.ai-relay b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid;
  background: #03060a;
  font-size: 17px;
}
.ai-relay span {
  display: block;
  margin-top: 4px;
  font: 6px monospace;
}
.ai-relay.active {
  color: #ff4ca0;
  filter: drop-shadow(0 0 9px #ff0077cc);
  animation: aiPulse 1s infinite alternate;
}
.ai-entity {
  position: absolute;
  z-index: 20;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  color: #fff;
  text-align: center;
}
.ai-entity > i {
  display: grid;
  place-items: center;
  width: 29px;
  height: 38px;
  margin: auto;
  border: 1px solid #00ddeb;
  background: linear-gradient(#071927, #03060a);
  font: 900 11px monospace;
  clip-path: polygon(
    30% 0,
    70% 0,
    87% 24%,
    82% 67%,
    100% 100%,
    0 100%,
    18% 67%,
    13% 24%
  );
  filter: drop-shadow(0 5px 5px #000);
}
.ai-entity > span {
  display: block;
  margin-top: 4px;
  padding: 2px 5px;
  background: #000c;
  font: 700 6px monospace;
  white-space: nowrap;
  color: #cbd5e1;
}
.ai-entity small {
  display: block;
  font-size: 5px;
  color: #64748b;
}
.ai-entity.npc.violet > i {
  border-color: #a78bfa;
  color: #c4b5fd;
}
.ai-entity.npc.amber > i {
  border-color: #f59e0b;
  color: #fbbf24;
}
.ai-entity.npc.red > i {
  border-color: #ff3b76;
  color: #fb7185;
}
.ai-entity.npc.silver > i {
  border-color: #e2e8f0;
}
.ai-entity.npc.near > i {
  box-shadow: 0 0 22px #00f0ff8c;
  transform: scale(1.08);
}
.ai-entity.player {
  z-index: 25;
}
.ai-entity.player > i {
  width: 34px;
  height: 44px;
  border-color: var(--player-accent, #fff);
  color: var(--player-accent, #fff);
  background: linear-gradient(
    145deg,
    #ff0077,
    #091425 52%,
    var(--player-accent, #00ddeb)
  );
  box-shadow: 0 0 22px
    color-mix(in srgb, var(--player-accent, #00f0ff) 45%, transparent);
}
.ai-entity.remote > i {
  border-color: #34d399;
  color: #6ee7b7;
}
.ai-interact {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 11px 16px;
  border: 1px solid #00eaff;
  background: #02050af0;
  font: 800 8px monospace;
  letter-spacing: 0.12em;
  color: #67e8f9;
}
.ai-town-side {
  position: relative;
  z-index: 45;
  padding: 16px;
  border-left: 1px solid #00f0ff21;
  background: #050710;
  box-shadow: -20px 0 60px #0008;
}
.ai-id-card {
  display: flex;
  gap: 11px;
  padding: 11px;
  border: 1px solid #00f0ff2e;
  background: #080b14;
}
.ai-id-card img {
  width: 46px;
  height: 56px;
  object-fit: cover;
  border: 1px solid #00f0ff4d;
}
.ai-id-card div {
  display: flex;
  flex-direction: column;
}
.ai-id-card small,
.ai-mission small,
.ai-controls small,
.ai-chat > small {
  font: 7px monospace;
  letter-spacing: 0.13em;
  color: #58677d;
}
.ai-id-card b {
  margin-top: 5px;
  font: 800 10px monospace;
  color: #67e8f9;
}
.ai-id-card span {
  margin-top: 5px;
  font: 7px monospace;
  color: #94a3b8;
}
.ai-identity-toggle {
  width: 100%;
  margin-top: -1px;
  border: 1px solid #00f0ff3d;
  background: #00f0ff0a;
  padding: 11px 12px;
  color: #00f0ff;
  font:
    700 9px/1.2 "Share Tech Mono",
    monospace;
  letter-spacing: 0.12em;
  text-align: left;
}
.ai-mission {
  margin-top: 12px;
  padding: 15px;
  border: 1px solid #a78bfa3d;
  background: linear-gradient(145deg, #8b5cf60f, #070810);
}
.ai-mission h3 {
  margin-top: 7px;
  font: 900 12px monospace;
}
.ai-mission p {
  margin-top: 9px;
  font-size: 10px;
  line-height: 1.6;
  color: #718096;
}
.ai-mission > div {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.ai-mission i {
  width: 34px;
  height: 3px;
  background: #1e293b;
}
.ai-mission i.done {
  background: #00eaff;
  box-shadow: 0 0 9px #00eaff;
}
.ai-controls,
.ai-chat {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #ffffff12;
}
.ai-controls p {
  margin-top: 6px;
  font: 7px monospace;
  color: #64748b;
}
.ai-chat > div {
  height: 100px;
  overflow: hidden;
  margin-top: 8px;
}
.ai-chat p {
  margin-top: 5px;
  font: 8px/1.4 monospace;
  color: #64748b;
}
.ai-chat p b {
  color: #67e8f9;
}
.ai-chat form {
  display: flex;
  margin-top: 8px;
}
.ai-chat input {
  min-width: 0;
  flex: 1;
  background: #02040a;
  border: 1px solid #1e293b;
  padding: 8px;
  font: 8px monospace;
  color: #fff;
}
.ai-chat button {
  width: 34px;
  border: 1px solid #00eaff;
  color: #67e8f9;
}
.ai-store-link {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #ff007766;
  font: 800 7px monospace;
  color: #ff66ad;
}
.ai-dialogue {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 30px;
  background: linear-gradient(transparent 35%, #000d);
}
.ai-dialogue > div {
  width: min(780px, 95%);
  padding: 23px;
  border: 1px solid #00eaff;
  background: linear-gradient(120deg, #050913, #110817);
  box-shadow: 0 0 60px #000;
}
.ai-dialogue small {
  font: 7px monospace;
  color: #a78bfa;
}
.ai-dialogue h2 {
  margin-top: 5px;
  font: 900 22px Arial;
}
.ai-dialogue p {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: #b8c2d1;
}
.ai-dialogue button {
  float: right;
  margin-top: 14px;
  padding: 9px 13px;
  border: 1px solid #00eaff;
  font: 800 8px monospace;
  color: #67e8f9;
}
.ai-home-shell {
  background:
    radial-gradient(circle at 75% 15%, #00f0ff17, transparent 25%), #03050a;
}
.ai-home-stage {
  position: relative;
  height: 630px;
  overflow: hidden;
  background: linear-gradient(
    165deg,
    #111827 0 18%,
    #0b1020 18% 66%,
    #08060c 66%
  );
  border-bottom: 1px solid #00f0ff29;
}
.ai-home-window {
  position: absolute;
  right: 7%;
  top: 8%;
  width: 36%;
  height: 36%;
  border: 8px solid #111827;
  background:
    linear-gradient(#0408142e, #040814b8),
    repeating-linear-gradient(90deg, transparent 0 50px, #00f0ff14 51px 53px),
    linear-gradient(#111b38, #210a30 55%, #04050b);
}
.ai-home-window i {
  position: absolute;
  bottom: 0;
  width: 16%;
  background: #07111c;
  border: 1px solid #00f0ff26;
}
.ai-home-window i:nth-child(1) {
  left: 8%;
  height: 55%;
}
.ai-home-window i:nth-child(2) {
  left: 39%;
  height: 82%;
}
.ai-home-window i:nth-child(3) {
  right: 7%;
  height: 68%;
}
.ai-home-window span {
  position: absolute;
  left: 10px;
  top: 10px;
  font: 7px monospace;
  color: #67e8f9;
}
.ai-home-floor {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -18%;
  height: 55%;
  transform: perspective(500px) rotateX(55deg);
  background:
    repeating-linear-gradient(90deg, transparent 0 80px, #00f0ff14 81px),
    repeating-linear-gradient(0deg, #0b0c15 0 55px, #111322 56px 58px);
}
.ai-home-sofa {
  position: absolute;
  left: 10%;
  bottom: 14%;
  width: 31%;
  height: 18%;
  background: linear-gradient(#23243c, #0d0f1d);
  border: 1px solid #353a58;
  box-shadow: 0 18px 30px #000;
}
.ai-home-console {
  position: absolute;
  right: 10%;
  bottom: 14%;
  padding: 25px 20px;
  border: 1px solid #00eaff;
  background: #050913;
  font: 8px monospace;
  color: #67e8f9;
}
.ai-home-owner {
  position: absolute;
  left: 5%;
  top: 7%;
  display: flex;
  flex-direction: column;
  padding: 13px;
  border-left: 2px solid #ff2b91;
  background: #0006;
}
.ai-home-owner b {
  font: 900 13px monospace;
}
.ai-home-owner span {
  font: 7px monospace;
  color: #67e8f9;
}
.ai-home-item {
  position: absolute;
  z-index: 10;
  transform: translate(-50%, -50%);
  min-width: 90px;
  padding: 10px;
  border: 1px solid #00f0ff59;
  background: #03060cd6;
  color: #fff;
}
.ai-home-item b {
  display: block;
  font-size: 30px;
  color: #67e8f9;
}
.ai-home-item small {
  display: block;
  font: 6px monospace;
}
.ai-home-inventory {
  padding: 18px 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  background: #050710;
}
.ai-home-inventory > div {
  min-width: 190px;
}
.ai-home-inventory p {
  font: 7px monospace;
  color: #a78bfa;
}
.ai-home-inventory h3 {
  font: 800 11px monospace;
}
.ai-home-inventory > button {
  min-width: 185px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #ffffff14;
  background: #080b13;
  text-align: left;
}
.ai-home-inventory > button b {
  font-size: 22px;
  color: #67e8f9;
}
.ai-home-inventory > button span {
  font: 7px monospace;
  color: #fff;
}
.ai-home-inventory > button small {
  display: block;
  color: #64748b;
}
.ai-home-inventory > button i {
  margin-left: auto;
  font: 7px monospace;
  color: #ff66ad;
}
.ai-identity-required {
  min-height: 640px;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 20%, #00f0ff17, transparent 42%), #050710;
}
.ai-identity-required > div {
  width: min(720px, 100%);
  border: 1px solid #00f0ff47;
  padding: clamp(28px, 6vw, 64px);
  text-align: center;
  background: #070a12e8;
  box-shadow: 0 0 80px #00f0ff0d;
}
.ai-identity-required p:first-child {
  color: #a78bfa;
  font: 700 9px monospace;
  letter-spacing: 0.24em;
}
.ai-identity-required h1 {
  margin: 14px 0;
  color: white;
  font-size: clamp(32px, 6vw, 60px);
  font-weight: 900;
}
.ai-identity-required h1 span {
  color: #00f0ff;
}
.ai-identity-required h1 + p {
  max-width: 560px;
  margin: 0 auto 24px;
  color: #8793a7;
  line-height: 1.8;
}
.ai-identity-required button {
  margin: 6px;
  border: 1px solid #00f0ff66;
  padding: 14px 18px;
  color: #00f0ff;
  background: #00f0ff09;
  font: 700 9px monospace;
  letter-spacing: 0.12em;
}
.ai-character-bay {
  min-height: 760px;
}
.ai-character-content {
  display: grid;
  gap: 24px;
  padding: clamp(18px, 3vw, 34px);
}
.ai-character-content > section {
  border: 1px solid #ffffff17;
  padding: clamp(16px, 2.5vw, 26px);
  background: #070912;
}
.ai-character-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.ai-character-heading small {
  color: #68758a;
  font: 7px monospace;
  letter-spacing: 0.18em;
}
.ai-character-heading h2 {
  margin-top: 5px;
  color: white;
  font-size: 19px;
  font-weight: 800;
}
.ai-character-heading > b,
.ai-character-heading > button {
  border: 1px solid #00f0ff4d;
  padding: 9px 12px;
  color: #00f0ff;
  background: #00f0ff08;
  font: 700 8px monospace;
}
.ai-genesis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.ai-genesis-grid > button {
  overflow: hidden;
  border: 1px solid #ffffff1c;
  color: inherit;
  background: #03050a;
  text-align: left;
}
.ai-genesis-grid > button.active {
  border-color: #a78bfa;
  box-shadow: 0 0 25px #8b5cf626;
}
.ai-genesis-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.ai-genesis-grid span {
  display: grid;
  gap: 5px;
  padding: 12px;
}
.ai-genesis-grid small {
  color: #a78bfa;
  font: 7px monospace;
}
.ai-genesis-grid b {
  color: white;
  font-size: 13px;
}
.ai-genesis-grid i {
  color: #00f0ff;
  font: 7px monospace;
  font-style: normal;
}
.ai-customizer-body {
  display: grid;
  grid-template-columns: minmax(150px, 240px) 1fr;
  gap: 24px;
}
.ai-customizer-body > img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid #00f0ff40;
}
.ai-customizer-body > div > small {
  color: #718096;
  font: 8px monospace;
}
.ai-swatches {
  display: flex;
  gap: 10px;
  margin: 12px 0 20px;
}
.ai-swatches button {
  width: 30px;
  height: 30px;
  border: 3px solid #070912;
  outline: 1px solid #ffffff26;
}
.ai-swatches button.active {
  outline: 2px solid white;
}
.ai-loadout-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.ai-loadout-slots span {
  display: grid;
  gap: 5px;
  border: 1px solid #ffffff17;
  padding: 11px;
  color: #526075;
  font: 7px monospace;
}
.ai-loadout-slots b {
  color: #aeb8c8;
  font-size: 8px;
}
.ai-customizer-body .ai-store-link {
  margin-top: 0;
}
.ai-customizer-body p {
  margin-top: 10px;
  color: #526075;
  font: 7px/1.6 monospace;
}
@keyframes aiRain {
  to {
    background-position: -30px 80px;
  }
}
@keyframes aiPulse {
  to {
    filter: drop-shadow(0 0 18px #ff0077);
    transform: scale(1.08);
  }
}
@media (max-width: 980px) {
  .ai-town-layout {
    grid-template-columns: 1fr;
  }
  .ai-town-side {
    border-left: 0;
    border-top: 1px solid #00f0ff21;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .ai-chat,
  .ai-controls,
  .ai-mission {
    margin-top: 0;
  }
  .ai-town-world {
    min-height: 650px;
  }
  .ai-building {
    width: 23%;
  }
}
@media (max-width: 650px) {
  .ai-customizer-body {
    grid-template-columns: 1fr;
  }
  .ai-customizer-body > img {
    max-width: 220px;
  }
  .ai-town-top {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }
  .ai-town-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .ai-town-actions > div {
    flex: 1;
  }
  .ai-town-world {
    min-height: 600px;
  }
  .ai-town-side {
    grid-template-columns: 1fr;
  }
  .ai-building {
    min-width: 105px;
    width: 28%;
    height: 13%;
    padding: 8px;
  }
  .ai-home-stage {
    height: 560px;
  }
  .ai-home-window {
    width: 55%;
  }
  .ai-home-sofa {
    width: 46%;
  }
}
