:root {
  --bg: #ffffff;
  --ink: #111111;
  --mute: #8a8a8a;
  --yellow: #f3e06c;
  --blue: #cfe4f6;
  --mint: #c9ebda;
  --lilac: #e2d6f6;
  --peach: #f6cfc4;
  --cream: #f2e4c4;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --hand: "Caveat", "Segoe Script", cursive;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(17, 17, 17, 0.14) 1.05px, transparent 1.15px);
  background-size: 22px 22px;
  background-position: center center;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17.5px;
  font-weight: 450;
  line-height: 1.62;
  letter-spacing: -0.011em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

::selection {
  background: #f3e06c;
  color: var(--ink);
}

a {
  color: inherit;
}

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  min-height: 100svh;
  height: 100svh;
}

.intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 7vh 5vw 8vh 9vw;
  min-width: 0;
  overflow: auto;
  scrollbar-width: none;
}

.intro::-webkit-scrollbar {
  display: none;
}

.intro-copy {
  max-width: 46rem;
  width: min(46rem, 100%);
  order: 1;
  margin-left: clamp(0rem, 6vw, 5.5rem);
}

.intro-copy p + p {
  margin-top: 1.05em;
}

.intro-copy strong {
  font-weight: 650;
}

.chip {
  display: inline-block;
  padding: 0.07em 0.42em 0.12em;
  margin: 0.16em 0.04em;
  border-radius: 7px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: transform 0.22s ease, filter 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
  .chip:hover {
    filter: brightness(0.97);
    transform: translateY(-1px);
  }
}

.chip-yellow { background: var(--yellow); }
.chip-blue { background: var(--blue); }
.chip-mint { background: var(--mint); }
.chip-lilac { background: var(--lilac); }
.chip-peach { background: var(--peach); }
.chip-cream { background: var(--cream); }

.tip .chip {
  cursor: help;
}

.tip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tip-card {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.7rem);
  z-index: 12;
  min-width: 11.5rem;
  padding: 0.7rem 0.85rem 0.8rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.tip-card::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 10px;
  height: 10px;
  background: #fff;
  transform: translateX(-50%) translateY(-5px) rotate(45deg);
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.06);
}

