:root {
  --paper: #f3eee4;
  --ink: #221e19;
  --muted: #746c62;
  --card: #fffdf9;
  --accent: #0f5f5c;
  --accent-ink: #f4fffe;
  --soft: #e4f2f1;
  --again: #8f3d22;
  --known: #2f6a34;
  --line: #e3dacb;
  --shadow: 0 18px 50px rgba(70, 48, 20, 0.06);
  --top: 64px;
  color-scheme: light;
}
html[data-theme="dark"] {
  --paper: #141311;
  --ink: #f3eee6;
  --muted: #a69d92;
  --card: #1e1c19;
  --accent: #8ed4d0;
  --accent-ink: #102221;
  --soft: #243332;
  --again: #e7a08c;
  --known: #9dcc96;
  --line: #322e28;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(15, 95, 92, 0.08), transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Hiragino Sans", "Yu Gothic", "Apple SD Gothic Neo", "Geeza Pro", "Noto Nastaliq Urdu", "ITF Devanagari", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--top);
  padding: 10px 22px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 148px; }
.brand strong { display: block; font-size: 18px; letter-spacing: 0.08em; }
.brand em { display: block; font-style: normal; color: var(--muted); font-size: 12px; }
.mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  font-family: "Iowan Old Style", Palatino, "Songti SC", serif;
  font-size: 20px;
}
.pair {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-width: 0;
}
.pair-field {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.pair-field select {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  max-width: 16em;
}
.pair-arrow {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
}
.pair-arrow svg { transition: transform .28s ease; }
.pair-arrow:hover { border-color: var(--ink); }
.pair-arrow.is-flipped svg { transform: rotate(180deg); }
.seg button, .chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
}
.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.search input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 14px;
  outline: none;
}
.search input:focus { border-color: var(--accent); }
.hits {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  max-height: 360px;
  overflow: auto;
}
.hits button {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.hits button:hover { background: var(--soft); }
.hits small { display: block; color: var(--muted); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center;
}
.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  width: 100%;
}
.shell.folded { grid-template-columns: 52px minmax(0, 1fr); }
.catalog {
  position: sticky;
  top: var(--top);
  max-height: calc(100vh - var(--top));
  overflow: auto;
  padding: 16px 10px 40px 18px;
}
.catalog-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  margin: 0 2px 8px;
  padding-bottom: 4px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}
