:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --ocean: #dbeafe;
  --text: #0f172a;
  --muted: #475569;
  --border: #cbd5e1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #14b8a6;
  --accent-dark: #0f766e;
  --accent-soft: #f0fdfa;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--primary); color: var(--card); padding: 8px 16px; border-radius: var(--radius);
}
.skip-link:focus { left: 16px; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px;
}
.brand-link {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--text); font-weight: 700; font-size: 18px; text-decoration: none;
}
.brand-link:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.brand-coord {
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border);
  padding: 4px 8px; border-radius: 999px;
}
.primary-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-link {
  color: var(--text); font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px; transition: background .15s;
}
.nav-link:hover { background: var(--bg); color: var(--primary); text-decoration: none; }

/* Buttons & Chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 24px; border-radius: var(--radius);
  font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1.2;
  cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-lg { min-height: 48px; padding: 12px 24px; }
.btn-full { width: 100%; }
.btn-primary { background: var(--primary); color: var(--card); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.link-btn {
  background: none; border: none; padding: 4px 8px; color: var(--primary);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.chip {
  display: inline-flex; align-items: center; padding: 4px 12px;
  font-size: 12px; font-weight: 600; border-radius: 999px;
  background: var(--card); color: var(--muted); border: 1px solid var(--border);
}
.chip-primary { background: var(--primary-soft); color: var(--primary-dark); border-color: var(--ocean); }
.chip-teal { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }

/* Hero & Game Stage */
.hero-stage-band { padding: 24px 0 32px; }
.hero-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.hero-title-group h1 {
  margin: 0 0 8px; font-size: 36px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em;
}
.hero-sub { margin: 0; font-size: 16px; color: var(--muted); max-width: 64ch; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.atlas-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 540px; max-height: 760px;
  background: var(--ocean); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.atlas-stage > iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--bg);
}
.atlas-cover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.atlas-cover-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.atlas-cover-scrim {
  position: relative; z-index: 2; width: 100%; height: 100%; padding: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(246, 248, 251, .42);
}
.atlas-cover-card {
  max-width: 540px; width: 100%; background: rgba(255, 255, 255, .96);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 32px; text-align: center; box-shadow: var(--shadow-md);
}
.cover-kicker {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--primary-dark); background: var(--primary-soft);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.cover-kicker-teal { color: var(--accent-dark); background: var(--accent-soft); }
.cover-headline { margin: 0 0 24px; font-size: 18px; font-weight: 600; color: var(--text); line-height: 1.5; }
.cover-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cover-footnote { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

.atlas-loader {
  position: absolute; inset: 0; z-index: 3; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: var(--card); text-align: center; padding: 24px;
}
.atlas-stage[data-gf-state="loading"] .atlas-cover { display: none; }
.atlas-stage[data-gf-state="loading"] .atlas-loader { display: flex; }
.atlas-stage[data-gf-state="playing"] .atlas-cover,
.atlas-stage[data-gf-state="playing"] .atlas-loader { display: none; }

.compass-spinner { position: relative; width: 56px; height: 56px; }
.compass-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid var(--ocean); border-top-color: var(--primary); border-right-color: var(--accent);
  animation: ff-spin 1s linear infinite;
}
.compass-needle {
  position: absolute; left: 50%; top: 50%; width: 12px; height: 12px;
  margin: -6px 0 0 -6px; border-radius: 50%; background: var(--primary);
}
@keyframes ff-spin { to { transform: rotate(360deg); } }
.loader-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.loader-sub { margin: 0; font-size: 14px; color: var(--muted); }

/* Action Dock */
.dock-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 12px; padding: 12px 16px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.dock-left, .dock-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dock-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--card);
  color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.dock-btn:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.dock-btn-subtle { padding: 8px 12px; color: var(--muted); }
.dock-btn[data-gf-liked] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.dock-count {
  font-size: 12px; font-weight: 700; background: var(--bg); color: var(--text); padding: 2px 8px; border-radius: 999px;
}
.share-toast { font-size: 14px; font-weight: 600; color: var(--accent-dark); }

