.guideEntry {
  border-block-start: 1px solid var(--landing-line);
  background: var(--landing-mist);
  content-visibility: auto;
  contain-intrinsic-block-size: auto 184px;
}

.guideEntry > .wrap {
  padding-block: clamp(36px, 4.5vw, 54px);
}

.guideEntryInner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.guideEntryHeading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.guideEntryLogo {
  display: grid;
  width: 52px;
  height: 52px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--landing-line);
  border-radius: 14px;
  background: var(--landing-paper);
  box-shadow: var(--landing-shadow);
}

.guideEntryLogo img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.guideEntry h2 {
  margin: 0;
  line-height: 1.1;
}

.guideEntryButton {
  padding: 0;
  border: 0;
  color: var(--landing-text-brand);
  background: transparent;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: start;
  text-decoration: underline;
  text-decoration-color: var(--landing-lavender);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.guideEntryButton:hover {
  color: var(--landing-text-primary);
  text-decoration-color: currentColor;
}

.guideEntryDescription {
  max-width: 72ch;
  margin: 0;
  color: var(--landing-text-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.guideModalBackdrop[hidden] {
  display: none;
}

.guideModalBackdrop,
.guideModalBackdrop *,
.guideModalBackdrop *::before,
.guideModalBackdrop *::after {
  box-sizing: border-box;
}

.guideModalBackdrop {
  --landing-ink: #2a153f;
  --landing-purple: #63477a;
  --landing-purple-mid: #785ca0;
  --landing-lavender: #b8a8d0;
  --landing-mist: #f4f1f8;
  --landing-line: #e7e1ef;
  --landing-paper: #ffffff;
  --landing-text-primary: var(--color-brand);
  --landing-text-muted: var(--color-text-muted);
  --landing-text-brand: var(--color-brand);
  position: fixed;
  z-index: 1600;
  inset: 0;
  display: grid;
  padding: clamp(12px, 3vw, 28px);
  place-items: center;
  background: rgba(34, 24, 43, 0.66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--pg-font-family), system-ui, sans-serif;
  line-height: 1.55;
}

:root[class~="dark"] .guideModalBackdrop {
  --landing-ink: #ede8f5;
  --landing-purple: #b8a8d0;
  --landing-purple-mid: #a292d2;
  --landing-lavender: #6e5c8a;
  --landing-mist: #1e1729;
  --landing-paper: #16101e;
  --landing-line: #2e2540;
}

.guideDialog {
  position: relative;
  display: flex;
  width: min(1180px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--landing-line);
  border-radius: 24px;
  outline: 0;
  color: var(--landing-text-primary);
  background: var(--landing-mist);
  background-image: radial-gradient(
    ellipse 70% 62% at 50% 42%,
    color-mix(in srgb, var(--landing-lavender) 28%, var(--landing-paper)),
    var(--landing-mist) 72%
  );
  box-shadow: 0 26px 56px -12px rgba(28, 26, 24, 0.32),
    0 4px 10px rgba(28, 26, 24, 0.12);
}

.guideDialog :focus-visible {
  outline: 2.5px solid var(--landing-purple-mid);
  outline-offset: 3px;
}

.guideDialogHeader {
  position: absolute;
  z-index: 3;
  inset-block-start: 16px;
  inset-inline-end: 16px;
}

.guideIconButton {
  display: grid;
  width: 48px;
  height: 48px;
  flex: none;
  padding: 0;
  place-items: center;
  border: 1px solid var(--landing-line);
  border-radius: 50%;
  color: var(--landing-text-muted);
  background: var(--landing-paper);
  box-shadow: var(--landing-shadow);
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease,
    transform 180ms ease;
}

.guideIconButton:hover {
  border-color: var(--landing-lavender);
  color: var(--landing-text-primary);
}

.guideIconButton:active {
  transform: scale(0.97);
}

.guideIconButton svg {
  width: 21px;
  height: 21px;
}

.guideSlideStage {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 38px 44px 0;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
}

.guideSlideImage {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 224px);
  max-height: calc(100dvh - 224px);
  flex: none;
  border: 1px solid var(--landing-line);
  border-radius: 16px;
  background: var(--landing-paper);
  box-shadow: var(--landing-shadow);
  object-fit: contain;
  opacity: 1;
  transition: opacity 160ms ease;
  user-select: none;
}

.guideSlideStage.isLoading .guideSlideImage {
  opacity: 0.36;
}

.guideSlideStage::after {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid var(--landing-line);
  border-top-color: var(--landing-purple);
  border-radius: 50%;
  content: "";
  animation: guideSpin 720ms linear infinite;
}

.guideSlideStage.isLoading::after {
  display: block;
}

.guideSlideStage.isZoomed {
  align-items: flex-start;
  justify-content: flex-start;
}

.guideSlideStage.isZoomed .guideSlideImage {
  width: min(1920px, 175vw);
  max-width: none;
  max-height: none;
}

.guideControls {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 14px;
  padding: 18px 44px 26px;
}

.guideMeta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.guideCounter {
  flex: none;
  padding: 5px 11px;
  border: 1px solid var(--landing-line);
  border-radius: 999px;
  color: var(--landing-text-brand);
  background: var(--landing-paper);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.guideSlideLabel {
  min-width: 0;
  overflow: hidden;
  color: var(--landing-text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guideControlRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.guideDots {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.guideDot {
  width: 8px;
  height: 8px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--landing-lavender);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.guideDot[aria-current="true"] {
  width: 24px;
  background: var(--landing-purple);
}

.guideNavButtons {
  display: flex;
  flex: none;
  gap: 8px;
}

.guideZoom[aria-pressed="true"] .guideZoomVertical {
  display: none;
}

.guideVisuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

html.guideOpen,
html.guideOpen body {
  overflow: hidden;
}

@keyframes guideSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 700px) {
  .guideEntry {
    contain-intrinsic-block-size: auto 170px;
  }

  .guideEntry > .wrap {
    padding-block: 34px;
  }

  .guideEntryInner {
    gap: 16px;
  }

  .guideEntryHeading {
    gap: 12px;
  }

  .guideEntryLogo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .guideEntryLogo img {
    width: 39px;
    height: 39px;
  }

  .guideEntryButton {
    font-size: 1.12rem;
  }

  .guideEntryDescription {
    font-size: 0.88rem;
  }

  .guideModalBackdrop {
    padding: 0;
  }

  .guideDialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .guideDialogHeader {
    inset-block-start: max(12px, env(safe-area-inset-top));
    inset-inline-end: 12px;
  }

  .guideIconButton {
    width: 44px;
    height: 44px;
  }

  .guideSlideStage {
    padding: calc(60px + env(safe-area-inset-top)) 10px 10px;
  }

  .guideSlideImage {
    max-height: calc(100vh - 226px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 226px - env(safe-area-inset-bottom));
    border-radius: 10px;
  }

  .guideSlideStage.isZoomed .guideSlideImage {
    width: min(1920px, 230vw);
  }

  .guideControls {
    gap: 11px;
    padding: 11px 14px calc(14px + env(safe-area-inset-bottom));
  }

  .guideMeta {
    gap: 9px;
  }

  .guideCounter,
  .guideSlideLabel {
    font-size: 0.74rem;
  }

  .guideControlRow {
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  .guideModalBackdrop {
    padding: 8px;
  }

  .guideDialog {
    width: min(960px, 100%);
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    max-height: none;
    border-radius: 16px;
  }

  .guideDialogHeader {
    inset-block-start: 10px;
    inset-inline-end: 10px;
  }

  .guideSlideStage {
    padding: 10px 62px 4px;
  }

  .guideSlideImage {
    max-height: calc(100vh - 116px);
    max-height: calc(100dvh - 116px);
    border-radius: 10px;
  }

  .guideControls {
    gap: 7px;
    padding: 6px 12px 8px;
  }

  .guideMeta {
    gap: 8px;
  }

  .guideIconButton {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guideEntryButton,
  .guideIconButton,
  .guideSlideImage,
  .guideDot {
    transition: none;
  }

  .guideSlideStage::after {
    animation: none;
  }
}
