:root {
  --ink: #34271b;
  --muted: #6f604d;
  --paper: #fffdf7;
  --line: rgba(52, 39, 27, 0.14);
  --banana: #ffd942;
  --banana-deep: #f2b728;
  --coral: #ff744f;
  --leaf: #2fa66a;
  --sky: #3ca7d8;
  --violet: #9069cc;
  --shadow: rgba(52, 39, 27, 0.18);
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(52, 39, 27, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 39, 27, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(50px, 6.2vw, 72px);
  line-height: 1.02;
  font-weight: 900;
}

h2 {
  margin: 0;
  font-size: 44px;
  line-height: 1.18;
  font-weight: 900;
}

h3 {
  margin: 18px 0 8px;
  font-size: 25px;
  line-height: 1.25;
}

p {
  margin: 0;
}

ruby {
  ruby-position: over;
}

rt {
  font-size: 0.42em;
  font-weight: 800;
  line-height: 1;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 30;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 900;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

@keyframes softRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes navDrop {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bananaFloat {
  0%,
  100% {
    transform: translateY(0) rotate(3deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes miniFloatLeft {
  0%,
  100% {
    transform: rotate(-5deg) translateY(0);
  }
  50% {
    transform: rotate(-3deg) translateY(-8px);
  }
}

@keyframes miniFloatRight {
  0%,
  100% {
    transform: rotate(7deg) translateY(0);
  }
  50% {
    transform: rotate(5deg) translateY(8px);
  }
}

@keyframes gridDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 36px 36px, 36px 36px;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 40px;
  background: rgba(255, 253, 247, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  animation: navDrop 520ms ease both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(52, 39, 27, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.brand span {
  white-space: nowrap;
}

.brand:hover img,
.brand:focus-visible img {
  transform: translateY(-2px) rotate(-4deg);
  box-shadow: 0 14px 30px rgba(52, 39, 27, 0.22);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.nav a {
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  background: white;
  color: var(--ink);
  outline: 2px solid rgba(47, 166, 106, 0.22);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: 86svh;
  padding: 82px 40px 64px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(52, 39, 27, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 39, 27, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, #fff9d8 0%, #ffe47b 52%, #ffd942 100%);
  background-size: 36px 36px, 36px 36px, 100% 100%;
  animation: gridDrift 18s linear infinite;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 44%, rgba(255, 255, 255, 0.54), transparent 34%),
    linear-gradient(90deg, rgba(255, 250, 229, 0.9) 0%, rgba(255, 250, 229, 0.78) 55%, rgba(255, 250, 229, 0.52) 100%);
  z-index: 1;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__shot {
  position: absolute;
  width: auto;
  height: auto;
  aspect-ratio: 9 / 19.5;
  object-fit: contain;
  object-position: center top;
  border-radius: 8px;
  opacity: 0.42;
  box-shadow: 0 28px 64px var(--shadow);
  transform-origin: center;
}

.hero__shot--title {
  right: 12%;
  top: 70px;
  width: min(24vw, 240px);
  animation: bananaFloat 5.4s ease-in-out infinite;
}

.hero__shot--modes {
  right: 33%;
  bottom: 42px;
  width: min(20vw, 200px);
  animation: miniFloatLeft 5.2s ease-in-out infinite;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  animation: softRise 620ms ease both;
}

.hero__badge {
  width: fit-content;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
  padding: 10px 14px 10px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: 0 12px 30px rgba(52, 39, 27, 0.12);
  backdrop-filter: blur(12px);
}

.hero__badge img {
  width: clamp(58px, 7vw, 84px);
  height: clamp(58px, 7vw, 84px);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(52, 39, 27, 0.16);
}

.hero__badge span {
  display: block;
  color: #986100;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.hero__badge strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.22;
  font-weight: 900;
}

.hero__character {
  position: absolute;
  right: clamp(54px, 8vw, 130px);
  bottom: clamp(36px, 6vw, 82px);
  z-index: 1;
  width: auto;
  height: min(42vw, 360px);
  filter: drop-shadow(0 24px 24px rgba(52, 39, 27, 0.18));
  animation: miniFloatRight 5.7s ease-in-out infinite;
}

.eyebrow {
  margin-bottom: 14px;
  color: #986100;
  font-size: 15px;
  font-weight: 900;
}

.lead {
  margin-top: 26px;
  max-width: 650px;
  color: #5e4e37;
  font-size: 21px;
  line-height: 1.85;
  font-weight: 800;
}

.store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.store-button {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  min-width: 176px;
  min-height: 62px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: white;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.store-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, 0.34) 44%, transparent 56%);
  transform: translateX(-120%);
  transition: transform 460ms ease;
}

.store-button:hover,
.store-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--ink);
  filter: saturate(1.06);
  outline: 2px solid rgba(52, 39, 27, 0.2);
  outline-offset: 3px;
}

.store-button:hover::after,
.store-button:focus-visible::after {
  transform: translateX(120%);
}

.store-button:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 var(--ink);
}

.store-button span {
  font-size: 13px;
  font-weight: 800;
  opacity: 0.88;
}

.store-button strong {
  font-size: 20px;
  line-height: 1.1;
}

.store-button--app {
  background: var(--coral);
}

.store-button--play {
  background: var(--leaf);
}

.store-button--trial {
  background: var(--yellow);
  color: var(--ink);
}

.section {
  padding: 84px 40px;
}

.section__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.intro {
  background: var(--paper);
}

.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  gap: 48px;
  align-items: start;
}

.intro__grid > p,
.parents__copy p,
.download p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
  font-weight: 700;
}

.section--modes {
  background: #eef8ff;
}

.section-heading {
  max-width: 760px;
}

.section-heading--center {
  margin: 0 auto;
  text-align: center;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.mode-card {
  min-height: 250px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 34px rgba(52, 39, 27, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 166, 106, 0.45);
  box-shadow: 0 18px 42px rgba(52, 39, 27, 0.12);
}

.mode-card:focus-within {
  outline: 3px solid rgba(47, 166, 106, 0.22);
  outline-offset: 4px;
}

.mode-card__symbol {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  color: white;
  font-size: 32px;
  font-weight: 900;
}

.mode-card--add .mode-card__symbol {
  background: var(--coral);
}

.mode-card--sub .mode-card__symbol {
  background: var(--sky);
}

.mode-card--shape .mode-card__symbol {
  background: var(--violet);
}

.mode-card--compare .mode-card__symbol {
  background: var(--leaf);
}

.mode-card p,
.check-list {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 700;
}

.section--screens {
  background: #fff7df;
}

.screen-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 38px;
}

.screen-rail figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 430px;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(52, 39, 27, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 39, 27, 0.035) 1px, transparent 1px),
    rgba(255, 253, 247, 0.88);
  background-size: 34px 34px;
  box-shadow: 0 16px 38px rgba(52, 39, 27, 0.11);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.screen-rail img {
  width: auto;
  height: min(42vw, 340px);
  margin: 0 auto;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 14px 32px rgba(52, 39, 27, 0.14);
  transition: transform 180ms ease, filter 180ms ease;
}

.screen-rail figure:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 166, 106, 0.36);
  box-shadow: 0 20px 46px rgba(52, 39, 27, 0.15);
}

