
.bt { display: flex; flex-direction: column; gap: 12px; --bt-line: 1.5px solid var(--hair); --bt-gap: 16px; }
.bt-scroll { overflow: hidden; margin: 0 -6px; padding: 2px 6px 4px; }
.bt-tree { width: max-content; min-width: 100%; display: flex; flex-direction: column; align-items: center; }
.bt-root {
  width: 116px; height: 116px; display: grid; place-items: center;
  border-radius: var(--r-card, 16px); background: var(--raised);
}
.bt-root svg { width: 96px; height: 96px; }
.bt-root .bt-font { font-size: 64px; }
.bt-root path { fill: var(--fg); transition: opacity var(--fast, 120ms) var(--ease, cubic-bezier(.2, .7, .3, 1)), fill var(--fast, 120ms) var(--ease, cubic-bezier(.2, .7, .3, 1)); }
.bt.lit .bt-root path { opacity: .2; }
.bt.lit .bt-root path.on { opacity: 1; fill: var(--violet); }

.bt-tree ul {
  list-style: none; margin: 0; padding: var(--bt-gap) 0 0;
  display: flex; justify-content: center; position: relative;
}
.bt-tree ul::before { content: ''; position: absolute; top: 0; left: 50%; height: var(--bt-gap); border-left: var(--bt-line); }
.bt-tree li { position: relative; display: flex; flex-direction: column; align-items: center; padding: var(--bt-gap) 4px 0; }
.bt-tree li::before, .bt-tree li::after {
  content: ''; position: absolute; top: 0; width: 50%; height: var(--bt-gap); border-top: var(--bt-line);
}
.bt-tree li::before { right: 50%; }
.bt-tree li::after { left: 50%; border-left: var(--bt-line); }
.bt-tree li:first-child::before { border: 0; }
.bt-tree li:first-child::after { border-top-left-radius: 8px; }
.bt-tree li:last-child::before { border-right: var(--bt-line); border-top-right-radius: 8px; }
.bt-tree li:last-child::after { border: 0; }
.bt-tree li:only-child::before { border: 0; }
.bt-tree li:only-child::after { border: 0; border-left: var(--bt-line); border-radius: 0; }

