/* ティラノかんじ サイト共通スタイル
   色と形はゲームの画面（クリーム色のパネル、茶色のふち、下側の立体的な影、マップのオレンジの番号）に合わせる。
   文字の大きさは rem だけを使う。OS の文字サイズ設定を生かすため、ルートの font-size は指定しない */

:root {
  color-scheme: light dark;

  --page: #fdf4dc;          /* 砂浜 */
  --page-alt: #e3f4fa;      /* 浅い海 */
  --panel: #fffaf0;         /* クリーム色のパネル */
  --text: #3d2410;          /* こげ茶（パネルの上でコントラスト比 約13:1） */
  --text-soft: #5c3d20;
  --wood: #8a5a2b;          /* パネルのふち */
  --wood-shadow: #5e3b18;
  --accent: #f29a1f;        /* マップの番号 */
  --accent-text: #3d2410;
  --leaf: #2f7d32;
  --link: #1458a8;
  --focus: #1458a8;

  --radius: 1.25rem;
  --gap: clamp(1rem, 0.6rem + 1.6vw, 2rem);
  --measure: 40em;          /* 本文1行 約40字 */

  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.75;
  color: var(--text);
  background: var(--page);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #10232d;
    --page-alt: #0b1b23;
    --panel: #2a1d12;
    --text: #fff3dc;
    --text-soft: #f0dcbc;
    --wood: #c98a4b;
    --wood-shadow: #6b4320;
    --accent: #f6a93a;
    --accent-text: #2a1d12;
    --leaf: #8fd18a;
    --link: #8cc4ff;
    --focus: #8cc4ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img, video { display: block; max-inline-size: 100%; block-size: auto; }
:lang(ja) { word-break: auto-phrase; } /* Chrome 系のみ。ほかのブラウザは標準の改行 */

h1, h2, h3 { line-height: 1.35; text-wrap: balance; margin: 0; }
p, li, dd, td { text-wrap: pretty; }
p { margin: 0; }
p + p { margin-block-start: 0.75em; }
strong { color: var(--text); }

a { color: var(--link); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.15em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 0.25rem; }

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -10rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--panel);
  color: var(--text);
  border: 3px solid var(--wood);
  border-radius: 0.75rem;
}
.skip-link:focus { inset-block-start: 1rem; }

.visually-hidden {
  position: absolute !important;
  inline-size: 1px; block-size: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.wrap { inline-size: min(100% - 2 * var(--gap), 70rem); margin-inline: auto; }

/* ---------- パネル・ボタン（ゲームの画面に合わせる） ---------- */

.panel {
  background: var(--panel);
  border: 3px solid var(--wood);
  border-radius: var(--radius);
  box-shadow: 0 0.375rem 0 var(--wood-shadow);
  padding: clamp(1rem, 0.7rem + 1.2vw, 1.75rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-block-size: 2.75rem;
  min-inline-size: 2.75rem;
  padding: 0.5rem 1.1rem;
  font: inherit;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent);
  border: 3px solid var(--wood-shadow);
  border-radius: 999px;
  box-shadow: 0 0.25rem 0 var(--wood-shadow);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s;
}
.button:hover { background: color-mix(in oklab, var(--accent), white 18%); }
.button:active { box-shadow: 0 0.1rem 0 var(--wood-shadow); }
@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color 0.15s, translate 0.1s; }
  .button:active { translate: 0 0.15rem; }
}

