/* Hopstack Admin portal stylesheet.
 * Dark-only staff tooling. Tokens mirror client/constants/theme.ts (dark set)
 * the same way server/legal.ts does — bar-back walnut, cream text, copper
 * primaries. No external fonts (CSP font-src 'self'): Georgia stack for
 * display, system stack for UI. */

:root {
  --bg: #1a1612;
  --card: #252017;
  --card-2: #302a22;
  --border: #554d42;
  --border-soft: #3d362c;
  --text: #f5f3f0;
  --muted: #a89b8c;
  --faint: #7d7264;
  --amber: #e9a23b;
  --copper-hi: #eaa33c;
  --copper-lo: #c87c1a;
  --on-copper: #241505;
  --error: #e57373;
  --ok: #8fbc8f;
  --warn: #d9a441;
  --serif: Georgia, "Times New Roman", serif;
  --sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Post map: one amber ramp for posts per country (validated as an ordered
   * ramp: monotone lightness, step 1 at 2.1:1 on the no-post land), blue
   * place dots ringed in the ocean colour so they read on any fill. */
  --map-ocean: #14100c;
  --map-land: #282420;
  --map-1: #794c20;
  --map-2: #9d6427;
  --map-3: #c17e2d;
  --map-4: #e49b38;
  --map-5: #febd56;
  --map-dot: #519cec;
  --map-dot-hi: #82bcfc;
  --map-dot-ink: #0f1726;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}

.noscript {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

a {
  color: var(--amber);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
}

/* ── Shell ─────────────────────────────────────────────────────────────── */

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: #14100c;
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.4px;
  color: var(--text);
  padding: 4px 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 10px;
}
.brand .tap {
  color: var(--amber);
}
.brand-sub {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 3px;
}

.nav-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
}
.nav-link:hover {
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}
.nav-link.active {
  background: var(--card-2);
  color: var(--amber);
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.me-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  min-width: 0;
}
.me-chip .who {
  min-width: 0;
}
.me-chip .who .u {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.me-chip .who .r {
  font-size: 11px;
  color: var(--faint);
  text-transform: capitalize;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 64px;
  max-width: 1080px;
}
.main.wide {
  max-width: 1500px;
}

@media (max-width: 860px) {
  .shell {
    flex-direction: column;
  }
  .sidebar {
    width: auto;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
    padding: 10px 12px;
  }
  .brand {
    border: 0;
    margin: 0 12px 0 0;
    padding: 0 6px;
  }
  .brand-sub {
    display: none;
  }
  .sidebar-foot {
    margin-top: 0;
    margin-left: auto;
    border: 0;
    padding-top: 0;
    flex-direction: row;
    align-items: center;
  }
  .main {
    padding: 20px 16px 48px;
  }
}

/* ── Typography & layout primitives ────────────────────────────────────── */

.page-title {
  font-family: var(--serif);
  font-size: 24px;
  margin: 0 0 4px;
}
.page-sub {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 13px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

.row-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 4px 12px;
  font-size: 13px;
}
.kv dt {
  color: var(--faint);
  margin: 0;
}
.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* ── Controls ──────────────────────────────────────────────────────────── */

.btn {
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.btn:hover {
  border-color: var(--amber);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.primary {
  background: linear-gradient(180deg, var(--copper-hi), var(--copper-lo));
  border-color: var(--copper-lo);
  color: var(--on-copper);
}
.btn.danger {
  border-color: #7c3f3f;
  color: var(--error);
}
.btn.danger:hover {
  border-color: var(--error);
}
.btn.subtle {
  background: none;
  border-color: transparent;
  color: var(--muted);
}
.btn.subtle:hover {
  color: var(--text);
  border-color: var(--border);
}

.input,
.select,
.textarea {
  background: #14100c;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
}
.textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--amber);
}
.input::placeholder,
.textarea::placeholder {
  color: var(--faint);
}

.seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.seg button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.seg button + button {
  border-left: 1px solid var(--border);
}
.seg button.on {
  background: var(--card-2);
  color: var(--amber);
}

.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* ── Chips & badges ────────────────────────────────────────────────────── */

.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.chip.reason {
  border-color: #6b5330;
  color: var(--amber);
  background: rgba(233, 162, 59, 0.08);
}
.chip.status-open {
  border-color: #6b5330;
  color: var(--warn);
}
.chip.status-resolved {
  border-color: #3f5c3f;
  color: var(--ok);
}
.chip.status-dismissed {
  color: var(--faint);
}
.chip.role-admin {
  border-color: #6b5330;
  color: var(--amber);
}
.chip.role-moderator {
  border-color: #4a5a6b;
  color: #9fc2e0;
}
.chip.acct-active {
  border-color: #3f5c3f;
  color: var(--ok);
}
.chip.acct-suspended {
  border-color: #6b5330;
  color: var(--warn);
}
.chip.acct-banned {
  border-color: #7c3f3f;
  color: var(--error);
}
.chip.hidden-flag {
  border-color: #7c3f3f;
  color: var(--error);
}

/* ── Lists / tables ────────────────────────────────────────────────────── */

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item {
  display: block;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
  color: inherit;
}
.item:hover {
  border-color: var(--border);
  text-decoration: none;
}
.item .top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.item .preview {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.item .meta {
  color: var(--faint);
  font-size: 12px;
  margin-top: 4px;
}

.table-wrap {
  overflow-x: auto;
}
table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.grid th {
  text-align: left;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
table.grid td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
table.grid tr.rowlink {
  cursor: pointer;
}
table.grid tr.rowlink:hover td {
  background: var(--card);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--card-2);
  border: 1px solid var(--border-soft);
  object-fit: cover;
  flex: 0 0 28px;
}
.avatar.lg {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
}
.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-weight: 700;
  font-family: var(--serif);
}

/* ── Stat tiles ────────────────────────────────────────────────────────── */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px;
  color: inherit;
  display: block;
}
.tile:hover {
  text-decoration: none;
}
a.tile:hover {
  border-color: var(--border);
}
.tile .n {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--amber);
}
.tile .l {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Evidence / snapshot ───────────────────────────────────────────────── */

.photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.photos img {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
}

pre.blob {
  background: #14100c;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px;
  font-family: var(--mono);
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  max-height: 300px;
  overflow-y: auto;
}

.callout {
  border: 1px solid #6b5330;
  background: rgba(233, 162, 59, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--warn);
  font-size: 13px;
  margin: 10px 0;
}
.callout.red {
  border-color: #7c3f3f;
  background: rgba(229, 115, 115, 0.07);
  color: var(--error);
}

/* ── States ────────────────────────────────────────────────────────────── */

.empty,
.error-card,
.loading {
  text-align: center;
  color: var(--muted);
  padding: 36px 16px;
  background: var(--card);
  border: 1px dashed var(--border-soft);
  border-radius: 12px;
}
.empty .big {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--text);
  margin-bottom: 4px;
}
.error-card {
  border-style: solid;
  border-color: #7c3f3f;
}

