/* WORLDBID — paper chrome over a night globe */
:root {
  --paper: #dcdee4;
  --panel: #e3e5eb;
  --ink: #1a1a1a;
  --muted: #6a6c70;
  --green: #3FA344;
  --field: #edeff3;
  --drawer: #bfc2ca;
  --orange: #c2502b;
  --bar-h: 64px;
  --sub-h: 32px;
  --top-h: 96px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: #070b16;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- stage (the globe world) ---------- */
#stage {
  position: fixed;
  inset: 0;
  touch-action: none;
  overflow: hidden;
}
#globe { position: absolute; inset: 0; display: block; }
#badges { position: absolute; inset: 0; pointer-events: none; }

/* badges live on the land, not in the chrome — shadows allowed here */
.badge {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 20%;
  background: #0e1116;
  box-shadow: 0 0 0 2px #0b0d10, 0 0 0 3px rgba(0,0,0,.5), 0 0 14px 4px rgba(0,0,0,.55);
  filter: drop-shadow(0 3px 7px rgba(0,0,0,.45));
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}
.badge img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 20%;
  display: block;
}
.badge .ltr {
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.badge .dom {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 5px;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .01em;
  text-shadow: 0 1px 2px #000, 0 0 3px #000, 0 0 6px rgba(0,0,0,.95), 1px 0 2px #000, -1px 0 2px #000;
  pointer-events: none;
}
.badge.tiny .dom { display: none; }

#tip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  display: none;
  background: rgba(12, 15, 20, .94);
  color: #fff;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .65), 0 3px 10px rgba(0, 0, 0, .4);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
#tip .m { color: #aeb6c4; font-weight: 500; }
#tip .money { color: #56c463; font-weight: 700; }

/* ---------- topbar ---------- */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--bar-h);
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  z-index: 30;
}
#brand { display: flex; align-items: center; gap: 14px; }
#logo { display: block; filter: drop-shadow(0 2px 0 rgba(20, 30, 50, .25)); }
#made { font-size: 15px; font-weight: 600; color: #5c5f66; white-space: nowrap; }
#made b { color: var(--green); font-weight: 700; }
#subbar {
  position: fixed;
  top: var(--bar-h); left: 0; right: 0;
  height: var(--sub-h);
  padding: 0 16px;
  background: #0a0e17;
  border-bottom: 1px solid rgba(199, 205, 216, .22);
  z-index: 29;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#tagline2 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  color: #55575e;
  white-space: nowrap;
  pointer-events: none;
}
#sstats {
  display: flex;
  align-items: center;
  gap: 26px;
  white-space: nowrap;
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
}
#sstats .si { display: flex; align-items: center; gap: 7px; }
#sstats b { color: #f2f4f8; font-weight: 700; font-size: 13px; letter-spacing: .02em; font-family: inherit; }
#sstats b.plun { color: #ee5b3a; }
#sstats em { font-style: normal; color: #8b93a3; font-size: 10.5px; letter-spacing: .18em; }
.dot-on {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3fd06b;
  box-shadow: 0 0 6px rgba(63, 208, 107, .75);
  display: inline-block;
}
@media (max-width: 1360px) {
  #tagline2 { display: none; }
}
@media (max-width: 1080px) {
  #sstats { max-width: 100%; overflow-x: auto; scrollbar-width: none; gap: 18px; }
  #sstats::-webkit-scrollbar { display: none; }
}
.circ {
  width: 40px; height: 40px;
  flex: none;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.circ:hover { background: var(--ink); color: var(--paper); }
.circ:active { transform: translateY(1px); }
.circ svg { display: block; }
#btn-list { background: var(--ink); color: var(--paper); }
#btn-list:hover { background: #000; }

.tool {
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 2px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}
.tool:hover { background: var(--ink); color: var(--paper); }
.tool.icon { padding: 5px 7px; }
.tool.icon svg { display: block; }
.tool:active { transform: translateY(1px); }
.tool:focus-visible, .swatch:focus-visible, input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

#topbar .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* ---------- left drawer ---------- */
#edge-hot {
  position: fixed;
  top: var(--top-h); left: 0; bottom: 0;
  width: 10px;
  z-index: 24;
}
#drawer {
  position: fixed;
  top: var(--top-h); left: 0; bottom: 0;
  width: 300px;
  background: var(--drawer);
  border-right: 2px solid var(--ink);
  transform: translateX(-102%);
  transition: transform .22s ease;
  z-index: 25;
  display: flex;
  flex-direction: column;
}
#drawer.open { transform: translateX(0); }
#drawer-tab {
  position: absolute;
  top: 50%;
  right: -36px;
  transform: translateY(-50%);
  width: 36px;
  height: 62px;
  background: var(--drawer);
  border: 2px solid var(--ink);
  border-left: none;
  border-radius: 0 2px 2px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0 4px;
}
#drawer-tab:hover { background: var(--ink); color: var(--paper); }
#drawer-tab svg { transition: transform .22s ease; }
#drawer.open #drawer-tab svg { transform: rotate(180deg); }
#drawer .head { padding: 14px 14px 10px; }
.dlabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #55575e;
  text-transform: uppercase;
  margin-bottom: 7px;
}
#search {
  width: 100%;
  background: #d2d5dc;
  border: 2.5px solid var(--ink);
  border-radius: 2px;
  padding: 10px 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}
