.app-guide {
  max-width: 1024px;
  margin: 2.5rem auto;
  padding: 0 20px;
  color: #242924;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.app-guide header p,
.app-guide figcaption {
  color: #515c55;
  font-size: .9rem;
}

.app-guide h1 { margin: .5rem 0 1rem; font-size: clamp(1.65rem, 4vw, 2.25rem); line-height: 1.35; text-wrap: balance; }
.app-guide h2 { margin: 1.75rem 0 .4rem; font-size: 1.35rem; line-height: 1.5; }
.app-guide p, .app-guide ol, .app-guide dl { margin: .6rem 0; }
.app-guide .guide-steps {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .35rem .375em;
  padding-left: 0;
  list-style: none;
}
.app-guide .guide-steps li {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: max-content minmax(0, 1fr);
  grid-template-columns: subgrid;
  column-gap: inherit;
  margin: 0;
}
.guide-step-number { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.app-guide li { margin: .35rem 0; }
.app-guide pre { max-width: 100%; overflow-x: auto; }
.app-guide table { width: 100%; margin: .75rem 0; border-collapse: collapse; line-height: 1.5; }
.app-guide th, .app-guide td { padding: .45rem .55rem; text-align: start; vertical-align: top; border-bottom: 1px solid #d6ded8; }
.app-guide th { background: #eff3f0; }
.app-guide dt { font-weight: bold; }
.app-guide dd { margin: 0 0 .5rem; }
.app-guide a { color: #21673c; text-underline-offset: .15em; }
.app-guide footer { margin-top: 1.5rem; padding-top: .6rem; border-top: 1px solid #d6ded8; }

.guide-gallery { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem; margin: 1.25rem 0; }
.app-guide .guide-shot { position: relative; flex: 0 1 min(17rem, 27vh); min-width: 0; max-width: 100%; margin: 0; }
.guide-shot-link { display: block; width: 100%; cursor: zoom-in; }
.guide-shot-link::after { position: absolute; inset: 0; content: ''; }
.guide-shot-link img { display: block; width: 100%; height: auto; box-sizing: border-box; border: 1px solid #cbd3ce; border-radius: .4rem; }
.guide-shot-link:focus-visible { outline: 3px solid #21673c; outline-offset: 3px; }
.guide-shot figcaption { margin: .5rem 0 0; line-height: 1.55; }

.guide-viewer:not([open]) { display: none; }
.guide-viewer[open] {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(66rem, 100%);
  max-width: 100%;
  height: 94%;
  height: min(94dvh, 65rem);
  max-height: 100%;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: .6rem;
  color: #fff;
  background: #1d2320;
  line-height: 1.5;
  overscroll-behavior: contain;
}
.guide-viewer::backdrop { background: rgb(9 14 11 / 80%); }
html:has(.guide-viewer[open]) { overflow: hidden; }
.guide-viewer-header,
.guide-viewer-footer { display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem; }
.guide-viewer-count { flex: 1; }
.guide-viewer button {
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: .4rem .8rem;
  border: 1px solid #78857e;
  border-radius: .4rem;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.guide-viewer button:hover { background: #3a443e; }
.guide-viewer button[aria-pressed='true'] { background: #415c4d; border-color: #ade1bf; }
.guide-viewer button:focus-visible, .guide-viewer-stage:focus-visible { outline: 2px solid #b5e4c8; outline-offset: -2px; }
.guide-viewer button[hidden] { display: none; }
.guide-viewer-stage { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; background: #101411; }
.guide-viewer-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; margin: 0 auto; }
.guide-viewer-image.is-original { width: auto; max-width: none; max-height: none; }
.guide-viewer-caption { flex: 1; margin: 0; text-align: center; overflow-wrap: anywhere; }
.guide-viewer-footer button { font-size: 1.3rem; }

@media (max-width: 600px) {
  .app-guide { margin: 1.5rem auto; }
  .guide-gallery { justify-content: center; }
  .app-guide .guide-shot { flex-basis: 17rem; }
  .guide-viewer[open] { height: 100%; height: 100dvh; border-radius: 0; }
  .guide-viewer-image { width: 100%; max-height: none; }
  .guide-viewer-header, .guide-viewer-footer { gap: .5rem; padding: .4rem .6rem; }
  .guide-viewer-footer { padding-bottom: max(.4rem, env(safe-area-inset-bottom)); }
}
