.app-page {
  --app-paper: #f6f7ef;
  --app-forest: #263f2c;
  background: var(--app-paper);
}

.app-wrap { width: min(1280px, calc(100% - 80px)); margin-inline: auto; }
.app-bar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #d6dfd2;
}
.app-brand, .app-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
}
.app-brand img { border-radius: 10px; }
.app-bar-link { font-size: .84rem; }

.app-hero {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(22px, 4vw, 64px);
  padding-block: clamp(36px, 6vw, 94px);
}
.app-eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .1em; }
.app-intro h1, .app-features h2, .app-end h2 {
  font-family: var(--font-jp);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: 1.28;
  margin: .32em 0;
}
.app-intro h1 { font-size: clamp(2.1rem, 4.75vw, 5.2rem); }
.app-description { max-width: 27em; font-size: .94rem; line-height: 1.95; }
.app-purchase { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.app-purchase span { font-size: .85rem; font-weight: 700; }
.app-purchase img, .app-end a img { display: block; object-fit: contain; }

.app-features { padding-block: 28px 54px; }
.app-features h2, .app-end h2 { font-size: clamp(1.55rem, 3.6vw, 3.15rem); margin-bottom: .7em; }
.app-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.app-tile {
  --tile: #e2eadc;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: clamp(15px, 3vw, 38px);
  min-height: 290px;
  border-radius: 23px;
  background: var(--tile);
}
.app-tile h3 { margin: .15em 0; font: 400 clamp(1.6rem, 3.2vw, 3.4rem)/1 var(--font-display); }
.app-tile p { margin: 0; font-size: .87rem; line-height: 1.8; }
.app-tile img { display: block; margin: auto; max-height: 305px; width: auto; max-width: 100%; border-radius: 12px; box-shadow: 0 7px 16px #263f2c23; }
.app-widget { --tile: #cfdfbd; }
.app-gap { --tile: #eedec1; }
.app-memory { --tile: #e7eddc; }
.app-collection { --tile: #dce7e2; }


.app-end { border-radius: 24px; background: var(--app-forest); color: #f7faed; padding: 42px 20px; text-align: center; }
.app-end h2 { margin-top: 0; }
.app-end a { display: inline-block; margin-top: 16px; }
.app-page .site-footer { margin-top: clamp(32px, 5vw, 64px); }

@media (max-width: 900px) {
  .app-wrap { width: calc(100% - 40px); }
  .app-hero { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr 1fr; }
  .app-tile { grid-template-columns: 1fr; align-content: start; }
}
@media (max-width: 540px) {
  .app-wrap { width: calc(100% - 28px); }
  .app-bar { min-height: 60px; }
  .app-hero { padding-block: 28px; }
  .app-grid { grid-template-columns: 1fr; }
  .app-tile { grid-template-columns: 1fr 1fr; align-content: center; min-height: 200px; }
}

.app-hero { position: relative; isolation: isolate; }
.app-video {
  display: block;
  width: 100%;
  max-height: 370px;
  aspect-ratio: 9 / 19.5;
  object-fit: contain;
  border-radius: 12px;
  background: #eef1e9;
}
.app-tile .app-video { max-height: 315px; }
.app-tile {
  transform: translateY(var(--tile-lift, 0)) scale(var(--tile-scale, 1));
  transform-origin: center top;
}
.app-tile:focus-within { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .app-tile { transform: none; }
}

.app-moments { padding-block: clamp(32px, 5vw, 70px); }
.app-moments {
  padding-inline: clamp(19px, 5vw, 74px);
  border-radius: 28px;
  background: #e6eddf;
}
.app-moments h2 {
  font: 900 clamp(1.65rem, 3.75vw, 3.4rem)/1.35 var(--font-jp);
  letter-spacing: -.05em;
  margin: .3em 0;
}
.app-moments-intro {
  max-width: 43em;
  line-height: 1.9;
  margin: 0 0 28px;
}
.app-moment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px); }
.app-moments-scenes {
  display: block;
  width: 100%;
  height: auto;
  margin-top: clamp(18px, 3vw, 36px);
  border-radius: 16px;
}
.app-moment { border-top: 1px solid #9aaf91; padding-top: 15px; }
.app-moment h3 { font-size: 1rem; margin: 0 0 8px; }
.app-moment p { font-size: .87rem; line-height: 1.9; margin: 0; }
.app-features { padding-block: clamp(60px, 8vw, 116px) 0; }
.app-grid { gap: clamp(14px, 2vw, 25px); }
.app-tile { transition: transform .42s cubic-bezier(.22,.6,.34,1); }
.app-flash { --tile: #e7e5d4; }
.app-reading { --tile: #dce7e2; }
.app-exam-note { margin: 18px 0 0; font-size: .74rem; line-height: 1.8; color: var(--ink-soft); }
@media (max-width: 680px) {
  .app-moment-grid { grid-template-columns: 1fr; }
  .app-moments h2 br { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .app-tile { transition: none; }
}

.app-hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  padding-block: clamp(42px, 7vw, 100px) 0;
  overflow: clip;
}
.app-intro { padding-bottom: 52px; }
.app-hero-visual {
  position: relative;
  align-self: end;
  display: grid;
  justify-items: center;
  margin: 0;
  padding: 18px 25px 0;
  height: clamp(420px, 48vw, 655px);
}
.app-phone {
  width: clamp(230px, 27vw, 365px);
  align-self: start;
  transform: translateX(8%) rotate(10deg);
  transform-origin: center 30%;
  border: 8px solid #202b23;
  border-radius: 42px;
  background: #202b23;
  overflow: hidden;
  box-shadow: 8px 3px 0 #a4afa2, 18px 25px 38px #293b2e42;
}
.app-phone img { display: block; width: 100%; height: auto; }
.app-hero-visual figcaption {
  position: absolute;
  top: 32%;
  left: 3%;
  padding: 11px 15px;
  border-radius: 999px;
  background: #f2e6c8;
  color: var(--ink);
  font-size: .81rem;
  font-weight: 700;
  box-shadow: 0 6px 16px #293b2e26;
}
.app-feature-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 16px;
}
.app-motion-toggle {
  margin-bottom: 16px;
  background: transparent;
  border: 1px solid #a7b8a2;
  color: var(--ink);
  padding: 7px 11px;
  border-radius: 999px;
  font: 600 .74rem var(--font-body);
  cursor: pointer;
}
.app-walkway { grid-template-columns: repeat(24, minmax(0, 1fr)); column-gap: 0; }
.app-walkway .app-tile:nth-child(1) { grid-column: 1 / span 13; margin-right: 10px; }
.app-walkway .app-tile:nth-child(2) { grid-column: 14 / -1; margin-left: 10px; margin-top: 18px; }
.app-walkway .app-tile:nth-child(3) { grid-column: 1 / span 10; margin-right: 10px; }
.app-walkway .app-tile:nth-child(4) { grid-column: 11 / -1; margin-left: 10px; margin-top: 20px; }
.app-walkway .app-tile:nth-child(5) { grid-column: 1 / span 14; margin-right: 10px; }
.app-walkway .app-tile:nth-child(6) { grid-column: 15 / -1; margin-left: 10px; margin-top: 18px; }
.app-walkway .app-tile:nth-child(7) { grid-column: 1 / span 11; margin-right: 10px; }
.app-walkway .app-tile:nth-child(8) { grid-column: 12 / -1; margin-left: 10px; margin-top: 18px; }
.app-walkway .app-levels { grid-column: 1 / -1; grid-template-columns: 1fr; --tile: #dde8d6; }
.app-level-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 0; }
.app-level-list div { border-radius: 13px; background: #f8faf4; padding: 13px; }
.app-level-list dt { font: 400 1.45rem/1 var(--font-display); margin-bottom: 6px; }
.app-level-list dd { margin: 0; font-size: .79rem; line-height: 1.7; }
.app-match { --tile: #dce8d6; }
.app-scramble { --tile: #f1e5c9; }
.app-tile .app-video {
  width: min(100%, 152px);
  margin-inline: auto;
  max-height: none;
  pointer-events: none;
}
.app-features { padding-bottom: clamp(50px, 7vw, 95px); }
@media (max-width: 760px) {
  .app-hero { grid-template-columns: 1fr; padding-top: 38px; }
  .app-intro { padding-bottom: 0; }
  .app-hero-visual { height: 400px; }
  .app-hero-visual figcaption { left: max(0px, calc(50% - 172px)); }
  .app-walkway { grid-template-columns: 1fr; }
  .app-walkway .app-tile:nth-child(n) {
    grid-column: 1;
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    align-content: center;
    margin: 0 12px 0 0;
  }
  .app-walkway .app-tile:nth-child(even) { margin: 0 0 0 12px; }
  .app-walkway .app-levels:nth-child(n) { grid-template-columns: 1fr; }
  .app-level-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


.app-walkway .app-illustrated {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .85fr);
}
.app-illustrated .app-scene {
  width: 100%;
  max-height: none;
  height: auto;
  margin-top: 14px;
  box-shadow: none;
}
.app-walkway .app-levels {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  grid-template-areas: "copy scene" "levels scene";
}
.app-levels > div { grid-area: copy; }
.app-levels .app-scene { grid-area: scene; margin-top: 0; }
.app-levels .app-level-list { grid-area: levels; }
@media (min-width: 761px) {
  .app-walkway :is(.app-scramble, .app-gap, .app-collection) {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.55fr);
  }
  .app-walkway :is(.app-scramble, .app-gap, .app-collection) > div {
    grid-column: 2;
    grid-row: 1;
  }
  .app-walkway :is(.app-scramble, .app-gap, .app-collection) > :is(img, video) {
    grid-column: 1;
    grid-row: 1;
  }
  .app-widget > video, .app-reading > img { align-self: end; }
  .app-reading > img { max-height: 360px; }
  .app-flash > img { align-self: start; }
}
@media (max-width: 760px) {
  .app-walkway .app-levels {
    grid-template-areas: "copy" "scene" "levels";
  }
}
@media (max-width: 540px) {
  .app-walkway .app-illustrated:not(.app-levels):nth-child(n) {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
  .app-illustrated:not(.app-levels) > div { display: contents; }
  .app-illustrated:not(.app-levels) > div > :is(h3, p) { grid-column: 1 / -1; }
  .app-illustrated:not(.app-levels) .app-scene { margin-top: 0; }
}
