/* Flappy travel profile, night edition.
   Neutral dark greys, near-white countries, blue city dots. No boxes: hierarchy comes from type,
   spacing and hairlines. The map runs edge to edge; a sheet springs up for each country. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-2: #1C1C1E;
  --ink: #F5F5F7;
  --ink-2: #98989F;
  --ink-3: #636366;
  --hair: rgba(255, 255, 255, .09);
  --land: #1C1C1E;
  --edge: #2C2C2E;
  --visited: #E5E5EA;
  --lived: #E5E5EA;
  --pick: #FFFFFF;
  --dot: #0A84FF;
  --sheet: rgba(28, 28, 30, .94);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--font); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--dot); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.press { transition: transform .35s var(--spring), opacity .2s; }
.press:active { transform: scale(.94); }

/* map */
.stage { position: relative; height: clamp(340px, 108vw, 72vh); min-height: 0; }
@media (min-width: 760px) { .stage { height: min(74vh, 720px); } }
.map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.map.dragging { cursor: grabbing; }
.map { shape-rendering: geometricPrecision; }
.map .c { fill: var(--land); stroke: var(--edge); stroke-width: .5px; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill .3s; }
.map .c.v { fill: var(--visited); stroke: rgba(0, 0, 0, .22); cursor: pointer; }
.map .c.l { fill: var(--visited); stroke: rgba(0, 0, 0, .22); cursor: pointer; }
.map .c.sel { fill: var(--pick); }
.map .tiny { fill: var(--visited); stroke: var(--bg); stroke-width: 1.5px; vector-effect: non-scaling-stroke; cursor: pointer; }
.map .tiny.sel { fill: var(--pick); }
.map .glow { fill: var(--dot); opacity: .18; pointer-events: none; }
.map .dot { fill: var(--dot); pointer-events: none; }
.map .ring { fill: none; stroke: var(--dot); stroke-width: 1.3px; vector-effect: non-scaling-stroke; pointer-events: none; }
.map .lab { fill: #12141B; font: 600 1px var(--font); letter-spacing: -.01em; paint-order: stroke; stroke: rgba(255, 255, 255, .92); stroke-linejoin: round; pointer-events: none; }
.stage::before, .stage::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1; }
.stage::before { top: 0; height: 104px; background: linear-gradient(rgba(0, 0, 0, .78), rgba(0, 0, 0, 0)); }
.stage::after { bottom: 0; height: 140px; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .55) 55%, var(--bg)); }