.load-more {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

/* ── Login ─────────────────────────────────────────────────────────────── */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 360px;
  max-width: 100%;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
}
.login-card .mark {
  font-family: var(--serif);
  font-size: 26px;
  margin-bottom: 2px;
}
.login-card .mark .tap {
  color: var(--amber);
}
.login-card .sub {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.gsi-slot {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 12px;
}
.login-note {
  color: var(--muted);
  font-size: 12px;
}
.login-error {
  color: var(--error);
  font-size: 13px;
  margin-top: 12px;
}

/* ── Toasts & modal ────────────────────────────────────────────────────── */

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
}
.toast {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  max-width: 340px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.toast.err {
  border-left-color: var(--error);
}
.toast.ok {
  border-left-color: var(--ok);
}

.modal-veil {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 5, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  width: 420px;
  max-width: 100%;
}
.modal h2 {
  font-family: var(--serif);
  font-size: 18px;
  margin: 0 0 8px;
}
.modal .m-body {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.modal .m-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal .m-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* ── Action bar on detail pages ────────────────────────────────────────── */

.action-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.section-gap {
  height: 6px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 760px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.boot {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

/* ── Post map ──────────────────────────────────────────────────────────── */

.map-range {
  color: var(--faint);
  font-size: 12px;
}
.map-custom {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: -4px 0 14px;
  font-size: 13px;
  color: var(--muted);
}
.map-custom[hidden] {
  display: none;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 14px;
  align-items: start;
}
@media (max-width: 1180px) {
  .map-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.map-stage {
  position: relative;
  aspect-ratio: 2000 / 986;
  background: var(--map-ocean);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  transition: opacity 0.2s;
}
.is-loading .map-stage,
.is-loading .map-panel {
  opacity: 0.55;
}
.map-svg {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
.map-svg.is-dragging {
  cursor: grabbing;
}

.map-country {
  fill: var(--map-land);
  stroke: var(--map-ocean);
  stroke-width: 0.8px;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  transition: fill 0.9s ease;
}
.map-country.lvl-1 {
  fill: var(--map-1);
}
.map-country.lvl-2 {
  fill: var(--map-2);
}
.map-country.lvl-3 {
  fill: var(--map-3);
}
.map-country.lvl-4 {
  fill: var(--map-4);
}
.map-country.lvl-5 {
  fill: var(--map-5);
}
.map-country.has-posts {
  cursor: pointer;
}
/* One country's view: its regions stand in for it, the rest is quiet land. */
.map-country.is-focus {
  display: none;
}
.map-country.is-muted {
  pointer-events: none;
}
.map-country.is-region {
  stroke-width: 0.6px;
}
.map-country.has-posts:hover {
  filter: brightness(1.14);
}
.map-country.is-selected {
  stroke: var(--text);
  stroke-width: 1.6px;
}

.map-dot {
  cursor: pointer;
  outline: none;
}
.map-dot .hit {
  fill: transparent;
}
.map-dot .disc {
  fill: var(--map-dot);
  fill-opacity: 0.92;
  stroke: var(--map-ocean);
}
.map-dot:hover .disc,
.map-dot:focus-visible .disc {
  fill: var(--map-dot-hi);
}
.map-dot.is-selected .disc {
  fill: var(--map-dot-hi);
  stroke: var(--text);
}
.map-dot text {
  fill: var(--map-dot-ink);
  font-family: var(--sans);
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.map-zoom {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(37, 32, 23, 0.92);
}
.map-zoom button {
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.map-zoom button + button {
  border-top: 1px solid var(--border);
}
.map-zoom button:hover {
  background: var(--card-2);
  color: var(--amber);
}
@media (max-width: 600px) {
  .map-zoom {
    flex-direction: row;
  }
  .map-zoom button + button {
    border-top: 0;
    border-left: 1px solid var(--border);
  }
}

.map-column {
  min-width: 0;
}
/* Side by side, the map stays in view while the post list scrolls. */
@media (min-width: 1181px) {
  .map-column {
    position: sticky;
    top: 16px;
  }
}
.map-under {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.map-hint {
  color: var(--faint);
  font-size: 11px;
}
.map-legend {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}
.map-legend[hidden] {
  display: none;
}
.map-legend .lg-title {
  color: var(--faint);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 10px;
  margin-bottom: 4px;
}
.map-legend .lg-steps {
  display: flex;
  gap: 2px;
}
.map-legend .lg-step {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 34px;
  padding-right: 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.map-legend .lg-swatch {
  height: 8px;
  border-radius: 2px;
}
.map-legend .lg-dots {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.map-legend .lg-dots span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.map-legend .lg-dots i {
  display: inline-block;
  border-radius: 50%;
  background: var(--map-dot);
  border: 2px solid var(--map-ocean);
}

.map-tip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--muted);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  max-width: 260px;
}
.map-tip[hidden] {
  display: none;
}
.map-tip .v {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}
.map-tip .s {
  color: var(--faint);
  font-size: 11px;
}

.map-note {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 32, 23, 0.94);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
}
.map-note[hidden] {
  display: none;
}

.map-foot {
  color: var(--faint);
  font-size: 12px;
  margin-top: 10px;
  max-width: 900px;
}

/* Side panel: ranked places and countries (the map's table view), or the
 * posts behind one selection. */
.map-panel {
  min-width: 0;
  transition: opacity 0.2s;
}
.map-panel .card {
  padding: 14px;
}
.rank-list {
  display: flex;
  flex-direction: column;
}
.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.rank-row:hover,
.rank-row:focus-visible {
  background: var(--card-2);
  outline: none;
}
.rank-row .what {
  flex: 1;
  min-width: 0;
}
.rank-row .what .sub {
  display: block;
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-row .count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text);
}
.rank-row .key {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.rank-row .key.dot {
  background: var(--map-dot);
}
.rank-row .key.sq {
  border-radius: 2px;
}
.rank-more {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.rank-note {
  margin: 8px 0 0;
  font-size: 12px;
}
.rank-row .count,
.rank-row .when {
  font-variant-numeric: tabular-nums;
}
.rank-row .when {
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}
.rank-row .thumb {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--card-2);
  border: 1px solid var(--border-soft);
}
.rank-row.static {
  cursor: default;
}
.rank-row.static:hover {
  background: none;
}

.sel-head {
  margin-bottom: 12px;
}
.sel-head .rank-list {
  margin-top: 8px;
  border-top: 1px solid var(--border-soft);
  padding-top: 6px;
}
.sel-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.sel-head .t {
  flex: 1;
  min-width: 0;
}
.sel-head h2 {
  font-size: 18px;
  font-weight: 650;
  margin: 0;
  overflow-wrap: anywhere;
}
.sel-head .s {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}
.post-card.is-hidden {
  border-color: #7c3f3f;
}
.post-card .who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.post-card .who .names {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-card .who .names .n {
  color: var(--faint);
}
.post-card .when {
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}
.post-card .shots {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
}
.post-card .shots button {
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--card-2);
  overflow: hidden;
  cursor: zoom-in;
}
.post-card .shots img {
  display: block;
  height: 132px;
  width: auto;
  max-width: 260px;
  object-fit: cover;
}
.post-card .shots.one img {
  height: 200px;
  max-width: 100%;
}
.post-card .beer {
  font-size: 15px;
  font-weight: 650;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.post-card .facts {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.post-card .stars {
  color: var(--amber);
  letter-spacing: 1px;
}
.post-card .notes {
  margin-top: 8px;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.post-card .where,
.post-card .meta {
  color: var(--faint);
  font-size: 12px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.post-card .callout {
  margin: 8px 0 0;
}
.post-card .action-bar {
  margin-top: 10px;
}

.lightbox {
  cursor: zoom-out;
}
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

/* The map reads in the UI sans: its numbers and names are data, not the
 * display serif the portal's other tiles use. */
.map-view .tile .n {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--text);
}
.map-view .avatar-fallback {
  font-family: var(--sans);
}
.map-legend,
.map-range,
.map-tip .v {
  font-variant-numeric: tabular-nums;
}

/* Live: a breathing dot while new posts stream in. */
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.live-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}
.live-chip.on {
  color: var(--text);
  border-color: #3f5c3f;
}
.live-chip.on::before,
.live-dot {
  background: var(--ok);
  animation: live-breathe 2.4s ease-in-out infinite;
}
.live-chip[hidden] {
  display: none;
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.just-in h3 {
  display: flex;
  align-items: center;
  gap: 7px;
}
@keyframes live-breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* A new post: a ring swells off its dot; a country with no dot glows. */
.map-ping {
  fill: none;
  stroke: var(--map-dot-hi);
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
  animation: map-ping 1.8s cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
}
@keyframes map-ping {
  from {
    transform: scale(1);
    opacity: 0.95;
  }
  to {
    transform: scale(3.4);
    opacity: 0;
  }
}
.map-country.is-flash {
  animation: map-flash 1.3s ease-out;
}
@keyframes map-flash {
  from {
    filter: brightness(1.7);
  }
  to {
    filter: brightness(1);
  }
}
.map-dot.is-bumped .disc {
  animation: map-bump 1s ease-out;
}
@keyframes map-bump {
  from {
    fill: var(--map-dot-hi);
    stroke: var(--text);
  }
  to {
    fill: var(--map-dot);
    stroke: var(--map-ocean);
  }
}

/* Timeline: posts per bucket; click or drag to look closer. */
.map-timeline {
  padding: 12px 14px 10px;
}
.tl-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tl-head h3 {
  margin: 0;
}
.tl-peak {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.tl-hint {
  margin-left: auto;
  color: var(--faint);
  font-size: 11px;
}
.tl-plot {
  position: relative;
  height: 64px;
  border-bottom: 1px solid var(--border);
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}
.tl-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100%;
}
.tl-bar {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 3px 3px 0 0;
  background: var(--map-4);
  opacity: 0.78;
  transition:
    height 0.9s ease,
    opacity 0.15s;
}
.tl-bar.on {
  background: var(--map-5);
  opacity: 1;
}
.tl-brush {
  position: absolute;
  top: 0;
  bottom: 0;
  border: 1px solid rgba(245, 243, 240, 0.35);
  border-radius: 4px;
  background: rgba(245, 243, 240, 0.08);
  pointer-events: none;
}
.tl-brush[hidden] {
  display: none;
}
.tl-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .map-ping {
    animation-name: map-ping-fade;
  }
  .live-chip.on::before,
  .live-dot {
    animation: none;
  }
  .map-country,
  .tl-bar {
    transition: none;
  }
}
@keyframes map-ping-fade {
  from {
    opacity: 0.95;
  }
  to {
    opacity: 0;
  }
}
