/* ── World: city, interior, land popup ── */
/* World / City */
.world-fullscreen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #12121e;
}

.world-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.world-topbar h2 { flex: 1; color: var(--text-heading); }

/* City top-menu buttons injected into .world-topbar */
#world-overlay .world-topbar .world-menu-btn {
  font-size: 14px;
  padding: 4px 10px;
  line-height: 1.2;
  background: rgba(26, 22, 16, 0.9);
  border: 1px solid #4a3820;
  color: #e8c988;
  border-radius: 4px;
  cursor: pointer;
  font-family: Georgia, serif;
  margin-left: 4px;
  transition: background 0.15s, border-color 0.15s;
}
#world-overlay .world-topbar .world-menu-btn:hover {
  background: #2a2218;
  border-color: #8a6e2a;
}
#world-overlay .world-topbar .world-menu-btn:active {
  background: #1a1410;
}

/* Floating shop button on city canvas */
.world-shop-float {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  font-size: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #8a6e2a;
  background: rgba(26, 22, 16, 0.92);
  color: #e8c988;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.world-shop-float:hover {
  background: #2a2218;
  border-color: #fbbf24;
  transform: scale(1.08);
}
.world-shop-float:active {
  transform: scale(0.95);
}

.world-main {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.world-canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  pointer-events: auto;
  touch-action: manipulation;
}

.world-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.world-districts-compact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 6px;
}

.district-compact-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  font-size: 10px;
  color: var(--text-dim);
  border-radius: 4px;
  cursor: pointer;
}

.district-compact-row:hover { background: rgba(59,130,246,0.1); }
.district-compact-row.locked {
  opacity: 0.7;
  border: 1px dashed var(--border-light);
  border-radius: 4px;
  padding: 5px 6px;
}

.world-sidebar {
  width: 140px;
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.world-inv-title {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.district-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}

.district-card.locked {
  opacity: 0.5;
}

.district-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.district-name {
  font-size: 13px;
  font-weight: 700;
  color: #e0e0e0;
}

.district-icon {
  font-size: 16px;
}

.district-unlock-btn {
  padding: 3px 8px;
  border: 1px solid #3b82f6;
  border-radius: 6px;
  background: none;
  color: #3b82f6;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.district-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.district-slot {
  width: 50px;
  height: 50px;
  border: 2px dashed #334155;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: border-color 0.2s;
  background: #0f172a;
}

.district-slot:hover {
  border-color: #3b82f6;
}

.district-slot.filled {
  border-style: solid;
  border-color: #22c55e;
  background: #0f1f0f;
}

.district-slot.drop-target {
  border-color: #fbbf24;
  background: #1a1a10;
}

.district-character {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 6px;
}

.world-inv-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 11px;
  color: #e0e0e0;
  cursor: grab;
  border: 1px solid transparent;
}

.world-inv-item:hover {
  background: rgba(59,130,246,0.1);
  border-color: #334155;
}

.world-inv-item.selected {
  background: rgba(59,130,246,0.2);
  border-color: #3b82f6;
}

.world-inv-item.placed {
  color: #4ade80;
  opacity: 0.6;
}

.world-inv-item .inv-icon {
  font-size: 16px;
}

@media (max-width: 700px) {
  .world-main {
    flex-direction: column;
  }
  .world-canvas-wrap {
    flex: 1;
    min-height: 200px;
    max-height: 55vh;
  }
  .world-sidebar {
    width: 100%;
    flex-shrink: 0;
    max-height: 40vh;
    overflow-y: auto;
    padding: 6px;
    border-top: 1px solid var(--border);
  }
}


/* ── Interior overlay (yacht / nightclub / mansion / etc.) ── */
#interior-overlay { display: flex; flex-direction: column; align-items: center; justify-content: center; }
#interior-overlay.hidden { display: none; }
#interior-overlay .interior-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0a0908;
  color: #e8c988;
  font-family: Georgia, serif;
  max-width: 900px;
  max-height: 700px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
}
@media (max-width: 920px) {
  #interior-overlay .interior-frame {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}
/* floor switcher tabs */
#interior-overlay .interior-floor-tabs {
  display: flex;
  gap: 0;
  background: #16120b;
  border-bottom: 1px solid #3a2c18;
}
#interior-overlay .interior-floor-tab {
  flex: 1;
  padding: 6px 12px;
  text-align: center;
  font-size: 12px;
  color: #8a7050;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: Georgia, serif;
  letter-spacing: 0.05em;
  transition: background 0.15s, color 0.15s;
}
#interior-overlay .interior-floor-tab.active {
  color: #fde68a;
  background: #2a2218;
  border-bottom: 2px solid #fbbf24;
}
#interior-overlay .interior-floor-tab:hover:not(.active) {
  background: #1e1810;
}
#interior-overlay .interior-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #3a2c18;
  background: #16120b;
}
#interior-overlay .interior-title {
  font-size: 18px;
  color: #fde68a;
  letter-spacing: 0.05em;
}
#interior-overlay .interior-mood {
  font-size: 12px;
  color: #8a7050;
  font-style: italic;
  margin-top: 2px;
}
#interior-overlay .interior-canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}
#interior-overlay #interior-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
#interior-overlay .interior-close {
  background: transparent;
  border: 1px solid #4a3820;
  color: #e8c988;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}
#interior-overlay .interior-close:hover {
  background: #2a2218;
}
#interior-overlay .interior-hint {
  text-align: center;
  font-size: 11px;
  color: #8a7050;
  padding: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: #16120b;
}