#search::placeholder { color: #7d8087; }
#dstats { margin-top: 13px; }
#dstats .st { font-size: 14.5px; font-weight: 700; padding: 2.5px 0; }
#dstats .st.spent { color: var(--orange); }
.hint {
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #5b5e66;
}
#drawer .body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}
#drawer .sect {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#drawer .sect:first-of-type { flex: 1.35; }
#drawer .sect + .sect { border-top: 2px solid var(--ink); }
#drawer .sh {
  padding: 10px 14px 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  color: var(--muted);
  text-transform: uppercase;
}
#drawer .sl {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 0 8px;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
}
.row:hover { background: var(--paper); }
.row .dot {
  width: 9px; height: 9px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  flex: none;
}
.row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .pr { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green); }
.row .ow { color: var(--muted); font-size: 11px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .vw { color: var(--muted); font-size: 10.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.ev { padding: 8px 12px; font-size: 12.5px; line-height: 1.45; border-bottom: 1px solid rgba(26,26,26,.08); }
.ev b { font-weight: 700; }
.ev .money { font-weight: 700; color: var(--green); }

.row2 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
}
.row2:hover { background: rgba(255, 255, 255, .3); }
.row2 .l { flex: 1; min-width: 0; }
.row2 .t { font-size: 14px; font-weight: 700; line-height: 1.3; }
.row2 .t .rk { margin-right: 2px; }
.row2 .s {
  font-size: 12px;
  font-weight: 600;
  color: #4c4e54;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row2 .r { display: flex; align-items: center; gap: 8px; flex: none; }
.row2 .eyew {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #5b5e66;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.row2 .pr { font-weight: 700; color: var(--green); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.ev .t { color: var(--muted); font-size: 11px; margin-left: 4px; }
.empty { padding: 18px 14px; font-size: 13px; color: var(--muted); }

/* ---------- inspector ---------- */
#inspector {
  position: fixed;
  top: calc(var(--top-h) + 12px);
  right: 12px;
  width: 302px;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 2px;
  z-index: 26;
  display: none;
  max-height: calc(100vh - var(--top-h) - 24px);
  overflow-y: auto;
}
#inspector.open { display: block; }
#inspector .head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 8px 12px;
  border-bottom: 2px solid var(--ink);
}
#inspector .head .nm {
  font-weight: 700;
  font-size: 16px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#inspector .head .x {
  width: 26px; height: 26px;
  flex: none;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}
#inspector .head .x:hover { background: var(--ink); color: var(--paper); }
#inspector .bd { padding: 12px; }

.price { font-size: 28px; font-weight: 700; line-height: 1; color: var(--green); }
.price small { font-size: 11px; font-weight: 600; color: var(--muted); display: block; margin-top: 4px; letter-spacing: .04em; }

