@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("rounded-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("rounded-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}
html:lang(ja), html:lang(en), html:lang(es), html:lang(fr), html:lang(pt), html:lang(de) {
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", Meiryo, system-ui, sans-serif;
}

/* Pine marks links and selections. Clay marks practical notes. */
:root {
  --cream: #f8f6ef;
  --paper: #fffefb;
  --ink: #25342b;
  --muted: #526155;
  --teal: #28523e;
  --teal-dark: #1b382b;
  --teal-soft: #e9eee5;
  --coral: #8c452b;
  --coral-soft: #f6ece3;
  --sand: #eeebdf;
  --line: #d9ddd1;
  --focus: #8c452b;
  --radius: .7rem;
}
.header-inner { min-block-size: 4.7rem; }
.site-header { background: var(--paper); }
.site-footer { background: var(--sand); }
.site-footer a { color: var(--teal-dark); }

.hero {
  display: flex;
  align-items: end;
  isolation: isolate;
  min-block-size: clamp(29rem, 43vw, 40rem);
  padding-block: 3rem 4rem;
  background: #253c2d;
  color: #fffdf6;
}
.hero-photo, .hero-photo img, .hero::before {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
}
.hero-photo { z-index: -2; }
.hero-photo img { object-fit: cover; object-position: 50% 52%; }
.hero::before {
  content: "";
  z-index: -1;
  background: linear-gradient(90deg, rgb(16 28 20 / 94%) 0%, rgb(16 28 20 / 87%) 23%, rgb(16 28 20 / 69%) 39%, rgb(16 28 20 / 14%) 70%, transparent 100%);
}
[dir="rtl"] .hero::before {
  background: linear-gradient(270deg, rgb(16 28 20 / 94%) 0%, rgb(16 28 20 / 87%) 23%, rgb(16 28 20 / 69%) 39%, rgb(16 28 20 / 14%) 70%, transparent 100%);
}
.hero-inner { display: block; }
.hero-copy { max-inline-size: 33rem; }
.hero .eyebrow { color: #f5e5c3; font-weight: 700; letter-spacing: .03em; }
.hero h1 { font-size: clamp(2.5rem, 4.5vw, 4.5rem); line-height: 1.21; letter-spacing: -.025em; text-wrap: balance; }
:lang(ja) .hero h1 { font-size: clamp(2.1rem, 3.85vw, 3.2rem); }
.hero-description { color: #fffdf6; max-inline-size: 28rem; line-height: 1.8; }
.hero .button { background: #fffdf6; border-color: #fffdf6; color: #1b382b; }
.hero .button:hover { background: #edeadd; border-color: #edeadd; }
.hero .text-link { color: #fffdf6; text-decoration: underline; }
.hero :focus-visible { outline-color: #fffdf6; }
.photo-credit {
  position: absolute;
  inset-inline-end: 1rem;
  inset-block-end: .75rem;
  color: #fff;
  background: rgb(16 28 20 / 86%);
  padding: .12rem .55rem;
  font-size: .71rem;
  border-radius: .2rem;
}
.catalog-intro { padding-block-start: clamp(2rem, 5vw, 4rem); }
.catalog-heading { display: flex; gap: 1rem; flex-wrap: wrap; align-items: baseline; justify-content: space-between; }
.catalog-heading h2 { margin-block-end: .5rem; }
.catalog-summary { color: var(--muted); font-size: .86rem; margin: 0 0 .5rem; }

.chapter-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: visible;
  padding: 0;
  margin-block: 1.15rem 1.6rem;
  border-block-start: 1px solid var(--line);
}
.chapter-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  justify-content: start;
  min-block-size: 3.5rem;
  max-inline-size: none;
  gap: .52rem;
  border: 0;
  border-block-end: 1px solid var(--line);
  border-radius: 0;
  padding: .65rem .75rem;
  text-align: start;
  color: var(--teal-dark);
  font-weight: 700;
}
.chapter-chip:hover { background: var(--teal-soft); }
.chapter-chip[aria-current="true"], .chapter-chip.is-active {
  color: var(--teal-dark);
  background: var(--teal-soft);
  box-shadow: inset 0 -3px var(--teal);
}
.chapter-chip:focus-visible { position: relative; z-index: 1; }
.chapter-chip small { color: var(--muted); }
.chapter-icon {
  inline-size: 1.4rem;
  block-size: 1.4rem;
  flex: 0 0 auto;
  border-radius: 0;
  background: none;
}
.chapter-chip .chapter-icon { inline-size: 1.875rem; block-size: 1.875rem; }
.chapter-label { min-inline-size: 0; overflow-wrap: anywhere; }
.chapter-index { margin-inline-end: .3em; color: var(--muted); font-size: .78em; font-weight: 500; }
.game-card, .game-card:hover { border-color: var(--line); border-block-start-width: 1px; box-shadow: none; }
.game-card:hover { border-color: var(--teal); transform: none; }
.game-card .chapter-badge { font-weight: 700; }
.detail-header > .chapter-badge { font-size: .85rem; min-block-size: 2.75rem; }
.detail-section h2::before { background: var(--teal); }
.point-note h2 { color: var(--coral); }
.activity-number { color: var(--muted); }
#catalog-form { box-shadow: none; border-color: var(--line); }

@media (max-width: 920px) {
  .chapter-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero::before {
    background: linear-gradient(90deg, rgb(16 28 20 / 94%), rgb(16 28 20 / 81%) 46%, rgb(16 28 20 / 50%) 71%, transparent);
  }
  [dir="rtl"] .hero::before {
    background: linear-gradient(270deg, rgb(16 28 20 / 94%), rgb(16 28 20 / 81%) 46%, rgb(16 28 20 / 50%) 71%, transparent);
  }
}
@media (max-width: 700px) {
  .hero { min-block-size: 35rem; padding-block: 14rem 3.1rem; }
  .hero-photo img { object-position: 55% 45%; }
  .hero::before, [dir="rtl"] .hero::before {
    background: linear-gradient(0deg, rgb(16 28 20 / 98%) 0%, rgb(16 28 20 / 89%) 32%, rgb(16 28 20 / 69%) 55%, rgb(16 28 20 / 7%) 81%, transparent 100%);
  }
  .hero h1 { font-size: clamp(1.98rem, 7.6vw, 3.15rem); }
  :lang(ja) .hero h1 { font-size: clamp(1.55rem, 7.7vw, 2.8rem); }
  .hero .eyebrow { font-size: .82rem; }
  .hero-description { font-size: .92rem; }
  .hero-actions { gap: .65rem 1.1rem; margin-block-start: 1.15rem; }
  .chapter-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter-chip { padding-inline: .35rem; gap: .36rem; font-size: .81rem; }
  .chapter-chip .chapter-icon { inline-size: 1.625rem; block-size: 1.625rem; }
}
@media (forced-colors: active) {
  .chapter-chip[aria-current="true"], .chapter-chip.is-active { outline: 2px solid Highlight; }
  .hero { background: Canvas; color: CanvasText; }
  .hero-photo, .hero::before { display: none; }
  .hero .eyebrow, .hero .text-link, .hero-description { color: CanvasText; }
}
