.hero-video {
  object-position: center 35%;
  transform: scale(1.4);
}

.manga {
  background: #ebe5d8;
  color: var(--ink);
  padding-top: 145px;
  padding-bottom: 130px;
}

.manga-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 62px;
}

.manga-head h2 {
  margin: 0;
  font: 400 clamp(36px, 4.2vw, 64px)/1.45 var(--serif);
  letter-spacing: .08em;
}

.manga-head div > p {
  margin: 18px 0 0;
  font-size: 14px;
}

.manga-layout {
  display: grid;
  grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr);
  gap: clamp(28px, 7vw, 110px);
  align-items: start;
}

.manga-copy {
  position: sticky;
  top: 118px;
  padding-top: 28px;
  border-top: 1px solid #bfa774;
}

.manga-number,
.manga-copy span,
.manga-note {
  color: #98753d;
  font: 10px "DM Mono", monospace;
  letter-spacing: .15em;
}

.manga-copy h3 {
  margin: 25px 0 22px;
  font: 400 27px/1.65 var(--serif);
  letter-spacing: .06em;
}

.manga-copy > p:not(.manga-number) {
  margin: 0 0 28px;
  font-size: 13px;
  line-height: 2.1;
}

.manga-reader {
  height: min(760px, 74vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f8f5ed;
  border: 1px solid rgba(8, 21, 32, .16);
  box-shadow: 18px 20px 0 rgba(8, 21, 32, .06);
  scrollbar-color: #a98550 #ddd4c3;
  scrollbar-width: thin;
}

.manga-reader:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.manga-reader img {
  display: block;
  width: 100%;
  height: auto;
}

.manga-pages {
  position: relative;
}

.manga-bubble {
  position: absolute;
  right: 4.5%;
  z-index: 1;
  width: 34%;
  margin: 0;
  padding: clamp(8px, 1.15vw, 15px) clamp(8px, 1.2vw, 17px);
  border: 1px solid rgba(8, 21, 32, .35);
  border-radius: 50%;
  background: rgba(255, 253, 248, .94);
  color: #0b1b2a;
  font-family: var(--serif);
  font-size: clamp(10px, 1.05vw, 15px);
  line-height: 1.55;
  letter-spacing: .04em;
  text-align: center;
  filter: drop-shadow(0 4px 6px rgba(8, 21, 32, .07));
}

.manga-bubble::after {
  content: '';
  position: absolute;
  left: -7px;
  bottom: 16%;
  width: 13px;
  height: 13px;
  border-bottom: 1px solid rgba(8, 21, 32, .35);
  border-left: 1px solid rgba(8, 21, 32, .35);
  background: #fffdf8;
  transform: rotate(45deg);
}

.bubble-1 { top: 4%; right: 5%; }
.bubble-2 { top: 20%; right: 6%; }
.bubble-3 { top: 35.5%; right: 4%; }
.bubble-4 { top: 51%; right: 5.5%; }
.bubble-5 { top: 67%; right: 4%; }
.bubble-6 { top: 84%; right: 5.5%; }

.manga-note {
  margin: 25px 0 0;
  text-align: right;
}

@media (max-width: 760px) {
  .manga {
    padding-top: 95px;
    padding-bottom: 78px;
  }

  .manga-head {
    display: block;
    margin-bottom: 42px;
  }

  .manga-head .eyebrow {
    margin-bottom: 24px;
  }

  .manga-head h2 {
    font-size: 34px;
  }

  .manga-layout {
    display: block;
  }

  .manga-copy {
    position: static;
    margin-bottom: 30px;
    padding-top: 20px;
  }

  .manga-copy h3 {
    margin: 17px 0;
    font-size: 24px;
  }

  .manga-reader {
    height: 68vh;
    min-height: 500px;
    box-shadow: 10px 12px 0 rgba(8, 21, 32, .06);
  }

  .manga-bubble {
    right: 3.5%;
    width: 36%;
    font-size: 10px;
    line-height: 1.45;
  }
}

/* Portrait story panels */
.manga-reader {
  height: auto;
  min-height: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.manga-pages {
  position: static;
  display: grid;
  gap: 30px;
}

.manga-panel {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #e8e1d3;
  box-shadow: 14px 16px 0 rgba(8, 21, 32, .06);
}

.manga-panel img {
  display: block;
  width: 100%;
  height: auto;
}

.manga-panel .manga-bubble {
  top: 7%;
  right: 5%;
  width: 68%;
  max-width: 560px;
  box-sizing: border-box;
  padding: 19px 25px;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.55;
}

.manga-panel:nth-child(2) .manga-bubble { top: 9%; right: 5%; }
.manga-panel:nth-child(3) .manga-bubble { top: 6%; right: 5%; }
.manga-panel:nth-child(4) .manga-bubble { top: 6%; right: 5%; }
.manga-panel:nth-child(5) .manga-bubble { top: 6%; right: 4%; }
.manga-panel:nth-child(6) .manga-bubble { top: 7%; right: 5%; }

.manga-panel .manga-speaker {
  display: table;
  margin: 0 auto 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #102435;
  color: #fff;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .12em;
}

.manga-panel .character-label {
  position: absolute;
  z-index: 2;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 2px;
  background: rgba(16, 36, 53, .93);
  box-shadow: 0 5px 12px rgba(8, 21, 32, .16);
  color: #fff;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .13em;
  line-height: 1;
}

.manga-panel .character-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: 38px;
  background: var(--gold);
  box-shadow: 0 38px 0 -4px var(--gold);
}

.manga-panel:nth-child(1) .label-couple { top: 32%; left: 68%; }
.manga-panel:nth-child(3) .label-wife { top: 28%; left: 62%; }
.manga-panel:nth-child(4) .label-designer { top: 29%; left: 27%; }
.manga-panel:nth-child(6) .label-newhome { top: 48%; left: 55%; }

.manga-panel .bubble-customer {
  border-radius: 52% 48% 49% 51% / 46% 47% 53% 54%;
}

.manga-panel .bubble-staff,
.manga-panel .bubble-craft {
  border-radius: 25px 25px 25px 6px;
  text-align: left;
}

.manga-panel .bubble-staff {
  text-align: center;
}

.manga-panel .bubble-staff .manga-speaker,
.manga-panel .bubble-craft .manga-speaker {
  margin-left: 0;
}

.manga-panel .bubble-staff .manga-speaker {
  margin-right: auto;
  margin-left: auto;
}

.manga-panel .bubble-craft {
  border-color: rgba(131, 91, 43, .52);
  background: rgba(255, 249, 235, .96);
}

.manga-panel .bubble-craft .manga-speaker {
  background: #795129;
}

.manga-panel .bubble-from-left::after {
  z-index: 0;
  left: var(--tail-x, 18%);
  bottom: -29px;
  width: 34px;
  height: 32px;
  border: 0;
  background: rgba(8, 21, 32, .35);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
}

.manga-panel .bubble-from-left::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: var(--tail-x, 18%);
  bottom: -25px;
  width: 28px;
  height: 27px;
  background: #fffdf8;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
}

