:root {
  --city-ink: #17142a;
  --city-ink-2: #25213c;
  --city-paper: #f4f0e8;
  --city-white: #fffdf8;
  --city-purple: #7258ff;
  --city-purple-dark: #4b36d4;
  --city-lime: #d8ff5c;
  --city-mint: #86f0c2;
  --city-orange: #ff865a;
  --city-pink: #ff8fbf;
  --city-blue: #60baff;
  --city-danger: #db3158;
  --city-muted: #625c69;
  --city-line: rgba(23, 20, 42, .13);
  --rail-width: 76px;
  --drawer-width: clamp(390px, 62vw, 560px);
  font-family: Inter, ui-rounded, "Hiragino Sans", "Yu Gothic UI", system-ui, -apple-system, sans-serif;
  color: var(--city-ink);
  background: var(--city-ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--city-ink);
}

button,
input,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button { color: inherit; }
button:not(:disabled), a { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--city-lime);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 200;
  left: 12px;
  top: -90px;
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--city-lime);
  color: var(--city-ink);
  font-weight: 900;
  text-decoration: none;
}

.skip-link:focus { top: 12px; }

/* ---------- orientation ---------- */

.orientation-notice {
  position: fixed;
  z-index: 400;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: var(--city-ink);
  color: var(--city-white);
  text-align: center;
}

.orientation-notice strong { margin-top: 22px; font-size: 20px; }
.orientation-notice p { max-width: 320px; margin: 9px 0 0; color: rgba(255, 255, 255, .58); font-size: 13px; line-height: 1.65; }

.rotate-phone {
  position: relative;
  width: 86px;
  height: 54px;
  border: 3px solid var(--city-lime);
  border-radius: 15px;
  transform: rotate(-8deg);
  animation: rotate-hint 2.2s ease-in-out infinite;
}

.rotate-phone span {
  position: absolute;
  right: 5px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--city-lime);
  transform: translateY(-50%);
}

@keyframes rotate-hint {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}

/* ---------- entry ---------- */

.entry-screen {
  position: relative;
  display: grid;
  place-items: center start;
  width: 100%;
  height: 100dvh;
  min-height: 330px;
  padding: max(22px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(38px, env(safe-area-inset-left));
  overflow: hidden;
  background:
    radial-gradient(circle at 79% 35%, rgba(114, 88, 255, .34), transparent 27%),
    linear-gradient(135deg, #17142a, #211b3a 62%, #17142a);
  color: var(--city-white);
}

.entry-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, #000, transparent 70%);
}

.entry-content {
  position: relative;
  z-index: 2;
  width: min(58vw, 660px);
}

.entry-brand { display: flex; align-items: center; gap: 10px; margin-bottom: clamp(18px, 4vh, 34px); }

.entry-brand > span {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border: 2px solid rgba(255, 255, 255, .72);
  border-radius: 15px;
  color: var(--city-lime);
  font-size: 19px;
  font-weight: 1000;
  letter-spacing: -.09em;
  transform: rotate(-4deg);
}

.entry-brand strong { font-size: 15px; letter-spacing: .05em; }

.entry-kicker {
  margin: 0 0 8px;
  color: var(--city-mint);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .17em;
}

.entry-content h1 {
  margin: 0;
  font-size: clamp(34px, 5.6vw, 70px);
  line-height: .97;
  letter-spacing: -.07em;
}

.entry-content h1 em { color: var(--city-lime); font-style: normal; }

.entry-lead {
  width: min(92%, 570px);
  margin: clamp(12px, 2.4vh, 22px) 0 0;
  color: rgba(255, 255, 255, .7);
  font-size: clamp(12px, 1.45vw, 16px);
  line-height: 1.7;
}

.entry-points { display: flex; flex-wrap: wrap; gap: 7px; margin: clamp(12px, 2.6vh, 22px) 0; }

.entry-points span {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 99px;
  background: rgba(255, 255, 255, .055);
  color: rgba(255, 255, 255, .82);
  font-size: 10px;
  font-weight: 850;
}

.entry-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(330px, 90%);
  min-height: 52px;
  padding: 12px 17px;
  border: 0;
  border-radius: 17px;
  background: var(--city-lime);
  color: var(--city-ink);
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 12px 34px rgba(216, 255, 92, .13);
}

.entry-button span { font-size: 21px; }
.entry-button:active { transform: translateY(2px); }
.entry-note { margin: 9px 0 0; color: rgba(255, 255, 255, .4); font-size: 9px; }

.entry-skyline { position: absolute; z-index: 1; inset: 0 0 0 55%; pointer-events: none; }

.entry-moon {
  position: absolute;
  right: 14%;
  top: 12%;
  width: clamp(100px, 16vw, 210px);
  height: clamp(100px, 16vw, 210px);
  border-radius: 50%;
  background: var(--city-purple);
  box-shadow: 0 0 100px rgba(114, 88, 255, .5);
}

.entry-tower { position: absolute; bottom: -2%; border: 1px solid rgba(216, 255, 92, .2); background: rgba(255, 255, 255, .04); }
.entry-tower::before { content: ""; position: absolute; inset: 14px 12px; background: repeating-linear-gradient(to bottom, rgba(216, 255, 92, .65) 0 3px, transparent 3px 15px); opacity: .32; }
.entry-tower-1 { left: 3%; width: 18%; height: 45%; }
.entry-tower-2 { left: 23%; width: 16%; height: 69%; }
.entry-tower-3 { left: 42%; width: 21%; height: 52%; }
.entry-tower-4 { left: 67%; width: 17%; height: 76%; }

/* ---------- city shell ---------- */

.game-shell { position: relative; width: 100vw; height: 100dvh; min-height: 320px; overflow: hidden; background: var(--city-ink); }

.city-canvas {
  position: absolute;
  z-index: 1;
  inset: 0 calc(var(--rail-width) + env(safe-area-inset-right)) 0 0;
  overflow: hidden;
  background: #6f62c6;
  transition: filter .28s ease;
  touch-action: none;
  user-select: none;
}

.game-shell.root-open .city-canvas { filter: brightness(.81) saturate(.88); }
.game-shell.root-open .move-pad,
.game-shell.root-open .nearby-prompt { opacity: .25; pointer-events: none; }

.city-sky {
  position: absolute;
  inset: 0 0 42%;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 14%, rgba(255, 255, 255, .24), transparent 8%),
    linear-gradient(180deg, #54469d 0%, #826fcb 56%, #d492b8 100%);
}

.city-sky::after { content: ""; position: absolute; inset: auto 0 0; height: 48%; background: linear-gradient(transparent, rgba(255, 173, 141, .35)); }

.planet { position: absolute; right: 9%; top: 8%; width: clamp(62px, 9vw, 118px); height: clamp(62px, 9vw, 118px); border-radius: 50%; background: #f2d79d; box-shadow: 0 0 70px rgba(255, 211, 141, .38); }
.star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 7px #fff; opacity: .7; }
.star-1 { left: 12%; top: 17%; }.star-2 { left: 39%; top: 11%; }.star-3 { left: 57%; top: 25%; }.star-4 { right: 27%; top: 8%; }

.cloud { position: absolute; width: 100px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .14); filter: blur(1px); }
.cloud::before,.cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.cloud::before { width: 44px; height: 32px; left: 18px; bottom: 0; }.cloud::after { width: 54px; height: 39px; right: 12px; bottom: 0; }
.cloud-1 { left: 17%; top: 20%; }.cloud-2 { right: 24%; top: 34%; transform: scale(.72); opacity: .75; }

.city-hud {
  position: absolute;
  z-index: 30;
  top: max(10px, env(safe-area-inset-top));
  left: max(13px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  pointer-events: none;
}

.city-wordmark {
  display: grid;
  place-items: center;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 14px;
  background: rgba(23, 20, 42, .76);
  color: #fff;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: -.03em;
  backdrop-filter: blur(14px);
}

.city-wordmark span { color: var(--city-lime); }

.city-location {
  min-width: 125px;
  height: 42px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 14px;
  background: rgba(23, 20, 42, .46);
  color: #fff;
  backdrop-filter: blur(14px);
}

.city-location small { display: block; color: var(--city-mint); font-size: 7px; font-weight: 950; letter-spacing: .15em; }
.city-location strong { display: block; margin-top: 2px; font-size: 9px; letter-spacing: .07em; }

.online-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 42px;
  padding: 0 11px;
  border-radius: 14px;
  background: rgba(23, 20, 42, .46);
  color: #fff;
  backdrop-filter: blur(14px);
}

