:root {
  --sand: #f5ecdd;
  --card: #fffaf2;
  --ink: #1d2b33;
  --muted: #6f655b;
  --line: #e6d8c2;
  --tile: #1f7a8c;
  --tile-2: #2a9bb0;
  --brick: #c8693c;
  --gold: #d9a441;
  --radius: 16px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--sand);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(42, 155, 176, .10), transparent 40%),
    radial-gradient(circle at 100% 30%, rgba(200, 105, 60, .10), transparent 40%),
    var(--sand);
}
button { font: inherit; cursor: pointer; }

/* ---------- Sarlavha ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px) 8px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 28px;
  background: linear-gradient(135deg, var(--tile), var(--tile-2));
  box-shadow: 0 6px 18px rgba(31, 122, 140, .3);
}
h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; }
.tagline { margin: 2px 0 0; color: var(--muted); }
.chips { display: flex; gap: 8px; }
.chip {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; display: flex; align-items: baseline; gap: 6px; font-weight: 700; font-size: 18px;
}
.chip small { font-weight: 500; color: var(--muted); font-size: 13px; }
.chip.live { align-items: center; }
.chip.live i { width: 10px; height: 10px; border-radius: 50%; background: #2fae5b; box-shadow: 0 0 0 0 rgba(47, 174, 91, .6); animation: live 2s infinite; }
.chip.live.off i { background: #b9b0a5; animation: none; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(47, 174, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 174, 91, 0); } }

.hashar {
  margin: 6px clamp(16px, 4vw, 40px); padding: 10px 16px; border-radius: 12px; color: #fff;
  background: repeating-linear-gradient(-45deg, var(--brick), var(--brick) 14px, #b85b31 14px, #b85b31 28px);
  box-shadow: 0 6px 16px rgba(200, 105, 60, .3);
}

/* ---------- Shoshilinch topshiriqlar ---------- */
.challenges { margin: 6px clamp(16px, 4vw, 40px); display: flex; flex-direction: column; gap: 6px; }
.challenge {
  display: grid; grid-template-columns: auto minmax(80px, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; background: #1d2b33; color: #fff;
  box-shadow: 0 6px 16px rgba(29, 43, 51, .25); font-size: 14px;
}
.challenge .pbar { background: rgba(255, 255, 255, .18); }
.challenge .pbar i { background: linear-gradient(90deg, #7cc3d3, #fff); }
.challenge.done { background: #2f7d4f; }
.challenge time, .challenge .cnum { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 600px) { .challenge { grid-template-columns: 1fr auto; } .challenge .pbar { grid-column: 1 / -1; order: 3; } }

/* ---------- Progress chiziqlari ---------- */
.pbar { display: block; height: 6px; border-radius: 99px; background: #eee3d1; overflow: hidden; min-width: 40px; }
.pbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #e0a526, #f3c969); }

/* ---------- Qidiruv ---------- */
.find { margin: 8px clamp(16px, 4vw, 40px) 0; max-width: 560px; }
.find label { font-weight: 700; display: block; margin-bottom: 6px; }
.find-row { display: flex; gap: 8px; }
.find input {
  flex: 1; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font: inherit;
}
.find input:focus { outline: 2px solid var(--tile-2); outline-offset: 1px; }
.find button, .btn {
  padding: 11px 18px; border-radius: 12px; border: 0; background: var(--ink); color: #fff; font-weight: 600;
}
.find-result {
  margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
}
.find-result b { color: var(--tile); }

/* ---------- Asosiy joylashuv ---------- */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px;
  padding: 18px clamp(16px, 4vw, 40px) 10px;
}
@media (max-width: 1100px) { .layout { grid-template-columns: 1fr; } }

/* ---------- Xarita ---------- */
.map {
  display: grid; gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 54px;
  grid-template-areas:
    "shovot     yangibozor gurlan     river"
    "qoshkopir  urganch    xonqa      river"
    "xiva       yangiariq  bogot      river"
    ".          hazorasp   tuproqqala river";
}
.river {
  grid-area: river; border-radius: 40px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #7cc3d3, #3f9fb5 60%, #2a8aa2);
  opacity: .85;
}
.river::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(170deg, transparent 0 18px, rgba(255, 255, 255, .25) 18px 20px);
  animation: flow 6s linear infinite;
}
@keyframes flow { to { background-position: 0 200px; } }
.river span {
  position: absolute; inset: 0; display: grid; place-items: center; writing-mode: vertical-rl;
  color: #fff; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; font-size: 13px;
}
.map-note { color: var(--muted); font-size: 13px; margin: 10px 2px 0; }

.d-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px 10px; cursor: pointer; position: relative; text-align: left;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}
.d-card:hover, .d-card:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(29, 43, 51, .12); outline: none; }
.d-card.pulse { animation: pulse .9s ease; }
@keyframes pulse { 30% { box-shadow: 0 0 0 4px var(--gold), 0 10px 24px rgba(217, 164, 65, .35); } }
.d-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 6px; }
.d-name { font-weight: 800; font-size: 16px; }
.d-lvl {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--hue-color) 18%, white); color: color-mix(in srgb, var(--hue-color) 70%, black);
}
.d-card canvas { width: 100%; height: 132px; display: block; margin: 4px 0 6px; }
.bar { height: 7px; border-radius: 99px; background: #eee3d1; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--hue-color), color-mix(in srgb, var(--hue-color) 60%, white)); transition: width .6s ease; }
.d-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.d-foot span { white-space: nowrap; }
.d-foot b { color: var(--ink); }
.plus {
  position: absolute; top: 34px; right: 14px; font-weight: 800; color: var(--brick); pointer-events: none;
  animation: up 1.2s ease forwards;
}
@keyframes up { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-28px); } }

.d-proj {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted);
}
.d-proj .built { letter-spacing: 1px; white-space: nowrap; }
.d-proj .pname { color: var(--ink); font-weight: 600; white-space: nowrap; }
.d-proj .pbar { flex: 1 1 40px; }
.d-proj .pnum { font-variant-numeric: tabular-nums; white-space: nowrap; margin-left: auto; }

@media (max-width: 760px) {
  .map { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: none; }
  .map .d-card { grid-area: auto !important; }
  .d-proj .built { flex-basis: 100%; }
  .d-proj .pbar { order: 3; flex-basis: 100%; }
  .river { display: none; }
  .d-card canvas { height: 110px; }
}

