/* みつけんぼ 紹介ページ。日本語（index.html）と英語（en/index.html）で共有する。色はアプリの背景・題字・ボタンに合わせる。 */
:root {
  color-scheme: light;
  --yellow: #F6E5A6;
  --ray: #FBEFC4;
  --paper: #FFF9E8;
  --card: #FFFDF6;
  --ink: #4A2712;
  --ink-soft: #6E4A2C;
  --outline: #54260F;
  --line: #EED9A4;
  --button: #FFC56B;
  --button-line: #C77A33;
  --orange: #F49A48;
  --gold: #F4C84D;
  --teal: #4AABA7;
  --pink: #F38497;
  --green: #91B851;
  --radius: 28px;
  /* 上の帯の高さ（下線を含む） */
  --topbar-height: 66px;
  --font: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "M PLUS Rounded 1c", "Zen Maru Gothic", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}

:root:lang(en) {
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Nunito", system-ui, sans-serif;
}

/* 英語の丸ゴシックは太字だけの書体が多いため、本文には使わず見出しとボタンに使う。 */
:lang(en) :is(h2, h3, .lead, .section-sub, .brand, .lang, .store, dt) {
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", var(--font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  line-break: strict;
  overflow-wrap: anywhere;
}

/* 日本語の見出しは、語の途中で折り返さない。対応していないブラウザでは通常の折り返しになる。 */
:lang(ja) :is(h2, h3, .lead, .sub, .section-sub, .section-lead) {
  word-break: auto-phrase;
}

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

a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.wrap {
  width: min(1080px, 100% - 32px);
  margin-inline: auto;
}