.tip-card em {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--mute);
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.tip:hover .tip-card,
.tip:focus-within .tip-card {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tip-name {
  cursor: inherit;
}

.tip-name strong {
  padding: 0.07em 0.42em 0.12em;
  margin: 0 0.04em;
  border-radius: 7px;
  background: var(--lilac);
}

.tip-card-morph {
  min-width: 0;
  padding: 0.52rem 0.62rem 0.5rem;
}

.name-morph {
  display: block;
  color: var(--ink);
}

.mark {
  display: inline-block;
  width: 0.92em;
  height: 0.92em;
  margin-right: 0.22em;
  vertical-align: -0.08em;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.mark-spark {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0l1.4 6.6L16 8l-6.6 1.4L8 16l-1.4-6.6L0 8l6.6-1.4z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0l1.4 6.6L16 8l-6.6 1.4L8 16l-1.4-6.6L0 8l6.6-1.4z'/%3E%3C/svg%3E");
}

.mark-globe {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M1 8h14M8 1c-2.4 2.2-3.6 4.6-3.6 7s1.2 4.8 3.6 7c2.4-2.2 3.6-4.6 3.6-7S10.4 3.2 8 1z' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M1 8h14M8 1c-2.4 2.2-3.6 4.6-3.6 7s1.2 4.8 3.6 7c2.4-2.2 3.6-4.6 3.6-7S10.4 3.2 8 1z' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E");
}

.mark-in {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.2' y='1.2' width='13.6' height='13.6' rx='2.2' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M5 6.6V12M5 4.3v.1M8.2 12V8.4c0-1.3.7-2 1.8-2s1.7.7 1.7 2V12' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.2' y='1.2' width='13.6' height='13.6' rx='2.2' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M5 6.6V12M5 4.3v.1M8.2 12V8.4c0-1.3.7-2 1.8-2s1.7.7 1.7 2V12' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.mark-ig {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.5' y='1.5' width='13' height='13' rx='4' fill='none' stroke='black' stroke-width='1.6'/%3E%3Ccircle cx='8' cy='8' r='3.1' fill='none' stroke='black' stroke-width='1.6'/%3E%3Ccircle cx='11.6' cy='4.4' r='.9'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.5' y='1.5' width='13' height='13' rx='4' fill='none' stroke='black' stroke-width='1.6'/%3E%3Ccircle cx='8' cy='8' r='3.1' fill='none' stroke='black' stroke-width='1.6'/%3E%3Ccircle cx='11.6' cy='4.4' r='.9'/%3E%3C/svg%3E");
}

.mark-plane {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 8.2l14-6.2-4.8 12.2-2.4-4.6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 8.2l14-6.2-4.8 12.2-2.4-4.6z'/%3E%3C/svg%3E");
}

.nudge {
  position: absolute;
  top: 3.2vh;
  right: 0.4rem;
  width: 210px;
  color: #222;
  pointer-events: none;
  z-index: 3;
  order: 3;
}

.nudge-copy {
  font-family: var(--hand);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.1;
  color: #444;
}

.nudge-arrow {
  display: block;
  width: 150px;
  height: auto;
  margin: 2px 0 0 36px;
  overflow: visible;
}

.polaroids {
  position: relative;
  width: 13.68rem;
  height: 15.84rem;
  margin-top: 2.2rem;
  margin-left: clamp(0rem, 6vw, 5.5rem);
}

.me-block {
  order: 2;
}

.polaroid {
  position: relative;
  display: block;
  background: #fff;
  padding: 0.66rem 0.66rem 2.04rem;
  border-radius: 3px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.polaroid::before {
  content: "";
  position: absolute;
  top: -0.54rem;
  left: 50%;
  width: 3.12rem;
  height: 1.02rem;
  background: rgba(255, 248, 220, 0.72);
  border: 1px solid rgba(23, 23, 23, 0.06);
  transform: translateX(-50%) rotate(-2deg);
}

.polaroid img {
  display: block;
  width: 100%;
  height: 11.28rem;
  object-fit: cover;
  background: #ece8df;
}

.polaroid span {
  position: absolute;
  left: 0.42rem;
  right: 0.42rem;
  bottom: 0.38rem;
  font-family: var(--hand);
  font-size: 1.38rem;
  font-weight: 600;
  text-align: center;
  color: #3a3a38;
  white-space: nowrap;
  overflow: hidden;
}

.polaroid-me {
  width: 11.2rem;
  transform: rotate(5deg);
}

.edits-cta {
  display: none;
  text-decoration: none;
  color: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .polaroid-me:hover {
    transform: rotate(2deg) translateY(-4px);
  }
}

.reel {
  position: relative;
  height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8vh 6rem 16vh 0.15rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 90%, transparent);
}

.reel::-webkit-scrollbar {
  display: none;
}

.reel-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
}

.card {
  width: 236px;
  flex-shrink: 0;
}

.card-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #f3f3f3;
  box-shadow: var(--shadow);
  aspect-ratio: 9 / 16;
}

.card-frame video,
.card-frame img.poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-frame video {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.card.is-playing .card-frame video {
  opacity: 1;
}

.card-hint {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%) translateY(6px);
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.card:hover .card-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.card-caption {
  margin-top: 0.7rem;
  text-align: center;
}

.card-caption strong {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card-caption span {
  display: block;
  margin-top: 0.12rem;
  color: var(--mute);
  font-size: 12.5px;
}

@media (max-width: 1180px) and (min-width: 981px) {
  .page {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .intro {
    padding: 6vh 3.5vw 6vh 5vw;
  }

  .intro-copy,
  .polaroids,
  .me-block {
    margin-left: 0;
  }

  .reel {
    padding: 8vh 1.6rem 16vh 0.2rem;
  }

  .card {
    width: 210px;
  }
}

@media (max-height: 820px) and (min-width: 981px) {
  body { font-size: 16px; }
  .intro { padding: 5vh 3.5vw 5vh 5vw; }
  .polaroids { height: 12.2rem; margin-top: 1.6rem; }
  .nudge { top: 3vh; }
}

@media (max-width: 980px) {
  html,
  body {
    height: auto;
  }

  body:not(.page-edits) {
    overflow: auto;
    overflow-x: hidden;
    font-size: 16.5px;
    line-height: 1.58;
  }

  body:not(.page-edits) .page {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100svh;
  }

  .intro {
    align-items: stretch;
    padding: max(2.6rem, calc(env(safe-area-inset-top) + 1.2rem)) max(1.25rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
    overflow: visible;
  }

  .intro-copy {
    width: 100%;
    max-width: none;
    margin-left: 0;
  }

  .tip-card {
    left: 0;
    min-width: 0;
    max-width: min(16rem, calc(100vw - 2.5rem));
    white-space: normal;
    transform: translateY(6px);
  }

  .tip:hover .tip-card,
  .tip:focus-within .tip-card {
    transform: translateY(0);
  }

  .tip-card::after {
    left: 1.4rem;
    transform: translateX(0) translateY(-5px) rotate(45deg);
  }

  .tip-name .tip-card-morph {
    top: 50%;
    bottom: auto;
    left: calc(100% + 0.4rem);
    right: auto;
    transform: translate(6px, -50%);
  }

  .tip-name:hover .tip-card-morph,
  .tip-name:focus-within .tip-card-morph {
    transform: translate(0, -50%);
  }

  .tip-name .tip-card-morph::after {
    left: auto;
    right: 100%;
    top: 50%;
    transform: translate(5px, -50%) rotate(45deg);
    box-shadow: -2px 3px 6px rgba(0, 0, 0, 0.06);
  }

  .nudge {
    display: none;
  }

  .me-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .polaroids {
    width: 10.6rem;
    height: 12.2rem;
    margin: 1.6rem auto 0.35rem;
  }

  .polaroid-me {
    width: 10.4rem;
  }

  .edits-cta {
    display: block;
    width: fit-content;
    margin: 1.15rem auto 0.4rem;
    padding: 0.48em 1.05em 0.55em;
    border-radius: 999px;
    background: var(--yellow);
    font-weight: 650;
    font-size: 15.5px;
    letter-spacing: -0.015em;
    text-decoration: none;
    box-shadow: var(--shadow);
  }

  body:not(.page-edits) .reel {
    display: none;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 16px;
  }
}

body.page-edits {
  overflow: auto;
  overflow-x: hidden;
  height: auto;
}

.edits-shell {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: max(1.1rem, env(safe-area-inset-top)) max(1.15rem, env(safe-area-inset-right)) max(1.4rem, env(safe-area-inset-bottom)) max(1.15rem, env(safe-area-inset-left));
}

.edits-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.edits-back {
  font-weight: 650;
  text-decoration: none;
  padding: 0.12em 0.5em 0.18em;
  border-radius: 7px;
  background: var(--cream);
}

.edits-kicker {
  font-family: var(--hand);
  font-size: 1.35rem;
  font-weight: 600;
  color: #444;
  text-align: right;
  line-height: 1.15;
}

.edits-frame {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  --frame: min(calc(100vw - 2.3rem), 22.5rem);
  width: var(--frame);
  margin: 0 auto;
  padding: 0.55rem 0.55rem 0.7rem;
  background: #fff;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.edits-nav {
  position: absolute;
  top: 36%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.edits-nav svg {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
}

.edits-nav-prev {
  left: 0.78rem;
}

.edits-nav-next {
  right: 0.78rem;
}

body.page-edits .reel {
  position: relative;
  flex: 1;
  height: min(72svh, 36rem);
  min-height: 28rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  border-radius: 18px;
  mask-image: none;
  -webkit-mask-image: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

body.page-edits .reel-track {
  flex-direction: row;
  align-items: stretch;
  width: max-content;
  height: 100%;
  gap: 0;
}

body.page-edits .card {
  align-items: center;
  flex: 0 0 calc(var(--frame) - 1.1rem);
  width: calc(var(--frame) - 1.1rem);
  height: 100%;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

body.page-edits .card-frame {
  /* Height comes from the available space; width is then derived from 9/16 so
     the whole frame shows uncropped. If the viewport is too short for that to
     leave a usable width, min-width wins, the ratio breaks, and the video
     crops top/bottom as before. */
  flex: 1;
  min-height: 0;
  width: auto;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  min-width: min(100%, 15rem);
  border-radius: 16px;
}

body.page-edits .card-caption {
  align-self: stretch;
  display: block;
  padding: 0.55rem 0.2rem 0.15rem;
}

body.page-edits .card-hint {
  display: block;
}

@media (hover: none) {
  body.page-edits .card.is-playing .card-hint {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .polaroid {
    animation: none;
    transition: none;
  }
}

/* ---------- card click targets ---------- */
.card-frame {
  cursor: pointer;
}

.card:hover .card-hint {
  pointer-events: auto;
}

.card-hint {
  cursor: pointer;
  text-decoration: none;
}

.card-frame:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- in-site video player ---------- */
.vp[hidden] {
  display: none !important;
}

.vp {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.6rem, 3vw, 2.2rem);
}

.vp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 14, 0.9);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 0.42s ease;
}

.vp.is-open .vp-backdrop {
  opacity: 1;
}

.vp-stage {
  position: relative;
  height: min(86vh, 880px);
  aspect-ratio: 9 / 16;
  transform-origin: 0 0;
  will-change: transform;
}

@media (max-width: 620px) {
  .vp-stage {
    width: 100%;
    height: auto;
  }
}

.vp-frame {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.vp-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vp-frame:fullscreen {
  border-radius: 0;
}

.vp-frame:fullscreen .vp-video {
  object-fit: contain;
}

/* caption on top */
.vp-head {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  padding: 0.85rem 1rem 2.2rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.vp-head strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.vp-head span {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 1px;
}

/* control bar */
.vp-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.4rem 0.75rem 0.7rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.28s ease;
}

.vp.is-idle .vp-head,
.vp.is-idle .vp-controls {
  opacity: 0;
}

.vp:not(.is-idle) .vp-head,
.vp:not(.is-idle) .vp-controls {
  opacity: 1;
}

.vp-scrub {
  position: relative;
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.vp-scrub::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
}

.vp-progress {
  position: relative;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  width: 0%;
}

.vp-progress::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%) scale(0);
  transition: transform 0.18s ease;
}

.vp-scrub:hover .vp-progress::after {
  transform: translateY(-50%) scale(1);
}

.vp-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.vp-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.vp-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.vp-btn:active {
  transform: scale(0.92);
}

.vp-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  pointer-events: none;
}

.vp-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.82);
  font-variant-numeric: tabular-nums;
  margin-left: 0.25rem;
  white-space: nowrap;
}

.vp-spacer {
  flex: 1;
}

.vp-open {
  font-size: 11px;
  font-weight: 600;
  color: #111;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.3rem 0.68rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease;
}

.vp-open:hover {
  transform: translateY(-1px);
}

/* close + side nav */
.vp-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 0.6rem);
  right: 0.7rem;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.2s ease;
}

