/* MeshMate public site — "Field Guide" redesign.
   Self-contained (does not touch the admin portal.css). Two themes from one
   layout: Light = warm paper + deep pine green + clay accent; Dark = warm
   green-tinted near-black + bright signal green. Tokens per design handoff.
   Headings: Space Grotesk 700, tight tracking. Body/UI: Hanken Grotesk.
   Meta/technical labels: system monospace. */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* Light — "Field Guide" */
  --bg: #fbf8f2;
  --bg-grad: linear-gradient(180deg, #fdfbf7 0%, #f4efe4 100%);
  --band: linear-gradient(180deg, #efe8dc 0%, #e6dbc8 100%);
  --surface: #ffffff;
  --surface-2: #fbf8f2;
  --line: rgba(35, 39, 31, 0.11);
  --line-strong: rgba(35, 39, 31, 0.16);

  --text: #23271f;
  --text-2: #5c5c50;
  --muted: #8a8578;

  --primary: #245c43;                                   /* pine */
  --primary-grad: linear-gradient(140deg, #2f7052 0%, #1d4c35 100%);
  --primary-grad-hover: linear-gradient(140deg, #2a6549 0%, #184229 100%);
  --on-primary: #fbf8f2;
  --primary-tint: #e7efe6;

  --accent: #c2673f;                                    /* clay */
  --accent-tint: rgba(194, 103, 63, 0.10);
  --success-dot: #5aa46a;

  --chip-bg: #efe8dc;
  --chip-text: #4a4a40;

  --preset-green-bg: rgba(36, 92, 67, 0.12);
  --preset-green-text: #245c43;
  --preset-orange-bg: rgba(194, 103, 63, 0.14);
  --preset-orange-text: #a8532e;

  --key-bg: #f4efe4;

  --hero-wash:
    radial-gradient(130% 120% at 90% -12%, rgba(36, 92, 67, 0.11), transparent 55%),
    radial-gradient(105% 120% at 0% 130%, rgba(194, 103, 63, 0.08), transparent 52%);

  --grid-line: rgba(35, 39, 31, 0.05);
  --map-bg: #f0eadd;
  --node: #245c43;
  --node-glow: none;

  --radius-card: 14px;
  --radius-btn: 11px;
  --radius-field: 12px;
  --shadow: 0 10px 30px -18px rgba(40, 45, 30, 0.35);
  --shadow-lift: 0 16px 40px -20px rgba(40, 45, 30, 0.45);

  --ui: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --head: 'Space Grotesk', var(--ui);
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #1e2318;
  --bg-grad: linear-gradient(180deg, #252c1d 0%, #181c12 100%);
  --band: linear-gradient(180deg, #1e2416 0%, #14170e 100%);
  --surface: #232a19;
  --surface-2: #1a1f12;
  --line: rgba(234, 231, 220, 0.09);
  --line-strong: rgba(234, 231, 220, 0.14);

  --text: #f2efe4;
  --text-2: #b4b2a4;
  --muted: #8f8d7e;

  --primary: #3aa876;                                   /* signal green */
  --primary-grad: linear-gradient(140deg, #52c390 0%, #2c8259 100%);
  --primary-grad-hover: linear-gradient(140deg, #5cd09b 0%, #329063 100%);
  --on-primary: #0c160e;                                /* dark text on green */
  --primary-tint: rgba(95, 192, 138, 0.14);

  --bright: #5fc08a;                                    /* links, active nav, stats */
  --accent: #e0885a;                                    /* soft orange */
  --accent-tint: rgba(224, 136, 90, 0.12);
  --success-dot: #5fc08a;

  --chip-bg: rgba(234, 231, 220, 0.08);
  --chip-text: #cdcabb;

  --preset-green-bg: rgba(95, 192, 138, 0.16);
  --preset-green-text: #7fd6a6;
  --preset-orange-bg: rgba(224, 136, 90, 0.18);
  --preset-orange-text: #eaa17c;

  --key-bg: #171b10;

  --hero-wash:
    radial-gradient(135% 120% at 88% -12%, rgba(82, 195, 144, 0.17), transparent 55%),
    radial-gradient(105% 120% at 0% 130%, rgba(224, 136, 90, 0.10), transparent 52%);

  --grid-line: rgba(234, 231, 220, 0.05);
  --map-bg: #161a0f;
  --node: #5fc08a;
  --node-glow: 0 0 12px 2px rgba(95, 192, 138, 0.6);

  --shadow: none;
  --shadow-lift: none;
}
/* Bright link/stat colour: pine in light, signal-green in dark. */
:root { --bright: #245c43; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--ui);
  color: var(--text);
  background: var(--bg-grad) fixed;
  background-color: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--bright); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: -0.02em; }

.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.eyebrow {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.02em; color: var(--muted); text-transform: none;
}
.eyebrow .slash { color: var(--accent); }

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

/* ---- Nav ---------------------------------------------------------------- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: 1120px; margin: 0 auto; padding: 22px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: url("logo.e5ba9be38018.svg") center/cover no-repeat;
  box-shadow: var(--shadow);
}
.brand-name { font-family: var(--head); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-link { color: var(--text-2); font-size: 15px; font-weight: 600; }
.nav-link:hover, .nav-link.active { color: var(--bright); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 14px; }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

.theme-toggle {
  width: 38px; height: 38px; flex: 0 0 auto; display: inline-flex; align-items: center;
  justify-content: center; background: transparent; border: 1px solid var(--line-strong);
  border-radius: 50%; color: var(--text-2); cursor: pointer; font-size: 15px; padding: 0;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--text); }
.theme-toggle::before { content: "\263E"; }                 /* moon → offer dark */
[data-theme="dark"] .theme-toggle::before { content: "\2600"; } /* sun → offer light */

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ui); font-size: 15px; font-weight: 700; cursor: pointer;
  border-radius: var(--radius-btn); padding: 11px 20px; border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary-grad); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-grad-hover); text-decoration: none; }
.btn-outline {
  background: transparent; color: var(--accent); border-color: currentColor;
}
.btn-outline:hover { background: var(--accent-tint); text-decoration: none; }
.btn-ghost {
  background: var(--surface); color: var(--text); border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--primary); text-decoration: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative; background: var(--hero-wash); border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: 1120px; margin: 0 auto; padding: 56px 24px 64px;
  display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 44px; align-items: center;
}
.hero h1 {
  font-size: 56px; line-height: 1.0; margin: 18px 0 0; letter-spacing: -0.035em;
}
.hero-sub {
  color: var(--text-2); font-size: 18px; line-height: 1.6; margin: 22px 0 0; max-width: 30em;
}
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.stat-row { display: flex; align-items: center; gap: 26px; margin-top: 38px; }
.stat .n { font-family: var(--head); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.stat .l { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat + .stat { padding-left: 26px; border-left: 1px solid var(--line); }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 42px; }
  .hero-map { order: -1; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 34px; }
  .stat-row { gap: 16px; flex-wrap: wrap; }
  .stat + .stat { padding-left: 16px; }
}

/* Map panel (hero placeholder + reusable frame) */
.map-panel {
  position: relative; border-radius: 18px; border: 1px solid var(--line-strong);
  background: var(--map-bg); overflow: hidden; box-shadow: var(--shadow);
}
.hero-map .map-panel { height: 440px; }
.hero-map #hero-lmap { position: absolute; inset: 0; z-index: 0; }
.hero-map .map-float { z-index: 700; }
.leaflet-container { background: var(--map-bg); font: inherit; }
.map-grid {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, var(--grid-line) 0 1px, transparent 1px 36px),
    repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 36px);
}
.map-node {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: var(--node); box-shadow: var(--node-glow); transform: translate(-50%, -50%);
}
.map-node.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--node);
  animation: mm-pulse 2.4s ease-out infinite;
}
@keyframes mm-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .map-node.pulse::after { animation: none; } }

