/* Roster (roster.html) and character pages (character.html). Loaded after site.css (build-pages.py "styles:").
   Type colours come from data/units.json "types" (roster-core.js sets --t-<key> / --t2-<key> on the root); the
   values here are only the fallback until the data has loaded. README "Unit types". */
:root {
  --t-normal: #8e8799; --t2-normal: #8e8799;
  --t-awaken: #4f9dff; --t2-awaken: #4f9dff;
  --t-awakened: #f5c542; --t2-awakened: #f5c542;
  --t-ba: #ff4f9a; --t2-ba: #ff4f9a;
  --t-legend: #ffc94a; --t2-legend: #ff4f9a;
  --t-legacy: #a57bff; --t2-legacy: #a57bff;
  --t-canba: #ff8fc4; --t2-canba: #ff8fc4;
  --t-lb: #2dd4bf; --t2-lb: #2dd4bf;
}

/* ---------- skeletons (same boxes as the final layout, so nothing moves when the data arrives) ---------- */
.sk { display: block; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%) 0 0 / 200% 100%; animation: skel 1.3s linear infinite; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* ---------- hero + tally ---------- */
.roster-hero { padding-bottom: 14px; }
.rh-row { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.rh-text { flex: 1 1 520px; min-width: 0; }
.rh-text p { margin-bottom: 0; }
.tally { display: flex; gap: 8px; margin: 0; flex-wrap: wrap; }
.tally > div { min-width: 112px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.tally dd { margin: 0; font: 800 1.6rem/1.1 var(--head); color: var(--text); min-height: 1.1em; }
.tally dt { font: 700 0.68rem/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); order: 2; }
.tally > div { display: flex; flex-direction: column-reverse; gap: 3px; }
.tally .t-ok dd { color: var(--ok); }
.tally .t-ba dd { color: var(--t-ba); }
.tally .t-lb dd { color: var(--t-lb); }
@media (max-width: 600px) { .tally { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .tally > div { min-width: 0; padding: 7px 8px; } .tally dd { font-size: 1.25rem; } .tally dt { font-size: 0.58rem; letter-spacing: 0.02em; } }

/* ---------- filter block (search + show + element / rarity + affiliation / type / results) ---------- */
.rtools { display: grid; gap: 10px; padding: 14px 0 6px; }
.rt-row { display: flex; gap: 10px; align-items: center; min-height: 46px; min-width: 0; }
.rt-top .search { flex: 1 1 280px; min-width: 0; }
.rt-label { flex: none; font: 700 0.74rem/1 var(--sans); color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.rt-aff { flex: 1 1 260px; display: flex; gap: 10px; align-items: center; min-width: 0; }
.chips-scroll { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; height: 46px; align-items: center; padding: 0 2px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.chips-scroll .chip { flex: none; }
.chip .n { color: var(--faint); font-weight: 600; font-size: 0.8rem; }
.chip[aria-pressed="true"] .n { color: inherit; opacity: 0.75; }

/* segmented groups (one rounded box of buttons) */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, 0.03); flex: none; max-width: 100%; }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--muted);
  font: 600 0.88rem/1 var(--sans); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.seg button[aria-pressed="true"] { background: var(--text); color: #16121c; }
.seg .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-ok { background: var(--ok); } .dot-off { background: #8e8799; }
.seg-label { font: 700 0.7rem/1 var(--sans); color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; padding: 0 6px 0 8px; }
.seg-el button, .seg-rar button { padding: 0 5px; min-width: 44px; justify-content: center; }
.seg-el button img { width: 28px; height: 28px; }
.seg-rar { min-height: 46px; }
/* the rarity chips arrive with the data: keep their room so the affiliation chips beside them never move */
@media (min-width: 1001px) { .seg-rar { min-width: 586px; } }
.seg-rar button img { width: 46px; height: 31px; object-fit: contain; }
.seg-el button[aria-pressed="true"], .seg-rar button[aria-pressed="true"] { background: rgba(255, 154, 61, 0.14); box-shadow: inset 0 0 0 2px var(--orange-2); color: var(--text); }
.seg-sm button { min-height: 34px; padding: 0 10px; font-size: 0.84rem; }

/* type chips: colour swatch = the outline colour on the cards */
.tsw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: linear-gradient(135deg, var(--tc, #888), var(--tc2, var(--tc, #888))); flex: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.tsw-tag { width: 16px; height: 9px; border-radius: 3px; }
.tchip[aria-pressed="true"] { background: color-mix(in srgb, var(--tc) 22%, var(--panel)); border-color: var(--tc); color: var(--text); }
.type-help { font-size: 0.9rem; color: var(--muted); }
.type-help > summary { cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; color: var(--orange-2); font-weight: 600; }
.type-legend { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }
.type-legend li { display: flex; align-items: center; gap: 8px; }
.type-legend b { color: var(--text); font-weight: 700; white-space: nowrap; }
.type-legend .tl-note { grid-column: 1 / -1; display: block; color: var(--faint); font-size: 0.84rem; }

.rt-results { justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; row-gap: 6px; }
.rt-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rt-results .result-count { margin: 0; }
.rt-results .result-count b { color: var(--text); }
#reset:disabled { opacity: 0.45; cursor: default; }

@media (max-width: 1000px) {
  .rt-row { flex-wrap: wrap; }
  .rt-row.rt-lab { flex-wrap: nowrap; }
  .rt-top .search, .rt-aff { flex: 1 1 100%; }
  .seg-rar { width: 100%; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
}
@media (max-width: 600px) {
  .rt-top .seg { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .rt-top #f-status button { flex: 1 1 auto; justify-content: center; }
  .seg-el { justify-content: space-between; }
  .seg-el button { flex: 1; }
  .rt-right { width: 100%; }
  .rt-right .seg { overflow-x: auto; scrollbar-width: none; }
  .type-legend { grid-template-columns: 1fr; }
}

/* ---------- cards ---------- */
.rgrid { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 14px; padding: 12px 0 40px; }
.rgrid .unit { content-visibility: visible; contain-intrinsic-size: none; border: 0; background: var(--panel); border-radius: 12px; overflow: visible; isolation: isolate;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); transition: transform .14s, box-shadow .18s; color: var(--text); text-decoration: none; }
.rgrid .unit::before { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 2px; pointer-events: none;
  background: linear-gradient(150deg, var(--tc, var(--line-2)), var(--tc2, var(--tc, var(--line-2))));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.rgrid .unit:hover, .rgrid .unit:focus-visible { transform: translateY(-3px); color: var(--text);
  box-shadow: 0 0 0 1px var(--tc), 0 10px 28px -6px color-mix(in srgb, var(--tc) 60%, transparent), 0 0 22px -4px color-mix(in srgb, var(--tc2, var(--tc)) 45%, transparent); }
.rgrid .unit:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.rgrid .unit.is-back { box-shadow: 0 0 0 3px var(--tc), 0 0 30px -2px color-mix(in srgb, var(--tc) 70%, transparent); }
.rgrid .unit-art { display: block; border-radius: 12px 12px 0 0; overflow: hidden;
  background: radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--el, #444) 42%, transparent), transparent 70%), linear-gradient(180deg, color-mix(in srgb, var(--tc, #444) 16%, #110e16), #110e16); }
.rgrid .unit-art::after { box-shadow: none; }
.rgrid .unit-art img.icon { display: block; }
.rgrid .unit[data-s="unplayable"] .unit-art img.icon { filter: grayscale(0.85) brightness(0.7); }
.rgrid .unit-stars { bottom: 6px; }
.rgrid .unit-info { display: flex; padding: 8px 10px 11px; gap: 2px; min-height: 0; height: 100px; }
.rgrid .unit-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 1.2em; flex: none; }
.rgrid .unit-title { height: 2.5em; flex: none; }
/* tags that do not fit wrap onto a hidden second line, so a card never shows half a tag */
.unit-tags { display: flex; gap: 4px; flex-wrap: wrap; overflow: hidden; height: 19px; margin-top: auto; flex: none; }
.ttag { display: inline-flex; align-items: center; flex: none; font: 700 0.64rem/1 var(--sans); letter-spacing: 0.02em; padding: 3px 6px; border-radius: 4px; white-space: nowrap;
  color: color-mix(in srgb, var(--tc, #aaa) 75%, #fff); border: 1px solid color-mix(in srgb, var(--tc, #aaa) 55%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc, #aaa) 18%, transparent), color-mix(in srgb, var(--tc2, var(--tc, #aaa)) 18%, transparent)); }
.ttag-off { --tc: #8e8799; }
.ttag-ok { --tc: #3ddc84; }
.skel-card { pointer-events: none; }
.skel-card .unit-art { aspect-ratio: 1; background: none; }
.skel-card .unit-art, .sk-name, .sk-title, .sk-tags { background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%) 0 0 / 200% 100%; animation: skel 1.3s linear infinite; }
.skel-card::before { --tc: var(--line-2); }
.sk-name { display: block; height: 1.1em; width: 75%; border-radius: 5px; flex: none; }
.sk-title { display: block; height: 2.3em; width: 92%; border-radius: 5px; margin-top: 2px; flex: none; }
.sk-tags { display: block; height: 17px; width: 55%; border-radius: 4px; margin-top: auto; flex: none; }
.sk-strip { display: block; height: 4px; width: 100%; border-radius: 2px; margin-top: 6px; flex: none; background: rgba(255, 255, 255, 0.07); }
@media (prefers-reduced-motion: reduce) { .skel-card .unit-art, .sk-name, .sk-title, .sk-tags { animation: none; } }
@media (max-width: 480px) {
  .rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .rgrid .unit-info { padding: 6px 7px 9px; height: 88px; }
  .rgrid .unit-name { font-size: 0.8rem; }
  .rgrid .unit-title { font-size: 0.7rem; }
  .ttag { font-size: 0.56rem; padding: 2px 4px; }
  .unit-tags { height: 16px; gap: 3px; }
  .sk-tags { height: 14px; }
}

/* ---------- list view: one row per character, its forms side by side ---------- */
.rlist { margin: 12px 0 40px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--panel); }
.frow { display: grid; grid-template-columns: 76px minmax(0, 1fr) 130px 120px 84px; gap: 14px; align-items: center; padding: 10px 16px 10px 14px; border-top: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc, #444) 14%, transparent), transparent 42%); box-shadow: inset 4px 0 0 var(--tc, transparent); }
.frow:first-child { border-top: 0; }
.frow-head { background: rgba(255, 255, 255, 0.03); box-shadow: none; font: 700 0.72rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding-top: 12px; padding-bottom: 12px; }
.frow.is-back { background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 32%, transparent), transparent 70%); }
.frow-pic { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #110e16; }
.frow-pic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: linear-gradient(150deg, var(--tc), var(--tc2, var(--tc)));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.frow-pic img { width: 64px; height: 64px; display: block; }
.frow-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.frow-name { font-weight: 700; color: var(--text); line-height: 1.25; }
.frow-name span { color: var(--muted); font-weight: 600; }
.frow-name:hover { color: var(--gold); }
.frow-forms { display: flex; gap: 6px; flex-wrap: wrap; }
.fpill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 6px; border-radius: 6px; font: 600 0.74rem/1 var(--sans); color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); background: color-mix(in srgb, var(--tc) 10%, transparent); min-height: 26px; white-space: nowrap; }
.fpill:hover { color: var(--text); border-color: var(--tc); }
.fpill .stars img { width: 12px; height: 12px; margin-right: -1px; }
.frow .unit-tags { height: auto; flex-wrap: wrap; margin-top: 0; }
.frow-el { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--el); }
.frow-el img { width: 26px; height: 26px; }
.frow-rar { display: flex; align-items: center; gap: 4px; color: var(--faint); }
.frow-rar img { width: 40px; height: 27px; object-fit: contain; }
.frow-view { min-height: 40px; padding: 8px 14px; font-size: 0.9rem; border-color: var(--orange-2); color: var(--orange-2); }
@media (max-width: 760px) {
  .frow { grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 8px 10px; padding: 10px 12px; }
  .frow-head { display: none; }
  .frow-pic { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .frow-main { grid-column: 2 / -1; grid-row: 1; }
  .frow-el { grid-column: 2; grid-row: 2; }
  .frow-rar { grid-column: 3; grid-row: 2; }
  .frow-view { grid-column: 4; grid-row: 2; min-height: 44px; }
}

/* ---------- character page ---------- */
.ch-bar { position: sticky; top: var(--hdr, 64px); z-index: 21; background: rgba(12, 10, 16, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.ch-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 8px; height: 60px; }
.ch-bar .btn { min-height: 44px; padding: 9px 16px; font-size: 0.95rem; }
.ch-step { display: flex; gap: 8px; }
.ch-bar a[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.ch-wrap { padding-top: 22px; padding-bottom: 56px; }
.ch-hero { position: relative; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 28px; padding: 20px; border-radius: 16px; background: var(--panel); isolation: isolate; min-height: 490px; }
.ch-hero::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 2px; pointer-events: none; background: linear-gradient(150deg, var(--tc, var(--line-2)), var(--tc2, var(--tc, var(--line-2))));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.ch-hero::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 16px 16px 0 0; background: linear-gradient(90deg, var(--tc, transparent), var(--tc2, var(--tc, transparent))); }
.ch-art { aspect-ratio: 300 / 395; width: 100%; max-height: 450px; display: grid; place-items: center; border-radius: 12px; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--el, #444) 42%, transparent), transparent 72%), #0e0b12; }
.ch-art img.card-art { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.55)); }
.ch-art img.card-icon { width: 60%; height: auto; }
.sk-art { width: 100%; height: 100%; border-radius: 12px; }
.ch-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.ch-types { display: flex; gap: 6px; flex-wrap: wrap; min-height: 24px; }
.ch-types .ttag { font-size: 0.74rem; padding: 5px 9px; }
.ch-main h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin: 0; overflow-wrap: anywhere; min-height: 1.1em; }
.ch-sub { margin: -4px 0 0; color: var(--gold); font-weight: 600; font-style: italic; font-size: 1.15rem; min-height: 1.4em; }
.ch-meta { margin: 0; min-height: 34px; }
.ch-meta .pill { min-height: 32px; }
.pill-stars .stars img { width: 20px; height: 20px; margin-right: -2px; }
.ch-forms { min-height: 52px; }
.ch-forms:empty { min-height: 0; }
.ch-status { margin: 0; color: var(--muted); }
.sk-h1 { height: 0.95em; width: min(420px, 80%); }
.sk-sub { height: 1.1em; width: 45%; }
.sk-tag, .sk-pill, .sk-form { display: inline-block; }
.sk-tag { width: 110px; height: 24px; margin-right: 6px; }
.ch-meta .sk-pill { width: 96px; height: 32px; }
.sk-form { width: 150px; height: 50px; margin-right: 8px; border-radius: 10px; }
.sk-line { height: 1em; width: 60%; }
.ch-hero[aria-busy="true"] .ch-forms { display: block; }

/* forms: links to the other forms, the current one ringed in its type colour */
.form-switch { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.fs-item { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 10px;
  padding: 4px 12px 4px 4px; font: 600 0.8rem var(--sans); min-height: 50px; }
a.fs-item:hover { border-color: var(--tc); color: var(--text); }
.fs-item[aria-current="page"] { border-color: var(--tc); box-shadow: 0 0 0 1px var(--tc); background: color-mix(in srgb, var(--tc) 14%, var(--bg-2)); }
.fs-item img { width: 40px; height: 40px; border-radius: 7px; }
.fs-item > span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.fs-item small { font-size: 0.72rem; color: var(--muted); }
.fs-item .stars img { width: 12px; height: 12px; margin-right: -1px; }
.evo-link { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 10px;
  padding: 5px 12px 5px 5px; font: 600 0.85rem var(--sans); min-height: 50px; }
.evo-link:hover { border-color: var(--tc, var(--gold)); color: var(--text); }
.evo-link img { width: 40px; height: 40px; border-radius: 7px; }

.ch-secnav { top: 124px; margin-top: 16px; min-height: 49px; }
.ch-secnav .wrap { padding: 0; }
.ch-tiles { margin-top: auto; }
.ch-tiles .statbars.tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin: 0; }
.ch-tiles .sk-tiles .sk { height: 82px; }
.sk-glance { height: 150px; border-radius: 10px; }
.ch-body { display: grid; gap: 14px; margin-top: 14px; }
.ch-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px 20px; scroll-margin-top: 184px; min-width: 0; }
.ch-sec > h2 { font-size: 1.55rem; padding-left: 12px; border-left: 4px solid var(--tc, var(--orange)); margin-bottom: 14px; }
.ch-sec h3 { font: 700 0.78rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange-2); margin: 20px 0 10px; }
.ch-sec > h2 + h3 { margin-top: 4px; }
.ch-sec .statbars.tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ch-sec .skill { border-left-color: var(--el, var(--orange)); }
.ck-note { font-size: 0.82rem; margin: 8px 0 0; }
.ch-sec .status-box { margin-bottom: 10px; }
.sk-h2 { height: 1.6rem; width: 220px; margin-bottom: 14px; }
.sk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.sk-tiles .sk { height: 72px; border-radius: 10px; }
.sk-block { height: 220px; border-radius: 10px; }
@media (max-width: 860px) {
  .ch-hero { grid-template-columns: 1fr; gap: 16px; padding: 16px; min-height: 0; }
  .ch-art { width: auto; height: 300px; max-height: none; justify-self: center; }
  .ch-main { min-height: 250px; }
  .ch-secnav { position: static; margin-top: 12px; }
  .ch-sec { scroll-margin-top: 136px; padding: 14px 14px 16px; }
}
@media (max-width: 480px) {
  .ch-bar .btn { padding: 9px 12px; }
  .ch-art { height: 280px; }
  .fs-item { padding-right: 8px; }
}
/* phones: 44 px tap targets */
@media (max-width: 600px) {
  .seg button, .seg-sm button { min-height: 44px; }
  .type-help > summary { min-height: 44px; }
  .chips-scroll { height: 50px; }
  .chips-scroll .chip { min-height: 44px; }
}

/* the parts strip: one dash per part the unit uses (roster-core.js strip); same states as the page checklist */
:root { --pd-original: #3ddc84; --pd-standin: #ffb020; --pd-alias: #6aa8ff; --pd-missing: #ff5a5f; --pd-shared: #5fb8b0; }
.pstrip { display: flex; gap: 3px; height: 4px; margin-top: 6px; flex: none; }
.pd { display: block; flex: 1; height: 4px; border-radius: 2px; background: var(--pd-original); }
.pd-standin { background: var(--pd-standin); }
.pd-alias { background: var(--pd-alias); }
.pd-missing { background: var(--pd-missing); }
.pd-shared { background: repeating-linear-gradient(90deg, var(--pd-shared) 0 3px, transparent 3px 5px); }
.type-legend .pd { flex: none; width: 22px; }
.frow .pstrip { max-width: 260px; }
.ck-strip { display: block; max-width: 340px; margin-top: 8px; }
.ck-strip .pstrip { height: 6px; } .ck-strip .pd { height: 6px; }

/* phones: the roster's filter block is one sticky bar (search, Filters, Sort) with the count and active filters under
   it; every filter group opens in the bottom sheet (site.css "Filter bar") */
@media (max-width: 760px) {
  .rtools[data-fp] { position: sticky; top: var(--hdr); z-index: 20; gap: 6px; margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter) 4px;
    background: rgba(12, 10, 16, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .rtools[data-fp] .rt-top { flex-wrap: nowrap; min-height: 0; gap: 8px; }
  .rtools[data-fp] .rt-top .search { flex: 1 1 auto; }
  .roster-hero { padding-bottom: 8px; }
  .ch-bar .wrap { height: 56px; }
  .ch-wrap { padding-top: 12px; }
  .ch-sec { scroll-margin-top: 124px; }
  #grid, #rlist { min-height: calc(100vh - 160px); }   /* a short filtered list keeps the footer below the fold while it loads */
}
.rt-right .fp-btn { height: 40px; }
