.drift-section {
  --drift-ink: #21473d;
  --drift-paper: #fff2d0;
  position: relative;
  width: min(100%, 1240px);
  padding: clamp(35px, 7vw, 92px) clamp(22px, 5vw, 68px) clamp(62px, 9vw, 124px);
  margin-inline: auto;
  color: var(--drift-ink);
}
.drift-anchor {
  position: absolute;
  top: 0;
  scroll-margin-top: 20px;
}
.drift-section h2 {
  margin: 0 0 clamp(15px, 2.6vw, 30px);
  font-size: clamp(38px, 6.3vw, 88px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.065em;
}
.drift-entry {
  display: grid;
  isolation: isolate;
  position: relative;
  overflow: hidden;
  aspect-ratio: 2.02;
  border: 2px solid var(--drift-ink);
  border-radius: clamp(12px, 1.7vw, 22px);
  background: #2ba8aa;
  box-shadow: 0 5px 0 #21473d35;
  color: var(--drift-ink);
  text-decoration: none;
}
.drift-entry picture,
.drift-entry img {
  display: block;
  width: 100%;
  height: 100%;
}
.drift-entry img {
  object-fit: cover;
  image-rendering: pixelated;
}
.drift-entry-label {
  position: absolute;
  left: clamp(14px, 3.5vw, 42px);
  bottom: clamp(14px, 3.1vw, 36px);
  display: grid;
  place-items: center;
  min-height: 48px;
  min-width: 122px;
  padding: 6px 19px;
  border: 2px solid var(--drift-ink);
  border-radius: 4px;
  background: var(--drift-paper);
  box-shadow: 0 4px 0 var(--drift-ink);
  font-size: 17px;
  font-weight: 850;
}
.drift-entry:hover .drift-entry-label { background: #ffb088; }
.drift-entry:focus-visible, .drift-close:focus-visible {
  outline: 3px solid #178080;
  outline-offset: 4px;
}

html.drift-open,
html.drift-open body { overflow: hidden; }
.drift-dialog {
  box-sizing: border-box;
  width: min(1130px, calc(100vw - 66px));
  height: min(744px, calc(100dvh - 50px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 2px solid #21473d;
  border-radius: 14px;
  background: #e8d8b2;
  color: #21473d;
  overflow: hidden;
}
.drift-dialog[open] { display: block; }
.drift-dialog::backdrop { background: #153c35bd; }
.drift-toolbar {
  position: absolute;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 1;
}
.drift-close {
  min-height: 44px;
  min-width: 76px;
  padding-inline: 11px;
  border: 2px solid #21473d;
  border-radius: 4px;
  background: #fff2d0;
  box-shadow: 0 3px 0 #21473d;
  color: #21473d;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}
.drift-close:hover { background: #ffd2a6; }
.drift-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #2ba8aa;
}

@media (max-width: 640px) {
  .drift-section { padding-inline: 20px; }
  .drift-entry { aspect-ratio: 5 / 6; }
  .drift-entry-label {
    left: 50%;
    bottom: 13px;
    transform: translateX(-50%);
  }
  .drift-dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .drift-dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
}