/* ---------- O'ng panel ---------- */
.side { display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel h2 { margin: 0 0 8px; font-size: 16px; }
.tabs { display: flex; gap: 6px; background: #f0e5d3; padding: 4px; border-radius: 12px; }
.tab { flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.tab.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.hint { color: var(--muted); font-size: 12.5px; margin: 8px 2px; }
.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.board li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; font-size: 14px; }
.board .rk { font-weight: 800; color: var(--muted); text-align: center; }
.board li:nth-child(1) .rk { color: var(--gold); }
.board .nm { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.board .nm span { font-weight: 600; }
.board .mini { height: 5px; border-radius: 99px; background: #eee3d1; overflow: hidden; }
.board .mini i { display: block; height: 100%; background: var(--hue-color); border-radius: 99px; }
.board .val { font-variant-numeric: tabular-nums; font-weight: 700; }

.feed { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; }
.feed li { padding: 7px 2px; border-bottom: 1px dashed var(--line); font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.feed li.new { animation: fadein .5s ease; }
.feed time { color: var(--muted); font-size: 12px; white-space: nowrap; }
@keyframes fadein { from { background: #fff1c9; } }
.feed .empty { color: var(--muted); }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 16px; }

/* ---------- Tuman oynasi ---------- */
.dlg {
  width: min(720px, 94vw); max-height: 88vh; border: 0; border-radius: 20px; padding: 22px; background: var(--card); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
}
.dlg::backdrop { background: rgba(29, 43, 51, .45); backdrop-filter: blur(2px); }
.dlg .close { position: absolute; top: 12px; right: 12px; border: 0; background: #f0e5d3; width: 34px; height: 34px; border-radius: 50%; }
.dlg h3 { margin: 0; font-size: 24px; }
.dlg .sub { color: var(--muted); margin: 4px 0 12px; }
.dlg canvas { width: 100%; height: 220px; display: block; margin-bottom: 10px; }
.dlg .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
@media (max-width: 600px) { .dlg .grid2 { grid-template-columns: 1fr; } }
.dlg h4 { margin: 0 0 6px; }
.dlg ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
.dlg li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.dlg li small { color: var(--muted); }
.dlg input { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font: inherit; background: #fff; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Tuman oynasidagi qurilishlar ---------- */
.bsection { margin-top: 14px; }
.bgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 600px) { .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bcell { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; background: #fff; }
.bcell .em { font-size: 22px; }
.bcell small { color: var(--muted); }
.bcell.built { background: #eaf6ee; border-color: #bfe3cb; }
.bcell.current { border: 2px solid #e0a526; background: #fff8e6; }
.bcell.todo { opacity: .6; }
.usta { margin: 10px 0 0; }
.bgrid.kasb { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 600px) { .bgrid.kasb { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dlg .houses a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
a.btn { display: inline-block; text-decoration: none; }
.btn.light { background: #f0e5d3; color: var(--ink); }
.votes li { display: grid !important; grid-template-columns: 130px 1fr 60px; align-items: center; gap: 8px; }
.votes small { text-align: right; }
.news pre { white-space: pre-wrap; font: inherit; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0; }

/* ---------- 4-hafta: yo'llar ---------- */
.roads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.roads li { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; font-size: 13px; }
.roads .side { display: flex; flex-direction: column; gap: 3px; }
.roads .side:last-child { text-align: right; }
.roads .side b { font-size: 13.5px; }
.roads .mid { font-size: 16px; }
.roads li.done { grid-template-columns: 1fr; text-align: center; font-weight: 700; color: #2f7d4f; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; border-radius: 12px; color: #fff; font-size: 15px; box-shadow: 0 6px 16px rgba(29, 43, 51, .2); }
.banner.bozor { background: linear-gradient(90deg, #e4572e, #f3a712); }
.banner.final { background: linear-gradient(90deg, #1f4e5f, #1f7a8c); }
.banner.final.closed { background: linear-gradient(90deg, #8a5a00, #d9a441); font-size: 16px; }
.banner time { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- Yangi yil: qor (bayramda) ---------- */
.snow { display: none; }
body.holiday .snow {
  display: block; position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: .55;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff, transparent), radial-gradient(1.5px 1.5px at 90px 120px, #fff, transparent),
    radial-gradient(2px 2px at 160px 60px, #fff, transparent), radial-gradient(1.5px 1.5px at 50px 170px, #fff, transparent),
    radial-gradient(2.5px 2.5px at 130px 190px, #fff, transparent);
  background-size: 200px 200px;
  animation: snow 14s linear infinite;
}
@keyframes snow { to { background-position: 30px 400px; } }

/* ---------- Timelapse (Reels uchun ekran yozuvi) ---------- */
body.timelapse .find, body.timelapse #challenges, body.timelapse #banners, body.timelapse #hashar,
body.timelapse .feed-panel, body.timelapse .map-note, body.timelapse .foot, body.timelapse #roads-panel, body.timelapse #kasb-panel { display: none !important; }
.tl { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; text-align: center;
  background: rgba(29, 43, 51, .88); color: #fff; padding: 14px 28px; border-radius: 18px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.tl-day { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.tl-sub { font-size: 15px; opacity: .85; }
.tl .btn { margin-top: 10px; }

/* =====================================================================
   3D XARITA — zamonaviy interfeys (faqat index.html: body.map3d)
   ===================================================================== */
.map3d {
  --glass: rgba(255, 252, 245, .74);
  --glass-brd: rgba(255, 255, 255, .7);
  --shadow: 0 18px 50px rgba(29, 43, 51, .18), 0 2px 6px rgba(29, 43, 51, .08);
  --accent: #1f8fa6;
  --gold: #e0a526;
  --gap: 14px;
  overflow: hidden;
  background: #cfe6ee;
  font-feature-settings: "tnum" 1;
}

.map3d .scene { position: fixed; inset: 0; z-index: 0; }
.map3d .scene canvas { display: block; outline: none; touch-action: none; }
.map3d .labels-layer { position: absolute; inset: 0; pointer-events: none; }
.map3d .nogl { display: grid; place-items: center; height: 100%; font-weight: 700; color: var(--muted); }

.map3d .glass {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-radius: 20px;
}

/* --- Yuqori panel --- */
.map3d .hud-top {
  position: fixed; top: var(--gap); left: var(--gap); right: var(--gap); z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px;
  pointer-events: none;
}
.map3d .hud-top > * { pointer-events: auto; }
.map3d .brand { display: flex; align-items: center; gap: 12px; }
.map3d .logo { width: 44px; height: 44px; font-size: 24px; border-radius: 13px; }
.map3d h1 { font-size: 21px; }
.map3d .tagline { font-size: 13px; }
.map3d .stats { display: flex; gap: 8px; }
.map3d .stat { display: flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 12px; background: rgba(255, 255, 255, .55); }
.map3d .stat b { font-size: 18px; letter-spacing: -.01em; }
.map3d .stat small { color: var(--muted); }
.map3d .stat.live { align-items: center; }
.map3d .stat.live i { width: 9px; height: 9px; border-radius: 50%; background: #2fae5b; animation: live 2s infinite; }
.map3d .stat.live.off i { background: #b9b0a5; animation: none; }

/* --- Bildirishnomalar (final, bozor, topshiriqlar) --- */
.map3d .toasts {
  position: fixed; top: 92px; left: 50%; transform: translateX(-50%); z-index: 4;
  width: min(640px, calc(100vw - 2 * 360px - 4 * var(--gap))); min-width: 320px;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.map3d .toasts > * { pointer-events: auto; }
.map3d .stack { display: flex; flex-direction: column; gap: 8px; }
.map3d .banner, .map3d .challenge { border-radius: 14px; backdrop-filter: blur(12px); font-size: 14px; }
.map3d .banner.hashar { color: #fff; padding: 10px 14px; background: linear-gradient(90deg, #c8693c, #e0a526); box-shadow: var(--shadow); }
.map3d .challenge { background: rgba(29, 43, 51, .86); }

/* --- Yon panellar --- */
.map3d .panel {
  position: fixed; z-index: 3; top: 92px; bottom: 76px; width: 340px; padding: 14px;
  display: flex; flex-direction: column; gap: 12px; overflow: auto; scrollbar-width: thin;
}
.map3d .panel-left { left: var(--gap); }
.map3d .panel-right { right: var(--gap); bottom: var(--gap); }
.map3d .panel h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.map3d .panel h2 .dot { width: 8px; height: 8px; border-radius: 50%; background: #e4572e; box-shadow: 0 0 0 4px rgba(228, 87, 46, .18); animation: live 2s infinite; }
.map3d .find { margin: 0; max-width: none; }
.map3d .find label { font-size: 14px; }
.map3d .find input { background: rgba(255, 255, 255, .8); border-color: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.map3d .find-result { background: rgba(255, 255, 255, .6); font-size: 14px; }

.map3d .seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(29, 43, 51, .06); }
.map3d .seg-btn { flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 10px; font-weight: 600; font-size: 13px; color: var(--muted); }
.map3d .seg-btn.active { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.map3d .pane { display: flex; flex-direction: column; gap: 8px; }
.map3d .tabs { background: transparent; padding: 0; gap: 6px; }
.map3d .tab { border: 1px solid var(--line); }
.map3d .tab.active { border-color: transparent; }
.map3d .board li { padding: 4px 6px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.map3d .board li:hover { background: rgba(31, 143, 166, .08); }
.map3d .feed { max-height: none; overflow: visible; }
.map3d .feed li { border-bottom-color: rgba(29, 43, 51, .08); }

/* --- Xarita tugmalari --- */
.map3d .map-ctrl { position: fixed; z-index: 3; left: 50%; bottom: var(--gap); transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; border-radius: 16px; }
.map3d .map-ctrl button { border: 0; background: transparent; color: var(--ink); padding: 9px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.map3d .map-ctrl button:hover, .map3d .map-ctrl button[aria-pressed="true"] { background: rgba(31, 143, 166, .14); }

/* --- Tuman paneli (o'ngdan chiqadi) --- */
.map3d .drawer {
  position: fixed; z-index: 6; top: var(--gap); right: var(--gap); bottom: var(--gap); width: min(460px, calc(100vw - 2 * var(--gap)));
  padding: 22px 20px; overflow: auto; animation: drawer-in .35s cubic-bezier(.2, .8, .2, 1);
}
@keyframes drawer-in { from { transform: translateX(30px); opacity: 0; } }
.map3d .drawer .close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(29, 43, 51, .08); color: var(--ink); }
.map3d .drawer h3 { margin: 0 40px 4px 0; font-size: 26px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.map3d .drawer .sub { color: var(--muted); margin: 0 0 12px; }
.map3d .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 12px; }
.map3d .kpi { padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .6); display: flex; flex-direction: column; gap: 2px; }
.map3d .kpi b { font-size: 20px; }
.map3d .kpi small { color: var(--muted); font-size: 12px; }
.map3d .drawer .bgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.map3d .drawer .bgrid.kasb { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.map3d .drawer .bcell { background: rgba(255, 255, 255, .65); }
.map3d .drawer .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.map3d .drawer h4 { margin: 0 0 6px; }
.map3d .drawer ul { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; }
.map3d .drawer li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.map3d .drawer li small { color: var(--muted); }
.map3d .drawer input { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font: inherit; background: rgba(255, 255, 255, .8); color: var(--ink); }
.map3d .drawer .houses a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
.map3d .d-lvl { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--hue-color) 18%, white); color: color-mix(in srgb, var(--hue-color) 70%, black); }

/* --- 3D ichidagi yorliqlar --- */
.map3d .dlbl {
  pointer-events: auto; cursor: pointer; border: 0; font: inherit; color: #1d2b33;
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 12px 7px; border-radius: 14px;
  background: rgba(255, 252, 245, .9); box-shadow: 0 6px 18px rgba(29, 43, 51, .2); border-bottom: 3px solid hsl(var(--hue) 55% 48%);
  transition: transform .15s, box-shadow .15s; white-space: nowrap;
}
.map3d .dlbl b { font-size: 14px; }
.map3d .dlbl em { font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: hsl(var(--hue) 50% 38%); }
.map3d .dlbl span { font-size: 11.5px; color: #6f655b; }
.map3d .dlbl.hover, .map3d .dlbl:hover { transform: translateY(-2px) scale(1.04); }
.map3d .dlbl.active { background: hsl(var(--hue) 55% 45%); color: #fff; }
.map3d .dlbl.active em, .map3d .dlbl.active span { color: rgba(255, 255, 255, .9); }
.map3d .site-lbl, .map3d .road-lbl {
  pointer-events: none; padding: 4px 9px; border-radius: 999px; font-size: 11.5px; white-space: nowrap;
  background: rgba(29, 43, 51, .82); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.map3d .road-lbl { background: rgba(240, 180, 41, .95); color: #1d2b33; font-weight: 600; }
.map3d .road-lbl.done { background: rgba(47, 125, 79, .92); color: #fff; }
.map3d .road-lbl.bridge { background: rgba(31, 122, 140, .95); color: #fff; }
.map3d .river-lbl { pointer-events: none; color: #fff; font-weight: 800; letter-spacing: .35em; text-transform: uppercase; font-size: 13px; text-shadow: 0 2px 8px rgba(0, 60, 80, .6); }
.map3d .float-lbl { pointer-events: none; font-weight: 800; font-size: 18px; color: #c8693c; text-shadow: 0 2px 6px rgba(255, 255, 255, .9); animation: float-up 1.5s ease-out forwards; }
@keyframes float-up { from { transform: translateY(0) scale(.8); opacity: 0; } 15% { opacity: 1; transform: translateY(-6px) scale(1.1); } to { transform: translateY(-60px) scale(1); opacity: 0; } }

/* --- Timelapse --- */
.map3d .tl { position: fixed; z-index: 7; bottom: 80px; }
.map3d.timelapse .panel, .map3d.timelapse .toasts, .map3d.timelapse .map-ctrl, .map3d.timelapse .drawer { display: none !important; }

/* --- Telefon va planshet --- */
@media (max-width: 1100px) {
  .map3d .toasts { width: min(560px, calc(100vw - 2 * var(--gap))); top: auto; bottom: 76px; }
  .map3d .panel-left { width: 320px; }
  .map3d .panel-right { display: none; }
}
@media (max-width: 760px) {
  .map3d { overflow: auto; }
  .map3d .scene { position: sticky; top: 0; height: 62vh; inset: auto; }
  .map3d .hud-top { position: absolute; top: 8px; left: 8px; right: 8px; padding: 8px 10px; border-radius: 16px; }
  .map3d .tagline, .map3d .stat small { display: none; }
  .map3d h1 { font-size: 17px; }
  .map3d .logo { width: 36px; height: 36px; font-size: 20px; }
  .map3d .stat { padding: 6px 8px; }
  .map3d .stat b { font-size: 15px; }
  .map3d .toasts { position: relative; top: auto; bottom: auto; left: auto; transform: none; width: auto; min-width: 0; margin: 10px; }
  .map3d .panel { position: relative; inset: auto; width: auto; margin: 10px; overflow: visible; }
  .map3d .panel-right { display: flex; }
  .map3d .map-ctrl { position: absolute; top: calc(62vh - 58px); bottom: auto; }
  .map3d .map-ctrl span { display: none; }
  .map3d .drawer { top: auto; height: 82vh; left: 0; right: 0; bottom: 0; width: auto; border-radius: 22px 22px 0 0; animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
  .map3d .drawer .grid2 { grid-template-columns: 1fr; }
  .map3d .drawer .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map3d .dlbl { padding: 4px 9px 5px; }
  .map3d .dlbl span { display: none; }
}

/* uzoqdan: qurilish yorliqlari yashirinadi; juda uzoqdan — yo'l yorliqlari ham */
.map3d .scene.far .site-lbl { display: none; }
.map3d .scene.very-far .road-lbl:not(.bridge), .map3d .scene.very-far .dlbl span { display: none; }
/* ixcham bildirishnomalar */
.map3d .toasts { gap: 6px; }
.map3d .toasts .banner { padding: 7px 12px; font-size: 13px; flex-wrap: nowrap; border-radius: 12px; }
.map3d .toasts .banner span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map3d .toasts .challenge { padding: 7px 12px; font-size: 13px; gap: 8px; border-radius: 12px; }

.map3d .roads li { cursor: pointer; padding: 6px; border-radius: 10px; transition: background .15s; }
.map3d .roads li:hover { background: rgba(31, 143, 166, .08); }

.map3d .stat b { white-space: nowrap; }
@media (max-width: 760px) {
  .map3d .dlbl { padding: 3px 8px 4px; border-bottom-width: 2px; }
  .map3d .dlbl b { font-size: 12px; }
  .map3d .dlbl em { display: none; }
  .map3d .river-lbl { font-size: 10px; }
}
.map3d .tl { color: var(--ink); padding: 14px 30px; }
.map3d .tl-day { font-size: 38px; }

/* ---------- Uy egalari yorliqlari va uy kartochkasi ---------- */
.map3d .ulbl {
  pointer-events: auto; cursor: pointer; border: 0; font: 600 10.5px/1 ui-sans-serif, system-ui, sans-serif;
  padding: 3px 6px; border-radius: 999px; background: rgba(255, 252, 245, .88); color: #1d2b33;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18); white-space: nowrap;
}
.map3d .ulbl:hover { background: #fff; transform: scale(1.08); }
.map3d .ulbl.me { background: #e4572e; color: #fff; font-size: 12px; padding: 4px 9px; z-index: 2; }
.map3d .scene:not(.near) .ulbl:not(.me) { display: none; }
.map3d .house-card {
  position: fixed; z-index: 6; left: 50%; bottom: 74px; transform: translateX(-50%); width: min(380px, calc(100vw - 24px));
  padding: 16px; display: flex; flex-direction: column; gap: 10px; animation: drawer-in .3s ease;
}
.map3d .house-card .close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(29, 43, 51, .08); color: var(--ink); }
.map3d .h-top { display: flex; gap: 12px; align-items: center; }
.map3d .h-ava { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; background: var(--hue-color, #1f8fa6); }
.map3d .h-name { font-size: 18px; }
.map3d .h-sub { color: var(--muted); font-size: 13px; }
.map3d .h-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.map3d .h-stats > div { background: rgba(255, 255, 255, .6); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.map3d .h-stats b { font-size: 14px; }
.map3d .h-stats small { color: var(--muted); font-size: 11.5px; }
.map3d .h-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.map3d .h-tags:empty { display: none; }
.map3d .tag { padding: 4px 10px; border-radius: 999px; background: rgba(31, 143, 166, .1); font-size: 13px; }
.map3d .h-empty { margin: 0 30px 0 0; }
.map3d .house-card .row-btns { margin: 0; }
@media (max-width: 760px) { .map3d .house-card { position: fixed; bottom: 10px; } }

/* ---------- Soat va ob-havo ---------- */
.map3d .clock { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 14px; background: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
.map3d .c-day { font-weight: 700; font-size: 13px; color: var(--muted); }
.map3d .c-time { font-weight: 800; font-size: 20px; letter-spacing: .02em; }
.map3d .c-weather { font-size: 14px; white-space: nowrap; }

/* ---------- Hodisalar ---------- */
.map3d .event-toast { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 16px; animation: drawer-in .35s ease; }
.map3d .event-toast .e-ico { font-size: 22px; }
.map3d .event-toast .e-text { flex: 1; font-size: 14px; line-height: 1.3; }
.map3d .event-toast .btn { padding: 8px 14px; white-space: nowrap; }
.map3d .event-toast .close { border: 0; background: transparent; color: var(--muted); font-size: 16px; padding: 4px; }
.map3d .float-lbl.big { font-size: 34px; }

/* ---------- Mini-xarita ---------- */
.map3d .minimap { position: fixed; z-index: 3; right: var(--gap); bottom: var(--gap); width: 230px; padding: 8px; border-radius: 18px; display: flex; flex-direction: column; gap: 4px; }
.map3d .minimap[hidden] { display: none; }
.map3d .minimap canvas { width: 100%; aspect-ratio: 460 / 520; border-radius: 12px; cursor: crosshair; background: #efe6d2; }
.map3d .mm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 0 4px; font-size: 13px; }
.map3d .mm-head small { color: var(--muted); font-size: 10.5px; }
.map3d .mm-legend { display: flex; gap: 8px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); padding: 0 4px; }
.map3d .mm-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 3px; vertical-align: -1px; }
.map3d .mm-legend .mm-you { background: #e4572e; border-radius: 50%; }
.map3d .panel-right { bottom: 318px; }
@media (max-width: 1100px) { .map3d .minimap { display: none; } }
@media (max-width: 760px) {
  .map3d .clock { padding: 4px 8px; gap: 6px; }
  .map3d .c-day { display: none; }
  .map3d .c-time { font-size: 15px; }
  .map3d .panel-right { bottom: auto; }
}

/* ---------- Gazeta, Shon-sharaf zali, Sovg'alar ---------- */
.map3d .mc-sep { width: 1px; margin: 7px 3px; background: rgba(29, 43, 51, .15); }
.map3d .map-ctrl .feat { position: relative; }
.map3d .map-ctrl .feat.has-new::after {
  content: ''; position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: #e4572e; box-shadow: 0 0 0 3px rgba(228, 87, 46, .2); animation: live 2s infinite;
}
@media (max-width: 1366px) { .map3d .map-ctrl button:not(.feat) span { display: none; } }

.map3d .modal {
  position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; padding: 16px;
  background: rgba(15, 24, 32, .38); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade-in .2s ease;
}
.map3d .modal[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { transform: translateY(16px) scale(.98); opacity: 0; } }
.map3d .modal-card {
  position: relative; width: min(720px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto;
  padding: 24px 26px; background: rgba(255, 252, 246, .96); animation: pop-in .3s cubic-bezier(.2, .8, .2, 1); scrollbar-width: thin;
}
.map3d .modal-card > .close {
  position: absolute; top: 14px; right: 14px; z-index: 1; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(29, 43, 51, .08); color: var(--ink); cursor: pointer;
}
.map3d .modal-card h2 { margin: 0 44px 4px 0; font-size: 26px; letter-spacing: -.02em; }
.map3d .modal-card .sub { color: var(--muted); margin: 0 0 14px; line-height: 1.45; }
.map3d .modal-card .empty-note { color: var(--muted); text-align: center; padding: 18px 0; margin: 0; }

/* Gazeta — eski gazeta qog'ozi uslubi (kechasi ham) */
.map3d .modal[data-kind="gazeta"] .modal-card {
  background: #f6efe0 radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .55), transparent 60%); color: #2a2118; width: min(780px, 100%);
}
.map3d .modal[data-kind="gazeta"] .modal-card > .close { background: rgba(42, 33, 24, .1); color: #2a2118; }
.map3d .gz { font-family: Georgia, "Times New Roman", serif; }
.map3d .gz-mast { text-align: center; border-bottom: 4px double #2a2118; padding-bottom: 10px; margin-bottom: 16px; }
.map3d .gz-meta {
  display: flex; justify-content: space-between; gap: 8px; margin: 0 40px 6px; padding-bottom: 6px; border-bottom: 1px solid rgba(42, 33, 24, .35);
  font: 700 11px/1 ui-sans-serif, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .1em; color: #6b5b48;
}
.map3d .gz-mast h2 { margin: 6px 0 2px; font-size: clamp(32px, 7vw, 54px); font-weight: 900; letter-spacing: -.01em; line-height: 1; font-family: inherit; }
.map3d .gz-tag { margin: 4px 0 0; font-style: italic; color: #6b5b48; }
.map3d .gz-lead { padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid rgba(42, 33, 24, .3); }
.map3d .gz-lead h3 { margin: 0 0 8px; font-size: clamp(22px, 4vw, 30px); line-height: 1.15; }
.map3d .gz-lead p { margin: 0; font-size: 16.5px; line-height: 1.55; }
.map3d .gz-lead p::first-letter { float: left; font-size: 3.1em; line-height: .85; font-weight: 900; padding: 4px 6px 0 0; color: #9a3d1c; }
.map3d .gz-cols { columns: 2 250px; column-gap: 26px; column-rule: 1px solid rgba(42, 33, 24, .2); }
.map3d .gz-cols section { break-inside: avoid; margin-bottom: 14px; }
.map3d .gz-cols h4 { margin: 0 0 4px; font: 800 12.5px/1.2 ui-sans-serif, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.map3d .gz-cols p { margin: 0; font-size: 15px; line-height: 1.5; }
.map3d .gz a[data-user] { color: #9a3d1c; text-decoration: none; border-bottom: 1px dotted currentColor; }
.map3d .gz a[data-user]:hover { background: rgba(154, 61, 28, .1); }
.map3d .gz-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; padding-top: 12px; border-top: 4px double #2a2118; font-family: ui-sans-serif, system-ui, sans-serif; }
.map3d .gz-foot small { color: #6b5b48; flex: 1; min-width: 200px; }
.map3d .gz .btn.light { background: #2a2118; color: #f6efe0; }

/* Shon-sharaf zali */
.map3d .fame .seg { margin-bottom: 4px; }
.map3d .fame .seg-btn { cursor: pointer; }
.map3d .podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; margin: 22px 0 12px; }
.map3d .pod { border: 0; background: transparent; font: inherit; color: inherit; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; text-align: center; min-width: 0; }
.map3d .pod.empty { cursor: default; }
.map3d .pod .ava, .map3d .fame-list .ava {
  display: grid; place-items: center; border-radius: 50%; font-weight: 800; color: #fff; background: var(--hue-color, #1f8fa6); flex: none;
}
.map3d .pod .ava { width: 56px; height: 56px; font-size: 22px; box-shadow: 0 0 0 3px #fff, 0 6px 16px rgba(0, 0, 0, .18); transition: transform .2s; }
.map3d .pod.p1 .ava { width: 74px; height: 74px; font-size: 30px; box-shadow: 0 0 0 4px var(--gold), 0 8px 24px rgba(224, 165, 38, .45); }
.map3d .pod:hover .ava { transform: translateY(-4px); }
.map3d .pod .crown { font-size: 28px; margin-bottom: -10px; position: relative; z-index: 1; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-6deg); } }
.map3d .pod b { margin-top: 6px; font-size: 14.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map3d .pod small { color: var(--muted); font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map3d .pod .val { font-weight: 700; font-size: 13px; }
.map3d .pod .step {
  width: 100%; margin-top: 8px; border-radius: 14px 14px 4px 4px; display: grid; place-items: center;
  font: 900 28px/1 ui-sans-serif, system-ui, sans-serif; color: rgba(255, 255, 255, .95); text-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.map3d .pod.p1 .step { height: 96px; background: linear-gradient(#f5c95a, #e0a526); }
.map3d .pod.p2 .step { height: 68px; background: linear-gradient(#cfd8de, #a3b1bb); }
.map3d .pod.p3 .step { height: 48px; background: linear-gradient(#e4a37b, #c8693c); }
.map3d .fame-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.map3d .fame-list li { display: grid; grid-template-columns: 24px 34px 1fr auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.map3d .fame-list li:hover { background: rgba(31, 143, 166, .08); }
.map3d .fame-list .no { color: var(--muted); font-weight: 700; text-align: center; }
.map3d .fame-list .ava { width: 34px; height: 34px; font-size: 14px; }
.map3d .fame-list .who { display: flex; flex-direction: column; min-width: 0; }
.map3d .fame-list .who b, .map3d .fame-list .who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map3d .fame-list .who small { color: var(--muted); font-size: 12px; }
.map3d .fame-list .val { font-weight: 700; font-size: 13px; white-space: nowrap; }

/* Sovg'alar va kunlik vazifalar */
.map3d .gift-hero { display: flex; gap: 14px; align-items: flex-start; }
.map3d .gift-hero .chest { font-size: 46px; line-height: 1; animation: bob 2.6s ease-in-out infinite; }
.map3d .gift-tasks { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.map3d .gift-tasks li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.map3d .gt-ico { font-size: 20px; }
.map3d .gift-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.map3d .gift-info > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: rgba(224, 165, 38, .12); }
.map3d .gift-info span { font-weight: 700; font-variant-numeric: tabular-nums; }
.map3d .gift-info small { color: var(--muted); font-size: 12px; }
.map3d .gift-find { margin: 0 0 10px; max-width: none; }
.map3d .gift-go { margin-top: 8px; width: 100%; }
.map3d .h-daily { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .6); }
.map3d .h-daily.opened { background: linear-gradient(135deg, rgba(224, 165, 38, .22), rgba(255, 255, 255, .55)); }
.map3d .hd-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.map3d .hd-streak { font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(228, 87, 46, .12); color: #c0431d; white-space: nowrap; }
.map3d .h-daily ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.map3d .h-daily li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.map3d .h-daily li i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; font: 900 11px/1 system-ui; color: #fff; }
.map3d .h-daily li.done i { background: #2fae5b; box-shadow: none; }
.map3d .h-daily li.done span { color: var(--muted); text-decoration: line-through; }
.map3d .h-daily li small { color: var(--muted); font-variant-numeric: tabular-nums; }
.map3d .hd-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.map3d .hd-reset { white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .map3d .modal { padding: 0; place-items: end stretch; }
  .map3d .modal-card { width: 100%; max-height: 90vh; max-height: 90dvh; border-radius: 22px 22px 0 0; padding: 20px 16px; animation-name: sheet-in; }
  .map3d .modal[data-kind="gazeta"] .modal-card { width: 100%; }
  .map3d .gz-meta { margin: 0 36px 6px 0; font-size: 10px; }
  .map3d .podium { gap: 6px; }
  .map3d .pod .ava { width: 46px; height: 46px; font-size: 18px; }
  .map3d .pod.p1 .ava { width: 60px; height: 60px; font-size: 24px; }
  .map3d .pod small { display: none; }
  .map3d .fame .seg-btn { font-size: 12px; padding: 7px 4px; }
  .map3d .gift-info { grid-template-columns: 1fr; }
  .map3d .house-card { max-height: 72vh; overflow: auto; }
}

/* Kichik telefonlar: yuqori panel ekranga sig'sin (sahifa yon tomonga kengaymasin) */
.map3d .scene { overflow: hidden; }
@media (max-width: 480px) {
  .map3d .hud-top { gap: 6px; padding: 7px 8px; }
  .map3d .logo, .map3d .stat.live { display: none; }
  .map3d h1 { font-size: 15px; line-height: 1.1; }
  .map3d .clock { padding: 4px 7px; gap: 5px; }
  .map3d .c-time { font-size: 14px; }
  .map3d .c-weather { font-size: 12.5px; }
  .map3d .stats { gap: 4px; }
  .map3d .stat { padding: 5px 7px; }
  .map3d .stat b { font-size: 13.5px; }
}

/* ---------- Tangalar va bizneslar ---------- */
.map3d .h-wallet { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(242, 182, 50, .2), rgba(255, 255, 255, .55)); }
.map3d .hw-top { display: flex; align-items: baseline; gap: 6px; }
.map3d .hw-coin { font-size: 18px; align-self: center; }
.map3d .hw-top b { font-size: 20px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.map3d .hw-top small { color: var(--muted); }
.map3d .hw-inc { margin-left: auto; font-weight: 700; font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: rgba(47, 174, 91, .14); color: #1f7a42; }
.map3d .hw-biz { display: flex; gap: 6px; flex-wrap: wrap; }
.map3d .hw-biz .tag { border: 0; font: inherit; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.map3d .hw-biz .tag:hover { background: rgba(31, 143, 166, .2); }
.map3d .hw-biz small { color: #1f7a42; font-weight: 700; }
.map3d .hw-hint, .map3d .hw-foot { font-size: 12.5px; color: var(--muted); }

.map3d .econ-h { margin: 16px 0 8px; font-size: 15px; }
.map3d .econ-levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.map3d .econ-levels span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; border-radius: 12px; background: rgba(255, 255, 255, .65); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.map3d .econ-levels b { color: #1f7a42; }
.map3d .econ-levels small { font-size: 11px; color: var(--muted); }
.map3d .biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.map3d .biz-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px; border-radius: 16px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.map3d .bc-emoji { font-size: 28px; }
.map3d .bc-price { font-weight: 800; color: #b07d10; }
.map3d .biz-card small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.map3d .biz-card code { margin-top: 4px; font: 600 11.5px/1.2 ui-monospace, monospace; padding: 3px 7px; border-radius: 8px; background: rgba(29, 43, 51, .07); }
.map3d .econ .hint { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.map3d .econ-districts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 14px; }
.map3d .econ-districts button { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; padding: 7px 10px; border: 0; border-radius: 12px; background: rgba(29, 43, 51, .05); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.map3d .econ-districts button:hover { background: rgba(31, 143, 166, .12); }
.map3d .econ-districts i { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #f2b632 calc(var(--p) * 100%), rgba(29, 43, 51, .1) 0); }
.map3d .econ-districts small { color: var(--muted); font-variant-numeric: tabular-nums; }
.map3d .econ-find { margin: 0 0 10px; max-width: none; }
.map3d .ulbl.biz { background: rgba(242, 182, 50, .95); color: #1d2b33; }
.map3d .fame .seg { overflow-x: auto; scrollbar-width: none; }
.map3d .fame .seg-btn { white-space: nowrap; }
@media (max-width: 760px) {
  .map3d .econ-levels { grid-template-columns: repeat(3, 1fr); }
  .map3d .biz-grid { grid-template-columns: repeat(2, 1fr); }
}
.map3d .map-ctrl button { white-space: nowrap; }
@media (max-width: 1700px) { .map3d .map-ctrl button:not(.feat) span { display: none; } }
@media (max-width: 1240px) { .map3d .map-ctrl { gap: 2px; } .map3d .map-ctrl button { padding: 9px 11px; } }

/* ---------- Aholi: odam ustidagi @username ---------- */
.map3d .ulbl.res { font-size: 10px; padding: 2px 6px; pointer-events: auto; }
.map3d .ulbl.res::before { margin-right: 3px; }
.map3d .ulbl.k-usta::before { content: '🔨'; }
.map3d .ulbl.k-dehqon::before { content: '🌾'; }
.map3d .ulbl.k-oshpaz::before { content: '🍲'; }
.map3d .ulbl.k-oqituvchi::before { content: '📚'; }
.map3d .ulbl.k-sotuvchi::before { content: '🛒'; }

/* ---------- Avtobus: yo'lovchilar oynasi ---------- */
.map3d .bus-pop {
  pointer-events: auto; position: relative; width: 230px; max-height: 240px; display: flex; flex-direction: column; gap: 6px;
  padding: 12px 12px 10px; border-radius: 14px; background: rgba(255, 252, 245, .97); color: #1d2b33;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font: 500 12px/1.35 ui-sans-serif, system-ui, sans-serif; transform: translateY(-50%);
}
.map3d .bus-pop > b { font-size: 13px; padding-right: 18px; }
.map3d .bus-pop small { color: #5b6670; }
.map3d .bus-pop .bp-n { font-size: 11px; }
.map3d .bus-pop .bp-x { position: absolute; top: 6px; right: 6px; border: 0; background: transparent; cursor: pointer; font-size: 13px; color: #5b6670; }
.map3d .bus-pop .bp-list { display: flex; flex-wrap: wrap; gap: 4px; overflow: auto; }
.map3d .bus-pop .bp-list button { border: 0; border-radius: 999px; padding: 3px 8px; background: #efe6d2; color: #1d2b33; font: 600 11px/1.2 inherit; cursor: pointer; }
.map3d .bus-pop .bp-list button:hover { background: #e0a526; }
.map3d .bus-pop em { color: #5b6670; }

/* ---------- Mualliflar ---------- */
.credits { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.credits a { color: inherit; }

/* =====================================================================
   Obyekt va odam kartasi (o'ng tomonda), 💼 Ishlar oynasi
   ===================================================================== */
.map3d .house-card {
  left: auto; right: var(--gap); top: 92px; bottom: auto; transform: none; z-index: 7;
  width: min(392px, calc(100vw - 24px)); max-height: calc(100vh - 92px - 80px); max-height: calc(100dvh - 92px - 80px);
  overflow: auto; scrollbar-width: thin; gap: 9px;
}
.map3d .house-card > :first-child + * { margin-right: 30px; }
.map3d .h-status { font-size: 13px; color: var(--muted); margin-top: 1px; }
.map3d .h-worth { font-size: 13px; color: var(--muted); }
.map3d .h-worth b { color: var(--ink); font-size: 16px; }
.map3d .h-stats > div { gap: 1px; }
.map3d .h-stats em { font-style: normal; font-size: 11px; color: #1f7a42; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map3d .h-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.map3d .h-box {
  display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 9px 10px; border-radius: 12px; border: 0;
  background: rgba(255, 255, 255, .6); color: var(--ink); font: inherit; min-width: 0;
}
.map3d .h-box:not(:disabled):hover { background: rgba(255, 255, 255, .9); box-shadow: 0 2px 8px rgba(29, 43, 51, .08); }
.map3d .h-box:disabled { cursor: default; }
.map3d .h-box i { font-style: normal; font-size: 17px; line-height: 1.2; }
.map3d .h-box span { display: flex; flex-direction: column; min-width: 0; }
.map3d .h-box small { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.map3d .h-box b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map3d .h-box em { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map3d .hw-parts { display: flex; flex-wrap: wrap; gap: 4px; }
.map3d .hw-parts span { font-size: 11.5px; padding: 2px 7px; border-radius: 999px; background: rgba(47, 174, 91, .12); color: #1f7a42; font-weight: 600; }

.map3d .pc-head { display: flex; gap: 12px; align-items: center; }
.map3d .pc-ico {
  width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  background: color-mix(in srgb, var(--hue-color, #1f8fa6) 16%, white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hue-color, #1f8fa6) 25%, transparent);
}
.map3d .pc-title { font-size: 18px; display: block; line-height: 1.2; }
.map3d .pc-sub { color: var(--muted); font-size: 13px; }
.map3d .pc-note { margin: 0; font-size: 13.5px; color: var(--muted); }
.map3d .pc-rows { margin: 0; display: flex; flex-direction: column; }
.map3d .pc-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(29, 43, 51, .07); font-size: 13.5px; }
.map3d .pc-rows > div:last-child { border-bottom: 0; }
.map3d .pc-rows dt { color: var(--muted); white-space: nowrap; }
.map3d .pc-rows dd { margin: 0; text-align: right; font-weight: 600; }
.map3d .pc-rows dd small { color: var(--muted); font-weight: 500; }
.map3d .pc-rows a, .map3d .pc-top a, .map3d .pc-how a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.map3d .pc-sec { border-top: 1px solid rgba(29, 43, 51, .1); padding-top: 8px; }
.map3d .pc-sec > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 2px 0;
}
.map3d .pc-sec > summary::-webkit-details-marker { display: none; }
.map3d .pc-sec > summary::after { content: '⌄'; margin-left: auto; color: var(--muted); font-size: 16px; transition: transform .2s; }
.map3d .pc-sec[open] > summary::after { transform: rotate(180deg); }
.map3d .pc-sec[open] > summary { margin-bottom: 6px; color: var(--accent); }
.map3d .pc-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.map3d .pc-badge.ok { background: rgba(47, 174, 91, .14); color: #1f7a42; }
.map3d .pc-badge.full { background: rgba(228, 87, 46, .12); color: #b8441f; }
.map3d .pc-bar { margin: 6px 0; }
.map3d .pc-staff { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.map3d .pc-staff .tag { border: 0; font: inherit; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.map3d .pc-staff .tag:hover { background: rgba(31, 143, 166, .2); }
.map3d .pc-staff em { color: var(--muted); font-size: 13px; }
.map3d .pc-cmd {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 8px 10px; border-radius: 12px;
  background: rgba(31, 143, 166, .08); border: 1px dashed rgba(31, 143, 166, .35);
}
.map3d .pc-cmd small { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; }
.map3d .pc-cmd code { font: 700 14px/1.3 ui-monospace, monospace; color: var(--ink); overflow-wrap: anywhere; }
.map3d .pc-cmd button, .map3d .pc-prices button, .map3d .jb-act button {
  border: 0; border-radius: 9px; padding: 6px 10px; background: var(--ink); color: #fff; font: 600 12px/1 inherit; white-space: nowrap;
}
.map3d .pc-progress { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.map3d .pc-progress .pbar { grid-column: 1 / -1; height: 8px; }
.map3d .pc-progress b { font-size: 20px; }
.map3d .pc-progress small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.map3d .pc-top { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.map3d .pc-top li { padding-left: 2px; }
.map3d .pc-top li span { float: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.map3d .pc-how p { margin: 0 0 6px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.map3d .pc-how b { color: var(--ink); }
.map3d .pc-prices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.map3d .pc-prices li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 1px 10px; align-items: center; padding: 7px 9px; border-radius: 11px;
  background: rgba(255, 255, 255, .6); font-size: 13.5px;
}
.map3d .pc-prices li small { grid-column: 1 / 3; color: var(--muted); font-size: 11.5px; }
.map3d .pc-prices li button { grid-row: 1 / 3; grid-column: 3; }

.map3d .following { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 8px; }
.map3d .following small { width: 100%; color: var(--muted); font-size: 12px; font-weight: 600; }
.map3d .following .tag { border: 0; font: inherit; font-size: 12.5px; color: var(--ink); cursor: pointer; }

.map3d .whatsnew {
  position: fixed; z-index: 8; right: var(--gap); bottom: 76px; width: min(360px, calc(100vw - 24px)); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px; animation: drawer-in .35s ease; font-size: 13.5px;
}
.map3d .whatsnew > b { font-size: 15px; }
.map3d .whatsnew ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; color: var(--muted); }
.map3d .whatsnew li b { color: var(--ink); }
.map3d .whatsnew .row-btns { justify-content: flex-end; margin: 0; }

.map3d .jb-districts { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0 4px; }
.map3d .jb-districts button { border: 0; border-radius: 999px; padding: 6px 11px; background: rgba(29, 43, 51, .06); color: var(--ink); font: 600 12.5px/1 inherit; }
.map3d .jb-districts button.active { background: var(--ink); color: #fff; }
.map3d .jb-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.map3d .jb-list li {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 14px;
  background: rgba(255, 255, 255, .62);
}
.map3d .jb-list li.full { opacity: .6; }
.map3d .jb-list li.muted { display: block; color: var(--muted); text-align: center; }
.map3d .jb-ico { font-size: 24px; text-align: center; }
.map3d .jb-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.map3d .jb-main b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map3d .jb-main small { color: var(--muted); font-size: 12px; }
.map3d .jb-main .pbar { height: 5px; margin-top: 3px; }
.map3d .jb-pay { display: flex; flex-direction: column; align-items: flex-end; }
.map3d .jb-pay b { color: #1f7a42; font-size: 16px; }
.map3d .jb-pay small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.map3d .jb-act { display: flex; gap: 5px; align-items: center; }
.map3d .jb-act span { color: var(--muted); font-size: 12px; }
.map3d .jb-act button[data-go] { background: rgba(29, 43, 51, .08); color: var(--ink); }
.map3d .jb-rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.map3d .jb-rules b { color: var(--ink); }
.map3d .jobs .pc-cmd { margin-bottom: 10px; }

@media (max-width: 760px) {
  .map3d .house-card { left: 50%; right: auto; top: auto; bottom: 10px; transform: translateX(-50%); max-height: 72vh; max-height: 72dvh; }
  .map3d .whatsnew { left: 12px; right: 12px; width: auto; bottom: 12px; }
  .map3d .jb-list li { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .map3d .jb-act { grid-column: 2 / -1; justify-content: flex-end; }
}
