/* Brand layer for generated SEO/individual pages. Keeps the information architecture, but presents it as Marupopo. */

/* Match the home page's core design tokens without changing the SEO renderer. */
body {
  background: #fffaf0;
}

body .seo-main {
  position: relative;
  overflow: hidden;
  padding: 30px 0 104px;
  background:
    radial-gradient(circle at 4% 12%, rgba(191,232,216,.28), transparent 24rem),
    radial-gradient(circle at 97% 28%, rgba(255,217,223,.34), transparent 22rem),
    radial-gradient(circle at 12% 76%, rgba(255,217,94,.13), transparent 24rem),
    #fffaf0;
}

body .seo-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), 1180px);
}

/* Breadcrumb: keep semantic navigation, make it feel like a small site UI chip. */
body .breadcrumb {
  width: fit-content;
  max-width: 100%;
  margin: 2px 0 24px;
  padding: 7px 12px;
  gap: 7px;
  border: 1px solid rgba(63,55,47,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 5px 16px rgba(84,65,33,.045);
  color: #746b62;
  font-size: .76rem;
  font-weight: 600;
}
body .breadcrumb a {
  color: #397b69;
  font-weight: 800;
}
body .breadcrumb span[aria-current="page"] { color: #5d554d; }

/* Lower-page hero: the same cream / mint / pink world as the top hero, not a generic SEO panel. */
body .seo-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(48px, 7vw, 82px) clamp(30px, 7vw, 78px);
  border: 1px solid rgba(63,55,47,.075);
  border-radius: 42px;
  background:
    radial-gradient(circle at 82% 15%, rgba(255,217,223,.86), transparent 31%),
    radial-gradient(circle at 10% 100%, rgba(191,232,216,.62), transparent 35%),
    linear-gradient(145deg, #fffef9 0%, #fff4c9 100%);
  box-shadow: 0 20px 56px rgba(92,71,36,.095);
}
body .seo-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -74px;
  right: 9%;
  width: 190px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(223,242,255,.48);
  pointer-events: none;
}
body .seo-hero:not(.seo-profile-hero)::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: clamp(18px, 5vw, 54px);
  bottom: -24px;
  width: clamp(122px, 18vw, 205px);
  aspect-ratio: 1;
  background: url('/assets/images/brand-character.webp') center/contain no-repeat;
  opacity: .17;
  transform: rotate(7deg);
  pointer-events: none;
}
body .seo-kicker {
  color: #397b69;
  font-size: .78rem;
  letter-spacing: .14em;
}
body .seo-hero h1 {
  max-width: 900px;
  color: #3f372f;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: clamp(2.35rem, 5vw, 4.35rem);
  line-height: 1.22;
  letter-spacing: .005em;
  text-wrap: balance;
}
body .seo-lead {
  max-width: 760px;
  margin-top: 24px;
  color: #584e44;
  font-size: clamp(1rem, 1.7vw, 1.14rem);
  line-height: 1.95;
  text-wrap: pretty;
}

/* Section rhythm mirrors the editorial spacing used on the home page. */
body .seo-section {
  margin-top: clamp(68px, 9vw, 108px);
  scroll-margin-top: 100px;
}
body .seo-section-heading {
  position: relative;
  max-width: 790px;
  margin-bottom: 38px;
  padding-right: 90px;
}
body .seo-section-heading::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 0;
  width: 64px;
  height: 104px;
  background: url('/assets/images/mascot-hanging.webp') center/contain no-repeat;
  opacity: .88;
  transform: rotate(3deg);
  pointer-events: none;
}
body .seo-hero h1,
body .seo-section h2,
body .seo-section h3,
body .seo-discover h2 {
  color: #3f372f;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
}
body .seo-section h2 {
  margin-bottom: 18px;
  font-size: clamp(1.85rem, 3.5vw, 3rem);
  line-height: 1.38;
  letter-spacing: 0;
  text-wrap: balance;
}
body .seo-section h3 {
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  line-height: 1.5;
}
body .seo-section p,
body .seo-card-body p,
body .seo-event-copy p {
  text-wrap: pretty;
}
body .seo-section > p:not(.seo-kicker),
body .seo-section-heading > p:not(.seo-kicker) {
  max-width: 820px;
}

