.guide-toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .25em .75em;
  border: 1px solid var(--rule-line);
  border-radius: .5rem;
  background: #fff;
  color: var(--accent);
  text-underline-offset: .2em;
}

.guide-toc--chapters {
  display: grid;
  gap: .75rem 1.25rem;
}

.guide-toc--chapters h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.guide-toc-group h3 {
  margin: 0 0 .45rem;
  font-size: .95rem;
}

.guide-back-to-contents {
  margin-bottom: 0;
  text-align: right;
}

.guide-back-to-contents a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

#guide-contents,
.guide-section,
#game-info,
#work-guides {
  scroll-margin-top: 1rem;
}

.guide-section :is(p, li, dd) {
  line-height: 1.65;
}

.guide-section :is(ol, ul) {
  padding-inline-start: 1.45em;
}

.guide-section li + li {
  margin-top: .55em;
}

.guide-section h3 {
  margin: 1em 0 .5em;
}

.guide-steps li > p {
  margin: .2em 0 .85em;
}

.guide-list-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .65rem .8rem;
  margin: .75rem 0;
}

.guide-list-controls .character-control--search {
  flex: 1 1 15rem;
  min-width: 0;
}

.guide-list-controls :is(input, select, button) {
  min-height: 44px;
}

.guide-list-controls .character-filter-select {
  padding-inline-end: 32px;
}

.guide-list-controls [data-static-count] {
  margin-left: auto;
}

.guide-section .guide-table {
  min-width: 0;
  table-layout: auto;
}

.guide-section .guide-table :is(th, td):nth-child(n) {
  width: auto;
  padding: .6rem .75rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.guide-section .guide-table tbody tr:last-child :is(th, td) {
  border-bottom: 1px solid var(--rule-line);
  font-size: .92rem;
  line-height: 1.5;
}

.guide-section .guide-table tbody td {
  font-weight: 400;
}

.guide-section .guide-table tbody:last-child :is(th, td) {
  border-bottom: 0;
}

.guide-section .guide-table tr > :first-child {
  width: 26%;
}

#dungeons .guide-table tr > :nth-child(-n + 2) {
  width: 22%;
}

:is(#missions, #materials, #buildings, #skills, #achievements) .guide-table tr > :nth-child(2) {
  white-space: nowrap;
}

.guide-section .guide-card {
  padding: .7rem .8rem;
}

.guide-section .guide-card h3 {
  margin: 0 0 .4em;
  font-size: 1rem;
}

@media (max-width: 850px) {
  .guide-section .character-list.static-mobile {
    display: grid;
  }
}

.guide-card-field {
  display: grid;
  grid-template-columns: minmax(6rem, 30%) minmax(0, 1fr);
  gap: .55em;
  padding: .25em 0;
  font-size: .92rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.guide-card-label {
  color: var(--text-main);
  font-size: .82rem;
  font-weight: 700;
  word-break: keep-all;
}

.guide-card-label::before {
  content: attr(aria-label);
}

#dlc .guide-card-label {
  white-space: pre-line;
}

.guide-advanced {
  display: grid;
  gap: .65rem;
  margin: 0;
}

.guide-advanced div {
  padding: .7rem .85rem;
  border: 1px solid var(--rule-line);
  border-radius: .5rem;
  background: #fff;
}

.guide-advanced dt {
  font-weight: 700;
}

.guide-advanced dd {
  margin: .2em 0 0;
}

@media (min-width: 851px) {
  .guide-toc--chapters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .guide-advanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
