@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/chakra-petch-600.woff2") format("woff2");
}
@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/chakra-petch-700.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/space-grotesk-400.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/space-grotesk-500.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/space-grotesk-600.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/space-grotesk-700.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/plex-mono-500.woff2") format("woff2");
}

:root {
  --hot: #ff2d8a;
  --vis: #ffe14a;
  --ice: #3de0ff;
  --blue: #3d8bff;
  --xrank: #63e6bd;
  --hot-surface: var(--hot);
  --hot-on: #101820;
  --vis-surface: var(--vis);
  --vis-on: #101820;
  --ice-surface: var(--ice);
  --ice-on: #101820;
  --xrank-surface: var(--xrank);
  --xrank-on: #0b201a;
  --tag-surface: color-mix(in srgb, var(--ink) 12%, transparent);
  --tag-on: var(--ink);
  --tag-depth: color-mix(in srgb, var(--ink) 18%, transparent);
  --mark-surface: var(--blue);
  --mark-on: #07111f;
  --mark-depth: color-mix(in srgb, var(--mark-surface) 72%, var(--bg-2));
  --mark-hover-surface: var(--ink);
  --mark-hover-on: var(--panel);
  --youtube: #d10a3d;
  --youtube-hover: #b50731;
  --youtube-on: #fff;
  --bg: #dfe6ee;
  --bg-2: #c9d3de;
  --panel: #f4f7fa;
  --ink: #101820;
  --stroke: #101820;
  --muted: #5b6b78;
  --line: #101820;
  --soft: #10182014;
  --shadow: none;
  --radius: 0;
  --display: "Chakra Petch", "PingFang SC", "Microsoft YaHei", sans-serif;
  --sans: "Space Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "Sarasa Mono SC", ui-monospace, monospace;
  --lime: var(--vis);
  --lime-ink: var(--vis-on);
  --coral: var(--hot);
  --teal: var(--ice);
  --action-edge: var(--ink);
  --action-idle-bg: var(--panel);
  --action-idle-fg: var(--muted);
  --action-pending-bg: var(--vis-surface);
  --action-pending-fg: var(--vis-on);
  --action-submit-bg: var(--hot-surface);
  --action-submit-fg: var(--hot-on);
  --action-progress-bg: var(--ice-surface);
  --action-progress-fg: var(--ice-on);
  --action-theme-bg: var(--panel);
  --action-theme-fg: var(--ink);
  --action-theme-hover-bg: var(--ice-surface);
  --action-theme-hover-fg: var(--ice-on);
}

body.dark {
  --bg: #0a0d12;
  --bg-2: #121821;
  --panel: #141b24;
  --ink: #eef3f7;
  --stroke: #05080d;
  --muted: #8b97a3;
  --line: #eef3f7;
  --soft: #eef3f714;
  --hot-surface: #762044;
  --hot-on: #fff1f7;
  --vis-surface: #645006;
  --vis-on: #fff4b0;
  --ice-surface: #2156a5;
  --ice-on: #eaf3ff;
  --xrank-surface: #1e6b55;
  --xrank-on: #e5fff7;
  --tag-surface: color-mix(in srgb, var(--ink) 14%, transparent);
  --tag-on: var(--ink);
  --tag-depth: color-mix(in srgb, var(--ink) 20%, transparent);
  --mark-hover-surface: var(--ink);
  --mark-hover-on: var(--panel);
  --action-edge: #5d6875;
  --action-idle-bg: #18212c;
  --action-idle-fg: #9ba8b5;
  --action-pending-bg: var(--vis-surface);
  --action-pending-fg: var(--vis-on);
  --action-submit-bg: var(--hot-surface);
  --action-submit-fg: var(--hot-on);
  --action-progress-bg: var(--ice-surface);
  --action-progress-fg: var(--ice-on);
  --action-theme-bg: var(--ice-surface);
  --action-theme-fg: var(--ice-on);
  --action-theme-hover-bg: var(--xrank-surface);
  --action-theme-hover-fg: var(--xrank-on);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; max-width: 100%; }
body { overflow-x: clip; }
body.drawer-open { overflow: hidden; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body.dark { color-scheme: dark; }

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 460px at 14% -12%, color-mix(in srgb, var(--ice) 9%, transparent), transparent 70%),
    radial-gradient(760px 420px at 88% -8%, color-mix(in srgb, var(--hot) 7%, transparent), transparent 72%),
    var(--bg);
  background-attachment: fixed;
  font: 14px/1.45 var(--sans);
  transition: background-color .35s ease, color .2s ease;
}

body::before {
  content: "SPLTN";
  position: fixed;
  right: -3vw;
  bottom: 2vh;
  z-index: 0;
  font: 700 18vw/.8 var(--display);
  letter-spacing: -0.06em;
  color: var(--ink);
  opacity: 0.045;
  pointer-events: none;
}

.marks {
  position: fixed;
  inset: 10px;
  z-index: 30;
  pointer-events: none;
}
.marks i {
  position: absolute;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 16px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1px 16px no-repeat;
}
.marks i::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.marks i:nth-child(1) { top: 0; left: 0; }
.marks i:nth-child(2) { top: 0; right: 0; }
.marks i:nth-child(3) { bottom: 0; left: 0; }
.marks i:nth-child(4) { bottom: 0; right: 0; }

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1480px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 28px 48px;
}

.topbar,
.dock,
.filters,
.brand,
.top-status,
.top-actions,
.overview-tools,
.compact-view,
.view-panel,
.compact-search,
.search-panel,
.filter-pills,
.vod-grid,
.vod-card,
.card-body,
.card-title { min-width: 0; }

.chrome {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -28px;
  padding: 0 28px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 38px #00000012;
  animation: chrome-in .45s cubic-bezier(.2,.8,.2,1) both;
}

.topbar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-height: 58px;
  padding: 8px 0 0;
}

.brand {
  --brand-depth: color-mix(in srgb, var(--hot) 54%, var(--stroke));
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: stretch;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--ink);
  min-width: 198px;
  box-shadow: 0 5px 10px #00000014;
  transition: transform .22s cubic-bezier(.16,1,.3,1), box-shadow .22s ease;
}
body.dark .brand { --brand-depth: color-mix(in srgb, var(--hot) 34%, var(--panel)); }
.brand::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: -1;
  height: 5px;
  background: var(--brand-depth);
  clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 4px 100%);
  opacity: .55;
  transform: scaleY(.25);
  transform-origin: top;
  transition: transform .22s cubic-bezier(.16,1,.3,1), opacity .18s ease, background-color .2s ease;
}
.brand:focus-visible::after {
  opacity: 1;
  transform: scaleY(1);
}

.brand-icon {
  display: grid;
  place-items: center;
  background: var(--hot-surface);
  color: var(--hot-on);
  font: 700 16px/1 var(--display);
}

.brand > span:last-child {
  display: grid;
  align-content: center;
  padding: 6px 10px;
  background: var(--panel);
}

.brand b,
.brand small { display: block; }
.brand b {
  font: 700 16px/1 var(--display);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.brand small,
.eyebrow {
  color: var(--muted);
  font: 500 9px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.brand small { margin-top: 4px; font-size: 9px; }

.top-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  background: var(--panel);
  color: var(--muted);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.08em;
  box-shadow: 0 7px 18px #00000014, inset 0 1px 0 #ffffff18;
}

.top-status i {
  position: relative;
  width: 8px;
  height: 8px;
  background: var(--hot);
}
.top-status i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hot);
  animation: pulse-ring 1.8s ease-out infinite;
}
.top-status[data-health="ready"] i,
.top-status[data-health="ready"] i::after { background: var(--xrank); }
.top-status[data-health="queued"] i,
.top-status[data-health="queued"] i::after { background: var(--vis); }
.top-status[data-health="running"] i,
.top-status[data-health="running"] i::after { background: var(--ice); }
.top-status[data-health="partial_error"] i,
.top-status[data-health="partial_error"] i::after { background: var(--vis); }
.top-status[data-health="error"] i,
.top-status[data-health="error"] i::after,
.top-status[data-health="preview"] i,
.top-status[data-health="preview"] i::after { background: var(--hot); }
.top-status[data-health="error"],
.top-status[data-health="partial_error"] { border-width: 2px; }

.top-status em {
  font-style: normal;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0;
}

.catalog-progress > .top-status.catalog-mobile-status {
  display: flex;
  flex: 0 0 auto;
  min-height: 0;
  width: auto;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 9px;
  box-shadow: none;
}
.catalog-mobile-status i { width: 6px; height: 6px; }

.metrics {
  display: flex;
  margin-left: 0;
}

.overview-tools {
  position: relative;
  display: flex;
  align-items: stretch;
  min-width: 0;
  margin-left: auto;
  padding-right: 84px;
  box-shadow: 0 7px 18px #00000014;
}

.metrics div {
  min-width: 72px;
  padding: 5px 10px;
  border: 1px solid var(--ink);
  border-left: 0;
  background: var(--panel);
}
.metrics div:first-child { border-left: 1px solid var(--ink); }

.metrics b,
.metrics span { display: block; }
.metrics b {
  font: 700 18px/1 var(--display);
  letter-spacing: -0.03em;
}
.metrics span {
  color: var(--muted);
  font: 500 8px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 3px;
}

.top-actions {
  display: flex;
  align-items: stretch;
  gap: 0;
  box-shadow: 0 7px 18px #00000014;
}
.top-actions:not(.has-pending):not(.is-submitting) .lang-toggle { border-left: 1px solid var(--action-edge); }

.site-nav { display: flex; align-items: stretch; gap: 0; margin-top: 8px; min-width: 0; border: 1px solid var(--ink); background: var(--panel); }
.site-nav > a, .contribution-menu > summary { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 14px; color: var(--ink); text-decoration: none; font: 700 12px/1.3 var(--sans); cursor: pointer; overflow-wrap: anywhere; }
.site-nav > a + a { border-left: 1px solid var(--ink); }
.site-nav > a[aria-current="page"] { background: var(--ice-surface); color: var(--ice-on); }
.site-nav > a:hover, .contribution-menu > summary:hover { background: var(--vis-surface); color: var(--vis-on); }
.contribution-menu { position: relative; margin-left: auto; min-width: 0; border-left: 1px solid var(--ink); }
.contribution-menu > summary { list-style: none; gap: 6px; }
.contribution-menu > summary::-webkit-details-marker { display: none; }
.contribution-menu > summary::after { content: '+'; font: 700 15px/1 var(--mono); }
.contribution-menu[open] > summary::after { content: '−'; }
.contribution-panel { position: absolute; right: -1px; z-index: 15; width: min(320px, calc(100vw - 28px)); padding: 12px; background: var(--panel); color: var(--ink); border: 1px solid var(--ink); }
.contribution-panel p { margin: 0 0 10px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.contribution-panel button { min-height: 36px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--ink); border-radius: 0; font: 700 12px/1.3 var(--sans); overflow-wrap: anywhere; cursor: pointer; }
@media(max-width:760px) {
  .site-nav > a, .contribution-menu > summary { padding: 6px 9px; font-size: 11px; }
  .site-nav > a { flex: 1 1 auto; }
  .contribution-menu { flex: 0 1 auto; }
}

