/* ==========================================================================
   WORLD — components and pages
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
img { display: block; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }

.ic { flex: none; display: inline-block; vertical-align: middle; }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.faint { color: var(--faint); }
.sub { color: var(--muted); }
.hint { color: var(--faint); font-size: 13px; }
.about { color: var(--ink-2); max-width: 64ch; }
.accent { color: var(--accent-text); }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.center { text-align: center; }
.mt-6 { margin-top: 6px; } .mt-10 { margin-top: 10px; } .mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

.flag { border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); flex: none; }
[data-theme="dark"] .flag { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }

/* ---------------------------------------------------------------- shell */

.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
html[data-side="rail"] .shell { grid-template-columns: var(--side-rail) 1fr; }
.main { min-width: 0; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.logo { display: flex; align-items: center; gap: 12px; padding: 4px 6px 16px; color: var(--ink); text-decoration: none !important; }
.logo-mark { display: flex; }
.logo-svg { display: block; }
.logo-text { display: flex; flex-direction: column; min-width: 0; }
.logo-word { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; line-height: 1; }
.logo-tag { color: var(--muted); font-size: 12px; margin-top: 3px; white-space: nowrap; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link {
  display: flex; align-items: center; gap: 14px;
  height: 46px; padding: 0 14px; border-radius: var(--pill);
  color: var(--ink-2); font-weight: 550; text-decoration: none !important;
  transition: background .15s, color .15s;
}
.side-link:hover { background: var(--panel-2); color: var(--ink); }
.side-link.on { background: var(--accent-soft); color: var(--accent-text); }
.side-cta { padding: 12px 0 6px; }

.side-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.side-value { display: block; font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side-draw-in {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: var(--r); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--ink); text-decoration: none !important;
}
.side-draw-in .flag { border-radius: 5px; }
.side-timer { font-size: 13px; font-weight: 600; color: var(--accent-text); }

.side-card { margin-top: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.side-card-row { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 14px; }
.side-card-row + .side-card-row { border-top: 1px solid var(--line); }
.side-bottom { display: flex; align-items: center; justify-content: space-between; padding: 10px 6px 0; }

.toggle { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--pill); }
.toggle button { width: 34px; height: 28px; border: 0; border-radius: var(--pill); background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.toggle button.on { background: var(--panel-3); color: var(--ink); }

.icon-btn {
  width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center;
  border: 0; border-radius: var(--pill); background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background .15s;
}
.icon-btn:hover:not(:disabled) { background: var(--panel-3); color: var(--ink); text-decoration: none; }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn.sm { width: 28px; height: 28px; }

.side-collapse {
  position: fixed; z-index: 30; top: 26px; left: calc(var(--side-w) - 13px);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); cursor: pointer;
}
.side-collapse:hover { color: var(--ink); }
html[data-side="rail"] .side-collapse { left: calc(var(--side-rail) - 13px); transform: rotate(180deg); }
html[data-side="rail"] .logo-text,
html[data-side="rail"] .side-link span,
html[data-side="rail"] .side-cta .btn span,
html[data-side="rail"] .side-draw,
html[data-side="rail"] .side-card,
html[data-side="rail"] .side-bottom .side-label { display: none; }
html[data-side="rail"] .sidebar { padding: 18px 10px; align-items: center; }
html[data-side="rail"] .side-link { width: 52px; justify-content: center; padding: 0; }
html[data-side="rail"] .side-cta .btn { width: 52px; padding: 0; }
html[data-side="rail"] .side-bottom { flex-direction: column; margin-top: auto; }
html[data-side="rail"] .toggle { flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: var(--top-h); padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-logo { display: none; }
.search {
  flex: 1; min-width: 0; max-width: 520px; height: 44px; display: flex; align-items: center; gap: 10px;
  padding: 0 14px; border-radius: var(--pill); background: var(--panel); border: 1px solid var(--line); color: var(--muted);
}
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 12px var(--mono); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--faint); }
.search-results {
  position: absolute; top: calc(var(--top-h) - 6px); left: 28px; width: min(520px, calc(100% - 56px));
  max-height: 60vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
}
.wallet-btn {
  margin-left: auto; flex: none; height: 44px; padding: 0 18px; display: inline-flex; align-items: center; gap: 10px;
  border: 0; border-radius: var(--pill); background: var(--accent); color: var(--on-accent); font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.wallet-btn:hover { background: var(--accent-hover); }
.wallet-btn.on { background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); }

.content { padding: 28px; max-width: 1280px; margin: 0 auto; }

/* ---------------------------------------------------------------- basics */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ph-title { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; }
.ph-title .ic { color: var(--accent-text); }
.ph-right { margin-left: auto; }
.panel-body { padding: 20px; }
.panel-body.flush { padding: 6px; }

.page-head { display: flex; align-items: flex-start; gap: 16px; }
.ph-ic { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); }
.ph-body { flex: 1; min-width: 0; }
.title { font-size: 32px; }
.ph-actions { flex: none; }
.h2 { font-size: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  padding: 6px 12px; border-radius: var(--pill); background: var(--accent-soft); color: var(--accent-text);
  font-size: 13px; font-weight: 600; text-decoration: none !important;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px;
  border-radius: var(--pill); background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 550;
}
.chip-blue { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid transparent; border-radius: var(--pill); font-weight: 650; cursor: pointer;
  text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-md { height: 42px; padding: 0 20px; font-size: 14px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:active:not(:disabled) { background: var(--accent-press); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--panel-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-ghost.is-busy::after { border-color: var(--line-2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 20px; text-align: center; color: var(--muted); }
.empty .ic { color: var(--faint); }
.empty h3 { font-size: 22px; color: var(--ink); }
.empty p { max-width: 48ch; }

.skel-rows { display: flex; flex-direction: column; gap: 14px; }
.skel-row { display: flex; align-items: center; gap: 14px; }
.skel { background: var(--panel-2); border-radius: 8px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.notice { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--r); font-size: 14px; }
.notice-err { background: var(--down-soft); color: var(--down); }

.toasts { position: fixed; z-index: 100; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 12px 18px; border-radius: var(--r); background: var(--ink); color: var(--bg); font-weight: 550; font-size: 14px; max-width: min(520px, 90vw); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.toast-err { background: var(--down); color: #fff; }

/* ---------------------------------------------------------------- lists */

.trow {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: var(--r);
  color: var(--ink); text-decoration: none !important;
}
.trow:hover { background: var(--panel-2); }
.trow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.trow-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow-sub { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.trow-right { display: flex; flex-direction: column; align-items: flex-end; }
.trow-mcap { font-family: var(--mono); font-weight: 600; }
.rank { width: 28px; text-align: center; font-family: var(--mono); font-weight: 600; color: var(--faint); }
.coin-row:nth-child(1) .rank, .coin-row:nth-child(2) .rank, .coin-row:nth-child(3) .rank { color: var(--accent-text); }
.coin-img { border-radius: 12px; object-fit: cover; flex: none; background: var(--panel-2); }
.coin-img-flag { display: grid; place-items: center; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.coin-card {
  display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r-lg);
  background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important;
  transition: border-color .15s, transform .15s var(--ease);
}
.coin-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.coin-card .coin-img { width: 100% !important; height: auto !important; aspect-ratio: 1; margin-bottom: 6px; }
.coin-card-country { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.coin-card-name { font-family: var(--display); font-weight: 800; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-card-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.coin-card-foot b { color: var(--ink); font-family: var(--mono); }

.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
.stat-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-label .ic { color: var(--accent-text); }
.stat-value { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -0.02em; }
.stat-sub { color: var(--faint); font-size: 13px; }

.steps { display: flex; flex-direction: column; gap: 18px; }
.step { display: flex; gap: 16px; }
.step-n { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; }
.step-title { font-weight: 700; font-size: 16px; }
.step-text { color: var(--muted); margin-top: 2px; max-width: 70ch; }

.facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.facts li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 14px; }
.facts li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv-k { color: var(--muted); }
.kv-v { display: inline-flex; align-items: center; gap: 6px; text-align: right; }

/* ---------------------------------------------------------------- forms */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.flabel { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .textarea {
  width: 100%; padding: 0 14px; height: 46px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); font: inherit; outline: 0;
  transition: border-color .15s;
}
.textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus { border-color: var(--accent); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.seg-group { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn { height: 36px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--line-2); background: none; font-weight: 600; font-size: 13px; cursor: pointer; }
.seg-btn:hover { background: var(--panel-2); }
.seg-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.devbuy-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.devbuy-custom { position: relative; width: 140px; }
.devbuy-custom .input { height: 36px; padding-right: 44px; }
.devbuy-unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--faint); }
.devbuy-cost { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); font-size: 14px; }
.devbuy-cost.is-warn { background: var(--down-soft); }
.devbuy-warn { color: var(--down); font-weight: 600; }

/* ---------------------------------------------------------------- home */

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 24px; align-items: center;
  padding: 36px 36px 36px 44px; overflow: hidden;
}
.hero-copy { display: flex; flex-direction: column; gap: 20px; min-height: 380px; justify-content: center; }
.hero-title { font-size: clamp(38px, 4.4vw, 62px); letter-spacing: -0.035em; line-height: .98; }
.hero-sub { color: var(--muted); font-size: 17px; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats { display: flex; gap: 28px; padding-top: 8px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.1; }
.hero-stats span { color: var(--muted); font-size: 13px; }

.hero-globe { position: relative; }
.globe-host { width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1; }
.globe-canvas { display: block; cursor: grab; touch-action: none; }
.globe-hint { text-align: center; color: var(--faint); font-size: 12px; margin-top: 6px; }
.globe-tip {
  position: absolute; z-index: 5; pointer-events: none;
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-size: 13px; white-space: nowrap;
}
.tip-owned, .tip-free { font-family: var(--mono); font-size: 12px; padding: 1px 8px; border-radius: var(--pill); }
.tip-owned { background: var(--accent); color: #fff; }
.tip-free { background: color-mix(in srgb, var(--bg) 20%, transparent); }

.reveal { display: flex; flex-direction: column; gap: 18px; animation: rise .45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.reveal-flag .flag { width: 120px; height: 90px; border-radius: 12px; }
.reveal-body { display: flex; flex-direction: column; gap: 8px; }
.reveal-name { font-size: clamp(40px, 4.6vw, 64px); letter-spacing: -0.035em; }
.reveal-timer { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 8px 14px; border-radius: var(--pill); background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; }
.reveal-timer b { color: var(--accent-text); }
.reveal-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------- launch */

.launch-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
.launch-side { position: sticky; top: calc(var(--top-h) + 20px); }
.country-bar { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.country-bar .flag { width: 64px; height: 48px; border-radius: 8px; }
.country-bar-name { display: block; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.timer-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--pill); background: var(--accent-soft); color: var(--accent-text); }
.coin-preview { overflow: hidden; }
.coin-preview-art svg { display: block; width: 100%; height: auto; }
.coin-preview-body { padding: 14px 18px 16px; }
.coin-preview-name { font-family: var(--display); font-weight: 800; font-size: 20px; }
.launch-status { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--r); background: var(--panel-2); font-size: 14px; }
.launch-status.is-err { background: var(--down-soft); color: var(--ink); }
.launch-status.is-ok { background: var(--up-soft); }

/* ---------------------------------------------------------------- countries */

.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.wall-tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 10px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); text-decoration: none !important;
  background: var(--panel-2);
}
.wall-tile .flag { grid-row: span 2; opacity: .45; filter: grayscale(.7); transition: opacity .15s, filter .15s; }
.wall-tile:hover { border-color: var(--line-2); }
.wall-tile:hover .flag { opacity: 1; filter: none; }
.wall-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wall-free { font-size: 11px; color: var(--faint); }
.wall-tick { font-size: 11px; color: var(--accent-text); }
.wall-tile.is-owned { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.wall-tile.is-owned .flag { opacity: 1; filter: none; }

/* ---------------------------------------------------------------- country & coin */

.country-hero, .coin-hero { display: grid; grid-template-columns: 340px 1fr; gap: 32px; padding: 24px; align-items: center; }
.country-art, .coin-hero-art { border-radius: var(--r-lg); overflow: hidden; background: var(--panel-2); }
.country-art svg, .country-art img, .coin-hero-art .coin-img { display: block; width: 100% !important; height: auto !important; aspect-ratio: 1; border-radius: 0; }
.country-body, .coin-hero-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.country-name, .coin-name { font-size: clamp(34px, 4vw, 52px); letter-spacing: -0.03em; }
.owned-card { padding: 18px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); }
.owned-name { font-family: var(--display); font-weight: 800; font-size: 22px; }
.ca-pill { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 4px 0 14px; border-radius: var(--pill); background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; padding: 28px; }
  .hero-copy { min-height: 0; }
  .globe-host { max-width: 460px; }
  .launch-grid { grid-template-columns: 1fr; }
  .launch-side { position: static; }
}

@media (max-width: 860px) {
  .shell, html[data-side="rail"] .shell { grid-template-columns: 1fr; }
  .sidebar, .side-collapse { display: none; }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar-logo { display: flex; }
  .search kbd { display: none; }
  .search-results { left: 16px; width: calc(100% - 32px); }
  .wallet-btn span { display: none; }
  .wallet-btn { padding: 0 14px; }
  .content { padding: 16px; padding-bottom: 88px; }
  .statgrid { grid-template-columns: 1fr; }
  .form-2 { grid-template-columns: 1fr; }
  .country-hero, .coin-hero { grid-template-columns: 1fr; padding: 16px; gap: 18px; }
  .hero { padding: 20px; }
  .hero-stats { gap: 20px; }
  .title { font-size: 26px; }
  .page-head { flex-wrap: wrap; }
}

/* the phone's bottom navigation, built from the sidebar links */
.mobile-nav {
  display: none; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 4px;
  background: var(--panel); border-top: 1px solid var(--line);
}
.mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none !important; }
.mobile-nav a.on { color: var(--accent-text); background: var(--accent-soft); }

@media (max-width: 860px) {
  .mobile-nav { display: flex; }
  .toasts { bottom: 84px; }
}

@media (max-width: 1080px) {
  .hero-globe { order: -1; }
}

@media (max-width: 520px) {
  .hero-title { font-size: 38px; }
  .hero-sub { font-size: 15px; }
  .hero-actions .btn { flex: 1; }
  .reveal-actions .btn { flex: 1; }
  .globe-host { max-width: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* a coin with no pinned image yet: its flag, centred */
.coin-hero-art .coin-img-flag, .coin-card .coin-img-flag { display: grid !important; place-items: center; }
.coin-hero-art .coin-img-flag .flag, .coin-card .coin-img-flag .flag { width: 62%; height: auto; border-radius: 10px; }

/* launch day: the $WORLD contract address on the home page */
.ca-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: fit-content; max-width: 100%; padding: 6px 6px 6px 16px; border-radius: var(--pill); background: var(--panel-2); border: 1px solid var(--line); }
.ca-bar-label { font-size: 12px; font-weight: 700; color: var(--accent-text); }
.ca-bar-addr { font-size: 13px; margin-right: 4px; }
