/* ─── ClaimTheMap.lol · light & warm, outbid.lol-inspired ───────── */
:root {
  --ocean: #f6f1e9;
  --ocean-deep: #f1eae0;
  --land: #ffffff;
  --land-line: #ddd2c4;
  --land-hover: #fbe3d6;
  --ink: #37322e;
  --ink-dim: #8d8579;
  --coral: #e8734f;
  --coral-deep: #d95f3b;
  --coral-tint: #fae4da;
  --green: #3bab6f;
  --card: #ffffff;
  --card-line: #eadfd2;
  --mono: 'Spline Sans Mono', ui-monospace, monospace;
  --sans: 'Figtree', system-ui, sans-serif;
  --display: 'Bricolage Grotesque', var(--sans);
  --sheet-radius: 22px;
  --shadow: 0 10px 40px #a8907022, 0 2px 8px #a8907018;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--sans);
  background: var(--ocean);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ─── map ─── */
#map {
  position: fixed; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, #faf6f0 0%, var(--ocean) 55%, var(--ocean-deep) 100%);
  outline: none;
}
.leaflet-container { background: transparent; font-family: var(--sans); }
.leaflet-interactive { cursor: pointer; }
path.leaflet-interactive:focus { outline: none; }
.leaflet-bar { border: 1px solid var(--card-line) !important; box-shadow: var(--shadow) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a { background: var(--card) !important; color: var(--ink) !important; border-color: var(--card-line) !important; }

.country-tip {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 12px;
  color: var(--ink); font-family: var(--sans); font-size: 13px; padding: 8px 12px;
  box-shadow: var(--shadow);
}
.country-tip::before { display: none; }
.country-tip .tip-price { color: var(--coral-deep); font-weight: 700; }

@keyframes claimed-flash {
  0% { filter: brightness(1.6) saturate(1.6); } 100% { filter: none; }
}
.flash { animation: claimed-flash 1.2s ease-out; }

.logo-marker { pointer-events: none; }
.logo-marker img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 24%; background: #fff;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 14px #a8907059;
  animation: logo-in .35s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes logo-in { from { transform: scale(.4); opacity: 0; } }

/* ─── top bar ─── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px 26px;
  background: linear-gradient(to bottom, #f6f1e9f2 0%, #f6f1e9b8 60%, transparent 100%);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; user-select: none; }
.brand-globe { font-size: 24px; filter: drop-shadow(0 2px 6px #e8734f44); }
.brand-name {
  font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -.01em;
  color: var(--ink);
}
.brand-name em { font-style: normal; color: var(--coral); }
.brand-lol { font-weight: 600; color: var(--ink-dim); font-size: 13px; }

.stats { display: flex; gap: 10px; }
.stat {
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  background: var(--card); border: 1px solid var(--card-line); border-radius: 14px;
  padding: 8px 14px; box-shadow: 0 2px 10px #a8907015;
}
.stat-label {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-dim);
}
.stat-value {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.15;
}
#stat-revenue { color: var(--coral-deep); }
.stat-dim { color: var(--ink-dim); font-size: 12px; }
@keyframes tick-pop { 50% { transform: scale(1.18); } }
.tick { animation: tick-pop .45s ease; display: inline-block; }

/* ─── hint pill ─── */
.hint {
  position: fixed; top: 78px; left: 50%; transform: translateX(-50%); z-index: 900;
  font-size: 13px; font-weight: 500; color: var(--ink-dim);
  background: var(--card); border: 1px solid var(--card-line); border-radius: 999px;
  padding: 8px 18px; box-shadow: var(--shadow);
  animation: hint-in .8s .6s both;
  pointer-events: none; white-space: nowrap;
}
.hint strong { color: var(--coral-deep); }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, -8px); } }
.hint.gone { transition: opacity .4s; opacity: 0; }