.bt-n {
  display: flex; flex-direction: column; align-items: center; gap: 5px; width: max-content; min-width: 66px; color: var(--fg);
}
.bt-tap { display: block; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.bt-name { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.bt-name:hover, .bt-name:focus-visible { color: var(--seal-text, #A83A25); text-decoration-color: currentColor; }
.bt-t {
  width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: var(--r-chip, 10px); background: var(--raised);
  transition: box-shadow var(--fast, 120ms) var(--ease, cubic-bezier(.2, .7, .3, 1)), transform var(--fast, 120ms) var(--ease, cubic-bezier(.2, .7, .3, 1));
}
.bt-t svg { width: 42px; height: 42px; }
.bt-t path { fill: var(--fg); }
.bt-font { font-family: 'Noto Serif SC', serif; font-size: 30px; line-height: 1; }
.bt-n.piece ~ ul .bt-t { width: 44px; height: 44px; }
.bt-n.piece ~ ul .bt-t svg { width: 34px; height: 34px; }
.bt-n.piece ~ ul .bt-font { font-size: 24px; }
.bt-n.piece .bt-t { background: color-mix(in srgb, var(--violet) 18%, var(--raised)); }
:root[data-theme="dark"] .bt-n.piece .bt-t { background: color-mix(in srgb, var(--violet) 36%, var(--raised)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bt-n.piece .bt-t { background: color-mix(in srgb, var(--violet) 36%, var(--raised)); }
}
.bt-n.known .bt-t { box-shadow: inset 0 0 0 2px var(--jade); }
.bt-n.on .bt-t { box-shadow: 0 0 0 2px var(--violet); transform: translateY(-1px); }
.bt-n.known.on .bt-t { box-shadow: inset 0 0 0 2px var(--jade), 0 0 0 2px var(--violet); }
.bt-tap:focus-visible { outline: none; }
.bt-tap:focus-visible .bt-t { box-shadow: 0 0 0 2px var(--fg-2); }
.bt-l {
  width: max-content; max-width: 66px; min-width: min-content;
  font-size: 11.5px; line-height: 1.25; color: var(--fg-2); text-align: center;
  overflow-wrap: normal; word-break: normal; hyphens: manual;
}
.bt-l-long { font-size: 11px; }
.bt-lp { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 5px; }
.bt-py { font-size: 11px; line-height: 1.2; }
.bt-n.piece .bt-l { color: var(--fg); font-weight: 600; }
.bt-role {
  padding: 0 6px; border-radius: var(--r-pill, 99px); background: var(--raised);
  color: var(--fg-2); font-size: 11px; font-weight: 500; line-height: 1.5;
  white-space: nowrap;
}
.bt-role:empty { display: none; }

.bt-tree li.bt-fold > ul { display: none; }
.bt-more {
  display: inline-flex; width: 36px; height: 22px; padding: 0; border: 0; background: none;
  align-items: center; justify-content: center; cursor: pointer;
}
.bt-more svg {
  box-sizing: content-box; width: 9px; height: 6px; padding: 4px 7px; border-radius: 999px; background: var(--raised);
  fill: none; stroke: var(--fg-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transform: rotate(180deg);
}
.bt-tree li.bt-fold > .bt-n .bt-more svg { transform: none; stroke: var(--muted); }
.bt-root[data-bt-root] { cursor: pointer; }

.bt-compact .bt-root { width: 78px; height: 78px; }
.bt-compact .bt-root svg { width: 62px; height: 62px; }
.bt-compact .bt-root .bt-font { font-size: 44px; }
.bt-compact .bt-t { width: 44px; height: 44px; }
.bt-compact .bt-t svg { width: 34px; height: 34px; }
.bt-compact .bt-n { min-width: 56px; }
.bt-compact .bt-l { max-width: 56px; }
.bt-compact .bt-n.piece ~ ul .bt-t { width: 38px; height: 38px; }
.bt-compact .bt-n.piece ~ ul .bt-t svg { width: 29px; height: 29px; }
.bt-compact .bt-tree > .bt-l { margin-top: 6px; }
.bt-tight .bt-tree li { padding-left: 2px; padding-right: 2px; }
.bt-tight .bt-n, .bt-tight .bt-lp { gap: 4px; }
.bt-tight .bt-n { min-width: 54px; }
.bt-tight .bt-l { max-width: 54px; font-size: 11px; }
.bt-tight .bt-l-long { font-size: 11px; }
.bt-tight .bt-t { width: 44px; height: 44px; }
.bt-tight .bt-t svg { width: 34px; height: 34px; }
.bt-tight .bt-n.piece ~ ul .bt-t { width: 38px; height: 38px; }
.bt-tight .bt-n.piece ~ ul .bt-t svg { width: 29px; height: 29px; }
.bt-stack { display: flex; flex-direction: column; gap: 22px; }
.bt-row { overflow: hidden; padding-bottom: 4px; }
.bt-row-in { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 22px; }
.bt-row-in > .bt { flex: 0 0 auto; max-width: 100%; }
.bt-row.is-measuring > .bt-row-in { flex-wrap: nowrap; width: max-content; }
.bt-row-in.bt-row-even {
  display: grid; grid-template-columns: repeat(var(--bt-per, 2), max-content);
  justify-content: center; justify-items: center;
}
.bt-cap { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; }
.bt-cap .bt-l { max-width: 96px; font-weight: 600; }
.bt-old { display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 2px; color: var(--muted); text-decoration: none; }
.bt-old-arc { display: block; width: calc(100% - 16px); height: 14px; overflow: visible; }
.bt-old-arc path { fill: none; stroke: var(--hair); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px var(--hair)); }
.bt-old-row { display: flex; align-items: flex-start; gap: 4px; }
.bt-old-f { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bt-old .bt-t { background: none; }
.bt-old .bt-t svg { width: 26px; height: 26px; fill: currentColor; }
.bt-old-more { min-width: 2px; padding-top: 8px; font-size: 11px; }
.bt-old-more:not(:empty) { min-width: 12px; }
.bt-old-zh { font-family: 'Noto Serif SC', serif; font-size: 9px; }
.wd-chars .bt { margin: 10px 0 6px; }
.bt-story { margin-top: 14px; }
.bt-story-first { margin-top: 0; margin-bottom: 10px; }
.bt-story [data-ref] { cursor: pointer; }

.bt-t .bt-font-seq { font-size: 15px; letter-spacing: -.02em; color: var(--fg-2); }

.bt-role-f { padding: 0; background: none; color: var(--muted); font-weight: 400; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.bt-role-f .info-b { margin-left: 0; }
.bt-role-f .info-b svg { width: 13px; height: 13px; }

.hist { display: flex; flex-direction: column; gap: 18px; }
.hist-say { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hist-film {
  margin: 0; width: min(100%, 480px); aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: var(--r-card, 16px);
  background: #F3F0E7; box-shadow: inset 0 0 0 1px var(--hair);
}
.hist-v { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.hist-film { position: relative; }
.hist-hold {
  position: absolute; right: 10px; bottom: 10px;
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 99px; cursor: pointer;
  background: rgba(20, 18, 14, .55); color: #F3F0E7;
  opacity: .75; transition: opacity .15s ease-out, background .15s ease-out;
}
.hist-film:hover .hist-hold, .hist-hold:focus-visible { opacity: 1; background: rgba(20, 18, 14, .75); }
.hist-hold:focus-visible { outline: 2px solid var(--seal, #C0412B); outline-offset: 2px; }
.hist-hold svg { width: 16px; height: 16px; }
.hist-hold .hh-play { display: none; }
.hist-hold[aria-pressed="true"] .hh-play { display: inline; }
.hist-hold[aria-pressed="true"] .hh-pause { display: none; }
.hist-film { cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hist-film[data-held="1"] { cursor: ew-resize; }
.hist-bar {
  position: absolute; left: 12px; right: 56px; bottom: 26px; height: 3px;
  border-radius: 99px; background: rgba(20, 18, 14, .18); overflow: hidden;
  opacity: 0; transition: opacity .15s ease-out; pointer-events: none;
}
.hist-bar i { display: block; height: 100%; width: 0; background: var(--seal, #C0412B); }
.hist-film[data-held="1"] .hist-bar { opacity: 1; }
.etym.etym-line { flex-wrap: nowrap; overflow-x: auto; gap: 4px; scrollbar-width: none; }
.etym.etym-line::-webkit-scrollbar { display: none; }
.etym-wrap { position: relative; }
.etym-wrap.etym-more > .etym-line {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
}
.etym-wrap.etym-more::after {
  content: ''; position: absolute; right: 0; top: 2px; width: 14px; height: var(--etym-art, 64px);
  pointer-events: none; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1.5 6 6l-4.5 4.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 8px 12px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1.5 6 6l-4.5 4.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 8px 12px no-repeat;
}
.etym-arrow {
  flex: none; height: var(--etym-art, 64px); display: flex; align-items: center;
  color: var(--fg-2);
}
.etym-arrow svg { width: 14px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.origin strong { font-weight: 650; color: var(--fg); }
.hist .origin { margin: 0; }