/* 上の帯。ファーストビューの絵を画面の上端まで広げるため、ページに重ねて固定する */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  background: rgb(255 249 232 / 0.94);
  border-bottom: 2px solid var(--line);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: calc(var(--topbar-height) - 2px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

/* ファーストビューが見えている間は、上の帯の地・下線・アプリ名を隠して言語のボタンだけを出す。
   ファーストビューが上の帯の下へ消えるにつれて、帯とアプリ名を出す。
   スクロール連動のアニメーションに対応しないブラウザでは、常に出す。 */
@supports (animation-timeline: view()) {
  body {
    timeline-scope: --hero;
  }

  .hero {
    view-timeline: --hero block;
    /* 上の帯に重なった部分は、見えていないものとして扱う */
    view-timeline-inset: var(--topbar-height) 0px;
  }

  .topbar,
  .brand {
    animation-timeline: --hero;
    animation-range: exit-crossing 60% exit-crossing 100%;
  }

  .topbar {
    animation-name: bar-in;
    animation-timing-function: linear;
    animation-fill-mode: both;
  }

  .brand {
    animation-name: brand-in;
    animation-timing-function: linear;
    animation-fill-mode: both;
  }
}

@keyframes bar-in {
  from {
    background-color: transparent;
    border-bottom-color: transparent;
  }
}

@keyframes brand-in {
  from {
    opacity: 0;
    visibility: hidden;
    translate: 0 8px;
  }

  to {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
  }
}

.lang {
  padding: 6px 18px;
  border: 2px solid var(--button-line);
  border-radius: 999px;
  background: var(--button);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

/* アイコンと同じ、くまを中心にした放射の背景 */
.rays {
  background: repeating-conic-gradient(from -5.625deg at var(--ray-at), var(--yellow) 0deg 11.25deg, var(--ray) 11.25deg 22.5deg);
}

.hero {
  --ray-at: 72% 55%;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 24px;
  padding-block: calc(var(--topbar-height) + 48px) 64px;
}

.hero h1 {
  margin: 0;
}

.hero h1 img {
  width: 100%;
  max-width: 560px;
}

.lead {
  margin: 24px 0 4px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.5;
  text-wrap: balance;
}

/* 文ごとに行を分け、それぞれの折り返しの長さをそろえる */
.lead > span {
  display: block;
}

.sub {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-weight: 700;
  text-wrap: balance;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 22px;
  border-radius: 16px;
  background: var(--outline);
  color: var(--paper);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.store small {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.hero-bear {
  justify-self: center;
  width: min(100%, 400px);
}

/* 欄の共通 */
section {
  padding-block: 72px;
}

.tint {
  background: var(--ray);
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}

/* 題字と同じ5色の線 */
.section-title::after {
  content: "";
  display: block;
  width: 100px;
  height: 8px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange) 0 20%, var(--gold) 20% 40%, var(--teal) 40% 60%, var(--pink) 60% 80%, var(--green) 80%);
}

/* 見出しの下に添える副題 */
.section-sub {
  margin: 0 0 8px;
  font-size: clamp(19px, 2.4vw, 23px);
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.section-lead {
  max-width: 40em;
  margin: 0 auto 40px;
  color: var(--ink-soft);
  text-align: center;
}

/* 文ごとに行を分け、文の途中の切れ目で改行しない */
.section-lead > span {
  display: block;
  text-wrap: balance;
}

/* 画面写真は、端末の枠のように太い輪郭で囲む */
.shot {
  overflow: hidden;
  border: 6px solid var(--outline);
  border-radius: 22px;
  background: var(--outline);
  box-shadow: 0 10px 0 rgb(84 38 15 / 0.12);
}

.shot img,
.shot video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* 遊び方の、探す様子の動画は大きく出す */
.play {
  max-width: 960px;
  margin: 0 auto;
}

/* とくちょう */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 22px 24px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
}

.feature img {
  width: 112px;
  height: 112px;
}

.feature h3 {
  margin: 0 0 2px;
  font-size: 19px;
  line-height: 1.5;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

/* ステージ。アプリのステージのカードと同じ色の地に、プレイ画面を並べる */
.stages {
  background: var(--yellow);
}

.stage-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage h3 {
  margin: 16px 0 0;
  font-size: 20px;
  line-height: 1.4;
  text-align: center;
}

.note {
  max-width: 40em;
  margin: 28px auto 0;
  color: var(--ink-soft);
  font-size: 15px;
  text-align: center;
}

/* ずかん */
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 44px;
}

.split .section-title,
.split .section-lead {
  text-align: left;
}

.split .section-title::after {
  margin-left: 0;
}

.split .section-lead {
  margin: 0;
}

/* おうちの方へ */
.facts {
  max-width: 780px;
  margin: 0 auto;
  padding: 8px 28px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.facts div {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 2px dashed var(--line);
}

.facts div:last-child {
  border-bottom: 0;
}

.facts dt {
  font-weight: 800;
}

.facts dd {
  margin: 0;
  color: var(--ink-soft);
}

/* OS のバージョンなど、途中で折り返すと読みにくい語句 */
.nowrap {
  white-space: nowrap;
}

/* 最後の案内 */
.cta {
  --ray-at: 50% 38%;
  text-align: center;
}

.cta img {
  width: min(60%, 260px);
  margin: 0 auto 12px;
}

.cta .lead {
  margin-top: 0;
}

.cta .stores {
  justify-content: center;
}

.cta .store {
  align-items: center;
}

footer {
  padding-block: 28px;
  background: var(--outline);
  color: var(--paper);
  font-size: 14px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

footer a {
  color: var(--paper);
  font-weight: 700;
}

.footer-logo {
  width: auto;
  height: 40px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.copyright {
  flex-basis: 100%;
  color: #DDD3C6;
  font-size: 14px;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .split .section-title,
  .split .section-lead {
    text-align: center;
  }

  .split .section-title::after {
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  .hero {
    --ray-at: 50% 72%;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    padding-block: calc(var(--topbar-height) + 24px) 40px;
    text-align: center;
  }

  .hero h1 img {
    margin-inline: auto;
  }

  .stores {
    justify-content: center;
  }

  .hero-bear {
    width: min(64%, 280px);
  }

  section {
    padding-block: 56px;
  }

  .stage-list {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .stage h3 {
    margin-top: 12px;
    font-size: 17px;
  }

  .feature {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 14px;
    padding: 16px 18px 16px 12px;
    text-align: left;
  }

  .feature img {
    width: 88px;
    height: 88px;
  }

  .facts {
    padding: 4px 20px;
  }

  .facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