.map-float {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  padding: 14px 16px; box-shadow: var(--shadow-lift);
}
.map-float .mf-name { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.map-float .mf-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 4px 0 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success-dot); flex: 0 0 auto; }

.map-chip {
  position: absolute; top: 14px; left: 14px; z-index: 500;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 6px 14px; font-family: var(--mono); font-size: 12px; color: var(--text-2);
  box-shadow: var(--shadow);
}

/* ---- Section band ------------------------------------------------------- */
.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-inner { max-width: 1120px; margin: 0 auto; padding: 64px 24px; }
.section-h2 { font-size: 32px; margin: 0 0 8px; }
.section-lead { color: var(--text-2); font-size: 17px; margin: 0 0 32px; max-width: 46em; }
@media (max-width: 480px) { .section-h2 { font-size: 26px; } }

/* Three steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 26px; }
.step-n { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--accent); }
.step h3 { font-size: 19px; margin: 12px 0 8px; }
.step p { color: var(--text-2); font-size: 15px; margin: 0; }
.step .more { color: var(--accent); font-weight: 700; font-size: 14px; margin-top: 12px; display: inline-block; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Community section */
.community { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; padding: 72px 0; }
.community h2 { font-size: 34px; margin: 0 0 14px; max-width: 12em; }
.community p { color: var(--text-2); font-size: 17px; margin: 0 0 24px; }
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.trust {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px;
}
.trust .th { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15.5px; }
.trust p { font-size: 14px; color: var(--text-2); margin: 8px 0 0; }
.trust .dot { width: 9px; height: 9px; }
.dot.pine { background: var(--primary); }
.dot.clay { background: var(--accent); }
.dot.blue { background: #5b8fb0; }
@media (max-width: 820px) { .community { grid-template-columns: 1fr; gap: 28px; padding: 48px 0; } }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1120px; margin: 0 auto; padding: 28px 24px; flex-wrap: wrap;
}
.site-footer .fnote { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* ---- Page head (interior pages) ---------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 40px; margin: 0; letter-spacing: -0.03em; }
.sub { color: var(--text-2); font-size: 16px; margin: 8px 0 0; }
.sub-tight { margin: 6px 0 0; }

