:root {
  --ink: #1a1712;
  --paper: #f6f1e7;
  --card: #fffdf8;
  --muted: #6b6457;
  --line: #e4dccb;
  --hot: #ff4f2b;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
main { max-width: 860px; margin: 0 auto; padding: 0 22px 60px; min-height: 70vh; }

.top { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: 0 auto; padding: 22px; }
.logo { display: flex; align-items: center; gap: 2px; font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: -0.02em; }
.logo .dot { width: 18px; height: 18px; border-radius: 50%; display: inline-block; }
.logo .dot.a { background: var(--hot); }
.logo .dot.b { background: var(--ink); opacity: .85; margin-left: -8px; margin-right: 8px; }
.top nav a { font-weight: 500; text-decoration: none; border-bottom: 2px solid var(--hot); padding-bottom: 2px; }

.kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hot); margin: 0 0 14px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 8vw, 92px); line-height: .98; letter-spacing: -0.02em; margin: 0; }
h1 em { font-style: italic; color: var(--hot); }
.sub { font-size: 19px; line-height: 1.5; color: var(--muted); max-width: 600px; margin: 22px 0 0; }
.sub.small { font-size: 15px; margin-top: 6px; }

.hero { padding: 7vh 0 40px; }
.go { display: flex; gap: 10px; margin-top: 34px; flex-wrap: wrap; }
.at { display: flex; align-items: center; background: var(--card); border: 2px solid var(--ink); border-radius: 999px; padding: 0 8px 0 20px; flex: 1 1 260px; max-width: 380px; }
.at span { font-size: 22px; color: var(--muted); }
.at input { border: 0; outline: 0; background: transparent; font: 500 22px var(--sans); padding: 14px 6px; width: 100%; color: var(--ink); }
.at.small { flex: 0 1 240px; }
.at.small span, .at.small input { font-size: 16px; }
.at.small input { padding: 9px 4px; }
button, .btn { font: 600 17px var(--sans); border: 2px solid var(--ink); background: var(--card); color: var(--ink); border-radius: 999px; padding: 14px 24px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: transform .12s ease, box-shadow .12s ease; }
.go button { background: var(--ink); color: var(--paper); font-size: 19px; }
button:hover, .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--ink); }
button:active, .btn:active { transform: translateY(0); box-shadow: none; }
.btn.hot { background: var(--hot); border-color: var(--hot); color: white; }
.btn.hot:hover { box-shadow: 0 4px 0 var(--ink); }
.btn.ghost { border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
.err { color: #c2260a; font-weight: 500; margin-top: 16px; }
.pool { color: var(--muted); margin-top: 26px; font-size: 15px; }
.pool b { color: var(--ink); }

.loading { text-align: center; padding: 12vh 0; }
.orbit { position: relative; width: 150px; height: 150px; margin: 0 auto 34px; }
.orbit img { width: 96px; height: 96px; border-radius: 50%; position: absolute; inset: 27px; background: var(--line); object-fit: cover; }
.orbit span { position: absolute; width: 22px; height: 22px; border-radius: 50%; top: 64px; left: 64px; animation: spin 2.4s linear infinite; }
.orbit span:nth-child(2) { background: var(--hot); }
.orbit span:nth-child(3) { background: var(--ink); animation-delay: -.8s; }
.orbit span:nth-child(4) { background: #2b6bff; animation-delay: -1.6s; }
@keyframes spin { from { transform: rotate(0) translateX(72px); } to { transform: rotate(360deg) translateX(72px); } }
.step { font-family: var(--serif); font-size: 34px; margin: 0; }
.hint { color: var(--muted); }

.me { display: flex; gap: 24px; align-items: center; padding: 6vh 0 10px; }
.me-av { width: 108px; height: 108px; border-radius: 50%; border: 3px solid var(--ink); background: var(--line); object-fit: cover; flex: none; }
.me-name { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 6vw, 56px); margin: 0; line-height: 1; }
.me-blurb { font-size: 18px; color: var(--muted); margin: 10px 0 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 13px; font-weight: 500; padding: 5px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.chip.vibe { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.home { display: inline-flex; flex-direction: column; gap: 2px; margin: 22px 0 0; padding: 16px 22px; border-radius: 20px; background: #14110d; color: var(--paper); text-decoration: none; transition: transform .12s ease; }
.home:hover { transform: translateY(-2px); }
.home-kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #ff8a5c; }
.home-country { font-family: var(--serif); font-size: 32px; line-height: 1.1; }
.home-continent { color: #bdb3a1; font-size: 15px; }
.home-go { margin-top: 8px; font-size: 14px; font-weight: 600; }
.share { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 40px; }
.list-title { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 14px; }
.matches { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: m; }
.match { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; position: relative; opacity: 0; transform: translateY(10px); animation: rise .4s ease forwards; }
.match::before { counter-increment: m; content: counter(m); position: absolute; left: -10px; top: -10px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
@keyframes rise { to { opacity: 1; transform: none; } }
.m-av img { width: 64px; height: 64px; border-radius: 50%; background: var(--line); object-fit: cover; display: block; }
.m-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.m-name { font-weight: 700; text-decoration: none; }
.m-handle { color: var(--muted); font-size: 14px; }
.m-badge { font-size: 11px; font-weight: 700; color: var(--hot); text-transform: uppercase; letter-spacing: .06em; }
.m-reason { font-family: var(--serif); font-size: 22px; line-height: 1.25; margin: 6px 0 10px; }
.btn.follow { padding: 10px 18px; font-size: 15px; }
.note { color: var(--muted); font-size: 14px; margin-top: 20px; }
.cta-again { margin-top: 40px; padding: 28px; border: 2px dashed var(--ink); border-radius: 20px; text-align: center; }
.cta-again p { font-family: var(--serif); font-size: 30px; margin: 0 0 14px; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1100px; margin: 0 auto; padding: 30px 22px; color: var(--muted); font-size: 14px; }

/* planet x */
main.wide { max-width: 1240px; }
.map-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 3vh 0 16px; }
.map-title { font-size: clamp(44px, 6vw, 72px); }
.map-stage { position: relative; height: min(76vh, 820px); background: radial-gradient(ellipse at 50% 40%, #2a2119 0%, #14110d 60%, #0d0b09 100%); border-radius: 28px; overflow: hidden; touch-action: none; }
.globe-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.globe-canvas:active { cursor: grabbing; }
.globe-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.globe-label { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 13px; font-weight: 600; color: #f6f1e7; padding: 5px 11px; border-radius: 999px; background: rgba(20,17,13,.72); border: 1px solid color-mix(in srgb, var(--c, #f6f1e7) 70%, transparent); backdrop-filter: blur(4px); transition: opacity .2s; will-change: transform; }
.globe-label.continent { font-family: var(--serif); font-weight: 400; font-size: 22px; letter-spacing: .02em; padding: 2px 12px; background: none; border: 0; backdrop-filter: none; text-shadow: 0 1px 12px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.9); color: color-mix(in srgb, var(--c) 35%, #fff); }
.globe-label.country { font-size: 11.5px; font-weight: 600; padding: 3px 9px; background: rgba(13,11,9,.7); border-color: rgba(246,241,231,.25); }
.globe-label.me { background: #ff6a3d; border-color: #ff6a3d; color: white; font-weight: 700; }
.tip { position: absolute; z-index: 3; pointer-events: none; background: #f6f1e7; color: var(--ink); font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 10px; white-space: nowrap; transform: translate(-50%, -150%); }
.pcard { position: absolute; z-index: 4; left: 18px; bottom: 18px; display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 20px; padding: 14px 18px 14px 14px; max-width: calc(100% - 36px); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.pcard-av { width: 58px; height: 58px; border-radius: 50%; background: var(--line); object-fit: cover; flex: none; }
.pcard-name { font-weight: 700; font-size: 17px; text-decoration: none; }
.pcard-meta { margin: 3px 0 10px; color: var(--muted); font-size: 14px; }
.pcard-actions { display: flex; gap: 6px; }
.small-btn { padding: 7px 14px !important; font-size: 14px !important; }
.pcard-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 20px; padding: 2px 6px; color: var(--muted); }
.pcard-x:hover { transform: none; box-shadow: none; color: var(--ink); }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #cfc6b5; font-family: var(--serif); font-size: 26px; text-align: center; padding: 30px; margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.legend button { font-size: 13px; font-weight: 500; padding: 6px 12px; border-width: 1px; border-color: var(--line); display: inline-flex; gap: 6px; align-items: center; }
.legend button i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend button.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }

@media (max-width: 620px) {
  .match { grid-template-columns: 48px 1fr; }
  .m-av img { width: 48px; height: 48px; }
  .btn.follow { grid-column: 1 / -1; }
  .me { flex-direction: column; align-items: flex-start; }
  .m-reason { font-size: 20px; }
}
