/* v5: the main page and a realm's page (waidrn_ui::v5_home), as the anty-2 lane drew
   them on 2026-11-19 (mockup index.html, style.css). The tokens are v5.css's; this file
   defines none. Every control is at least 24 by 24 CSS pixels. */

.v5h { width: 100%; min-width: 0; }

/* ---- Row 1: the scope bar ---- */
.v5h-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  min-height: 44px;
  padding: 6px 16px;
  background: var(--bg-sub);
  border-bottom: 1px solid var(--line);
}
.v5h-scope-group { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; min-width: 0; }
.v5h-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.v5h-stages { display: flex; gap: 4px; flex-wrap: wrap; }
.v5h-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 11.5px;
  text-decoration: none;
}
body.v5 .v5h-pill { color: var(--ink-2); }
.v5h-pill:hover { color: var(--ink); border-color: var(--line); }
body.v5 .v5h-pill.is-on {
  background: #1C2029;
  border-color: var(--line);
  color: var(--accent);
  font-weight: 500;
}
.v5h-hidden-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent-2);
}
.v5h-hidden-note.is-plain { color: var(--ink-2); }

.v5h-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v5h-search { display: flex; align-items: center; gap: 4px; }
.v5h-search-input,
.v5h-rfilter-input {
  height: 28px;
  background: #1A1E26;
  border: 1px solid #2B313D;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  outline: none;
}
.v5h-search-input { width: 220px; border-radius: 999px; padding: 0 12px; }
.v5h-search-input:focus,
.v5h-rfilter-input:focus { border-color: var(--accent); }
.v5h-search-input::placeholder,
.v5h-rfilter-input::placeholder { color: var(--ink-3); }

.v5h-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 28px;
  padding: 0 10px;
  background: #1A1E26;
  border: 1px solid #2B313D;
  border-radius: 5px;
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
body.v5 .v5h-ctrl { color: var(--ink-2); }
body.v5 .v5h-ctrl:hover { border-color: #454E61; color: #FFF; }
body.v5 .v5h-make { color: var(--accent); border-color: var(--line-card-hover); background: rgba(229, 193, 123, 0.12); }
.v5h-filter-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
body.v5 .v5h-filter-btn { color: #0B0D10; }
.v5h-filter-btn:hover,
.v5h-filter-btn.is-on { background: var(--accent); }

/* ---- Row 2: the realms ---- */
.v5h-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 5px 14px;
  background: var(--strip-bg);
  border-bottom: 1px solid var(--line);
}
.v5h-strip.is-wrapped { align-items: flex-start; padding-top: 8px; padding-bottom: 8px; }
.v5h-strip-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}
.v5h-back {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  background: #181C25;
  border: 1px solid var(--line-card-hover);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
body.v5 .v5h-back { color: var(--accent); }
.v5h-path {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
}
.v5h-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  text-transform: uppercase;
  white-space: nowrap;
}
.v5h-label-mark { color: var(--accent); font-weight: 600; }
.v5h-rfilter-input { width: 120px; height: 26px; border-radius: 4px; padding: 0 8px; font-size: 11px; }