.vp.is-open .vp-close {
  opacity: 1;
}

.vp-close:hover {
  background: rgba(255, 255, 255, 0.26);
}

.vp-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.vp-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease, background 0.2s ease;
}

.vp.is-open .vp-nav {
  opacity: 1;
}

.vp-nav:hover {
  background: rgba(255, 255, 255, 0.26);
}

.vp-nav svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.vp-prev {
  left: clamp(0.4rem, 3vw, 2rem);
}

.vp-next {
  right: clamp(0.4rem, 3vw, 2rem);
}

@media (max-width: 620px) {
  .vp-nav {
    width: 38px;
    height: 38px;
    top: auto;
    bottom: -54px;
    transform: none;
  }
  .vp-prev {
    left: 32%;
  }
  .vp-next {
    right: 32%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vp-backdrop,
  .vp-head,
  .vp-controls {
    transition: none;
  }
}

/* ---------- inline sound toggle (touch devices, edits page) ---------- */
.card-sound {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 3;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  cursor: pointer;
  display: none;
  place-items: center;
  transition: background 0.2s ease, transform 0.18s ease;
}

.card-sound:active {
  transform: scale(0.9);
}

.card-sound svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  pointer-events: none;
}

@media (hover: none) {
  /* only where clips actually autoplay */
  body.page-edits .card-sound {
    display: grid;
  }
  /* the pill is visible here, so it has to be tappable too */
  body.page-edits .card.is-playing .card-hint {
    pointer-events: auto;
  }
}