/* ---------- ファーストビュー ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(1rem, 0.5rem + 2vw, 2.5rem) clamp(7rem, 4rem + 9vw, 12rem);
}
.hero-bg, .hero-front {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero-bg { z-index: -2; }
.hero-front { z-index: -1; }
.hero-bg img, .hero-front img { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 30%; }

.hero-logo { margin-inline: auto; inline-size: min(100%, clamp(16rem, 10rem + 26vw, 34rem)); }
.hero-logo img { inline-size: 100%; filter: drop-shadow(0 0.25rem 0.5rem rgb(0 0 0 / 0.25)); }

.hero-body {
  display: grid;
  gap: var(--gap);
  align-items: center;
  margin-block-start: clamp(0.75rem, 0.4rem + 1.5vw, 1.75rem);
}
@media (width >= 60rem) {
  .hero-body { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

.hero-copy .catch {
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.5rem);
  font-weight: 800;
  line-height: 1.35;
  text-wrap: balance;
}
.hero-copy .kids { margin-block-start: 0.5rem; color: var(--leaf); font-weight: 700; }
.hero-copy .lead { margin-block-start: 0.75rem; }
.release {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-block-start: 1rem;
  padding-block-start: 1rem;
  border-block-start: 2px dashed var(--wood);
}
.release strong { font-size: 1.125rem; }

/* 配信のお知らせ（メール登録） */
.notify { margin-block-start: 1rem; display: grid; gap: 0.5rem; }
.notify label { font-weight: 700; }
.notify-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.notify input[type="email"] {
  flex: 1 1 12rem;
  min-inline-size: 0;
  min-block-size: 2.75rem;
  padding: 0.4rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 3px solid var(--wood);
  border-radius: 0.75rem;
}
.notify input[type="email"]::placeholder { color: color-mix(in oklab, var(--text-soft), transparent 35%); }
.notify-note { font-size: 0.875rem; color: var(--text-soft); }
.notify-status { font-weight: 700; }
.notify-status:empty { display: none; }
.notify-status[data-state="error"] { color: #b3261e; }
@media (prefers-color-scheme: dark) { .notify-status[data-state="error"] { color: #ffb4ab; } }
/* ロボットよけの欄（人には見せない） */
.notify-trap { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }

.player { margin: 0; }
.player-frame {
  padding: clamp(0.4rem, 0.3rem + 0.5vw, 0.75rem);
  background: #2b2118;
  border-radius: calc(var(--radius) + 0.25rem);
  box-shadow: 0 0.375rem 0 var(--wood-shadow);
}
.player video { inline-size: 100%; border-radius: 0.75rem; background: #000; }
.player figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-block-start: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--panel);
  border: 3px solid var(--wood);
  border-radius: 0.875rem;
  font-size: 0.9375rem;
}

.hero-dinos {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0.5rem;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0rem, 2vw, 2rem);
  pointer-events: none;
}
.hero-dinos img { block-size: clamp(5.5rem, 3.5rem + 8vw, 10rem); inline-size: auto; }
.hero-dinos .pteranodon { align-self: center; block-size: clamp(4rem, 2.5rem + 6vw, 7.5rem); }
@media (width < 40rem) {
  .hero-dinos .triceratops, .hero-dinos .stegosaurus { display: none; }
}

/* ---------- セクション ---------- */

.band { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.band:nth-of-type(even) { background: var(--page-alt); }
.band > .wrap > h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem);
}
.band > .wrap > h2::before {
  content: "";
  display: inline-block;
  inline-size: 1.1em;
  block-size: 1em;
  margin-inline-end: 0.35em;
  vertical-align: -0.1em;
  background: url("../img/footprint-96.webp") center / contain no-repeat;
}
.intro { max-inline-size: var(--measure); margin-block-start: 0.75rem; color: var(--text-soft); }

.shot { margin: 0; }
.shot img {
  inline-size: 100%;
  border: 3px solid var(--wood);
  border-radius: 0.875rem;
  background: #fff;
}
.shot figcaption { margin-block-start: 0.5rem; font-size: 0.9375rem; color: var(--text-soft); }

/* 料金 */
.price { padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem); background: var(--page); border-block-end: 3px solid color-mix(in oklab, var(--wood), transparent 70%); }
.price h2 { font-size: 1.25rem; }
.tickets {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
@media (width >= 44rem) { .tickets { grid-template-columns: 1fr 1fr; } }
.ticket { display: grid; gap: 0.25rem; }
.ticket .where { font-weight: 700; }
.ticket .amount { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); font-weight: 800; line-height: 1.2; }
.ticket .amount small { font-size: 1rem; font-weight: 700; }
.ticket.free { border-color: var(--leaf); }
.ticket.free .amount { color: var(--leaf); }
.price .note { margin-block-start: 1rem; max-inline-size: var(--measure); }

/* こうげきの流れ */
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--gap);
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
@media (width >= 62rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps > li { counter-increment: step; display: flex; flex-direction: column; gap: 0.75rem; }
.steps h3 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.25rem; }
.steps h3::before {
  content: counter(step);
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 2.25rem;
  block-size: 2.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  border: 3px solid var(--wood-shadow);
  font-weight: 800;
}
.steps .shot { order: -1; }
.voice-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 0.25rem; }
.voice-buttons .button { font-size: 0.9375rem; }