.screen-rail figure:hover img {
  filter: saturate(1.05);
}

.screen-rail figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 800;
  text-align: center;
}

.section--parents {
  background: #ebfff3;
}

.parents {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
  gap: 44px;
  align-items: start;
}

.parents__copy p {
  margin-top: 22px;
  max-width: 620px;
}

.check-list {
  margin: 0;
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 12px 0 12px 34px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 16px;
  height: 9px;
  border-left: 3px solid var(--leaf);
  border-bottom: 3px solid var(--leaf);
  transform: rotate(-45deg);
}

.download {
  padding: 66px 40px 78px;
  background: #fffdf7;
}

.download__inner {
  width: min(920px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.download__inner img {
  width: 128px;
  height: 128px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(52, 39, 27, 0.16));
  animation: bananaFloat 5.8s ease-in-out infinite;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 40px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.site-footer a {
  color: var(--banana);
  text-decoration: none;
}

.site-footer span:last-child {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 540ms ease, transform 540ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1060px) {
  h2 {
    font-size: 38px;
  }

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

  .hero__shot--title {
    right: 3%;
    opacity: 0.9;
  }

  .hero__shot--modes {
    right: 24%;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 12px 18px;
  }

  .brand span {
    white-space: normal;
    line-height: 1.2;
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: 82svh;
    padding: 62px 22px 56px;
    align-items: flex-start;
    animation: none;
  }

  .hero::before {
    background:
      radial-gradient(circle at 84% 78%, rgba(255, 255, 255, 0.42), transparent 34%),
      rgba(255, 250, 229, 0.88);
  }

  .hero__content {
    padding-top: 8px;
  }

  .hero__shot {
    opacity: 0.22;
  }

  .hero__shot--title {
    right: -98px;
    top: 300px;
    width: 170px;
  }

  .hero__shot--modes {
    left: -92px;
    right: auto;
    bottom: 34px;
    width: 138px;
  }

  .hero__badge {
    width: 100%;
  }

  .hero__badge img {
    width: 58px;
    height: 58px;
    border-radius: 15px;
  }

  .hero__character {
    right: -4px;
    bottom: 18px;
    width: auto;
    height: 250px;
    opacity: 0.38;
  }

  h1 {
    font-size: clamp(36px, 11vw, 46px);
  }

  h2 {
    font-size: 31px;
  }

  .lead {
    font-size: 18px;
    line-height: 1.75;
  }

  .section {
    padding: 62px 22px;
  }

  .intro__grid,
  .parents {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .mode-grid,
  .screen-rail {
    grid-template-columns: 1fr;
  }

  .screen-rail figure {
    min-height: auto;
    padding: 18px;
  }

  .screen-rail img {
    height: min(86vw, 420px);
    border-radius: 15px;
  }

  .download__inner {
    justify-content: flex-start;
    align-items: flex-start;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 22px;
  }
}

@media (max-width: 480px) {
  .store-actions,
  .download__inner {
    flex-direction: column;
  }

  .store-button {
    width: 100%;
  }

  .download__inner img {
    width: 98px;
    height: 98px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}