.v5h-strip-track {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.v5h-strip-track::-webkit-scrollbar { display: none; }
.v5h-strip.is-wrapped .v5h-strip-track { flex-wrap: wrap; overflow-x: visible; }
.v5h-strip-note { flex: 1; margin: 0; font-size: 11.5px; color: var(--ink-2); }

.v5h-rpill {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  height: 28px;
  background: #151922;
  border: 1px solid #262C38;
  border-radius: 4px;
  overflow: hidden;
}
.v5h-rpill:hover { border-color: var(--line-card-hover); background: #1D2330; }
.v5h-rpill.is-love { border-color: rgba(104, 214, 168, 0.55); background: rgba(18, 36, 30, 0.92); }
.v5h-rpill.is-hate { border-color: rgba(240, 113, 120, 0.5); background: rgba(40, 18, 22, 0.92); }
.v5h-rpill-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 3px;
  font-size: 11.5px;
  white-space: nowrap;
  text-decoration: none;
}
body.v5 .v5h-rpill-link { color: var(--ink-2); }
body.v5 .v5h-rpill-link:hover { color: #FFF; }
.v5h-rpill-thumb {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.v5h-rpill-count { font-family: var(--mono); font-size: 10px; color: var(--ink-2); }
.v5h-qform { display: inline-flex; margin: 0; }
.v5h-rpill .v5h-qform { align-self: stretch; }
.v5h-rpill-add {
  min-width: 26px;
  border: 0;
  border-left: 1px solid #282F3D;
  background: rgba(229, 193, 123, 0.10);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.v5h-rpill-add:hover { background: var(--love-bg); color: var(--love); }
.v5h-rpill.is-love .v5h-rpill-add { color: var(--love); background: transparent; }
.v5h-rpill.is-hate .v5h-rpill-add { color: var(--hate); background: transparent; }

.v5h-strip-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}
.v5h-scroll { display: inline-flex; gap: 4px; }
.v5h-scroll[hidden] { display: none; }
.v5h-nav-btn {
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  background: #161A23;
  border: 1px solid #282F3D;
  border-radius: 4px;
  color: var(--ink-2);
  font-family: var(--mono);
  cursor: pointer;
}
.v5h-nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.v5h-strip-mode { min-height: 26px; font-size: 11.5px; }

/* ---- Row 3: the love/hate list ---- */
.v5h-queue {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 14px;
  background: var(--strip-bg);
  border-bottom: 1px solid var(--line);
}
.v5h-queue.is-drawer,
.v5h-queue.is-panel { display: block; padding: 10px 16px 12px; }
.v5h-queue.is-panel { border: 1px solid var(--line-card); border-radius: 6px; padding: 10px 12px; }
.v5h-queue-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}
.v5h-queue.is-drawer .v5h-queue-left,
.v5h-queue.is-panel .v5h-queue-left { border-right: 0; }
.v5h-queue-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 8px; }
.v5h-queue-help { margin: 0; font-size: 11.5px; color: var(--ink-2); }
.v5h-queue-track {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.v5h-queue-track::-webkit-scrollbar { display: none; }
.v5h-queue-sep { color: var(--ink-2); font-family: var(--mono); font-size: 10px; }
.v5h-queue-empty { color: var(--ink-2); font-size: 11.5px; list-style: none; }

.v5h-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #151922;
  border: 1px solid #2A3140;
  color: var(--ink-2);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.v5h-switch-dot {
  position: relative;
  width: 22px;
  height: 12px;
  border-radius: 999px;
  background: #2A303D;
}
.v5h-switch-dot::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9AA4B4;
}
.v5h-switch.is-on { border-color: var(--accent); color: var(--ink); background: rgba(229, 193, 123, 0.12); }
.v5h-switch.is-on .v5h-switch-dot { background: rgba(229, 193, 123, 0.35); }
.v5h-switch.is-on .v5h-switch-dot::after { left: 12px; background: var(--accent); }

.v5h-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  background: #161A22;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10.5px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
body.v5 .v5h-chip { color: var(--ink-2); }
body.v5 .v5h-chip:hover,
body.v5 .v5h-chip.is-on { border-color: var(--accent); color: var(--accent); }
.v5h-chip.is-static { cursor: default; }

.v5h-rule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: 28px;
  padding: 0 4px 0 6px;
  background: #141821;
  border: 1px solid #2A3140;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--ink);
  cursor: grab;
}
.v5h-rule.is-love { border-color: rgba(104, 214, 168, 0.42); background: rgba(16, 29, 25, 0.92); }
.v5h-rule.is-hate { border-color: rgba(240, 113, 120, 0.42); background: rgba(31, 16, 20, 0.92); }
.v5h-rule.is-row { display: flex; width: 100%; min-height: 32px; }
.v5h-rule.is-dragged { opacity: 0.5; }
.v5h-rule.is-over { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.v5h-grip { color: var(--ink-2); font-family: var(--mono); font-size: 11px; letter-spacing: -2px; padding: 0 2px; user-select: none; }
.v5h-rank { font-family: var(--mono); font-size: 10px; color: var(--ink-2); }
.v5h-rule-thumb { width: 18px; height: 18px; border-radius: 3px; object-fit: cover; }
.v5h-rule-name { white-space: nowrap; }
.v5h-rule-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-2);
}
.v5h-rule-moves { display: inline-flex; gap: 2px; margin-left: auto; }
.v5h-op {
  display: inline-flex;
  align-items: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 6px;
  border: 0;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.v5h-op.is-love { background: var(--love-bg); color: var(--love); }
.v5h-op.is-hate { background: var(--hate-bg); color: var(--hate); }
.v5h-nudge,
.v5h-del {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 3px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.v5h-nudge:hover { color: var(--accent); background: #1E232E; }
.v5h-del:hover { color: var(--hate); background: #1E232E; }

.v5h-queue-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.v5h-rules { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }

.v5h-trace {
  background: var(--card-bg);
  border: 1px solid var(--line-card);
  border-radius: 6px;
  padding: 11px 14px;
}
.v5h-trace-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.v5h-trace-title {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.v5h-trace-list { margin: 0; padding: 0; list-style: none; }
.v5h-trace-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 11.5px;
}
.v5h-trace-row.depth-1 { margin-left: 16px; }
.v5h-trace-row.depth-2 { margin-left: 32px; }
.v5h-trace-row.depth-3 { margin-left: 48px; }
.v5h-trace-row.depth-4 { margin-left: 64px; }
.v5h-trace-row.is-open { background: rgba(255, 255, 255, 0.03); }
.v5h-trace-row.is-love { background: rgba(104, 214, 168, 0.11); border-color: rgba(104, 214, 168, 0.35); }
.v5h-trace-row.is-hate { background: rgba(240, 113, 120, 0.10); border-color: rgba(240, 113, 120, 0.3); }
.v5h-trace-row.is-hate .v5h-trace-name { text-decoration: line-through; }
.v5h-trace-name { font-weight: 600; }
.v5h-trace-path { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 10px; color: var(--ink-2); }
.v5h-trace-rule { font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); white-space: nowrap; }

/* ---- The worlds atlas ---- */
.v5h-atlas {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  background: var(--strip-bg);
  border-bottom: 1px solid var(--line);
}
.v5h-atlas-levels {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.v5h-atlas-heading {
  margin: 4px 0 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.v5h-plates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}
.v5h-plate {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 84px;
  padding: 9px 10px;
  background: #13161E;
  border: 1px solid #262C38;
  border-radius: 6px;
}
.v5h-plate:hover { border-color: var(--line-card-hover); }
.v5h-plate.is-selected { border-color: var(--accent); background: rgba(229, 193, 123, 0.09); }
.v5h-plate.is-love { border-color: rgba(104, 214, 168, 0.55); background: rgba(16, 33, 28, 0.9); }
.v5h-plate.is-hate { border-color: rgba(240, 113, 120, 0.45); background: rgba(33, 16, 20, 0.9); }
.v5h-plate-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.v5h-plate-link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.v5h-plate-name { font-size: 12.5px; font-weight: 600; }
body.v5 .v5h-plate-name { color: var(--ink); }
.v5h-plate-foot { display: flex; justify-content: space-between; gap: 6px; }
.v5h-plate-path { font-family: var(--mono); font-size: 10px; color: var(--ink-2); overflow-wrap: anywhere; }
.v5h-atlas-side { display: grid; gap: 12px; }

/* ---- Row 4: the grid ---- */
.v5h-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 12px 14px 48px;
}
.v5h-main.has-drawer { grid-template-columns: minmax(0, 1fr) 280px; }
.v5h-count { margin: 0 0 8px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); }
.v5h-note { margin: 18px 0; font-size: 13px; color: var(--ink-2); }

.v5h-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(298px, 1fr));
  gap: 12px;
}
.v5h-card {
  display: flex;
  flex-direction: column;
  height: 252px;
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--line-card);
  border-radius: 5px;
  overflow: hidden;
}
.v5h-card:hover { border-color: var(--line-card-hover); }
.v5h-card.is-loved { border-color: rgba(104, 214, 168, 0.45); }
.v5h-card-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 4px 30px;
  background: var(--card-head);
  text-align: center;
}
.v5h-card-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v5h-card-title a { text-decoration: none; }
body.v5 .v5h-card-title a { color: var(--ink); }
body.v5 .v5h-card-title a:hover { color: var(--accent); text-decoration: underline; }
.v5h-watch-form { position: absolute; top: 4px; right: 4px; margin: 0; }
a.v5h-watch { position: absolute; top: 4px; right: 4px; }
.v5h-watch {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 3px;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
body.v5 .v5h-watch { color: var(--ink-2); }
body.v5 .v5h-watch.is-on,
body.v5 .v5h-watch:hover { color: var(--accent); }

.v5h-card-line {
  margin: 0;
  height: 20px;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 19px;
  text-align: center;
  background: var(--card-sub);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  color: var(--ink-2);
}
.v5h-card-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); }
.v5h-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #090B0E;
  border-right: 1px solid var(--line);
}
.v5h-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.v5h-poster-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 5px 6px 12px;
  background: linear-gradient(180deg, rgba(6, 8, 11, 0.95) 0%, rgba(6, 8, 11, 0.82) 70%, transparent 100%);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.25;
  color: #FFF;
}
.v5h-poster-top small { display: block; font-family: var(--mono); font-size: 9px; font-weight: 400; color: #D0D7E2; }
.v5h-poster-score {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(8, 10, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
}
.v5h-poster-mark { margin-right: 3px; color: var(--accent); }

.v5h-info { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.v5h-row-author,
.v5h-row-standing {
  margin: 0;
  height: 20px;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 20px;
  text-align: center;
  font-size: 10.5px;
}
.v5h-row-author { font-weight: 500; color: var(--ink-2); background: #181C24; }
.v5h-row-standing { border-top: 1px solid var(--line); font-family: var(--mono); color: var(--accent); background: #151820; }
.v5h-row-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  height: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #13161D;
  font-size: 9.5px;
  color: var(--ink-2);
}
.v5h-row-facts span {
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 19px;
  text-align: center;
}
.v5h-row-facts span:first-child { border-right: 1px solid var(--line); }
.v5h-synopsis {
  flex: 1;
  min-height: 0;
  padding: 6px 8px;
  overflow-y: auto;
  font-size: 11px;
  line-height: 1.38;
  color: var(--ink-2);
  scrollbar-width: thin;
  scrollbar-color: #323946 transparent;
}
.v5h-synopsis p { margin: 0 0 5px; }
.v5h-realm-cite { font-family: var(--mono); font-size: 9.5px; color: var(--ink-2); }

.v5h-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 28px;
  padding: 0 6px 0 8px;
  background: var(--card-foot);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-2);
}
.v5h-seals { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.v5h-foot-actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.v5h-seal { padding: 1px 4px; border-radius: 3px; white-space: nowrap; color: var(--ink-2); cursor: help; }
.v5h-seal.is-held { color: var(--warn); }
.v5h-seal.is-clear { color: var(--accent-2); }
.v5h-seal-icon { margin-right: 2px; vertical-align: -1.5px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.v5h-want-form { margin: 0; flex-shrink: 0; }
.v5h-want {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 6px;
  background: none;
  border: 0;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
body.v5 .v5h-want { color: var(--accent); }
.v5h-want:hover { background: rgba(229, 193, 123, 0.15); }
body.v5 .v5h-want.is-on { color: var(--accent-2); }

/* Posters and the list. */
.v5h-grid.is-posters { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.v5h-grid.is-posters .v5h-card { height: 290px; }
.v5h-grid.is-posters .v5h-info,
.v5h-grid.is-posters .v5h-card-line { display: none; }
.v5h-grid.is-posters .v5h-card-body { grid-template-columns: 1fr; }
.v5h-grid.is-posters .v5h-poster { border-right: 0; }

.v5h-grid.is-list { grid-template-columns: 1fr; max-width: 1180px; margin: 0 auto; gap: 6px; }
.v5h-grid.is-list .v5h-card { height: auto; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 6px 10px; }
.v5h-grid.is-list .v5h-card-head { grid-column: 2; grid-row: 1; justify-content: flex-start; padding: 0 30px 0 0; background: none; text-align: left; min-height: 0; }
.v5h-grid.is-list .v5h-card-line { grid-column: 2; grid-row: 2; height: auto; padding: 0; text-align: left; background: none; border: 0; }
.v5h-grid.is-list .v5h-card-body { display: contents; }
.v5h-grid.is-list .v5h-poster { grid-column: 1; grid-row: 1 / span 2; width: 40px; height: 52px; border: 0; border-radius: 3px; }
.v5h-grid.is-list .v5h-poster-top,
.v5h-grid.is-list .v5h-poster-score,
.v5h-grid.is-list .v5h-info { display: none; }
.v5h-grid.is-list .v5h-card-foot { grid-column: 3; grid-row: 1 / span 2; background: none; border: 0; }

/* The drawer of filters. */
.v5h-drawer {
  align-self: start;
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
  padding: 14px 16px;
  background: #14171E;
  border: 1px solid var(--line-card);
  border-radius: 6px;
}
.v5h-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.v5h-drawer-title { margin: 0; font-size: 13px; font-weight: 600; }
.v5h-drawer-sec { padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; }
.v5h-drawer-label { margin: 0 0 6px; font-family: var(--mono); font-size: 10px; font-weight: 500; text-transform: uppercase; color: var(--ink-2); }
.v5h-drawer-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.v5h-drawer-note { margin: 8px 0 0; font-size: 11px; color: var(--ink-2); }

/* The pages under the grid. */
.v5h-listing .v3-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 11.5px;
}
.v5h-listing .v3-pager-nums { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.v5h-listing .v3-pager-n,
.v5h-listing .v3-pager-step {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #161A22;
  color: var(--ink-2);
  text-decoration: none;
}
body.v5 .v5h-listing .v3-pager-n.is-on { border-color: var(--accent); color: var(--accent); }
.v5h-listing .v3-pager-step.is-disabled { opacity: 0.55; }
.v5h-listing .v3-pager-summary { color: var(--ink-2); }

/* Narrower screens: fewer columns follow from the grid; the bars stack. */
@media (max-width: 1100px) {
  .v5h-queue-split,
  .v5h-atlas { grid-template-columns: minmax(0, 1fr); }
  .v5h-main.has-drawer { grid-template-columns: minmax(0, 1fr); }
  .v5h-drawer { position: static; order: -1; }
}
@media (max-width: 700px) {
  .v5h-scope,
  .v5h-strip,
  .v5h-queue { padding-left: 16px; padding-right: 16px; }
  .v5h-controls { width: 100%; }
  .v5h-search { flex: 1 1 100%; }
  .v5h-search-input { flex: 1; width: auto; min-width: 0; }
  .v5h-strip { flex-wrap: wrap; }
  .v5h-strip-left,
  .v5h-queue-left { border-right: 0; padding-right: 0; flex-wrap: wrap; }
  .v5h-strip-track { flex-basis: 100%; }
  .v5h-strip-right { border-left: 0; padding-left: 0; }
  .v5h-queue { flex-wrap: wrap; }
  .v5h-queue-track { flex-basis: 100%; }
  .v5h-main { padding: 12px 16px 40px; }
  .v5h-grid { grid-template-columns: minmax(0, 1fr); }
  .v5h-card-body { grid-template-columns: 96px minmax(0, 1fr); }
  .v5h-rule-path { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .v5h * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.v5h-funnel { fill: currentColor; }
.v5h-none { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 0; }
.v5h-none .v5h-note { margin: 0; }
