:root {
  --bg: #060a13;
  --bg-2: #0a111f;
  --surface: rgba(14, 21, 37, 0.88);
  --surface-solid: #0e1525;
  --surface-2: #142035;
  --line: rgba(148, 163, 184, 0.14);
  --line-2: rgba(148, 163, 184, 0.24);
  --text: #e8eef8;
  --muted: #8d9bb5;
  --faint: #5d6b85;
  --accent: #3ee08f;
  --accent-2: #22c47a;
  --accent-ink: #03150b;
  --accent-soft: rgba(62, 224, 143, 0.14);
  --blue: #22a3ff;
  --amber: #f5b53d;
  --amber-soft: rgba(245, 181, 61, 0.14);
  --danger: #ff6474;
  --ocean-1: #0b1528;
  --ocean-2: #060b16;
  --land: #1b2639;
  --land-hover: #26354f;
  --border: rgba(203, 213, 225, 0.16);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 64px;
  --panel-w: 400px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  font-weight: 600; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s;
}
.btn:hover { border-color: rgba(148, 163, 184, 0.4); background: #1a2942; }
.btn:active { transform: translateY(1px); }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; height: 48px; font-size: 15px; }
.btn.primary { background: linear-gradient(180deg, #4ae89a, var(--accent-2)); border-color: transparent; color: var(--accent-ink); box-shadow: 0 6px 20px rgba(62, 224, 143, 0.22); }
.btn.primary:hover { background: linear-gradient(180deg, #5cf0a7, #2bd184); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: rgba(148, 163, 184, 0.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent-ink); border-right-color: transparent; animation: spin .7s linear infinite; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  transition: color .15s, background .15s, border-color .15s; text-decoration: none; flex: none;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }
.linkish { background: none; border: 0; color: var(--faint); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; }
.linkish:hover { color: var(--muted); }
.ico { display: inline-flex; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px;
}
.chip span:first-child { color: var(--accent); font-weight: 600; }
.chip:hover { color: var(--text); border-color: var(--line-2); }

.pill {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; background: rgba(148, 163, 184, 0.12); color: #c7d2e5; white-space: nowrap;
}
.pill.green { background: var(--accent-soft); color: var(--accent); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- flags ---------- */
.flag { width: 20px; height: 15px; border-radius: 3px; flex: none; background-size: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.flag.lg { width: 36px; height: 27px; border-radius: 5px; }
.flag.xl { width: 120px; height: 90px; border-radius: 10px; }
.flag-none { display: inline-grid; place-items: center; background: var(--surface-2); color: var(--muted); }

/* ---------- top bar ---------- */
.demo-banner { background: repeating-linear-gradient(45deg, #3a2a05, #3a2a05 12px, #4a3608 12px, #4a3608 24px); color: var(--amber); text-align: center; font-size: 12.5px; font-weight: 600; padding: 6px 12px; }
.topbar {
  height: var(--header-h); flex: none; display: flex; align-items: center; gap: 18px; padding: 0 16px;
  background: linear-gradient(180deg, #0b1220, #080d18); border-bottom: 1px solid var(--line); position: relative; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.search { position: relative; flex: 1; max-width: 360px; }
.search input {
  width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03); outline: none; transition: border-color .15s, background .15s;
}
.search input:focus { border-color: rgba(62, 224, 143, 0.5); background: rgba(255, 255, 255, 0.05); }
.search-ico { position: absolute; left: 12px; top: 11px; color: var(--faint); pointer-events: none; }
.search-results {
  position: absolute; top: 44px; left: 0; right: 0; background: var(--surface-solid); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 6px; box-shadow: var(--shadow); z-index: 40;
}
.sr-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 0; background: none; text-align: left; }
.sr-item.active, .sr-item:hover { background: var(--surface-2); }
.sr-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-name em, .row-name em { font-style: normal; font-size: 12px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.dot.owned { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.dot.free { background: #3b4a66; }
.dot.res { background: var(--amber); }

.stats { display: flex; gap: 20px; margin-left: auto; }
.stat { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.stat b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12.5px; }
.actions { display: flex; align-items: center; gap: 8px; }
.lang { min-width: 44px; }
.pending-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 99px;
  border: 1px solid rgba(245, 181, 61, 0.35); background: var(--amber-soft); color: var(--amber); font-size: 12.5px; font-weight: 600;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- map ---------- */
.map-wrap {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  background: radial-gradient(1200px 700px at 50% 45%, #0e1a31 0%, var(--ocean-2) 70%);
}
.map { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.map .sphere { fill: var(--ocean-1); stroke: rgba(120, 150, 200, 0.18); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map .graticule { fill: none; stroke: rgba(140, 170, 220, 0.06); stroke-width: .6; vector-effect: non-scaling-stroke; pointer-events: none; }
.map .country { fill: var(--land); transition: fill .2s; }
.map .country:hover { fill: var(--land-hover); }
.map .country.owned:hover { filter: brightness(1.15); }
.map .imgs { pointer-events: none; }
.map .borders { fill: none; stroke: rgba(6, 10, 19, 0.9); stroke-width: 1.1; vector-effect: non-scaling-stroke; pointer-events: none; stroke-linejoin: round; }
.map .coast { fill: none; stroke: rgba(150, 180, 230, 0.16); stroke-width: .7; vector-effect: non-scaling-stroke; pointer-events: none; }
.map .owned-outlines path { fill: none; stroke: rgba(62, 224, 143, 0.75); stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.map .owned-outlines path.reserved { stroke: var(--amber); stroke-dasharray: 4 3; }
.map .hover-outline { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.map .sel-outline { fill: rgba(62, 224, 143, 0.06); stroke: var(--accent); stroke-width: 2.2; vector-effect: non-scaling-stroke; pointer-events: none; filter: url(#glow); }
.map .hatch-bg { fill: #2a2412; }
.map .hatch-fg { fill: rgba(245, 181, 61, 0.55); }

.map .labels { pointer-events: none; }
.map .lbl { text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke-linejoin: round; }
.map .lbl.name { fill: rgba(200, 214, 240, 0.42); font-weight: 600; letter-spacing: 0.08em; stroke: rgba(6, 10, 19, 0.6); stroke-width: 2.5px; }
.map .lbl.own { fill: #fff; font-weight: 800; letter-spacing: -0.01em; stroke: rgba(4, 8, 16, 0.85); stroke-width: 3.5px; }
.map .lbl.sel { fill: #eafff4; }

.map .mk { cursor: pointer; }
.map .mk .hit { fill: transparent; }
.map .mk .dot { fill: #4a5b7c; stroke: rgba(6, 10, 19, 0.9); stroke-width: 1.5; transition: r .15s; }
.map .mk.owned .dot { stroke: var(--accent); stroke-width: 2; }
.map .mk.reserved .dot { fill: var(--amber); }
.map .mk.hover .dot, .map .mk.sel .dot { stroke: #fff; stroke-width: 2.2; }
.map .mk.sel .dot { filter: url(#glow); }

.loading { position: absolute; inset: 0; display: grid; place-content: center; grid-auto-flow: column; gap: 10px; align-items: center; color: var(--muted); background: var(--bg); transition: opacity .5s; z-index: 5; }
.loading.done { opacity: 0; pointer-events: none; }

.tooltip {
  position: absolute; left: 0; top: 0; z-index: 20; pointer-events: none; min-width: 180px; max-width: 280px;
  background: rgba(10, 16, 29, 0.94); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.tt-head { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.tt-own { display: flex; align-items: center; gap: 10px; }
.tt-own img, .tt-swatch { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex: none; display: block; }
.tt-own b { display: block; font-size: 14px; }
.tt-own small { color: var(--muted); }

.map-controls { position: absolute; left: 16px; top: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 10; }
.map-controls .icon-btn { width: 36px; height: 36px; backdrop-filter: blur(8px); }

.legend {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 10;
  display: flex; gap: 16px; padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line);
  font-size: 12px; color: var(--muted); backdrop-filter: blur(8px);
}
.legend > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg.free { background: var(--land); box-shadow: inset 0 0 0 1px var(--line-2); }
.lg.owned { background: linear-gradient(135deg, #3ee08f, #22a3ff); box-shadow: 0 0 0 1px var(--accent); }
.lg.res { background: repeating-linear-gradient(45deg, #2a2412 0 3px, rgba(245, 181, 61, .7) 3px 5px); }

/* ---------- feed ---------- */
.feed {
  position: absolute; left: 16px; bottom: 16px; width: 290px; max-height: min(36vh, 330px); z-index: 10;
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(12px); overflow: hidden;
}
.feed-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; border: 0; background: none; font-weight: 700; font-size: 13px; text-align: left; cursor: default; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 rgba(255, 100, 116, .6); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(255, 100, 116, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 100, 116, 0); } }
.feed-list { list-style: none; margin: 0; padding: 0 6px 8px; overflow-y: auto; }
.feed-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 9px; cursor: pointer; }
.feed-list li:hover { background: rgba(148, 163, 184, 0.07); }
.feed-list li .flag { margin-top: 2px; }
.feed-list li.new { animation: flashIn 1.2s ease; }
.feed-list li.empty { color: var(--muted); cursor: default; font-size: 13px; }
@keyframes flashIn { 0% { background: var(--accent-soft); transform: translateX(-6px); } 100% { background: transparent; transform: none; } }
.fe-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.fe-text b { color: #fff; }
.fe-text i { font-style: normal; color: var(--muted); }
.fe-text small { color: var(--faint); font-size: 11.5px; }

/* ---------- side panel ---------- */
.panel {
  position: fixed; top: calc(var(--header-h) + 12px); right: 12px; bottom: 12px; width: var(--panel-w); z-index: 25;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow);
  backdrop-filter: blur(18px); transform: translateX(calc(100% + 24px)); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  display: flex; flex-direction: column;
}
body:has(.demo-banner:not([hidden])) .panel { top: calc(var(--header-h) + 42px); }
.panel.open { transform: none; }
.panel-x { position: absolute; top: 14px; right: 14px; z-index: 2; }
.panel-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.p-head { display: flex; gap: 12px; align-items: center; padding-right: 40px; }
.p-head-text { min-width: 0; }
.p-name { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.p-sub { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.tier { color: var(--faint); font-size: 12px; font-weight: 600; }
.p-media { border-radius: 14px; background: radial-gradient(circle at 50% 40%, #13213a, #0a1120); border: 1px solid var(--line); display: grid; place-items: center; padding: 6px; min-height: 160px; overflow: hidden; }
.p-media img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 10px; }
.silhouette { width: 100%; height: auto; display: block; }
.silhouette .sil-fill { fill: #24324b; }
.silhouette .sil-line { fill: none; stroke: rgba(220, 230, 250, 0.35); stroke-width: 1; }
.p-media.owned .silhouette .sil-line { stroke: var(--accent); stroke-width: 1.5; }
.p-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; word-break: break-word; background: linear-gradient(90deg, #fff, #b7f7d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.p-facts div { background: rgba(148, 163, 184, 0.06); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.p-facts dt { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.p-facts dd { margin: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; }
.p-action { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; border-top: 1px solid var(--line); }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 12px; }
.price-row > span:first-child { color: var(--muted); font-size: 13px; }
.amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt small { color: var(--muted); font-weight: 600; font-size: .8em; }
.amt.big { font-size: 22px; letter-spacing: -0.01em; }
.note { margin: 0; font-size: 12.5px; color: var(--muted); }
.note.amber { color: var(--amber); }

/* ---------- drawer ---------- */
.drawer {
  position: fixed; top: var(--header-h); left: 0; bottom: 0; width: 380px; z-index: 28; background: var(--surface-solid);
  border-right: 1px solid var(--line-2); box-shadow: var(--shadow); transform: translateX(-102%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.drawer-head h2 { margin: 0; font-size: 18px; }
.tabs { display: flex; gap: 4px; padding: 4px 16px 10px; }
.tab { flex: 1; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.tab.on { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.list-filter { margin: 0 16px 8px; height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); outline: none; }
.list-filter:focus { border-color: rgba(62, 224, 143, .5); }
.list-body { overflow-y: auto; padding: 0 8px 16px; }
.row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; border: 0; background: none; text-align: left; }
.row:hover { background: var(--surface-2); }
.row-name { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row-price { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.row-price small { color: var(--muted); font-weight: 500; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(2, 5, 12, 0.6); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.modal.open { opacity: 1; }
.modal-card {
  position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px;
  background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--shadow);
  transform: translateY(10px) scale(.98); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.modal.open .modal-card { transform: none; }
.modal-card.wide { width: min(860px, 100%); }
.modal-x { position: absolute; top: 16px; right: 16px; }
.m-head { display: flex; align-items: center; gap: 12px; padding-right: 44px; margin-bottom: 18px; }
.m-head h2 { margin: 0; font-size: 21px; letter-spacing: -0.02em; }
.m-head p { margin: 4px 0 0; font-size: 13px; }
.m-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.m-actions { display: flex; gap: 8px; margin-left: auto; }
.total { display: flex; align-items: baseline; gap: 10px; }
.total > span:first-child { color: var(--muted); }
.form-err { color: var(--danger); font-size: 13px; margin: 10px 0 0; min-height: 0; }
.form-err:empty { display: none; }

/* listing form */
.listing-grid { display: grid; grid-template-columns: 300px 1fr; gap: 22px; }
.pv { display: flex; flex-direction: column; gap: 10px; }
.pv-label { font-size: 11.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.pv-shape { border-radius: 14px; background: radial-gradient(circle at 50% 40%, #13213a, #0a1120); border: 1px solid var(--line); display: grid; place-items: center; padding: 8px; min-height: 220px; }
.pv-shape img { max-width: 100%; border-radius: 10px; }
.pv-shape .silhouette .sil-line { stroke: var(--accent); stroke-width: 1.5; }
.pv-title { font-size: 20px; font-weight: 800; text-align: center; letter-spacing: -0.02em; word-break: break-word; }
.pv-title.placeholder { color: var(--faint); }
.fields { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.field > span em { font-style: normal; color: var(--faint); font-weight: 500; }
.field small { color: var(--faint); font-size: 12px; }
.counter { margin-left: auto; color: var(--faint); font-weight: 500; font-size: 12px; font-variant-numeric: tabular-nums; }
.field input[type=text] {
  height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); outline: none; font-size: 15px;
}
.field input[type=text]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.drop {
  border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: rgba(255, 255, 255, 0.02); transition: border-color .15s, background .15s; outline: none;
}
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-text { display: flex; flex-direction: column; gap: 2px; color: var(--muted); }
.drop-text .ico { color: var(--accent); margin-bottom: 4px; }
.drop-text b { color: var(--text); font-size: 13.5px; }
.drop-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 9px; flex: none; }
.drop.has .drop-text .ico { display: none; }
.field .btn.small { align-self: flex-start; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); padding: 0; position: relative; }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px rgba(255, 255, 255, .5); }
.sw.custom { display: inline-grid; place-items: center; overflow: hidden; background: conic-gradient(#f43f5e, #fbbf24, #3ee08f, #22a3ff, #a78bfa, #f43f5e); cursor: pointer; }
.sw.custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }

/* payment */
.pay-intro { margin: -6px 0 18px; color: var(--muted); }
.pay-grid { display: grid; grid-template-columns: 1fr 250px; gap: 20px; align-items: start; }
.pay-grid.no-qr { grid-template-columns: 1fr; }
.pay-steps { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pay-step { display: flex; gap: 14px; }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.step-label { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.amount-box, .addr-box { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-radius: 12px; background: #0a1120; border: 1px solid var(--line-2); min-width: 0; }
.amount { font-size: 22px; font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.amount .dec { color: var(--accent); }
.amount small { color: var(--muted); font-family: var(--font); font-size: 14px; font-weight: 600; }
.addr { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.ca-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); min-width: 0; }
.ca-line .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; color: var(--muted); }
.ca-line .icon-btn { width: 28px; height: 28px; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.qr-box img { border-radius: 10px; background: #fff; padding: 6px; width: 200px; height: 200px; }
.qr-box small { color: var(--faint); font-size: 12px; }
.pay-status { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(62, 224, 143, 0.06); border: 1px solid rgba(62, 224, 143, 0.2); font-weight: 600; flex-wrap: wrap; }
.pay-status .pill { margin-left: auto; }
.pay-status.expired { background: var(--amber-soft); border-color: rgba(245, 181, 61, .3); color: var(--amber); }
.sig { margin-top: 14px; }
.sig summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.sig summary:hover { color: var(--text); }
.sig-row { display: flex; gap: 8px; margin-top: 10px; }
.sig-row input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); font-family: var(--mono); font-size: 12.5px; outline: none; }
.sig-row input:focus { border-color: var(--accent); }
.mobile-only { display: none; }

/* done */
.done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-top: 8px; }
.done h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.done p { margin: 0; }
.done-check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 8px rgba(62, 224, 143, .06); }
.key-box { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.key-box .step-label { text-transform: none; letter-spacing: 0; font-size: 13px; }
.key-box small { color: var(--faint); }

/* how */
.how h2 { margin: 0 0 16px; }
.how ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.how li { display: flex; gap: 12px; }
.how li p { margin: 2px 0 0; color: var(--muted); }
.how .note { margin-bottom: 16px; padding: 12px; border-radius: 10px; background: rgba(148, 163, 184, .06); border: 1px solid var(--line); }

/* toasts + confetti */
.toasts { position: fixed; top: calc(var(--header-h) + 14px); left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 12px; background: var(--surface-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-weight: 600; font-size: 13.5px; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; max-width: min(92vw, 520px); }
.toast.in { opacity: 1; transform: none; }
.toast.ok { border-color: rgba(62, 224, 143, .4); }
.toast.err { border-color: rgba(255, 100, 116, .5); color: #ffc2c8; }
.toast.sale { border-color: rgba(62, 224, 143, .45); background: linear-gradient(90deg, #0f2a1f, var(--surface-solid)); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .9; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .stats { display: none; }
  .search { max-width: none; }
}
@media (max-width: 820px) {
  :root { --header-h: 108px; }
  .topbar { flex-wrap: wrap; height: var(--header-h); padding: 10px 12px; gap: 10px; align-content: center; }
  .brand-name { font-size: 15px; }
  .actions { margin-left: auto; gap: 6px; }
  .search { order: 3; flex-basis: 100%; }
  .hide-sm, .chip { display: none !important; }
  .feed { width: auto; right: 16px; max-height: none; bottom: 60px; }
  .feed .feed-list { display: none; }
  .feed.open .feed-list { display: block; max-height: 40vh; }
  .feed-head { cursor: pointer; padding: 10px 14px; }
  .legend { bottom: 12px; font-size: 11px; gap: 10px; padding: 6px 12px; }
  .map-controls { top: 12px; left: 12px; }
  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 72vh; border-radius: 20px 20px 0 0; transform: translateY(105%); }
  body:has(.demo-banner:not([hidden])) .panel { top: auto; }
  .panel-body { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .drawer { width: 100%; }
  .modal { padding: 0; align-items: end; }
  .modal-card, .modal-card.wide { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .listing-grid, .pay-grid { grid-template-columns: 1fr; }
  .pv-shape { min-height: 160px; }
  .qr-box img { width: 180px; height: 180px; }
  .mobile-only { display: inline-flex; }
  .amount { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- v2: currency tabs, SOL prices, results ---------- */
.sol-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; margin-top: -4px; }
.total { flex-wrap: wrap; }
.total-sol { flex-basis: 100%; color: var(--muted); font-size: 12.5px; }
.tt-area { color: var(--faint); font-weight: 500; font-size: 11.5px; }
.row-name small { color: var(--faint); font-size: 11.5px; }
.cur-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.cur-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); text-align: left; transition: border-color .15s, background .15s;
}
.cur-tab b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.cur-tab small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cur-tab:hover:not(:disabled) { border-color: rgba(148, 163, 184, 0.45); }
.cur-tab.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(62, 224, 143, 0.08); }
.cur-tab:disabled { opacity: .45; cursor: not-allowed; }
.pay-status.expired { justify-content: space-between; align-items: center; gap: 14px; }
.pay-status.expired p { margin: 2px 0 0; font-weight: 500; font-size: 13px; color: #f3d9a6; }
.pill.timer { font-variant-numeric: tabular-nums; font-size: 13px; height: 26px; padding: 0 10px; }
.pill.timer.urgent { background: rgba(255, 100, 116, .15); color: #ff9aa5; }
.race-warn { margin: 12px 0 0; font-size: 12.5px; color: var(--amber); background: var(--amber-soft); border: 1px solid rgba(245, 181, 61, .25); border-radius: 10px; padding: 10px 12px; }
.done-check.bad { background: rgba(255, 100, 116, .12); color: var(--danger); box-shadow: 0 0 0 8px rgba(255, 100, 116, .05); }
.how-rules { margin: 0 0 16px; padding: 12px 12px 12px 30px; border-radius: 10px; background: rgba(148, 163, 184, .06); border: 1px solid var(--line); color: var(--muted); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }

/* ---------- v3: share, report, ranking ---------- */
.share-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.share-row > span { color: var(--muted); font-size: 12.5px; margin-right: 4px; }
.share-row .btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; }
.report-link { align-self: flex-start; }
.report-link:disabled { cursor: default; opacity: .7; }
.report h2 { margin: 0 0 4px; font-size: 20px; }
.radios { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.radio { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio input { accent-color: var(--accent); }
.tabs { flex-wrap: wrap; }
.tab { flex: 1 1 auto; min-width: 0; padding: 0 8px; font-size: 12.5px; white-space: nowrap; }
.rank { width: 24px; text-align: center; font-weight: 800; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.rank.top1 { color: #fbbf24; } .rank.top2 { color: #cbd5e1; } .rank.top3 { color: #fb923c; }
.row-sales { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.row.lost { opacity: .6; }
.lost-note { color: var(--danger) !important; }
.list-empty { color: var(--muted); padding: 16px 10px; font-size: 13px; display: flex; justify-content: center; }
body:has(.demo-banner:not([hidden])) .drawer { top: calc(var(--header-h) + 30px); }
.announce-banner { background: linear-gradient(90deg, #0f2a1f, #10233b); color: #d6ffe9; text-align: center; font-size: 13px; font-weight: 600; padding: 7px 14px; border-bottom: 1px solid var(--line); }
.announce-banner.paused { background: linear-gradient(90deg, #3a2a05, #2a1f08); color: var(--amber); }
body:has(.announce-banner:not([hidden])) .panel { top: calc(var(--header-h) + 46px); }
body:has(.announce-banner:not([hidden])) .drawer { top: calc(var(--header-h) + 33px); }

/* ---- share card on the success screen ---- */
.share-card { width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; margin-top: 4px; }
.share-card-img { position: relative; width: 100%; aspect-ratio: 1200 / 630; border-radius: 12px; overflow: hidden; background: linear-gradient(110deg, #0d1626 30%, #16233a 50%, #0d1626 70%) 0 0 / 300% 100%; animation: card-shimmer 1.4s linear infinite; box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08); }
.share-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .35s ease; }
.share-card-img img[data-loaded] { opacity: 1; }
.share-card.no-img .share-card-img { display: none; }
.share-card .step-label { text-transform: none; letter-spacing: 0; font-size: 13px; }
.share-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-card-actions .btn { justify-content: center; gap: 8px; }
.share-card-actions a.btn { grid-column: 1 / -1; text-decoration: none; }
.btn.share-x { background: #f1f4f9; color: #0b0f17; border-color: #f1f4f9; }
.btn.share-x:hover { background: #ffffff; }
.share-row a.btn { text-decoration: none; }
@keyframes card-shimmer { to { background-position: -300% 0; } }
@media (prefers-reduced-motion: reduce) { .share-card-img { animation: none; } }

/* ---- X / Telegram usernames ---- */
.handle-input { display: flex; align-items: center; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); padding: 0 12px; gap: 6px; }
.handle-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.handle-input .handle-ico { display: inline-flex; color: var(--muted); width: 18px; justify-content: center; }
.handle-input .at { color: var(--faint); font-weight: 600; }
.field .handle-input input[type=text] { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: none; box-shadow: none; font-size: 15px; outline: none; color: inherit; }
.owner-dd { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.owner-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-link:hover { color: var(--accent); }
.owner-link .ico { display: inline-flex; color: var(--muted); }
.owner-av { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .25); }

/* ---- photo source: upload or X profile photo ---- */
.photo-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.photo-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; border-radius: 9px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.photo-tabs button .ico { display: inline-flex; }
.photo-tabs button.on { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
.xphoto-box { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: rgba(255, 255, 255, .02); }
.xphoto-box[hidden] { display: none; }
.xphoto-av { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--accent); }
.xphoto-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text); }
.xphoto-ico svg { width: 24px; height: 24px; }
.xphoto-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.xphoto-text b { font-size: 14px; }
.xphoto-text small { color: var(--faint); font-size: 12px; }

/* ---- crowns: owners of the 5 most valuable countries ---- */
.crowned { position: relative; display: inline-flex; flex: none; }
.crowned .crown { position: absolute; left: 50%; bottom: 72%; width: 78%; min-width: 14px; transform: translateX(-50%) rotate(-10deg); pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.crowned .crown svg { display: block; width: 100%; height: auto; }
.crowned.rank-1 .crown { filter: drop-shadow(0 0 6px rgba(255, 200, 61, .9)) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); animation: crownGlow 2.4s ease-in-out infinite; }
@keyframes crownGlow { 50% { filter: drop-shadow(0 0 12px rgba(255, 200, 61, 1)) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); } }
.crown-inline { display: inline-flex; width: 1.15em; vertical-align: -0.1em; margin-right: 4px; }
.crown-inline svg { width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) { .crowned.rank-1 .crown { animation: none; } }
/* country renamed by its owner: real name underneath */
.p-realname { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); }
.row-name .row-real { display: block; font-size: 11.5px; color: var(--faint); font-style: normal; font-weight: 500; }
.row-av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px rgba(255, 200, 61, .8); }
.owner-link .crowned { margin-top: 6px; }

/* ---- language menu ---- */
.lang-sel { height: 34px; padding: 0 28px 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238d9bb5' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--text); font: 600 13px var(--font); appearance: none; -webkit-appearance: none; cursor: pointer; }
.lang-sel:hover { border-color: rgba(148, 163, 184, 0.4); }
.lang-sel option { background: #0e1525; color: #e8eef8; }


/* ==== Owners: owner card (country panel), profile ("empire") and rulers list ==== */
.av { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex: none; background: #142035; box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); }
.av-blank { background: color-mix(in srgb, var(--av, var(--accent)) 30%, #0e1525); color: #fff; font-weight: 800; }
.av-sm { width: 30px; height: 30px; font-size: 13px; }
.av-lg { width: 54px; height: 54px; font-size: 22px; }
.av-xl { width: 88px; height: 88px; font-size: 34px; box-shadow: 0 0 0 3px rgba(62, 224, 143, .55), 0 0 28px rgba(62, 224, 143, .25); }
.crowned .av-sm + .crown { width: 74%; }

.owner-card {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; margin-bottom: 10px; text-align: left;
  border-radius: var(--radius); border: 1px solid rgba(62, 224, 143, .28); color: var(--text); cursor: pointer;
  background: linear-gradient(120deg, rgba(62, 224, 143, .10), rgba(34, 163, 255, .06) 60%, rgba(148, 163, 184, .04));
  transition: border-color .15s, transform .15s, background .15s;
}
.owner-card:hover { border-color: rgba(62, 224, 143, .6); transform: translateY(-1px); }
.owner-card.first { border-color: rgba(255, 200, 61, .5); background: linear-gradient(120deg, rgba(255, 200, 61, .14), rgba(62, 224, 143, .06) 60%, rgba(148, 163, 184, .04)); }
.owner-card .crowned { margin-top: 10px; }
.oc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.oc-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.oc-name { font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.oc-meta .oc-val { color: var(--text); font-weight: 700; }
.oc-meta small { color: var(--muted); font-weight: 600; }
.oc-rank { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 800; color: #e8eef8; background: rgba(148, 163, 184, .16); }
.oc-rank.top1 { color: #2a1a00; background: linear-gradient(90deg, #ffd166, #ffb703); }
.oc-rank.top2 { color: #111827; background: linear-gradient(90deg, #e5e7eb, #cbd5e1); }
.oc-rank.top3 { color: #2a1200; background: linear-gradient(90deg, #fdba74, #fb923c); }
.oc-rank.big { height: 26px; padding: 0 10px; font-size: 13px; }
.oc-cta { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.oc-arrow { font-size: 20px; line-height: 1; }
.p-facts.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 420px) { .oc-cta { display: none; } }

.profile { display: flex; flex-direction: column; gap: 14px; }
.prof-head { display: flex; align-items: center; gap: 18px; padding: 8px 40px 4px 0; }
.prof-head .crowned { margin-top: 14px; }
.prof-id { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.prof-id h2 { margin: 0; font-size: 24px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.prof-links { display: flex; gap: 12px; flex-wrap: wrap; }
.prof-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; }
.prof-link:hover { color: var(--accent); }
.prof-race { padding: 10px 14px; border-radius: var(--radius-sm); background: rgba(255, 100, 116, .08); border: 1px solid rgba(255, 100, 116, .25); font-size: 13.5px; font-weight: 600; }
.prof-race.lead { background: rgba(255, 200, 61, .08); border-color: rgba(255, 200, 61, .3); }
.prof-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.prof-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(148, 163, 184, .06); border: 1px solid var(--line); min-width: 0; }
.prof-stat.hl { background: rgba(62, 224, 143, .07); border-color: rgba(62, 224, 143, .22); }
.ps-v { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 22px; display: flex; align-items: center; }
.ps-v small { color: var(--muted); font-size: 11px; font-weight: 600; margin-left: 3px; }
.ps-l { font-size: 11.5px; color: var(--muted); }
.prof-sec h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.prof-countries { display: flex; flex-direction: column; max-height: 190px; overflow-y: auto; margin: 0 -6px; }
.prof-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 180px; overflow-y: auto; }
.prof-history li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.prof-history li:hover { background: rgba(148, 163, 184, .07); }
.prof-history li.loss .ph-text { color: #ffb4bc; }
.prof-history li.muted { color: var(--muted); cursor: default; }
.ph-ico { flex: none; width: 20px; text-align: center; }
.ph-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-time { flex: none; color: var(--faint); font-size: 12px; }
.prof-share { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); }
.spinner.sm { width: 12px; height: 12px; }
@media (max-width: 520px) {
  .prof-stats { grid-template-columns: repeat(2, 1fr); }
  .prof-head { gap: 14px; }
  .av-xl { width: 68px; height: 68px; font-size: 26px; }
  .prof-id h2 { font-size: 20px; }
}

.ruler-row .row-name { display: flex; flex-direction: column; gap: 1px; }
.ruler-row .row-name small { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.ruler-row .crowned { margin-top: 8px; }

.owner-card .oc-val { font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-card .oc-val small { color: var(--muted); font-weight: 600; }
.ps-v { white-space: normal; flex-wrap: wrap; align-items: baseline; column-gap: 3px; }
.ps-v small { margin-left: 0; }

/* ---- community callouts: a slim card floating at the top of the map, one callout at a time ---- */
.callout-strip {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10; width: min(880px, calc(100% - 140px)); height: 44px;
  display: flex; align-items: stretch; overflow: hidden; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 99px; backdrop-filter: blur(12px); box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  transition: border-color .15s;
}
.callout-strip[hidden] { display: none; }
.callout-strip:hover { border-color: rgba(62, 224, 143, .45); }
.cs-label {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 16px; border-right: 1px solid var(--line);
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent, #3ee08f); white-space: nowrap;
  background: linear-gradient(135deg, rgba(62, 224, 143, .14), rgba(43, 196, 217, .05));
}
.cs-label i { width: 7px; height: 7px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 8px rgba(62, 224, 143, .8); }
.cs-body { flex: 1; min-width: 0; position: relative; }
.cs-item {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 12px; white-space: nowrap;
  opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease;
}
.cs-item.in { opacity: 1; transform: none; }
.cs-item.out { opacity: 0; transform: translateY(-8px); }
.cs-av { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #04140c; background: hsl(var(--hue, 150) 68% 62%); }
.cs-name { flex: none; font-weight: 700; font-size: 13px; }
.cs-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 13px; }
.cs-text::before { content: '“'; color: #3ee08f; }
.cs-text::after { content: '”'; color: #3ee08f; }
.cs-mcap { flex: none; margin-left: auto; padding-left: 8px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
@media (max-width: 1500px) { .cs-mcap { display: none; } }
@media (max-width: 820px) {
  .callout-strip { top: 12px; left: 60px; right: 12px; width: auto; transform: none; height: 40px; }
  .cs-label > span { display: none; }
  .cs-label { padding: 0 10px 0 12px; }
}
@media (prefers-reduced-motion: reduce) { .cs-item { transition: opacity .2s; transform: none !important; } }