.online-pill i { width: 7px; height: 7px; border-radius: 50%; background: #35db93; box-shadow: 0 0 0 4px rgba(53, 219, 147, .14); }
.online-pill strong { font-size: 12px; }.online-pill span { color: rgba(255, 255, 255, .58); font-size: 7px; font-weight: 900; letter-spacing: .1em; }

.city-depth { position: absolute; z-index: 2; left: 0; right: 0; bottom: 42%; height: 35%; pointer-events: none; }
.far-building { position: absolute; bottom: 0; background: #3d345f; box-shadow: inset 0 1px rgba(255, 255, 255, .1); }
.far-building::after { content: ""; position: absolute; inset: 9px 8px; background: repeating-linear-gradient(90deg, rgba(216, 255, 92, .35) 0 4px, transparent 4px 14px); opacity: .55; }
.fb-1 { left: -1%; width: 15%; height: 48%; }.fb-2 { left: 13%; width: 13%; height: 78%; }.fb-3 { left: 26%; width: 20%; height: 56%; }.fb-4 { left: 46%; width: 14%; height: 89%; }.fb-5 { left: 60%; width: 23%; height: 62%; }.fb-6 { right: -2%; width: 19%; height: 83%; }

.city-ground {
  position: absolute;
  z-index: 5;
  inset: 16% 0 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(180deg, transparent 0 31%, #3f3a55 31% 100%);
  background-size: 34px 34px, 34px 34px, auto;
}

.city-ground::before {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  top: 35%;
  height: 72%;
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(255, 255, 255, .05) 50%, transparent 50.3%),
    linear-gradient(180deg, #4d4862, #393549);
  transform: perspective(500px) rotateX(57deg);
  transform-origin: top;
}

.road { position: absolute; z-index: 1; background: #2e2b3d; opacity: .86; }
.road-main { left: -5%; right: -5%; top: 64%; height: 20%; transform: rotate(-2deg); }
.road-main::after { content: ""; position: absolute; left: 0; right: 0; top: 48%; height: 2px; background: repeating-linear-gradient(90deg, rgba(216, 255, 92, .65) 0 20px, transparent 20px 42px); }
.road-cross { left: 45%; top: 38%; width: 13%; height: 65%; transform: perspective(180px) rotateX(19deg) rotate(5deg); }

.plaza-ring { position: absolute; z-index: 2; left: 38%; top: 49%; width: 25%; height: 27%; border: 2px solid rgba(216, 255, 92, .16); border-radius: 50%; background: rgba(114, 88, 255, .1); transform: rotate(-3deg); }
.plaza-ring span { position: absolute; inset: 17%; border: 1px dashed rgba(216, 255, 92, .25); border-radius: 50%; }

/* landmarks */

.landmark {
  position: absolute;
  z-index: 7;
  width: clamp(96px, 13vw, 160px);
  height: clamp(92px, 20vh, 160px);
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  transition: transform .2s ease, filter .2s ease;
}

.landmark:hover,.landmark:focus-visible { transform: translateY(-4px); filter: brightness(1.12); }
.landmark.near { filter: drop-shadow(0 0 16px rgba(216, 255, 92, .9)); }
.landmark.near .landmark-sign { border-color: var(--city-lime); }
.landmark-music { left: 8%; top: 25%; }.landmark-game { left: 36%; top: 14%; }.landmark-puzzle { left: 69%; top: 26%; }.landmark-studio { left: 52%; top: 47%; }

.landmark-building { position: absolute; left: 50%; bottom: 26px; width: 72%; height: 70%; border: 2px solid rgba(255, 255, 255, .2); transform: translateX(-50%); box-shadow: 0 15px 24px rgba(20, 16, 40, .22); }
.landmark-building::before { content: ""; position: absolute; inset: 11px; opacity: .66; }
.landmark-building i { position: absolute; bottom: 8px; width: 14%; height: 31%; border-radius: 8px 8px 1px 1px; background: rgba(255, 255, 255, .18); }
.landmark-building i:nth-child(1) { left: 14%; }.landmark-building i:nth-child(2) { left: 43%; }.landmark-building i:nth-child(3) { right: 14%; }
.landmark-building b { position: absolute; display: grid; place-items: center; width: 34px; height: 34px; top: -17px; left: 50%; border: 2px solid rgba(255, 255, 255, .72); border-radius: 50%; color: #fff; background: var(--city-ink); font-size: 17px; transform: translateX(-50%); }
.music-building { border-radius: 45px 45px 9px 9px; background: linear-gradient(180deg, #8e78ff, #4c3bb4); }
.music-building::before { border-radius: 32px 32px 4px 4px; background: repeating-linear-gradient(90deg, rgba(216, 255, 92, .7) 0 5px, transparent 5px 13px); }
.game-building { border-radius: 9px; background: linear-gradient(145deg, #238e78, #154d4c); clip-path: polygon(10% 0, 90% 0, 100% 20%, 91% 100%, 9% 100%, 0 20%); }
.game-building::before { background: linear-gradient(90deg, transparent 45%, var(--city-mint) 45% 55%, transparent 55%), linear-gradient(transparent 45%, var(--city-mint) 45% 55%, transparent 55%); }
.puzzle-building { border-radius: 8px 8px 22px 22px; background: linear-gradient(145deg, #d96c45, #7f3d48); transform: translateX(-50%) skewY(-2deg); }
.puzzle-building::before { background: repeating-linear-gradient(180deg, rgba(255, 210, 156, .55) 0 6px, transparent 6px 16px); }
.studio-building { border-radius: 4px 38px 4px 4px; background: linear-gradient(145deg, #db5f98, #703f86); }
.studio-building::before { background: linear-gradient(135deg, rgba(255, 255, 255, .2) 25%, transparent 25% 50%, rgba(255, 255, 255, .2) 50% 75%, transparent 75%); background-size: 20px 20px; }

.landmark-sign {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  width: max-content;
  min-width: 94px;
  padding: 5px 10px 6px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 11px;
  background: rgba(23, 20, 42, .86);
  color: #fff;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
}

.landmark-sign small { display: block; color: var(--city-mint); font-size: 7px; font-weight: 850; }
.landmark-sign strong { display: block; margin-top: 2px; font-size: 10px; }

/* street props and people */

.street-props { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.lamp { position: absolute; width: 3px; height: 48px; background: #181624; box-shadow: 6px 12px 18px rgba(0, 0, 0, .25); }
.lamp::before { content: ""; position: absolute; left: -7px; top: -5px; width: 17px; height: 11px; border-radius: 9px 9px 4px 4px; background: var(--city-lime); box-shadow: 0 0 18px rgba(216, 255, 92, .7); }
.lamp-1 { left: 29%; top: 55%; }.lamp-2 { left: 67%; top: 62%; }.lamp-3 { left: 85%; top: 52%; }
.tree { position: absolute; width: 9px; height: 24px; background: #493629; }
.tree::before { content: ""; position: absolute; left: -14px; bottom: 15px; width: 37px; height: 35px; border-radius: 52% 48% 45% 55%; background: #2c7664; box-shadow: inset 5px -7px rgba(11, 58, 51, .25); }
.tree-1 { left: 4%; top: 58%; }.tree-2 { left: 33%; top: 74%; }.tree-3 { left: 91%; top: 70%; }
.bench { position: absolute; left: 72%; top: 76%; width: 50px; height: 8px; border: 3px solid #241e29; border-width: 3px 0; background: #a56a4a; transform: skewX(-10deg); }

.other-citizen { position: absolute; z-index: 10; display: grid; justify-items: center; gap: 2px; pointer-events: none; }
.other-citizen > span { display: grid; place-items: center; width: 30px; height: 36px; border: 2px solid rgba(255, 255, 255, .45); border-radius: 15px 15px 11px 11px; color: #fff; background: var(--citizen-color, #7258ff); font-size: 9px; font-weight: 950; box-shadow: 0 7px 10px rgba(0, 0, 0, .18); }
.other-citizen small { padding: 2px 5px; border-radius: 6px; color: #fff; background: rgba(23, 20, 42, .72); font-size: 7px; }
.citizen-a { --citizen-color: #7158ed; left: 28%; top: 64%; }.citizen-r { --citizen-color: #168066; left: 63%; top: 54%; }.citizen-m { --citizen-color: #d75a87; left: 80%; top: 70%; }

/* avatar */

.player-avatar {
  --player-x: 45%;
  --player-y: 75%;
  position: absolute;
  z-index: 20;
  left: var(--player-x);
  top: var(--player-y);
  width: 42px;
  height: 54px;
  transform: translate(-50%, -72%);
  transition: left .12s linear, top .12s linear;
  pointer-events: auto;
}

.player-avatar.dragging,.player-avatar.walking { transition: none; }
.player-name { position: absolute; z-index: 6; left: 50%; top: -15px; padding: 2px 7px; border-radius: 7px; background: var(--city-ink); color: #fff; font-size: 8px; font-weight: 900; transform: translateX(-50%); }
.avatar-shadow { position: absolute; left: 5px; bottom: -3px; width: 34px; height: 10px; border-radius: 50%; background: rgba(10, 8, 20, .35); filter: blur(2px); }
.avatar-body { position: absolute; inset: 0; }
.avatar-face { position: absolute; z-index: 2; left: 10px; top: 4px; width: 24px; height: 24px; border-radius: 48% 48% 45% 45%; background: #f0b88d; box-shadow: inset -4px -2px rgba(170, 94, 73, .12); }
.avatar-face::before { content: ""; position: absolute; right: 5px; top: 11px; width: 3px; height: 3px; border-radius: 50%; background: #31252b; box-shadow: -9px 0 #31252b; }
.avatar-hair { position: absolute; z-index: 3; left: 8px; top: 0; width: 27px; height: 16px; border-radius: 55% 55% 33% 23%; background: #292031; transform: rotate(-4deg); }
.avatar-shirt { position: absolute; z-index: 1; left: 8px; top: 25px; width: 28px; height: 22px; border-radius: 8px 8px 6px 6px; background: var(--city-lime); box-shadow: inset -5px -2px rgba(64, 77, 18, .12); }
.avatar-shirt::before,.avatar-shirt::after { content: ""; position: absolute; top: 3px; width: 7px; height: 18px; border-radius: 5px; background: #efb68c; }
.avatar-shirt::before { left: -5px; transform: rotate(8deg); }.avatar-shirt::after { right: -5px; transform: rotate(-8deg); }
.avatar-leg { position: absolute; z-index: 0; top: 43px; width: 8px; height: 12px; border-radius: 0 0 5px 5px; background: #25213c; transform-origin: top; }
.leg-left { left: 11px; }.leg-right { right: 11px; }
.player-avatar.facing-left .avatar-body { transform: scaleX(-1); }
.player-avatar.walking .leg-left { animation: leg-left .24s ease-in-out infinite alternate; }.player-avatar.walking .leg-right { animation: leg-right .24s ease-in-out infinite alternate; }
@keyframes leg-left { to { transform: rotate(16deg); } } @keyframes leg-right { to { transform: rotate(-16deg); } }

/* city controls */

.nearby-prompt {
  position: absolute;
  z-index: 35;
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: min(285px, 38vw);
  min-height: 55px;
  padding: 8px 12px;
  border: 1px solid rgba(216, 255, 92, .5);
  border-radius: 17px;
  background: rgba(23, 20, 42, .9);
  color: #fff;
  text-align: left;
  box-shadow: 0 15px 35px rgba(10, 8, 22, .24);
  backdrop-filter: blur(14px);
  transition: opacity .2s ease;
}

.nearby-key { padding: 5px 7px; border: 1px solid rgba(255, 255, 255, .23); border-radius: 8px; color: var(--city-lime); font-size: 7px; font-weight: 950; }
.nearby-prompt small,.nearby-prompt strong { display: block; }.nearby-prompt small { color: rgba(255, 255, 255, .5); font-size: 7px; }.nearby-prompt strong { margin-top: 2px; font-size: 10px; }.nearby-prompt b { color: var(--city-lime); font-size: 18px; }

.move-pad {
  position: absolute;
  z-index: 36;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(13px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  background: rgba(23, 20, 42, .62);
  backdrop-filter: blur(12px);
  transition: opacity .2s ease;
  touch-action: none;
  user-select: none;
}

.joystick-ring { position: relative; width: 82px; height: 82px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025) 66%); box-shadow: inset 0 0 0 12px rgba(255, 255, 255, .025); }
.joystick-ring::before,.joystick-ring::after { content: ""; position: absolute; left: 50%; top: 50%; background: rgba(255, 255, 255, .08); transform: translate(-50%, -50%); }.joystick-ring::before { width: 58px; height: 1px; }.joystick-ring::after { width: 1px; height: 58px; }
.joystick-knob { --stick-x: 0px; --stick-y: 0px; position: absolute; z-index: 2; left: 50%; top: 50%; width: 42px; height: 42px; border: 2px solid rgba(255, 255, 255, .56); border-radius: 50%; background: var(--city-lime); box-shadow: 0 8px 18px rgba(0, 0, 0, .24), inset 0 -4px 0 rgba(68, 82, 14, .13); transform: translate(calc(-50% + var(--stick-x)), calc(-50% + var(--stick-y))); transition: transform .08s ease; }
.move-pad.active .joystick-knob { transition: none; box-shadow: 0 5px 13px rgba(0, 0, 0, .25), 0 0 0 5px rgba(216, 255, 92, .13); }

.move-guide { position: absolute; z-index: 35; left: max(125px, calc(env(safe-area-inset-left) + 125px)); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 11px; background: rgba(23, 20, 42, .48); color: #fff; backdrop-filter: blur(10px); }
.move-guide strong { color: var(--city-lime); font-size: 7px; letter-spacing: .15em; }.move-guide span { color: rgba(255, 255, 255, .55); font-size: 8px; }

.city-mission {
  position: absolute;
  z-index: 34;
  top: max(62px, calc(env(safe-area-inset-top) + 60px));
  left: max(13px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 215px;
  height: 43px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 13px;
  background: rgba(23, 20, 42, .47);
  color: #fff;
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.mission-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--city-purple); color: #fff; font-size: 8px; font-weight: 950; }
.city-mission small,.city-mission strong { display: block; }.city-mission small { color: var(--city-mint); font-size: 6px; letter-spacing: .12em; }.city-mission strong { margin-top: 2px; font-size: 8px; }.mission-state { color: var(--city-lime); font-size: 9px; font-weight: 950; }
.city-mission.completed .mission-icon { background: #178864; }.city-mission.completed strong { text-decoration: line-through; opacity: .6; }

/* ---------- true 3D city ---------- */

.city-canvas-3d { background: #51458e; isolation: isolate; }
.city-canvas-3d::after { content: ""; position: absolute; z-index: 48; inset: 0; pointer-events: none; background: rgba(14, 11, 30, .36); opacity: 0; transition: opacity .25s ease; }
.game-shell.root-open .city-canvas-3d { filter: none; }
.game-shell.root-open .city-canvas-3d::after { opacity: 1; }
.world-canvas { position: absolute; z-index: 1; inset: 0; display: block; width: 100%; height: 100%; border: 0; outline: 0; touch-action: none; }
.world-loading,.world-fallback { position: absolute; z-index: 42; left: 50%; top: 50%; width: min(320px, calc(100% - 40px)); padding: 17px 19px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 18px; background: rgba(23, 20, 42, .88); color: #fff; text-align: center; box-shadow: 0 20px 50px rgba(8, 6, 20, .3); transform: translate(-50%, -50%); }
.world-loading { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 11px; letter-spacing: .04em; }.world-loading > span { width: 17px; height: 17px; border: 2px solid rgba(255, 255, 255, .23); border-top-color: var(--city-lime); border-radius: 50%; animation: world-spin .8s linear infinite; }
.world-fallback strong { display: block; font-size: 15px; }.world-fallback p { margin: 7px 0 0; color: rgba(255, 255, 255, .68); font-size: 10px; line-height: 1.55; }
.world-fallback button { min-height: 40px; margin-top: 11px; padding: 8px 13px; border: 0; border-radius: 12px; background: var(--city-lime); color: var(--city-ink); font-size: 10px; font-weight: 950; }
@keyframes world-spin { to { transform: rotate(360deg); } }

.world-markers,.world-social-layer { position: absolute; z-index: 24; inset: 0; overflow: hidden; pointer-events: none; }
.landmark.landmark-3d { left: 0; top: 0; bottom: auto; width: auto; height: auto; opacity: 1; pointer-events: auto; will-change: transform; transition: opacity .15s ease, filter .15s ease; }
.landmark.landmark-3d .landmark-sign { position: relative; left: auto; bottom: auto; width: auto; min-width: 122px; padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .48); border-radius: 12px; background: rgba(23, 20, 42, .87); box-shadow: 0 9px 24px rgba(8, 6, 20, .24); transform: none; backdrop-filter: none; }
.landmark.landmark-3d .landmark-sign small { color: var(--city-mint); font-size: 7px; }.landmark.landmark-3d .landmark-sign strong { margin-top: 3px; color: #fff; font-size: 10px; }
.landmark.landmark-3d.near .landmark-sign { border-color: var(--city-lime); box-shadow: 0 0 0 3px rgba(216, 255, 92, .15), 0 10px 25px rgba(8, 6, 20, .25); }

.world-bubble { position: absolute; left: 0; top: 0; display: grid; min-width: 96px; max-width: 160px; padding: 6px 8px; border: 1px solid rgba(255, 255, 255, .34); border-radius: 11px 11px 11px 3px; background: rgba(255, 253, 248, .93); color: var(--city-ink); box-shadow: 0 8px 18px rgba(10, 7, 25, .17); transform-origin: center bottom; will-change: transform; }
.world-bubble strong { font-size: 8px; }.world-bubble span { margin-top: 2px; font-size: 8px; line-height: 1.35; }

.emote-dock { position: absolute; z-index: 36; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; gap: 7px; transform: translateX(-50%); transition: opacity .2s ease; }
.emote-dock button { min-width: 58px; height: 50px; display: grid; place-items: center; align-content: center; gap: 2px; padding: 4px 7px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 14px; background: rgba(23, 20, 42, .74); color: #fff; box-shadow: 0 9px 22px rgba(8, 6, 20, .2); backdrop-filter: blur(8px); }
.emote-dock button span { font-size: 16px; line-height: 1; }.emote-dock button small { font-size: 7px; font-weight: 850; }.emote-dock button[aria-pressed="true"] { border-color: var(--city-lime); background: rgba(83, 68, 145, .92); }
.game-shell.root-open .emote-dock { opacity: .2; pointer-events: none; }

.city-mini-map {
  position: absolute;
  z-index: 36;
  top: max(10px, env(safe-area-inset-top));
  right: 13px;
  width: 150px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  background: rgba(23, 20, 42, .76);
  color: #fff;
  box-shadow: 0 12px 30px rgba(8, 6, 20, .22);
  backdrop-filter: blur(11px);
  transition: opacity .2s ease;
}
.city-mini-map > header { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 5px; }
.city-mini-map > header strong { color: var(--city-lime); font-size: 7px; letter-spacing: .12em; }
.city-mini-map > header span { color: rgba(255, 255, 255, .48); font-size: 5px; letter-spacing: .08em; }
.city-mini-map-grid { position: relative; height: 88px; overflow: hidden; border-radius: 9px; background: #3d3858; }
.map-road { position: absolute; z-index: 1; background: #24233a; }
.map-road-v { left: 47%; top: 0; width: 7%; height: 100%; }
.map-road-h { left: 0; top: 47%; width: 100%; height: 8%; }
.map-river { position: absolute; z-index: 0; right: 0; top: 0; width: 8%; height: 100%; background: #2b6b94; box-shadow: inset 2px 0 rgba(134, 240, 194, .25); }
.map-zone,.map-place { position: absolute; z-index: 3; display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 1px solid rgba(255, 255, 255, .72); border-radius: 6px; color: var(--city-ink); font-size: 8px; font-weight: 1000; line-height: 1; transform: translate(-50%, -50%); }
.map-zone { box-shadow: 0 4px 8px rgba(8, 6, 20, .28); }
.map-zone:hover,.map-zone:focus-visible { z-index: 7; transform: translate(-50%, -50%) scale(1.16); }
.map-zone-music { left: 22%; top: 25%; background: var(--city-pink); }
.map-zone-game { left: 78%; top: 25%; background: var(--city-lime); }
.map-zone-puzzle { left: 22%; top: 75%; background: var(--city-orange); }
.map-zone-studio { left: 78%; top: 75%; background: var(--city-mint); }
.map-place { width: 15px; height: 11px; border: 0; border-radius: 3px; background: rgba(255,255,255,.22); color: rgba(255,255,255,.8); font-size: 5px; pointer-events: none; }
.map-station { left: 50%; top: 5%; }.map-park { left: 50%; top: 94%; }
.city-map-player { position: absolute; z-index: 6; left: 50%; top: 60%; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: var(--city-purple); box-shadow: 0 0 0 3px rgba(216, 255, 92, .32), 0 0 9px var(--city-lime); transform: translate(-50%, -50%); transition: left .12s linear, top .12s linear; pointer-events: none; }
.game-shell.root-open .city-mini-map { opacity: .18; pointer-events: none; }

/* ---------- right rail ---------- */

.right-rail {
  position: absolute;
  z-index: 60;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: calc(var(--rail-width) + env(safe-area-inset-right));
  padding: max(7px, env(safe-area-inset-top)) env(safe-area-inset-right) max(7px, env(safe-area-inset-bottom)) 6px;
  border-left: 1px solid rgba(255, 255, 255, .08);
  background: rgba(23, 20, 42, .96);
  box-shadow: -10px 0 30px rgba(10, 7, 25, .18);
  backdrop-filter: blur(18px);
}

.rail-button {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-height: 48px;
  margin: 1px 0;
  padding: 4px 2px;
  border: 0;
  border-radius: 14px 0 0 14px;
  background: transparent;
  color: rgba(255, 255, 255, .56);
}

.rail-button::before { content: ""; position: absolute; left: -6px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: transparent; }
.rail-button span { font-size: 18px; line-height: 1; }.rail-button small { font-size: 8px; font-weight: 850; white-space: nowrap; }
.rail-button:hover { color: #fff; background: rgba(255, 255, 255, .055); }
.rail-button.active { color: #fff; background: rgba(114, 88, 255, .26); }
.rail-button.active::before { background: var(--city-lime); }
.rail-city { color: var(--city-lime); }.rail-city.active { color: var(--city-ink); background: var(--city-lime); }.rail-city.active::before { background: #fff; }

.rail-root-label { display: grid; place-items: center; align-content: center; gap: 1px; min-height: 40px; margin: 4px 0 3px; border-top: 1px solid rgba(255, 255, 255, .1); border-bottom: 1px solid rgba(255, 255, 255, .1); color: #fff; }
.rail-root-label span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--city-purple); font-size: 9px; font-weight: 950; }.rail-root-label small { color: rgba(255, 255, 255, .47); font-size: 6px; font-weight: 900; letter-spacing: .12em; }
.rail-safety { margin-top: auto; color: #ffafbe; }
.rail-badge { position: absolute; right: 8px; top: 6px; width: 8px; height: 8px; border: 2px solid var(--city-ink); border-radius: 50%; background: var(--city-lime); }
.rail-button.new-content::after { content: ""; position: absolute; right: 8px; top: 6px; width: 8px; height: 8px; border: 2px solid var(--city-ink); border-radius: 50%; background: var(--city-lime); box-shadow: 0 0 0 3px rgba(216, 255, 92, .12); }

/* ---------- ROOT drawer ---------- */

.root-drawer-legacy { display: none !important; }

.root-original-drawer {
  position: absolute;
  z-index: 50;
  inset: 0 calc(var(--rail-width) + env(safe-area-inset-right)) 0 0;
  overflow: hidden;
  border-right: 1px solid rgba(23, 20, 42, .16);
  background: #d8d4cb;
  box-shadow: 24px 0 60px rgba(12, 9, 28, .22);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s;
}

.game-shell.root-open .root-original-drawer {
  transform: translateX(0);
  visibility: visible;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s;
}

.root-student-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #d8d4cb;
}

.root-drawer {
  position: absolute;
  z-index: 50;
  top: 0;
  right: calc(var(--rail-width) + env(safe-area-inset-right));
  bottom: 0;
  width: var(--drawer-width);
  overflow: hidden;
  border-left: 1px solid rgba(23, 20, 42, .14);
  border-radius: 24px 0 0 24px;
  background: var(--city-paper);
  box-shadow: -25px 0 60px rgba(12, 9, 28, .26);
  transform: translateX(calc(100% + 4px));
  visibility: hidden;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s;
}

.game-shell.root-open .root-drawer { transform: translateX(0); visibility: visible; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s; }

.root-drawer-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 58px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px 16px;
  border-bottom: 1px solid var(--city-line);
  background: rgba(244, 240, 232, .94);
  backdrop-filter: blur(18px);
}

.root-brand { display: flex; align-items: center; gap: 8px; }
.root-brand > span { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--city-purple); color: #fff; font-size: 12px; font-weight: 950; }
.root-brand strong,.root-brand small { display: block; line-height: 1; }.root-brand strong { font-size: 12px; letter-spacing: -.025em; }.root-brand small { margin-top: 2px; color: var(--city-muted); font-size: 7px; font-weight: 800; }

.root-city-context { display: flex; align-items: center; gap: 5px; min-width: 0; margin-left: auto; padding: 6px 8px; border-radius: 99px; background: rgba(134, 240, 194, .18); color: #116b50; font-size: 7px; font-weight: 850; white-space: nowrap; }
.root-city-context i { width: 6px; height: 6px; border-radius: 50%; background: #19ba79; box-shadow: 0 0 0 3px rgba(25, 186, 121, .12); }
.root-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--city-ink); font-size: 19px; }

.root-scroll { height: calc(100% - 58px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(23, 20, 42, .17) transparent; }
.root-view { min-height: 100%; padding: 18px 19px 30px; }
.root-view.active { animation: root-view-in .22s ease; }
@keyframes root-view-in { from { opacity: .2; transform: translateX(8px); } }

.root-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.root-panel-header h1 { margin: 0; font-size: 36px; line-height: .98; font-weight: 950; letter-spacing: -.055em; }
.root-eyebrow,.dialog-eyebrow { margin: 0 0 5px; color: #116d54; font-size: 9px; line-height: 1.2; font-weight: 950; letter-spacing: .14em; }
.root-avatar-button { display: grid; place-items: center; width: 43px; height: 43px; border: 2px solid var(--city-ink); border-radius: 50%; background: var(--city-lime); font-weight: 950; }

.encounter-strip { display: flex; align-items: center; gap: 9px; min-height: 48px; margin-bottom: 13px; padding: 8px 11px; border: 1px solid rgba(114, 88, 255, .2); border-radius: 14px; background: rgba(114, 88, 255, .08); }
.encounter-strip > span { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; border-radius: 10px; background: var(--city-purple); color: #fff; }.encounter-strip small,.encounter-strip strong { display: block; }.encounter-strip small { color: var(--city-muted); font-size: 8px; }.encounter-strip strong { margin-top: 2px; font-size: 11px; line-height: 1.35; }

.root-topic-card { padding: 20px; border: 2px solid var(--city-ink); border-radius: 24px; background: var(--city-purple); color: #fff; box-shadow: 6px 6px 0 var(--city-ink); }
.root-topic-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 900; }.root-topic-meta span { padding: 6px 9px; border-radius: 99px; background: var(--city-lime); color: var(--city-ink); }.root-topic-card h2 { margin: 20px 0 8px; font-size: 27px; line-height: 1.16; letter-spacing: -.04em; }.root-topic-card p { margin: 0 0 17px; color: #eeeaff; font-size: 14px; line-height: 1.55; }

.root-button { min-height: 44px; padding: 10px 15px; border: 2px solid var(--city-ink); border-radius: 14px; font-weight: 900; }.root-button:disabled { opacity: .48; }.root-button-primary { border-color: var(--city-purple); background: var(--city-purple); color: #fff; box-shadow: 0 5px 0 #34276f; }.root-button-primary:not(:disabled):active { transform: translateY(2px); box-shadow: 0 3px 0 #34276f; }.root-button-ink { background: var(--city-ink); color: #fff; }.root-button-outline { background: transparent; color: var(--city-ink); }.root-wide { width: 100%; }

.root-section-heading { display: flex; align-items: end; justify-content: space-between; margin: 28px 0 6px; }.root-section-heading h2 { margin: 0; font-size: 24px; }.root-text-button { min-height: 40px; padding: 0 2px; border: 0; background: transparent; color: var(--city-purple-dark); font-size: 12px; font-weight: 900; text-decoration: underline; text-underline-offset: 3px; }.root-section-intro { margin: 0 0 14px; color: var(--city-muted); font-size: 13px; line-height: 1.6; }

.root-answer-list { display: grid; gap: 15px; }
.root-answer-card { padding: 16px; border: 2px solid var(--city-ink); border-radius: 21px; background: #fff; box-shadow: 4px 4px 0 rgba(23, 20, 42, .96); }
.root-answer-head { display: flex; align-items: center; gap: 11px; }.root-answer-head > div { min-width: 0; }.root-answer-head strong { display: block; font-size: 15px; }.root-answer-head small { display: block; margin-top: 3px; overflow: hidden; color: var(--city-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.root-verified-dot { margin-left: auto; color: #116d54; font-size: 13px; font-weight: 950; }
.root-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; background: var(--avatar-color, var(--city-purple)); color: #17151d; font-size: 12px; font-weight: 950; }.root-avatar-mio { --avatar-color: #f3b6d1; }.root-avatar-ren { --avatar-color: #b8d8ff; }.root-avatar-sora { --avatar-color: #ffd29c; }.root-avatar-aki,.root-avatar-mint { --avatar-color: #b4efd8; }.root-avatar-xl { width: 65px; height: 65px; background: var(--city-purple); color: #fff; font-size: 20px; }
.root-card-intro { margin: 12px 0 11px; color: var(--city-muted); font-size: 12px; line-height: 1.55; }.root-answer-question { display: block; color: var(--city-purple-dark); font-size: 10px; font-weight: 900; line-height: 1.45; }.root-answer-card blockquote { margin: 6px 0 13px; padding-left: 11px; border-left: 3px solid var(--city-lime); font-size: 16px; line-height: 1.6; font-weight: 750; }.root-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }.root-tags span { padding: 5px 8px; border-radius: 99px; background: #eee9ff; color: #4d39b7; font-size: 11px; font-weight: 850; }.root-context-tag { background: rgba(134, 240, 194, .24) !important; color: #116d54 !important; }.root-common-count { background: var(--city-ink) !important; color: #fff !important; }.root-common-interest { background: var(--city-lime) !important; color: var(--city-ink) !important; }
.root-event-moment { margin: 0 0 11px; padding: 9px 10px; border-radius: 12px; background: rgba(134,240,194,.2); color: #155f4a; font-size: 10px; font-weight: 850; line-height: 1.45; }
.root-answer-card .root-button { min-height: 46px; padding-block: 9px; font-size: 13px; }

.root-notice { margin: 12px 0; padding: 12px 13px; border-left: 4px solid var(--city-purple); border-radius: 0 12px 12px 0; background: #e8e1ff; }.root-notice strong { font-size: 11px; }.root-notice p { margin: 4px 0 0; font-size: 10px; line-height: 1.5; }
.root-filter-row { display: flex; gap: 6px; margin: 13px 0; }.root-filter-row button { min-height: 38px; padding: 6px 11px; border: 1.5px solid #d8d2c7; border-radius: 99px; background: #fff; font-size: 9px; font-weight: 850; }.root-filter-row button[aria-pressed="true"] { border-color: var(--city-ink); background: var(--city-ink); color: #fff; }
.root-dm-row { width: 100%; min-height: 66px; display: flex; align-items: center; gap: 10px; padding: 10px 3px; border: 0; border-bottom: 1px solid #d8d2c7; background: transparent; text-align: left; }.root-dm-copy { min-width: 0; flex: 1; }.root-dm-copy strong,.root-dm-copy small { display: block; }.root-dm-copy strong { font-size: 12px; }.root-dm-copy strong i { color: #116d54; font-style: normal; }.root-dm-copy small { margin-top: 4px; overflow: hidden; color: var(--city-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.root-dm-row time { color: var(--city-muted); font-size: 8px; }
.root-pending-state { padding: 22px 10px; color: var(--city-muted); text-align: center; }.root-pending-state > span { font-size: 24px; }.root-pending-state h2 { margin: 6px 0; color: var(--city-ink); font-size: 13px; }.root-pending-state p { margin: 0; font-size: 10px; line-height: 1.5; }.root-pending-card { margin-top: 12px; padding: 12px; border: 1.5px dashed var(--city-purple); border-radius: 14px; background: #f0ecff; text-align: left; }.root-pending-card strong { font-size: 11px; }.root-pending-card p { margin: 4px 0 0; color: var(--city-muted); font-size: 9px; line-height: 1.45; }

.root-icon-button { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff; font-size: 18px; }
.root-discover-grid { display: grid; gap: 15px; }.root-discover-card { min-height: 190px; display: flex; flex-direction: column; padding: 18px; border: 2px solid var(--city-ink); border-radius: 22px; box-shadow: 5px 5px 0 var(--city-ink); }.root-discover-card > span { font-size: 10px; font-weight: 950; letter-spacing: .14em; }.root-discover-card h2 { margin: 16px 0 6px; font-size: 23px; line-height: 1.18; letter-spacing: -.035em; }.root-discover-card p { margin: 0 0 13px; font-size: 12px; opacity: .78; }.root-discover-card button { align-self: flex-start; min-height: 44px; margin-top: auto; padding: 8px 14px; border: 2px solid var(--city-ink); border-radius: 99px; background: #fff; font-size: 11px; font-weight: 900; }.root-purple { background: var(--city-purple); color: #fff; }.root-lime { background: var(--city-lime); }.root-coral { background: #ff826e; }.root-mint { background: var(--city-mint); }

.root-profile-card { display: flex; align-items: center; gap: 11px; padding: 14px; border: 2px solid var(--city-ink); border-radius: 18px; background: #fff; box-shadow: 4px 4px 0 var(--city-ink); }.root-profile-card h2 { margin: 0; font-size: 22px; }.root-profile-card p { margin: 4px 0; color: var(--city-muted); font-size: 12px; }.root-verified { display: block; color: #116d54; font-size: 9px; font-weight: 900; }
.memory-book { margin-top: 22px; }.memory-book h2 { margin: 0; font-size: 20px; }.memory-book #rootMemoryList { display: grid; gap: 8px; margin-top: 10px; }.memory-book article { display: grid; grid-template-columns: 35px 1fr; gap: 9px; padding: 10px; border: 1.5px solid #d8d2c7; border-radius: 14px; background: #fff; }.memory-book article > span { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: #eee9ff; color: var(--city-purple-dark); font-weight: 950; }.memory-book article strong { display: block; font-size: 11px; }.memory-book article p { margin: 3px 0; color: var(--city-muted); font-size: 9px; line-height: 1.4; }.memory-book article small { color: #116d54; font-size: 8px; font-weight: 850; }.memory-book-empty { margin: 0; padding: 13px; border: 1.5px dashed #cfc7bf; border-radius: 13px; color: var(--city-muted); font-size: 10px; line-height: 1.55; }
.root-menu-list { margin: 15px 0; border-top: 1px solid #d8d2c7; }.root-menu-list button,.root-menu-list a { width: 100%; min-height: 58px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; padding: 10px 3px; border: 0; border-bottom: 1px solid #d8d2c7; background: transparent; color: inherit; text-align: left; text-decoration: none; }.root-menu-list span { font-size: 11px; font-weight: 900; }.root-menu-list small { grid-row: 2; color: var(--city-muted); font-size: 9px; }.root-menu-list b { grid-row: 1 / 3; grid-column: 2; font-size: 20px; }

/* ---------- dialogs ---------- */

.app-dialog {
  width: min(430px, calc(100vw - var(--rail-width) - 34px));
  max-height: min(620px, calc(100dvh - 28px));
  margin: auto;
  padding: 22px;
  overflow: auto;
  border: 0;
  border-radius: 24px;
  background: var(--city-paper);
  color: var(--city-ink);
  box-shadow: 0 30px 90px rgba(12, 9, 30, .38);
}

.app-dialog::backdrop { background: rgba(12, 9, 26, .66); backdrop-filter: blur(3px); }
.app-dialog[open] { animation: dialog-in .2s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.dialog-close,.dialog-back { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #fff; font-size: 20px; }
.dialog-close { position: absolute; right: 13px; top: 13px; }
.app-dialog > h2 { margin: 0 44px 9px 0; font-size: 26px; line-height: 1.07; letter-spacing: -.04em; }.dialog-lead { margin: 0 0 14px; color: var(--city-muted); font-size: 11px; line-height: 1.6; }

.event-dialog-hero { display: flex; align-items: center; gap: 12px; margin-right: 44px; }.event-icon { display: grid; place-items: center; width: 58px; height: 58px; flex: 0 0 auto; border-radius: 19px; background: var(--city-purple); color: #fff; font-size: 25px; font-weight: 950; }.event-dialog-hero h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }.event-dialog-hero p { margin: 3px 0 0; color: var(--city-muted); font-size: 9px; }
.event-topic { margin: 16px 0 12px; padding: 14px; border: 2px solid var(--city-ink); border-radius: 17px; background: #fff; }.event-topic small,.event-topic strong { display: block; }.event-topic small { color: var(--city-purple); font-size: 8px; font-weight: 950; letter-spacing: .1em; }.event-topic strong { margin-top: 7px; font-size: 16px; line-height: 1.35; }.event-topic p { margin: 5px 0 0; color: var(--city-muted); font-size: 10px; line-height: 1.5; }
.event-people { display: flex; gap: 7px; margin: 11px 0; }.event-person { display: grid; justify-items: center; gap: 3px; }.event-person span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--avatar-color, #ddd); font-size: 9px; font-weight: 950; }.event-person small { color: var(--city-muted); font-size: 7px; }
.event-answer-preview { margin: 14px 0; }.event-answer-preview h3 { margin: 0 0 8px; font-size: 12px; }.event-answer-preview > div { display: grid; gap: 7px; }.event-answer-preview article { padding: 10px 11px; border: 1.5px solid #d8d2c7; border-radius: 13px; background: #fff; }.event-answer-preview strong { display: block; color: var(--city-purple-dark); font-size: 11px; }.event-answer-preview p { margin: 4px 0 0; font-size: 12px; line-height: 1.55; }
.event-role-select { margin: 13px 0; }.event-role-select h3 { margin: 0 0 8px; font-size: 12px; }.event-role-select > div { display: flex; flex-wrap: wrap; gap: 7px; }.event-role-select button { min-height: 39px; padding: 7px 11px; border: 1.5px solid #d8d2c7; border-radius: 99px; background: #fff; color: var(--city-ink); font-size: 10px; font-weight: 900; }.event-role-select button[aria-pressed="true"] { border-color: var(--city-purple); background: #e8e1ff; color: var(--city-purple-dark); box-shadow: 0 0 0 2px rgba(114, 88, 255, .1); }.event-role-select p { margin: 7px 0 0; color: var(--city-muted); font-size: 9px; }
.public-safety { display: flex; align-items: flex-start; gap: 9px; margin: 11px 0 14px; padding: 10px; border-radius: 13px; background: rgba(134, 240, 194, .18); color: #155f4a; }.public-safety > span { font-size: 17px; }.public-safety p { margin: 0; font-size: 9px; line-height: 1.45; }
.roleplay-scene { min-height: 270px; padding-top: 16px; }
.roleplay-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.roleplay-status > span { padding: 5px 9px; border-radius: 99px; background: var(--city-ink); color: #fff; font-size: 9px; font-weight: 950; letter-spacing: .08em; }
.roleplay-status small { color: var(--city-purple-dark); font-size: 10px; font-weight: 900; }
.roleplay-speaker { display: flex; align-items: flex-start; gap: 11px; padding: 15px; border: 2px solid var(--city-ink); border-radius: 18px; background: #fff; box-shadow: 4px 4px 0 rgba(30, 26, 43, .1); }
.roleplay-speaker > div { min-width: 0; }
.roleplay-speaker strong { display: block; color: var(--city-purple-dark); font-size: 12px; }
.roleplay-speaker p { margin: 5px 0 0; color: var(--city-ink); font-size: 14px; font-weight: 750; line-height: 1.55; }
.roleplay-choices { display: grid; gap: 8px; margin-top: 14px; }
.roleplay-choices button { min-height: 46px; padding: 10px 13px; border: 1.5px solid #cfc7bf; border-radius: 14px; background: #fff; color: var(--city-ink); text-align: left; font-size: 12px; font-weight: 900; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.roleplay-choices button::after { content: "→"; float: right; color: var(--city-purple); }
.roleplay-choices button:hover,.roleplay-choices button:focus-visible { border-color: var(--city-purple); background: #f0ecff; transform: translateX(2px); }
.roleplay-note { margin: 10px 2px 0; color: var(--city-muted); font-size: 9px; line-height: 1.5; }
.roleplay-complete { padding: 18px 0 2px; text-align: center; }
.roleplay-complete .memory-mark { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: var(--city-lime); color: var(--city-ink); font-size: 25px; font-weight: 950; box-shadow: 0 0 0 7px rgba(216,255,92,.2); }
.roleplay-complete h3 { margin: 6px 0 12px; font-size: 22px; letter-spacing: -.04em; }
.roleplay-complete > article { padding: 15px; border: 2px solid var(--city-ink); border-radius: 17px; background: #fff; text-align: left; box-shadow: 4px 4px 0 rgba(30,26,43,.1); }
.roleplay-complete > article strong,.roleplay-complete > article small { display: block; }
.roleplay-complete > article strong { font-size: 14px; line-height: 1.5; }
.roleplay-complete > article small { margin-top: 6px; color: var(--city-purple-dark); font-size: 10px; font-weight: 900; }
.roleplay-complete > p { margin: 12px 5px; color: var(--city-muted); font-size: 10px; line-height: 1.55; }
.roleplay-complete-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.world-roleplay { position: absolute; z-index: 46; right: calc(var(--rail-width) + 18px); top: max(54px, calc(env(safe-area-inset-top) + 46px)); width: min(430px, calc(100% - var(--rail-width) - 210px)); min-width: 320px; padding: 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; background: rgba(244,240,232,.96); color: var(--city-ink); box-shadow: 0 18px 55px rgba(8,6,20,.34); }
.world-roleplay .roleplay-status { margin-bottom: 9px; }
.world-roleplay .roleplay-status button { display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--city-ink); font-size: 17px; font-weight: 900; }
.world-roleplay .roleplay-speaker { padding: 11px; }
.world-roleplay .roleplay-speaker p { font-size: 12px; }
.world-roleplay .roleplay-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.world-roleplay .roleplay-choices button { min-height: 42px; padding: 8px; font-size: 9px; line-height: 1.35; text-align: center; }
.world-roleplay .roleplay-choices button::after { display: none; }
.world-roleplay .roleplay-note { margin-bottom: 0; }
.world-memory { position: absolute; z-index: 48; left: 50%; top: 50%; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; width: min(470px, calc(100% - var(--rail-width) - 40px)); padding: 17px; border: 2px solid var(--city-ink); border-radius: 21px; background: rgba(244,240,232,.98); color: var(--city-ink); box-shadow: 7px 7px 0 var(--city-ink), 0 28px 70px rgba(8,6,20,.38); transform: translate(-50%,-50%); }
.world-memory .memory-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--city-lime); font-size: 23px; font-weight: 950; }
.world-memory h3 { margin: 0 0 5px; font-size: 19px; letter-spacing: -.035em; }
.world-memory strong,.world-memory small { display: block; }
.world-memory strong { font-size: 12px; line-height: 1.45; }.world-memory small { margin-top: 4px; color: var(--city-purple-dark); font-size: 9px; font-weight: 900; }
.world-memory .roleplay-complete-actions { grid-column: 1 / -1; }
.game-shell.root-open .world-roleplay,.game-shell.root-open .world-memory { opacity: .18; pointer-events: none; }
.game-shell.roleplay-active .move-pad,.game-shell.roleplay-active .nearby-prompt,.game-shell.roleplay-active .landmark,.game-shell.roleplay-active .city-mini-map { opacity: .28; pointer-events: none; }
.game-shell.roleplay-active .move-guide { opacity: 0; }

.profile-dialog { width: min(520px, calc(100vw - var(--rail-width) - 34px)); }
.profile-person-head { display: flex; align-items: center; gap: 13px; margin: 8px 44px 13px 0; }.profile-person-head .root-avatar { width: 54px; height: 54px; font-size: 15px; }.profile-person-head h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }.profile-person-head p { margin: 2px 0 3px; color: var(--city-muted); font-size: 12px; }.profile-verified { color: #116d54; font-size: 10px; font-weight: 900; }
.profile-origin { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 12px; background: rgba(134, 240, 194, .2); color: #11634d; }.profile-origin span { font-size: 16px; }.profile-origin p { margin: 0; font-size: 11px; font-weight: 850; }
.profile-live-memory { margin: 12px 0 0; padding: 11px 12px; border: 1.5px solid var(--city-purple); border-radius: 14px; background: #eee9ff; }.profile-live-memory h3 { margin: 0; color: var(--city-purple-dark); font-size: 10px; }.profile-live-memory p { margin: 5px 0 0; font-size: 12px; font-weight: 750; line-height: 1.5; }
.profile-bio { margin: 14px 0; font-size: 14px; line-height: 1.65; font-weight: 700; }
.profile-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }.profile-facts article { min-width: 0; padding: 11px; border: 1.5px solid #d8d2c7; border-radius: 14px; background: #fff; }.profile-facts small,.profile-facts strong { display: block; }.profile-facts small { color: var(--city-muted); font-size: 10px; font-weight: 850; }.profile-facts strong { margin-top: 5px; font-size: 12px; line-height: 1.45; }
.profile-section { margin-top: 17px; }.profile-section h3 { margin: 0 0 9px; font-size: 13px; }.profile-section .root-tags { margin-bottom: 0; }
.profile-answer-list { display: grid; gap: 8px; }.profile-answer-list article { padding: 11px 12px; border-left: 4px solid var(--city-purple); border-radius: 0 13px 13px 0; background: #eee9ff; }.profile-answer-list small { display: block; color: var(--city-purple-dark); font-size: 10px; font-weight: 900; }.profile-answer-list p { margin: 5px 0 0; font-size: 13px; line-height: 1.55; }
.profile-starters > div { display: flex; flex-wrap: wrap; gap: 7px; }.profile-starters span { padding: 8px 10px; border: 1.5px solid var(--city-ink); border-radius: 99px; background: #fff; font-size: 11px; font-weight: 850; }

.chat-dialog { width: min(450px, calc(100vw - var(--rail-width) - env(safe-area-inset-right) - 26px)); height: min(560px, calc(var(--visual-height, 100dvh) - 18px)); padding: 0; overflow: hidden; grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
.chat-dialog[open] { display: grid; }
.chat-header { display: flex; align-items: center; gap: 9px; min-height: 58px; padding: 8px 10px; border-bottom: 1px solid #d8d2c7; background: rgba(244, 240, 232, .97); }.chat-header > div { min-width: 0; flex: 1; }.chat-header strong,.chat-header small { display: block; }.chat-header strong { font-size: 12px; }.chat-header small { margin-top: 2px; color: var(--city-muted); font-size: 9px; }.talk-timer { padding: 5px 8px; border-radius: 99px; background: #eee9ff; color: var(--city-purple-dark); font-size: 9px; font-weight: 900; }.chat-safety { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; color: var(--city-danger); font-weight: 950; }
.chat-context { min-height: 29px; display: grid; place-items: center; padding: 5px 10px; background: #e8e1ff; color: #51439d; font-size: 9px; font-weight: 850; text-align: center; }.chat-log { min-height: 0; overflow-y: auto; padding: 15px; background: #eeeae2; }.chat-bubble-row { display: flex; margin-bottom: 9px; }.chat-bubble-row.mine { justify-content: flex-end; }.chat-bubble { max-width: 78%; padding: 9px 11px; border-radius: 14px 14px 14px 4px; background: #fff; font-size: 11px; line-height: 1.5; box-shadow: 0 4px 12px rgba(23, 20, 42, .07); }.chat-bubble-row.mine .chat-bubble { border-radius: 14px 14px 4px 14px; background: var(--city-purple); color: #fff; }
.chat-composer { min-height: 59px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid #d8d2c7; background: var(--city-paper); }.chat-composer input { min-width: 0; flex: 1; height: 42px; padding: 0 12px; border: 1.5px solid #d8d2c7; border-radius: 14px; background: #fff; font-size: 12px; }.chat-composer button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--city-purple); color: #fff; font-size: 17px; font-weight: 950; }
.friend-choice { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; background: var(--city-ink); color: #fff; }.friend-choice p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 9px; }.friend-choice button { min-height: 36px; padding: 5px 9px; border: 0; border-radius: 10px; background: var(--city-lime); color: var(--city-ink); font-size: 9px; font-weight: 950; }

body.keyboard-open .chat-dialog[open] { position: fixed; top: calc(var(--visual-top, 0px) + 4px); bottom: auto; left: 0; right: 0; height: calc(var(--visual-height, 100dvh) - 8px); margin: 0 auto; }
body.keyboard-open .chat-header { min-height: 48px; padding-block: 4px; }
body.keyboard-open .chat-header .root-avatar { width: 34px; height: 34px; }
body.keyboard-open .friend-choice { display: none; }
body.keyboard-open .answer-dialog[open] { position: fixed; top: calc(var(--visual-top, 0px) + 4px); bottom: auto; left: 0; right: 0; max-height: calc(var(--visual-height, 100dvh) - 8px); margin: 0 auto; }
body.keyboard-open .answer-dialog textarea { min-height: 76px; }

.answer-dialog form { display: grid; gap: 10px; }.answer-help { margin: 0; color: var(--city-muted); font-size: 10px; line-height: 1.5; }.answer-choices { display: flex; flex-wrap: wrap; gap: 7px; }.answer-choices button { min-height: 38px; padding: 7px 10px; border: 1.5px solid #d8d2c7; border-radius: 99px; background: #fff; color: var(--city-ink); font-size: 10px; font-weight: 850; }.answer-choices button[aria-pressed="true"] { border-color: var(--city-purple); background: #eee9ff; color: var(--city-purple-dark); }.answer-dialog label { margin-top: 3px; font-size: 11px; font-weight: 850; }.answer-dialog textarea { width: 100%; min-height: 115px; padding: 11px; border: 2px solid #d8d2c7; border-radius: 14px; background: #fff; font-size: 12px; resize: vertical; }
.info-dialog #infoContent { color: var(--city-muted); font-size: 11px; line-height: 1.6; }.info-steps { display: grid; gap: 9px; margin-top: 13px; }.info-step { display: grid; grid-template-columns: 34px 1fr; gap: 9px; padding-top: 10px; border-top: 1.5px solid var(--city-ink); }.info-step span { color: var(--city-purple); font-size: 15px; font-weight: 950; }.info-step strong { display: block; color: var(--city-ink); font-size: 11px; }.info-step p { margin: 3px 0 0; font-size: 9px; }

.safety-actions { display: grid; gap: 8px; }.safety-actions button { min-height: 54px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-items: center; gap: 0 8px; padding: 8px 10px; border: 1.5px solid #d8d2c7; border-radius: 14px; background: #fff; text-align: left; }.safety-actions button > span { grid-row: 1 / 3; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #ffe0e6; color: var(--city-danger); font-weight: 950; }.safety-actions strong { font-size: 11px; }.safety-actions small { color: var(--city-muted); font-size: 8px; }.safety-guide { display: inline-block; margin-top: 14px; color: var(--city-purple-dark); font-size: 10px; font-weight: 900; }
.safety-target { margin: 8px 0 12px; padding: 8px 10px; border-radius: 11px; background: #ffe5eb; color: #9c2442; font-size: 10px; font-weight: 900; }
.report-dialog form { display: grid; gap: 7px; }.report-dialog form label { display: flex; align-items: center; gap: 8px; min-height: 43px; padding: 8px 10px; border: 1.5px solid #d8d2c7; border-radius: 12px; background: #fff; font-size: 10px; font-weight: 800; }.report-dialog input { width: 18px; height: 18px; accent-color: var(--city-purple); }

.toast { position: fixed; z-index: 250; left: 50%; top: max(13px, env(safe-area-inset-top)); width: min(410px, calc(100vw - 34px)); padding: 11px 14px; border-radius: 13px; background: var(--city-ink); color: #fff; font-size: 11px; font-weight: 850; text-align: center; box-shadow: 0 14px 38px rgba(0, 0, 0, .24); transform: translateX(-50%); }

/* ---------- compact landscape ---------- */

@media (max-height: 420px) {
  :root { --rail-width: 70px; --drawer-width: clamp(390px, 55vw, 470px); }
  .entry-brand { margin-bottom: 13px; }.entry-content h1 { font-size: clamp(32px, 5.2vw, 54px); }.entry-lead { line-height: 1.55; }.entry-points { margin-block: 10px; }.entry-button { min-height: 47px; }
  .right-rail { padding-top: max(4px, env(safe-area-inset-top)); padding-bottom: max(4px, env(safe-area-inset-bottom)); }
  .rail-button { min-height: 44px; margin: 0; }.rail-root-label { min-height: 34px; margin-block: 2px; }.rail-button span { font-size: 16px; }.rail-button small { font-size: 8px; }
  .root-drawer-header { height: 52px; }.root-scroll { height: calc(100% - 52px); }.root-view { padding-top: 16px; }.root-panel-header h1 { font-size: 34px; }
  .city-hud { height: 37px; }.city-wordmark,.city-location,.online-pill { height: 37px; }.city-mission { top: max(54px, calc(env(safe-area-inset-top) + 52px)); }
  .move-guide { display: none; }
  .emote-dock { left: auto; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); transform: none; }.emote-dock button { min-width: 50px; height: 44px; }
  .city-mini-map { width: 126px; padding: 5px; border-radius: 11px; }.city-mini-map-grid { height: 68px; }.city-mini-map > header { padding-bottom: 3px; }
  .world-roleplay { right: calc(var(--rail-width) + 10px); top: max(43px, calc(env(safe-area-inset-top) + 39px)); width: min(430px, calc(100% - var(--rail-width) - 185px)); padding: 10px; }
  .world-roleplay .roleplay-speaker { padding: 8px; }.world-roleplay .roleplay-speaker .root-avatar { width: 34px; height: 34px; }.world-roleplay .roleplay-note { display: none; }
  .chat-dialog { height: calc(var(--visual-height, 100dvh) - 10px); }.app-dialog:not(.chat-dialog) { max-height: calc(100dvh - 16px); padding: 18px; }
}

@media (max-height: 350px) {
  :root { --rail-width: 64px; }
  .rail-button { min-height: 44px; }.rail-root-label { min-height: 27px; }.rail-root-label span { width: 18px; height: 18px; }
  .entry-content h1 { font-size: 31px; }.entry-brand { margin-bottom: 8px; }.entry-lead { margin-top: 9px; font-size: 10px; }.entry-points { margin-block: 7px; }.entry-button { min-height: 43px; }.entry-note { display: none; }
}

@media (max-width: 720px) and (orientation: landscape) {
  .entry-content { width: 67vw; }.entry-skyline { left: 62%; }
}

@media (max-width: 640px) and (orientation: landscape) {
  :root { --drawer-width: min(72vw, 460px); }
  .root-drawer { border-radius: 18px 0 0 18px; }
}

@media (orientation: portrait) {
  .orientation-notice { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- v10 full-screen GAME / CHAT modes ---------- */

.entry-mode-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(590px, 96%);
}

.entry-mode-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 9px 12px;
  border: 2px solid rgba(255, 255, 255, .76);
  border-radius: 13px;
  background: rgba(7, 8, 13, .88);
  color: #fff;
  box-shadow: 5px 5px 0 #07080d;
  text-align: left;
}

.entry-mode-button > span:nth-child(2) { min-width: 0; }
.entry-mode-button small,
.entry-mode-button strong { display: block; }
.entry-mode-button small { color: #a8aec7; font-size: 8px; font-weight: 950; letter-spacing: .15em; }
.entry-mode-button strong { margin-top: 3px; font-size: 12px; font-weight: 950; }
.entry-mode-button b { color: #fff; font-size: 18px; }
.entry-mode-icon { display: grid; width: 40px; height: 40px; place-items: center; border: 2px solid #fff; border-radius: 8px; font-size: 13px; font-weight: 1000; }
.entry-game-button .entry-mode-icon { background: var(--city-lime); color: var(--city-ink); }
.entry-chat-button { border-color: #9a78ff; }
.entry-chat-button .entry-mode-icon { background: var(--city-purple); }
.entry-mode-button:active { box-shadow: 2px 2px 0 #07080d; transform: translate(3px, 3px); }

.orientation-chat-button {
  min-width: 220px;
  min-height: 48px;
  margin-top: 20px;
  padding: 10px 16px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: var(--city-purple);
  color: #fff;
  box-shadow: 4px 4px 0 #07080d;
  font-weight: 950;
}

.game-shell {
  --rail-width: 0px;
}

.game-shell .city-canvas {
  inset: 0;
}

.right-rail,
.root-drawer-legacy,
.root-original-drawer,
.room-chat-peek {
  display: none !important;
}

.root-mode-switch {
  position: absolute;
  z-index: 72;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: min(228px, calc(100vw - 32px));
  min-height: 48px;
  padding: 4px;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 12px;
  background: rgba(7, 8, 13, .91);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.root-mode-button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 44px;
  place-items: center;
  align-content: center;
  gap: 1px;
  padding: 4px 8px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #a8aec7;
}

.root-mode-button span { font-size: 10px; font-weight: 1000; letter-spacing: .08em; }
.root-mode-button small { overflow: hidden; max-width: 100%; font-size: 7px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.root-mode-button[data-root-mode="game"].is-active { border-color: var(--city-lime); background: var(--city-lime); color: var(--city-ink); }
.root-mode-button[data-root-mode="chat"].is-active { border-color: #b49cff; background: var(--city-purple); color: #fff; }
.root-mode-button.has-live-game:not(.is-active)::after { content: "LIVE"; position: absolute; top: -8px; left: 50%; padding: 1px 4px; border-radius: 99px; background: #ff718d; color: #fff; font-size: 6px; font-weight: 1000; transform: translateX(-50%); }
.root-mode-badge { position: absolute; top: -7px; right: -5px; display: grid; min-width: 18px; height: 18px; place-items: center; padding: 0 4px; border: 2px solid #07080d; border-radius: 99px; background: var(--city-lime); color: #07080d; font-size: 7px; font-style: normal; font-weight: 1000; }

.game-shell.mode-game .online-pill { display: none; }
.game-shell.mode-chat { background: #0d1020; }
.game-shell.mode-chat .city-canvas { opacity: 0; pointer-events: none; visibility: hidden; }

@media (max-width: 760px), (max-height: 380px) {
  .root-mode-switch { width: min(196px, calc(100vw - 24px)); }
  .game-shell.mode-game .city-location { display: none; }
}

@media (max-height: 420px) and (orientation: landscape) {
  .entry-mode-actions { gap: 8px; }
  .entry-mode-button { min-height: 54px; padding-block: 6px; }
  .entry-mode-icon { width: 36px; height: 36px; }
  .entry-note { display: none; }
}

@media (orientation: portrait) {
  .entry-screen {
    align-items: center;
    min-height: 560px;
    padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  }
  .entry-content { width: 100%; }
  .entry-skyline { left: 34%; opacity: .42; }
  .entry-brand { margin-bottom: 28px; }
  .entry-content h1 { font-size: clamp(38px, 12vw, 58px); }
  .entry-lead { width: 100%; font-size: 14px; }
  .entry-mode-actions { grid-template-columns: 1fr; width: 100%; }
  .entry-mode-button { min-height: 66px; }
  .root-mode-switch { right: max(10px, env(safe-area-inset-right)); left: auto; width: 180px; transform: none; }
}