.pending {
  display: grid;
  place-items: center;
  min-width: 36px;
  min-height: 42px;
  padding: 0 8px;
  border: 1px solid var(--action-edge);
  border-right: 0;
  background: var(--action-pending-bg);
  color: var(--action-pending-fg);
  font: 700 12px/1 var(--display);
  text-align: center;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.top-actions:not(.has-pending) .pending {
  background: var(--action-idle-bg);
  color: var(--action-idle-fg);
}

.round,
.lang-toggle {
  width: 42px;
  min-height: 42px;
  border: 1px solid var(--action-edge);
  border-left: 0;
  background: var(--action-theme-bg);
  color: var(--action-theme-fg);
  font-size: 16px;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background-color .2s ease, color .2s ease, border-color .2s ease;
}
.lang-toggle {
  background: var(--action-idle-bg);
  color: var(--action-idle-fg);
  font: 800 10px/1 var(--display);
  letter-spacing: -.02em;
}
body.dark .round { transform: rotate(180deg); }
.round:hover,
.lang-toggle:hover { background: var(--action-theme-hover-bg); color: var(--action-theme-hover-fg); }

.submit-edits,
.drawer a {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  padding: 0 14px;
  font: 700 12px/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.submit-edits {
  display: grid;
  min-width: 122px;
  min-height: 42px;
  align-content: center;
  gap: 3px;
  text-align: left;
  border-color: var(--action-edge);
  transition: transform .16s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.submit-edits > span { white-space: nowrap; }
.submit-edits > small {
  display: block;
  color: inherit;
  font: 500 8px/1.15 var(--mono);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  opacity: .72;
}
.submit-edits:disabled {
  border-color: var(--action-edge);
  background: var(--action-idle-bg);
  color: var(--action-idle-fg);
  cursor: default;
}
.top-actions.has-pending .submit-edits {
  border-color: var(--action-edge);
  background: var(--action-submit-bg);
  color: var(--action-submit-fg);
}
.top-actions.is-submitting .submit-edits {
  border-color: var(--action-edge);
  background: var(--action-progress-bg);
  color: var(--action-progress-fg);
}
.drawer a { display: inline-flex; align-items: center; min-height: 36px; }

.submit-edits:hover:not(:disabled),
.drawer a:hover {
  background: var(--hot-surface);
  border-color: var(--hot-surface);
  color: var(--hot-on);
}
.top-actions .submit-edits:hover:not(:disabled) {
  border-color: var(--action-edge);
  background: var(--action-submit-bg);
  color: var(--action-submit-fg);
}
.submit-edits:active,
.round:active,
.lang-toggle:active { transform: translateY(1px); }
body.dark .round:active { transform: rotate(180deg) translateY(1px); }

.dock {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 10px;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--ink) 58%, transparent);
  border-radius: 6px;
  box-shadow: 0 14px 34px #00000020, inset 0 1px 0 #ffffff18;
  animation: chrome-in .5s cubic-bezier(.2,.8,.2,1) .05s both;
}

.compact-search {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: stretch;
  width: 42px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-left: 0;
  background: var(--panel);
  transition: width .2s cubic-bezier(.16,1,.3,1), background .16s ease;
}
.compact-search.is-open {
  z-index: 5;
  width: 100%;
  border-left: 1px solid var(--ink);
  background: var(--panel);
}
.search-toggle {
  position: relative;
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-left: 1px solid transparent;
  background: transparent;
  color: var(--ice);
  font: 700 17px/1 var(--display);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.search-toggle:hover,
.search-toggle:focus-visible,
.compact-search.is-open .search-toggle {
  outline: 0;
  background: var(--ice-surface);
  color: var(--ice-on);
}
.compact-search.is-open .search-toggle { border-left-color: var(--ink); }
.compact-search.has-query:not(.is-open) .search-toggle {
  background: color-mix(in srgb, var(--ice) 28%, var(--panel));
  color: var(--ink);
}
.compact-search.has-query:not(.is-open) .search-toggle::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background: var(--hot);
}
.search-panel {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  padding: 0 10px;
}
.search-panel[hidden] { display: none; }
.search-panel input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 13px var(--sans);
}
.compact-search:focus-within { box-shadow: inset 0 -2px 0 var(--ice); }

@media (min-width: 761px) {
  .overview-tools { padding-right: 0; }
  .compact-search {
    position: relative;
    inset: auto;
    flex: 1 1 240px;
    width: clamp(210px, 20vw, 320px);
    max-width: 320px;
  }
  .compact-search.is-open { width: clamp(210px, 20vw, 320px); }
  .compact-search:not(.is-open) { flex: 0 0 42px; width: 42px; }
}

.compact-view {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 42px;
  bottom: 0;
  display: flex;
  align-items: stretch;
  width: 42px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-left: 0;
  background: var(--panel);
  transition: right .2s cubic-bezier(.16,1,.3,1), width .2s cubic-bezier(.16,1,.3,1);
}
.compact-view.is-open {
  z-index: 4;
  right: 0;
  width: 100%;
  border-left: 1px solid var(--ink);
}
.view-toggle {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-left: 1px solid transparent;
  background: transparent;
  color: var(--hot);
  font: 700 10px/1 var(--display);
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.view-toggle:hover,
.view-toggle:focus-visible,
.compact-view.is-open .view-toggle {
  outline: 0;
  background: var(--hot-surface);
  color: var(--hot-on);
}
.compact-view.is-open .view-toggle { border-left-color: var(--ink); }
.view-panel {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}
.view-panel[hidden] { display: none; }
@media (min-width: 761px) {
  .compact-view {
    position: relative;
    inset: auto;
    flex: 0 0 42px;
  }
  .compact-view.is-open {
    right: auto;
    flex-basis: 250px;
    width: 250px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.filter-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto;
  flex: 1 1 auto;
  align-items: stretch;
  gap: 0;
}
.filter-pills > * { min-width: 0; }
.filter-pills > .advanced-filter { display: none; }
.filter-pills.show-advanced > select.advanced-filter { display: block; }
.filter-pills.show-advanced > .icon-select.advanced-filter,
.filter-pills.show-advanced > .date-range.advanced-filter,
.filter-pills.show-advanced > .xrank-toggle.advanced-filter { display: flex; }
.filter-pills.show-advanced > .advanced-filter { border-top: 1px solid var(--ink); }
.filter-pills > .date-range,
.filter-pills > .weapon-fuzzy-toggle { grid-column: span 2; }
.filter-pills .icon-select-btn { width: 100%; max-width: none; }
.filter-pills > .weapon-icon-select.primary-filter .icon-select-btn { width: 100%; }

.filter-pills > select,
.filter-pills > button,
.filter-pills > .xrank-toggle {
  border: 0;
  border-left: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  min-height: 40px;
  padding: 0 12px;
  font: 600 12px/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.filter-pills > select {
  -webkit-appearance: none;
  appearance: none;
  max-width: 128px;
  padding-right: 26px;
  border-radius: 0;
  -webkit-border-radius: 0;
  background-color: transparent;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 12px) calc(50% - 2px),
    calc(100% - 8px) calc(50% - 2px);
  background-repeat: no-repeat;
  background-size: 4px 4px;
}
.filter-pills > :first-child { border-left: 0; }

.icon-select {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 40px;
  min-height: 40px;
  border-left: 1px solid var(--ink);
}
.icon-select select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.icon-select-btn,
.icon-select-panel button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 600 12px/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.icon-select-btn {
  align-self: stretch;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0 12px;
  border: 0;
  max-width: 168px;
  box-shadow: inset 0 -2px 0 color-mix(in srgb, #101820 20%, transparent);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.icon-select-btn::after {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: .72;
  transform: translateY(-2px) rotate(45deg);
  transform-origin: center;
  transition: transform .16s ease;
}
.icon-select.is-open .icon-select-btn,
.icon-select:has(.icon-select-panel:not([hidden])) .icon-select-btn {
  box-shadow: inset 0 2px 0 color-mix(in srgb, #101820 24%, transparent);
}
.icon-select.is-open .icon-select-btn::after,
.icon-select:has(.icon-select-panel:not([hidden])) .icon-select-btn::after {
  transform: translateY(2px) rotate(225deg);
}
.icon-select-btn span,
.icon-select-panel button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-select-btn img,
.icon-select-panel img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
}
.icon-select-panel {
  position: absolute;
  top: calc(100% - 1px);
  left: -1px;
  z-index: 12;
  min-width: 220px;
  max-height: 280px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--ink);
  box-shadow: 6px 8px 0 color-mix(in srgb, var(--ink) 12%, transparent);
}
.icon-select-panel button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  text-align: left;
}
.icon-select-panel button:hover,
.icon-select-panel button[aria-current="true"] {
  background: color-mix(in srgb, var(--ice) 35%, var(--panel));
}
.icon-select-group + .icon-select-group { border-top: 1px solid var(--line); }
.icon-select-group-label {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 10px 5px;
  background: var(--panel);
  color: var(--muted);
  font: 600 9px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.weapon-icon-select .icon-select-btn:has(img) {
  position: relative;
  width: 50px;
  justify-content: center;
  padding: 0 15px 0 5px;
}
.weapon-icon-select .icon-select-btn:has(img)::after { position: absolute; right: 7px; }
.weapon-icon-select .icon-select-btn:has(img) img { width: 25px; height: 25px; }
.weapon-icon-select .icon-select-panel {
  width: min(560px, calc(100vw - 28px));
  max-height: min(60vh, 470px);
}
.weapon-icon-select .icon-select-panel > button { width: 100%; min-height: 30px; justify-content: center; }
.weapon-icon-select .icon-select-group {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
}
.weapon-icon-select .icon-select-group-label {
  position: sticky;
  top: auto;
  left: 0;
  display: grid;
  min-height: 37px;
  place-items: center;
  padding: 3px;
  border-right: 1px solid var(--line);
  background: var(--ice-surface);
}
.weapon-icon-select .icon-select-group-label img { width: 25px; height: 25px; }
.weapon-icon-select .icon-select-group-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
}
.weapon-icon-select .icon-select-group-options button {
  width: auto;
  min-width: 0;
  min-height: 38px;
  justify-content: center;
  padding: 3px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.weapon-icon-select .icon-select-group-options img { width: 30px; height: 30px; }
.filter-pills > button,
.icon-select-btn {
  background: var(--ice-surface);
  color: var(--ice-on);
  transition: background .16s ease, color .16s ease;
}
.filter-pills > button:hover,
.icon-select-btn:hover { background: var(--hot-surface); color: var(--hot-on); }
#new-streamer {
  background: var(--vis-surface);
  color: var(--vis-on);
}
#new-streamer:hover { background: var(--hot-surface); color: var(--hot-on); }
#more-filters { display: flex; align-items: center; justify-content: center; gap: 5px; }
#more-filters b {
  min-width: 18px;
  padding: 2px 4px;
  background: var(--hot-surface);
  color: var(--hot-on);
  font: 700 9px/1 var(--mono);
  text-align: center;
}

