body[data-mw4-guide] .layout-shell {
  max-width: 1280px;
  margin-top: 0;
}

body[data-mw4-guide] .main-content {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 2px;
  padding-bottom: 28px;
}

body[data-mw4-guide] .site-intro {
  margin-top: 0;
  padding-top: 0;
}

@media (min-width: 851px) {
  body[data-mw4-guide] .page-affiliate-note { display: none; }
}

body[data-mw4-guide] .site-intro .subpage-title {
  margin: 0 0 4px;
  font-size: 1.35rem;
  line-height: 1.2;
  text-align: left;
  color: var(--accent);
}

[data-mw4-guide] .site-intro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 8px;
}

[data-mw4-guide] .site-intro-links {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

[data-mw4-guide] .site-intro-top .subpage-back-link {
  margin: 0;
}

[data-mw4-guide] .site-intro-top .page-updated-at {
  position: static;
  flex: 0 0 auto;
  text-align: right;
}

@media (max-width: 600px) {
  body[data-mw4-guide] .layout-shell {
    margin-top: 0;
  }

  body[data-mw4-guide] .main-content {
    padding: 6px 8px 8px;
  }

  body[data-mw4-guide] .layout-shell,
  body[data-mw4-guide] .main-content,
  body[data-mw4-guide] .panel,
  body[data-mw4-guide] .mobile-ad-slot,
  body[data-mw4-guide] .sp-ad-viewport,
  body[data-mw4-guide] .sp-ad-card,
  body[data-mw4-guide] .character-list,
  body[data-mw4-guide] .character-card {
    max-width: 100%;
    min-width: 0;
  }

  body[data-mw4-guide] .site-intro {
    margin-top: 0;
    padding-top: 0;
  }

  [data-mw4-guide] .site-intro-top {
    align-items: flex-start;
    margin-bottom: 6px;
  }

  [data-mw4-guide] .site-intro-links {
    gap: 6px;
  }
}

[data-mw4-guide] .subpage-title span {
  display: block;
}

[data-mw4-guide] .guide-work-name {
  color: inherit;
  font-size: .72em;
  margin-bottom: .35rem;
}

.guide-panel h2,
.guide-panel h3 {
  scroll-margin-top: 1rem;
}

.guide-panel h3 {
  margin-block: 1rem .4rem;
}

.guide-panel li + li {
  margin-top: .35rem;
}

.guide-panel p,
.guide-panel li,
.guide-panel td {
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.guide-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-nav a {
  align-content: center;
  display: inline-block;
  min-height: 2rem;
}

.guide-controls {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
}

.guide-controls label {
  display: grid;
  flex: 1 1 12rem;
  gap: .15rem;
  min-width: 0;
}

.guide-controls .character-search,
.guide-controls .character-filter-select {
  min-height: 2.5rem;
  width: 100%;
}

.guide-controls .guide-reset {
  background-image: none;
  justify-content: center;
  min-height: 2.5rem;
  padding-inline: .65rem;
  width: auto;
}

.guide-table-wrap {
  margin-block: .6rem;
}

.guide-table.character-table {
  table-layout: auto;
}

.guide-table.character-table :is(th, td):nth-child(n) {
  vertical-align: top;
  width: auto;
}

.guide-table.character-table thead th {
  padding: .4rem .55rem;
}

.guide-table .guide-short-heading,
.guide-compare .character-sort-button {
  white-space: nowrap;
}

.guide-table :is(th, td):first-child {
  font-weight: 700;
}

.guide-scroll-hint {
  display: none;
}

.guide-compare {
  max-width: 100%;
  overflow-x: auto;
}

.guide-compare .guide-table {
  min-width: 34rem;
}

.guide-table caption {
  text-align: left;
}

.warzone-data-table th[scope="row"] {
  text-align: start;
  overflow-wrap: anywhere;
}

.guide-table.character-table.warzone-data-table {
  min-width: 0;
}

.guide-table.character-table.warzone-data-table td {
  font-weight: 400;
}

.warzone-text-unit {
  white-space: nowrap;
}

.static-mobile > .character-list:has(.guide-card) {
  padding-inline-start: 0;
}

@media (min-width: 851px) {
  .warzone-data-table thead th {
    white-space: nowrap;
  }

  #maps .warzone-data-table th:first-child {
    width: 20%;
  }

  #equipment .warzone-data-table td[data-label="枠"] {
    white-space: nowrap;
  }

  #operator-unlocks .warzone-data-table td:nth-child(3) {
    overflow-wrap: normal;
    word-break: normal;
  }
}

