/* =========================================================
   在日企业黑榜 — OLED Black · Liquid Glass · iOS dark
   ========================================================= */

:root {
  --bg: #050505;
  --nav: rgba(15, 15, 17, 0.75);
  --surface: #111113;
  --hover: #1c1c1f;
  --raised: #18181b;
  --text: #f5f5f7;
  --text-2: #8e8e93;
  --text-3: #5c5c61;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #a8c7fa;
  --accent-soft: rgba(168, 199, 250, 0.14);
  --danger: #ff6961;
  --star: #ffb84d;
  --highlight: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 60%);

  --r-search: 22px;
  --r-list: 24px;
  --r-btn: 14px;
  --r-menu: 16px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans SC", "Noto Sans JP", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 140ms;
  --t: 220ms;
  --gutter: 20px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
[x-cloak] { display: none !important; }
.icon { flex: none; display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 56px;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.nav-brand {
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-links { display: flex; gap: 4px; }

.nav-link {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 14px;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link.is-active { color: var(--text); background: rgba(255, 255, 255, 0.08); }

.nav-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
.btn-primary { background: var(--text); color: #000; }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }

/* ---------- Page ---------- */

.page {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter) 64px;
  animation: page-in var(--t) var(--ease) both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Hero + search ---------- */

.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0 28px;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-sub {
  margin: 10px 0 28px;
  color: var(--text-2);
  font-size: 15px;
  letter-spacing: 0.04em;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  border-radius: var(--r-search);
  background: var(--surface);
  background-image: var(--highlight);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  text-align: left;
}
.search:focus-within {
  border-color: rgba(168, 199, 250, 0.45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 0 0 4px rgba(168, 199, 250, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.5);
}

.search-icon { padding: 0 6px 0 20px; color: var(--text-2); }

.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 12px 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px; /* >= 16px avoids iOS zoom on focus */
}
.search-input::placeholder { color: var(--text-3); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-input:focus-visible { outline: none; }

.search-clear {
  margin-right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.search-clear:hover { background: rgba(255, 255, 255, 0.16); color: var(--text); }

.suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  padding: 6px;
  border-radius: 20px;
  background: rgba(22, 22, 25, 0.92);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
}
.suggest:empty { display: none; }

.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  transition: background var(--t-fast) var(--ease);
}
.suggest-item:hover,
.suggest-item:focus-visible { background: var(--hover); outline: none; }
.suggest-main { display: flex; flex-direction: column; min-width: 0; }
.suggest-name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-meta { font-size: 12px; color: var(--text-2); }

.suggest-all {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  color: var(--accent);
  font-size: 13px;
}
.suggest-all:hover { color: #c7dcff; }
.suggest-empty { margin: 0; padding: 14px 12px; color: var(--text-2); font-size: 14px; }

/* ---------- Board ---------- */

.board { position: relative; }

.board::before { /* thin progress line while HTMX loads */
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
}
.board.htmx-request::before { animation: progress 900ms var(--ease) infinite; }
.board.htmx-request .list { opacity: 0.5; }

@keyframes progress {
  0% { width: 0; opacity: 0.8; }
  80% { width: 85%; opacity: 0.8; }
  100% { width: 100%; opacity: 0; }
}

.pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.pill {
  height: 34px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.pill:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.pill:active { transform: scale(0.96); }
.pill.is-active { color: var(--accent); background: var(--accent-soft); border-color: rgba(168, 199, 250, 0.3); }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}

.dropdown { position: relative; }

.dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.dropdown-btn:hover { background: rgba(255, 255, 255, 0.05); }
.dropdown-btn .icon { color: var(--text-2); }
.dropdown-label { color: var(--text-2); margin-right: -4px; }

.menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 180px;
  padding: 6px;
  border-radius: var(--r-menu);
  background: rgba(22, 22, 25, 0.94);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
.dropdown-end .menu { left: auto; right: 0; }

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  transition: background var(--t-fast) var(--ease);
}
.menu-item:hover { background: var(--hover); }
.menu-item.is-active { color: var(--accent); }

.board-note {
  margin: 0 4px 12px;
  color: var(--text-2);
  font-size: 14px;
}
.link { color: var(--accent); margin-left: 8px; }
.link:hover { text-decoration: underline; }

/* ---------- Company list ---------- */

.list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  border-radius: var(--r-list);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: opacity var(--t) var(--ease);
}

.list li + li .row::before { /* iOS-style inset separator */
  content: "";
  position: absolute;
  top: 0;
  right: 20px;
  left: 76px;
  height: 1px;
  background: var(--border);
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: auto 44px minmax(0, 1fr) auto 64px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  transition: background var(--t-fast) var(--ease);
}
.row:not(:has(.row-rank)) { grid-template-columns: 44px minmax(0, 1fr) auto 64px; }
.row:hover { background: var(--hover); }
.row:active { background: #222226; }
.list li:has(.row-rank) + li .row::before { left: 116px; }

.row-rank {
  width: 28px;
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}
.row.is-top .row-rank { color: var(--danger); opacity: 0.9; }

.logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--raised);
  background-image: var(--highlight);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 17px;
  font-weight: 600;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo-sm { width: 34px; height: 34px; font-size: 14px; }

.row-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }

.row-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-name-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-meta { font-size: 13px; color: var(--text-2); }

.tag {
  flex: none;
  height: 20px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
}

.row-score { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

.score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 17px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.score-star { color: var(--star); fill: var(--star); }
.score.is-low { color: var(--danger); }
.score-na { font-size: 12px; font-weight: 500; color: var(--text-2); }

.row-count { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.row-posts {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: var(--text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.empty { padding: 56px 20px; text-align: center; border-radius: var(--r-list); background: var(--surface); border: 1px solid var(--border); }
.empty-title { margin: 0; font-size: 16px; font-weight: 600; }
.empty-sub { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }

/* ---------- Pager ---------- */

.pager { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }

.pager-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--text-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
a.pager-btn:hover { background: var(--hover); color: var(--text); }
.pager-btn.is-active { background: rgba(255, 255, 255, 0.1); color: var(--text); font-weight: 600; }
.pager-gap { align-self: center; color: var(--text-3); }

.disclaimer {
  display: flex;
  gap: 8px;
  margin: 24px 4px 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.6;
}
.disclaimer .icon { margin-top: 2px; }

/* ---------- Company detail ---------- */

.crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 20px 0 16px;
  color: var(--text-2);
  font-size: 13px;
  min-width: 0;
}
.crumbs a:hover { color: var(--text); }
.crumbs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.co-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-radius: var(--r-list);
  background: var(--surface);
  background-image: var(--highlight);
  border: 1px solid var(--border);
}

.co-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.logo-lg { width: 64px; height: 64px; font-size: 24px; flex: none; }
.co-names { min-width: 0; }
.co-name { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.co-name-cn { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.co-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 13px;
}
.dot { color: var(--text-3); margin: 0 4px; }
.tag-accent { color: var(--accent); border-color: rgba(168, 199, 250, 0.3); gap: 4px; }

.co-side { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; flex: none; }
.co-stats { display: flex; gap: 28px; }
.co-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.co-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.co-score.is-low { color: var(--danger); }
.co-score-na { font-size: 14px; font-weight: 550; color: var(--text-2); height: 29px; }
.co-num { font-size: 26px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.co-stat-label { font-size: 12px; color: var(--text-2); }
.co-actions { display: flex; gap: 8px; }

/* Tabs: iOS segmented control */
.co-tabs { position: relative; margin-top: 24px; }
.co-tabs.htmx-request .tab-panel { opacity: 0.5; }

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  width: fit-content;
  margin: 0 auto 20px;
}
.segment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 20px;
  border-radius: 11px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 550;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.segment:hover { color: var(--text); }
.segment.is-active {
  background: #2c2c30;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 2px 8px rgba(0, 0, 0, 0.4);
}
.segment-count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.segment.is-active .segment-count, .mini-seg-item.is-active .segment-count { color: var(--text-2); }

.tab-panel { transition: opacity var(--t) var(--ease); animation: page-in var(--t) var(--ease) both; }

.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 12px;
}
.panel-count { color: var(--text-2); font-size: 13px; }

.mini-seg { display: flex; gap: 4px; }
.mini-seg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 13px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.mini-seg-item:hover { color: var(--text); }
.mini-seg-item.is-active { background: rgba(255, 255, 255, 0.1); color: var(--text); }

/* Discussion: compact forum rows */
.threads {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  border-radius: var(--r-list);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.threads li + li .thread { border-top: 1px solid var(--border); }
.thread {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  transition: background var(--t-fast) var(--ease);
}
.thread:hover { background: var(--hover); }
.thread-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.thread-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.thread-title-text { font-size: 15px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-pin { color: var(--accent); display: inline-flex; }
.thread-meta { font-size: 12px; color: var(--text-2); }
.thread-stats { display: flex; gap: 14px; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; flex: none; }
.thread-stats span { display: inline-flex; align-items: center; gap: 5px; }

.cat {
  flex: none;
  height: 20px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 550;
}

/* Reviews */
.rv-summary {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  gap: 32px;
  padding: 24px;
  margin-bottom: 20px;
  border-radius: var(--r-list);
  background: var(--surface);
  border: 1px solid var(--border);
}
.rv-overall { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.rv-score { font-size: 48px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rv-score.is-low { color: var(--danger); }
.rv-score-na { color: var(--text-3); }
.rv-na { font-size: 13px; color: var(--text-2); }
.rv-total { font-size: 12px; color: var(--text-2); }

.rv-bars { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 32px; align-items: center; gap: 12px; font-size: 13px; }
.bar-label { color: var(--text-2); white-space: nowrap; }
.bar-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--star); transition: width 400ms var(--ease); }
.bar-fill-dim { background: var(--accent); }
.bar-value { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

.stars { display: inline-flex; gap: 2px; }
.star-on { color: var(--star); fill: var(--star); }
.star-off { color: rgba(255, 255, 255, 0.18); fill: rgba(255, 255, 255, 0.18); }

.reviews { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.review {
  padding: 20px 22px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.review-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.review-title { margin: 0; font-size: 16px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-meta { margin: 6px 0 14px; font-size: 12px; color: var(--text-2); }

.review-body { display: flex; flex-direction: column; gap: 12px; }
.review-body.is-clamped {
  max-height: 168px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}
.review-block p { margin: 4px 0 0; font-size: 14px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.review-label { font-size: 12px; font-weight: 600; color: var(--accent); }
.review-label-con { color: var(--danger); }

.text-btn {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.review-actions { display: flex; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.chip:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.chip:active { transform: scale(0.96); }
.chip-quiet { margin-left: auto; border-color: transparent; }

/* Profile: iOS settings grouped list */
.notice {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
}
.notice .icon { margin-top: 2px; }

.group-title { margin: 28px 16px 8px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.group {
  margin: 0;
  border-radius: var(--r-list);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.group-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 20px;
  font-size: 14px;
}
.group-row + .group-row { border-top: 1px solid var(--border); }
.group-row dt { color: var(--text-2); }
.group-row dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.link-ext { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
.link-ext:hover { text-decoration: underline; }

.profile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 0 4px;
  color: var(--text-2);
  font-size: 13px;
}
.profile-foot p { margin: 0; }

/* ---------- Post detail ---------- */

.narrow { max-width: 780px; margin: 0 auto; }

.post {
  padding: 28px;
  border-radius: var(--r-list);
  background: var(--surface);
  background-image: var(--highlight);
  border: 1px solid var(--border);
}

.post-company {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  transition: color var(--t-fast) var(--ease);
}
.post-company:hover { color: var(--text); }
.logo-xs { width: 22px; height: 22px; font-size: 11px; }

.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.post-title { margin: 10px 0 18px; font-size: 24px; font-weight: 700; line-height: 1.35; letter-spacing: -0.015em; overflow-wrap: anywhere; }

.byline { display: flex; align-items: center; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.byline-text { display: flex; flex-direction: column; }
.byline-name { font-size: 14px; font-weight: 600; }
.byline-meta { font-size: 12px; color: var(--text-2); }

.avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--raised);
  background-image: var(--highlight);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }

.prose { padding: 20px 0 4px; font-size: 15.5px; line-height: 1.8; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose h3, .prose h4 { margin: 24px 0 10px; font-size: 17px; font-weight: 650; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(168, 199, 250, 0.4); }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 1.4em; }
.prose li + li { margin-top: 4px; }
.prose blockquote { margin: 0 0 14px; padding: 2px 0 2px 14px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.prose code { padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; }
.prose pre { margin: 0 0 14px; padding: 14px 16px; border-radius: 14px; background: #0b0b0c; border: 1px solid var(--border); overflow-x: auto; }
.prose pre code { padding: 0; background: none; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 20px 0; }

.post-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Comments */
.comments { position: relative; margin-top: 28px; }
.comments.htmx-request .ctree { opacity: 0.5; }
.comments-title { margin: 0; font-size: 17px; font-weight: 650; }

.composer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 14px;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.composer:hover { border-color: var(--border-strong); color: var(--text-2); }
.composer-locked { justify-content: center; }

.ctree {
  list-style: none;
  margin: 0;
  padding: 4px 20px;
  border-radius: var(--r-list);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: opacity var(--t) var(--ease);
}
.ctree > .cnode + .cnode { border-top: 1px solid var(--border); }
.ctree-children {
  list-style: none;
  margin: 0 0 4px 12px;
  padding: 0 0 0 16px;
  border-left: 1px solid var(--border-strong);
}
/* Deepest level: no further indentation, replies stay flat. */
.lv-3 > .ctree-children { margin-left: 0; padding-left: 0; border-left: 0; }

.comment { padding: 14px 0 10px; }
.comment-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.comment-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comment-time { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.tag-op { height: 18px; font-size: 10px; color: var(--accent); border-color: rgba(168, 199, 250, 0.3); }
.comment-body { margin: 6px 0 0 34px; font-size: 14.5px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.reply-to { color: var(--accent); }
.comment-actions { display: flex; gap: 16px; margin: 8px 0 0 34px; font-size: 12px; color: var(--text-2); }
.comment-actions a { display: inline-flex; align-items: center; gap: 4px; transition: color var(--t-fast) var(--ease); }
.comment-actions a:hover { color: var(--text); }
.comment-report { margin-left: auto; color: var(--text-3); }
.comment-removed { margin: 0; color: var(--text-3); font-size: 13px; font-style: italic; }
.comment.is-removed { padding: 12px 0; }

.empty-sm { padding: 36px 20px; }

/* Likes */
.like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.like:hover { color: var(--text); }
.like:active { transform: scale(0.92); }
.like.chip { padding: 0 12px; border: 1px solid var(--border); font-size: 13px; gap: 6px; }
.like.is-liked { color: var(--accent); }
.like.is-liked .icon { fill: rgba(168, 199, 250, 0.25); }
.like.chip.is-liked { border-color: rgba(168, 199, 250, 0.35); background: var(--accent-soft); }
.like.is-own { cursor: default; opacity: 0.7; }
.like.is-own:active { transform: none; }
.like.is-error { color: var(--danger); }
.like.htmx-request { opacity: 0.6; }

.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; transition: color var(--t-fast) var(--ease); }
.link-btn:hover { color: var(--text); }
.comment-delete { color: var(--text-3); }

/* Comment forms */
.composer-form { margin-bottom: 16px; }
.cform { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.cform-text { min-height: 0; font-size: 15px; background: var(--surface); }
.cform-bar { display: flex; align-items: center; gap: 12px; }
.cform-bar .check { font-size: 12px; }
.cform-bar .form-msg { flex: 1; min-width: 0; }
.cform-bar .field-counter { margin: 0; }
.cform-bar .btn { margin-left: auto; }
.cform-bar .btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.reply-box { margin: 10px 0 4px 34px; }
.reply-box .cform-text { background: #0b0b0c; }

.cnode.is-new > .comment { animation: flash 1.6s var(--ease); }
@keyframes flash {
  0%, 30% { background: rgba(168, 199, 250, 0.12); }
  100% { background: transparent; }
}

/* ---------- Auth ---------- */

.nav-avatar {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--raised);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.nav-avatar:hover { border-color: rgba(255, 255, 255, 0.3); }
.nav-avatar:active { transform: scale(0.94); }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

.menu-head {
  padding: 8px 12px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
}
.menu-button { width: 100%; border: 0; background: none; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.menu form { margin: 0; }

.auth { display: grid; place-items: center; padding: 56px 0; }
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  border-radius: var(--r-list);
  background: var(--surface);
  background-image: var(--highlight);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: page-in var(--t) var(--ease) both;
}
.auth-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; text-align: center; }
.auth-sub { margin: 10px 0 28px; color: var(--text-2); font-size: 14px; text-align: center; }
.auth-error {
  margin: -8px 0 20px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 105, 97, 0.1);
  color: var(--danger);
  font-size: 13px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border-radius: var(--r-btn);
  background: var(--text);
  color: #111;
  font-size: 15px;
  font-weight: 600;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn-google:hover { background: #fff; }
.btn-google:active { transform: scale(0.98); }

.auth-notes { margin: 28px 0 0; padding: 20px 0 0 18px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 12px; line-height: 1.8; }

/* ---------- Forms ---------- */

.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;
}

.form-card {
  padding: 28px;
  border-radius: var(--r-list);
  background: var(--surface);
  background-image: var(--highlight);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.form-sub { margin: -10px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.7; }
.form-seg { align-self: flex-start; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); }
.form-note { display: flex; gap: 6px; margin: 0; color: var(--text-2); font-size: 12px; }
.form-note .icon { margin-top: 2px; }
.form-section { display: flex; flex-direction: column; gap: 16px; padding-top: 18px; border-top: 1px solid var(--border); }
.form-checks { gap: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }

.field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 160px; gap: 14px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); padding: 0; }
.field-hint { margin-left: 6px; font-weight: 400; color: var(--text-3); font-size: 12px; }
.field-counter { align-self: flex-end; margin-top: -4px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.field-error { margin: 0; color: var(--danger); font-size: 12px; }

.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r-btn);
  border: 1px solid var(--border-strong);
  background: #0b0b0c;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: rgba(168, 199, 250, 0.5); box-shadow: 0 0 0 4px rgba(168, 199, 250, 0.1); }
.textarea { height: auto; padding: 12px 14px; line-height: 1.7; resize: vertical; }
.input-sm { height: 34px; font-size: 15px; max-width: 220px; }

.choice-row { display: flex; gap: 8px; }
.choice-wrap { flex-wrap: wrap; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  font-size: 14px;
  transition: all var(--t-fast) var(--ease);
}
.choice:hover span { color: var(--text); }
.choice input:checked + span { color: var(--accent); background: var(--accent-soft); border-color: rgba(168, 199, 250, 0.35); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; line-height: 1.6; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }

/* Star rating input */
.rate { margin: 0; padding: 0; border: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rate-label { float: left; padding: 0; font-size: 14px; font-weight: 600; }
.rate-hint { margin-left: 8px; font-size: 11px; font-weight: 400; color: var(--text-3); }
.rate .field-error { width: 100%; }
.rate-stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rate-stars input { position: absolute; opacity: 0; pointer-events: none; }
.rate-stars label { cursor: pointer; color: rgba(255, 255, 255, 0.16); transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.rate-stars label .icon { fill: currentColor; }
.rate-stars label:hover,
.rate-stars label:hover ~ label,
.rate-stars input:checked ~ label { color: var(--star); }
.rate-stars label:active { transform: scale(0.9); }
.rate-stars input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.rate-grid .rate-label { font-weight: 500; color: var(--text-2); }
.rate-grid .rate-stars .icon { width: 20px; height: 20px; }

.empty-action { margin-top: 16px; }

/* ---------- Profile ---------- */

.page-title { margin: 28px 0 18px; font-size: 24px; font-weight: 700; }

.me-card {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 28px;
  margin-bottom: 24px;
  border-radius: var(--r-list);
  background: var(--surface);
  background-image: var(--highlight);
  border: 1px solid var(--border);
}
.me-avatar { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; flex: none; }
.avatar-edit {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--raised);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  font-size: 32px;
  font-weight: 600;
  cursor: pointer;
}
.avatar-edit img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-edit-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--text);
  color: #111;
  border: 3px solid var(--surface);
}
.avatar-edit:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.me-hint { margin: 0; color: var(--text-3); font-size: 11px; }
.me-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; flex: 1; }
.me-name { margin: 0; }
.me-name-view, .me-name-edit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.me-name-view .text-btn { margin: 0; }
.me-username { font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.me-meta { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.me-meta div { display: flex; gap: 12px; }
.me-meta dt { color: var(--text-2); min-width: 64px; }
.me-meta dd { margin: 0; overflow-wrap: anywhere; }
.me-private { margin-left: 6px; color: var(--text-3); font-size: 11px; }
.me-tabs { margin: 0 0 16px; }
.thread-wrap { white-space: normal; font-weight: 450; }

/* 404 */
.error-page { padding: 96px 0; text-align: center; }
.error-code { margin: 0; color: var(--text-3); font-size: 14px; letter-spacing: 0.2em; }
.error-title { margin: 8px 0; font-size: 26px; }
.error-sub { margin: 0 0 24px; color: var(--text-2); }

@media (max-width: 900px) {
  .rv-summary { grid-template-columns: 1fr 1fr; }
  .rv-overall { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .co-head { flex-direction: column; align-items: stretch; padding: 20px; gap: 20px; }
  .logo-lg { width: 52px; height: 52px; font-size: 20px; }
  .co-name { font-size: 20px; }
  .co-side { align-items: stretch; }
  .co-stats { justify-content: space-around; padding-top: 16px; border-top: 1px solid var(--border); }
  .co-stat { align-items: center; }
  .co-actions .btn { flex: 1; }
  .segmented { width: 100%; }
  .segment { flex: 1; justify-content: center; padding: 0 8px; }
  .thread { padding: 12px 16px; gap: 12px; }
  .thread-stats { flex-direction: column; gap: 4px; align-items: flex-end; }
  .rv-summary { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .review { padding: 16px 18px; }
  .review-title { white-space: normal; }
  .group-row { grid-template-columns: 96px minmax(0, 1fr); padding: 12px 16px; }
  .profile-foot { flex-direction: column; align-items: flex-start; }
  .post { padding: 20px; }
  .post-title { font-size: 20px; }
  .ctree { padding: 2px 14px; }
  .ctree-children { margin-left: 4px; padding-left: 10px; }
  .comment-body, .comment-actions { margin-left: 0; }
  .reply-box { margin-left: 0; }
  .form-card { padding: 20px; }
  .field-row { grid-template-columns: 1fr; }
  .rate-grid { grid-template-columns: 1fr; }
  .form-actions .btn { flex: 1; }
  .me-card { flex-direction: column; align-items: stretch; text-align: center; padding: 22px; }
  .me-name-view, .me-name-edit, .me-meta div { justify-content: center; }
  .panel-bar { flex-wrap: wrap; }
}

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--border); }
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.7;
}
.footer-inner p { margin: 0 0 6px; }

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .nav-inner { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .hero { padding: 32px 0 20px; }
  .hero-sub { margin-bottom: 20px; }
  .pills {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin: 0 calc(var(--gutter) * -1) 20px;
    padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .pills::-webkit-scrollbar { display: none; }
  .dropdown-label { display: none; }
  .row { gap: 12px; padding: 12px 16px; grid-template-columns: auto 40px minmax(0, 1fr) auto; }
  .row:not(:has(.row-rank)) { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .row-rank { width: 22px; font-size: 14px; }
  .logo { width: 40px; height: 40px; font-size: 15px; }
  .row-posts, .row-meta { display: none; }
  .row-name-text { font-size: 15px; }
  .list li + li .row::before { left: 68px; right: 16px; }
  .list li:has(.row-rank) + li .row::before { left: 102px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   挂人榜 — people board
   ========================================================= */

:root {
  --cat-scammer: #ff6961;
  --cat-deadbeat: #ffb84d;
  --cat-scumbag: #f78fd0;
  --cat-missing: #64d2ff;
  --ok: #30d158;
}

/* Nav: notification dot + menu badge */
.nav-avatar { position: relative; overflow: visible; }
.nav-avatar img { border-radius: 50%; }
.nav-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--bg);
}
.menu-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  display: inline-grid;
  place-items: center;
}

.hero-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.pill-count { margin-left: 6px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.pill.is-active .pill-count { color: inherit; opacity: 0.7; }

/* Category colors */
.cat-scammer, .cat-fraud { color: var(--cat-scammer); background: rgba(255, 105, 97, 0.12); }
.cat-deadbeat, .cat-debt { color: var(--cat-deadbeat); background: rgba(255, 184, 77, 0.12); }
.cat-scumbag, .cat-romance { color: var(--cat-scumbag); background: rgba(247, 143, 208, 0.12); }
.cat-missing { color: var(--cat-missing); background: rgba(100, 210, 255, 0.12); }
.logo[class*="cat-ring-"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--ring, transparent); }
.cat-ring-scammer { --ring: rgba(255, 105, 97, 0.7); }
.cat-ring-deadbeat { --ring: rgba(255, 184, 77, 0.7); }
.cat-ring-scumbag { --ring: rgba(247, 143, 208, 0.7); }
.cat-ring-missing { --ring: rgba(100, 210, 255, 0.7); }
.tag-ok { color: var(--ok); border-color: rgba(48, 209, 88, 0.35); }
.match { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; color: var(--accent); }
.person-row .row-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-num.is-danger { color: var(--danger); font-size: 22px; }

/* Event cards (board "latest events") */
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ev-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border-radius: var(--r-list);
  background: var(--surface);
  background-image: var(--highlight);
  border: 1px solid var(--border);
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.ev-card:hover { border-color: var(--border-strong); }
.ev-card:active { transform: scale(0.99); }
.ev-card-link { position: absolute; inset: 0; border-radius: inherit; }
.ev-card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ev-amount { display: inline-flex; align-items: center; gap: 2px; color: var(--danger); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ev-card-head .ev-amount { margin-left: auto; }
.ev-card-title { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.ev-card-excerpt {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ev-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.ev-people { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.person-chip { position: relative; z-index: 1; font-size: 12px; color: var(--accent); white-space: nowrap; }
.person-chip:hover { text-decoration: underline; }

/* Person header */
.person-facts {
  margin-top: 12px;
  padding: 18px 24px;
  border-radius: var(--r-list);
  background: var(--surface);
  border: 1px solid var(--border);
}
.person-summary { margin: 0 0 12px; font-size: 14px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.person-summary:last-child { margin-bottom: 0; }
.id-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.id-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  overflow: hidden;
  font-size: 13px;
}
.id-type { padding: 0 10px; height: 100%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); color: var(--text-2); }
.id-value { padding: 0 10px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.id-note { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; color: var(--text-3); font-size: 12px; }

/* Timeline (person events / event updates) */
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--border-strong), transparent);
}
.tl-item { position: relative; padding-bottom: 12px; }
.tl-dot {
  position: absolute;
  left: -21px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.tl-subject .tl-dot, .tl-accomplice .tl-dot { border-color: var(--danger); }
.tl-victim .tl-dot { border-color: var(--star); }
.tl-missing .tl-dot, .tl-up-found .tl-dot { border-color: var(--cat-missing); }
.tl-up-repaid .tl-dot { border-color: var(--ok); }
.tl-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
a.tl-card:hover { background: var(--hover); border-color: var(--border-strong); }
.tl-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-time { margin-left: auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.tl-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.tl-card .thread-stats { justify-content: flex-start; }
.timeline-compact .tl-dot { top: 18px; }
.tl-static { padding: 12px 16px; }
.role-subject, .role-accomplice { color: var(--danger); border-color: rgba(255, 105, 97, 0.35); }
.role-victim { color: var(--star); border-color: rgba(255, 184, 77, 0.35); }
.role-missing { color: var(--cat-missing); border-color: rgba(100, 210, 255, 0.35); }
.status-repaid, .status-settled, .status-found { color: var(--ok); border-color: rgba(48, 209, 88, 0.35); }
.status-police, .status-sued { color: var(--accent); border-color: rgba(168, 199, 250, 0.35); }

/* Relation graph */
.graph {
  margin: 0;
  padding: 8px;
  border-radius: var(--r-list);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 105, 97, 0.06), transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.graph-svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.graph-orbit { fill: none; stroke: rgba(255, 255, 255, 0.05); stroke-dasharray: 2 6; }
.graph-glow { animation: glow 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes glow { 50% { opacity: 0.55; transform: scale(1.08); } }
.g-edge line { stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.4; }
.g-edge.edge-subject line, .g-edge.edge-accomplice line { stroke: rgba(255, 105, 97, 0.45); }
.g-edge.edge-victim line { stroke: rgba(255, 184, 77, 0.4); }
.g-edge.edge-missing line { stroke: rgba(100, 210, 255, 0.45); }
.g-edge.is-dashed line { stroke: rgba(168, 199, 250, 0.55); stroke-dasharray: 5 5; animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -20; } }
.g-edge-label { fill: var(--text-3); font-size: 10px; text-anchor: middle; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.g-node { cursor: pointer; animation: node-in 520ms var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes node-in { from { opacity: 0; } to { opacity: 1; } }
.g-node .g-shape { fill: var(--raised); stroke: var(--border-strong); stroke-width: 1.5; transition: stroke var(--t-fast) var(--ease), fill var(--t-fast) var(--ease); }
.g-node:hover .g-shape { stroke: var(--text); fill: #232327; }
.g-center .g-shape { fill: #1d1d20; stroke: var(--danger); stroke-width: 2.5; }
.g-center .g-halo { fill: none; stroke: rgba(255, 105, 97, 0.25); stroke-width: 6; }
.g-event .g-shape { fill: rgba(168, 199, 250, 0.12); stroke: rgba(168, 199, 250, 0.6); }
.g-event.ev-fraud .g-shape { fill: rgba(255, 105, 97, 0.12); stroke: rgba(255, 105, 97, 0.6); }
.g-event.ev-debt .g-shape { fill: rgba(255, 184, 77, 0.12); stroke: rgba(255, 184, 77, 0.6); }
.g-event.ev-romance .g-shape { fill: rgba(247, 143, 208, 0.12); stroke: rgba(247, 143, 208, 0.6); }
.g-event.ev-missing .g-shape { fill: rgba(100, 210, 255, 0.12); stroke: rgba(100, 210, 255, 0.6); }
.g-glyph { stroke: var(--text-2); stroke-width: 1.6; stroke-linecap: round; fill: none; }
.g-person.cat-scammer .g-shape { stroke: rgba(255, 105, 97, 0.7); }
.g-person.cat-deadbeat .g-shape { stroke: rgba(255, 184, 77, 0.7); }
.g-person.cat-scumbag .g-shape { stroke: rgba(247, 143, 208, 0.7); }
.g-person.cat-missing .g-shape { stroke: rgba(100, 210, 255, 0.7); }
/* category classes also color text/background elsewhere; neutralize inside the SVG */
.g-node.cat-scammer, .g-node.cat-deadbeat, .g-node.cat-scumbag, .g-node.cat-missing { background: none; }
.g-initial { fill: var(--text-2); font-size: 14px; font-weight: 650; text-anchor: middle; }
.g-initial-lg { font-size: 24px; fill: var(--text); }
.g-label { fill: var(--text); font-size: 12px; font-weight: 550; text-anchor: middle; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.g-label-center { font-size: 14px; font-weight: 700; }
.g-sub { fill: var(--text-3); font-size: 10px; text-anchor: middle; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.graph-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; padding: 8px 0 6px; color: var(--text-2); font-size: 12px; }
.graph-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid; }
.lg-center { border-color: var(--danger); }
.lg-event { border-radius: 3px; border-color: rgba(168, 199, 250, 0.7); }
.lg-person { border-color: var(--border-strong); }
.lg-dash { width: 18px; height: 0; border-radius: 0; border: 0; border-top: 2px dashed rgba(168, 199, 250, 0.7); }

.rel-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rel-card, .cast-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 0;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.rel-card:hover, a.cast-card:hover { background: var(--hover); border-color: var(--border-strong); }
.rel-form {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rel-form-title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.rel-form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rel-form-row .picker { flex: 1; min-width: 200px; }
.rel-form-row .input-sm { max-width: none; width: auto; }
.rel-form-row .picker .input-sm { width: 100%; }
.related { margin-top: 8px; }

/* Pickers & @ menu */
.picker { position: relative; }
.picker-icon { position: absolute; left: 14px; top: 22px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.picker > .picker-input:not(.input-sm) { padding-left: 40px; }
.picker-pop, .mention-pop {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border-radius: var(--r-menu);
  background: rgba(22, 22, 25, 0.96);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
.mention-pop { right: auto; width: 280px; }
.mention-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mention-item:hover, .mention-item.is-active { background: var(--hover); }
.mention-main { display: flex; flex-direction: column; min-width: 0; }
.mention-name { font-size: 14px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mention-meta { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mention-empty { margin: 0; padding: 10px; color: var(--text-3); font-size: 13px; }
.mention-new { border-top: 1px solid var(--border); border-radius: 0 0 10px 10px; margin-top: 4px; }
.mention-new .mention-name { color: var(--accent); }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-event { border-radius: 8px; color: var(--accent); }

.picked { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.picked-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 14px;
  background: #0b0b0c;
  border: 1px solid var(--border);
}
.picked-name { flex: 1; min-width: 80px; font-weight: 600; font-size: 14px; }
.picked-row .input-sm { width: auto; flex: 0 1 auto; max-width: 160px; }
.picked-new input.input-sm { flex: 1 1 120px; max-width: none; }
.add-row { align-self: flex-start; }
.id-row { display: flex; gap: 8px; align-items: center; }
.id-row select { flex: 0 0 140px; max-width: 140px; }
.id-row input { flex: 1; max-width: none; }
.field-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Rich editor */
.editor {
  position: relative;
  border-radius: var(--r-btn);
  border: 1px solid var(--border-strong);
  background: #0b0b0c;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.editor:focus-within { border-color: rgba(168, 199, 250, 0.5); box-shadow: 0 0 0 4px rgba(168, 199, 250, 0.1); }
.editor.is-drag { border-color: var(--accent); border-style: dashed; background: rgba(168, 199, 250, 0.05); }
.editor-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.editor-tools { display: flex; align-items: center; gap: 2px; min-width: 0; flex-wrap: wrap; }
.tool {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.tool:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.tool.is-on { color: var(--accent); background: var(--accent-soft); }
.tool-wrap { position: relative; }
.tool-status { margin-left: 6px; font-size: 12px; color: var(--accent); }
.tool-error { margin-left: 6px; font-size: 12px; color: var(--danger); }
.emoji-pop, .rx-pop {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(8, 34px);
  gap: 2px;
  padding: 8px;
  border-radius: var(--r-menu);
  background: rgba(22, 22, 25, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
.rx-pop { grid-template-columns: repeat(6, 34px); bottom: calc(100% + 6px); top: auto; }
.emoji-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.emoji-btn:hover { background: rgba(255, 255, 255, 0.08); transform: scale(1.15); }
.emoji-btn.is-mine { background: var(--accent-soft); }
.editor-body { position: relative; }
.editor .editor-text { display: block; border: 0; border-radius: 0; background: transparent; box-shadow: none; min-height: 64px; }
.editor .editor-text:focus { box-shadow: none; }
.editor-preview { min-height: 120px; padding: 12px 14px; }
.editor-foot { display: flex; justify-content: space-between; gap: 12px; padding: 4px 12px 8px; }
.editor-foot .field-hint, .editor-foot .field-counter { margin: 0; }
.editor-compact .editor-foot .field-hint, .editor-compact .tool-text { display: none; }
.cform .editor { background: var(--surface); }
.reply-box .editor { background: #0b0b0c; }
.muted { color: var(--text-3); }

/* Rich content */
.prose img {
  display: block;
  max-width: 100%;
  max-height: 560px;
  margin: 10px 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  object-fit: contain;
  background: #0b0b0c;
}
.prose .mention { color: var(--accent); text-decoration: none; font-weight: 550; }
.prose a.mention { padding: 0 3px; border-radius: 5px; background: var(--accent-soft); }
.prose-sm { padding: 0; font-size: 14.5px; line-height: 1.7; }
.prose-sm p { margin: 0 0 8px; }
.prose-sm > :last-child { margin-bottom: 0; }
.prose-sm img { max-height: 360px; max-width: min(100%, 420px); }
.prose-sm pre { padding: 10px 12px; font-size: 13px; }
.comment-body.prose { white-space: normal; padding: 0; }
.comment-body .reply-to { margin: 0 0 4px; }

/* Reactions */
.reactions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.reactions-big { margin: 18px 0 4px; }
.rx {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.reactions-big .rx { height: 32px; padding: 0 12px; font-size: 13px; }
.rx:hover { background: rgba(255, 255, 255, 0.07); }
.rx:active { transform: scale(0.92); }
.rx.is-mine { border-color: rgba(168, 199, 250, 0.45); background: var(--accent-soft); color: var(--accent); }
.rx-emoji { font-size: 14px; line-height: 1; }
.reactions-big .rx-emoji { font-size: 16px; }
.rx-add { color: var(--text-3); border-style: dashed; }
.rx-wrap { position: relative; }
.rx.htmx-request, .emoji-btn.htmx-request { opacity: 0.6; }
.comment-actions { align-items: center; flex-wrap: wrap; }

/* Avatar / image fields */
.avatar-field { display: flex; align-items: center; gap: 18px; }
.avatar-field .avatar-edit { width: 72px; height: 72px; flex: none; }
.avatar-field-text { display: flex; flex-direction: column; gap: 4px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-strong); background: #0b0b0c; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-add { display: grid; place-items: center; color: var(--text-2); border-style: dashed; cursor: pointer; font: inherit; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.7); color: #fff; cursor: pointer; }

/* Event page */
.cast { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cast > li { position: relative; }
.cast-card { padding: 8px 14px 8px 8px; }
.cast-card.role-subject, .cast-card.role-accomplice { border-color: rgba(255, 105, 97, 0.3); color: inherit; }
.cast-card.role-missing { border-color: rgba(100, 210, 255, 0.3); color: inherit; }
.cast-card.role-victim { color: inherit; }
.cast-add { height: 52px; border-style: dashed; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.cast-add:hover { color: var(--text); }
.cast-form, .metoo-form {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--r-menu);
  background: rgba(22, 22, 25, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
.cast-form .input-sm, .metoo-form .input-sm { max-width: none; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin: 20px 0 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
}
.fact { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: #0d0d0f; margin: 0; }
.fact dt { font-size: 11px; color: var(--text-2); }
.fact dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.fact-money dd { color: var(--danger); font-size: 18px; font-variant-numeric: tabular-nums; }
.fact-sub { display: block; font-size: 11px; font-weight: 500; color: var(--ok); }
.meter { display: block; height: 4px; margin-top: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: inherit; background: var(--ok); }

.updates { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.updates-title { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 15px; font-weight: 650; }

.post-actions { flex-wrap: wrap; align-items: center; }
.chip-danger { color: var(--danger); border-color: rgba(255, 105, 97, 0.35); cursor: pointer; background: none; font: inherit; font-size: 13px; }
.chip-danger:hover { background: rgba(255, 105, 97, 0.1); color: var(--danger); }
.chip-on { color: var(--danger); border-color: rgba(255, 105, 97, 0.35); background: rgba(255, 105, 97, 0.1); }
.metoo { position: relative; }
.owner-box { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.owner-box summary { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; cursor: pointer; list-style: none; }
.owner-box summary::-webkit-details-marker { display: none; }
.owner-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.notice-error { background: rgba(255, 105, 97, 0.12); color: var(--danger); }

/* Notifications */
.notif-icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: var(--text-2); }
.thread.is-unread .notif-icon { background: var(--accent-soft); color: var(--accent); }
.thread.is-unread .thread-title-text { font-weight: 650; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; }

@media (max-width: 900px) {
  .rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav-inner { grid-template-columns: auto 1fr auto; gap: 8px; }
  .nav-brand { font-size: 15px; }
  .nav-links { display: flex; justify-content: center; }
  .nav-link { padding: 6px 10px; font-size: 13px; }
  .nav-link[data-focus-search] { display: none; }
  .hero-actions .btn { flex: 1; }
  .ev-list, .rel-grid, .field-row-3 { grid-template-columns: 1fr; }
  .person-facts { padding: 16px 18px; }
  .graph { margin: 0 calc(var(--gutter) * -1); border-radius: 0; border-left: 0; border-right: 0; }
  .g-label { font-size: 15px; }
  .g-sub, .g-edge-label { display: none; }
  .mention-pop { width: min(280px, calc(100vw - 48px)); }
  .cast-form, .metoo-form { width: min(300px, calc(100vw - 48px)); }
  .id-row select { flex-basis: 110px; max-width: 110px; }
  .co-num.is-danger { font-size: 18px; }
}