/* ---- Search + chips ----------------------------------------------------- */
.search-row { display: flex; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
.search-row .input { flex: 1 1 320px; }
.input {
  width: 100%; padding: 13px 16px; font-family: var(--ui); font-size: 15.5px;
  color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-field);
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
select.input { appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8578' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }

.chips { display: flex; gap: 10px; margin: 0 0 22px; flex-wrap: wrap; overflow-x: auto; padding-bottom: 2px; }
.chip {
  font-family: var(--ui); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--chip-bg); color: var(--chip-text); border: 1px solid transparent;
  border-radius: 20px; padding: 9px 16px; transition: background .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--line-strong); }
.chip.on { background: var(--primary); color: var(--on-primary); }
.check-inline { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text-2); }
.check { width: 17px; height: 17px; accent-color: var(--primary); }
.filter-count { color: var(--muted); font-size: 14px; }

/* ---- Discover (region finder) two-column ------------------------------- */
.finder { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 24px; align-items: start; }
.region-list { display: flex; flex-direction: column; gap: 12px; }
.finder-map { position: sticky; top: 20px; }
.finder-map .map-panel, .finder-map #map { height: 560px; }
@media (max-width: 860px) {
  .finder { grid-template-columns: 1fr; }
  .finder-map { position: static; order: -1; }
  .finder-map .map-panel, .finder-map #map { height: 320px; }
}

/* Region row card */
.region-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 16px; box-shadow: var(--shadow); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  cursor: pointer;
}
.region-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.region-row.sel { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-tint); }
.upvote {
  flex: 0 0 auto; width: 44px; min-height: 44px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; padding: 6px 0;
  background: var(--chip-bg); border: 1px solid transparent; border-radius: 11px;
  cursor: pointer; color: var(--text-2); font-family: var(--mono); transition: all .15s ease;
}
.upvote .caret { font-size: 12px; line-height: 1; }
.upvote .count { font-size: 13px; font-weight: 600; }
.upvote:hover { border-color: var(--primary); }
.upvote.voted, .upvote.hot { background: var(--primary-tint); color: var(--primary); }
.country-tile {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text-2);
}
.region-main { flex: 1 1 auto; min-width: 0; }
.region-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.region-title .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verified { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--bright); }
.verified .dot { background: var(--success-dot); }
.region-meta { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-thumb {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
}
.qr-thumb svg, .qr-thumb img { display: block; width: 100%; height: 100%; }
.qr-thumb.placeholder {
  background-image:
    linear-gradient(45deg, var(--text) 25%, transparent 25%, transparent 75%, var(--text) 75%),
    linear-gradient(45deg, var(--text) 25%, transparent 25%, transparent 75%, var(--text) 75%);
  background-size: 10px 10px; background-position: 0 0, 5px 5px; opacity: 0.75;
}
@media (max-width: 520px) {
  .region-row { flex-wrap: wrap; }
  .region-meta { white-space: normal; }
  .qr-thumb { display: none; }
}

/* Contribute banner */
.contribute {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius-card); padding: 20px 22px; background: var(--accent-tint);
}
.contribute strong { font-family: var(--head); font-size: 18px; }
.contribute p { margin: 4px 0 0; color: var(--text-2); font-size: 14.5px; }