.xrank-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
}
.xrank-toggle input { accent-color: var(--xrank); }

.date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid var(--ink);
  min-height: 40px;
  padding: 0 10px;
  transition: background .18s ease, box-shadow .18s ease;
}
.date-input {
  width: 124px;
  max-width: 100%;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 11px var(--mono);
  color-scheme: inherit;
  cursor: pointer;
}
.date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .65;
}
.date-sep {
  color: var(--muted);
  font: 600 12px var(--mono);
}

.view {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
  font: 700 12px/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s cubic-bezier(.16,1,.3,1);
}
.view + .view { border-left: 1px solid var(--ink); }
.view.selected {
  background: var(--hot-surface);
  color: var(--hot-on);
}
.view:active { transform: scale(.95); }

.vod-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.vod-card {
  --deck-rim-top: 2px;
  --deck-rim-right: 6px;
  --deck-rim-bottom: 8px;
  --deck-rim-left: 2px;
  --deck-space-x: 5px;
  --deck-space-y: 6px;
  --depth-x: 4px;
  --depth-y: 5px;
  --deck-top: color-mix(in srgb, var(--chip, var(--ice-surface)) 84%, var(--panel));
  --deck-side: color-mix(in srgb, var(--chip, var(--ice-surface)) 72%, var(--bg-2));
  --deck-front: color-mix(in srgb, var(--chip, var(--ice-surface)) 58%, var(--bg-2));
  position: relative;
  display: flex;
  align-items: stretch;
  isolation: isolate;
  overflow: visible;
  padding: 0 var(--deck-space-x) var(--deck-space-y) 0;
  border: 0;
  background: none;
  box-shadow: none;
  cursor: default;
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
  transform: none;
}
.card-platform {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: var(--deck-rim-top) var(--deck-rim-right) var(--deck-rim-bottom) var(--deck-rim-left);
  overflow: visible;
  border: 0;
  background: var(--deck-top);
  box-shadow: none;
  transition: background-color .18s ease;
}
.card-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
  transform: none;
}
.vod-card.card-enter {
  animation: card-fade .32s ease-out backwards;
  animation-delay: calc(var(--card-i, 0) * 18ms);
}
.vod-card.card-enter .thumb,
.vod-card.card-enter .card-body {
  animation: none;
}
.card-platform::before {
  content: "";
  position: absolute;
  top: 0;
  right: calc(0px - var(--depth-x));
  bottom: calc(0px - var(--depth-y));
  z-index: 0;
  width: var(--depth-x);
  background: var(--deck-side);
  clip-path: polygon(0 0, 100% var(--depth-y), 100% calc(100% - var(--depth-y)), 0 100%);
  transition: width .2s cubic-bezier(.2,.8,.2,1), right .2s cubic-bezier(.2,.8,.2,1), bottom .2s cubic-bezier(.2,.8,.2,1), background-color .18s ease;
}
.card-platform::after {
  content: "";
  position: absolute;
  right: calc(0px - var(--depth-x));
  bottom: calc(0px - var(--depth-y));
  left: 0;
  z-index: 0;
  height: var(--depth-y);
  background: var(--deck-front);
  clip-path: polygon(0 0, 100% 0, 100% 100%, var(--depth-x) 100%);
  transition: height .2s cubic-bezier(.2,.8,.2,1), right .2s cubic-bezier(.2,.8,.2,1), bottom .2s cubic-bezier(.2,.8,.2,1), background-color .18s ease;
}
.card-shell::before {
  display: none;
}
.card-shell::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 9px;
  z-index: 3;
  width: 48px;
  height: 13px;
  background:
    linear-gradient(166deg, transparent 0 44%, color-mix(in srgb, var(--ink) 18%, transparent) 46% 49%, transparent 51%) 0 0 / 48px 12px no-repeat,
    linear-gradient(174deg, transparent 0 44%, color-mix(in srgb, var(--ink) 13%, transparent) 46% 49%, transparent 51%) 25px 8px / 36px 10px no-repeat;
  opacity: .26;
  pointer-events: none;
  transform: skewX(-8deg);
}
.vod-card.kind-other { --chip: var(--vis-surface); }
.vod-card.kind-xrank { --chip: var(--xrank-surface); }
.vod-card.kind-match { --chip: var(--hot-surface); }
body.dark .vod-card {
  --deck-top: color-mix(in srgb, var(--chip, var(--ice-surface)) 70%, var(--bg-2));
  --deck-side: color-mix(in srgb, var(--chip, var(--ice-surface)) 88%, var(--bg-2));
  --deck-front: color-mix(in srgb, var(--chip, var(--ice-surface)) 78%, var(--bg-2));
}

.thumb-link:focus-visible,
.card-title:focus-visible,
.card-mark:focus-visible {
  z-index: 2;
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}

.vod-card.xrank .thumb::before {
  content: "X";
  position: absolute;
  top: 8px;
  left: 14px;
  z-index: 1;
  padding: 3px 6px;
  background: var(--xrank-surface);
  color: var(--xrank-on);
  font: 700 11px/1 var(--display);
}

.edited-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  padding: 3px 6px;
  background: var(--hot-surface);
  color: var(--hot-on);
  font: 700 10px/1 var(--display);
  letter-spacing: 0.06em;
}

.thumb {
  position: relative;
  z-index: 1;
  aspect-ratio: 1.92 / 1;
  background: color-mix(in srgb, var(--panel) 84%, var(--ink));
  overflow: hidden;
}
.thumb-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: grayscale(.03) saturate(.86) contrast(1.04) brightness(.95);
  transform: scale(1.006) translateZ(0);
  transition:
    filter .34s ease,
    opacity .34s ease,
    transform .38s cubic-bezier(.16,1,.3,1);
}
body.dark .thumb img {
  opacity: .9;
  filter: grayscale(.04) saturate(.68) contrast(1.08) brightness(.76);
}

.card-edit-cue {
  position: absolute;
  left: 14px;
  bottom: 10px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: #fff;
  color: #101820;
  font-size: 13px;
  transition: transform .18s ease, background .18s ease;
}
.card-edit-cue::before { content: "✎"; transform: translateY(-1px); }

.duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  padding: 3px 6px;
  background: #101820cc;
  color: #fff;
  font: 500 10px/1 var(--mono);
}

.card-body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  padding: 12px 12px 13px 16px;
  background: transparent;
  transition: transform .28s cubic-bezier(.16,1,.3,1);
}

.card-title {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  font: 600 14px/1.35 "PingFang SC", "Microsoft YaHei", var(--display), sans-serif;
  letter-spacing: -0.02em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.card-title[href] {
  color: inherit;
  text-decoration: none;
}
.card-title[href]:hover { text-decoration: underline; text-underline-offset: 3px; }
.match-reason {
  margin-top: 5px;
  color: var(--muted);
  font: 500 9px/1.35 var(--mono);
  overflow-wrap: anywhere;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 22px;
  margin-top: 9px;
}

.tag {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 22px;
  padding: 2px 6px;
  border: 0;
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--tag-depth);
  overflow: hidden;
  font: 500 10px/1.3 var(--mono);
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform .18s cubic-bezier(.16,1,.3,1), background .16s ease, color .16s ease, box-shadow .18s ease;
}
.tag-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex: 0 0 auto;
  image-rendering: auto;
}
.tag.weapon.icon-only { width: 26px; height: 26px; min-height: 26px; justify-content: center; padding: 2px; }
.tag.weapon.icon-only .tag-icon { width: 20px; height: 20px; }
.tag.mode .tag-icon,
.tag.xrank .tag-icon { filter: none; }

.tag.weapon,
.tag.map,
.tag.mode,
.tag.category,
.tag.xrank { background: var(--tag-surface); color: var(--tag-on); }
.tag.anomaly {
  background: var(--hot-surface);
  color: var(--hot-on);
}
.anomaly-text { color: var(--hot); font-weight: 700; }
.duration.anomaly { background: var(--hot-surface); color: var(--hot-on); }
.vod-card.data-anomaly .card-shell { outline: 2px solid var(--hot); outline-offset: -2px; }

.streamer-ref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.streamer-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.streamer-avatar {
  --avatar-size: 18px;
  position: relative;
  display: inline-grid;
  flex: 0 0 var(--avatar-size);
  place-items: center;
  width: var(--avatar-size);
  height: var(--avatar-size);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--vis-surface) 55%, var(--panel));
  color: var(--ink);
  font: 700 calc(var(--avatar-size) * .46)/1 var(--display);
  letter-spacing: 0;
  text-transform: none;
  isolation: isolate;
}
.avatar-size-16 { --avatar-size: 16px; }
.avatar-size-18 { --avatar-size: 18px; }
.avatar-size-20 { --avatar-size: 20px; }
.avatar-size-22 { --avatar-size: 22px; }
.streamer-avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.streamer-avatar-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-2);
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
  padding-top: 8px;
  border-top: 1px solid var(--soft);
  color: color-mix(in srgb, var(--ink) 84%, var(--deck-top));
  font: 500 10px/1.2 var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
}
.meta > .card-streamer {
  flex: 1 1 auto;
  overflow: hidden;
}
.meta > span:not(.card-streamer) { flex: 0 0 auto; }

.vod-grid:not(.card):not(.list) .card-body {
  display: flex;
  flex-direction: column;
}
.vod-grid:not(.card):not(.list) .tags { margin-bottom: 11px; }
.vod-grid:not(.card):not(.list) .meta { margin-top: auto; }

.card .card-streamer { gap: 4px; }
.card-mark {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 7px;
  border: 0;
  border-radius: 2px;
  background: var(--mark-surface);
  color: var(--mark-on);
  box-shadow: 2px 2px 0 var(--mark-depth);
  font: 700 10px/1 var(--display);
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: transform 90ms ease, box-shadow 90ms ease, background .16s ease, color .16s ease;
}
.card-mark:hover {
  background: var(--mark-hover-surface);
  color: var(--mark-hover-on);
  box-shadow: 1px 1px 0 var(--mark-depth);
  transform: translate(1px, 1px);
}
.card-mark:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