/* 書き順の判定 */
.judge {
  display: grid;
  gap: var(--gap);
  margin-block-start: 2rem;
}
@media (width >= 62rem) { .judge { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.judge-shots { display: grid; gap: 1rem; }
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.checks li {
  padding: 0.25rem 0.9rem;
  border: 2px solid var(--wood);
  border-radius: 999px;
  background: var(--panel);
  font-weight: 700;
}
.tools { margin: 1.25rem 0 0; display: grid; gap: 0.75rem; }
.tools div { display: grid; gap: 0.1rem; }
.tools dt { font-weight: 800; }
.tools dd { margin: 0; }

/* 島と恐竜 */
.adventure {
  display: grid;
  gap: var(--gap);
  margin-block-start: 2rem;
  align-items: start;
}
@media (width >= 62rem) { .adventure { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.numbers li { flex: 1 1 8rem; text-align: center; }
.numbers b { display: block; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.2; }
.islands { margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.islands li {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-block-end: 2px dotted var(--wood);
}
.islands .no {
  display: grid; place-items: center;
  inline-size: 2rem; block-size: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  border: 2px solid var(--wood-shadow);
  font-weight: 800;
}
.islands .name { font-weight: 700; }
.islands .count { font-variant-numeric: tabular-nums; }
.collect {
  display: grid;
  gap: var(--gap);
  margin-block-start: var(--gap);
  align-items: center;
}
@media (width >= 62rem) { .collect { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* おうちの方へ */
.parents {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
}
@media (width >= 48rem) { .parents { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.parents > div { display: grid; gap: 0.35rem; align-content: start; }
.parents dt { font-size: 1.125rem; font-weight: 800; }
.parents dd { margin: 0; }
.parents .wide { grid-column: 1 / -1; }
@media (width >= 48rem) {
  .parents .wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gap); align-items: start; }
  .parents .wide dt { grid-column: 1 / -1; }
}

/* いまできること・まだできないこと */
.table-scroll { overflow-x: auto; margin-block-start: 1.5rem; }
.can {
  inline-size: 100%;
  min-inline-size: 32rem;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
  border: 3px solid var(--wood);
  border-radius: var(--radius);
  overflow: hidden;
}
.can th, .can td { padding: 0.75rem 1rem; text-align: start; vertical-align: top; border-block-end: 2px solid color-mix(in oklab, var(--wood), transparent 60%); }
.can tr:last-child > * { border-block-end: 0; }
.can thead th { background: color-mix(in oklab, var(--accent), var(--panel) 55%); }
.can tbody th { font-weight: 700; white-space: nowrap; }

/* よくある質問 */
.faq { display: grid; gap: 0.75rem; margin-block-start: 1.5rem; max-inline-size: 52rem; }
.faq details {
  background: var(--panel);
  border: 3px solid var(--wood);
  border-radius: 1rem;
}
.faq summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 700;
  min-block-size: 2.75rem;
}
.faq details[open] summary { border-block-end: 2px dashed var(--wood); }
.faq .answer { padding: 0.75rem 1rem 1rem; }
@media (prefers-reduced-motion: no-preference) {
  .faq details::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 0.25s, content-visibility 0.25s allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }
  @supports (interpolate-size: allow-keywords) {
    .faq { interpolate-size: allow-keywords; }
  }
}

/* 日本語の文節で改行する（Safari は word-break: auto-phrase に未対応のため） */
.phrase { display: inline-block; }

.after-list { margin-block-start: 1rem; }
.after-head { margin-block-start: 0.5rem; }
.after-faq { margin-block-start: 1.5rem; }

/* ---------- 下層ページ ---------- */

.page-head { padding-block: 1.25rem; background: var(--page-alt); border-block-end: 3px solid var(--wood); }
.page-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.page-head a.home { display: block; inline-size: 11rem; }
.doc { padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.doc .wrap { max-inline-size: 48rem; }
.doc h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); }
.doc h2 { font-size: 1.375rem; margin-block-start: 2.25rem; padding-block-end: 0.25rem; border-block-end: 3px solid var(--wood); }
.doc h3 { font-size: 1.125rem; margin-block-start: 1.5rem; }
.doc p, .doc ul, .doc ol, .doc dl, .doc table { margin-block-start: 0.75rem; }
.doc ul, .doc ol { padding-inline-start: 1.5em; }
.doc .updated { color: var(--text-soft); margin-block-start: 0.5rem; }
.doc .summary { margin-block-start: 1.5rem; }
.doc .summary ul { margin-block-start: 0.5rem; }
.doc table { border-collapse: collapse; inline-size: 100%; }
.doc th, .doc td { border: 2px solid color-mix(in oklab, var(--wood), transparent 50%); padding: 0.5rem 0.75rem; text-align: start; vertical-align: top; }

/* ---------- フッター ---------- */

.site-foot {
  padding-block: 2.5rem 3rem;
  background: var(--wood-shadow);
  color: #fff3dc;
}
.site-foot a { color: #ffe2a8; }
.site-foot .wrap { display: grid; gap: 1rem; }
.site-foot nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-foot nav a { display: inline-block; padding-block: 0.4rem; }
.site-foot small { font-size: 0.875rem; }

/* ---------- 強制カラーモード（ハイコントラスト） ---------- */

@media (forced-colors: active) {
  .notify input[type="email"],
  .panel, .button, .shot img, .faq details, .can, .checks li, .player figcaption, .skip-link { border-color: CanvasText; }
  .steps h3::before, .islands .no { border-color: CanvasText; forced-color-adjust: auto; }
  .band > .wrap > h2::before { display: none; }
}
