.lesson-five-page {
  --lesson-five-blue: #075a9e;
  --lesson-five-green: #079b55;
  --lesson-five-red: #ed3153;
  --lesson-five-yellow: #ffd21e;
}

.lesson-five-page .lower-lesson-progress-header__title {
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  padding-inline: 22px;
  font-size: 1rem;
  white-space: nowrap;
}

.lesson-five-page .lesson-five-hero {
  min-height: 200px;
  grid-template-columns: 150px minmax(0, 1fr) 240px;
  gap: 0;
}

.lesson-five-page .lesson-five-hero .lower-story-hero__copy {
  padding: 25px 82px 18px;
}

.lesson-five-page .lesson-five-hero .lower-story-hero__copy h1 {
  margin-bottom: 6px;
  font-size: clamp(1.5rem, 2.6vw, 2.35rem);
}

.lesson-five-page .lesson-five-hero .lower-story-hero__copy p {
  width: 100%;
  font-size: 1rem;
  line-height: 1.35;
}

.lesson-five-page .lesson-five-hero .lower-story-hero__description {
  position: static;
}

.lesson-five-page .lesson-five-hero .lower-story-hero__visuals {
  display: flex;
  align-items: end;
}

.lesson-five-page .lesson-five-hero .lesson-five-hero__girl,
.lesson-five-page .lesson-five-hero .lesson-five-hero__phone {
  width: 50%;
  max-height: 215px;
  object-fit: contain;
}

.lesson-five-page .lesson-five-hero .lower-story-hero__decoration {
  width: 10%;
}

.lesson-five-page .lesson-five-hero .lower-story-hero__decoration--left {
  left: 2%;
}

.lesson-five-page .lesson-five-hero .lower-story-hero__decoration--right {
  right: 2%;
}

.lesson-five-page--purchase .lower-story-stage {
  min-height: 960px;
}

.lesson-five-page--purchase .lower-story-stage__inner {
  width: min(calc(100% - 48px), 1260px);
}

.lesson-five-page--purchase .lesson-five-hero {
  margin-top: 22px;
  min-height: 210px;
  grid-template-columns: 150px minmax(0, 1fr) 240px;
}

.lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy {
  display: grid;
  padding: 34px 84px 20px;
  align-content: center;
}

.lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy > span {
  top: -28px;
  left: 24px;
  display: grid;
  width: 144px;
  height: 72px;
  padding: 0;
  place-items: center;
  isolation: isolate;
  background: transparent;
  border-radius: 0;
  font-size: 1.125rem;
  transform: rotate(-12deg);
}

.lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy > span::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("../images/learning/lower/ribbon-blank.png") center / contain no-repeat;
  /* Match the overview ribbon: rotate lettering, not the supplied artwork. */
  transform: rotate(12deg);
  content: "";
  pointer-events: none;
}

.lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy h1 {
  margin: 0 0 7px;
  line-height: 1.3;
}

.lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy p {
  font-size: 1.0625rem;
  line-height: 1.4;
}

.lesson-five-page--purchase .lesson-five-hero .lower-story-hero__decoration {
  top: 66%;
}

.lesson-five-page--purchase .lesson-five-hero .lower-story-hero__person {
  width: 150px;
  max-height: 210px;
}

.lesson-five-page--purchase .lesson-five-hero .lower-story-hero__visuals {
  min-height: 210px;
  gap: 8px;
}

.lesson-five-page--purchase .lesson-five-hero .lesson-five-hero__girl,
.lesson-five-page--purchase .lesson-five-hero .lesson-five-hero__phone {
  width: calc(50% - 4px);
  max-height: 210px;
}

.lesson-five-page--purchase .lesson-five-flow {
  width: 100%;
  margin: 12px auto 0;
  padding: 24px;
  gap: 24px;
}

.lesson-five-page--purchase .lesson-five-flow li {
  min-height: 0;
  padding: 12px 8px 8px;
  grid-template-rows: 64px 190px minmax(88px, auto);
  align-items: center;
}

.lesson-five-page--purchase .lesson-five-flow h2 {
  width: 100%;
  min-height: 0;
  padding-left: 52px;
  font-size: 1rem;
  line-height: 1.4;
  align-self: start;
}

.lesson-five-page--purchase .lesson-five-flow li > p {
  display: grid;
  min-height: 88px;
  margin: 0;
  padding: 8px;
  align-content: center;
  font-size: .8125rem;
  line-height: 1.5;
}

.lesson-five-page--purchase .lesson-five-flow li:not(:last-child)::after {
  right: -23px;
  width: 20px;
  height: 24px;
  background: #33b3fa;
  clip-path: polygon(0 30%, 52% 30%, 52% 0, 100% 50%, 52% 100%, 52% 70%, 0 70%);
  content: "";
}

.lesson-five-page--purchase .lesson-five-footer {
  width: 100%;
  padding: 0;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 16px;
  align-items: end;
  background: transparent;
  border-radius: 0;
}

.lesson-five-page--purchase .lesson-five-footer__panel {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 125px;
  padding: 12px 16px 12px 140px;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 16px;
  align-items: center;
  background: #fff9ec;
  border: 2px solid #ffc107;
  border-radius: 16px;
}

.lesson-five-page--purchase .lesson-five-footer__character {
  position: absolute;
  left: 18px;
  bottom: 0;
  width: 110px;
  height: auto;
  max-height: 135px;
  object-fit: contain;
}

.lesson-five-page--purchase .lesson-five-footer__panel > .lower-story-point {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lesson-five-page--purchase .lesson-five-footer__panel .lower-story-point h2:empty {
  display: none;
}

.lesson-five-page--purchase .lesson-five-footer__panel .lower-story-point ul {
  font-size: 1.4rem;
  line-height: 1.4;
}

.lesson-five-page--purchase .lesson-five-footer__panel .lower-story-point li::before {
  display: none;
}

.lesson-five-page--purchase .lesson-five-footer__note {
  margin: 0;
  padding: 16px 10px;
  align-self: center;
  background: #fff;
  border: 1px solid #ffd2d2;
  border-radius: 45%;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.lesson-five-page--purchase .lesson-five-footer .lower-story-point li strong {
  /* Compensate for the opening Japanese bracket's half-em side bearing. */
  margin-inline-start: -.5em;
}

@media (min-width: 1001px) {
  .lesson-five-page--purchase .lesson-five-footer .lower-story-next-guide {
    align-self: end;
  }
}

.lesson-five-page--overview .lower-story-stage {
  min-height: 960px;
  padding-bottom: 18px;
}

.lesson-five-page--overview .lower-story-stage__inner {
  width: min(calc(100% - 48px), 1260px);
}

.lesson-five-page--overview .lower-story-hero {
  min-height: 158px;
  margin-top: 20px;
  grid-template-columns: 135px minmax(0, 1fr) 275px;
  gap: 0;
}

.lesson-five-page--overview .lower-story-hero__person {
  width: 132px;
  max-height: 160px;
}

.lesson-five-page--overview .lower-story-hero__visuals {
  display: flex;
  height: 164px;
  align-items: end;
  justify-content: center;
  gap: 2px;
}

.lesson-five-page--overview .lesson-five-hero__girl {
  width: 122px;
  max-height: 158px;
  object-fit: contain;
}

.lesson-five-page--overview .lesson-five-hero__phone {
  width: 126px;
  max-height: 164px;
  object-fit: contain;
}

.lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy {
  display: grid;
  padding: 27px 122px;
  place-content: center;
}

.lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy > span {
  top: -28px;
  left: 24px;
  display: grid;
  width: 144px;
  height: 72px;
  padding: 0;
  place-items: center;
  isolation: isolate;
  background: transparent;
  border-radius: 0;
  font-size: 1.125rem;
  transform: rotate(-12deg);
}

.lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy > span::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("../images/learning/lower/ribbon-blank.png") center / contain no-repeat;
  /* The supplied artwork already slopes; only the HTML lettering is rotated. */
  transform: rotate(12deg);
  content: "";
  pointer-events: none;
}

.lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(1.5rem, 2.8vw, 2.55rem);
  line-height: 1.35;
}

.lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__description {
  position: static;
}

.lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__description > p {
  display: none;
}

.lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--left {
  left: 7%;
  top: 50%;
  width: 8%;
}

.lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--right {
  right: 7%;
  top: 50%;
  width: 8%;
}

.lesson-five-game {
  width: min(100%, 1260px);
  position: relative;
  margin: 8px auto 0;
}

.lesson-five-game__screen {
  display: grid;
  min-height: 0;
  padding: 20px 32px;
  grid-template-columns: minmax(0, 510px) minmax(0, 450px);
  align-items: start;
  justify-content: center;
  gap: 54px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 8px 22px rgb(25 40 151 / 8%);
}

.lesson-five-game__items h2,
.lesson-five-game__money > h2 {
  position: relative;
  margin: 0 0 8px;
  color: var(--lesson-five-blue);
  font-size: 1.125rem;
  line-height: 1.35;
  text-align: center;
}

.lesson-five-game__items h2 {
  padding: 5px 18px;
  color: #fff;
  background: #1463b0;
  clip-path: polygon(3% 0, 97% 0, 94% 50%, 97% 100%, 3% 100%, 6% 50%);
}

.lesson-five-game__money > h2::before,
.lesson-five-game__money > h2::after {
  min-width: 12px;
  flex: 1;
  border-top: 3px dotted var(--lesson-five-green);
  content: "";
}

.lesson-five-game__money > h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  white-space: nowrap;
}