.vod-grid.card {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.card .vod-card {
  --deck-rim-top: 1px;
  --deck-rim-right: 3px;
  --deck-rim-bottom: 4px;
  --deck-rim-left: 1px;
  --deck-space-x: 3px;
  --deck-space-y: 4px;
  --depth-x: 3px;
  --depth-y: 3px;
  contain-intrinsic-size: auto 168px;
}
.card .card-edit-cue { width: 22px; height: 22px; left: 12px; bottom: 8px; font-size: 11px; }
.card .duration { padding: 3px 5px; font-size: 9px; }
.card .card-body { padding: 7px 8px 8px 14px; }
.card .card-title {
  min-height: 0;
  font-size: 12px;
  -webkit-line-clamp: 1;
}
.card .tags { display: none; }
.card .meta { margin-top: 6px; padding-top: 5px; }

.vod-grid.list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.list .vod-card {
  --deck-rim-top: 0px;
  --deck-rim-right: 1px;
  --deck-rim-bottom: 1px;
  --deck-rim-left: 0px;
  --deck-space-x: 2px;
  --deck-space-y: 2px;
  --depth-x: 1px;
  --depth-y: 2px;
  display: flex;
  margin: 0;
  contain-intrinsic-size: auto 52px;
}
.list .card-platform { min-height: 52px; }
.list .card-shell {
  min-height: 52px;
  padding: 0;
  clip-path: none;
}
.list .card-shell::after { display: none; }
.list .thumb { display: none; }
.list .card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(160px, auto);
  align-items: center;
  gap: 10px 14px;
  min-height: 50px;
  padding: 8px 12px 8px 16px;
}
.list .card-title {
  min-height: 0;
  -webkit-line-clamp: 1;
}
.list .tags { margin: 0; min-height: 0; }
.list .meta {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.more {
  margin: 18px 0 8px;
  color: var(--muted);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-align: center;
}

.catalog-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--ink) 32%, transparent);
  background: color-mix(in srgb, var(--panel) 84%, var(--bg-2));
  color: var(--muted);
  font: 500 11px/1.35 var(--mono);
}
.catalog-progress[data-state="partial_error"] { border-color: var(--hot); color: var(--ink); }
.catalog-progress button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--hot-surface);
  color: var(--hot-on);
  font: 700 10px/1.2 var(--display);
  cursor: pointer;
}

.receipt-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 7;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: 860px;
  margin: 0 auto;
  padding: 10px 52px 10px 12px;
  border: 1px solid var(--ink);
  background: var(--panel);
  color: var(--ink);
}
.receipt-banner[hidden] { display: none; }
.receipt-banner strong { font: 700 11px/1.3 var(--display); }
.receipt-banner a {
  min-width: 0;
  overflow: hidden;
  color: var(--ice-on);
  font: 500 10px/1.35 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.receipt-banner button {
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--vis-surface);
  color: var(--vis-on);
  font: 700 10px/1 var(--display);
  cursor: pointer;
}
.receipt-banner .receipt-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  min-height: 32px;
  padding: 0;
  border-color: var(--ink);
  background: var(--panel);
  color: var(--ink);
  font: 700 17px/1 var(--display);
}
.receipt-banner .receipt-dismiss:hover,
.receipt-banner .receipt-dismiss:focus-visible { background: var(--muted); }

.empty {
  padding: 72px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--ink);
  background: var(--panel);
}
.empty strong,
.empty span { display: block; }
.empty strong {
  color: var(--ink);
  font: 700 20px/1 var(--display);
  text-transform: uppercase;
}
.empty span { margin-top: 8px; font-size: 13px; }

.drawer {
  --drawer-pad-x: 24px;
  position: fixed;
  z-index: 8;
  top: 0;
  right: 0;
  bottom: 0;
  width: max(280px, 61.8vw);
  max-width: calc(100% - 36px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 58px var(--drawer-pad-x) 0;
  background: color-mix(in srgb, var(--panel) 93%, var(--bg-2));
  border-left: 2px solid color-mix(in srgb, var(--ink) 28%, transparent);
  box-shadow:
    -7px 0 0 color-mix(in srgb, var(--ink) 12%, var(--panel)),
    -22px 0 42px #00000038;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  isolation: isolate;
  transform: translateX(calc(100% + 10px));
  transform-origin: right center;
  transition: transform .34s cubic-bezier(.16,1,.3,1), box-shadow .34s ease;
  will-change: transform;
}
.drawer.open { transform: translateX(0); }
.drawer #drawer-content {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 58px);
}
.drawer.open #drawer-content > * {
  animation: none;
}
.drawer.open > button { animation: close-pop .24s ease-out 80ms backwards; }
.drawer > button {
  position: absolute;
  top: 14px;
  right: var(--drawer-pad-x);
  z-index: 5;
  border: 1px solid var(--ink);
  width: 40px;
  height: 40px;
  background: var(--panel);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.drawer > button:hover { background: var(--hot-surface); color: var(--hot-on); border-color: var(--hot); }
.drawer h2 {
  margin: 5px 0 0;
  font: 700 clamp(19px, 2.1vw, 25px)/1.18 var(--display);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.drawer h2:focus-visible {
  outline: 0;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ice) 42%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.drawer .eyebrow {
  margin: 0;
  color: var(--muted);
  font: 500 9px/1.25 var(--mono);
  letter-spacing: .09em;
}

.editor-head {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding-bottom: 15px;
  padding-right: 48px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}
.editor-head.no-thumb { grid-template-columns: minmax(0, 1fr); }
.editor-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 32%, transparent);
  border-radius: 2px;
  background: var(--bg-2);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--ink) 14%, transparent);
}
.editor-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.03) saturate(.84) contrast(1.04) brightness(.94);
  transform: scale(1.025);
  transition: transform .46s cubic-bezier(.16,1,.3,1), filter .28s ease;
}
body.dark .editor-thumb img {
  filter: grayscale(.04) saturate(.7) contrast(1.08) brightness(.78);
}
.drawer.open .editor-thumb img { transform: scale(1); }
.editor-heading {
  min-width: 0;
}
.editor-heading h2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.editor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.editor-meta > span {
  min-width: 0;
  min-height: 20px;
  padding: 4px 7px;
  border: 1px solid var(--soft);
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg-2) 58%, transparent);
  color: var(--muted);
  font: 500 9px/1.2 var(--mono);
  letter-spacing: .05em;
}
.editor-meta > .editor-streamer {
  max-width: 100%;
  border-color: color-mix(in srgb, var(--vis) 54%, var(--ink));
  color: var(--ink);
  letter-spacing: 0;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  margin-top: 0;
  padding: 7px 0;
  border-bottom: 1px solid var(--soft);
}
.editor-draft {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font: 500 10px/1.25 var(--mono);
  overflow-wrap: anywhere;
}
.editor-draft::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.editor-draft.has-draft { color: color-mix(in srgb, var(--vis) 72%, var(--ink)); }
.editor-draft.has-draft::before {
  border-color: var(--vis);
  background: var(--vis);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--vis) 18%, transparent);
}
.drawer a.editor-youtube {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-color: var(--youtube);
  border-radius: 2px;
  background: var(--youtube);
  color: var(--youtube-on);
  font: 700 10px/1 var(--display);
  letter-spacing: .035em;
  text-transform: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}
.drawer a.editor-youtube::before {
  content: "▶";
  margin-right: 7px;
  font-size: 8px;
}
.drawer a.editor-youtube:hover {
  border-color: var(--youtube-hover);
  background: var(--youtube-hover);
  color: var(--youtube-on);
}

.editor-section {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
}
.editor-toolbar + .editor-section {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
}
.editor-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.editor-section-head strong {
  display: inline-flex;
  align-items: center;
  font: 700 14px/1.2 var(--display);
  letter-spacing: .025em;
  min-width: 0;
}
.editor-section-head small {
  min-width: 0;
  color: var(--muted);
  font: 500 9px/1.35 var(--mono);
  text-align: right;
  overflow-wrap: anywhere;
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.streamer-proposal-form {
  display: flex;
  min-height: calc(100vh - 58px);
  flex-direction: column;
}
.streamer-proposal-head { padding-top: 5px; }
.streamer-proposal-intro {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--vis) 48%, var(--ink));
  border-radius: 2px;
  background: color-mix(in srgb, var(--vis-surface) 32%, var(--panel));
  color: var(--ink);
  font: 500 11px/1.55 var(--sans);
  overflow-wrap: anywhere;
}
.streamer-proposal-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
  margin-top: 20px;
}
.streamer-proposal-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}
.streamer-proposal-field.is-wide,
.streamer-proposal-localized { grid-column: 1 / -1; }
.streamer-proposal-localized {
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 2px;
}
.streamer-proposal-localized legend {
  padding: 0 6px;
  color: var(--ink);
  font: 700 11px/1.2 var(--display);
  letter-spacing: .035em;
}
.streamer-proposal-localized > small {
  display: block;
  margin: 0 0 11px;
  color: var(--muted);
  font: 500 10px/1.45 var(--sans);
  overflow-wrap: anywhere;
}
.streamer-proposal-localized > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.streamer-proposal-field > span {
  color: var(--ink);
  font: 700 11px/1.2 var(--display);
  letter-spacing: .035em;
}
.streamer-proposal-field input,
.streamer-proposal-field select,
.streamer-proposal-field textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 55%, transparent);
  border-radius: 2px;
  outline: 0;
  background: color-mix(in srgb, var(--bg) 60%, var(--panel));
  color: var(--ink);
  font: 500 12px/1.4 var(--sans);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.streamer-proposal-field input,
.streamer-proposal-field select { min-height: 44px; }
.streamer-proposal-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-repeat: no-repeat;
  background-size: 5px 5px;
}
.streamer-proposal-field textarea { min-height: 112px; resize: vertical; }
.streamer-proposal-field input::placeholder,
.streamer-proposal-field textarea::placeholder { color: color-mix(in srgb, var(--muted) 76%, transparent); }
.streamer-proposal-field input:focus,
.streamer-proposal-field select:focus,
.streamer-proposal-field textarea:focus {
  border-color: var(--ice);
  background: var(--panel);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ice) 18%, transparent);
}
.streamer-proposal-field input:invalid:not(:placeholder-shown) { border-color: var(--hot); }
.channel-resolve-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.channel-resolve-row button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ice-surface);
  color: var(--ice-on);
  font: 700 10px/1.2 var(--display);
  cursor: pointer;
}
.channel-resolve-row [data-channel-feedback] {
  min-width: 0;
  color: var(--muted);
  font: 500 10px/1.35 var(--sans);
  overflow-wrap: anywhere;
}
.channel-preview {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--vis);
  background: color-mix(in srgb, var(--vis-surface) 36%, var(--panel));
}
.channel-preview.no-avatar { grid-template-columns: minmax(0, 1fr); }
.channel-preview[hidden] { display: none; }
.channel-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.channel-preview > span { display: grid; min-width: 0; gap: 3px; }
.channel-preview strong { font: 700 12px/1.25 var(--display); overflow-wrap: anywhere; }
.channel-preview small,
.channel-preview a { color: var(--muted); font: 500 9px/1.35 var(--mono); overflow-wrap: anywhere; }
.editor-footer.streamer-proposal-footer {
  margin: auto 0 0;
  padding-right: 0;
  padding-left: 0;
}
.streamer-proposal-form[aria-busy="true"] .streamer-proposal-field { opacity: .64; }

