/* The remix view (docs/design/remix-view.md): shelf, lockups, ⋮ menu, ancestry line, the maker's
   strip, the family tree and the profile. Theme tokens from themes.css. */
.remixes { margin: 48px 0 0; display: grid; gap: 16px; }
.remixes[hidden] { display: none; }
.rx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rx-head h2 { margin: 0; font-family: var(--font-display); font-size: 28px; }
.rx-count { color: var(--text-muted); font-size: 14px; }
.rx-tabs { display: inline-flex; justify-self: start; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); }
.rx-tabs[hidden] { display: none; }
.rx-tabs button { font: 600 14px var(--font-ui, inherit); color: var(--text-muted); background: transparent; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.rx-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
/* The home grid's card, still: 2 columns on a phone, at most 3 (PR 302). */
.rx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .rx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.rx-grid[hidden] { display: none; }
.rx-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: var(--r-lg, 14px); box-shadow: 0 5px 0 var(--shadow); }
.rx-shot { display: block; background: #060808; padding: 4%; border-radius: var(--r-lg, 14px) var(--r-lg, 14px) 0 0; }
.rx-shot canvas { display: block; width: 100%; height: auto; aspect-ratio: var(--screen-w) / var(--screen-h); image-rendering: pixelated; border-radius: 2px; background: var(--lcd); }
.rx-card.is-empty canvas { opacity: 0.35; }
.rx-meta { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 2px; align-items: start; padding: 10px 4px 12px 12px; }
.rx-words { min-width: 0; }
/* Always two lines tall, so long titles fit and every card in a row matches (captain, 2026-11-25). */
.rx-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; font: 600 15px/1.25 var(--font-display); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.rx-h { display: block; margin-top: 2px; font-size: 13px; color: var(--text-muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.3em; }
.rx-card a.rx-t, .rx-card a.rx-t:visited { color: var(--text); }
.rx-card a.rx-h, .rx-card a.rx-h:visited { color: var(--text-muted); }
.rx-card a.rx-t:hover, .rx-card a.rx-h:hover { text-decoration: underline; }
.rx-dots { width: 32px; height: 44px; margin-top: -10px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; }
.rx-dots:hover, .rx-dots[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.rx-menu { position: absolute; z-index: 5; right: 4px; bottom: calc(100% - 6px); min-width: 160px; display: grid; padding: 6px; border-radius: 12px; background: var(--surface-2); box-shadow: 0 10px 30px rgb(0 0 0 / 0.45), 0 0 0 1px var(--line); }
.rx-menu button { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: 500 15px var(--font-ui, inherit); cursor: pointer; }
.rx-menu button:hover, .rx-menu button:focus-visible { background: var(--line); }
.rx-empty { margin: 0; color: var(--text-soft); }
.rx-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.rx-tree { color: var(--accent); font-weight: 600; text-decoration: none; }
.rx-tree[hidden], .rx-more[hidden] { display: none; }
.rx-dialog { max-width: min(440px, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: 20px; background: var(--surface-2); color: var(--text); }
.rx-dialog::backdrop { background: rgb(0 0 0 / 0.55); }
.rx-dialog h2 { margin: 0 0 8px; font-family: var(--font-display); }
.rx-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rx-field { display: grid; gap: 6px; margin: 0 0 14px; color: var(--text-soft); font-size: 14px; }
.rx-field[hidden] { display: none; }
.rx-field input { font: 16px inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.rx-pick { width: 100%; aspect-ratio: var(--screen-w) / var(--screen-h); height: auto; image-rendering: pixelated; border-radius: 4px; background: var(--lcd); }
.app-line { margin: 4px 0 0; color: var(--text-muted); }
.app-line a { color: var(--accent); font-weight: 600; text-decoration: none; }
.app-fav { width: 46px; padding: 0; color: #e8b923; }
.app-fav[aria-pressed="true"] { color: #f5c518; }
.app-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--surface); color: var(--text-soft); font: 14px var(--font-mono, monospace); }
.app-mine-who { width: 100%; font: 600 12px var(--font-ui, inherit); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.app-mine-pub { margin-left: auto; font: 600 14px var(--font-ui, inherit); color: var(--text); background: var(--surface-2); border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; }

/* The family tree (design §7): an indented outline on every screen size. */
.fam { display: grid; gap: 16px; }
.fam-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-muted); font-size: 14px; }
.fam-sum b { color: var(--text-soft); }
.fam-tree { display: grid; gap: 2px; }
.fam-row { display: grid; grid-template-columns: auto 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 10px; color: var(--text); text-decoration: none; }
.fam-row.is-here { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--accent); }
.fam-row canvas { width: 64px; height: auto; aspect-ratio: var(--screen-w) / var(--screen-h); image-rendering: pixelated; border-radius: 3px; background: var(--lcd); }
.fam-name { min-width: 0; }
.fam-row .fam-name a, .fam-row .fam-name a:visited { display: block; font: 600 15px var(--font-display); color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fam-name small { display: block; color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fam-ct { display: flex; gap: 10px; font: 12px var(--font-mono, monospace); color: var(--text-muted); white-space: nowrap; }
.fam-ind { display: flex; align-self: stretch; align-items: center; }
.fam-ind i { width: 20px; align-self: stretch; position: relative; }
.fam-ind i::before { content: ""; position: absolute; left: 9px; top: -8px; bottom: -8px; border-left: 1px solid var(--line); }
.fam-ind i.end::before { bottom: 50%; }
.fam-ind i.el::after { content: ""; position: absolute; left: 9px; right: 0; top: 50%; border-top: 1px solid var(--line); }
.fam-ind i.none::before { display: none; }
.fam-ind i.thick::before, .fam-ind i.thick::after { border-color: var(--accent); border-width: 3px; }
.fam-ind i.via::before, .fam-ind i.via::after { border-style: dashed; }
.fam-ind .deep { font: 11px var(--font-mono, monospace); color: var(--text-muted); width: 24px; }
.fam-chev { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.fam-chev.none { visibility: hidden; }
.fam-quiet { display: flex; align-items: center; color: var(--text-muted); font-size: 13px; padding: 2px 4px; }
.fam-quiet button { border: 0; background: transparent; color: var(--accent); font: 600 13px var(--font-ui, inherit); cursor: pointer; padding: 4px 0; }
@media (prefers-reduced-motion: no-preference) { .fam-row { transition: background 120ms; } }
