.sub-tabs[hidden] {
  display: none !important;
}

.kill-legend .three,
.kill-badge.three {
  color: #ffd36a;
  background: rgba(255, 211, 106, 0.12);
}

.amp-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #29465e;
  border-radius: 10px;
  color: #91a9ba;
  background: #091725;
  font-size: 12px;
  font-weight: 800;
}

.magic-table-heading > .amp-toggle,
.magic-table-heading > .sub-tabs {
  flex: 0 0 auto;
}

.magic-table-heading > .sub-tabs {
  margin: 0;
}

.magic-title-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.spell-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border: 1px solid rgba(117, 217, 255, .22);
  border-radius: 13px;
  object-fit: contain;
  image-rendering: pixelated;
  background: rgba(8, 19, 31, .72);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .24);
}

.magic-table .target-cell {
  width: 112px;
  min-width: 112px;
  padding-right: 16px;
  padding-left: 16px;
  text-align: center;
  vertical-align: middle;
}

.magic-table .target-cell .kill-badge {
  display: inline-flex;
  min-width: 42px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.magic-table tr.kill-one-row > td:not(.monster-cell) {
  background: rgba(255, 137, 118, .055);
}

.magic-table tr.kill-two-row > td:not(.monster-cell) {
  background: rgba(117, 217, 255, .045);
}

.magic-table tr.kill-three-row > td:not(.monster-cell) {
  background: rgba(255, 211, 106, .045);
}

.magic-table tr.kill-one-row:hover > td:not(.monster-cell) {
  background: rgba(255, 137, 118, .1);
}

.magic-table tr.kill-two-row:hover > td:not(.monster-cell) {
  background: rgba(117, 217, 255, .09);
}

.magic-table tr.kill-three-row:hover > td:not(.monster-cell) {
  background: rgba(255, 211, 106, .09);
}

@media (max-width: 700px) {
  .magic-table-heading {
    align-items: flex-start;
  }

  .magic-table .target-cell {
    width: 84px;
    min-width: 84px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .magic-title-wrap {
    gap: 11px;
  }

  .spell-icon {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }
}

@media (min-width: 701px) {
  .magic-control-panel {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #0c1724;
    box-shadow: 0 12px 22px rgba(3, 8, 14, .34);
  }

  .magic-table-panel {
    position: relative;
  }

  .magic-table-heading {
    position: sticky;
    top: var(--magic-control-height, 190px);
    z-index: 39;
    margin: -24px -24px 0;
    padding: 24px 24px 18px;
    border-radius: 18px 18px 0 0;
    background: #0c1724;
  }

  .magic-table-wrap {
    overflow-x: clip;
  }

  .magic-table thead {
    position: sticky;
    top: calc(var(--magic-control-height, 190px) + var(--magic-heading-height, 100px));
    z-index: 38;
    background: #0c1724;
    box-shadow: 0 8px 13px rgba(3, 8, 14, .28);
  }
}

.amp-toggle[hidden] {
  display: none !important;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-track {
  width: 44px;
  height: 24px;
  border: 1px solid #31536d;
  border-radius: 999px;
  background: #102335;
  transition: .18s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #75d9ff;
  box-shadow: 0 0 12px rgba(117, 217, 255, .45);
  transition: .18s ease;
}

.toggle-switch input:checked + .toggle-track {
  border-color: #65c8ee;
  background: rgba(117, 217, 255, .18);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(20px);
}

.magic-controls {
  grid-template-columns: 1fr;
}

.monster-cell-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.monster-image {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, .38));
}

.monster-name-text {
  min-width: 0;
}

@media (max-width: 700px) {
  .magic-hero h1 { word-break: keep-all; }
  .magic-hero > p { line-height: 1.65; word-break: keep-all; }
  .magic-control-panel { padding: 12px; }
  .job-tabs { position: sticky; z-index: 24; top: 68px; }
  .job-tabs button { min-height: 44px; padding: 10px 6px; font-size: 13px; }
  .amp-toggle { justify-content: center; }
  .magic-table-heading h2 { font-size: 19px; line-height: 1.25; word-break: keep-all; }
  .magic-table-heading p { line-height: 1.5; word-break: keep-all; }
  .magic-table-wrap { margin-right: -16px; margin-left: -16px; padding: 0 16px 7px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .monster-image {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }
}
