@font-face {
  font-family: DTMBody;
  src: url('../../save-editor/fonts/8bitoperator_jve_v2_01.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: DTMBold;
  src: url('../../save-editor/fonts/8bitOperatorPlus-Bold.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: DTMMono;
  src: url('../../save-editor/fonts/PixelOperatorMono.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bg: #071f1a;
  --panel: rgba(7, 34, 28, .95);
  --panel-strong: #0b2c24;
  --panel-raised: #10382e;
  --line: #9ccbb6;
  --line-soft: #3f6b5b;
  --line-faint: #294d41;
  --text: #f8fff9;
  --dim: #adc8bc;
  --muted: #78978a;
  --lamp: #d9e53d;
  --mint: #75d2aa;
  --neon: #6dff78;
  --red: #ff6576;
  --cozy: #dfe54a;
  --dumpy: #72d9b0;
  --lazy: #6dff78;
  --object-column: 24%;
  --team-count: 3;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: DTMBody, monospace;
  -webkit-font-smoothing: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url('../../assets/images/sprite-compare/border-ch2-wallpaper.png') center/cover no-repeat;
  filter: brightness(.9) saturate(1.02);
  transform: scale(1.002);
  transition: filter .25s ease;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(1, 18, 14, .25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

html.wallpaper-dim body::before {
  filter: brightness(.48) saturate(.78);
}

html.wallpaper-dim body::after {
  opacity: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

* {
  scrollbar-color: #77ac94 #09261f;
  scrollbar-width: thin;
}

.wrap {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 24px 16px 76px;
}

.box {
  border: 3px solid var(--line);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(4, 24, 19, .94), 0 9px 26px rgba(0, 0, 0, .4);
  padding: 16px 18px;
}

.box + .box,
.box + .coverage-strip,
.coverage-strip + .table-status,
.table-status + .table-shell {
  margin-top: 15px;
}

.hero {
  display: flex;
  min-height: 98px;
  align-items: center;
  gap: 16px;
  border-color: #c5decf;
}

.hero-copy {
  min-width: 0;
}

.soul,
.search-icon {
  display: block;
  flex: 0 0 auto;
  background: var(--lamp);
  image-rendering: pixelated;
  -webkit-mask: url('../../save-editor/game-sprites/spr_heart_0.png') center/contain no-repeat;
  mask: url('../../save-editor/game-sprites/spr_heart_0.png') center/contain no-repeat;
}

.soul {
  width: 34px;
  height: 32px;
  filter: drop-shadow(0 0 8px rgba(217, 229, 61, .72));
}

h1 {
  margin: 0;
  font-size: 40px;
  font-weight: normal;
  line-height: 1;
  overflow-wrap: anywhere;
  text-shadow: 3px 3px 0 #174438;
}

.sub {
  margin-top: 8px;
  color: var(--mint);
  font-size: 18px;
}

.sub b {
  color: var(--dim);
  font-weight: normal;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  color: var(--lamp);
  font-family: DTMBold, monospace;
  font-size: 14px;
  text-transform: uppercase;
}

.wallpaper-toggle {
  min-height: 42px;
  margin-left: auto;
  border: 2px solid var(--lamp);
  background: #0a2a22;
  color: var(--lamp);
  padding: 7px 13px;
  font-family: DTMBold, monospace;
  font-size: 13px;
}

.wallpaper-toggle:hover,
.wallpaper-toggle:focus-visible {
  background: var(--lamp);
  color: #09221c;
  outline: none;
}

.wallpaper-toggle[aria-pressed="true"] {
  border-color: var(--mint);
  color: var(--mint);
}

.game-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.game-switch .label {
  margin-right: 3px;
  color: var(--dim);
  font-size: 17px;
}

.game-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 3px solid #4f7467;
  background: rgba(5, 24, 19, .84);
  padding: 6px 12px;
  font-family: DTMBold, monospace;
  font-size: 16px;
  filter: saturate(.55);
  opacity: .52;
}

.game-link:hover,
.game-link:focus-visible {
  border-color: currentColor;
  filter: none;
  opacity: .84;
  outline: none;
}

.game-link.deltarune {
  border-color: #65786f;
  color: #fff;
}

.game-link.undertale {
  border-color: #704c52;
  background: rgba(31, 8, 12, .72);
  color: #ff5b6d;
}

.game-link.combined {
  gap: 7px;
  border-color: transparent;
  border-image: linear-gradient(90deg, #58dbe7, #ff626a) 1;
  background: linear-gradient(90deg, rgba(20, 85, 91, .3), rgba(82, 18, 23, .32));
  color: #fff;
}

.game-link.combined::before {
  content: "";
  width: 14px;
  height: 13px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, #58dbe7 0 50%, #ff626a 50% 100%);
  -webkit-mask: url('../../save-editor/game-sprites/spr_heart_0.png') center/contain no-repeat;
  mask: url('../../save-editor/game-sprites/spr_heart_0.png') center/contain no-repeat;
}

.game-link.voices {
  border-color: #6f683b;
  background: rgba(30, 27, 5, .72);
  color: #ffe14d;
}

.game-link.sprites {
  border-color: #3e7045;
  background: rgba(5, 32, 10, .76);
  color: var(--neon);
  text-shadow: 0 0 8px rgba(109, 255, 120, .52);
}

.game-link.current {
  filter: none;
  opacity: 1;
}

.game-link.sprites.current {
  border-color: var(--neon);
  background: #0b4215;
  box-shadow: 0 0 17px rgba(109, 255, 120, .42);
}

.workspace-controls {
  padding-top: 18px;
  padding-bottom: 18px;
}

.chapter-pick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.chapter-pick label {
  color: var(--dim);
  font-size: 17px;
}

.chapter-pick select {
  width: min(100%, 260px);
  min-width: 220px;
  min-height: 50px;
  font-family: DTMBold, monospace;
  font-size: 18px;
}

.control-row {
  display: block;
}

.filter-label {
  color: var(--lamp);
  font-family: DTMBold, monospace;
  font-size: 14px;
  text-transform: uppercase;
}

select,
.search-field {
  min-height: 50px;
  border: 2px solid #7ca392;
  background: #061f19;
}

select {
  width: 100%;
  padding: 6px 34px 6px 10px;
}

.search-field {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 0 10px;
}

.search-field:focus-within,
select:focus-visible {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(117, 210, 170, .2);
  outline: none;
}

.search-icon {
  width: 18px;
  height: 17px;
  margin-right: 10px;
}

.search-field input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 0;
  background: transparent;
  font-size: 19px;
  outline: 0;
}

.search-field input::placeholder {
  color: #78958a;
}

.search-field input::-webkit-search-cancel-button {
  display: none;
}

.clear,
.dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 28px;
  line-height: 1;
  padding: 0;
  text-align: center;
}

.clear:hover,
.dialog-close:hover,
.clear:focus-visible,
.dialog-close:focus-visible {
  color: var(--red);
  outline: 1px solid currentColor;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.filter-label {
  margin-right: 2px;
}

.filter-segments {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0;
}

.filter-button,
.reset-filters {
  min-height: 38px;
  border: 2px solid #547b6c;
  background: #0a2922;
  color: var(--dim);
  padding: 6px 10px;
  font-family: DTMBold, monospace;
  font-size: 13px;
}

.filter-button + .filter-button {
  margin-left: -2px;
}

.filter-button span {
  display: inline-flex;
  min-width: 25px;
  justify-content: center;
  margin-left: 5px;
  background: #143c32;
  color: #dce8e1;
  padding: 2px 5px;
  font-family: DTMMono, monospace;
  font-size: 12px;
}

.filter-button.team-filter {
  border-color: #547b6c;
  color: #82978e;
}

.filter-button.team-filter:hover,
.filter-button.team-filter:focus-visible {
  border-color: var(--team-color);
  color: var(--team-color);
}

.filter-button:hover,
.filter-button:focus-visible {
  position: relative;
  z-index: 1;
  border-color: var(--mint);
  color: var(--text);
  outline: none;
}

.filter-button.current {
  position: relative;
  z-index: 2;
  border-color: var(--lamp);
  background: #364016;
  color: var(--lamp);
}

.filter-button.team-filter.current {
  border-color: var(--team-color);
  background: #153e33;
  color: var(--team-color);
}

.filter-button.current span {
  background: #202b0c;
  color: var(--lamp);
}

.filter-button.team-filter.current span {
  color: var(--team-color);
}

.reset-filters {
  margin-left: auto;
  border-color: #6f837a;
  background: transparent;
  color: var(--dim);
}

.reset-filters:hover,
.reset-filters:focus-visible {
  border-color: var(--text);
  color: var(--text);
  outline: none;
}

.reset-filters:disabled {
  border-color: #355447;
  color: #5e7b6e;
  opacity: .58;
}

.coverage-strip {
  display: grid;
  grid-template-columns: repeat(var(--team-count), minmax(0, 1fr));
  border: 3px solid var(--line);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(4, 24, 19, .94), 0 8px 24px rgba(0, 0, 0, .36);
}

.team-coverage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-rows: auto 5px;
  align-items: center;
  gap: 7px 12px;
  min-height: 82px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  background: transparent;
  padding: 13px 16px 12px;
  text-align: left;
}

.team-coverage:last-child {
  border-right: 0;
}

.team-coverage:hover,
.team-coverage:focus-visible {
  background: rgba(27, 74, 60, .48);
  outline: 2px solid var(--team-color);
  outline-offset: -2px;
}

.team-coverage.selected {
  background: rgba(31, 78, 63, .68);
  box-shadow: inset 0 -3px 0 var(--team-color);
}

.team-cozy-inn { --team-color: var(--cozy); }
.team-dumpy-cats { --team-color: var(--dumpy); }
.team-lazy-desman { --team-color: var(--lazy); }

.team-coverage-name,
.team-header > span,
.preview-team h2 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--team-color);
  font-family: DTMBold, monospace;
}

.team-coverage-count {
  color: var(--dim);
  font-family: DTMMono, monospace;
  font-size: 14px;
}

.team-coverage-count b {
  color: var(--text);
  font-weight: normal;
}

.team-coverage-percent {
  color: var(--team-color);
  font-family: DTMBold, monospace;
  font-size: 14px;
}

.coverage-meter {
  grid-column: 1 / -1;
  height: 5px;
  background: #183d32;
}

.coverage-meter span {
  display: block;
  height: 100%;
  background: var(--team-color);
  box-shadow: 0 0 7px var(--team-color);
}

.table-status {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #527a6b;
  background: rgba(5, 28, 23, .9);
  padding: 8px 12px;
  color: var(--dim);
  font-size: 16px;
}

.table-status b {
  color: var(--lamp);
  font-weight: normal;
}

.table-status-note {
  color: var(--mint);
  font-family: DTMMono, monospace;
  font-size: 13px;
  text-align: right;
  text-transform: uppercase;
}

.table-shell {
  border: 3px solid var(--line);
  background: rgba(4, 27, 22, .97);
  box-shadow: 0 0 0 3px rgba(4, 24, 19, .94), 0 11px 30px rgba(0, 0, 0, .48);
}

.table-scroll {
  max-height: min(74vh, 920px);
  overflow: auto;
  overscroll-behavior: contain;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

th,
td {
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px;
  vertical-align: top;
}

th:last-child,
td:last-child {
  border-right: 0;
}

tbody tr:last-child > * {
  border-bottom: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 68px;
  background: #123c31;
  color: var(--lamp);
  font-family: DTMBold, monospace;
  text-align: left;
}

.object-heading,
.object-cell {
  width: var(--object-column);
}

.object-heading {
  left: 0;
  z-index: 8;
  vertical-align: middle;
}

.team-header {
  width: calc((100% - var(--object-column)) / var(--team-count));
}

.team-header > span {
  font-size: 16px;
}

.team-header small {
  display: block;
  margin-top: 6px;
  color: var(--dim);
  font-family: DTMMono, monospace;
  font-size: 12px;
  font-weight: normal;
}

.object-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #092820;
}

tbody tr:hover > td {
  background-color: rgba(18, 60, 49, .36);
}

tbody tr:hover > .object-cell {
  background: #113a30;
}

.sprite-id {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: DTMMono, monospace;
  font-size: 15px;
  font-weight: normal;
  line-height: 1.38;
}

.resource-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.coverage-badge,
.frame-badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border: 1px solid #52796a;
  background: #102f27;
  padding: 2px 6px;
  font-family: DTMBold, monospace;
  font-size: 11px;
}

.coverage-badge.full {
  border-color: #4d8a63;
  color: var(--neon);
}

.coverage-badge.partial {
  border-color: #887d36;
  color: var(--lamp);
}

.frame-badge {
  border-color: #4c806b;
  color: var(--mint);
}

.team-cell {
  background-color: rgba(4, 29, 23, .5);
}

.sprite-viewer {
  min-width: 0;
}

.sprite-open,
.modal-stage {
  background-color: #173e34;
  background-image:
    linear-gradient(45deg, #285347 25%, transparent 25%),
    linear-gradient(-45deg, #285347 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #285347 75%),
    linear-gradient(-45deg, transparent 75%, #285347 75%);
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-size: 18px 18px;
}

.sprite-open {
  position: relative;
  display: block;
  width: 100%;
  height: 196px;
  overflow: hidden;
  border: 2px solid #547b6c;
  padding: 9px;
}

.sprite-open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid var(--team-color);
  pointer-events: none;
}

.sprite-open:hover,
.sprite-open:focus-visible {
  border-color: var(--team-color);
  outline: 2px solid var(--team-color);
  outline-offset: -2px;
}

.sprite-open .sprite-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.sprite-open canvas.sprite-media {
  display: block;
  object-fit: contain;
}

canvas.sprite-media.media-error {
  opacity: .25;
}

.open-cue {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--team-color);
  background: rgba(4, 25, 20, .9);
  color: var(--team-color);
  font-family: DTMBold, monospace;
  opacity: .2;
}

.sprite-open:hover .open-cue,
.sprite-open:focus-visible .open-cue {
  opacity: 1;
}

.sprite-spec,
.modal-spec {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-right: 1px solid var(--line-faint);
  border-bottom: 1px solid var(--line-faint);
  border-left: 1px solid var(--line-faint);
  background: #0a2922;
  padding: 5px 8px;
  color: var(--dim);
  font-family: DTMMono, monospace;
  font-size: 12px;
}

.sprite-footer,
.modal-controls {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px 34px;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  margin-top: 6px;
}

.frame-button,
.download {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #5e8174;
  background: #0b2b23;
  color: var(--dim);
  font-family: DTMBold, monospace;
  font-size: 21px;
}

.frame-button:hover,
.frame-button:focus-visible,
.download:hover,
.download:focus-visible {
  border-color: var(--team-color);
  color: var(--team-color);
  outline: none;
}

.frame-button:disabled {
  border-color: #365849;
  color: #496a5c;
  opacity: .42;
}

.frame-status {
  min-width: 0;
  color: var(--dim);
  font-family: DTMMono, monospace;
  font-size: 13px;
  text-align: center;
}

.missing {
  display: grid;
  height: 272px;
  place-content: center;
  gap: 6px;
  border: 1px dashed #46695b;
  background: rgba(5, 30, 24, .5);
  color: #628074;
  text-align: center;
}

.missing span,
.preview-missing span {
  font-size: 25px;
}

.missing small,
.preview-missing small {
  font-family: DTMBold, monospace;
  font-size: 10px;
}

.empty {
  height: 220px;
  background: #092820;
  color: var(--dim);
  text-align: center;
  vertical-align: middle;
}

.empty strong,
.empty span {
  display: block;
}

.empty strong {
  color: var(--lamp);
  font-family: DTMBold, monospace;
  font-size: 17px;
}

.empty span {
  margin-top: 8px;
}

.preview-dialog {
  width: min(1460px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 28px);
  overflow: hidden;
  border: 3px solid var(--line);
  background: #08271f;
  color: var(--text);
  padding: 0;
  box-shadow: 0 20px 68px rgba(0, 0, 0, .76);
}

.preview-dialog::backdrop {
  background: rgba(1, 10, 8, .84);
}

.preview-head {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #0b3027;
  padding: 10px 16px;
}

.preview-head > div {
  min-width: 0;
}

.preview-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--lamp);
  font-family: DTMBold, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.preview-head code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: DTMMono, monospace;
  font-size: 16px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(var(--team-count), minmax(280px, 1fr));
  max-height: calc(100vh - 148px);
  overflow: auto;
}