.tag-field { margin-top: 16px; }
.tag-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.tag-field-head strong {
  font: 700 11px/1.2 var(--display);
  letter-spacing: .04em;
  min-width: 0;
  overflow-wrap: anywhere;
}
.tag-field-head small {
  min-width: 0;
  color: var(--muted);
  font: 500 9px/1.2 var(--mono);
  overflow-wrap: anywhere;
}
.edit-tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 34px;
}
.edit-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 31px;
  padding: 4px 5px 4px 9px;
  border: 1px solid color-mix(in srgb, var(--ink) 54%, transparent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--bg-2) 48%, transparent);
  color: var(--ink);
  font: 600 11px/1.25 var(--sans);
  box-shadow: none;
}
.edit-tag > span:not(.edit-tag-lock) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.edit-tag .tag-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
.edit-tag .streamer-avatar { flex: 0 0 var(--avatar-size); }
.edit-tag.streamer { border-color: color-mix(in srgb, var(--vis) 62%, var(--ink)); }
.edit-tag.weapon { background: color-mix(in srgb, var(--panel) 88%, var(--ice-surface)); }
.edit-tag.weapon.icon-only { width: 57px; justify-content: space-between; gap: 2px; padding: 3px; }
.edit-tag.weapon.icon-only.locked { width: 43px; }
.edit-tag.weapon.icon-only .tag-icon { width: 25px; height: 25px; }
.edit-tag.map { border-color: var(--ice); background: color-mix(in srgb, var(--ice-surface) 42%, var(--panel)); }
.edit-tag.mode { border-color: var(--hot); background: color-mix(in srgb, var(--hot-surface) 42%, var(--panel)); }
.edit-tag.category { border-color: color-mix(in srgb, var(--xrank) 64%, var(--ink)); background: color-mix(in srgb, var(--xrank-surface) 45%, var(--panel)); }
.edit-tag.xrank {
  border-color: var(--xrank);
  background: color-mix(in srgb, var(--xrank-surface) 72%, var(--panel));
  color: var(--xrank-on);
}
.edit-tag button {
  display: grid;
  flex: 0 0 23px;
  place-items: center;
  width: 23px;
  height: 23px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  color: currentColor;
  font: 700 16px/1 var(--sans);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.edit-tag button:hover { background: var(--hot-surface); color: var(--hot-on); transform: scale(1.05); }
.edit-tag-lock {
  flex: 0 0 auto;
  padding: 0 5px 0 1px;
  color: color-mix(in srgb, currentColor 55%, transparent);
  font-size: 6px;
}
.tag-empty {
  color: var(--muted);
  font: 500 10px/1.3 var(--mono);
}
.tag-composer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  margin-top: 8px;
}
.tag-composer input {
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 55%, transparent);
  border-radius: 2px 0 0 2px;
  outline: 0;
  background: color-mix(in srgb, var(--bg) 60%, var(--panel));
  color: var(--ink);
  font: 500 12px/1.2 var(--sans);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.tag-composer input::placeholder { color: color-mix(in srgb, var(--muted) 76%, transparent); }
.tag-composer input:focus {
  z-index: 1;
  border-color: var(--ice);
  background: var(--panel);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ice) 18%, transparent);
}
.tag-composer > button {
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--ink);
  border-left: 0;
  border-radius: 0 2px 2px 0;
  background: var(--ink);
  color: var(--panel);
  font: 700 20px/1 var(--display);
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.tag-composer > button:hover { background: var(--ice-surface); color: var(--ice-on); }
.tag-composer > button:active { transform: translateY(1px); }
.tag-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 6;
  display: none;
  max-height: 224px;
  padding: 6px;
  overflow: auto;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--panel);
  box-shadow: 5px 6px 0 color-mix(in srgb, var(--ink) 16%, transparent), 0 16px 30px #0000002e;
}
.tag-composer:focus-within .tag-suggestions { display: grid; }
.tag-suggestions button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  font: 500 11px/1.25 var(--sans);
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.tag-suggestions button:hover,
.tag-suggestions button:focus-visible {
  outline: 0;
  background: color-mix(in srgb, var(--ice) 20%, var(--panel));
}
.tag-suggestions .tag-icon { flex: 0 0 20px; width: 20px; height: 20px; }
.tag-suggestions .streamer-avatar { flex: 0 0 var(--avatar-size); }
.tag-suggestions .create-tag { color: color-mix(in srgb, var(--ice) 75%, var(--ink)); }
.tag-suggestions .create-tag > span { font: 700 16px/1 var(--display); }
.tag-suggestions[data-tag-suggestions="weapon"] {
  max-height: min(55vh, 470px);
  padding: 0;
  grid-template-columns: minmax(0, 1fr);
}
.weapon-suggestion-group {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}
.weapon-suggestion-group:last-child { border-bottom: 0; }
.weapon-suggestion-common { grid-template-columns: minmax(0, 1fr); }
.weapon-suggestion-heading {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  background: var(--ice-surface);
  color: var(--ice-on);
  font: 600 11px/1.4 var(--sans);
  overflow-wrap: anywhere;
}
.weapon-suggestion-class {
  position: sticky;
  left: 0;
  display: grid;
  min-height: 38px;
  place-items: center;
  align-self: stretch;
  border-right: 1px solid var(--line);
  background: var(--ice-surface);
}
.weapon-suggestion-class .tag-icon { width: 25px; height: 25px; }
.weapon-suggestion-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  align-content: start;
}
.tag-suggestions .weapon-suggestion-options button {
  display: grid;
  width: auto;
  min-width: 0;
  min-height: 38px;
  place-items: center;
  padding: 3px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.tag-suggestions .weapon-suggestion-options .tag-icon { width: 30px; height: 30px; }
.suggestion-empty {
  padding: 10px;
  color: var(--muted);
  font: 500 10px/1.2 var(--mono);
}
.tag-field.is-locked .tag-composer { opacity: .46; }
.tag-field.is-locked input,
.tag-field.is-locked button { cursor: not-allowed; }

.editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1fr);
  gap: 8px;
  margin: 22px 0 0;
  padding: 12px calc(var(--drawer-pad-x) * .5) max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  background: color-mix(in srgb, var(--panel) 96%, var(--bg-2));
  box-shadow: 0 -4px 0 color-mix(in srgb, var(--ink) 7%, transparent);
}
.editor-footer.vod-editor-footer {
  z-index: 7;
  grid-template-columns: minmax(0, .65fr) minmax(0, .85fr) minmax(0, 1.15fr);
}
.editor-footer button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font: 700 12px/1 var(--display);
  letter-spacing: .04em;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.editor-save-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font: 500 10px/1.35 var(--mono);
}
.editor-undo { background: transparent; color: var(--ink); }
.editor-undo:hover:not(:disabled) { background: color-mix(in srgb, var(--hot) 13%, var(--panel)); }
.editor-undo:disabled { opacity: .38; cursor: default; }
.editor-done {
  background: var(--ink);
  color: var(--panel);
  box-shadow: 5px 6px 0 color-mix(in srgb, var(--xrank) 56%, transparent);
}
.editor-done:hover:not(:disabled) { background: var(--xrank-surface); color: var(--xrank-on); transform: translateY(-2px); }
.editor-done:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.editor-submit {
  background: var(--action-submit-bg);
  color: var(--action-submit-fg);
  box-shadow: 5px 6px 0 color-mix(in srgb, var(--hot) 48%, transparent);
}
.editor-submit:hover:not(:disabled) {
  background: var(--xrank-surface);
  color: var(--xrank-on);
  transform: translateY(-2px);
}
.editor-submit:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.editor-footer button:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }

.quick-xrank,
.quick-exclusion {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--xrank) 54%, var(--ink));
  border-radius: 2px;
  background: color-mix(in srgb, var(--xrank-surface) 72%, var(--panel));
  color: var(--xrank-on);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--xrank) 32%, var(--ink));
  cursor: pointer;
  text-align: left;
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
.quick-exclusion {
  border-color: color-mix(in srgb, var(--hot) 58%, var(--ink));
  background: color-mix(in srgb, var(--hot) 12%, var(--panel));
  color: var(--ink);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--hot) 38%, var(--ink));
}
.quick-xrank-key,
.quick-exclusion-key {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: #0b201a;
  color: var(--xrank);
  font: 700 17px/1 var(--display);
  box-shadow: 0 5px 12px #00000030;
}
.quick-exclusion-key { background: var(--ink); color: var(--hot); }
.quick-xrank-copy,
.quick-exclusion-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  overflow-wrap: anywhere;
}
.quick-xrank-copy strong,
.quick-exclusion-copy strong {
  font: 700 14px/1 var(--display);
  letter-spacing: .02em;
}
.quick-xrank-copy small,
.quick-exclusion-copy small {
  font: 500 9px/1.2 var(--mono);
  letter-spacing: .06em;
  opacity: .68;
}
.quick-xrank:hover:not(:disabled),
.quick-exclusion:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--xrank) 34%, var(--ink));
}
.quick-exclusion:hover:not(:disabled) {
  box-shadow: 0 5px 0 color-mix(in srgb, var(--hot) 42%, var(--ink));
}
.quick-xrank:active:not(:disabled),
.quick-exclusion:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--xrank) 30%, var(--ink));
}
.quick-xrank:focus-visible,
.quick-exclusion:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.quick-xrank:disabled,
.quick-exclusion:disabled { cursor: default; }
.quick-xrank.is-loading,
.quick-exclusion.is-loading { cursor: wait; }
.quick-xrank.is-loading .quick-xrank-key,
.quick-exclusion.is-loading .quick-exclusion-key { animation: quick-xrank-pulse .8s ease-in-out infinite alternate; }
.quick-xrank.is-submitted {
  background: color-mix(in srgb, var(--xrank-surface) 42%, var(--panel));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--xrank) 32%, transparent);
}
.quick-exclusion.is-submitted {
  background: color-mix(in srgb, var(--hot) 7%, var(--panel));
  opacity: .78;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hot) 25%, transparent);
}
.quick-xrank.is-marked {
  background: color-mix(in srgb, var(--xrank-surface) 18%, var(--panel));
  color: var(--ink);
  opacity: .76;
  box-shadow: none;
}
.quick-xrank.is-conflict {
  border-color: color-mix(in srgb, var(--vis) 72%, var(--ink));
  background: color-mix(in srgb, var(--vis-surface) 32%, var(--panel));
  color: var(--ink);
  opacity: .82;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vis) 18%, transparent);
}
.quick-xrank.is-conflict .quick-xrank-key { background: var(--vis-surface); color: var(--vis-on); }