.top { position: absolute; z-index: 3; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.top img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.top .who { flex: 1; min-width: 0; line-height: 1.2; }
.top .who b { display: block; font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.top .who span { font-size: 13px; color: var(--ink-2); }
.round { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .09); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.round svg { width: 18px; height: 18px; }
body.sheet-open .tools { opacity: 0; pointer-events: none; }
.tools { transition: opacity .2s; position: absolute; z-index: 3; right: max(16px, env(safe-area-inset-right)); bottom: 26px; display: flex; gap: 8px; }
.hint { position: absolute; z-index: 3; left: 50%; bottom: 34px; transform: translateX(-50%); font-size: 12px; color: var(--ink-3); white-space: nowrap; transition: opacity .6s; pointer-events: none; }

/* page */
.page { max-width: 720px; margin: 0 auto; padding: 4px max(20px, env(safe-area-inset-right)) 64px max(20px, env(safe-area-inset-left)); }
.nums { display: flex; justify-content: space-between; gap: 12px; }
.nums div { display: grid; gap: 2px; }
.nums b { font-weight: 600; font-size: clamp(30px, 9vw, 44px); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.nums b small { font-size: .42em; color: var(--ink-3); font-weight: 500; letter-spacing: -.01em; }
.nums span { font-size: 13px; color: var(--ink-2); }
.sub { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.sub i { font-style: normal; color: var(--ink); }

section { margin-top: 44px; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 0; border-bottom: 1px solid var(--hair); text-align: left; }
.rows li:last-child .row { border-bottom: 0; }
button.row { transition: opacity .2s, transform .35s var(--spring); }
button.row:active { opacity: .6; transform: scale(.985); }
.row .flag { font-size: 24px; line-height: 1; width: 30px; flex: none; }
.row .main { flex: 1; min-width: 0; }
.row .main b { display: block; font-weight: 500; font-size: 17px; letter-spacing: -.02em; }
.row .main span { display: block; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .end { flex: none; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.row .end svg { width: 14px; height: 14px; color: var(--ink-3); }
.row .main .tag, .tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--dot); margin-left: 6px; vertical-align: 2px; }
.rec .k { width: 104px; flex: none; font-size: 14px; color: var(--ink-2); }
.rec .main b { font-size: 16px; }
.grp { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 0 2px; }
.grp h3 { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.grp span { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.home-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.home-list .row { min-height: 48px; }
.home-list li:nth-last-child(-n+2) .row { border-bottom: 0; }
.home-list .flag { font-size: 20px; width: 24px; }
.home-list .main b { font-size: 16px; }

.foot { margin-top: 56px; text-align: center; font-size: 13px; color: var(--ink-3); }
.foot b { color: var(--ink-2); font-weight: 600; }

/* sheet */
.scrim { position: fixed; inset: 0; z-index: 9; background: rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px; height: calc(100svh - 56px); display: flex; flex-direction: column;
  background: var(--sheet); -webkit-backdrop-filter: blur(28px) saturate(1.4); backdrop-filter: blur(28px) saturate(1.4);
  border-radius: 26px 26px 0 0; transform: translateY(110%); will-change: transform; box-shadow: 0 -10px 40px rgba(0, 0, 0, .45); }
.grab { flex: none; padding: 10px 20px 4px; touch-action: none; cursor: grab; }
.grab i { display: block; width: 38px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .22); margin: 0 auto 14px; }
.sh { display: flex; align-items: center; gap: 12px; }
.sh .flag { font-size: 34px; line-height: 1; }
.sh .t { flex: 1; min-width: 0; }
.sh h3 { font-size: 24px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.sh p { font-size: 14px; color: var(--ink-2); }
.sheet .close { width: 32px; height: 32px; }
.sheet .close svg { width: 14px; height: 14px; }
.sbody { flex: 1; min-height: 0; overflow-y: hidden; overscroll-behavior: contain; padding: 4px 20px calc(28px + env(safe-area-inset-bottom)); touch-action: none; }
.sheet.large .sbody { overflow-y: auto; touch-action: pan-y; }
.city { display: flex; align-items: center; gap: 12px; min-height: 46px; border-bottom: 1px solid var(--hair); font-size: 17px; letter-spacing: -.02em; }
.city:last-child { border-bottom: 0; }
.city i { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex: none; }
.city.lv i { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3.5px var(--dot); }
.city em { margin-left: auto; font-style: normal; font-size: 13px; color: var(--ink-2); }
.fade { animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.toast { position: fixed; z-index: 20; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translate(-50%, 16px); opacity: 0; padding: 11px 18px; border-radius: 999px; background: rgba(245, 245, 247, .95); color: #000; font-size: 14px; font-weight: 600; transition: opacity .25s, transform .45s var(--spring); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { .press, button.row, .toast, .fade { transition: none; animation: none; } }

/* link-preview image (?card=og) */
.poster { position: fixed; inset: 0; background: var(--bg); overflow: hidden; }
.poster .map { pointer-events: none; }
.poster .over { position: absolute; z-index: 2; left: 6vmin; bottom: 7vmin; }
.poster .over .n { display: flex; gap: 6vmin; margin-top: 3.4vmin; }
.poster .over b { display: block; font-weight: 600; font-size: 11vmin; line-height: 1; letter-spacing: -.045em; }
.poster .over span { font-size: 3.4vmin; color: var(--ink-2); }
.poster .id { display: flex; align-items: center; gap: 2.4vmin; }
.poster .id img { width: 10vmin; height: 10vmin; border-radius: 50%; object-fit: cover; }
.poster .id h1 { font-size: 6vmin; font-weight: 600; letter-spacing: -.03em; }
.poster .id p { font-size: 3.2vmin; color: var(--ink-2); }
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(0, 0, 0, .7) 34%, rgba(0, 0, 0, 0) 62%); }