/* ---- Channels grid ------------------------------------------------------ */
.channel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .channel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .channel-grid { grid-template-columns: 1fr; } }
.channel-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 20px; box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.channel-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.channel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.channel-head h3 { font-size: 19px; margin: 0; }
.preset-badge {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  padding: 4px 9px; border-radius: 7px; white-space: nowrap;
  background: var(--preset-green-bg); color: var(--preset-green-text);
}
.preset-badge.orange { background: var(--preset-orange-bg); color: var(--preset-orange-text); }
.key-field {
  font-family: var(--mono); font-size: 13px; color: var(--text-2);
  background: var(--key-bg); border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; margin: 14px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.channel-meta { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }
.channel-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.channel-foot .btn { flex: 1 1 auto; }
.chan-vote {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  background: var(--chip-bg); color: var(--text-2); border: 1px solid transparent;
  border-radius: var(--radius-btn); padding: 9px 12px; font-family: var(--mono); font-size: 13px;
  transition: all .15s ease;
}
.chan-vote .caret { font-size: 11px; }
.chan-vote:hover { border-color: var(--primary); }
.chan-vote.voted { background: var(--primary-tint); color: var(--primary); }

/* ---- Generic card + settings tables (interior pages) ------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 24px; }
.stack > * + * { margin-top: 18px; }
.badge { display: inline-block; padding: 3px 11px; border-radius: 20px; font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.badge.ok { background: var(--preset-green-bg); color: var(--preset-green-text); }
.badge.muted { background: var(--chip-bg); color: var(--muted); }
.badge.warn { background: var(--accent-tint); color: var(--accent); }

.settings-block h3 { font-size: 20px; margin: 0 0 14px; }
.settings-table { width: 100%; border-collapse: collapse; }
.settings-table th {
  text-align: left; vertical-align: top; width: 220px; padding: 12px 16px 12px 0;
  font-weight: 600; color: var(--text); border-top: 1px solid var(--line);
}
.settings-table td { padding: 12px 0; border-top: 1px solid var(--line); }
.settings-table tr:first-child th, .settings-table tr:first-child td { border-top: 0; }
.settings-table .val { font-family: var(--mono); font-size: 14px; color: var(--text); }
.settings-table .note { display: block; font-family: var(--ui); color: var(--text-2); font-size: 13px; margin-top: 4px; }
.reg-table th { width: auto; }
.reg-table td .badge { margin: 0 4px 4px 0; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.filter-bar .input { width: auto; flex: 1 1 240px; }
.filter-bar select.input { flex: 0 0 auto; min-width: 170px; }

.empty { text-align: center; color: var(--text-2); padding: 56px 20px; }

/* ---- Forms (contribute) ------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field textarea.input { resize: vertical; font-family: var(--ui); }
.field .help { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.field .err { color: var(--accent); font-size: 12.5px; margin-top: 5px; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.form-section-title { font-family: var(--head); font-size: 15px; font-weight: 700; color: var(--text-2);
  margin: 6px 0 -4px; grid-column: 1 / -1; }
.notice { border-radius: var(--radius-card); padding: 16px 18px; font-weight: 600; margin-bottom: 20px; }
.notice.ok { background: var(--preset-green-bg); color: var(--preset-green-text); }

/* ---- Get-the-app placeholder ------------------------------------------- */
.app-cta { text-align: center; padding: 40px 0 20px; }
.app-cta h1 { font-size: 44px; letter-spacing: -0.03em; margin: 16px 0 0; }
@media (max-width: 480px) { .app-cta h1 { font-size: 32px; } }
.store-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-btn);
  padding: 12px 22px; box-shadow: var(--shadow);
}
.store-btn.is-soon { opacity: 0.7; cursor: default; }
.store-glyph {
  width: 26px; height: 26px; border-radius: 7px; background: var(--primary-grad); flex: 0 0 auto;
}
.store-text { display: flex; flex-direction: column; line-height: 1.15; }
.store-text small { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.store-text strong { font-family: var(--head); font-size: 18px; font-weight: 700; color: var(--text); }

/* ---- Join modal --------------------------------------------------------- */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(20, 24, 14, 0.55); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.modal-scrim.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px; width: 400px; max-width: 100%; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.5);
  text-align: center;
}
.modal h3 { font-size: 24px; margin: 0 0 4px; }
.modal .m-sub { color: var(--text-2); font-size: 14.5px; margin: 0 0 20px; }
.modal .qr-big {
  width: 240px; height: 240px; margin: 0 auto 20px; background: #fff; border-radius: 12px;
  padding: 12px; border: 1px solid var(--line);
}
.modal .qr-big svg, .modal .qr-big img { width: 100%; height: 100%; display: block; }
.modal .m-url {
  display: flex; gap: 8px; align-items: center; background: var(--key-bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px 8px 12px; margin-bottom: 16px;
}
.modal .m-url code { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; text-align: left; }
.modal-close {
  position: absolute; top: 16px; right: 18px; background: none; border: none; color: var(--muted);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.modal-wrap { position: relative; }