.manga-panel .bubble-from-bottom::after {
  left: var(--tail-x, 68%);
  bottom: -29px;
  width: 34px;
  height: 32px;
  border: 0;
  background: #fffdf8;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
}

.manga-panel .bubble-craft::after {
  background: #fff9eb;
}

.manga-panel .bubble-craft::before {
  background: #fff9eb;
}

.manga-panel:nth-child(1) .manga-bubble { top: 14%; right: 8%; --tail-x: 64%; }
.manga-panel:nth-child(2) .manga-bubble { top: 6%; right: 6%; --tail-x: 12%; }
.manga-panel:nth-child(3) .manga-bubble { top: 5%; right: 12%; --tail-x: 60%; }
.manga-panel:nth-child(4) .manga-bubble {
  top: 6%;
  right: auto;
  left: 4%;
  --tail-x: 31%;
}
.manga-panel:nth-child(5) .manga-bubble { top: 7%; right: 5%; --tail-x: 16%; }
.manga-panel .bubble-vertical {
  top: 6%;
  right: 4%;
  left: auto;
  z-index: 3;
  width: 128px;
  min-height: 252px;
  max-width: none;
  padding: 20px 16px;
  border-radius: 5px;
  background: rgba(255, 253, 248, .94);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.5;
  letter-spacing: .1em;
  text-align: start;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  pointer-events: none;
}

.manga-panel .bubble-vertical::after {
  display: none;
}