.lesson-five-game__item-grid {
  display: grid;
  width: min(100%, 416px);
  margin-inline: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.lesson-five-game__item-card {
  display: grid;
  min-height: 180px;
  padding: 12px 10px;
  grid-template-rows: auto 1fr;
  place-items: center;
  background: #fff;
  border: 1px solid #f2c75c;
  border-radius: 13px;
}

.lesson-five-game__item-card h3 {
  min-height: 38px;
  margin: 0;
  color: #162b58;
  font-size: .875rem;
  line-height: 1.35;
  text-align: center;
  max-width: 7em;
}

.lesson-five-game__item-card img {
  width: 100%;
  height: 110px;
  object-fit: contain;
}

.lesson-five-game__money-card {
  position: relative;
  width: min(100%, 370px);
  margin-inline: auto;
  padding: 6px 14px 10px;
  background: #fff;
  border: 2px solid;
  border-radius: 12px;
  text-align: center;
}

.lesson-five-game__money-card h3 {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 8px;
  padding: 4px 18px;
  color: #fff;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1.2;
}

.lesson-five-game__money-card img {
  display: block;
  width: min(100%, 240px);
  height: 96px;
  margin-inline: auto;
  object-fit: contain;
}

.lesson-five-game__money-card p {
  margin: 6px 0 0;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1.45;
}

.lesson-five-game__money-card--coin {
  border-color: #59b963;
  background: #f4fff4;
}

.lesson-five-game__money-card--coin h3 {
  background: #079b55;
}

.lesson-five-game__money-card--yen {
  border-color: #ff6f78;
  background: #fff7f7;
}

.lesson-five-game__money-card--yen h3 {
  background: #ee3947;
}

.lesson-five-game__money-card--yen img {
  width: min(100%, 280px);
  height: 56px;
}

.lesson-five-game__money-card--yen p strong {
  color: #e3343e;
}

.lesson-five-game__money-arrow {
  display: block;
  width: 0;
  height: 0;
  margin: 3px auto 7px;
  border-top: 18px solid #ef6a55;
  border-right: 12px solid transparent;
  border-left: 12px solid transparent;
}

.lesson-five-game__footer {
  display: flex;
  margin-top: 6px;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.lesson-five-game__point {
  display: grid;
  width: min(100%, 650px);
  min-height: 112px;
  padding: 8px 26px 8px 14px;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  background: rgb(255 255 255 / 96%);
  border: 2px solid #f2b51e;
  border-radius: 16px;
}

.lesson-five-game__point > img {
  width: 100px;
  max-height: 114px;
  object-fit: contain;
}

.lesson-five-game__point .lesson-five-game-point {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.lesson-five-game__point .lesson-five-game-point h2 {
  position: static;
  margin: 0 0 2px;
  padding: 0;
  color: #222;
  background: transparent;
  font-size: 1rem;
}

.lesson-five-game__point .lesson-five-game-point ul {
  font-size: 1.4rem;
  line-height: 1.35;
}

.lesson-five-game__point .lesson-five-game-point li::before {
  display: none;
}

.lesson-five-game__footer > .lower-story-next {
  flex: 0 0 auto;
  margin: 0 0 0 auto;}

@media (min-width: 1201px) {

  .lesson-five-page .lower-lesson-progress-header {
    grid-template-columns: 430px 480px minmax(0, 1fr);
    gap: 12px;
  }

  .lesson-five-page .lower-lesson-progress-header__title {
    width: calc(100% + 32px);
    max-width: none;
  }

  .lesson-five-page .lower-lesson-progress-header__steps {
    width: 480px;
    justify-self: start;
  }

}

.lesson-five-flow {
  display: grid;
  width: min(100%, 1180px);
  margin: 14px auto;
  padding: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px;
  list-style: none;
  background: #fff;
  border-radius: 28px;
}

.lesson-five-flow h2 {
  min-height: 48px;
  margin: 0;
  padding-left: 45px;
  font-size: 1rem;
  line-height: 1.35;
}

.lesson-five-flow li > p,
.lesson-five-steps > li > p {
  width: 100%;
  margin: 8px 0 0;
  padding: 10px 8px;
  border: 1px solid #ffe4a5;
  border-radius: 12px;
  background: #fff8e8;
  font-size: .875rem;
  font-weight: 700;
  text-align: center;
}

.lesson-five-flow--gacha h2 {
  padding-left: 0;
  text-align: center;
}

.lesson-five-flow--gacha h2 b {
  display: inline-grid;
  width: 36px;
  height: 36px;
  margin-right: 8px;
  place-items: center;
  border-radius: 50%;
  background: #003bb5;
  color: #fff;
}

.lesson-five-flow--gacha li:last-child h2 {
  padding: 8px;
  border-radius: 6px;
  background: #ff5073;
  color: #fff;
}

.lesson-five-flow--gacha {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.lesson-five-flow li {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 310px;
  padding: 12px 8px 8px;
  place-items: center;
  background: rgb(255 255 255 / 94%);
  border: 1px solid #ffe1e9;
  border-radius: 18px;
  box-shadow: 0 7px 18px rgb(25 40 151 / 9%);
}

.lesson-five-flow li:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -20px;
  color: #33b3fa;
  content: "▶";
  font-size: 1.6rem;
  transform: translateY(-50%);
}

.lesson-five-flow li > b {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  color: #fff;
  background: #ff2866;
  border: 3px solid #fff;
  border-radius: 50%;
  font-size: 1.25rem;
}

.lesson-five-flow img {
  width: 100%;
  height: 190px;
  max-height: 245px;
  object-fit: contain;
}

.lesson-five-footer {
  display: grid;
  position: relative;
  width: min(100%, 1180px);
  min-height: 125px;
  margin: 12px auto 0;
  padding: 10px 18px 10px 140px;
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: center;
  gap: 24px;
  background: #fff8e8;
  border-radius: 18px;
}

.lesson-five-footer > .lower-story-point {
  padding: 0;
  border: 0;
  background: transparent;
}

.lesson-five-footer > .lower-story-point h2:empty {
  display: none;
}

.lesson-five-footer > .lower-story-point ul {
  font-size: 1.4rem;
  line-height: 1.4;
}

.lesson-five-footer > .lower-story-point li::before {
  display: none;
}

.lesson-five-footer .lower-story-next-guide {
  display: grid;
  gap: 8px;
}

.lesson-five-footer .lower-story-next-guide > div {
  position: absolute;
  left: 18px;
  bottom: 0;
  min-height: 0;
  background: transparent;
}

.lesson-five-footer .lower-story-next-guide > div > img:first-child {
  width: 110px;
  height: auto;
}

.lesson-five-steps {
  display: grid;
  width: min(100%, 1180px);
  margin: 14px auto 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}

.lesson-five-steps > li {
  position: relative;
  min-height: 255px;
  padding: 10px 12px;
  background: rgb(255 255 255 / 96%);
  border: 1px solid #e0e0e0;
  border-radius: 18px;
  text-align: center;
}

.lesson-five-steps > li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -21px;
  color: #33b3fa;
  content: "▶";
  font-size: 1.6rem;
}

.lesson-five-steps h2 {
  display: flex;
  min-height: 50px;
  margin: 0 0 10px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #222;
  font-size: 1rem;
}

.lesson-five-steps h2 b {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  color: #fff;
  background: #003bb5;
  border-radius: 50%;
}

.lesson-five-steps > li > img {
  width: 100%;
  height: 155px;
  object-fit: contain;
}

.lesson-five-steps__details {
  display: grid;
  width: min(100%, 1180px);
  margin: 10px auto 0;
  padding: 8px 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid #8bc7f1;
  border-radius: 16px;
  background: #fff;
}

.lesson-five-steps__details img {
  width: 80px;
  height: 65px;
  object-fit: contain;
}

.lesson-five-steps__details > h2 {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
  padding: 4px;
  background: #0874d2;
  color: #fff;
  font-size: 1rem;
}

.lesson-five-steps__details article {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  border: 1px solid #c3e3ff;
  border-radius: 12px;
  padding: 6px;
}

.lesson-five-steps__details p {
  margin: 0;
  font-size: .75rem;
  font-weight: 700;
}

.lesson-five-age {
  display: grid;
  width: min(100%, 1180px);
  margin: 14px auto;
  padding: 18px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  grid-template-areas: "notice notice" "app risks";
  align-items: center;
  gap: 18px 28px;
  background: #fff;
  border-radius: 28px;
}

.lesson-five-age__notice {
  grid-area: notice;
  margin: 0;
  padding: 6px;
  background: #e0edff;
  font-size: .75rem;
  text-align: center;
}

.lesson-five-age h2 {
  margin: 0 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #003bb5;
  color: #fff;
  font-size: .875rem;
  text-align: center;
}

.lesson-five-age__family {
  width: 220px;
  max-width: 100%;
}

.lesson-five-page--age-rule .lesson-five-footer {
  grid-template-columns: minmax(0, 1fr) 220px 285px;
  gap: 12px;
}

.lesson-five-age__app {
  width: 100%;
  max-height: 410px;
  grid-area: app;
  object-fit: contain;
}

.lesson-five-age__app > img {
  width: 100%;
  max-height: 290px;
  object-fit: contain;
}

.lesson-five-age__risks > h2,
.lesson-five-age__risks > .lower-story-point {
  grid-column: 1 / -1;
}

.lesson-five-age__risks article {
  min-width: 0;
  padding: 8px 4px;
  border-radius: 12px;
  background: #eff7ff;
  text-align: center;
}

.lesson-five-age__risks article p {
  margin: 4px 0 0;
  font-size: .6875rem;
  font-weight: 700;
}

.lesson-five-age__risks {
  display: grid;
  grid-area: risks;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.lesson-five-age__risks img {
  width: 100%;
  height: 70px;
  object-fit: contain;
}

.lesson-five-review-board .lower-review-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.lesson-five-review-board .lower-review-card__message {
  min-height: 76px;
  font-size: .875rem;}

.lesson-five-review-board .lower-review-card__image {
  height: 180px;
}

.lesson-five-review-board .lower-review-board__lead b {
  color: #075bcc;
}

.lesson-five-review-board .lower-review-board__lead i {
  color: #f34b4b;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero {
  display: grid;
  height: auto;
  min-height: 350px;
  padding: 18px 0;
  grid-template-columns: minmax(180px, .8fr) minmax(380px, 1.4fr) minmax(120px, .55fr);
  grid-template-areas: "boy message phone";
  align-items: center;
  gap: 22px;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__boy,
.lesson-complete-page.lesson-five-page .lesson-complete-hero__message,
.lesson-complete-page.lesson-five-page .lesson-complete-hero__phone {
  position: relative;
  inset: auto;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__boy {
  width: min(100%, 280px);
  grid-area: boy;
  justify-self: end;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__girl {
  display: none;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__message {
  width: 100%;
  min-height: 260px;
  grid-area: message;
  padding: 56px 60px;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__message--text p {
  color: #111;
  font-size: clamp(.9rem, 1.35vw, 1.2rem);
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__message--text p span:first-child,
.lesson-complete-page.lesson-five-page .lesson-complete-hero__message--text p span:nth-child(2) {
  color: #ef3038;
  font-size: clamp(1.55rem, 3vw, 2.8rem);
  line-height: 1.25;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__phone {
  width: min(100%, 150px);
  grid-area: phone;
}

.lesson-complete-page.lesson-five-page .lesson-complete-takeaway__notes {
  display: grid;
  padding: 48px 28px 22px;
  place-items: center;
}

.lesson-complete-page.lesson-five-page .lesson-complete-takeaway__notes p {
  position: static;
  width: min(100%, 440px);
  padding: 16px;
  border-radius: 28px;
  font-size: .95rem;
}

.lesson-complete-page.lesson-five-page .lesson-complete-actions__next {
  max-width: 430px;
  text-align: center;
}

@media (max-width: 1200px) {
  .lesson-five-review-board .lower-review-grid {
    grid-template-columns: repeat(5, 220px);
    overflow-x: auto;
  }
}

@media (max-width: 1000px) {
  .lesson-five-page--purchase .lower-story-stage {
    min-height: auto;
  }

  .lesson-five-page--purchase .lesson-five-hero {
    grid-template-columns: 100px minmax(0, 1fr) 150px;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy {
    padding-inline: 48px;
  }

  .lesson-five-page--purchase .lesson-five-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-five-page--purchase .lesson-five-footer .lower-story-next-guide {
    grid-column: 1 / -1;
    justify-self: end;
    width: min(100%, 330px);
  }

  .lesson-five-page--overview .lower-story-stage {
    min-height: auto;
  }

  .lesson-five-page--overview .lesson-five-game__screen {
    width: min(100%, 660px);
    margin-inline: auto;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .lesson-five-page--overview .lesson-five-game__footer {
    width: min(100%, 660px);
    margin: 12px auto 0;
    flex-direction: column;
  }

  .lesson-five-page--overview .lesson-five-game__footer > .lower-story-next {
    margin: 0 auto;}

  .lesson-five-flow,
  .lesson-five-flow--gacha {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lesson-five-flow li:not(:last-child)::after,
  .lesson-five-steps > li:not(:last-child)::after {
    display: none;
  }

  .lesson-five-steps {
    grid-template-columns: 1fr;
  }

  .lesson-five-steps > li {
    display: grid;
    min-height: 220px;
    grid-template-columns: minmax(180px, .8fr) 1fr;
    align-items: center;
  }

  .lesson-five-steps h2 {
    grid-column: 1 / -1;
  }

  .lesson-five-steps__details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lesson-five-steps__details img {
    width: 65px;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero {
    width: min(100%, 680px);
    margin-inline: auto;
    grid-template-columns: 180px minmax(0, 1fr);
    grid-template-areas: "boy message";
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero__phone {
    display: none;
  }
}

@media (max-width: 767px) {
  .lesson-five-page--overview .lower-story-stage__inner {
    width: min(calc(100% - 24px), 560px);
  }

  .lesson-five-page .lower-lesson-progress-header__title {
    white-space: normal;
    font-size: .8125rem;
  }

  .lesson-five-page .lesson-five-hero {
    grid-template-columns: 65px minmax(0, 1fr) 75px;
    min-height: 0;
    margin-top: 22px;
  }

  .lesson-five-page .lesson-five-hero .lower-story-hero__copy {
    padding: 24px 8px 52px;
  }

  .lesson-five-page .lesson-five-hero .lower-story-hero__copy h1 {
    font-size: 1rem;
  }

  .lesson-five-page .lesson-five-hero .lower-story-hero__copy p {
    font-size: .6875rem;
  }

  .lesson-five-page .lesson-five-hero .lower-story-hero__decoration {
    width: 28px;
  }

  .lesson-five-page .lesson-five-hero .lower-story-hero__person {
    width: 65px;
  }

  .lesson-five-page .lesson-five-hero .lesson-five-hero__girl,
  .lesson-five-page .lesson-five-hero .lesson-five-hero__phone {
    max-height: 100px;
  }

  .lesson-five-page--purchase .lower-story-stage__inner {
    width: min(calc(100% - 24px), 560px);
  }

  .lesson-five-page--purchase .lesson-five-hero {
    min-height: 0;
    grid-template-columns: 60px minmax(0, 1fr) 72px;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy {
    padding: 28px 8px 40px;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy > span {
    top: -14px;
    left: 8px;
    width: 90px;
    height: 45px;
    padding: 0;
    font-size: .6875rem;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy p {
    font-size: .6875rem;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__description {
    padding-bottom: 0;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__decoration {
    top: auto;
    bottom: 6px;
    transform: none;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__person {
    width: 60px;
    max-height: 100px;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__visuals {
    min-height: 0;
    gap: 4px;
  }

  .lesson-five-page--purchase .lesson-five-hero .lesson-five-hero__girl,
  .lesson-five-page--purchase .lesson-five-hero .lesson-five-hero__phone {
    width: calc(50% - 2px);
    max-height: 100px;
  }

  .lesson-five-page--purchase .lesson-five-flow {
    padding: 14px;
    gap: 14px;
    grid-template-columns: 1fr;
  }

  .lesson-five-page--purchase .lesson-five-flow li {
    grid-template-rows: 64px 190px minmax(88px, auto);
  }

  .lesson-five-page--purchase .lesson-five-footer {
    padding: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lesson-five-page--purchase .lesson-five-footer__panel {
    padding: 14px 12px 14px 86px;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lesson-five-page--purchase .lesson-five-footer__character {
    top: 8px;
    left: 8px;
    bottom: auto;
    width: 70px;
    max-height: 90px;
  }

  .lesson-five-page--purchase .lesson-five-footer__panel .lower-story-point ul {
    font-size: 1rem;
  }

  .lesson-five-page--purchase .lesson-five-footer .lower-story-next-guide {
    justify-self: center;
  }

  .lesson-five-flow h2 {
    min-height: 42px;
  }

  .lesson-five-footer,
  .lesson-five-page--age-rule .lesson-five-footer {
    padding: 14px 12px 14px 86px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lesson-five-footer > .lower-story-point ul {
    font-size: 1rem;
  }

  .lesson-five-footer .lower-story-next-guide > div {
    left: 8px;
    top: 8px;
    bottom: auto;
  }

  .lesson-five-footer .lower-story-next-guide > div > img:first-child {
    width: 70px;
  }

  .lesson-five-age__notice {
    font-size: .6875rem;
  }

  .lesson-five-page--overview .lower-story-hero {
    min-height: 105px;
    margin-top: 22px;
    grid-template-columns: 70px minmax(0, 1fr) 86px;
    gap: 2px;
  }

  .lesson-five-page--overview .lower-story-hero__person {
    width: 70px;
    max-height: 105px;
  }

  .lesson-five-page--overview .lower-story-hero__visuals {
    display: flex;
    width: 86px;
    height: 108px;
    gap: 0;
  }

  .lesson-five-page--overview .lesson-five-hero__girl {
    width: 43px;
    max-height: 100px;
  }

  .lesson-five-page--overview .lesson-five-hero__phone {
    width: 45px;
    max-height: 105px;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy {
    padding: 18px 12px 42px;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy h1 {
    font-size: clamp(.8rem, 4.1vw, 1rem);
    line-height: 1.35;
    white-space: normal;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy > span {
    top: -14px;
    left: 10px;
    width: 90px;
    height: 45px;
    padding: 0;
    font-size: .6875rem;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--left,
  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--right {
    top: auto;
    bottom: 16px;
    width: 24px;
    transform: none;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--left {
    left: 22%;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--right {
    right: 22%;
  }

  .lesson-five-page--overview .lesson-five-game {
    margin-top: 8px;
  }

  .lesson-five-page--overview .lesson-five-game__screen {
    min-height: 0;
    padding: 18px 12px 20px;
    gap: 26px;
    border-radius: 18px;
  }

  .lesson-five-page--overview .lesson-five-game__items h2,
  .lesson-five-page--overview .lesson-five-game__money > h2 {
    font-size: .875rem;
  }

  .lesson-five-page--overview .lesson-five-game__money > h2::before,
  .lesson-five-page--overview .lesson-five-game__money > h2::after {
    min-width: 8px;
  }

  .lesson-five-page--overview .lesson-five-game__money > h2 {
    gap: 6px;
  }

  .lesson-five-page--overview .lesson-five-game__item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .lesson-five-page--overview .lesson-five-game__item-card {
    min-height: 135px;
  }

  .lesson-five-page--overview .lesson-five-game__item-card h3 {
    font-size: .75rem;
  }

  .lesson-five-page--overview .lesson-five-game__item-card img {
    height: 80px;
  }

  .lesson-five-page--overview .lesson-five-game__money-card {
    padding-inline: 10px;
  }

  .lesson-five-page--overview .lesson-five-game__money-card p {
    font-size: .6875rem;
  }

  .lesson-five-page--overview .lesson-five-game__footer {
    gap: 12px;
  }

  .lesson-five-page--overview .lesson-five-game__point {
    min-height: 96px;
    padding: 8px 12px;
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .lesson-five-page--overview .lesson-five-game__point > img {
    width: 68px;
    max-height: 90px;
  }

  .lesson-five-page--overview .lesson-five-game__point .lesson-five-game-point h2 {
    font-size: .75rem;
  }

  .lesson-five-page--overview .lesson-five-game__point .lesson-five-game-point ul {
    font-size: 1rem;
  }

  .lesson-five-flow,
  .lesson-five-flow--gacha {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .lesson-five-flow li {
    min-height: 220px;
    padding: 14px;
  }

  .lesson-five-flow img {
    max-height: 210px;
  }

  .lesson-five-footer {
    grid-template-columns: 1fr;
  }

  .lesson-five-steps > li {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .lesson-five-steps > li > img {
    height: 160px;
  }

  .lesson-five-age {
    grid-template-columns: 1fr;
    grid-template-areas: "notice" "app" "risks";
  }

  .lesson-five-age__family {
    width: min(100%, 250px);
    justify-self: center;
  }

  .lesson-five-age__risks img {
    height: 58px;
  }

  .lesson-five-review-board .lower-review-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .lesson-five-review-board .lower-review-card__message {
    min-height: 0;}

  .lesson-five-review-board .lower-review-card__image {
    height: 135px;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero {
    min-height: 0;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 5px;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero__boy {
    width: 120px;
    margin: 0 -20px 0 0;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero__message {
    min-height: 220px;
    padding: 40px 24px;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero__message--text p {
    font-size: .72rem;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero__message--text p span:first-child,
  .lesson-complete-page.lesson-five-page .lesson-complete-hero__message--text p span:nth-child(2) {
    font-size: 1.2rem;
  }
}

/* Page6: reuse the shared review behavior, with lesson-local sizing. */
.lesson-five-page--review .lower-story-stage__inner {
  width: min(calc(100% - 48px), 1260px);
}

.lesson-five-page--review .lesson-five-hero {
  min-height: 190px;
  margin-top: 22px;
}

.lesson-five-page--review .lesson-five-hero .lower-story-hero__copy {
  display: grid;
  padding: 34px 84px 20px;
  align-content: center;
}

.lesson-five-page--review .lesson-five-hero .lower-story-hero__copy > span {
  top: -28px;
  left: 24px;
  display: grid;
  width: 144px;
  height: 72px;
  padding: 0;
  place-items: center;
  isolation: isolate;
  background: transparent;
  border-radius: 0;
  font-size: 1.125rem;
  transform: rotate(-12deg);
}

.lesson-five-page--review .lesson-five-hero .lower-story-hero__copy > span::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("../images/learning/lower/ribbon-blank.png") center / contain no-repeat;
  /* Match Page2: rotate lettering, not the supplied artwork. */
  transform: rotate(12deg);
  content: "";
  pointer-events: none;
}

.lesson-five-page--review .lesson-five-hero .lower-story-hero__copy h1 {
  margin: 0 0 8px;
  line-height: 1.3;
}

.lesson-five-page--review .lesson-five-hero .lower-story-hero__copy p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.4;
}

.lesson-five-page--review .lesson-five-hero .lower-story-hero__decoration {
  top: 65%;
}

.lesson-five-page--review .lesson-five-hero .lower-story-hero__person {
  width: 150px;
  height: 190px;
  object-position: center bottom;
}

.lesson-five-page--review .lesson-five-hero .lower-story-hero__visuals {
  height: 210px;
  align-self: end;
  gap: 8px;
}

.lesson-five-page--review .lesson-five-hero .lesson-five-hero__girl,
.lesson-five-page--review .lesson-five-hero .lesson-five-hero__phone {
  width: calc(50% - 4px);
  height: 210px;
  object-position: center bottom;
}

.lesson-five-page--review .lesson-five-review-board {
  width: 100%;
  margin: 12px auto 0;
  padding: 18px;
}

.lesson-five-page--review .lower-review-board__lead {
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.5;
}

.lesson-five-page--review .lower-review-board__lead b,
.lesson-five-page--review .lower-review-board__lead i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

.lesson-five-page--review .lower-review-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.lesson-five-page--review .lower-review-card {
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(140px, auto) 220px auto;
  gap: 8px;}

.lesson-five-page--review .lower-review-card__message {
  min-height: 132px;
  font-size: .875rem;
  line-height: 1.5;}

.lesson-five-page--review .lower-review-card__image {
  width: 100%;
  height: 220px;
  object-fit: contain;
}

.lesson-five-page--review .lower-review-card__question > div {
  align-items: center;}

.lesson-five-page--review .lower-review-progress {
  margin-top: 20px;
  grid-template-columns: 140px minmax(0, 1fr) minmax(180px, .65fr) 250px;
  gap: 16px;
}

.lesson-five-page--review .lower-review-progress__guide {
  height: 135px;
}

@media (max-width: 1200px) {
  .lesson-five-page--review .lower-review-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    overflow-x: visible;
  }

  .lesson-five-page--review .lower-review-progress {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1200px) {
  .lesson-five-page--review .lower-review-progress {
    grid-template-columns: 90px minmax(0, 1fr) 280px;
    grid-template-areas:
      "guide stamps next"
      "guide count next";
  }

  .lesson-five-page--review .lower-review-progress__guide {
    grid-area: guide;
    height: auto;
  }

  .lesson-five-page--review .lower-review-progress__count {
    grid-area: count;
  }

  .lesson-five-page--review .lower-review-progress__next {
    grid-area: next;
  }
}

@media (max-width: 1000px) {
  .lesson-five-page--review .lesson-five-hero {
    grid-template-columns: 110px minmax(0, 1fr) 170px;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy {
    padding-inline: 45px;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__person {
    width: 110px;
    height: 170px;
  }
}

@media (max-width: 767px) {
  .lesson-five-page--review .lower-story-stage__inner {
    width: min(calc(100% - 24px), 560px);
  }

  .lesson-five-page--review .lesson-five-hero {
    min-height: 0;
    grid-template-columns: 65px minmax(0, 1fr) 75px;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy {
    padding: 34px 8px 48px;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy > span {
    top: -14px;
    left: 8px;
    width: 90px;
    height: 45px;
    padding: 0;
    font-size: .6875rem;
    transform: rotate(-12deg);
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy p {
    font-size: .6875rem;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__description {
    padding-bottom: 0;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__decoration {
    top: auto;
    bottom: 12px;
    width: 28px;
    transform: none;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__person {
    width: 65px;
    height: 100px;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__visuals {
    height: auto;
    gap: 2px;
  }

  .lesson-five-page--review .lesson-five-hero .lesson-five-hero__girl,
  .lesson-five-page--review .lesson-five-hero .lesson-five-hero__phone {
    width: calc(50% - 1px);
    height: 100px;
  }

  .lesson-five-page--review .lesson-five-review-board {
    padding: 12px;
  }

  .lesson-five-page--review .lower-review-grid {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .lesson-five-page--review .lower-review-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 200px auto;}

  .lesson-five-page--review .lower-review-card__message {
    min-height: 0;}

  .lesson-five-page--review .lower-review-card__image {
    height: 200px;
  }

  .lesson-five-page--review .lower-review-card__question,
  .lesson-five-page--review .lower-review-card__result {
    grid-column: 1;
    grid-row: auto;
  }

  .lesson-five-page--review .lower-review-card__question > div {
    flex-direction: row;}

  .lesson-five-page--review .lower-review-progress {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

/* Page5 adjustments are isolated from the other Lesson5 pages. */
.lesson-five-page--age-rule .lower-story-stage__inner {
  width: min(calc(100% - 48px), 1260px);
}

.lesson-five-page--age-rule .lesson-five-hero {
  min-height: 200px;
  margin-top: 22px;
}

.lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy {
  display: grid;
  padding: 34px 84px 20px;
  align-content: center;
}

.lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy > span {
  top: -28px;
  left: 24px;
  display: grid;
  width: 144px;
  height: 72px;
  padding: 0;
  place-items: center;
  isolation: isolate;
  background: transparent;
  border-radius: 0;
  font-size: 1.125rem;
  transform: rotate(-12deg);
}

.lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy > span::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("../images/learning/lower/ribbon-blank.png") center / contain no-repeat;
  /* Match Page2: rotate lettering, not the supplied artwork. */
  transform: rotate(12deg);
  content: "";
  pointer-events: none;
}

.lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2.45vw, 2.2rem);
  line-height: 1.3;
}

.lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__decoration {
  top: 65%;
}

.lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__person {
  width: 150px;
  height: 190px;
  object-position: center bottom;
}

.lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__visuals {
  height: 210px;
  gap: 8px;
  align-self: end;
}

.lesson-five-page--age-rule .lesson-five-hero .lesson-five-hero__girl,
.lesson-five-page--age-rule .lesson-five-hero .lesson-five-hero__phone {
  width: calc(50% - 4px);
  height: 210px;
  object-position: center bottom;
}

.lesson-five-page--age-rule .lesson-five-age {
  width: 100%;
  margin: 12px auto;
  padding: 20px 32px;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 18px 24px;
  align-items: start;
}

.lesson-five-page--age-rule .lesson-five-age__notice {
  min-height: 0;
  padding: 8px 16px;
  font-size: .875rem;
  line-height: 1.5;
  text-align: center;
}

.lesson-five-page--age-rule .lesson-five-age__app > h2,
.lesson-five-page--age-rule .lesson-five-age__risks > h2 {
  margin: 0 0 12px;
  padding: 5px 14px;
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
}

.lesson-five-page--age-rule .lesson-five-age__app {
  max-height: none;
}

.lesson-five-page--age-rule .lesson-five-age__app > img {
  display: block;
  width: 100%;
  height: 340px;
  max-height: none;
}

.lesson-five-page--age-rule .lesson-five-age__risks {
  gap: 12px;
  align-items: stretch;
}

.lesson-five-page--age-rule .lesson-five-age__risks article {
  display: grid;
  padding: 12px 8px;
  grid-template-rows: 100px minmax(0, 1fr);
  gap: 8px;
}

.lesson-five-page--age-rule .lesson-five-age__risks article:nth-of-type(2) {
  background: #f4eefb;
}

.lesson-five-page--age-rule .lesson-five-age__risks article:nth-of-type(3) {
  background: #f0f7e8;
}

.lesson-five-page--age-rule .lesson-five-age__risks article:nth-of-type(4) {
  background: #fff7e5;
}

.lesson-five-page--age-rule .lesson-five-age__risks article img {
  height: 100px;
}

.lesson-five-page--age-rule .lesson-five-age__risks article p {
  margin: 0;
  font-size: .8125rem;
  line-height: 1.5;
}

.lesson-five-page--age-rule .lesson-five-age__reminder {
  display: grid;
  grid-column: 1 / -1;
  padding: 12px 14px;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 12px;
  align-items: center;
  border: 1px solid #c3e3ff;
  border-radius: 18px;
}

.lesson-five-page--age-rule .lesson-five-age__reminder .lower-story-point {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lesson-five-page--age-rule .lesson-five-age__reminder .lower-story-point h2 {
  position: static;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 4px 18px;
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 97% 50%, 100% 100%, 0 100%, 3% 50%);
}

.lesson-five-page--age-rule .lesson-five-age__reminder .lower-story-point ul {
  font-size: .8125rem;
  line-height: 1.5;
}

.lesson-five-page--age-rule .lesson-five-age__guide {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-five-page--age-rule .lesson-five-age__guide p {
  flex: 1;
  margin: 0;
  padding: 10px 4px;
  border: 1px solid #e0e0e0;
  border-radius: 45%;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.lesson-five-page--age-rule .lesson-five-age__guide img {
  width: 65px;
  height: 105px;
  flex-shrink: 0;
}

.lesson-five-page--age-rule .lesson-five-footer {
  width: 100%;
  padding: 0;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 16px;
  align-items: end;
  background: transparent;
  border-radius: 0;
}

.lesson-five-page--age-rule .lesson-five-footer__panel {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 125px;
  padding: 12px 16px 12px 140px;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 12px;
  align-items: center;
  background: #fff9ec;
  border: 2px solid #ffc107;
  border-radius: 16px;
}

.lesson-five-page--age-rule .lesson-five-footer__character {
  position: absolute;
  left: 18px;
  bottom: 0;
  width: 110px;
  height: auto;
  max-height: 135px;
  object-fit: contain;
}

.lesson-five-page--age-rule .lesson-five-footer__panel > .lower-story-point {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lesson-five-page--age-rule .lesson-five-footer__panel .lower-story-point h2:empty,
.lesson-five-page--age-rule .lesson-five-footer__panel .lower-story-point li::before {
  display: none;
}

.lesson-five-page--age-rule .lesson-five-footer .lower-story-point ul {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
}

.lesson-five-page--age-rule .lesson-five-age__family {
  width: 230px;
  max-height: 140px;
  object-fit: contain;
}

@media (max-width: 1000px) {
  .lesson-five-page--age-rule .lesson-five-hero {
    grid-template-columns: 110px minmax(0, 1fr) 170px;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy {
    padding-inline: 45px;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__person {
    width: 110px;
    height: 170px;
  }

  .lesson-five-page--age-rule .lesson-five-age {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "notice" "app" "risks";
  }

  .lesson-five-page--age-rule .lesson-five-age__app > img {
    height: auto;
    max-height: 340px;
  }

  .lesson-five-page--age-rule .lesson-five-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-five-page--age-rule .lesson-five-footer .lower-story-next-guide {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 767px) {
  .lesson-five-page--age-rule .lower-story-stage__inner {
    width: min(calc(100% - 24px), 560px);
  }

  .lesson-five-page--age-rule .lesson-five-hero {
    min-height: 0;
    grid-template-columns: 65px minmax(0, 1fr) 75px;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy {
    padding: 34px 8px 48px;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy > span {
    top: -14px;
    left: 8px;
    width: 90px;
    height: 45px;
    padding: 0;
    font-size: .6875rem;
    transform: rotate(-12deg);
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy h1 {
    font-size: 1rem;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy p {
    font-size: .6875rem;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__description {
    padding-bottom: 0;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__decoration {
    top: auto;
    bottom: 12px;
    width: 28px;
    transform: none;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__person {
    width: 65px;
    height: 100px;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__visuals {
    height: auto;
    gap: 2px;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lesson-five-hero__girl,
  .lesson-five-page--age-rule .lesson-five-hero .lesson-five-hero__phone {
    width: calc(50% - 1px);
    height: 100px;
  }

  .lesson-five-page--age-rule .lesson-five-age {
    padding: 16px;
    gap: 20px;
  }

  .lesson-five-page--age-rule .lesson-five-age__notice {
    padding: 8px;
    font-size: .75rem;
  }

  .lesson-five-page--age-rule .lesson-five-age__risks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .lesson-five-page--age-rule .lesson-five-age__reminder {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-five-page--age-rule .lesson-five-age__guide {
    width: min(100%, 230px);
    justify-self: center;
  }

  .lesson-five-page--age-rule .lesson-five-footer {
    padding: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lesson-five-page--age-rule .lesson-five-footer__panel {
    padding: 14px 12px 14px 86px;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lesson-five-page--age-rule .lesson-five-footer__character {
    top: 8px;
    left: 8px;
    bottom: auto;
    width: 70px;
    max-height: 90px;
  }

  .lesson-five-page--age-rule .lesson-five-footer .lower-story-point ul {
    font-size: 1rem;
  }

  .lesson-five-page--age-rule .lesson-five-age__family {
    justify-self: center;
  }

  .lesson-five-page--age-rule .lesson-five-footer .lower-story-next-guide {
    grid-column: auto;
    width: 100%;
    justify-self: stretch;
  }
}

/* Page4: keep hero, step cards and confirmation items within their own space. */
.lesson-five-page--steps .lower-story-stage__inner {
  width: min(calc(100% - 48px), 1260px);
}

.lesson-five-page--steps .lesson-five-hero {
  margin-top: 22px;
  min-height: 190px;
}

.lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy {
  display: grid;
  padding: 34px 84px 20px;
  align-content: center;
}

.lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy > span {
  top: -28px;
  left: 24px;
  display: grid;
  width: 144px;
  height: 72px;
  padding: 0;
  place-items: center;
  isolation: isolate;
  background: transparent;
  border-radius: 0;
  font-size: 1.125rem;
  transform: rotate(-12deg);
}

.lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy > span::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("../images/learning/lower/ribbon-blank.png") center / contain no-repeat;
  /* Match Page2: rotate lettering, not the supplied artwork. */
  transform: rotate(12deg);
  content: "";
  pointer-events: none;
}

.lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy h1 {
  margin: 0 0 8px;
  line-height: 1.3;
}

.lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.4;
}

.lesson-five-page--steps .lesson-five-hero .lower-story-hero__decoration {
  top: 65%;
}

.lesson-five-page--steps .lesson-five-hero .lower-story-hero__person {
  width: 150px;
  max-height: 190px;
}

.lesson-five-page--steps .lesson-five-hero .lower-story-hero__visuals {
  gap: 8px;
  align-self: end;
}

.lesson-five-page--steps .lesson-five-hero .lesson-five-hero__girl,
.lesson-five-page--steps .lesson-five-hero .lesson-five-hero__phone {
  width: calc(50% - 4px);
  max-height: 210px;
}

.lesson-five-page--steps .lesson-five-steps {
  width: 100%;
  margin: 12px auto 0;
  padding: 24px 32px 0;
  gap: 36px;
  background: #fff;
  border-radius: 28px 28px 0 0;
}

.lesson-five-page--steps .lesson-five-steps > li {
  display: grid;
  min-height: 0;
  padding: 10px 12px;
  grid-template-rows: 44px 170px minmax(60px, auto);
  gap: 8px;
  align-items: center;
}

.lesson-five-page--steps .lesson-five-steps h2 {
  min-height: 0;
  margin: 0;
  line-height: 1.4;
}

.lesson-five-page--steps .lesson-five-steps > li > img {
  height: 170px;
}

.lesson-five-page--steps .lesson-five-steps > li > p {
  display: grid;
  min-height: 60px;
  margin: 0;
  padding: 8px;
  align-content: center;
  line-height: 1.5;
}

.lesson-five-page--steps .lesson-five-steps > li:not(:last-child)::after {
  right: -32px;
  width: 28px;
  height: 30px;
  background: #33b3fa;
  clip-path: polygon(0 30%, 52% 30%, 52% 0, 100% 50%, 52% 100%, 52% 70%, 0 70%);
  content: "";
  transform: translateY(-50%);
}

.lesson-five-page--steps .lesson-five-steps__details {
  width: 100%;
  margin: 0 auto;
  padding: 12px 32px 20px;
  gap: 12px;
  border: 0;
  border-radius: 0 0 28px 28px;
}

.lesson-five-page--steps .lesson-five-steps__details > h2 {
  width: fit-content;
  max-width: 100%;
  padding: 5px 28px;
  justify-self: center;
  clip-path: polygon(0 0, 100% 0, 97% 50%, 100% 100%, 0 100%, 3% 50%);
  text-align: center;
}

.lesson-five-page--steps .lesson-five-steps__details article {
  min-height: 86px;
  padding: 8px;
  gap: 8px;
}

.lesson-five-page--steps .lesson-five-steps__details img {
  width: 80px;
  max-width: 40%;
  height: 70px;
  flex-shrink: 0;
}

.lesson-five-page--steps .lesson-five-steps__details p {
  line-height: 1.5;
}

.lesson-five-page--steps .lesson-five-footer {
  width: 100%;
  padding: 0;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 16px;
  align-items: end;
  background: transparent;
  border-radius: 0;
}

.lesson-five-page--steps .lesson-five-footer__panel {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 125px;
  padding: 12px 16px 12px 140px;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: center;
  background: #fff9ec;
  border: 2px solid #ffc107;
  border-radius: 16px;
}

.lesson-five-page--steps .lesson-five-footer__character {
  position: absolute;
  left: 18px;
  bottom: 0;
  width: 110px;
  height: auto;
  max-height: 135px;
  object-fit: contain;
}

.lesson-five-page--steps .lesson-five-footer__panel > .lower-story-point {
  align-self: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lesson-five-page--steps .lesson-five-footer__panel .lower-story-point h2:empty,
.lesson-five-page--steps .lesson-five-footer__panel .lower-story-point li::before {
  display: none;
}

.lesson-five-page--steps .lesson-five-footer .lower-story-point ul {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
}

.lesson-five-page--steps .lesson-five-footer__note {
  margin: 0;
  padding: 16px 10px;
  align-self: center;
  background: #fff;
  border: 1px solid #ffd2d2;
  border-radius: 45%;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

@media (min-width: 1001px) {
  .lesson-five-page--steps .lesson-five-footer .lower-story-next-guide {
    align-self: end;
  }
}

@media (max-width: 1000px) {
  .lesson-five-page--steps .lesson-five-hero {
    grid-template-columns: 110px minmax(0, 1fr) 170px;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy {
    padding-inline: 45px;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__person {
    width: 110px;
    max-height: 170px;
  }

  .lesson-five-page--steps .lesson-five-steps {
    padding: 20px 20px 0;
    gap: 16px;
  }

  .lesson-five-page--steps .lesson-five-steps > li {
    grid-template-columns: minmax(180px, .8fr) minmax(0, 1fr);
    grid-template-rows: 44px auto;
  }

  .lesson-five-page--steps .lesson-five-steps__details {
    padding: 12px 20px 20px;
  }

  .lesson-five-page--steps .lesson-five-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-five-page--steps .lesson-five-footer__panel {
    grid-template-columns: minmax(0, 1fr) 230px;
  }

  .lesson-five-page--steps .lesson-five-footer .lower-story-next-guide {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 767px) {
  .lesson-five-page--steps .lower-story-stage__inner {
    width: min(calc(100% - 24px), 560px);
  }

  .lesson-five-page--steps .lesson-five-hero {
    min-height: 0;
    grid-template-columns: 65px minmax(0, 1fr) 75px;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy {
    padding: 34px 8px 48px;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy > span {
    top: -14px;
    left: 8px;
    width: 90px;
    height: 45px;
    padding: 0;
    font-size: .6875rem;
    transform: rotate(-12deg);
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy p {
    font-size: .6875rem;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__description {
    padding-bottom: 0;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__decoration {
    top: auto;
    bottom: 12px;
    width: 28px;
    transform: none;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__person {
    width: 65px;
    max-height: 100px;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__visuals {
    gap: 2px;
  }

  .lesson-five-page--steps .lesson-five-hero .lesson-five-hero__girl,
  .lesson-five-page--steps .lesson-five-hero .lesson-five-hero__phone {
    width: calc(50% - 1px);
    max-height: 100px;
  }

  .lesson-five-page--steps .lesson-five-steps {
    padding: 16px 16px 0;
  }

  .lesson-five-page--steps .lesson-five-steps > li {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 160px auto;
  }

  .lesson-five-page--steps .lesson-five-steps > li > img {
    height: 160px;
  }

  .lesson-five-page--steps .lesson-five-steps__details {
    padding: 12px 16px 16px;
    gap: 8px;
  }

  .lesson-five-page--steps .lesson-five-steps__details article {
    flex-direction: column;
    text-align: center;
  }

  .lesson-five-page--steps .lesson-five-steps__details img {
    width: 65px;
    max-width: 100%;
  }

  .lesson-five-page--steps .lesson-five-footer {
    padding: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lesson-five-page--steps .lesson-five-footer__panel {
    padding: 14px 12px 14px 86px;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lesson-five-page--steps .lesson-five-footer__character {
    top: 8px;
    left: 8px;
    bottom: auto;
    width: 70px;
    max-height: 90px;
  }

  .lesson-five-page--steps .lesson-five-footer .lower-story-point ul {
    font-size: 1rem;
  }

  .lesson-five-page--steps .lesson-five-footer .lower-story-next-guide {
    grid-column: auto;
    width: 100%;
    justify-self: stretch;
  }
}

/* Page3: reserve separate space for the label, story cards and connecting arrows. */
.lesson-five-page--gacha .lower-story-stage__inner {
  width: min(calc(100% - 48px), 1260px);
}

.lesson-five-page--gacha .lesson-five-hero {
  margin-top: 22px;
  min-height: 210px;
  grid-template-columns: 150px minmax(0, 1fr) 240px;
}

.lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy {
  display: grid;
  padding: 34px 84px 20px;
  align-content: center;
}

.lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy > span {
  top: -28px;
  left: 24px;
  display: grid;
  width: 144px;
  height: 72px;
  padding: 0;
  place-items: center;
  isolation: isolate;
  background: transparent;
  border-radius: 0;
  font-size: 1.125rem;
  transform: rotate(-12deg);
}

.lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy > span::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("../images/learning/lower/ribbon-blank.png") center / contain no-repeat;
  /* Match Page2: rotate lettering, not the supplied artwork. */
  transform: rotate(12deg);
  content: "";
  pointer-events: none;
}

.lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy h1 {
  margin: 0 0 7px;
  line-height: 1.3;
}

.lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.lesson-five-page--gacha .lesson-five-hero .lower-story-hero__decoration {
  top: 66%;
}

.lesson-five-page--gacha .lesson-five-hero .lower-story-hero__person {
  width: 150px;
  max-height: 210px;
}

.lesson-five-page--gacha .lesson-five-hero .lower-story-hero__visuals {
  min-height: 210px;
  gap: 8px;
}

.lesson-five-page--gacha .lesson-five-hero .lesson-five-hero__girl,
.lesson-five-page--gacha .lesson-five-hero .lesson-five-hero__phone {
  width: calc(50% - 4px);
  max-height: 210px;
}

.lesson-five-page--gacha .lesson-five-flow {
  width: 100%;
  margin: 12px auto 0;
  padding: 28px 20px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 36px;
}

.lesson-five-page--gacha .lesson-five-flow li {
  min-height: 340px;
  padding: 12px 8px 8px;
  grid-template-rows: 52px minmax(0, 1fr);
  row-gap: 8px;
}

.lesson-five-page--gacha .lesson-five-flow h2 {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.lesson-five-page--gacha .lesson-five-flow li:last-child h2 {
  width: 100%;
  padding: 6px;
  font-size: .9375rem;
}

.lesson-five-page--gacha .lesson-five-flow img {
  width: 100%;
  height: 260px;
  max-height: 260px;
  object-fit: contain;
}

.lesson-five-page--gacha .lesson-five-flow li:not(:last-child)::after {
  /* Same shaft-and-head representation as Page2, centered in a 36px gap. */
  right: -32px;
  width: 28px;
  height: 30px;
  background: #33b3fa;
  clip-path: polygon(0 30%, 52% 30%, 52% 0, 100% 50%, 52% 100%, 52% 70%, 0 70%);
  content: "";
}

.lesson-five-page--gacha .lesson-five-footer {
  width: 100%;
  min-height: 125px;
  padding: 0;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 16px;
  align-items: end;
  background: transparent;
  border-radius: 0;
}

.lesson-five-page--gacha .lesson-five-footer__panel {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 125px;
  padding: 12px 16px 12px 140px;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: center;
  background: #fff9ec;
  border: 2px solid #ffc107;
  border-radius: 16px;
}

.lesson-five-page--gacha .lesson-five-footer__character {
  position: absolute;
  left: 18px;
  bottom: 0;
  width: 110px;
  height: auto;
  max-height: 135px;
  object-fit: contain;
}

.lesson-five-page--gacha .lesson-five-footer__panel > .lower-story-point {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lesson-five-page--gacha .lesson-five-footer__panel .lower-story-point h2:empty,
.lesson-five-page--gacha .lesson-five-footer__panel .lower-story-point li::before {
  display: none;
}

.lesson-five-page--gacha .lesson-five-footer .lower-story-point ul {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
}

.lesson-five-page--gacha .lesson-five-footer__note {
  margin: 0;
  padding: 16px 10px;
  align-self: center;
  background: #fff;
  border: 1px solid #ffd2d2;
  border-radius: 45%;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 1000px) {
  .lesson-five-page--gacha .lesson-five-hero {
    grid-template-columns: 110px minmax(0, 1fr) 170px;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__person {
    width: 110px;
    max-height: 170px;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy {
    padding-inline: 45px;
  }

  .lesson-five-page--gacha .lesson-five-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .lesson-five-page--gacha .lesson-five-flow li:not(:last-child)::after {
    display: none;
  }

  .lesson-five-page--gacha .lesson-five-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-five-page--gacha .lesson-five-footer__panel {
    grid-template-columns: minmax(0, 1fr) 230px;
  }

  .lesson-five-page--gacha .lesson-five-footer .lower-story-next-guide {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 767px) {
  .lesson-five-page--gacha .lower-story-stage__inner {
    width: min(calc(100% - 24px), 560px);
  }

  .lesson-five-page--gacha .lesson-five-hero {
    min-height: 0;
    grid-template-columns: 65px minmax(0, 1fr) 75px;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy {
    padding: 34px 8px 48px;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy > span {
    top: -14px;
    left: 8px;
    width: 90px;
    height: 45px;
    padding: 0;
    font-size: .6875rem;
    transform: rotate(-12deg);
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy p {
    font-size: .6875rem;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__description {
    padding-bottom: 0;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__decoration {
    top: auto;
    bottom: 12px;
    width: 28px;
    transform: none;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__person {
    width: 65px;
    max-height: 100px;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__visuals {
    min-height: 0;
    gap: 2px;
  }

  .lesson-five-page--gacha .lesson-five-hero .lesson-five-hero__girl,
  .lesson-five-page--gacha .lesson-five-hero .lesson-five-hero__phone {
    width: calc(50% - 1px);
    max-height: 100px;
  }

  .lesson-five-page--gacha .lesson-five-flow {
    padding: 16px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .lesson-five-page--gacha .lesson-five-flow li {
    min-height: 0;
    padding: 14px;
  }

  .lesson-five-page--gacha .lesson-five-flow img {
    height: 210px;
    max-height: 210px;
  }

  .lesson-five-page--gacha .lesson-five-footer {
    padding: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lesson-five-page--gacha .lesson-five-footer__panel {
    padding: 14px 12px 14px 86px;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lesson-five-page--gacha .lesson-five-footer__character {
    top: 8px;
    left: 8px;
    bottom: auto;
    width: 70px;
    max-height: 90px;
  }

  .lesson-five-page--gacha .lesson-five-footer .lower-story-point ul {
    font-size: 1rem;
  }

  .lesson-five-page--gacha .lesson-five-footer .lower-story-next-guide {
    grid-column: auto;
    width: 100%;
    justify-self: stretch;
  }
}

/* Lesson 5 completion: supplied artwork layout, shared markup and controls. */
.lesson-complete-page.lesson-five-page .lesson-complete-stage__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 380px 330px auto auto;
  gap: 12px;
}

.lesson-complete-page.lesson-five-page .lesson-complete-progress {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  margin: 0 0 24px;
}

.lesson-complete-page.lesson-five-page .lower-lesson-progress-header {
  grid-template-columns: minmax(390px, 430px) minmax(0, 540px);
  gap: 16px;
}

.lesson-complete-page.lesson-five-page .lower-lesson-progress-header__title {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 10px 20px;
  white-space: nowrap;
  font-size: 17px;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero,
.lesson-complete-page.lesson-five-page .lesson-complete-takeaway,
.lesson-complete-page.lesson-five-page .lesson-complete-reward,
.lesson-complete-page.lesson-five-page .lesson-complete-actions {
  display: contents;
}

.lesson-complete-page.lesson-five-page .lesson-complete-review,
.lesson-complete-page.lesson-five-page .lesson-complete-hero__girl,
.lesson-complete-page.lesson-five-page .lesson-complete-takeaway__phone,
.lesson-complete-page.lesson-five-page .lesson-complete-reward__phone,
.lesson-complete-page.lesson-five-page .lesson-complete-reward h2,
.lesson-complete-page.lesson-five-page .lesson-complete-takeaway__notes ul {
  display: none;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__message {
  position: relative;
  inset: auto;
  display: block;
  grid-column: 3 / 11;
  grid-row: 2;
  align-self: start;
  justify-self: center;
  width: 100%;
  max-width: 700px;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  margin-top: -56px;
  padding: 0;
  object-fit: contain;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__boy,
.lesson-complete-page.lesson-five-page .lesson-complete-hero__phone,
.lesson-complete-page.lesson-five-page .lesson-complete-reward__stamp {
  position: relative;
  inset: auto;
  justify-self: center;
  align-self: end;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__boy {
  grid-column: 1 / 5;
  grid-row: 2 / 4;
  width: 420px;
}

.lesson-complete-page.lesson-five-page .lesson-complete-hero__phone {
  display: block;
  grid-column: 4 / 6;
  grid-row: 3;
  width: 210px;
}

.lesson-complete-page.lesson-five-page .lesson-complete-takeaway__notes {
  grid-column: 6 / 9;
  grid-row: 3;
  align-self: start;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.lesson-complete-page.lesson-five-page .lesson-complete-takeaway__notes h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lesson-complete-page.lesson-five-page .lesson-five-complete__takeaway-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: -20px 0 0;
  object-fit: contain;
}

.lesson-complete-page.lesson-five-page .lesson-complete-reward__stamp {
  grid-column: 6 / 8;
  grid-row: 3;
  width: 160px;
}

.lesson-complete-page.lesson-five-page .lesson-five-complete__next-card {
  grid-column: 9 / 13;
  grid-row: 3;
  align-self: start;
  width: 100%;
  height: auto;
  margin-top: 8px;
}

.lesson-complete-page.lesson-five-page .lesson-complete-actions__next {
  grid-column: 9 / 13;
  grid-row: 3;
  align-self: start;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  /* Card aspect ratio 288 / 426, its 8px top margin, then a 12px gap. */
  margin-top: calc(67.605634% + 20px);
  min-height: 60px;
  padding: 5px 12px;
  line-height: 1.2;
  gap: 12px;
  border: 3px solid #60c9ff;
  border-radius: 40px;
  background: linear-gradient(#26c8ff, #0054ff 45%, #0032db);
  font-size: 28px;
}

.lesson-complete-page.lesson-five-page .lesson-complete-actions__next span {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #0054ff;
}

.lesson-complete-page.lesson-five-page .registration-save-prompt {
  grid-column: 1 / -1;
  grid-row: 4;
  margin-top: 24px;
}

.lesson-complete-page.lesson-five-page .lesson-complete-actions__back {
  grid-column: 1 / -1;
  grid-row: 5;
  justify-self: center;
}

@media (max-width: 1000px) {
  .lesson-complete-page.lesson-five-page .lesson-complete-stage__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 20px;
  }

  .lesson-complete-page.lesson-five-page .lower-lesson-progress-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .lesson-complete-page.lesson-five-page .lower-lesson-progress-header__title {
    white-space: normal;
    font-size: 16px;
  }

  .lesson-complete-page.lesson-five-page .lower-lesson-progress-header__steps {
    grid-column: 1;
    width: 100%;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero__message {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero__boy {
    grid-column: 1;
    grid-row: 3;
    width: 260px;
    margin: 0;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero__phone {
    grid-column: 2;
    grid-row: 3;
    width: 150px;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-takeaway__notes {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .lesson-complete-page.lesson-five-page .lesson-five-complete__takeaway-image {
    max-width: 390px;
    margin: 0;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-reward__stamp {
    grid-column: 1;
    grid-row: 5;
    align-self: center;
    width: 120px;
  }

  .lesson-complete-page.lesson-five-page .lesson-five-complete__next-card {
    grid-column: 2;
    grid-row: 5;
    align-self: center;
    margin: 0;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-actions__next {
    grid-column: 1 / -1;
    grid-row: 6;
    margin-top: 0;
    min-height: 72px;
    padding: 10px 12px;
    line-height: inherit;
  }

  .lesson-complete-page.lesson-five-page .registration-save-prompt {
    grid-row: 7;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-actions__back {
    grid-row: 8;
  }
}

@media (max-width: 767px) {
  .lesson-complete-page.lesson-five-page .lesson-complete-hero__boy {
    width: 180px;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero__phone {
    width: 110px;
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-actions__next {
    min-height: 60px;
    font-size: 22px;
  }
}

/* Overview: keep the point box separate from the next-page button. */
.lesson-five-page--overview .lesson-five-game__footer {
  position: relative;
  width: 100%;
  min-height: 125px;
  padding: 0;
  align-items: flex-end;
  gap: 16px;
  background: transparent;
  border-radius: 0;
}

.lesson-five-page--overview .lesson-five-game__point {
  position: relative;
  width: min(100%, 650px);
  min-width: 0;
  min-height: 125px;
  padding: 12px 24px 12px 140px;
  flex: 0 1 650px;
  grid-template-columns: minmax(0, 1fr);
  background: #fff9ec;
  border: 2px solid #ffc107;
  border-radius: 16px;
}

.lesson-five-page--overview .lesson-five-game__point > img {
  position: absolute;
  left: 18px;
  bottom: 0;
  width: 110px;
  height: auto;
  max-height: 135px;
}

.lesson-five-page--overview .lesson-five-game__point .lesson-five-game-point h2,
.lesson-five-page--overview .lesson-five-game__point .lesson-five-game-point ul {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
}

.lesson-five-page--overview .lesson-five-game__footer > .lower-story-next {
  align-self: flex-end;}

@media (max-width: 1000px) {
  .lesson-five-page--overview .lesson-five-game__footer {
    width: min(100%, 660px);
    padding: 0;
    gap: 12px;
  }

  .lesson-five-page--overview .lesson-five-game__point {
    width: 100%;
    flex: none;
  }

  .lesson-five-page--overview .lesson-five-game__point > img {
    top: 8px;
    left: 8px;
    bottom: auto;
    width: 70px;
    max-height: 90px;
  }

  .lesson-five-page--overview .lesson-five-game__point .lesson-five-game-point h2,
  .lesson-five-page--overview .lesson-five-game__point .lesson-five-game-point ul {
    font-size: 1rem;
  }
}

/* Overview only: release desktop sizing before the hero becomes cramped. */
@media (max-width: 1200px) {
  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy,
  .lesson-five-page--overview .lesson-five-game__screen,
  .lesson-five-page--overview .lesson-five-game__item-card,
  .lesson-five-page--overview .lesson-five-game__money-card,
  .lesson-five-page--overview .lesson-five-game__footer,
  .lesson-five-page--overview .lesson-five-game__point,
  .lesson-five-page--overview .lower-story-next {
    box-sizing: border-box;
    max-width: 100%;
  }

  .lesson-five-page--overview .lower-story-hero {
    min-height: 0;
    grid-template-columns: 90px minmax(0, 1fr) 180px;
    gap: 8px;
  }

  .lesson-five-page--overview .lower-story-hero__person {
    width: 90px;
    max-height: 140px;
  }

  .lesson-five-page--overview .lower-story-hero__visuals {
    width: 180px;
    height: 140px;
  }

  .lesson-five-page--overview .lesson-five-hero__girl,
  .lesson-five-page--overview .lesson-five-hero__phone {
    width: calc(50% - 1px);
    max-height: 140px;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy {
    min-width: 0;
    padding: 32px 64px 24px;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy h1 {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    white-space: normal;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--left,
  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--right {
    top: 55%;
    bottom: auto;
    width: 40px;
    transform: translateY(-50%);
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--left { left: 16px; }
  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--right { right: 16px; }

  .lesson-five-page--overview .lesson-five-game__screen {
    width: min(100%, 660px);
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .lesson-five-page--overview .lesson-five-game__screen > section,
  .lesson-five-page--overview .lesson-five-game__item-card { min-width: 0; }

  .lesson-five-page--overview .lesson-five-game__item-grid {
    width: min(100%, 480px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lesson-five-page--overview .lesson-five-game__money > h2 { white-space: normal; }

  .lesson-five-page--overview .lesson-five-game__footer {
    width: min(100%, 660px);
    margin-inline: auto;
    flex-direction: column;
    padding: 0;
  }

  .lesson-five-page--overview .lesson-five-game__point {
    width: 100%;
    padding: 14px 12px 14px 86px;
    flex: none;
  }

  .lesson-five-page--overview .lesson-five-game__point > img {
    top: 8px;
    left: 8px;
    bottom: auto;
    width: 70px;
    max-height: 90px;
  }

  .lesson-five-page--overview .lesson-five-game__footer > .lower-story-next {
    margin-inline: auto;}
}

@media (max-width: 767px) {
  .lesson-five-page--overview .lower-story-hero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    align-items: end;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy {
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 26px 60px;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy h1 {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    line-height: 1.4;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__copy > span { left: 18px; }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__description { padding-bottom: 0; }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--left,
  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--right {
    top: 50%;
    width: 30px;
  }

  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--left { left: 24px; }
  .lesson-five-page--overview .lesson-five-hero--overview .lower-story-hero__decoration--right { right: 24px; }

  .lesson-five-page--overview .lower-story-hero__person {
    grid-column: 1;
    grid-row: 2;
    width: min(100%, 100px);
    height: 104px;
    max-height: 104px;
    margin: 0;
    justify-self: center;
    object-position: center bottom;
  }

  .lesson-five-page--overview .lower-story-hero__visuals {
    grid-column: 2 / 4;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    height: 104px;
    gap: 12px;
  }

  .lesson-five-page--overview .lesson-five-hero__girl,
  .lesson-five-page--overview .lesson-five-hero__phone {
    width: 100%;
    height: 104px;
    max-height: 104px;
    object-position: center bottom;
  }

  .lesson-five-page--overview .lesson-five-game__item-card { min-height: 155px; }
  .lesson-five-page--overview .lesson-five-game__item-card h3 { font-size: .875rem; }
  .lesson-five-page--overview .lesson-five-game__item-card img { height: 100px; }
  .lesson-five-page--overview .lesson-five-game__money-card p { font-size: .8125rem; }

  .lesson-five-page--overview .lesson-five-game__footer { padding: 0; }

  .lesson-five-page--overview .lesson-five-game__point {
    position: relative;
    min-height: 100px;
    padding-left: 74px;
  }

  .lesson-five-page--overview .lesson-five-game__point > img { left: 0; }
}

/* Page2: keep a single-line heading and reserve decoration space beside the copy. */
@media (max-width: 1200px) {
  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy h1 {
    font-size: clamp(1.25rem, 2.3vw, 1.875rem);
  }
}

@media (max-width: 767px) {
  .lesson-five-page--purchase .lesson-five-hero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    align-items: end;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    box-sizing: border-box;
    min-width: 0;
    padding: 32px 18px 24px;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy h1 {
    margin-bottom: 10px;
    font-size: clamp(1.125rem, 4.8vw, 1.25rem);
    line-height: 1.3;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__description {
    position: relative;
    padding: 0 36px;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy p {
    margin: 0;
    font-size: .8125rem;
    line-height: 1.5;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__decoration {
    top: 50%;
    bottom: auto;
    width: 28px;
    transform: translateY(-50%);
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__decoration--left { left: 0; }
  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__decoration--right { right: 0; }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__copy > span { left: 18px; }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__person {
    grid-column: 1;
    grid-row: 2;
    width: min(100%, 90px);
    height: 96px;
    max-height: 96px;
    margin: 0;
    justify-self: center;
    object-position: center bottom;
  }

  .lesson-five-page--purchase .lesson-five-hero .lower-story-hero__visuals {
    grid-column: 2 / 4;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    height: 96px;
    gap: 12px;
  }

  .lesson-five-page--purchase .lesson-five-hero .lesson-five-hero__girl,
  .lesson-five-page--purchase .lesson-five-hero .lesson-five-hero__phone {
    width: 100%;
    height: 96px;
    max-height: 96px;
    object-position: center bottom;
  }
}

/* Page3: keep the gacha explanation together, with decorations outside its text. */
@media (max-width: 1200px) {
  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy h1 {
    font-size: clamp(1.25rem, 2.3vw, 1.875rem);
  }
}

@media (max-width: 767px) {
  .lesson-five-page--gacha .lesson-five-hero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    align-items: end;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    box-sizing: border-box;
    min-width: 0;
    padding: 32px 18px 24px;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy h1 {
    margin-bottom: 10px;
    font-size: clamp(1.125rem, 4.8vw, 1.25rem);
    line-height: 1.3;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__description {
    position: relative;
    padding: 0 36px;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy p {
    font-size: .8125rem;
    line-height: 1.5;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__decoration {
    top: 50%;
    bottom: auto;
    width: 28px;
    transform: translateY(-50%);
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__decoration--left { left: 0; }
  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__decoration--right { right: 0; }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__copy > span { left: 18px; }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__person {
    grid-column: 1;
    grid-row: 2;
    width: min(100%, 90px);
    height: 96px;
    max-height: 96px;
    margin: 0;
    justify-self: center;
    object-position: center bottom;
  }

  .lesson-five-page--gacha .lesson-five-hero .lower-story-hero__visuals {
    grid-column: 2 / 4;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    height: 96px;
    gap: 12px;
  }

  .lesson-five-page--gacha .lesson-five-hero .lesson-five-hero__girl,
  .lesson-five-page--gacha .lesson-five-hero .lesson-five-hero__phone {
    width: 100%;
    height: 96px;
    max-height: 96px;
    object-position: center bottom;
  }
}

/* Page4: give the cloud its own mobile row and anchor icons to the explanation. */
@media (max-width: 1200px) {
  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy h1 {
  }
}

@media (max-width: 1000px) {
  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy {
    padding-inline: 56px;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__decoration {
    width: 32px;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__decoration--left { left: 16px; }
  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__decoration--right { right: 16px; }
}

@media (max-width: 767px) {
  .lesson-five-page--steps .lesson-five-hero {
    gap: 8px 0;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    box-sizing: border-box;
    min-width: 0;
    padding: 32px 18px 24px;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy h1 {
    font-size: clamp(1.125rem, 4.8vw, 1.25rem);
    line-height: 1.3;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__description {
    position: relative;
    padding: 0 36px;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy p {
    font-size: .875rem;
    line-height: 1.5;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__decoration {
    top: 50%;
    bottom: auto;
    width: 28px;
    transform: translateY(-50%);
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__decoration--left { left: 0; }
  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__decoration--right { right: 0; }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__copy > span { left: 18px; }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__person {
    grid-column: 1;
    grid-row: 2;
  }

  .lesson-five-page--steps .lesson-five-hero .lower-story-hero__visuals {
    grid-column: 3;
    grid-row: 2;
  }
}

/* Page5: keep the longer heading on one line without squeezing its explanation. */
@media (max-width: 1200px) {
  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy h1 {
    font-size: clamp(1.125rem, 2.15vw, 1.875rem);
    letter-spacing: -.02em;
  }
}

@media (max-width: 1000px) {
  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy {
    padding: 40px 56px 24px;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__decoration {
    width: 32px;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__decoration--left { left: 16px; }
  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__decoration--right { right: 16px; }
}

@media (max-width: 767px) {
  .lesson-five-page--age-rule .lesson-five-hero {
    grid-template-columns: 65px minmax(0, 1fr) 140px;
    gap: 8px 0;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    box-sizing: border-box;
    min-width: 0;
    padding: 44px 12px 24px;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy h1 {
    font-size: clamp(.9375rem, 4.6vw, 1.125rem);
    letter-spacing: -.03em;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy h1::before,
  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy h1::after {
    top: 40%;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__description {
    position: relative;
    padding: 0 36px;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy p {
    font-size: .875rem;
    line-height: 1.5;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__decoration {
    top: 50%;
    bottom: auto;
    width: 28px;
    transform: translateY(-50%);
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__decoration--left { left: 0; }
  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__decoration--right { right: 0; }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__copy > span { left: 18px; }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__person {
    grid-column: 1;
    grid-row: 2;
  }

  .lesson-five-page--age-rule .lesson-five-hero .lower-story-hero__visuals {
    grid-column: 3;
    grid-row: 2;
  }
}

/* Page6: keep the quiz heading and explanation together, clear of the icons. */
@media (max-width: 1200px) {
  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy h1 {
    font-size: clamp(1.25rem, 2.3vw, 1.875rem);
  }
}

@media (max-width: 1000px) {
  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy {
    padding: 40px 56px 24px;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__decoration {
    width: 32px;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__decoration--left { left: 16px; }
  .lesson-five-page--review .lesson-five-hero .lower-story-hero__decoration--right { right: 16px; }
}

@media (max-width: 767px) {
  .lesson-five-page--review .lesson-five-hero {
    grid-template-columns: 65px minmax(0, 1fr) 140px;
    gap: 8px 0;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    box-sizing: border-box;
    min-width: 0;
    padding: 40px 18px 24px;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy h1 {
    font-size: clamp(1rem, 4.8vw, 1.25rem);
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy h1::before,
  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy h1::after {
    top: 40%;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__description {
    position: relative;
    padding: 0 36px;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy p {
    font-size: .875rem;
    line-height: 1.5;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__decoration {
    top: 50%;
    bottom: auto;
    width: 28px;
    transform: translateY(-50%);
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__decoration--left { left: 0; }
  .lesson-five-page--review .lesson-five-hero .lower-story-hero__decoration--right { right: 0; }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__copy > span { left: 18px; }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__person {
    grid-column: 1;
    grid-row: 2;
  }

  .lesson-five-page--review .lesson-five-hero .lower-story-hero__visuals {
    grid-column: 3;
    grid-row: 2;
  }
}

/* Keep the text-bearing bubble's lower-left tail beside its speaker on small screens. */
@media (max-width: 1000px) {
  .lesson-complete-page.lesson-five-page .lesson-complete-stage__inner {
    --lesson-five-complete-phone-width: 150px;
    --lesson-five-complete-bubble-width: min(320px, calc(100% - var(--lesson-five-complete-phone-width) - 8px));
  }

  .lesson-complete-page.lesson-five-page .lesson-complete-hero__phone {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-self: end;
    width: var(--lesson-five-complete-phone-width);
    margin-right: calc(var(--lesson-five-complete-bubble-width) + 8px);
  }

  /* Reserve the original 390 x 212 artwork height so subsequent rows do not move. */
  .lesson-complete-page.lesson-five-page .lesson-complete-takeaway__notes::before {
    content: "";
    width: min(100%, 390px);
    aspect-ratio: 390 / 212;
  }

  .lesson-complete-page.lesson-five-page .lesson-five-complete__takeaway-image {
    position: absolute;
    right: 0;
    width: var(--lesson-five-complete-bubble-width);
    /* Phone mouth: 153/237 widths above its feet; bubble tail: 49/212 from its bottom. */
    bottom: calc(var(--lesson-five-complete-phone-width) * 153 / 237 + 24px);
    transform: translateY(23.113208%);
  }
}

@media (max-width: 767px) {
  .lesson-complete-page.lesson-five-page .lesson-complete-stage__inner {
    --lesson-five-complete-phone-width: 110px;
  }
}

/* Center the completion boy and enlarge him without moving the following rows. */
@media (max-width: 767px) {
  .lesson-complete-page.lesson-five-page .lesson-complete-hero__boy {
    grid-column: 1 / -1;
    justify-self: center;
    /* Retain the former column's layout width; scale preserves the row height. */
    width: min(180px, calc((100% - 20px) / 2));
    scale: 1.1;
  }
}

/* Diagram/card prose uses body type; notes remain subordinate. */
.lesson-five-page .lesson-five-flow h2,
.lesson-five-page .lesson-five-game__item-card h3,
.lesson-five-page .lesson-five-game__money-card h3,
.lesson-five-page .lesson-five-steps h2,
.lesson-five-page .lesson-five-age h2,
.lesson-five-page .lesson-five-age h3 { font-size: var(--lower-reading-card); line-height: 1.5; }
.lesson-five-page .lesson-five-flow p,
.lesson-five-page .lesson-five-game__money-card p,
.lesson-five-page .lesson-five-steps p,
.lesson-five-page .lesson-five-age p { font-size: var(--lower-reading-body); line-height: var(--lower-reading-leading); }

/* Page 6 only: pull the cloud's side lobes clear of the characters' faces. */
.lesson-five-page--review .lesson-five-hero .lower-cloud-frame__left { left: -45px; }
.lesson-five-page--review .lesson-five-hero .lower-cloud-frame__right { right: -45px; }
/* The visuals wrapper is display: contents, so its z-index cannot lift the figures above the cloud. */
.lesson-five-page--review .lesson-five-hero :is(.lesson-five-hero__girl, .lesson-five-hero__phone) {
  z-index: 2;
}
@media (max-width: 767px) {
  .lesson-five-page--review .lesson-five-hero .lower-cloud-frame__left { left: -16px; }
  .lesson-five-page--review .lesson-five-hero .lower-cloud-frame__right { right: -16px; }
}
.lesson-five-page .lesson-five-footer__note { font-size: var(--lower-reading-note); line-height: 1.75; }
.lesson-five-page .lesson-five-steps__details > h2 { font-size: var(--lower-reading-section); margin-bottom: 20px; }
.lesson-five-page .lesson-five-steps__details article p { font-size: var(--lower-reading-body); line-height: 1.75; }
.lesson-five-page .lesson-five-flow li,
.lesson-five-page .lesson-five-age__risk { min-height: 0; height: auto; }
.lesson-five-page .lower-review-card__message,
.lesson-five-page .lower-review-card__question p,
.lesson-five-page .lower-review-card__result p { font-size: var(--lower-reading-body); line-height: 1.7; }

/* Cover first/last flow cards and risk captions, which have stronger legacy selectors. */
.lower-lesson-page.lesson-five-page .lesson-five-flow > li > p,
.lower-lesson-page.lesson-five-page .lesson-five-age__risks article p { font-size: var(--lower-reading-body); line-height: var(--lower-reading-leading); }
.lower-lesson-page.lesson-five-page .lesson-five-flow li:last-child h2 { font-size: var(--lower-reading-card); line-height: 1.5; }
.lesson-five-page--overview .lesson-five-game__items > h2,
.lesson-five-page--overview .lesson-five-game__money > h2 { font-size: var(--lower-reading-section); line-height: 1.5; white-space: normal; }