.preview-team {
  min-width: 0;
  border-right: 1px solid var(--line-soft);
  background: #071f1a;
  padding: 14px;
}

.preview-team:last-child {
  border-right: 0;
}

.preview-team h2 {
  height: 34px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: normal;
}

.modal-stage-shell {
  position: relative;
}

.modal-stage {
  display: grid;
  height: min(54vh, 580px);
  place-items: center;
  overflow: auto;
  border: 2px solid #547b6c;
  padding: 16px;
  overscroll-behavior: contain;
}

.modal-stage .sprite-media {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  cursor: default;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.modal-stage .sprite-media:focus-visible {
  outline: 2px solid var(--team-color);
  outline-offset: 4px;
}

.modal-stage canvas.sprite-media {
  object-fit: contain;
}

.modal-spec {
  min-height: 36px;
  border-color: #476c5e;
  font-size: 13px;
}

.modal-controls {
  grid-template-columns: 34px minmax(0, 1fr) 34px 34px;
  margin-top: 10px;
}

.zoom-reset {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #5e8174;
  background: rgba(4, 25, 20, .92);
  color: var(--dim);
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 18px;
  line-height: 1;
  z-index: 2;
}

.zoom-reset:hover,
.zoom-reset:focus-visible {
  border-color: var(--team-color);
  color: var(--team-color);
  outline: none;
}

.zoom-reset:disabled {
  border-color: #3e5b51;
  background: rgba(4, 25, 20, .72);
  color: #557066;
  cursor: default;
}

.modal-stage.zoom-overflow-x {
  justify-items: start;
}

.modal-stage.zoom-overflow-y {
  align-items: start;
}

.modal-stage.zoomed .sprite-media {
  max-width: none;
  max-height: none;
}

.modal-stage.zoom-overflow-x .sprite-media,
.modal-stage.zoom-overflow-y .sprite-media {
  cursor: grab;
}

.modal-stage.is-panning .sprite-media {
  cursor: grabbing;
}

.preview-team.is-missing {
  display: grid;
  grid-template-rows: 34px minmax(300px, 1fr);
}

.preview-missing {
  display: grid;
  min-height: min(54vh, 580px);
  place-content: center;
  gap: 7px;
  border: 1px dashed #46695b;
  color: #628074;
  text-align: center;
}

.dialog-meta {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line-soft);
  background: #0b3027;
  padding: 8px 16px;
  color: var(--dim);
  font-family: DTMMono, monospace;
  font-size: 13px;
}