.manga-panel:nth-child(1) .bubble-from-bottom::after {
  z-index: 0;
  bottom: -120px;
  width: 44px;
  height: 124px;
  background: rgba(8, 21, 32, .35);
}

.manga-panel:nth-child(1) .bubble-from-bottom::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: var(--tail-x, 68%);
  bottom: -116px;
  width: 38px;
  height: 119px;
  background: #fffdf8;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
}

.manga-panel:nth-child(1) .bubble-from-bottom .manga-speaker {
  position: relative;
  z-index: 2;
}

.manga-panel:nth-child(4) .bubble-from-left::after {
  bottom: -71px;
  width: 40px;
  height: 75px;
}

.manga-panel:nth-child(4) .bubble-from-left::before {
  bottom: -67px;
  width: 34px;
  height: 70px;
}

.manga-panel:nth-child(3) .bubble-from-left::after {
  bottom: -100px;
  width: 40px;
  height: 104px;
}

.manga-panel:nth-child(3) .bubble-from-left::before {
  bottom: -96px;
  width: 34px;
  height: 99px;
}

.manga-panel figcaption {
  position: static;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 15px;
  row-gap: 6px;
  margin: 0;
  padding: 22px 24px 24px;
  color: var(--ink);
  background: #f7f2e9;
  font-family: var(--sans);
}

.manga-panel figcaption span {
  color: var(--gold);
  grid-row: 1 / span 2;
  padding-top: 2px;
  font: 13px "DM Mono", monospace;
  letter-spacing: .14em;
}

.manga-panel figcaption b {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .1em;
}

.manga-panel figcaption p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .04em;
}

@media (max-width: 760px) {
  .manga-pages { gap: 20px; }

  .manga-panel { box-shadow: 8px 10px 0 rgba(8, 21, 32, .06); }

  .manga-panel .manga-bubble {
    width: 80%;
    max-width: none;
    padding: 17px 20px;
    font-size: 20px;
    line-height: 1.55;
  }

  .manga-panel .manga-speaker {
    margin-bottom: 7px;
    padding: 4px 9px;
    font-size: 10px;
  }

  .manga-panel .character-label {
    padding: 6px 9px;
    font-size: 10px;
  }

  .manga-panel .character-label::after {
    height: 28px;
    box-shadow: 0 28px 0 -4px var(--gold);
  }

  .manga-panel:nth-child(1) .bubble-from-bottom::after {
    bottom: -100px;
    width: 40px;
    height: 104px;
  }

  .manga-panel:nth-child(1) .bubble-from-bottom::before {
    bottom: -96px;
    width: 34px;
    height: 99px;
  }

  .manga-panel:nth-child(4) .bubble-from-left::after {
    bottom: -61px;
    width: 36px;
    height: 65px;
  }

  .manga-panel:nth-child(4) .bubble-from-left::before {
    bottom: -57px;
    width: 30px;
    height: 60px;
  }

  .manga-panel:nth-child(3) .bubble-from-left::after {
    bottom: -86px;
    width: 36px;
    height: 90px;
  }

  .manga-panel:nth-child(3) .bubble-from-left::before {
    bottom: -82px;
    width: 30px;
    height: 85px;
  }

  .manga-panel .bubble-vertical {
    top: 5%;
    right: 4%;
    width: 98px;
    min-height: 210px;
    padding: 16px 12px;
    font-size: 16px;
    line-height: 1.45;
    letter-spacing: .08em;
  }

  .manga-panel figcaption {
    column-gap: 14px;
    padding: 21px 19px 22px;
  }

  .manga-panel figcaption span {
    font-size: 12px;
  }

  .manga-panel figcaption b {
    font-size: 18px;
  }

  .manga-panel figcaption p {
    font-size: 16px;
    line-height: 1.75;
  }
}

/* Use a single outlined tail that overlaps the bubble edge, so the dialogue reads as one shape. */
.manga-panel .bubble-from-left::after,
.manga-panel .bubble-from-bottom::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 104' preserveAspectRatio='none'%3E%3Cpath d='M1 0L20 103L39 0' fill='%23fffdf8' stroke='%23081532' stroke-opacity='.35' stroke-width='1.5'/%3E%3C/svg%3E") center top / 100% 100% no-repeat;
  clip-path: none;
}

.manga-panel .bubble-from-left::before,
.manga-panel .bubble-from-bottom::before {
  display: none;
}