/* Signature Motif: Great-Circle Route Bar */
.route-motif-band { padding: 0 0 32px; }
.route-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.route-header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.route-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--primary-dark); }
.route-meta { font-size: 14px; font-weight: 600; color: var(--muted); }
.route-track {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; position: relative;
}
.route-stop {
  display: flex; flex-direction: column; gap: 4px; padding: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.route-stop strong { font-size: 16px; color: var(--text); }
.route-stop span { font-size: 14px; color: var(--muted); }
.stop-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); margin-bottom: 4px; }
.route-stop-far { background: var(--accent-soft); border-color: var(--accent); }
.route-stop-far .stop-dot { background: var(--accent-dark); }
.route-stop-far strong { color: var(--accent-dark); }

/* Mode Spotlight */
.content-band { padding: 32px 0; }
.mode-spotlight {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.mode-spotlight-media img {
  width: 100%; border-radius: 8px; border: 1px solid var(--border);
}
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent-dark); margin-bottom: 8px;
}
.mode-spotlight-body h2 { margin: 0 0 12px; font-size: 28px; line-height: 1.2; }
.mode-spotlight-body p { margin: 0 0 24px; color: var(--muted); max-width: 65ch; }
.inline-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Editorial Layout & Specs Rail */
.prose-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start;
}
.prose-article { max-width: 70ch; }
.prose-article h2 { margin: 32px 0 12px; font-size: 28px; line-height: 1.2; color: var(--text); }
.prose-article h2:first-child { margin-top: 0; }
.prose-article h3 { margin: 24px 0 8px; font-size: 22px; line-height: 1.25; color: var(--text); }
.prose-article p { margin: 0 0 16px; font-size: 16px; color: var(--text); }
.prose-article ul, .prose-article ol { margin: 0 0 16px; padding-left: 24px; }
.prose-article li { margin-bottom: 8px; }
.prose-article table {
  width: 100%; border-collapse: collapse; margin: 16px 0 24px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.prose-article th, .prose-article td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px;
}
.prose-article th { background: var(--bg); font-weight: 700; color: var(--text); }
.prose-article img {
  margin: 24px 0; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); width: 100%; height: auto;
}

.specs-rail { display: flex; flex-direction: column; gap: 24px; }
.specs-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.specs-card h2 { margin: 0 0 16px; font-size: 22px; line-height: 1.2; }
.specs-list { margin: 0; }
.spec-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.spec-row:last-child { border-bottom: 0; }
.spec-row dt { color: var(--muted); }
.spec-row dd { margin: 0; font-weight: 600; text-align: right; color: var(--text); }

