/* Earth: noche con acento arena (los terrenos). Lienzo a pantalla completa,
   cabecera arriba, terrenos y botón principal abajo. */
:root {
  --night: #070e15;
  --panel: rgba(8, 16, 23, 0.86);
  --line: rgba(255, 255, 255, 0.14);
  --ink: #f8fafb;
  --muted: #93a2ad;
  --sand: #f4c46a;
  --sand-ink: #1d1406;
  --cyan: #72e4dc;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--night); color: var(--ink); font-family: var(--sans); overflow: hidden; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

.earth { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(circle at 50% 38%, #1c2e3a 0, #101923 45%, #070e15 100%); }
.earth-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.earth-canvas.dragging { cursor: grabbing; }

.earth-top, .earth-bottom {
  position: absolute; left: 0; right: 0; display: flex; gap: 12px; pointer-events: none;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.earth-top { top: 0; padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: 26px; justify-content: space-between; align-items: flex-start; background: linear-gradient(rgba(7, 14, 21, 0.7), transparent); }
.earth-bottom { bottom: 0; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); padding-top: 34px; flex-direction: column; align-items: center; background: linear-gradient(transparent, rgba(7, 14, 21, 0.75)); }
.earth-top > *, .earth-bottom > * { pointer-events: auto; }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(140deg, var(--sand), #b8862e); color: var(--sand-ink); font-weight: 900; font-size: 18px; box-shadow: 0 4px 14px rgba(244, 196, 106, 0.25); }
.brand strong { display: block; font-size: 14px; letter-spacing: 0.24em; }
.brand > div > span { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; }

.earth-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.concept { padding: 3px 8px; border: 1px solid rgba(244, 196, 106, 0.45); border-radius: 6px; color: var(--sand); font: 600 9.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.count { color: var(--muted); font-size: 12px; }
.count b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }

.map-style { position: absolute; right: max(20px, env(safe-area-inset-right, 0px)); top: calc(96px + env(safe-area-inset-top, 0px)); padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(8, 16, 23, 0.78); color: #d8e1e7; font: 500 11px var(--mono); }

.hint { position: absolute; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0; padding: 7px 12px; border-radius: 999px; background: rgba(8, 16, 23, 0.82); color: #c7d2d9; font: 500 10.5px var(--mono); white-space: nowrap; pointer-events: none; animation: hint 6s ease forwards; }
@keyframes hint { 0% { opacity: 0; } 10%, 75% { opacity: 1; } 100% { opacity: 0; } }

.lot-chips { display: flex; gap: 8px; max-width: min(760px, 100%); overflow-x: auto; scrollbar-width: none; padding: 2px; }
.lot-chips::-webkit-scrollbar { display: none; }
.lot-chips button { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font-size: 12.5px; white-space: nowrap; }
.lot-chips button i { width: 8px; height: 8px; border-radius: 50%; background: var(--sand); box-shadow: 0 0 8px var(--sand); }
.lot-chips button small { color: var(--muted); font-size: 11px; }
.lot-chips button[aria-current="true"] { border-color: var(--sand); }

.primary { min-width: min(320px, 100%); border: 0; border-radius: 14px; padding: 14px 22px; background: var(--sand); color: var(--sand-ink); font-weight: 800; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); transition: transform 0.12s ease, opacity 0.3s ease; }
.primary:active { transform: scale(0.96); }
.primary:disabled { opacity: 0.6; cursor: default; }
.ghost { border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; background: rgba(255, 255, 255, 0.06); color: var(--ink); font-weight: 700; font-size: 13px; white-space: nowrap; }

.lot-card { position: absolute; left: 50%; bottom: calc(132px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(440px, calc(100% - 32px)); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid rgba(244, 196, 106, 0.35); border-radius: 16px; background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); animation: card 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.1) both; }
@keyframes card { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.lot-card > div { min-width: 0; }
.lot-card h2 { margin: 0; font-size: 16px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lot-card p { margin: 4px 0 0; color: var(--sand); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }

.credit { position: absolute; right: max(8px, env(safe-area-inset-right, 0px)); bottom: calc(4px + env(safe-area-inset-bottom, 0px)); padding: 2px 6px; border-radius: 4px; background: rgba(8, 16, 23, 0.6); color: var(--muted); font-size: 9px; text-decoration: none; }
.error { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); width: min(380px, calc(100% - 32px)); margin: 0; padding: 12px 16px; border-radius: 12px; background: rgba(93, 32, 38, 0.92); color: #fff; font-size: 13px; text-align: center; }

@media (max-width: 700px) {
  .brand > div > span { display: none; }
  .primary { width: 100%; }
  .hint { bottom: calc(146px + env(safe-area-inset-bottom, 0px)); font-size: 9.5px; }
}
