/**
 * Fezo City styles — Phase 5.3.
 *
 * Layers (Z-order, low to high):
 *   1. viewport background (dark theme)
 *   2. world (SVG mapa + avatar + prompts) — transforms together via camera
 *   3. UI overlay (joystick, prompt, optional HUD) — fixed to viewport
 *
 * Mobile-first: joystick visible on touch devices, hidden on desktop.
 *
 * @since 0.9.7
 */

/* ═══════════════════════════════════════════════════════════
 * Root container — full-bleed when used as game lobby
 * ═══════════════════════════════════════════════════════════ */

.fezo-city {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  background: #050508;
  color: #e8e8ee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border-radius: 8px;
  overflow: hidden;
}

/* Skip link (a11y) */
.fezo-city__skip-link {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 8px 12px;
  background: #fff;
  color: #000;
  z-index: 1000;
  border-radius: 4px;
  transform: translateY(-150%);
  transition: transform .15s ease;
}
.fezo-city__skip-link:focus {
  transform: translateY(0);
  outline: 2px solid #00f0ff;
}

/* ═══════════════════════════════════════════════════════════
 * Fallback (placeholder mode — no JS / pre-boot)
 * ═══════════════════════════════════════════════════════════ */

.fezo-city__fallback {
  padding: 24px;
  background: linear-gradient(180deg, #1a1a2e 0%, #0a0a14 100%);
}
.fezo-city[data-fezo-city-status="ready"] .fezo-city__fallback {
  display: none;
}

.fezo-city__header { margin-bottom: 24px; }
.fezo-city__title {
  font-size: 28px;
  margin: 0 0 8px;
  color: #00f0ff;
  letter-spacing: 2px;
}
.fezo-city__intro {
  color: #b8b8c0;
  max-width: 720px;
  line-height: 1.5;
  margin: 0;
}

.fezo-city__section-title {
  font-size: 18px;
  color: #ffaa00;
  margin: 24px 0 12px;
  letter-spacing: 1px;
}

.fezo-city__game-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.fezo-city__game-item { margin: 0; }
.fezo-city__game-link {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: #15151f;
  border: 1px solid #2a2a3a;
  border-radius: 6px;
  text-decoration: none;
  color: #e8e8ee;
  transition: transform .15s ease, border-color .15s ease;
}
.fezo-city__game-link:hover {
  transform: translateY(-2px);
  border-color: #00f0ff;
}
.fezo-city__game-item--placeholder .fezo-city__game-link {
  opacity: 0.55;
  cursor: default;
}
.fezo-city__game-icon { font-size: 32px; margin-bottom: 6px; }
.fezo-city__game-name { font-weight: 600; color: #00f0ff; }
.fezo-city__game-desc { font-size: 13px; color: #888; }

.fezo-city__top-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.fezo-city__top-link {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: #15151f;
  border: 1px solid #2a2a3a;
  border-radius: 4px;
  text-decoration: none;
  color: #e8e8ee;
}
.fezo-city__top-rank { font-weight: 700; color: #ffaa00; }
.fezo-city__top-name { flex: 1; }
.fezo-city__top-score { font-size: 12px; color: #888; }

/* ═══════════════════════════════════════════════════════════
 * Active state — viewport visible, fallback hidden
 * ═══════════════════════════════════════════════════════════ */

.fezo-city__viewport {
  position: relative;
  display: none; /* hidden until JS sets data-fezo-city-status="ready" */
  width: 100%;
  height: 80vh;
  min-height: 520px;
  max-height: 920px;
  overflow: hidden;
  background: #050508;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.fezo-city[data-fezo-city-status="ready"] .fezo-city__viewport {
  display: block;
}

/* World container — gets translated by camera */
.fezo-city__world {
  position: absolute;
  top: 0;
  left: 0;
  width: 1600px;   /* matches city.json world.width */
  height: 1200px;  /* matches city.json world.height */
  transform-origin: 0 0;
  will-change: transform;
}

/* Map SVG layers — full world size */
.fezo-city__map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.fezo-city__map[hidden] { display: none; }

/* Avatar — wrap handles translate, inner handles scaleX flip */
.fezo-city__avatar-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  will-change: transform;
  pointer-events: none;
  z-index: 10;
}

.fezo-city__avatar {
  position: relative;
  width: 100%;
  height: 100%;
  background-image: var(--fezo-avatar-fallback, none);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  will-change: transform;
  /* Fallback color circle if no avatar URL */
  background-color: rgba(255, 170, 0, 0.5);
  border-radius: 50% 50% 40% 40%;
  border: 2px solid #ffaa00;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 170, 0, 0.4);
}

/* Gate prompt — positioned in world coordinates */
.fezo-city__gate-prompt {
  position: absolute;
  top: 0;
  left: 0;
  padding: 8px 16px;
  background: rgba(10, 10, 20, 0.92);
  border: 2px solid #ffaa00;
  border-radius: 24px;
  color: #ffaa00;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 170, 0, 0.5);
  pointer-events: none;
  z-index: 20;
  transition: opacity .15s ease;
  animation: fezo-city-prompt-pulse 1.5s ease-in-out infinite;
}
.fezo-city__gate-prompt[data-gate-status="placeholder"] {
  border-color: #5f5e5a;
  color: #b0afa8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  animation: none;
}
.fezo-city__gate-prompt.is-flash {
  background: rgba(255, 100, 100, 0.95);
  border-color: #ff6666;
  color: #fff;
}

@keyframes fezo-city-prompt-pulse {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  50%      { transform: translate(-50%, 0) scale(1.05); }
}

/* ═══════════════════════════════════════════════════════════
 * Gate signs / beacons — always-visible signage that expands
 * into a "Stlač E — hraj!" prompt when the player walks close.
 * Per-game neon colour driven by --gate-color.
 * ═══════════════════════════════════════════════════════════ */

.fezo-city__gate-signs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15; /* above avatar (10) so the active prompt is never occluded */
}

.fezo-city__gate-sign {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform;
}

/* The pill: icon + short name; CTA row hidden until active */
.fezo-city__gate-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(8, 8, 16, 0.72);
  border: 1.5px solid var(--gate-color, #00f0ff);
  border-radius: 22px;
  color: var(--gate-color, #00f0ff);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  white-space: nowrap;
  opacity: 0.62;
  transform: scale(0.9);
  transform-origin: center bottom;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.fezo-city__gate-icon { font-size: 18px; line-height: 1; }
.fezo-city__gate-name { line-height: 1; }

/* CTA row — collapsed by default, expands on proximity */
.fezo-city__gate-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  transition: max-width .22s ease, opacity .18s ease, margin .18s ease;
}

.fezo-city__gate-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--gate-color, #00f0ff);
  color: #07070d;
  border-radius: 5px;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 0 8px var(--gate-color, #00f0ff);
}

/* Down-arrow that points at the gate — only while active */
.fezo-city__gate-arrow {
  margin-top: -2px;
  font-size: 16px;
  line-height: 1;
  color: var(--gate-color, #00f0ff);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
  text-shadow: 0 0 8px var(--gate-color, #00f0ff);
}

/* ── Active (player nearby) ───────────────────────────────── */
.fezo-city__gate-sign.is-active .fezo-city__gate-card {
  opacity: 1;
  transform: scale(1.06);
  background: rgba(10, 10, 20, 0.94);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 22px var(--gate-color, #00f0ff);
  animation: fezo-city-gate-glow 1.4s ease-in-out infinite;
}
.fezo-city__gate-sign.is-active .fezo-city__gate-cta {
  max-width: 160px;
  opacity: 1;
  margin-left: 2px;
}
.fezo-city__gate-sign.is-active .fezo-city__gate-arrow {
  opacity: 1;
  animation: fezo-city-gate-arrow 0.9s ease-in-out infinite;
}

/* Placeholder gates (e.g. Chess) — muted, no key badge */
.fezo-city__gate-sign.is-placeholder .fezo-city__gate-card { border-style: dashed; }
.fezo-city__gate-sign.is-placeholder .fezo-city__gate-key { display: none; }

/* Shake feedback when pressing E on a "čoskoro" gate */
.fezo-city__gate-sign.is-shake .fezo-city__gate-card {
  animation: fezo-city-gate-shake 0.4s ease;
}

@keyframes fezo-city-gate-glow {
  0%, 100% { box-shadow: 0 4px 16px rgba(0,0,0,0.6), 0 0 18px var(--gate-color, #00f0ff); }
  50%      { box-shadow: 0 4px 16px rgba(0,0,0,0.6), 0 0 30px var(--gate-color, #00f0ff); }
}
@keyframes fezo-city-gate-arrow {
  0%, 100% { transform: translateY(-2px); }
  50%      { transform: translateY(3px); }
}
@keyframes fezo-city-gate-shake {
  0%, 100% { transform: scale(1.06) translateX(0); }
  25%      { transform: scale(1.06) translateX(-5px); }
  75%      { transform: scale(1.06) translateX(5px); }
}

@media (prefers-reduced-motion: reduce) {
  .fezo-city__gate-sign.is-active .fezo-city__gate-card,
  .fezo-city__gate-sign.is-active .fezo-city__gate-arrow { animation: none; }
}

/* ═══════════════════════════════════════════════════════════
 * Ghost-Fezatari (Phase 5.4) — semi-transparent active players
 * ═══════════════════════════════════════════════════════════ */

.fezo-city__ghosts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8; /* below player avatar (10) */
}

.fezo-city__ghost {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.5;
  will-change: transform;
  pointer-events: none;
  filter: hue-rotate(180deg) brightness(0.9);
  transition: opacity .25s ease;
}

.fezo-city__ghost-img {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  /* Fallback color circle ghost — bluish tint */
  background-color: rgba(0, 240, 255, 0.4);
  border-radius: 50% 50% 40% 40%;
  border: 2px solid rgba(0, 240, 255, 0.8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 240, 255, 0.5);
}

.fezo-city__ghost-names {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9; /* above ghosts, below player */
}

.fezo-city__ghost-name {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 10px;
  background: rgba(10, 10, 20, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.6);
  border-radius: 12px;
  color: #00f0ff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s ease;
  will-change: transform, opacity;
}
.fezo-city__ghost-name.is-visible {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
 * Mobile UI — joystick + interact button
 * ═══════════════════════════════════════════════════════════ */

.fezo-city__joystick {
  position: absolute;
  bottom: 24px;
  left: 24px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(20, 20, 35, 0.7);
  border: 2px solid rgba(0, 240, 255, 0.5);
  z-index: 30;
  display: none;
  touch-action: none;
}
.fezo-city__joystick-stick {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.6);
  border: 2px solid #00f0ff;
  pointer-events: none;
  transition: transform 0s linear;
}

.fezo-city__interact-btn {
  position: absolute;
  bottom: 32px;
  right: 32px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 170, 0, 0.85);
  border: 3px solid #ffaa00;
  color: #0a0a14;
  font-weight: 700;
  font-size: 24px;
  cursor: pointer;
  z-index: 30;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

/* Show mobile UI on touch / small screens */
@media (pointer: coarse), (max-width: 768px) {
  .fezo-city__joystick { display: block; }
  .fezo-city__interact-btn { display: block; }
}

/* ═══════════════════════════════════════════════════════════
 * Theme overrides — day/night (5.5 will toggle dynamically)
 * ═══════════════════════════════════════════════════════════ */

.fezo-city[data-fezo-city-theme="night"] .fezo-city__viewport {
  background: #02020a;
}

/* ═══════════════════════════════════════════════════════════
 * Screen reader utility
 * ═══════════════════════════════════════════════════════════ */

.fezo-city .screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.fezo-city .screen-reader-text:focus {
  background: #fff;
  clip: auto !important;
  -webkit-clip-path: none;
  clip-path: none;
  color: #000;
  display: block;
  font-size: 14px;
  height: auto;
  left: 8px;
  padding: 12px 16px;
  text-decoration: underline;
  top: 8px;
  width: auto;
  z-index: 100000;
}

/* ═══════════════════════════════════════════════════════════
 * Fame Statue — monthly champion (Phase 5.7)
 * ═══════════════════════════════════════════════════════════ */
.fezo-city__champion {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7; /* below ghosts(8)/player(10) so you can stand in front of the statue */
}
.fezo-city__champion-avatar {
  position: absolute;
  top: 0;
  left: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(255, 170, 0, 0.16);
  border-radius: 50%;
  border: 2px solid #ffaa00;
  box-shadow: 0 0 22px rgba(255, 170, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.5);
  animation: fezoCityStatueFloat 3s ease-in-out infinite;
}
.fezo-city__champion-crown {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255, 170, 0, 0.85));
  animation: fezoCityStatueFloat 3s ease-in-out infinite;
}
.fezo-city__champion-name {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 12px;
  background: rgba(12, 9, 2, 0.92);
  border: 1px solid #ffaa00;
  border-radius: 12px;
  color: #ffaa00;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  box-shadow: 0 0 14px rgba(255, 170, 0, 0.3);
}
.fezo-city__champion-score {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.85;
}
@keyframes fezoCityStatueFloat {
  0%, 100% { top: 0; }
  50% { top: -5px; }
}

/* ═══════════════════════════════════════════════════════════
 * City Shop — cosmetics: avatar aura + hat (Phase 5.8)
 * ═══════════════════════════════════════════════════════════ */
.fezo-city__avatar {
  /* aura colour driven by equipped cosmetic (--fezo-aura set in JS) */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), 0 0 22px var(--fezo-aura, rgba(255, 170, 0, 0.5));
  border-color: var(--fezo-aura, #ffaa00);
}
.fezo-city__avatar.has-rainbow-aura {
  animation: fezoCityRainbowAura 4s linear infinite;
}
@keyframes fezoCityRainbowAura {
  0%   { box-shadow: 0 4px 8px rgba(0,0,0,.5), 0 0 26px #ff0066; border-color: #ff0066; }
  25%  { box-shadow: 0 4px 8px rgba(0,0,0,.5), 0 0 26px #ffaa00; border-color: #ffaa00; }
  50%  { box-shadow: 0 4px 8px rgba(0,0,0,.5), 0 0 26px #00ff88; border-color: #00ff88; }
  75%  { box-shadow: 0 4px 8px rgba(0,0,0,.5), 0 0 26px #00f0ff; border-color: #00f0ff; }
  100% { box-shadow: 0 4px 8px rgba(0,0,0,.5), 0 0 26px #ff0066; border-color: #ff0066; }
}
.fezo-city__avatar-hat {
  position: absolute;
  left: 50%;
  top: -20px;
  transform: translateX(-50%);
  font-size: 26px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
  z-index: 3;
}

/* Shop modal overlay (injected) */
.fezo-city__shop {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 9, 0.78);
  backdrop-filter: blur(2px);
  padding: 16px;
}
.fezo-city__shop[hidden] { display: none; }
.fezo-city__shop-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90%;
  overflow-y: auto;
  background: #0a0a14;
  border: 1.5px solid rgba(0, 240, 255, 0.4);
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.25);
  padding: 18px 20px 22px;
  font-family: 'JetBrains Mono', monospace;
  color: #f3f4f6;
}
.fezo-city__shop-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 30px; height: 30px;
  background: rgba(0,240,255,0.08);
  border: 1px solid rgba(0,240,255,0.3);
  border-radius: 50%;
  color: #00f0ff; cursor: pointer; font-size: 14px; line-height: 1;
}
.fezo-city__shop-close:hover { background: rgba(0,240,255,0.18); }
.fezo-city__shop-head { display: flex; align-items: center; justify-content: center; gap: 16px; }
.fezo-city__shop-head h2 {
  font-family: 'Audiowide', 'Major Mono Display', monospace;
  font-size: 26px; color: #00f0ff; letter-spacing: 3px; margin: 0;
  text-shadow: 0 0 12px rgba(0,240,255,0.5);
}
.fezo-city__shop-coins { font-size: 15px; font-weight: 700; color: #ffaa00; }
.fezo-city__shop-sub { text-align: center; font-size: 11px; opacity: 0.6; margin: 4px 0 14px; }
.fezo-city__shop-cat {
  font-family: 'Major Mono Display', monospace; font-size: 12px; color: #00f0ff;
  letter-spacing: 2px; margin: 12px 0 8px; opacity: 0.85;
}
.fezo-city__shop-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.fezo-city__shop-card {
  width: 92px; padding: 10px 8px;
  background: rgba(0,240,255,0.04);
  border: 1px solid rgba(0,240,255,0.22);
  border-radius: 7px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; transition: all .15s;
}
.fezo-city__shop-card:hover { background: rgba(0,240,255,0.1); border-color: rgba(0,240,255,0.5); }
.fezo-city__shop-card.is-equipped { border-color: #00ff88; background: rgba(0,255,136,0.08); cursor: default; }
.fezo-city__shop-card.is-poor { opacity: 0.5; cursor: not-allowed; }
.fezo-city__shop-card .cos-swatch {
  width: 30px; height: 30px; border-radius: 50%;
  box-shadow: 0 0 12px currentColor; border: 2px solid rgba(255,255,255,0.5);
}
.fezo-city__shop-card .cos-swatch.is-rainbow {
  background: conic-gradient(#ff0066, #ffaa00, #00ff88, #00f0ff, #a855f7, #ff0066);
}
.fezo-city__shop-card .cos-glyph { font-size: 26px; line-height: 1; height: 30px; }
.fezo-city__shop-card .cos-name { font-size: 11px; text-align: center; }
.fezo-city__shop-card .cos-btn {
  font-size: 11px; font-weight: 700; color: #ffaa00; padding: 2px 8px;
  border: 1px solid rgba(255,170,0,0.4); border-radius: 10px;
}
.fezo-city__shop-card.is-owned .cos-btn { color: #00f0ff; border-color: rgba(0,240,255,0.4); }
.fezo-city__shop-card.is-equipped .cos-btn { color: #00ff88; border-color: rgba(0,255,136,0.5); }

/* ═══════════════════════════════════════════════════════════
 * Fullscreen — whole-display city (Phase 5.9)
 * ═══════════════════════════════════════════════════════════ */
.fezo-city__fs-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  background: rgba(6, 4, 9, 0.6);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: #00f0ff;
  border-radius: 999px;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.fezo-city__fs-btn:hover { background: rgba(0, 240, 255, 0.12); box-shadow: 0 0 12px rgba(0, 240, 255, 0.5); }
.fezo-city__fs-btn:active { transform: scale(0.95); }
.fezo-city__fs-btn svg { width: 18px; height: 18px; }
.fezo-city__fs-btn .ic-exit { display: none; }

.fezo-city:fullscreen,
.fezo-city:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
}
.fezo-city:fullscreen .fezo-city__viewport,
.fezo-city:-webkit-full-screen .fezo-city__viewport {
  height: 100vh !important;
  max-height: none !important;
  min-height: 0 !important;
}
.fezo-city:fullscreen .fezo-city__fs-btn .ic-enter,
.fezo-city:-webkit-full-screen .fezo-city__fs-btn .ic-enter { display: none; }
.fezo-city:fullscreen .fezo-city__fs-btn .ic-exit,
.fezo-city:-webkit-full-screen .fezo-city__fs-btn .ic-exit { display: block; }

/* ═══════════════════════════════════════════════════════════
 * In-city auth — chip (top-left) + login/register modal
 * ═══════════════════════════════════════════════════════════ */
.fezo-city__auth-chip { position: absolute; top: 12px; left: 12px; z-index: 40; }
.fezo-city__auth-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(8,8,18,.72); border: 1.5px solid #8A2BE2; color: #fff;
  font: 700 13px/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .5px; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.5), 0 0 16px rgba(138,43,226,.45);
  transition: background .12s, box-shadow .12s, transform .1s;
}
.fezo-city__auth-btn:hover { background: rgba(138,43,226,.22); box-shadow: 0 2px 12px rgba(0,0,0,.5), 0 0 24px rgba(138,43,226,.85); }
.fezo-city__auth-btn:active { transform: scale(.96); }
.fezo-city__auth-chip.is-guest .fezo-city__auth-btn { animation: fezoCityAuthPulse 2.4s ease-in-out infinite; }
@keyframes fezoCityAuthPulse {
  0%,100% { box-shadow: 0 2px 12px rgba(0,0,0,.5), 0 0 14px rgba(138,43,226,.4); }
  50%     { box-shadow: 0 2px 12px rgba(0,0,0,.5), 0 0 26px rgba(138,43,226,.9); }
}
.fezo-city__auth-ava { width: 22px; height: 22px; border-radius: 50%; background: #1E1E24 center/cover no-repeat; border: 1.5px solid #00FFCC; flex: 0 0 auto; }
.fezo-city__auth-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fezo-city__auth-caret { color: #00FFCC; font-size: 11px; }
.fezo-city__auth-pop {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 175px;
  background: #0b0b16; border: 1px solid rgba(138,43,226,.4); border-radius: 10px; padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
}
.fezo-city__auth-pop[hidden] { display: none; }
.fezo-city__auth-pop-item { display: block; padding: 9px 12px; border-radius: 7px; color: #e8e8f0; text-decoration: none; font: 600 13px/1 'JetBrains Mono', monospace; }
.fezo-city__auth-pop-item:hover { background: rgba(138,43,226,.18); color: #fff; }

.fezo-city__auth {
  position: absolute; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,4,9,.82); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); padding: 16px;
}
.fezo-city__auth[hidden] { display: none; }
.fezo-city__auth-panel {
  position: relative; width: 100%; max-width: 400px; max-height: 92%; overflow-y: auto;
  background: #0a0a14; border: 1.5px solid rgba(138,43,226,.5); border-radius: 14px;
  box-shadow: 0 0 40px rgba(138,43,226,.3); padding: 22px 22px 24px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; color: #f3f4f6;
}
.fezo-city__auth-close {
  position: absolute; top: 12px; right: 14px; width: 30px; height: 30px;
  background: rgba(138,43,226,.1); border: 1px solid rgba(138,43,226,.35); border-radius: 50%;
  color: #c9a6ff; cursor: pointer; font-size: 14px; line-height: 1;
}
.fezo-city__auth-close:hover { background: rgba(138,43,226,.25); }
.fezo-city__auth-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.fezo-city__auth-logo { width: 52px; height: 52px; border-radius: 12px; flex: 0 0 auto; }
.fezo-city__auth-head h2 { margin: 0; font-size: 20px; letter-spacing: 2px; color: #fff; font-family: 'Audiowide','JetBrains Mono',monospace; }
.fezo-city__auth-head p { margin: 3px 0 0; font-size: 11px; opacity: .6; line-height: 1.4; }
.fezo-city__auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.fezo-city__auth-tab {
  flex: 1; padding: 10px; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
  color: #9a9ab0; font: 700 13px/1 'JetBrains Mono', monospace; letter-spacing: .5px;
}
.fezo-city__auth-tab.is-active { color: #fff; border-color: #8A2BE2; background: rgba(138,43,226,.16); box-shadow: 0 0 14px rgba(138,43,226,.3); }
.fezo-city__auth-form { display: flex; flex-direction: column; gap: 12px; }
.fezo-city__auth-form[hidden] { display: none; }
.fezo-city__auth-form label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; letter-spacing: .5px; color: #9a9ab0; text-transform: uppercase; }
.fezo-city__auth-opt { text-transform: none; opacity: .55; font-weight: 400; }
.fezo-city__auth-form input {
  width: 100%; box-sizing: border-box; padding: 11px 12px;
  background: #07070f; border: 1px solid rgba(255,255,255,.12); border-radius: 8px;
  color: #fff; font: 500 14px/1 'JetBrains Mono', monospace;
}
.fezo-city__auth-form input:focus { outline: none; border-color: #00FFCC; box-shadow: 0 0 0 2px rgba(0,255,204,.18); }
.fezo-city__auth-submit {
  margin-top: 4px; padding: 13px; border: 0; border-radius: 9px; cursor: pointer;
  background: linear-gradient(135deg, #8A2BE2, #5b1fb0); color: #fff;
  font: 800 14px/1 'JetBrains Mono', monospace; letter-spacing: 1px;
  box-shadow: 0 4px 16px rgba(138,43,226,.45); transition: transform .1s, box-shadow .12s, opacity .12s;
}
.fezo-city__auth-submit:hover { box-shadow: 0 4px 22px rgba(138,43,226,.7); }
.fezo-city__auth-submit:active { transform: scale(.98); }
.fezo-city__auth-submit:disabled, .fezo-city__auth-submit.is-loading { opacity: .6; cursor: default; }
.fezo-city__auth-msg { margin-top: 14px; padding: 10px 12px; border-radius: 8px; font-size: 12.5px; line-height: 1.4; text-align: center; }
.fezo-city__auth-msg[hidden] { display: none; }
.fezo-city__auth-msg.is-err { background: rgba(255,60,90,.12); border: 1px solid rgba(255,60,90,.4); color: #ff8a9c; }
.fezo-city__auth-msg.is-ok { background: rgba(0,255,160,.1); border: 1px solid rgba(0,255,160,.35); color: #7effc4; }