.tier-list, .pack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tier-list li {
  display: grid; grid-template-columns: auto auto; gap: 4px 12px; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.tier-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.tier-list li > span:last-child { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
.tier-list li > strong { justify-self: end; font-size: 14px; }
.tier-pill {
  display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.tier-c { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.tier-u { background: var(--primary-soft); color: var(--primary-dark); }
.tier-r { background: var(--ocean); color: var(--primary-dark); }
.tier-e { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid var(--accent); }
.tier-f { background: var(--text); color: var(--accent-soft); }

.pack-list li { display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.pack-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.pack-list strong { font-size: 16px; }
.pack-list span { font-size: 14px; color: var(--muted); }
.rail-cta { margin: 16px 0 0; }

/* Semantic Accordion FAQ (modern-web-guidance: accordion) */
.accordion h2 { margin: 0 0 24px; font-size: 28px; line-height: 1.2; }
.faq-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.faq-summary {
  list-style: none; display: flex; align-items: center; gap: 12px;
  padding: 16px 24px; font-size: 16px; font-weight: 600; color: var(--text); cursor: pointer;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::before {
  content: ""; flex-shrink: 0; width: 10px; height: 10px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}
details.faq-item[open] > .faq-summary::before { transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) {
  .faq-summary::before { transition: transform .2s ease; }
  details.faq-item::details-content {
    transition: block-size .25s ease, content-visibility .25s ease, display .25s ease;
    transition-behavior: allow-discrete;
  }
}
details.faq-item::details-content { interpolate-size: allow-keywords; overflow: clip; contain: layout; }
details.faq-item:not([open])::details-content { block-size: 0; }
.faq-body { padding: 0 24px 16px 46px; color: var(--muted); max-width: 70ch; }
.faq-body p { margin: 0; }

/* Comments */
.comments-wrap { max-width: 780px; }
.comments-head h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; }
.comments-sub { margin: 0 0 24px; color: var(--muted); }
.comment-form {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm);
}
.reply-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--primary-soft); padding: 8px 12px; border-radius: 8px; margin-bottom: 16px; font-size: 14px;
}
.form-row { margin-bottom: 16px; }
.field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field-input, .field-textarea {
  width: 100%; padding: 12px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-msg { font-size: 14px; font-weight: 600; color: var(--accent-dark); }
.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment-empty-note { color: var(--muted); margin: 0; }
[data-gf-comments]:not([data-gf-empty]) .comment-empty-note { display: none; }
[data-gf-comments][data-gf-off] { display: none; }
.comment-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 24px; box-shadow: var(--shadow-sm);
}
.comment-card[data-gf-owner] { border-left: 4px solid var(--primary); background: var(--primary-soft); }
.comment-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.comment-author { font-size: 16px; }
.owner-badge {
  display: none; font-size: 12px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: var(--primary); color: var(--card);
}
.comment-card[data-gf-owner] .owner-badge { display: inline-flex; }
.comment-time { font-size: 12px; color: var(--muted); margin-left: auto; }
.comment-body { margin: 0 0 8px; white-space: pre-wrap; }
.comment-to { font-weight: 600; color: var(--primary-dark); margin-right: 4px; }
.comment-replies { margin-top: 12px; padding-left: 24px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 12px; }

/* Inner & Legal Pages */
.inner-page-band { padding: 32px 0 64px; }
.inner-wrap { max-width: 820px; }
.breadcrumb { display: flex; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.inner-header { margin-bottom: 32px; }
.inner-header h1 { margin: 0 0 12px; font-size: 36px; line-height: 1.2; }
.inner-sub, .legal-date { margin: 0; font-size: 16px; color: var(--muted); }
.inner-faq { margin-top: 48px; }
.inner-cta-box {
  margin-top: 48px; padding: 24px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.inner-cta-box p { margin: 0 0 16px; font-weight: 600; font-size: 18px; }
.not-found-box {
  max-width: 600px; margin: 32px auto; padding: 32px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}

/* Footer */
.site-footer {
  margin-top: 48px; background: var(--card); border-top: 1px solid var(--border); padding: 48px 0;
}
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-meta { max-width: 540px; }
.footer-logo {
  display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700;
  color: var(--text); margin-bottom: 12px;
}
.footer-lead { margin: 0 0 8px; font-size: 14px; color: var(--text); }
.footer-note, .footer-copy { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; align-content: flex-start; }
.footer-links a { font-size: 14px; font-weight: 600; color: var(--muted); }
.footer-links a:hover { color: var(--primary); }

@media (max-width: 900px) {
  .prose-layout, .mode-spotlight { grid-template-columns: 1fr; }
  .route-track { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .topbar-row { min-height: 52px; gap: 8px; flex-wrap: nowrap; }
  .brand-link { gap: 8px; font-size: 16px; flex-shrink: 0; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-coord { display: none; }
  .primary-nav {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; gap: 4px;
  }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 6px 8px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
  .hero-title-group h1, .inner-header h1 { font-size: 28px; }
  .atlas-stage { aspect-ratio: auto; min-height: 540px; height: 78vh; }
  .atlas-cover-card { padding: 24px 16px; }
  .cover-actions .btn { width: 100%; }
  .route-track { grid-template-columns: 1fr; }
  .dock-bar { padding: 12px; }
}


/* =========================================================
   Embedded Interactive Equal Earth Map Game (embed-farflung)
   ========================================================= */
.atlas-embed-body {
  margin: 0; padding: 0; height: 100vh; height: 100dvh; overflow: hidden;
  background: var(--bg); color: var(--text); font-family: var(--font);
}
.ff-app {
  display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden;
  background: var(--bg);
}

/* HUD */
.ff-hud {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--border);
}
.ff-hud-left, .ff-hud-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ff-seg {
  display: inline-flex; padding: 4px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
}
.ff-seg-btn {
  min-height: 36px; padding: 4px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.ff-seg-btn[aria-selected="true"] {
  background: var(--primary); color: var(--card); box-shadow: var(--shadow-sm);
}
.ff-select, .ff-pill-btn {
  min-height: 40px; padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.ff-pill-btn.is-relaxed { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.ff-dist-readout {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; padding: 0 8px;
}
.ff-dist-lbl { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.ff-dist-readout strong { font-size: 18px; color: var(--primary-dark); }
.ff-icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--border); background: var(--card);
  color: var(--text); cursor: pointer;
}
.ff-icon-btn:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }

/* Prompt Banner */
.ff-prompt-strip {
  flex-shrink: 0; padding: 12px 16px; background: var(--card);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); z-index: 5;
}
.ff-prompt-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px;
}
.ff-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ff-step-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 32px; height: 26px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--bg); color: var(--muted);
  border: 1px solid var(--border);
}
.ff-step-pill.is-cur { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
.ff-step-pill.t-c { background: var(--bg); color: var(--muted); border-color: var(--border); }
.ff-step-pill.t-u { background: var(--primary-soft); color: var(--primary-dark); border-color: var(--ocean); }
.ff-step-pill.t-r { background: var(--ocean); color: var(--primary-dark); border-color: var(--primary); }
.ff-step-pill.t-e { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }
.ff-step-pill.t-f { background: var(--text); color: var(--accent-soft); border-color: var(--accent); }
.ff-step-pill.t-x { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

.ff-clock-box {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  background: var(--primary-soft); border: 1px solid var(--ocean); color: var(--primary-dark);
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.ff-clock-box.is-warn { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.ff-clock-box.is-relaxed { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }

.ff-prompt-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ff-cat-tag {
  font-size: 12px; font-weight: 700; color: var(--accent-dark); background: var(--accent-soft);
  border: 1px solid var(--accent); padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.ff-prompt-q { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--text); }

/* Map Stage */
.ff-map-stage {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  background: var(--primary-soft); touch-action: none; user-select: none;
}
.ff-map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ff-map-svg {
  width: 100%; height: 100%; display: block; cursor: grab;
  --ff-inv-zoom: 1;
}
.ff-map-svg:active { cursor: grabbing; }
.ff-ocean { fill: var(--ocean); stroke: var(--primary); stroke-opacity: .35; stroke-width: 1.2; }
.ff-line { fill: none; pointer-events: none; }
.ff-eq { stroke: var(--primary); stroke-width: .9; stroke-dasharray: 4 4; opacity: .45; }
.ff-tropic, .ff-meridian { stroke: var(--primary); stroke-width: .7; stroke-dasharray: 3 4; opacity: .25; }

.ff-country {
  fill: var(--card); stroke: var(--muted); stroke-opacity: .55; stroke-width: .65;
  vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .12s;
}
.ff-country:hover { fill: var(--ocean); stroke: var(--primary); stroke-opacity: 1; }
.ff-country.is-selected { fill: var(--primary); stroke: var(--primary-dark); stroke-opacity: 1; stroke-width: 1.4; }
.ff-country.is-valid-hint { fill: var(--accent-soft); stroke: var(--accent-dark); stroke-opacity: 1; }
.ff-country.is-gem-hi { fill: var(--accent); stroke: var(--text); stroke-opacity: 1; stroke-width: 1.4; }
.ff-country.is-miss { fill: var(--danger-soft); stroke: var(--danger); stroke-opacity: 1; stroke-width: 1.4; }
.ff-country.is-correct-c { fill: var(--border); stroke: var(--muted); stroke-opacity: 1; stroke-width: 1.3; }
.ff-country.is-correct-u { fill: var(--ocean); stroke: var(--primary-dark); stroke-opacity: 1; stroke-width: 1.3; }
.ff-country.is-correct-r { fill: var(--primary); stroke: var(--primary-dark); stroke-opacity: 1; stroke-width: 1.3; }
.ff-country.is-correct-e { fill: var(--accent); stroke: var(--accent-dark); stroke-opacity: 1; stroke-width: 1.3; }
.ff-country.is-correct-f { fill: var(--accent-dark); stroke: var(--text); stroke-opacity: 1; stroke-width: 1.5; }

.ff-pin-dots.is-hidden { display: none; }
.ff-dot {
  cursor: pointer; stroke: var(--card); stroke-width: .9;
  transform-box: fill-box; transform-origin: center;
  transform: scale(var(--ff-inv-zoom, 1));
}
.ff-micro { fill: var(--accent-dark); }
.ff-small { fill: var(--primary); opacity: .82; }
.ff-dot:hover { fill: var(--text); stroke: var(--accent); stroke-width: 1.4; }
.ff-dot.is-selected { fill: var(--primary); stroke: var(--text); stroke-width: 1.6; }
.ff-dot.is-valid-hint { fill: var(--accent); stroke: var(--text); stroke-width: 1.3; }
.ff-dot.is-gem-hi { fill: var(--text); stroke: var(--accent); stroke-width: 1.8; }
.ff-dot.is-miss { fill: var(--danger); stroke: var(--card); stroke-width: 1.5; }

.ff-pin-marker { pointer-events: none; }
.ff-hover-tip {
  position: absolute; z-index: 15; pointer-events: none;
  padding: 6px 12px; border-radius: 8px; background: var(--text); color: var(--card);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-md); white-space: nowrap;
}

/* Zoom Controls */
.ff-map-controls {
  position: absolute; top: 12px; right: 12px; z-index: 12;
  display: flex; flex-direction: column; gap: 6px;
}
.ff-ctrl-btn {
  width: 40px; height: 40px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .95);
  color: var(--text); font: inherit; font-size: 18px; font-weight: 700;
  cursor: pointer; box-shadow: var(--shadow-sm);
}
.ff-ctrl-btn:hover { border-color: var(--primary); color: var(--primary); }
.ff-ctrl-btn.is-on { color: var(--accent-dark); border-color: var(--accent); background: var(--accent-soft); }

/* Bottom Confirm Bar */
.ff-confirm-bar {
  position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 14;
  max-width: 620px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(255, 255, 255, .97); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.ff-selected-info { display: flex; flex-direction: column; min-width: 0; }
.ff-sel-kicker { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.ff-sel-name { font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ff-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.ff-btn:disabled { opacity: .45; cursor: not-allowed; }
.ff-btn-primary { background: var(--primary); color: var(--card); }
.ff-btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.ff-btn-teal { background: var(--accent-dark); color: var(--card); }
.ff-btn-teal:hover { background: var(--text); }
.ff-btn-subtle { background: var(--bg); color: var(--text); border-color: var(--border); }
.ff-btn-subtle:hover { border-color: var(--primary); color: var(--primary); }

/* Reveal Drawer */
.ff-reveal-drawer {
  position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 18;
  max-width: 680px; margin: 0 auto; padding: 16px 20px;
  background: rgba(255, 255, 255, .98); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.ff-reveal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.ff-stamp {
  display: inline-flex; padding: 4px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: .03em;
}
.ff-stamp.t-c { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.ff-stamp.t-u { background: var(--primary-soft); color: var(--primary-dark); }
.ff-stamp.t-r { background: var(--ocean); color: var(--primary-dark); }
.ff-stamp.t-e { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid var(--accent); }
.ff-stamp.t-f { background: var(--text); color: var(--accent-soft); }
.ff-stamp.t-x { background: var(--danger-soft); color: var(--danger); }
.ff-crowd-stat { font-size: 12px; font-weight: 600; color: var(--muted); }
.ff-reveal-picked { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text); }
.ff-reveal-gem { margin: 0 0 12px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.ff-reveal-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Expedition Camp Summary */
.ff-camp {
  position: absolute; inset: 0; z-index: 25; overflow-y: auto;
  background: rgba(246, 248, 251, .96); padding: 16px;
}
.ff-camp-card {
  max-width: 680px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-md);
}
.ff-camp-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px;
}
.ff-camp-kicker { font-size: 12px; font-weight: 700; color: var(--primary-dark); letter-spacing: .05em; }
.ff-camp-title { margin: 4px 0 0; font-size: 28px; line-height: 1.2; }
.ff-rank-badge {
  padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-dark); border: 1px solid var(--accent);
}
.ff-camp-meter { margin-bottom: 16px; }
.ff-meter-bar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.ff-meter-fill { height: 100%; width: 0; background: var(--primary); transition: width .4s ease; }
.ff-meter-labels {
  display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); font-weight: 600;
}
.ff-camp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.ff-stat-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; text-align: center;
}
.ff-stat-box strong { display: block; font-size: 18px; color: var(--text); }
.ff-stat-box span { font-size: 12px; color: var(--muted); }
.ff-camp-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ff-camp-row {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
.ff-camp-row summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 14px; font-weight: 600;
}
.ff-camp-row summary::-webkit-details-marker { display: none; }
.ff-camp-detail { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.ff-camp-detail p { margin: 0 0 6px; }
.ff-camp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ff-share-feedback { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--accent-dark); min-height: 20px; }

/* Native Modal Dialogs (modern-web-guidance: light-dismiss-a-dialog) */
dialog.ff-dialog {
  width: min(520px, calc(100vw - 32px)); max-height: 85vh; overflow-y: auto;
  padding: 0; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); color: var(--text); box-shadow: var(--shadow-md);
}
dialog.ff-dialog::backdrop {
  background-color: rgba(15, 23, 42, .52);
  backdrop-filter: blur(2px);
}
.ff-dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.ff-dialog-head h2 { margin: 0; font-size: 18px; }
.ff-close-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 16px; cursor: pointer;
}
.ff-dialog-body { padding: 16px 20px; font-size: 14px; }
.ff-dialog-body p { margin: 0 0 12px; }
.ff-dialog-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.ff-rule-tiers { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ff-badge { display: inline-flex; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-right: 6px; }
.ff-badge.t-c { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.ff-badge.t-u { background: var(--primary-soft); color: var(--primary-dark); }
.ff-badge.t-r { background: var(--ocean); color: var(--primary-dark); }
.ff-badge.t-e { background: var(--accent-soft); color: var(--accent-dark); }
.ff-badge.t-f { background: var(--text); color: var(--accent-soft); }

.ff-name-row { display: flex; gap: 8px; margin-bottom: 8px; }
.ff-nick-input {
  flex: 1; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; font-size: 14px;
}
.ff-nick-msg { margin: 0 0 12px; font-size: 12px; font-weight: 600; color: var(--accent-dark); min-height: 16px; }
.ff-board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ff-board-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.ff-board-item.is-me { background: var(--primary-soft); border-color: var(--primary); }
.ff-board-empty { color: var(--muted); padding: 12px 0; }

@media (max-width: 640px) {
  .ff-hud { padding: 6px 8px; }
  .ff-prompt-strip { padding: 8px 12px; }
  .ff-prompt-q { font-size: 16px; }
  .ff-confirm-bar, .ff-reveal-drawer { left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; }
  .ff-camp-card { padding: 16px; }
  .ff-camp-actions .ff-btn { flex: 1; }
}