.action-confirm {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding:
    max(clamp(14px, 4vw, 32px), env(safe-area-inset-top))
    max(clamp(14px, 4vw, 32px), env(safe-area-inset-right))
    max(clamp(14px, 4vw, 32px), env(safe-area-inset-bottom))
    max(clamp(14px, 4vw, 32px), env(safe-area-inset-left));
  overflow: auto;
  background: #05080dcc;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.action-confirm[hidden] { display: none; }
.action-confirm-panel {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  width: min(100%, 520px);
  max-width: 100%;
  margin-block: auto;
  padding: clamp(18px, 4vw, 28px);
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--panel);
  color: var(--ink);
}
.action-confirm-key {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--hot-surface);
  color: var(--hot-on);
  font: 700 22px/1 var(--display);
}
.action-confirm-copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 8px;
}
.action-confirm-copy strong {
  font: 700 clamp(17px, 3vw, 21px)/1.15 var(--display);
  letter-spacing: -.02em;
}
.action-confirm-copy p {
  margin: 0;
  color: var(--muted);
  font: 500 13px/1.5 var(--sans);
  overflow-wrap: anywhere;
}
.action-confirm-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.action-confirm-actions button {
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--panel);
  color: var(--ink);
  font: 700 12px/1.2 var(--display);
  cursor: pointer;
}
#action-confirm-accept { background: var(--ink); color: var(--panel); }
.action-confirm-actions button:hover { background: var(--vis-surface); color: var(--vis-on); }
#action-confirm-accept:hover { background: var(--xrank-surface); color: var(--xrank-on); }