/* ─── ticker ─── */
.ticker {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 18px;
  background: #fffdfaf5;
  border-top: 1px solid var(--card-line);
  font-size: 13px;
  overflow: hidden;
}
.ticker-dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px #3bab6f22;
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 50% { opacity: .4; } }
.ticker-track { display: flex; gap: 36px; white-space: nowrap; animation: ticker-scroll 30s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll { to { transform: translateX(-50%); } }
.ticker-item { color: var(--ink-dim); }
.ticker-item b { color: var(--ink); font-weight: 600; }
.ticker-item .t-amt { font-family: var(--mono); color: var(--coral-deep); font-weight: 600; }

/* ─── panel (desktop: right card · mobile: bottom sheet) ─── */
.panel {
  position: fixed; z-index: 1100;
  right: 18px; top: 80px; width: 366px; max-height: calc(100dvh - 138px);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--card);
  border: 1px solid var(--card-line); border-radius: var(--sheet-radius);
  box-shadow: 0 24px 64px #a890703d, 0 4px 16px #a8907022;
  padding: 20px 22px 22px;
  animation: panel-in .28s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes panel-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.panel-drag { display: none; }
.panel-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--ocean); border: 1px solid var(--card-line); color: var(--ink-dim); border-radius: 999px;
  width: 30px; height: 30px; font-size: 12px; cursor: pointer;
}
.panel-close:hover { color: var(--ink); background: var(--coral-tint); }

.panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.panel-flag {
  flex: none; width: 54px; height: 54px; border-radius: 16px;
  background: var(--ocean); border: 1px solid var(--card-line);
  display: grid; place-items: center; font-size: 26px; overflow: hidden;
}
.panel-flag img { width: 100%; height: 100%; object-fit: cover; }
.panel-name { font-family: var(--display); font-size: 22px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.panel-type {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  color: var(--ink-dim); margin-top: 4px;
}

.panel-owner { margin-bottom: 14px; }
.owner-card {
  display: flex; align-items: center; gap: 10px;
  background: #fbf8f3; border: 1px solid var(--card-line); border-radius: 14px;
  padding: 11px 13px;
}
.owner-chip { flex: none; width: 12px; height: 12px; border-radius: 4px; }
.owner-name { font-weight: 700; font-size: 14px; }
.owner-link { font-size: 12px; color: var(--ink-dim); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 200px; }
.owner-link:hover { color: var(--coral-deep); }
.owner-none {
  font-size: 13px; font-weight: 500; color: var(--ink-dim);
  background: #fbf8f3; border: 1px dashed var(--land-line); border-radius: 14px;
  padding: 13px; text-align: center;
}

.panel-bidrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.bid-current { display: flex; flex-direction: column; }
.bid-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-dim); }
.bid-amount { font-family: var(--mono); font-size: 27px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }

.btn-claim {
  font-family: var(--display); font-weight: 700; font-size: 15px;
  background: var(--coral); color: #fff; border: 0; border-radius: 999px;
  padding: 13px 24px; cursor: pointer;
  box-shadow: 0 6px 20px #e8734f4d, inset 0 -2px 0 #0000001a;
  transition: transform .12s, background .12s, box-shadow .12s;
}
.btn-claim:hover { transform: translateY(-1px); background: var(--coral-deep); box-shadow: 0 10px 26px #e8734f59; }
.btn-claim:active { transform: translateY(1px); }

/* ─── bid form ─── */
.bidform { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--card-line); padding-top: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.field > span { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--ink-dim); }
.field i { text-transform: none; letter-spacing: 0; opacity: .7; font-weight: 500; }
.field input[type="text"], .field input[type="email"], .field input[type="number"] {
  background: #fbf8f3; border: 1px solid var(--card-line); border-radius: 12px;
  color: var(--ink); font-family: var(--sans); font-size: 15px; font-weight: 500; padding: 11px 13px;
  outline: none; width: 100%;
}
.field input::placeholder { color: #beb5a7; }
.field input:focus { border-color: var(--coral); background: #fff; box-shadow: 0 0 0 3px #e8734f22; }
.field-row { display: flex; gap: 10px; }
.field-color { flex: 0 0 64px; }
.field input[type="color"] {
  width: 100%; height: 44px; border: 1px solid var(--card-line); border-radius: 12px;
  background: #fbf8f3; padding: 5px; cursor: pointer;
}
.amount-wrap { position: relative; }
.amount-wrap em { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-style: normal; font-family: var(--mono); color: var(--coral-deep); font-weight: 600; }
.amount-wrap input { padding-left: 28px !important; font-family: var(--mono) !important; font-weight: 600; }
.logo-note { font-size: 12px; line-height: 1.5; color: var(--ink-dim); }
.allpay-note {
  font-size: 12.5px; line-height: 1.5; font-weight: 500; color: #b3552f;
  background: var(--coral-tint); border: 1px solid #e8734f40; border-radius: 12px; padding: 10px 13px;
}
.btn-pay {
  font-family: var(--display); font-weight: 700; font-size: 15px;
  background: #635bff; color: #fff; border: 0; border-radius: 999px;
  padding: 14px; cursor: pointer;
  box-shadow: 0 6px 20px #635bff40;
  transition: transform .12s, filter .12s;
}
.btn-pay:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-pay:disabled { opacity: .55; cursor: wait; transform: none; }
.bid-error {
  font-size: 13px; font-weight: 600; color: #c0361d;
  background: #f8d9d2; border-radius: 10px; padding: 9px 13px;
}

/* ─── history ─── */
.history { margin-top: 16px; border-top: 1px solid var(--card-line); padding-top: 14px; }
.history-title { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-dim); margin-bottom: 8px; }
.history-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.history-list li {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 500; padding: 8px 11px; border-radius: 11px; background: #fbf8f3;
}
.history-list .h-chip { flex: none; width: 9px; height: 9px; border-radius: 3px; }
.history-list .h-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-list .h-amt { font-family: var(--mono); font-weight: 600; color: var(--coral-deep); font-variant-numeric: tabular-nums; }
.history-list .h-when { font-family: var(--mono); font-size: 10px; color: var(--ink-dim); }
.history-list li.outbid { opacity: .55; }
.history-list li.outbid .h-amt { color: var(--ink-dim); text-decoration: line-through; }

.share-x {
  display: block; text-align: center; margin-top: 14px;
  font-size: 13px; font-weight: 600; color: var(--ink-dim); text-decoration: none;
  border: 1px solid var(--card-line); border-radius: 999px; padding: 11px;
}
.share-x:hover { color: var(--ink); border-color: var(--ink-dim); background: #fbf8f3; }

/* ─── leaderboard ─── */
.leader {
  position: fixed; left: 18px; bottom: 56px; z-index: 900; width: 256px;
  background: var(--card);
  border: 1px solid var(--card-line); border-radius: 18px; padding: 15px 17px;
  box-shadow: var(--shadow);
  animation: panel-in .25s ease;
}
.leader h3 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--ink-dim); margin-bottom: 10px; }
.leader ol { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.leader li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
.leader li:hover .l-name { color: var(--coral-deep); }
.leader .l-rank { font-family: var(--mono); font-size: 10px; color: var(--ink-dim); width: 14px; }
.leader .l-chip { flex: none; width: 9px; height: 9px; border-radius: 3px; }
.leader .l-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader .l-amt { font-family: var(--mono); font-weight: 600; color: var(--coral-deep); font-variant-numeric: tabular-nums; }
.leader-toggle {
  position: fixed; left: 18px; bottom: 56px; z-index: 899;
  width: 46px; height: 46px; border-radius: 16px; font-size: 20px; cursor: pointer;
  background: var(--card); border: 1px solid var(--card-line);
  box-shadow: var(--shadow);
}

/* ─── toast ─── */
.toast {
  position: fixed; top: 78px; left: 50%; transform: translateX(-50%); z-index: 1200;
  font-size: 14px; font-weight: 500;
  background: var(--card); border: 1px solid #e8734f66; border-radius: 14px;
  color: var(--ink); padding: 12px 22px;
  box-shadow: 0 12px 40px #e8734f2e, var(--shadow);
  animation: toast-in .3s cubic-bezier(.2,.9,.3,1.2);
  max-width: min(90vw, 480px); text-align: center;
}
.toast b { color: var(--coral-deep); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -12px); } }

/* ─── mobile ─── */
@media (max-width: 720px) {
  .topbar { padding: 10px 14px 22px; }
  .stats { gap: 8px; }
  .stat { padding: 6px 11px; border-radius: 12px; }
  .stat-visitors { display: none; }
  .stat-value { font-size: 14px; }
  .brand-name { font-size: 14px; }
  .hint { top: 66px; font-size: 12px; }

  .panel {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%;
    max-height: 78dvh;
    border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    padding-top: 8px;
    animation: sheet-in .3s cubic-bezier(.2,.9,.3,1.05);
  }
  @keyframes sheet-in { from { transform: translateY(40%); opacity: .5; } }
  .panel-drag { display: grid; place-items: center; padding: 4px 0 10px; }
  .panel-drag span { width: 40px; height: 4px; border-radius: 4px; background: var(--land-line); }

  .leader { left: 10px; right: 10px; width: auto; bottom: 50px; }
  .leader-toggle { bottom: 50px; left: 10px; }
  .ticker { font-size: 12px; height: 36px; }
}

/* scrollbars */
.panel::-webkit-scrollbar { width: 8px; }
.panel::-webkit-scrollbar-thumb { background: var(--card-line); border-radius: 8px; }
