/* hellobreadcrumb.app — the share page. The app's night ground, cream ink, Open Sans + IBM Plex Mono.
   LEGIBILITY RULE (HQ): every ink here clears 7:1 on the ground; nothing is dimmed for mood. */
:root {
  --night: #101215;
  --card: #1a1d20;
  --cream: #f9f7f2;
  --soft: #d2cfc6;   /* secondary ink — 12:1 on night */
  --chrome: #b4b8bd; /* labels — 9:1 on night */
  --hair: rgba(249, 247, 242, 0.22);
  --amber: #ffb65a;
  --action: #f0a94c;
  --teal: #3bc9bd;
  --sans: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

/* 1 · NOTE */
.face {
  position: relative;
  margin: 0 0 8px;
  border-radius: 16px;
  overflow: hidden;
  background: #0c0e11;
}
.face img { position: absolute; max-width: none; display: block; }
.face-bare { height: 56px; background: linear-gradient(135deg, #2a2f35, #1a1d20); }
.face-bare figcaption { height: 56px; padding-bottom: 0; background: none; }
.face figcaption {
  position: absolute; left: 0; right: 0; top: 0;
  height: 88px; padding: 0 16px 40px;
  display: flex; align-items: center;
  /* the app's strip, held darker through the words: the title keeps 7:1 even on a blown-out sky */
  background: linear-gradient(to bottom, rgba(6, 8, 12, 0.86) 0, rgba(6, 8, 12, 0.8) 46px, rgba(6, 8, 12, 0) 100%);
}
.face-title {
  font-weight: 700; font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--cream); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tagline { margin: 0 2px 18px; font-family: var(--mono); font-weight: 500; font-size: 12.5px; letter-spacing: 0.04em; color: var(--chrome); }
.note { padding: 6px 2px 20px; }
.meta {
  margin: 0 0 12px;
  font-family: var(--mono); font-weight: 500; font-size: 12.5px; letter-spacing: 0.04em;
  color: var(--chrome);
}
.meta .dot { padding: 0 2px; }
.words {
  margin: 0;
  font-weight: 400; font-size: 27px; line-height: 1.28; letter-spacing: -0.005em;
  color: var(--cream);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.what { margin: 14px 0 0; font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: 0.03em; color: var(--soft); }

/* 2 · MAP */
.mapbox {
  height: 40vh; min-height: 250px; max-height: 420px;
  border-radius: 16px; overflow: hidden;
  background: #20242b; /* the night land tone holds while tiles load */
  margin-bottom: 8px;
  position: relative;
}
#map { position: absolute; inset: 0; }
.mapbox.nomap { display: none; }
.maplibregl-ctrl-logo { display: none !important; }
.maplibregl-ctrl-attrib { font-size: 11px; }
.maplibregl-cooperative-gesture-screen { font-family: var(--sans); font-size: 15px; }

/* 3 · ROWS — the ledger register */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  padding: 16px 8px 16px 10px;
  border-bottom: 1px solid var(--hair);
  border-left: 3px solid transparent;
  border-radius: 4px;
  scroll-margin: 96px 0;
  outline: none;
  transition: background-color 240ms ease, border-color 240ms ease;
}
.row[tabindex] { cursor: pointer; }
.row.on, .qsl.on { background: rgba(255, 182, 90, 0.12); border-left-color: var(--amber); }
.row:focus-visible { border-left-color: var(--cream); }
.row-head { display: flex; gap: 12px; align-items: flex-start; }
.row-id { flex: 1; min-width: 0; padding-top: 1px; }
.row:last-child { border-bottom-color: transparent; }
.name { margin: 0; font-weight: 600; font-size: 18px; line-height: 1.25; color: var(--cream); overflow-wrap: anywhere; }
.sub { margin: 3px 0 0; font-family: var(--mono); font-weight: 500; font-size: 12.5px; letter-spacing: 0.02em; color: var(--chrome); }
.line { margin: 10px 0 0; font-size: 15.5px; line-height: 1.45; color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.row-side { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ig {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  color: var(--cream); border-radius: 22px;
}
.go {
  min-width: 52px; height: 44px; padding: 0 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 22px;
  background: var(--action); color: #101215;
  font-family: var(--mono); font-weight: 600; font-size: 14px; letter-spacing: 0.08em;
}
.ig:active, .go:active, .get:active, .field:active { opacity: 0.7; }
.strip { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 auto; display: block; height: 132px; border-radius: 10px; overflow: hidden; background: #0c0e11; }
.shot img { display: block; height: 100%; width: auto; }

/* one place — THE QSL CARD: boxed, labelled fields */
.qsl {
  margin-top: 4px;
  border: 1px solid var(--hair); border-left: 3px solid var(--hair);
  border-radius: 14px;
  padding: 18px 16px 16px;
  background: var(--card);
  scroll-margin: 96px 0;
  transition: background-color 240ms ease, border-color 240ms ease;
}
.qsl-name { margin: 0; font-weight: 700; font-size: 26px; line-height: 1.2; overflow-wrap: anywhere; }
.qsl-where { margin: 6px 0 14px; font-size: 15px; color: var(--soft); }
.field {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 8px; padding: 13px 14px;
  border: 1px solid var(--hair); border-radius: 8px;
  font-size: 15.5px; color: var(--cream);
}
div.field { display: block; }
.fl { font-family: var(--mono); font-weight: 600; font-size: 12.5px; letter-spacing: 0.08em; color: var(--chrome); }
.field-go { color: var(--amber); font-weight: 600; }
.field-img { padding: 10px; }
.field-img .strip { margin-top: 0; }
.field-img .shot { height: 190px; }
.qsl-line { white-space: pre-wrap; overflow-wrap: anywhere; }

/* 4 · FOOT */
.foot {
  margin-top: 36px; padding-top: 18px;
  border-top: 1px solid var(--hair);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 12px; /* wraps on a 320px phone */
}
.made { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--soft); white-space: nowrap; }
.crumbs { filter: drop-shadow(0 0 3px rgba(59, 201, 189, 0.8)); flex-shrink: 0; }
.get {
  height: 44px; padding: 0 16px; display: inline-flex; align-items: center;
  border: 1.5px solid var(--cream); border-radius: 22px;
  font-family: var(--mono); font-weight: 600; font-size: 12.5px; letter-spacing: 0.08em; color: var(--cream);
  white-space: nowrap; flex-shrink: 0;
}
.missing .words { font-size: 22px; }
@media (prefers-reduced-motion: reduce) { .row, .qsl { transition: none; } }