@media (max-height: 520px) {
  .action-confirm {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .action-confirm-panel { gap: 10px; padding: 14px; }
  .action-confirm-actions { margin-top: 0; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: calc(100% - 32px);
  min-height: 42px;
  padding: 8px 13px 8px 9px;
  border: 1px solid var(--xrank);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  color: var(--ink);
  box-shadow: 0 18px 44px #00000052;
  backdrop-filter: blur(14px);
  font: 600 12px/1.3 var(--sans);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px) scale(.96);
  transition: opacity .22s ease, transform .32s cubic-bezier(.16,1,.3,1);
}
.toast::before {
  content: "✓";
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: var(--xrank-surface);
  color: var(--xrank-on);
  font: 700 14px/1 var(--display);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.toast.error { border-color: var(--hot); }
.toast.error::before { content: "!"; background: var(--hot-surface); color: var(--hot-on); }

#scrim {
  position: fixed;
  inset: 0;
  z-index: 7;
  background: #05080d99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
#scrim.open {
  opacity: 1;
  pointer-events: auto;
}

:focus-visible {
  outline: 2px solid var(--vis);
  outline-offset: 2px;
}

@keyframes pulse-ring {
  from { opacity: .5; transform: scale(1); }
  to { opacity: 0; transform: scale(2.8); }
}
@keyframes quick-xrank-pulse {
  from { opacity: .55; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes chrome-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes card-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes card-content-rise {
  from { transform: translateY(6px); }
  to { transform: none; }
}
@keyframes drawer-item-in {
  from { opacity: 0; transform: translateX(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes close-pop {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .app { padding-left: 20px; padding-right: 20px; }
  .chrome { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .vod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vod-grid.card { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .top-status span { display: none; }
  .dock { display: grid; grid-template-columns: minmax(0, 1fr); }
  .filter-pills { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #more-filters, #reset { grid-column: span 2; }
  .filter-pills > select,
  .filter-pills > button,
  .filter-pills > .xrank-toggle,
  .date-range,
  .icon-select {
    max-width: none;
    border-left: 0;
    border-top: 1px solid var(--ink);
    text-align: left;
  }
  .icon-select-btn { max-width: none; width: 100%; }
  .date-range { grid-column: span 2; }
  .date-input { width: auto; flex: 1; }
  .xrank-toggle { grid-column: span 2; }
}

@media (max-width: 900px) {
  .topbar > .top-status { display: none; }
}

@media (max-width: 760px) {
  .app { padding-left: 14px; padding-right: 14px; }
  .chrome { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .marks { display: none; }
  .topbar { gap: 8px; }
  .metrics { gap: 0; }
  .metrics div { min-width: 0; padding: 3px 7px; }
  .vod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vod-grid.card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vod-grid:not(.list) .vod-card {
    --deck-rim-top: 0px;
    --deck-rim-right: 0px;
    --deck-rim-bottom: 0px;
    --deck-rim-left: 0px;
    --deck-space-x: 0px;
    --deck-space-y: 0px;
    --depth-x: 0px;
    --depth-y: 0px;
    overflow: hidden;
  }
  .vod-grid:not(.list) .card-platform { padding: 0; }
  .vod-grid:not(.list) .card-platform::before,
  .vod-grid:not(.list) .card-platform::after { display: none; }
  .vod-grid:not(.card):not(.list) .vod-card.tag-dense .card-title {
    min-height: 0;
    -webkit-line-clamp: 1;
  }
  .vod-grid:not(.card):not(.list) .vod-card.tag-dense .tags {
    gap: 3px;
    margin-top: 6px;
  }
  .filter-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-pills > select,
  .filter-pills > .icon-select { grid-column: span 1; }
  .filter-pills > .primary-filter { grid-column: span 1; }
  .filter-pills > #sort,
  .filter-pills > .icon-select:has(> #sort) { grid-column: span 1; }
  .date-range {
    grid-column: span 2;
    gap: 3px;
    padding-right: 6px;
    padding-left: 6px;
  }
  .date-input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    font-size: 10px;
  }
  .date-sep { font-size: 10px; }
  .xrank-toggle {
    grid-column: span 2;
    gap: 5px;
    padding-right: 7px;
    padding-left: 7px;
  }
  .xrank-toggle input { flex: 0 0 auto; margin: 0; }
  .xrank-toggle span {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  #more-filters {
    display: flex;
    position: relative;
    grid-column: span 1;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    padding-right: 26px;
    padding-left: 12px;
    text-align: left;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  #more-filters b { position: absolute; right: 7px; }
  #reset { grid-column: span 1; padding-right: 12px; padding-left: 12px; }
  .filter-pills > .primary-filter:nth-child(-n + 2) { border-top: 0; }
  .filter-pills > .primary-filter:nth-child(even) { border-left: 1px solid var(--ink); }
  .filter-pills > #category,
  .filter-pills > #sort,
  .filter-pills > .icon-select:has(> #category),
  .filter-pills > .icon-select:has(> #sort),
  .filter-pills > .xrank-toggle { border-left: 1px solid var(--ink); }
  .filter-pills > .icon-select:has(> #streamer) > .icon-select-btn { border-radius: 5px 0 0; }
  .filter-pills > .icon-select:has(> #weapon) > .icon-select-btn { border-radius: 0 5px 0 0; }
  .filter-pills > .icon-select:has(> #weapon) > .icon-select-panel,
  .filter-pills > .icon-select:has(> #mode) > .icon-select-panel,
  .filter-pills > .icon-select:has(> #category) > .icon-select-panel,
  .filter-pills > .icon-select:has(> #sort) > .icon-select-panel {
    right: -1px;
    left: auto;
  }
  .filter-pills .icon-select-panel { max-width: calc(100vw - 28px); }
  #more-filters { border-left: 0; border-radius: 0 0 0 5px; }
  #reset { border-left: 1px solid var(--ink); border-radius: 0 0 5px 0; }
  .catalog-progress {
    align-items: center;
    flex-direction: row;
  }
  .catalog-progress > [data-catalog-message] {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .receipt-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .receipt-banner strong { grid-column: 1 / -1; }
  .list .card-body { display: block; padding: 10px 12px 10px 16px; }
  .list .tags { margin-top: 8px; max-height: 24px; overflow: hidden; }
  .list .meta { margin-top: 8px; justify-content: space-between; }
  .topbar > .top-status { display: none; }
  .drawer {
    --drawer-pad-x: 18px;
    padding-top: 58px;
  }
  .editor-head {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    padding-right: 0;
  }
  .drawer h2 { font-size: 18px; }
  .brand { min-width: 0; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .filter-pills > :nth-child(-n + 4) { border-top: 0; }
}

@media (max-width: 760px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }
  .brand {
    grid-row: 1;
    grid-column: 1;
  }
  .top-actions {
    grid-row: 1;
    grid-column: 2;
    margin-left: 0;
  }
  .overview-tools {
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
  }
  .metrics { width: 100%; }
  .metrics div { flex: 1; }
}

/* Fetch health must remain visible on narrow layouts; it is operational state,
   not decorative desktop chrome. */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .topbar > .top-status {
    display: flex;
    flex: 1 0 100%;
    min-height: 32px;
    justify-content: center;
    order: 3;
  }
}

@media (max-width: 760px) {
  .topbar > .top-status { display: none; }
  .catalog-progress[data-state="partial_error"] {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .catalog-progress[data-state="partial_error"] button { margin-left: auto; }
}

@media (min-width: 1101px) {
  .dock {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .chrome { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .topbar { min-height: 0; }
  .brand { grid-template-columns: 40px minmax(0, 1fr); }
  .brand > span:last-child { padding: 6px 8px; }
  .brand small { display: none; }
  .overview-tools { min-height: 30px; }
  .metrics div { min-height: 30px; padding: 2px 5px; }
  .metrics b { font-size: 14px; }
  .metrics span { margin-top: 1px; font-size: 7px; letter-spacing: .05em; }
  .pending { min-width: 30px; padding: 0 5px; }
  .submit-edits { min-width: 104px; padding: 0 8px; }
  .round,
  .lang-toggle { width: 38px; }
  .vod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vod-grid.card { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .vod-grid:not(.list) .card-shell,
  .vod-grid:not(.list) .card-body,
  .vod-grid:not(.list) .card-title,
  .vod-grid:not(.list) .tags,
  .vod-grid:not(.list) .meta { min-width: 0; max-width: 100%; }
  .vod-grid:not(.card):not(.list) .card-body { padding: 9px 8px 10px; }
  .vod-grid:not(.card):not(.list) .card-title { min-height: 32px; font-size: 12px; line-height: 1.3; }
  .vod-grid:not(.card):not(.list) .tags { gap: 3px; margin-top: 7px; margin-bottom: 8px; }
  .vod-grid:not(.card):not(.list) .tag { min-width: 0; min-height: 20px; padding: 2px 4px; font-size: 9px; }
  .vod-grid:not(.card):not(.list) .meta {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 5px 4px;
    padding-top: 6px;
    overflow: visible;
    font-size: 8px;
    letter-spacing: 0;
    white-space: normal;
  }
  .vod-grid:not(.card):not(.list) .meta > .card-streamer {
    grid-column: 1 / -1;
    width: 100%;
  }
  .vod-grid:not(.card):not(.list) .meta > span:nth-child(2) { white-space: nowrap; }
  .vod-grid:not(.card):not(.list) .meta > span:nth-child(3) {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .vod-grid:not(.card):not(.list) .meta > .card-mark { grid-column: 1 / -1; justify-self: end; }
  .vod-grid.card .card-body { padding-right: 7px; padding-left: 9px; }
  .brand b { font-size: 12px; }
  .card-title { min-height: 0; }
  .drawer {
    --drawer-pad-x: 14px;
    width: 100%;
    max-width: 100%;
    padding-top: 56px;
    border-left: 0;
  }
  .drawer h2 {
    font-size: 19px;
    line-height: 1.2;
  }
  .editor-head {
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 12px;
    padding-right: 0;
  }
  .editor-meta { margin-top: 7px; }
  .editor-meta > span { padding: 3px 6px; }
  .editor-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }
  .editor-draft { align-items: flex-start; }
  .drawer a.editor-youtube {
    width: 100%;
    justify-content: center;
    line-height: 1.25;
  }
  .editor-section-head {
    display: grid;
    gap: 4px;
  }
  .editor-section-head small { text-align: left; }
  .streamer-proposal-fields { grid-template-columns: minmax(0, 1fr); }
  .streamer-proposal-field.is-wide,
  .streamer-proposal-localized { grid-column: auto; }
  .streamer-proposal-localized > div { grid-template-columns: minmax(0, 1fr); }
  .quick-xrank, .quick-exclusion { min-height: 58px; }
  .quick-actions { gap: 7px; }
  .tag-suggestions { max-height: 190px; }
  .tag-suggestions[data-tag-suggestions="weapon"] { max-height: 54vh; }
  .tag-suggestions button { min-height: 40px; }
  .editor-footer { grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); }
  .editor-footer.vod-editor-footer {
    grid-template-columns: minmax(0, .65fr) minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 6px;
  }
  .editor-footer button { padding-right: 8px; padding-left: 8px; line-height: 1.2; }
  .editor-footer.vod-editor-footer button { padding-right: 6px; padding-left: 6px; font-size: 10px; }
}

@media (max-width: 400px) {
  .quick-actions { grid-template-columns: minmax(0, 1fr); }
  .quick-xrank,
  .quick-exclusion { min-height: 56px; }
  .action-confirm-panel { grid-template-columns: minmax(0, 1fr); }
  .action-confirm-key { width: 38px; height: 38px; }
  .action-confirm-actions { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .editor-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-footer.vod-editor-footer {
    grid-template-columns: minmax(0, .65fr) minmax(0, .85fr) minmax(0, 1.15fr);
  }
}

@media (max-width: 360px) {
  .topbar:has(.top-actions.has-pending) .brand,
  .topbar:has(.top-actions.is-submitting) .brand { grid-template-columns: 40px; }
  .topbar:has(.top-actions.has-pending) .brand > span:last-child,
  .topbar:has(.top-actions.is-submitting) .brand > span:last-child { display: none; }
  html[lang="ja"] .view-toggle { font-size: 8px; letter-spacing: -.08em; }
  html[lang="ja"] .xrank-toggle { gap: 4px; padding-right: 7px; padding-left: 7px; font-size: 9px; letter-spacing: 0; }
}

/* A bounded collection of attributed chapters; browsing stays independent. */
.learning-clips { margin: 4px 0 18px; padding: 12px; border: 1px solid var(--ink); background: var(--panel); min-width: 0; }
.learning-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; min-width: 0; }
.learning-heading h2 { margin: 0; font: 700 16px/1.3 var(--display); }
.learning-intro { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.learning-status { margin: 10px 0 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.learning-heading button, #learning-retry { flex-shrink: 0; min-height: 32px; padding: 5px 10px; border: 1px solid var(--ink); background: var(--vis-surface); color: var(--vis-on); font: 700 12px/1.3 var(--sans); cursor: pointer; }
#learning-retry { margin-top: 8px; }
.learning-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, calc((100% - 20px) / 3)); gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; margin-top: 12px; padding-bottom: 4px; }
.learning-card { display: flex; flex-direction: column; min-width: 0; padding: 10px; border: 1px solid var(--ink); background: var(--bg-2); scroll-snap-align: start; }
.learning-card h3 { margin: 4px 0 0; font: 700 14px/1.4 var(--sans); overflow-wrap: anywhere; }
.learning-author { margin: 0; color: var(--muted); font: 600 11px/1.3 var(--sans); overflow-wrap: anywhere; }
.learning-summary { margin: 8px 0; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.learning-source { margin: auto 0 10px; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.learning-source a { color: var(--muted); text-underline-offset: 2px; }
.learning-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.learning-actions a, .learning-actions button { display: inline-flex; justify-content: center; align-items: center; min-height: 32px; max-width: 100%; padding: 6px 8px; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); background: var(--panel); font: 700 11px/1.3 var(--sans); text-decoration: none; overflow-wrap: anywhere; cursor: pointer; }
.learning-actions a { background: var(--ice-surface); color: var(--ice-on); }
.learning-actions a:hover, .learning-actions button:hover { background: var(--vis-surface); color: var(--vis-on); }
@media(max-width:760px) {
  .learning-clips { padding: 10px; margin-bottom: 14px; }
  .learning-list { grid-auto-columns: min(290px, 92%); }
}

@media (max-width: 339px) {
  .vod-grid:not(.list) { grid-template-columns: minmax(0, 1fr); }
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 14px #00000020;
  }
  .brand:hover::after {
    opacity: 1;
    transform: scaleY(1);
  }
  .filter-pills > select:hover,
  .date-range:hover,
  .xrank-toggle:hover {
    background: color-mix(in srgb, var(--ice) 9%, transparent);
    box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--ice) 78%, transparent);
  }
  .vod-card:hover,
  .vod-card:focus-visible {
    --depth-x: 6px;
    --depth-y: 7px;
    z-index: 2;
  }
  .vod-card:hover .thumb img,
  .vod-card:focus-visible .thumb img {
    opacity: 1;
    filter: grayscale(.01) saturate(.94) contrast(1.06) brightness(.98);
    transform: scale(1.012);
  }
  body.dark .vod-card:hover .thumb img,
  body.dark .vod-card:focus-visible .thumb img {
    opacity: .96;
    filter: grayscale(.02) saturate(.78) contrast(1.08) brightness(.84);
  }
  .vod-card:hover .card-edit-cue,
  .vod-card:focus-visible .card-edit-cue {
    transform: none;
    background: var(--vis-surface);
    color: var(--vis-on);
  }
  .card .vod-card:hover,
  .card .vod-card:focus-visible {
    --depth-x: 4px;
    --depth-y: 5px;
  }
  .list .vod-card:hover,
  .list .vod-card:focus-visible {
    --depth-x: 2px;
    --depth-y: 2px;
  }
}

.vod-card:active,
.vod-card:hover:active {
  --depth-x: 2px;
  --depth-y: 2px;
}
.vod-card:active .card-platform::before,
.vod-card:hover:active .card-platform::before,
.vod-card:active .card-platform::after,
.vod-card:hover:active .card-platform::after {
  transition-duration: 70ms;
}
.vod-card:active .thumb img,
.vod-card:hover:active .thumb img {
  opacity: .98;
  filter: grayscale(.03) saturate(.84) contrast(1.03) brightness(.93);
  transform: scale(1.006);
  transition-duration: 70ms;
}
body.dark .vod-card:active .thumb img,
body.dark .vod-card:hover:active .thumb img {
  opacity: .92;
  filter: grayscale(.04) saturate(.7) contrast(1.07) brightness(.7);
}
.list .vod-card:active,
.list .vod-card:hover:active {
  --depth-x: 1px;
  --depth-y: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .vod-card:hover,
  .vod-card:hover .card-shell,
  .vod-card:hover .thumb img,
  .vod-card:hover .card-edit-cue { transform: none; }
}

/* Default flat-outline visual. The body class is fixed in index.html. */
body.flat-outline-preview {
  --flat-outline: #101820;
}

body.flat-outline-preview .chrome,
body.flat-outline-preview .brand,
body.flat-outline-preview .top-status,
body.flat-outline-preview .overview-tools,
body.flat-outline-preview .top-actions,
body.flat-outline-preview .dock,
body.flat-outline-preview .compact-search,
body.flat-outline-preview .compact-view,
body.flat-outline-preview .filter-pills > select,
body.flat-outline-preview .filter-pills > button,
body.flat-outline-preview .filter-pills > .xrank-toggle,
body.flat-outline-preview .date-range,
body.flat-outline-preview .icon-select-btn,
body.flat-outline-preview .icon-select-panel,
body.flat-outline-preview .catalog-progress,
body.flat-outline-preview .tag,
body.flat-outline-preview .card-mark,
body.flat-outline-preview .drawer,
body.flat-outline-preview .editor-thumb,
body.flat-outline-preview .tag-suggestions,
body.flat-outline-preview .editor-footer,
body.flat-outline-preview .editor-footer button,
body.flat-outline-preview .quick-xrank,
body.flat-outline-preview .quick-exclusion,
body.flat-outline-preview .quick-xrank-key,
body.flat-outline-preview .quick-exclusion-key,
body.flat-outline-preview .receipt-banner,
body.flat-outline-preview .toast {
  box-shadow: none !important;
}

body.flat-outline-preview .brand::after,
body.flat-outline-preview .card-platform::before,
body.flat-outline-preview .card-platform::after,
body.flat-outline-preview .card-shell::after {
  display: none;
}

body.flat-outline-preview .vod-card,
body.flat-outline-preview .card .vod-card,
body.flat-outline-preview .list .vod-card {
  --deck-rim-top: 0px;
  --deck-rim-right: 0px;
  --deck-rim-bottom: 0px;
  --deck-rim-left: 0px;
  --deck-space-x: 0px;
  --deck-space-y: 0px;
  --depth-x: 0px;
  --depth-y: 0px;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--flat-outline);
  border-radius: 0;
  background: var(--deck-top);
}

body.flat-outline-preview .card-platform,
body.flat-outline-preview .vod-grid:not(.list) .card-platform {
  padding: 0;
  border: 0;
  background: transparent;
}

body.flat-outline-preview .card-shell {
  border-radius: 0;
  background: var(--deck-top);
}

body.flat-outline-preview .thumb {
  border-bottom: 2px solid var(--flat-outline);
}

body.flat-outline-preview .list .vod-card {
  border-width: 1px;
}

body.flat-outline-preview .list .thumb {
  border: 0;
}

body.flat-outline-preview .tag,
body.flat-outline-preview .card-mark,
body.flat-outline-preview .vod-card.xrank .thumb::before,
body.flat-outline-preview .edited-mark {
  border: 1px solid var(--flat-outline);
  box-shadow: none;
}

body.flat-outline-preview .card-mark:hover,
body.flat-outline-preview .card-mark:active,
body.flat-outline-preview .editor-done:hover:not(:disabled),
body.flat-outline-preview .editor-submit:hover:not(:disabled),
body.flat-outline-preview .editor-footer button:active:not(:disabled),
body.flat-outline-preview .quick-xrank:hover:not(:disabled),
body.flat-outline-preview .quick-exclusion:hover:not(:disabled),
body.flat-outline-preview .quick-xrank:active:not(:disabled),
body.flat-outline-preview .quick-exclusion:active:not(:disabled) {
  box-shadow: none;
  transform: none;
}

body.flat-outline-preview :is(
  .brand:hover,
  .submit-edits:active,
  .lang-toggle:active,
  .round:active,
  .tag-composer > button:active
) {
  transform: none;
}

body.dark.flat-outline-preview .round,
body.dark.flat-outline-preview .round:active {
  transform: rotate(180deg);
}

body.flat-outline-preview .dock,
body.flat-outline-preview .catalog-progress,
body.flat-outline-preview .icon-select-panel,
body.flat-outline-preview .tag-suggestions,
body.flat-outline-preview .receipt-banner,
body.flat-outline-preview .toast {
  border-color: var(--flat-outline);
}

body.flat-outline-preview .drawer {
  border-left-color: var(--flat-outline);
}

body.flat-outline-preview .compact-search:focus-within {
  box-shadow: inset 0 -2px 0 var(--ice) !important;
}

body.flat-outline-preview :focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}

/* Public weapon suggestions remain visually distinct from confirmed tags. */
.community-weapon{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px;max-width:100%;min-width:0;padding:3px 5px;border:1px dashed currentColor;border-radius:2px;color:inherit}
.community-weapon-label{font:600 10px/1.3 var(--sans);overflow-wrap:anywhere;min-width:0}
.community-weapon .tag{margin:0}
.community-weapon-add{max-width:100%;padding:4px 6px;border:1px solid var(--flat-outline,#101820);border-radius:2px;background:var(--ice-surface);color:var(--ice-on);font:700 11px/1.3 var(--sans);text-align:left;overflow-wrap:anywhere;cursor:pointer}
.community-weapon-add:hover{background:var(--ice);color:#101820}
.community-weapon-detail:empty{display:none}
.community-weapon-detail{margin:7px 0}
.weapon-fuzzy-candidates{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px;max-width:100%;min-width:0;padding:3px 5px;border:1px dotted currentColor;border-radius:2px;color:inherit}
.weapon-fuzzy-label{font:600 10px/1.3 var(--sans);overflow-wrap:anywhere;min-width:0}
.weapon-fuzzy-candidates .tag{margin:0}
.weapon-fuzzy-match{display:flex;max-width:100%;min-width:0;margin:6px 0}
.list .card-body:has(.weapon-fuzzy-match){row-gap:3px}
.list .card-body:has(.weapon-fuzzy-match) .card-title{grid-column:1;grid-row:1 / span 2}
.list .card-body:has(.weapon-fuzzy-match) .tags{grid-column:2;grid-row:1}
.list .weapon-fuzzy-match{grid-column:2;grid-row:2}
.list .card-body:has(.weapon-fuzzy-match) .meta{grid-column:3;grid-row:1 / span 2}
.weapon-fuzzy-detail{margin:7px 0}
.weapon-fuzzy-detail:empty{display:none}
.filter-pills > .weapon-fuzzy-toggle{white-space:normal;line-height:1.3;min-width:0}
.weapon-fuzzy-toggle span{overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
@media(max-width:760px){.filter-pills > .weapon-fuzzy-toggle{grid-column:span 2}.weapon-fuzzy-toggle span{overflow:visible}}
.community-weapon-form{min-width:0}
.community-weapon-intro{font-size:13px;line-height:1.6;overflow-wrap:anywhere;margin:12px 0}
.community-weapon-search{display:grid;gap:6px;font-size:12px;font-weight:700}
.community-weapon-search input{width:100%;min-width:0;padding:10px;border:1px solid var(--ink);border-radius:0;background:var(--panel);color:var(--ink);font:inherit}
.community-weapon-picker{max-height:min(46vh,440px);overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);margin:12px 0}
.community-weapon-group{min-width:0}
.community-weapon-group h3{margin:0;padding:6px 8px;background:var(--bg-2);font-size:11px;border-bottom:1px solid var(--line)}
.community-weapon-common h3{background:var(--ice-surface);color:var(--ice-on)}
.community-weapon-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));min-width:0}
.community-weapon-options button{display:grid;place-items:center;min-width:0;min-height:44px;padding:5px;background:var(--panel);color:var(--ink);border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;font:600 10px/1.2 var(--sans);overflow-wrap:anywhere;cursor:pointer}
.community-weapon-options button[aria-pressed="true"]{background:var(--ice-surface);color:var(--ice-on);outline:2px solid var(--ice-on);outline-offset:-2px}
.community-weapon-options button:hover{background:var(--ice-surface);color:var(--ice-on)}
.community-weapon-options .tag-icon{width:30px;height:30px}
.community-weapon-selection{min-height:2.5em;margin:8px 0;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.community-weapon-footer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:8px;padding:10px 0}
.community-weapon-footer button{min-width:0;white-space:normal;overflow-wrap:anywhere}
.community-full-editor{display:block;max-width:100%;margin:12px 0 0;padding:6px 0;border:0;background:transparent;color:var(--ink);font:600 12px/1.4 var(--sans);text-align:left;text-decoration:underline;overflow-wrap:anywhere;cursor:pointer}
/* Rotations share the overview toolbar; only the open panel occupies a row. */
#schedule-toggle{display:flex;align-items:center;justify-content:center;gap:6px;padding:0 10px;border:1px solid var(--ink);border-left:0;background:var(--panel);color:var(--ink);font:700 12px/1 var(--display);white-space:nowrap;cursor:pointer;flex-shrink:0}
#schedule-toggle:hover{background:var(--ice-surface);color:var(--ice-on)}
.schedule-icon{font-size:16px}
.mode-map-group{display:flex;align-items:flex-start;gap:4px;flex-basis:100%;min-width:0;padding-top:3px;border-top:1px solid rgba(0,0,0,.2)}
.mode-map-group>.tag.mode{flex-shrink:0;max-width:45%}.mode-map-stages,.mode-map-selected{display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}
.mode-map-stages>.tag,.mode-map-selected>.tag{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.mode-map-editor-groups{display:grid;gap:10px}.mode-map-editor-group,.mode-map-recovery{min-width:0;border:1px solid var(--line);padding:10px}
.mode-map-editor-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}.mode-map-remove{border:1px solid var(--ink);background:var(--panel);color:var(--ink);min-width:32px;min-height:32px;cursor:pointer}
.mode-map-picker{margin-top:8px}.mode-map-picker summary{font-size:12px;font-weight:700;cursor:pointer;min-height:28px}.mode-map-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;max-height:230px;overflow:auto;overscroll-behavior:contain}
.mode-map-options label{display:flex;align-items:center;gap:6px;padding:5px;min-width:0;font-size:12px;cursor:pointer;overflow-wrap:anywhere}.mode-map-options input{flex-shrink:0;accent-color:var(--ink)}
.mode-map-add{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:10px}.mode-map-add select,.mode-map-add button{min-width:0;width:100%;min-height:36px;border:1px solid var(--ink);border-radius:0;background:var(--panel);color:var(--ink);font:inherit;font-size:12px;padding:6px}.mode-map-add button{grid-column:1/-1;background:var(--ice-surface);cursor:pointer;overflow-wrap:anywhere}
.mode-map-recovery{margin-bottom:10px}.mode-map-recovery strong{font-size:12px}.mode-map-recovery ul{font-size:12px;line-height:1.5;padding-left:18px;overflow-wrap:anywhere}.mode-map-notice{font-size:12px;line-height:1.5;overflow-wrap:anywhere;margin:6px 0;color:var(--ink);border-left:3px solid var(--ink);padding-left:8px}.mode-map-recovery button{max-width:100%;min-height:36px;border:1px solid var(--ink);border-radius:0;padding:6px;background:var(--panel);color:var(--ink);font:inherit;font-size:12px;overflow-wrap:anywhere;cursor:pointer}
@media(max-width:360px){.mode-map-options,.mode-map-add{grid-template-columns:minmax(0,1fr)}.mode-map-group{flex-wrap:wrap}.mode-map-group>.tag.mode{max-width:100%}}
#schedule-toggle[aria-expanded="true"]{background:#d8ff3e;color:#101820}
.schedule-chevron{transition:transform .15s}#schedule-toggle[aria-expanded="true"] .schedule-chevron{transform:rotate(180deg)}
.schedule-hint{font-size:11px;overflow-wrap:anywhere;margin:0 0 7px}.schedule-panel{padding:10px;margin-bottom:10px;border:1px solid var(--line);background:var(--panel);color:var(--ink);max-height:65vh;overflow:auto;overscroll-behavior:contain}
.schedule-panel[hidden]{display:none}.schedule-date{font-size:11px;margin:0 0 7px;overflow-wrap:anywhere}
.schedule-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:7px}
.schedule-slot{min-width:0;border:1px solid color-mix(in srgb,var(--ink) 25%,transparent);padding:8px;overflow-wrap:anywhere}
.schedule-slot[data-schedule-status="active"]{border:2px solid #52c4b5;padding:7px}.schedule-slot-heading{display:flex;justify-content:space-between;gap:6px;align-items:center;font-size:12px;line-height:1.2}.schedule-slot-heading>span{font-size:10px;white-space:nowrap}.schedule-slot[data-schedule-status="active"] .schedule-slot-heading>span{background:#52c4b5;color:#101820;padding:2px 4px;font-weight:700}
.schedule-kinds{margin-top:5px}.schedule-kind+.schedule-kind{border-top:1px solid color-mix(in srgb,var(--ink) 24%,transparent);margin-top:7px;padding-top:7px}.schedule-rule{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 6px;font-size:11px;line-height:1.2;margin:0 0 5px}.schedule-rule>span{display:flex;align-items:center;gap:3px}.schedule-rule img{width:16px;height:16px}.schedule-event{margin:0 0 5px;font-size:11px;line-height:1.25}
.schedule-maps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.schedule-map{position:relative;padding:0;min-width:0;overflow:hidden;border:1px solid color-mix(in srgb,var(--ink) 30%,transparent);background:var(--bg-2);color:#fff;font:inherit;cursor:pointer;text-align:left}.schedule-map img{display:block;width:100%;height:clamp(64px,18vw,72px);object-fit:cover}.schedule-map>span:last-child{position:absolute;left:0;right:0;bottom:0;display:block;padding:12px 5px 4px;background:linear-gradient(transparent,rgba(0,0,0,.88));color:#fff;font-size:10px;font-weight:700;line-height:1.15;overflow-wrap:anywhere;text-shadow:0 1px 2px #000}.schedule-map:hover{outline:2px solid #52c4b5;outline-offset:1px}.schedule-map:focus-visible,#schedule-toggle:focus-visible{outline:3px solid #52c4b5;outline-offset:3px}.schedule-image-fallback{display:flex;align-items:center;justify-content:center;height:clamp(64px,18vw,72px);font-size:10px;padding:5px;background:var(--bg-2)}
@media(max-width:760px){
  .overview-tools{padding-right:126px}
  #schedule-toggle{position:absolute;top:0;bottom:0;right:84px;width:42px;padding:0;gap:2px}
  #schedule-toggle .schedule-label{display:none}
  .schedule-chevron{font-size:10px}
  .schedule-panel{padding:7px}
  .schedule-grid{grid-template-columns:1fr}
}