[data-mw4-guide] :is(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 850px) {
  .guide-scroll-hint {
    display: block;
    margin: .5rem 0 0;
    font-size: .875rem;
  }

  .guide-compare .guide-table.character-table {
    table-layout: fixed;
  }

  .guide-compare .guide-table :is(th, td):first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 7.5rem;
    max-width: 7.5rem;
    background: var(--paper-color);
    border-right: 1px solid var(--rule-line);
  }

  .guide-compare .guide-table th:first-child {
    background: #e9efdd;
  }

  .guide-compare .guide-table th:nth-child(4) {
    width: 8.5rem;
  }

  .guide-compare .guide-table th:nth-child(5) {
    width: 5rem;
  }

  .guide-compare .character-sort-button {
    padding-inline: 0;
  }

  .guide-table-wrap:not(.guide-compare) .guide-table,
  .guide-table-wrap:not(.guide-compare) .guide-table tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .guide-table-wrap:not(.guide-compare) .guide-table tbody tr {
    display: grid;
    gap: .28rem;
    padding: .55rem .45rem;
    border-bottom: 1px solid var(--rule-line);
  }

  .guide-table-wrap .warzone-data-table th[scope="row"] {
    padding: 0;
    border: 0;
  }

  .guide-table-wrap:not(.guide-compare) .guide-table thead {
    position: absolute;
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    overflow: hidden;
  }

  .guide-table-wrap:not(.guide-compare) .guide-table td {
    display: block;
    border: 0;
    padding: 0;
  }

  .guide-table-wrap:not(.guide-compare) .guide-table td:not(:first-child)::before {
    color: var(--accent);
    content: attr(data-label) "　";
    font-weight: 700;
  }
}


.guide-card {
  display: grid;
  gap: .25rem;
  padding: .65rem .75rem;
}

.guide-card .character-card-name-cell {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.guide-card .character-card-value {
  background: transparent;
  border-radius: 0;
  display: block;
  font-size: .85rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 0;
  text-align: start;
}

.guide-card .character-card-value::before {
  content: attr(data-label) "　";
  font-weight: 700;
}

.guide-contents,
.guide-group {
  scroll-margin-top: 1rem;
}

.guide-contents a {
  font-weight: 700;
}

.guide-toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: .65rem 1.2rem;
}

.guide-toc .guide-toc-label {
  margin: 0 0 .15rem;
  color: var(--accent);
  font-weight: 700;
}

.guide-toc ul {
  display: block;
}

.guide-toc a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.guide-group-header {
  margin-bottom: .45rem;
}

.guide-group-header h2 {
  margin-bottom: .35rem;
}

.guide-group-header .guide-nav {
  margin-top: .35rem;
}

.guide-group .guide-panel > h3:first-child {
  margin-block-start: 0;
  color: var(--accent);
}

.guide-panel h4 {
  margin-block: 1rem .4rem;
  overflow-wrap: anywhere;
}

#characters .character-table {
  min-width: 0;
}

#characters .character-detail-item :is(h3, p) {
  overflow-wrap: anywhere;
}

@media (min-width: 851px) and (max-width: 1050px) {
  .warzone-data-table thead th {
    white-space: normal;
  }

  :is(#maps, #zones, #operator-unlocks) .guide-table.warzone-data-table {
    table-layout: fixed;
  }

  #maps .warzone-data-table thead th:nth-child(2) { width: 22%; }
  #maps .warzone-data-table thead th:nth-child(3) { width: 20%; }

  #zones .warzone-data-table thead th:nth-child(1) { width: 25%; }
  #zones .warzone-data-table thead th:nth-child(2) { width: 17%; }
  #zones .warzone-data-table thead th:nth-child(3) { width: 24%; }

  #operator-unlocks .warzone-data-table thead th:nth-child(1) { width: 26%; }
  #operator-unlocks .warzone-data-table thead th:nth-child(2) { width: 19%; }
  #operator-unlocks .warzone-data-table thead th:nth-child(3) { width: 20%; }

  #characters .character-detail-cell .character-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 850px) {
  #characters .static-mobile :is(.character-name-text, .character-name-static) {
    line-break: strict;
    word-break: normal;
  }
}

@media (max-width: 360px) {
  #characters .character-detail-item {
    grid-template-columns: minmax(0, 1fr);
    gap: .15rem;
  }
}