.fold {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.fold svg { display: block; }
.fold-label { display: none; font-size: 13px; font-weight: 600; }
.shell.folded .catalog { padding: 16px 6px 40px; overflow: hidden; }
.shell.folded #catalog-list { display: none; }
.shell.folded .catalog-bar { justify-content: center; margin: 0; }
.shell.folded .fold { padding: 0; width: 32px; justify-content: center; }
.shell.folded .fold svg { transform: scaleX(-1); }
.catalog h2 {
  margin: 8px 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.batch {
  display: block; width: 100%; text-align: left;
  border: 0; background: transparent;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 2px;
}
@media (hover: hover) {
  .batch:hover { background: color-mix(in srgb, var(--soft) 70%, transparent); }
}
.batch[aria-current="true"] { background: var(--soft); }
.batch b { display: block; font-weight: 600; font-size: 14px; }
.batch span { display: block; color: var(--muted); font-size: 12px; }
.batch i { font-style: normal; color: var(--accent); font-size: 12px; }
.stage { width: 100%; min-width: 0; padding: 22px 28px 80px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.seg { display: flex; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.stats { margin-left: auto; color: var(--muted); font-size: 13px; }
.head h1 { margin: 0 0 4px; font-size: 22px; font-weight: 650; }
.head p { margin: 0 0 16px; color: var(--muted); }
.note {
  background: var(--soft);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 16px;
}
.deck {
  display: grid;
  margin: 0 18px 28px;
}
.deck > .card { grid-area: 1 / 1; }
.deck > .card:not(.under) { z-index: 3; }
.card.under {
  z-index: 0;
  pointer-events: none;
  cursor: default;
}
.card.under.prev { transform: translate(-16px, 12px); z-index: 1; }
.card.under.next { transform: translate(16px, 24px); z-index: 2; }
.deck.show-prev .card.under.prev { transform: none; z-index: 2; }
.deck.show-next .card.under.next { transform: none; z-index: 2; }
.deck.show-prev .card.under.next,
.deck.show-next .card.under.prev { z-index: 1; }
.deck .card:has(.shot img),
.deck .card:has(.shot svg),
.deck .card:has(.shot-skeleton) {
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(0, 1fr);
  column-gap: 28px;
  align-items: start;
}
.deck .card > .shot { grid-column: 1; grid-row: 1 / span 12; }
.deck .card > :not(.shot):not(.swipe-stamp) { grid-column: 2; }
.deck .shot img {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}
.deck .shot.cartoon svg {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 640 / 300;
}
.card {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 34px 36px 26px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.card img { -webkit-user-drag: none; }
.card.dragging { cursor: grabbing; transition: none; }
.card.settling { transition: transform 240ms cubic-bezier(.18, .7, .2, 1); }
.card.flying { transition: transform 280ms cubic-bezier(.2, .7, .2, 1); pointer-events: none; }
.swipe-stamp {
  position: absolute;
  top: 22px;
  z-index: 2;
  padding: 4px 12px;
  border: 3px solid;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  background: color-mix(in srgb, var(--card) 82%, transparent);
}
.swipe-stamp.next { right: 22px; color: var(--accent); border-color: var(--accent); transform: rotate(12deg); }
.swipe-stamp.prev { left: 22px; color: var(--again); border-color: var(--again); transform: rotate(-12deg); }
.word {
  margin: 0;
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti SC", serif;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.ipa { margin: 8px 0 0; color: var(--muted); font-size: 18px; }
.literacy .ipa { color: var(--ink); font-size: 22px; letter-spacing: 0.04em; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.speak {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  display: grid; place-items: center;
  color: var(--accent);
}
.speak:hover { background: var(--soft); }
.speak.playing { background: var(--accent); color: var(--accent-ink); }
.zh { font-size: 28px; margin: 18px 0 6px; font-weight: 600; }
.meta { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.ex {
  margin: 16px 0 6px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--soft) 55%, var(--card));
  border-radius: 0 12px 12px 0;
  font-size: 20px;
  line-height: 1.45;
}
.cn { margin: 6px 0 0; font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.actions button, .ghost {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 10px 14px;
}
.actions .primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.actions .again[aria-pressed="true"] { color: var(--again); border-color: var(--again); }
.actions .known[aria-pressed="true"] { color: var(--known); border-color: var(--known); }
.keys { margin-top: 14px; color: var(--muted); font-size: 13px; }
.entry {
  padding: 22px 4px 20px;
  border-bottom: 1px solid var(--line);
}
.entry-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.entry h3 {
  margin: 0;
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti SC", serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.entry .zh { font-size: 20px; margin: 8px 0 4px; }
.entry .ex { font-size: 18px; }
.tag {
  display: inline-block;
  margin-left: 8px;
  font-family: "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--known);
  vertical-align: middle;
}
.tag.again { color: var(--again); }
details.dialog {
  margin: 8px 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 10px 14px;
}
details.dialog pre {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 8px 0 0;
  line-height: 1.55;
}
.word-grid {
  column-count: 2;
  column-gap: 16px;
}
@media (min-width: 1180px) {
  .word-grid { column-count: 3; }
}
@media (min-width: 1560px) {
  .word-grid { column-count: 4; }
}
.word-grid .entry {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 12px;
  margin: 0 0 16px;
  overflow: hidden;
  break-inside: avoid;
  display: inline-block;
  width: 100%;
}
.word-grid .shot { margin: -16px -16px 12px; }
.word-grid .shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px 16px 0 0; display: block; }
.word-grid .shot figcaption { padding: 0 16px; }
.talk { margin-top: 8px; }
.talk h2 { margin: 4px 0; font-size: 18px; font-weight: 650; }
.bubble {
  width: min(100%, 560px);
  margin: 8px 0;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: color-mix(in srgb, var(--soft) 65%, var(--card));
}
.bubble.right { margin-left: auto; border-left: 0; border-right: 3px solid var(--accent); border-radius: 14px 0 0 14px; }
.bubble p { margin: 4px 0; font-size: 17px; }
.bubble small { color: var(--muted); }
.talk .primary { margin-top: 8px; }
@media (max-width: 860px) {
  .word-grid { column-count: 1; }
}
.view-switch { flex: none; }
.scene-banner {
  display: flex; gap: 14px; align-items: center; width: 100%;
  text-align: left; border: 1px solid var(--line); background: var(--card);
  border-radius: 16px; padding: 8px; margin: 0 0 18px; cursor: pointer;
}
.scene-banner .thumb,
.scene-link .thumb { background: #d7ebe8 center/cover no-repeat; flex: none; }
.scene-banner .thumb { width: 168px; height: 94px; border-radius: 10px; }
.scene-link .thumb { width: 84px; height: 48px; border-radius: 8px; }
.shot.cartoon svg { width: 100%; height: auto; display: block; aspect-ratio: 640 / 300; }
.shot.visual-card svg { border-radius: 16px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08); }
.word-grid .shot.visual-card svg { border-radius: 16px 16px 0 0; }
.shot:empty { display: none; }
.shot-skeleton {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.03) 100%);
  background-size: 200% 100%;
  animation: shotShimmer 1.5s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(0,0,0,0.12);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}
@keyframes shotShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: none; object-fit: cover; object-position: center; border-radius: 16px; display: block; background: #ddd6c8; }
.shot figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; }
.shot a { color: inherit; }
.scene-banner span { display: block; }
.scene-banner b { display: block; color: var(--accent); font-size: 13px; letter-spacing: 0.04em; }
.scene-link { display: flex; gap: 10px; align-items: center; }
.scene-link img { width: 84px; height: 48px; object-fit: cover; border-radius: 8px; background: #d7ebe8; flex: none; }
.screen {
  position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden;
  background: #1c2422 center/cover no-repeat; color: #f6f3ec;
  box-shadow: var(--shadow);
}
.screen .shade {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 54px 22px 16px;
  background: linear-gradient(transparent, rgba(12, 18, 17, .82));
}
.screen .who { margin: 0 0 4px; font-size: 13px; letter-spacing: 0.06em; opacity: .85; }
.screen .line {
  margin: 0; font-family: "Iowan Old Style", Palatino, "Songti SC", serif;
  font-size: clamp(22px, 3vw, 34px); line-height: 1.25;
}
.screen .sub { margin: 6px 0 0; font-size: 16px; }
.filmbar { position: absolute; left: 16px; right: 16px; bottom: 8px; height: 3px; background: rgba(255,255,255,.28); border-radius: 99px; }
.filmbar span { display: block; height: 100%; background: #f4efe4; border-radius: 99px; }
.play-overlay {
  position: absolute; left: 16px; top: 16px; border: 0; border-radius: 999px;
  background: rgba(20, 20, 16, .72); color: #f6f3ec; padding: 8px 14px;
}
.script { list-style: none; margin: 14px 0 0; padding: 0; }
.script button {
  width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; padding: 12px 4px; border-radius: 0;
}
.script button.on { background: var(--soft); }
.script small { display: block; color: var(--muted); }
@media (max-width: 860px) {
  .deck .card:has(.shot img),
  .deck .card:has(.shot svg),
  .deck .card:has(.shot-skeleton) { display: block; }
  .top { flex-wrap: wrap; padding: 10px 12px; }
  .search { order: 5; max-width: none; flex-basis: 100%; margin: 0; }
  .shell { display: block; }
  .catalog {
    position: sticky;
    top: 108px;
    max-height: none;
    display: block;
    overflow: visible;
    padding: 8px 0 0;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    border-bottom: 1px solid var(--line);
  }
  .shell.folded .catalog { padding: 8px 12px; overflow: visible; border-bottom: 0; }
  .catalog-bar { margin: 0 12px 8px; justify-content: flex-start; background: transparent; }
  .shell.folded .catalog-bar { justify-content: flex-start; }
  .shell.folded .fold { width: auto; padding: 0 10px 0 8px; }
  .shell.folded .fold-label { display: inline; }
  #catalog-list {
    display: flex;
    gap: 8px;
    overflow: auto;
    padding: 0 12px 8px;
  }
  .catalog h2 { display: none; }
  .map-cats { flex: 0 0 100%; display: flex; flex-wrap: nowrap; overflow-x: auto; margin: 0 0 8px; }
  .map-sec-head { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; border-top: 0; border-left: 1px dashed var(--line); padding: 4px 8px; margin: 0; }
  .map-sec-head:first-of-type { border-left: 0; }
  .batch { min-width: 180px; background: var(--card); border: 1px solid var(--line); }
  .stage { padding: 16px 14px 72px; }
  .card { padding: 22px 16px 18px; }
  .stats { margin-left: 0; width: 100%; }
}
.batch.chart[aria-current="true"] { border-color: var(--accent); }
.alpha { display: flex; flex-direction: column; gap: 18px; }
.alpha h2 { margin: 0; font-size: 15px; font-weight: 650; }
.alpha-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.alpha-grid button {
  border: 1px solid var(--line); background: var(--card); color: inherit; font: inherit;
  border-radius: 14px; padding: 10px 6px 8px; text-align: center; cursor: pointer;
}
.alpha-grid button.on { outline: 2px solid var(--accent); }
.alpha-grid b { display: block; font-size: 28px; font-weight: 600; line-height: 1.1; }
.alpha-grid small, .alpha-grid em { display: block; color: var(--muted); font-style: normal; font-size: 12px; }
.letter-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
}
.letter-card h2 { margin: 0 0 8px; font-size: 26px; }
.letter-card h3 { margin: 14px 0 8px; font-size: 15px; }
.letter-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.letter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.letter-list li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.letter-list em { font-style: normal; color: var(--accent); }
.letter-line span, .letter-list span { color: var(--muted); }
.alpha-rules { margin: 0; padding-left: 1.2em; }
.alpha-rules li { margin: 4px 0; }
.poly { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.map-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 4px 14px;
}
.map-cats button {
  font-size: 12px;
  padding: 4px 10px;
}
.map-sec-head {
  padding: 12px 6px 4px;
  margin-top: 10px;
  border-top: 1px dashed var(--line);
}
.map-sec-head:first-of-type {
  border-top: 0;
  margin-top: 0;
}
.map-sec-head b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.map-sec-head small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.map-back {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: inherit;
  font: inherit;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.mind { display: flex; flex-direction: column; align-items: stretch; }
.mind-graph { display: flex; flex-direction: column; align-items: center; width: 100%; }
.mind-center {
  background: var(--ink); color: var(--paper);
  border-radius: 999px; min-width: 120px; min-height: 88px;
  display: grid; place-items: center; text-align: center; padding: 16px 22px;
  font-size: 28px; font-weight: 650;
}
.mind-center small, .mind-center i { display: block; font-size: 13px; font-style: normal; font-weight: 500; opacity: .85; }
.mind-stem { width: 2px; height: 18px; background: var(--line); }
.mind-arms {
  display: flex;
  align-items: flex-start;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
}
.mind-arm {
  position: relative;
  flex: 1 0 230px;
  max-width: 320px;
  padding: 22px 12px 8px 0;
}
.mind-arm.kin-arm { flex-basis: 520px; max-width: 680px; }
.mind-arm::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  width: 2px;
  height: 22px;
  background: var(--arm, var(--line));
}
.mind-arm::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}
.mind-arm:first-child::after { left: 18px; }
.mind-arm:last-child::after { left: 0; right: auto; width: 18px; }
.mind-arm:first-child:last-child::after { display: none; }
.mind-body { border-left: 2px solid var(--arm, var(--line)); margin-left: 18px; }
.mind-body h3, .mind-leaves li, .kin-gen {
  position: relative;
  margin: 0 0 8px;
  padding-left: 14px;
}
.mind-body h3 { font-size: 15px; }
.mind-body h3::before, .mind-leaves li::before, .kin-gen::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 14px;
  height: 2px;
  background: var(--arm, var(--line));
}
.mind-leaves { list-style: none; margin: 0; padding: 0; }
.mind-leaves button, .kin-nodes button, .root-node button {
  border: 1px solid var(--line);
  background: var(--card);
  color: inherit;
  font: inherit;
  border-radius: 12px;
  padding: 6px 10px;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.mind-leaves b, .kin-nodes b, .root-node b { display: block; font-weight: 650; }
.mind-leaves small, .kin-nodes small, .root-node small, .kin-nodes em, .root-node i, .mind-leaves i {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.kin-nodes { display: flex; flex-wrap: wrap; gap: 8px; }
.kin-nodes button { width: auto; min-width: 132px; max-width: 220px; }
.kin-gen h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.root-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  margin-top: 8px;
}
.root-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.root-node { display: flex; align-items: center; min-width: 0; }
.root-col.left .root-node { justify-content: flex-end; }
.root-col.left .root-node::after, .root-col.right .root-node::before {
  content: "";
  flex: 1 1 24px;
  height: 2px;
  min-width: 16px;
  background: var(--ink);
}
.root-hub { border: 0; cursor: pointer; font: inherit; }
.root-node button { max-width: 240px; }