.ownerbox {
  margin-top: 12px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
  padding: 9px 10px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.ownerbox .chip {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 20%;
  box-shadow: 0 0 0 2px #0b0d10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
}
.ownerbox .chip img { width: 100%; height: 100%; object-fit: cover; }
.ownerbox .who { min-width: 0; }
.ownerbox .who .n { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ownerbox .who .u { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.holdline { font-size: 12px; color: var(--muted); margin-top: 7px; }
.clickline { font-size: 12px; margin-top: 3px; }
.clickline b { font-variant-numeric: tabular-nums; }

.histh {
  margin-top: 13px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  color: var(--muted);
}
.hist { margin-top: 5px; max-height: 128px; overflow-y: auto; }
.hist .h {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  padding: 3.5px 0;
}
.hist .h .dot { width: 8px; height: 8px; border: 1px solid var(--ink); border-radius: 2px; flex: none; }
.hist .h .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .h .b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green); }
.hist .h .t { color: var(--muted); font-size: 11px; }

.form { margin-top: 13px; border-top: 2px solid var(--ink); padding-top: 12px; }
.form .fl { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; color: var(--muted); margin: 9px 0 4px; }
.form .fl:first-child { margin-top: 0; }
.form input[type=text], .form input[type=url] {
  width: 100%;
  background: var(--field);
  border: 2px solid var(--ink);
  border-radius: 2px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
}
.swatches { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.swatch {
  width: 20px; height: 20px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
}
.swatch.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatches input[type=color] {
  width: 26px; height: 24px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--field);
  cursor: pointer;
}
.logobox {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--field);
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
}
.logobox.drag { background: var(--paper); }
.logobox input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.logobox .lmark {
  width: 38px; height: 38px;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  background: var(--panel);
}
.logobox .lprev {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 20%;
  box-shadow: 0 0 0 2px #0b0d10;
  object-fit: cover;
}
.logobox .lhint { font-size: 11.5px; line-height: 1.4; min-width: 0; }
.logobox .lhint b { display: block; font-size: 12.5px; }
.logobox .lhint span { color: var(--muted); }
.logobox .tool { position: relative; z-index: 2; margin-left: auto; flex: none; }

.cta {
  margin-top: 13px;
  width: 100%;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 2px;
  padding: 11px 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.cta:hover { background: #000; }
.cta:active { transform: translateY(1px); }
.cta:disabled { opacity: .55; cursor: default; }
.cta.done { background: var(--green); border-color: var(--green); }
.paybox {
  margin-top: 8px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
  padding: 9px 10px;
}
.paybox .pline { font-size: 12px; margin-bottom: 8px; }
.paybox .pline b { font-weight: 700; }
.cta.pay { margin-top: 0; background: var(--green); border-color: var(--green); }
.cta.pay:hover { background: #338a3a; border-color: #338a3a; }
.ftr { margin-top: 8px; font-size: 11px; color: var(--muted); line-height: 1.4; }
.err { margin-top: 8px; font-size: 12px; color: #a3341f; font-weight: 600; display: none; }
.err.show { display: block; }

/* ---------- about ---------- */
#about {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, .55);
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#about.open { display: flex; }
#about .card {
  width: 460px;
  max-width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 2px;
}
#about .head {
  display: flex;
  align-items: center;
  padding: 12px 12px 10px 14px;
  border-bottom: 2px solid var(--ink);
  font-weight: 700;
  font-size: 16px;
}
#about .head .x { margin-left: auto; }
#about .bd { padding: 14px; font-size: 13.5px; line-height: 1.55; }
#about .bd p { margin: 0 0 11px; }
#about .bd p:last-child { margin-bottom: 0; }
#about .bd .demo { color: var(--muted); font-size: 12px; }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  #logo { width: 150px; height: 21px; }
  #brand { gap: 9px; }
  #made { font-size: 12px; }
  #btn-about { display: none; }
  #inspector {
    top: auto;
    left: 10px; right: 10px; bottom: 10px;
    width: auto;
    max-height: 62vh;
  }
  #drawer { width: 84vw; }
  #edge-hot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #drawer { transition: none; }
  #drawer-tab svg { transition: none; }
}