/* Text-and-people sections become friendly editorial panels instead of search landing layouts. */
body .seo-split {
  padding: clamp(30px, 5vw, 56px);
  border: 1px solid rgba(63,55,47,.075);
  border-radius: 34px;
  background:
    radial-gradient(circle at 100% 12%, rgba(255,217,223,.34), transparent 34%),
    radial-gradient(circle at 2% 92%, rgba(191,232,216,.24), transparent 31%),
    rgba(255,254,249,.94);
  box-shadow: 0 15px 42px rgba(92,71,36,.07);
}
body .seo-people figure {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body .seo-people figure:nth-child(1) { transform: rotate(-1.4deg); }
body .seo-people figure:nth-child(2) { transform: rotate(1.4deg); }
body .seo-people figure img {
  padding: 7%;
  border-radius: 46% 46% 44% 44%;
  background: #fff;
  box-shadow: 0 17px 40px rgba(84,66,33,.10);
  object-fit: contain;
}
body .seo-people figcaption {
  position: relative;
  z-index: 2;
  width: max-content;
  max-width: calc(100% - 18px);
  margin: -16px auto 0;
  padding: 8px 14px;
  border: 1px solid rgba(63,55,47,.1);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(92,71,36,.09);
  line-height: 1.35;
  text-align: center;
}
body .seo-people figcaption span { color: #397b69; }

/* Cards use the same soft paper, rounded corners and gentle shadows as home-page content. */
body .seo-card {
  overflow: hidden;
  border-color: rgba(63,55,47,.085);
  border-radius: 28px;
  background: rgba(255,255,255,.93);
  box-shadow: 0 12px 34px rgba(92,71,36,.075);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
body .seo-card-image { background: #fff8dd; }
body .seo-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3vw, 30px);
}
body .seo-card-body > p { color: #665d54; }
body .seo-book-card {
  grid-template-columns: minmax(180px, 39%) minmax(0, 1fr);
  min-height: 270px;
}
body .seo-book-card:nth-child(4n+1) .seo-card-image { background: linear-gradient(145deg, #fffef9, #fff1b7); }
body .seo-book-card:nth-child(4n+2) .seo-card-image { background: linear-gradient(145deg, #fffef9, #e5f7ef); }
body .seo-book-card:nth-child(4n+3) .seo-card-image { background: linear-gradient(145deg, #fffef9, #ffe9ed); }
body .seo-book-card:nth-child(4n+4) .seo-card-image { background: linear-gradient(145deg, #fffef9, #eaf6ff); }
body .seo-book-card .seo-card-image img { padding: clamp(15px, 2.4vw, 22px); }

.book-choice-reason {
  display: grid;
  gap: 5px;
  margin: 9px 0 2px;
  color: #584e44;
  font-size: .78rem;
  line-height: 1.65;
}
.book-choice-reason span {
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff1b7;
  color: #80601c;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .04em;
}
body .seo-book-card .book-choice-reason { margin: 10px 0 13px; }

/* Buttons intentionally match the top-page primary/ghost language. */
body .seo-actions {
  gap: 12px 18px;
  margin-top: 22px;
}
body .seo-actions > * { min-width: 0; }
body .seo-button {
  min-height: 50px;
  max-width: 100%;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #3f372f;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 9px 22px rgba(63,55,47,.16);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
body .seo-button:hover,
body .seo-button:focus-visible {
  background: #251f1a;
  box-shadow: 0 12px 26px rgba(63,55,47,.20);
}
body .seo-text-link {
  color: #397b69;
  font-weight: 800;
  text-underline-offset: .24em;
}

/* Notes are story surfaces, not technical callouts. */
body .seo-note {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 58px);
  border: 1px solid rgba(63,55,47,.065);
  border-radius: 32px;
  background:
    radial-gradient(circle at 96% 0, rgba(255,217,223,.56), transparent 29%),
    radial-gradient(circle at 4% 100%, rgba(191,232,216,.28), transparent 31%),
    #fff8dd;
  box-shadow: 0 12px 36px rgba(92,71,36,.055);
}
body .seo-note::after {
  content: "";
  position: absolute;
  right: clamp(14px, 4vw, 40px);
  bottom: -20px;
  width: clamp(92px, 11vw, 132px);
  aspect-ratio: 1;
  background: url('/assets/images/mascot-happy.webp') center/contain no-repeat;
  opacity: .12;
  pointer-events: none;
}
body .seo-note > * { position: relative; z-index: 1; }
body .seo-note p { max-width: 850px; }

/* Events use image-led editorial cards with alternating warm surfaces. */
body .seo-event-list { gap: 34px; }
body .seo-event-card { border: 0; }
body .seo-event-card:nth-child(odd) { background: #fffef9; }
body .seo-event-card:nth-child(even) { background: #f2fbf7; }
body .seo-event-copy { padding: clamp(28px, 4.5vw, 48px); }
body .seo-event-no {
  margin-bottom: 10px;
  color: #397b69;
  font-size: .72rem;
  letter-spacing: .14em;
}
body .seo-event-images {
  gap: 4px;
  padding: 10px;
  background: #fff;
}
body .seo-event-images img {
  min-height: 200px;
  border-radius: 16px;
}

/* Coloring / steps keep the playful color system from the top page. */
body .seo-coloring > div:first-child {
  border: 1px solid rgba(63,55,47,.07);
  background: linear-gradient(145deg, #fffef9, #fff1b7);
  box-shadow: 0 14px 36px rgba(92,71,36,.07);
}
body .seo-steps { gap: 16px; }
body .seo-steps li {
  border-color: rgba(63,55,47,.08);
  box-shadow: 0 9px 24px rgba(92,71,36,.045);
}
body .seo-steps li:nth-child(3n+1) { background: #fff8dd; }
body .seo-steps li:nth-child(3n+2) { background: #f2fbf7; }
body .seo-steps li:nth-child(3n+3) { background: #fff3f5; }
body .seo-steps li::before { color: #397b69; }
body .coloring-book-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Creator and editorial authority content stays visible, but visually subordinate to the story. */
body .seo-profile-hero > img {
  border-color: rgba(255,255,255,.92);
  background: #fff;
}
body .seo-creator-grid .seo-card-image img { padding: 0; }
body .seo-article-meta {
  border-color: rgba(63,55,47,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 6px 18px rgba(92,71,36,.035);
}
body .seo-article-hero-image {
  border-color: rgba(63,55,47,.08);
  background: #fff8dd;
  box-shadow: 0 12px 36px rgba(92,71,36,.06);
}
body .seo-video-frame {
  overflow: hidden;
  border: 8px solid #fff;
  border-radius: 26px;
  box-shadow: 0 16px 44px rgba(92,71,36,.10);
}
body .seo-source-note {
  border-left-color: #ffd95e;
  background: rgba(255,255,255,.9);
}
body .seo-preferred-source {
  border-color: rgba(63,55,47,.08);
  background: linear-gradient(145deg, #fff, #fff8dd);
  box-shadow: 0 12px 34px rgba(92,71,36,.055);
}
body .seo-preferred-source-compact {
  margin-top: 52px;
  padding: 20px 22px;
  border: 1px dashed rgba(63,55,47,.16);
  border-radius: 20px;
  background: rgba(255,255,255,.55);
  color: #746b62;
  font-size: .88rem;
}
body .seo-preferred-source-compact h2 {
  margin-bottom: 8px;
  font-size: 1.12rem;
}
body .seo-preferred-source-compact p { margin: 7px 0; }
body .seo-preferred-source-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
}

/* Discovery becomes a playful “next stop” panel rather than a sitemap-looking footer grid. */
body .seo-discover {
  position: relative;
  overflow: hidden;
  margin-top: clamp(78px, 11vw, 126px);
  padding: clamp(32px, 5vw, 52px);
  border: 0;
  border-radius: 34px;
  background:
    radial-gradient(circle at 100% 0, rgba(255,217,223,.58), transparent 28%),
    radial-gradient(circle at 0 100%, rgba(191,232,216,.38), transparent 30%),
    #fff2ad;
  box-shadow: 0 16px 44px rgba(92,71,36,.075);
}
body .seo-discover::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -28px;
  width: 118px;
  aspect-ratio: 1;
  background: url('/assets/images/brand-character.webp') center/contain no-repeat;
  opacity: .12;
  transform: rotate(6deg);
  pointer-events: none;
}
body .seo-discover > * { position: relative; z-index: 1; }
body .seo-discover h2 {
  margin-bottom: 24px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}
body .seo-discover-grid { gap: 12px; }
body .seo-discover-grid a {
  min-height: 116px;
  align-content: center;
  gap: 7px;
  padding: 20px;
  border-color: rgba(63,55,47,.07);
  border-radius: 20px;
  background: rgba(255,255,255,.91);
  box-shadow: 0 7px 20px rgba(92,71,36,.04);
}
body .seo-discover-grid a:nth-child(4n+1) { background: #fffef9; }
body .seo-discover-grid a:nth-child(4n+2) { background: #f2fbf7; }
body .seo-discover-grid a:nth-child(4n+3) { background: #fff3f5; }
body .seo-discover-grid a:nth-child(4n+4) { background: #f4faff; }
body .seo-discover-grid a:hover,
body .seo-discover-grid a:focus-visible {
  border-color: rgba(63,55,47,.15);
  box-shadow: 0 11px 26px rgba(92,71,36,.08);
}
body .seo-discover-grid span { color: #6b6259; }

/* Footer matches the dark top-page footer so the site ends with the same visual language everywhere. */
body .seo-footer {
  padding: 42px 0;
  border: 0;
  background: #3e3932;
  color: rgba(255,255,255,.76);
  font-size: .82rem;
}
body .seo-footer .seo-shell {
  width: min(calc(100% - 48px), 1180px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 36px;
  align-items: center;
}
body .seo-footer strong {
  color: #fff;
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  font-size: 1rem;
}
body .seo-footer a {
  color: #fff;
  font-weight: 700;
}
body .seo-footer > .site-footer-editorial-links {
  width: min(calc(100% - 48px), 1180px);
  margin: 12px auto 0;
}
body .seo-footer > .site-footer-editorial-links a { color: #fff; }

@media (hover: hover) and (pointer: fine) {
  body .seo-card:hover {
    transform: translateY(-3px);
    border-color: rgba(204,185,135,.8);
    box-shadow: 0 18px 42px rgba(92,71,36,.11);
  }
  body .seo-button:hover { transform: translateY(-2px); }
}

@media (max-width: 900px) {
  body .seo-main { padding-bottom: 88px; }
  body .seo-section-heading { padding-right: 76px; }
  body .seo-split { padding: clamp(28px, 5vw, 44px); }
  body .seo-people { max-width: 620px; margin-inline: auto; }
  body .seo-event-card { grid-template-columns: minmax(0, 1fr); }
  body .seo-event-images { order: -1; }
  body .seo-profile-hero > img { width: min(320px, 80%); justify-self: center; }
}

@media (max-width: 620px) {
  body .seo-main { padding-top: 18px; padding-bottom: 72px; }
  body .seo-shell,
  body .seo-footer .seo-shell,
  body .seo-footer > .site-footer-editorial-links {
    width: min(calc(100% - 28px), 1180px);
  }
  body .breadcrumb {
    margin-bottom: 18px;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: .72rem;
  }
  body .seo-hero {
    padding: 38px 24px 42px;
    border-radius: 28px;
  }
  body .seo-hero::before { width: 120px; top: -48px; right: -14px; }
  body .seo-hero:not(.seo-profile-hero)::after {
    width: 108px;
    right: 8px;
    bottom: -18px;
    opacity: .10;
  }
  body .seo-hero h1 { font-size: clamp(2rem, 10vw, 2.85rem); }
  body .seo-lead { font-size: .96rem; }
  body .seo-section { margin-top: 66px; }
  body .seo-section-heading {
    margin-bottom: 28px;
    padding-right: 0;
  }
  body .seo-section-heading::after { display: none; }
  body .seo-section h2 { font-size: clamp(1.65rem, 8vw, 2.25rem); }
  body .seo-split,
  body .seo-note,
  body .seo-discover {
    border-radius: 24px;
  }
  body .seo-split { padding: 28px 20px; }
  body .seo-people figure:nth-child(1),
  body .seo-people figure:nth-child(2) { transform: none; }
  body .seo-book-card { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  body .seo-book-card .seo-card-image { min-height: 220px; }
  body .seo-card { border-radius: 22px; }
  body .seo-card-body { padding: 22px 20px 24px; }
  body .seo-actions { align-items: stretch; flex-direction: column; }
  body .seo-actions .seo-button {
    width: 100%;
    min-height: 48px;
    padding: 11px 18px;
  }
  body .seo-event-images { grid-template-columns: minmax(0, 1fr); }
  body .seo-event-images img { min-height: 0; aspect-ratio: 4 / 3; }
  body .seo-note { padding: 30px 22px; }
  body .seo-note::after { width: 88px; right: 8px; bottom: -16px; }
  body .seo-discover {
    padding: 30px 18px;
    margin-top: 74px;
  }
  body .seo-discover::after { width: 88px; right: 6px; bottom: -20px; }
  body .seo-discover-grid a { min-height: 0; padding: 18px; }
  body .seo-preferred-source-compact { padding: 18px; }
  body .seo-footer { padding: 34px 0; }
  body .seo-footer .seo-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body .seo-card,
  body .seo-button,
  body .seo-discover-grid a { transition: none !important; }
  body .seo-card:hover,
  body .seo-button:hover { transform: none !important; }
}

@media (forced-colors: active) {
  body,
  body .seo-main,
  body .seo-hero,
  body .seo-split,
  body .seo-note,
  body .seo-card,
  body .seo-card-image,
  body .seo-event-card,
  body .seo-event-images,
  body .seo-coloring > div:first-child,
  body .seo-steps li,
  body .seo-discover,
  body .seo-discover-grid a,
  body .seo-article-meta,
  body .seo-article-hero-image,
  body .seo-source-note,
  body .seo-preferred-source,
  body .seo-preferred-source-compact,
  body .breadcrumb {
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    border-color: CanvasText;
  }
  body .seo-hero::before,
  body .seo-hero::after,
  body .seo-section-heading::after,
  body .seo-note::after,
  body .seo-discover::after { display: none; }
  body .seo-button {
    border: 1px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
    box-shadow: none;
  }
  body .seo-text-link,
  body .breadcrumb a,
  body .seo-footer a { color: LinkText; }
  body .seo-footer {
    border-top: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
  body .seo-footer strong { color: CanvasText; }
}

/* Non-home titles: spend available width before adding another line. */
body .seo-main .seo-hero h1 {
  max-width: min(100%, 1080px);
  font-size: clamp(2.2rem, 4.25vw, 3.75rem);
  line-height: 1.24;
  text-wrap: wrap;
}
body .seo-main .seo-section-heading {
  max-width: 940px;
  padding-right: 78px;
}
body .seo-main .seo-section-heading h2 {
  max-width: 860px;
}
body .seo-main .seo-section h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.55rem);
  text-wrap: wrap;
}
body .seo-main .seo-split h2 {
  font-size: clamp(1.6rem, 2.2vw, 2.15rem);
}
body .seo-main .seo-section h3,
body .seo-main .seo-discover h2 {
  text-wrap: wrap;
}
body .seo-main .seo-discover h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
}

@media (max-width: 900px) {
  body .seo-main .seo-section-heading {
    max-width: 900px;
    padding-right: 70px;
  }
}

@media (max-width: 620px) {
  body .seo-main .seo-shell {
    width: min(calc(100% - 20px), 1180px);
  }
  body .seo-main .seo-hero {
    padding-left: 20px;
    padding-right: 20px;
  }
  body .seo-main .seo-hero h1 {
    font-size: clamp(1.75rem, 7.5vw, 2.25rem);
    line-height: 1.28;
    text-wrap: wrap !important;
  }
  body .seo-main .seo-section-heading {
    max-width: 100%;
    padding-right: 0;
  }
  body .seo-main .seo-section-heading h2 {
    max-width: none;
  }
  body .seo-main .seo-section h2 {
    font-size: clamp(1.45rem, 6.2vw, 1.85rem);
    line-height: 1.4;
    text-wrap: wrap !important;
  }
  body .seo-main .seo-split h2 {
    font-size: clamp(1.4rem, 5.8vw, 1.75rem);
  }
  body .seo-main .seo-section h3 {
    text-wrap: wrap !important;
  }
  body .seo-main .seo-discover h2 {
    font-size: clamp(1.4rem, 5.8vw, 1.75rem);
    text-wrap: wrap !important;
  }
  body .seo-main .seo-split {
    padding-left: 18px;
    padding-right: 18px;
  }
  body .seo-main .seo-note {
    padding-left: 18px;
    padding-right: 18px;
  }
  body .seo-main .seo-card-body {
    padding-left: 18px;
    padding-right: 18px;
  }
}
