:root {
  --ink: #1d2b3a; --ink-2: #4a5a6b; --muted: #8593a3; --line: #e4e0d8; --paper: #fbf8f3;
  --brick: #c4532d; --gold: #e0a526; --green: #2e9d6a;
  font-family: "Noto Sans Georgian", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.hidden { display: none !important; }

.hub-top { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--ink); color: #fff; }
.brand { display: flex; align-items: baseline; text-decoration: none; color: #fff; min-width: 0; }
.brand-tag { font-family: "Noto Serif Georgian", serif; color: var(--gold); font-size: 24px; font-weight: 700; margin-right: 2px; }
.brand-text { font-family: "Noto Serif Georgian", serif; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chip { background: var(--gold); color: var(--ink); text-decoration: none; border-radius: 999px; padding: 6px 12px; font-size: 13px; white-space: nowrap; }

.hero { position: relative; }
#gmap { height: 52vh; min-height: 300px; max-height: 560px; background: #e9e6df; z-index: 0; }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 500; padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(251,248,243,1) 30%, rgba(251,248,243,0)); pointer-events: none; }
.hero-text h1 { font-family: "Noto Serif Georgian", serif; font-size: 24px; margin: 0 0 4px; line-height: 1.25; }
.hero-text p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.city-pin { display: flex; flex-direction: column; align-items: center; text-decoration: none; width: 64px; }
.pin-img { width: 52px; height: 52px; border-radius: 50%; border: 3px solid #fff; background: var(--brick) center/cover;
  box-shadow: 0 3px 10px rgba(0,0,0,.35); transition: transform .15s; }
.city-pin:hover .pin-img { transform: scale(1.12); }
.pin-name { margin-top: 3px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }

.hub-main { max-width: 1100px; margin: 0 auto; padding: 0 12px 30px; }
.hub-tabs { position: sticky; top: calc(52px + env(safe-area-inset-top)); z-index: 900; display: flex; gap: 6px; background: var(--paper); padding: 10px 0; }
.hub-tabs button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 11px 8px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; min-height: 44px; }
.hub-tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.city-card { display: block; text-decoration: none; background: #fff; border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(29,43,58,.06); transition: transform .15s; }
.city-card:active { transform: scale(.98); }
.cc-img { height: 170px; background: linear-gradient(135deg, var(--brick), var(--ink)) center/cover; position: relative; }
.cc-region { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.cc-body { padding: 14px 16px 16px; }
.cc-body h2 { font-family: "Noto Serif Georgian", serif; font-size: 21px; margin: 0 0 4px; }
.cc-body p { margin: 0 0 10px; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.cc-meta { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.cc-bar { height: 6px; background: #eee8de; border-radius: 6px; overflow: hidden; }
.cc-bar i { display: block; height: 100%; background: var(--gold); }
.cc-gela { font-size: 12.5px; color: #8a6200; margin-top: 6px; font-weight: 600; }

.list .row { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); text-decoration: none; min-height: 64px; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; font-size: 15px; }
.list .grow small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank { width: 26px; text-align: center; font-weight: 700; color: var(--muted); }
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0; }
.av.gela { background: var(--gold); color: var(--ink); }
.xp { font-weight: 700; color: var(--brick); white-space: nowrap; }
.bar { height: 4px; background: #ebe6de; border-radius: 4px; overflow: hidden; margin-top: 5px; }
.bar i { display: block; height: 100%; background: var(--green); }
.thumb { width: 56px; height: 56px; border-radius: 10px; background: #ddd center/cover; flex-shrink: 0; }
.muted { color: var(--muted); font-size: 14px; padding: 6px; }
.hub-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }

@media (max-width: 640px) {
  .brand-text { font-size: 15px; }
  #gmap { height: 46vh; }
  .hero-text h1 { font-size: 20px; }
  .cities { grid-template-columns: 1fr; }
  .cc-img { height: 150px; }
}