/* secondary intro copy: desktop and tablet only */
@media (max-width: 620px) {
  .intro-aside {
    display: none;
  }
}

/* ---------- edits page on phones: no titles, no wasted white ---------- */
@media (max-width: 620px) {
  /* the caption is redundant on a phone — give its space to the clip */
  body.page-edits .card-caption {
    display: none;
  }

  .edits-frame {
    /* Take every pixel left under the header, but never more than a full 9:16
       clip needs. At or above that height the clip is exactly 9:16 with no
       white space below it; under it, the clip fills the space and crops
       top/bottom by only as much as the screen is actually short. */
    flex: 1;
    max-height: calc((var(--frame) - 1.1rem) * 16 / 9 + 1.25rem);
    /* auto margins soak up whatever height is left over, so the card sits
       centred under the header instead of hugging the top */
    margin: auto;
  }

  /* centre the arrows on the clip rather than a third of the way down */
  .edits-nav {
    top: 50%;
    transform: translateY(-50%);
  }

  body.page-edits .reel {
    flex: 1;
    height: auto;
    min-height: 0;
  }

  body.page-edits .card-frame {
    flex: 1;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}

/* ---------- person hover cards (pointer devices only) ---------- */
.tip-person a.chip {
  cursor: pointer;
}

.tip-card-person {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: max-content;
  min-width: 0;
  padding: 0.6rem 0.8rem;
}

/* bridges the gap between chip and card so the cursor can reach the link */
.tip-card-person::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.9rem;
}

.tip-card-person img {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #ece8df;
}

.person-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.person-link {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--mint);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease;
}

.person-link:hover {
  transform: translateY(-1px);
}

/* the card holds a link, so it has to accept the pointer once open */
.tip-person:hover .tip-card-person,
.tip-person:focus-within .tip-card-person {
  pointer-events: auto;
}

/* no hover on touch, so no card - the chip stays a plain link there */
@media (hover: none) {
  .tip-person .tip-card-person {
    display: none;
  }
}