.dialog-meta b {
  color: var(--lamp);
  font-weight: normal;
}

@media (max-width: 1040px) {
  .game-switch .label {
    width: 100%;
  }

  .game-link {
    flex: 1 1 160px;
    justify-content: center;
  }

  .filter-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .filter-label {
    width: 100%;
  }

  .filter-segments {
    flex: 1 1 620px;
  }
}

@media (max-width: 760px) {
  .wrap {
    padding: 14px 9px 52px;
  }

  .box {
    padding: 13px;
  }

  .hero {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .soul {
    width: 28px;
    height: 27px;
  }

  h1 {
    max-width: calc(100vw - 76px);
    font-size: 29px;
    line-height: 1.08;
  }

  .sub {
    font-size: 15px;
  }

  .wallpaper-toggle {
    width: 100%;
    margin-left: 0;
  }

  .game-link {
    min-height: 38px;
    flex: 1 1 128px;
    padding: 5px 8px;
    font-size: 13px;
  }

  .chapter-pick {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .chapter-pick select {
    width: 100%;
    min-width: 0;
  }

  .filter-segments {
    display: grid;
    width: 100%;
    flex-basis: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-button {
    width: 100%;
  }

  .filter-button + .filter-button {
    margin-top: -2px;
    margin-left: 0;
  }

  .filter-button:nth-child(even) {
    margin-left: -2px;
  }

  .reset-filters {
    width: 100%;
    margin-left: 0;
  }

  .coverage-strip {
    grid-template-columns: repeat(var(--team-count), minmax(230px, 1fr));
    overflow-x: auto;
  }

  .team-coverage {
    min-height: 78px;
    padding: 11px 13px;
  }

  .table-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .table-status-note {
    text-align: left;
  }

  .table-scroll {
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
  }

  table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  thead {
    display: none;
  }

  tbody {
    display: block;
  }

  tbody tr {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(var(--visible-team-count), minmax(min(82vw, 340px), 1fr));
    grid-template-rows: auto auto;
    overflow-x: auto;
    border-bottom: 3px solid var(--line);
    background: #061f19;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 0;
    scroll-snap-type: x mandatory;
  }

  tbody tr:last-child {
    border-bottom: 0;
  }

  .object-cell {
    position: sticky;
    left: 0;
    z-index: 4;
    width: calc(100vw - 24px);
    max-width: 100%;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: start;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: #0c332a;
    padding: 13px 14px;
  }

  tbody tr:hover > .object-cell {
    background: #0c332a;
  }

  .sprite-id {
    font-size: 14px;
    line-height: 1.32;
  }

  .resource-flags {
    margin-top: 8px;
  }

  .team-cell {
    width: auto;
    min-width: 0;
    grid-row: 2;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: #08271f;
    padding: 11px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .team-cell::before {
    content: attr(data-label);
    display: block;
    min-height: 28px;
    margin-bottom: 8px;
    color: var(--team-color);
    font-family: DTMBold, monospace;
    font-size: 16px;
  }

  tbody tr:hover > .team-cell {
    background: #08271f;
  }

  #spriteTable[data-visible-teams="1"] tbody tr {
    grid-template-columns: minmax(0, 1fr);
  }

  #spriteTable[data-visible-teams="1"] .object-cell {
    width: 100%;
  }

  .sprite-open {
    height: clamp(210px, 64vw, 290px);
  }

  .sprite-spec {
    min-height: 36px;
    font-size: 12px;
  }

  .sprite-footer {
    min-height: 46px;
  }

  .missing {
    height: 310px;
  }

  .empty {
    position: sticky;
    left: 0;
    width: calc(100vw - 24px);
    grid-column: 1 / -1;
    justify-self: start;
  }

  .preview-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
  }

  .preview-head {
    min-height: 64px;
    padding: 9px 11px;
  }

  .preview-grid {
    grid-template-columns: repeat(var(--team-count), minmax(285px, 1fr));
    max-height: calc(100vh - 134px);
  }

  .preview-team {
    padding: 11px;
  }

  .modal-stage {
    height: 44vh;
    min-height: 280px;
  }

  .dialog-meta {
    padding: 7px 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
