/*
Theme Name: おやすみえほん
Theme URI: https://example.com/oyasumi-ehon
Author: Codex
Description: 4分類の童話・昔話を親子で画面を見ながら読める、横スワイプ式の読み聞かせテーマです。
Version: 7.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: oyasumi-ehon
*/

:root {
  --ink: #253247;
  --muted: #6f7786;
  --cream: #fff9ed;
  --paper: #fffef9;
  --night: #183153;
  --yellow: #f8c95f;
  --coral: #ed806d;
  --sage: #7da28b;
  --line: rgba(37, 50, 71, .12);
  --shadow: 0 20px 60px rgba(37, 50, 71, .15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(248, 201, 95, .2), transparent 28rem),
    linear-gradient(180deg, #fffdf7 0%, #f6f2e9 100%);
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  min-height: 100vh;
}

button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  width: auto; height: auto; clip: auto; padding: .8rem; margin: .5rem;
  background: white; z-index: 9999;
}

.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex; align-items: center;
  text-decoration: none;
}
.brand__logo { display: block; width: clamp(210px, 24vw, 285px); height: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  text-decoration: none; font-size: .88rem; font-weight: 700;
  border-bottom: 2px solid var(--yellow); padding-bottom: 3px;
}

.story-shell { padding: 6px 0 50px; overflow: hidden; }
.story-intro {
  width: min(780px, calc(100% - 36px));
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px;
}
.eyebrow {
  margin: 0 0 4px; color: var(--coral); font-size: .76rem;
  font-weight: 800; letter-spacing: .16em;
}
.story-title {
  margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2rem, 7vw, 3.5rem); letter-spacing: .08em; line-height: 1.1;
}
.story-meta { margin: 9px 0 0; color: var(--muted); font-size: .88rem; }
.howto {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: .78rem; white-space: nowrap;
}
.howto__hand { font-size: 1.25rem; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(7px); } }

.story-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px max(6vw, calc((100vw - 760px) / 2)) 28px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}
.story-rail::-webkit-scrollbar { display: none; }
.story-card {
  flex: 0 0 min(760px, 88vw);
  scroll-snap-align: center;
  background: var(--paper);
  border: 1px solid rgba(37, 50, 71, .08);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: scale(.975);
  opacity: .7;
  transition: transform .32s ease, opacity .32s ease;
}
.story-card.is-active { transform: scale(1); opacity: 1; }
.story-card__image {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #d8e0d1;
  overflow: hidden;
}
.story-card__image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.story-card__page {
  position: absolute; top: 16px; right: 16px;
  min-width: 46px; height: 32px; padding: 0 12px;
  display: grid; place-items: center;
  border-radius: 999px; background: rgba(255, 254, 249, .9);
  backdrop-filter: blur(8px); font-size: .75rem; font-weight: 800;
}
.story-card__body {
  position: relative;
  min-height: 190px;
  padding: clamp(24px, 5vw, 38px) clamp(24px, 6vw, 52px) 34px;
}
.story-card__body::before {
  content: ""; position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%);
  width: 54px; height: 5px; border-radius: 99px; background: var(--yellow);
}
.story-card__text {
  margin: 0 auto;
  max-width: 24em;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.12rem, 3.2vw, 1.52rem);
  line-height: 2;
  letter-spacing: .07em;
  text-align: left;
}
.story-card__text .dialogue { color: #b55349; font-weight: 700; }

.story-controls {
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  gap: 16px;
  align-items: center;
}
.story-arrow {
  width: 54px; height: 54px; border: 0; border-radius: 50%;
  background: var(--night); color: white; cursor: pointer;
  font-size: 1.35rem; box-shadow: 0 8px 20px rgba(24,49,83,.2);
  transition: transform .18s ease, opacity .18s ease;
}
.story-arrow:hover { transform: translateY(-2px); }
.story-arrow:disabled { opacity: .25; cursor: default; transform: none; }
.story-dots { display: flex; justify-content: center; gap: 9px; }
.story-dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px;
  background: #cad0ce; cursor: pointer; transition: width .25s, background .25s;
}
.story-dot.is-active { width: 30px; background: var(--coral); }

.parent-note {
  width: min(760px, calc(100% - 36px));
  margin: 30px auto 0; padding: 18px 22px;
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px dashed rgba(37,50,71,.2); border-radius: 18px;
  color: var(--muted); background: rgba(255,255,255,.55);
  font-size: .83rem; line-height: 1.8;
}
.parent-note__icon { font-size: 1.35rem; }
.parent-note p { margin: 0; }
.story-guide-link {
  width: min(760px, calc(100% - 36px)); margin: 16px auto 0; padding: 18px 22px;
  border-radius: 18px; background: #fff4d5; border: 1px solid rgba(248,201,95,.7);
  font-size: .86rem; line-height: 1.8;
}
.story-guide-link p { margin: 0; }
.story-guide-link a { color: #315f78; font-weight: 800; text-underline-offset: 3px; }

.site-footer {
  padding: 52px 18px 28px; color: var(--muted); font-size: .78rem;
}
.site-footer p { margin: 7px 0; }
.site-footer__inner {
  width: min(1100px, 100%); margin: 0 auto 34px; padding-top: 32px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 32px;
}
.site-footer__brand { color: var(--ink); }
.site-footer__brand a { display: inline-block; }
.footer-logo { display: block; width: 230px; max-width: 100%; height: auto; }
.site-footer__brand p { color: var(--muted); }
.footer-nav { display: flex; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; gap: 12px 24px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-footer__copy { width: min(1100px, 100%); margin: 0 auto !important; text-align: right; }

.home-main { overflow: hidden; }
.home-hero {
  width: min(1120px, calc(100% - 36px)); margin: 30px auto 52px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .82fr); gap: clamp(30px, 7vw, 86px); align-items: center;
}
.home-hero__copy h1 {
  margin: 10px 0 22px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2.35rem, 5.5vw, 4.9rem); line-height: 1.22; letter-spacing: .03em;
}
.home-hero__copy h1 span { color: var(--night); background: linear-gradient(transparent 70%, rgba(248,201,95,.48) 0); }
.home-hero__lead { max-width: 37em; margin: 0 0 28px; color: var(--muted); line-height: 2; font-size: 1rem; }
.primary-link {
  display: inline-flex; align-items: center; gap: 24px; padding: 15px 22px;
  border-radius: 999px; background: var(--night); color: white; text-decoration: none; font-weight: 800;
  box-shadow: 0 10px 24px rgba(24,49,83,.2);
}
.featured-book {
  position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 32px 32px 52px 32px;
  overflow: hidden; color: white; text-decoration: none; box-shadow: 0 28px 70px rgba(24,49,83,.24); transform: rotate(2deg);
}
.featured-book::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(13,28,48,.86)); }
.featured-book img { width: 100%; height: 100%; object-fit: cover; }
.featured-book__label { position: absolute; z-index: 1; top: 20px; left: 20px; padding: 8px 13px; border-radius: 99px; background: rgba(255,255,255,.9); color: var(--ink); font-size: .72rem; font-weight: 800; }
.featured-book__title { position: absolute; z-index: 1; left: 26px; right: 26px; bottom: 24px; display: flex; justify-content: space-between; align-items: end; font-family: "Yu Mincho", serif; font-size: clamp(1.8rem,4vw,2.7rem); font-weight: 700; }
.featured-book__title b { font-family: inherit; font-size: .8rem; }

.category-nav {
  width: min(1000px, calc(100% - 36px)); margin: 0 auto 80px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.category-nav a { min-height: 80px; padding: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.6); text-decoration: none; font-weight: 800; font-size: .8rem; text-align: center; }
.category-nav a span { font-size: 1.45rem; }
.category-nav a:hover { background: white; border-color: rgba(237,128,109,.45); transform: translateY(-2px); }

.reading-guide-nav { width: min(1120px, calc(100% - 36px)); margin: 0 auto 84px; }
.reading-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.reading-guide-card {
  min-height: 260px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 26px; background: rgba(255,255,255,.78);
  color: var(--ink); text-decoration: none; box-shadow: 0 14px 36px rgba(37,50,71,.07);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.reading-guide-card:hover { transform: translateY(-5px); border-color: rgba(237,128,109,.45); box-shadow: 0 20px 44px rgba(37,50,71,.13); }
.reading-guide-card__eyebrow { color: var(--coral); font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.reading-guide-card strong { margin: 13px 0 12px; font-family: "Yu Mincho", serif; font-size: 1.5rem; line-height: 1.4; }
.reading-guide-card > span:not(.reading-guide-card__eyebrow) { color: var(--muted); font-size: .82rem; line-height: 1.8; }
.reading-guide-card b { margin-top: auto; padding-top: 20px; color: #315f78; font-size: .8rem; }

.story-library { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.section-heading { text-align: center; margin-bottom: 54px; }
.section-heading h2, .about-reading h2 { margin: 8px 0; font-family: "Yu Mincho", serif; font-size: clamp(1.9rem,4vw,3rem); }
.section-heading > p:last-child { color: var(--muted); }
.category-section { padding: 34px 0 50px; border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.category-section__head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.category-section__icon { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 17px; background: white; box-shadow: 0 8px 20px rgba(37,50,71,.08); font-size: 1.55rem; }
.category-section__head h3 { margin: 0 0 4px; font-family: "Yu Mincho", serif; font-size: 1.4rem; }
.category-section__head p { margin: 0; color: var(--muted); font-size: .82rem; }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.book-card { display: grid; grid-template-columns: 46% 1fr; min-height: 230px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); color: var(--ink); text-decoration: none; box-shadow: 0 12px 34px rgba(37,50,71,.08); transition: transform .22s, box-shadow .22s; }
.book-card:hover { transform: translateY(-5px); box-shadow: 0 20px 42px rgba(37,50,71,.14); }
.book-card__image { overflow: hidden; }
.book-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.book-card:hover .book-card__image img { transform: scale(1.04); }
.book-card__body { padding: 22px 18px; display: flex; flex-direction: column; align-items: flex-start; }
.book-card__type { color: var(--coral); font-size: .68rem; font-weight: 800; }
.book-card strong { margin: 10px 0 8px; font-family: "Yu Mincho", serif; font-size: 1.35rem; line-height: 1.45; }
.book-card__meta { color: var(--muted); font-size: .76rem; }
.book-card__summary { margin: 0 0 12px; color: var(--muted); font-size: .76rem; line-height: 1.7; }
.book-card__action { margin-top: auto; padding-top: 20px; font-size: .75rem; font-weight: 800; }

.guide-page { overflow: hidden; padding-bottom: 30px; }
.guide-hero {
  width: min(1120px, calc(100% - 36px)); margin: 26px auto 90px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr); gap: clamp(34px, 7vw, 86px); align-items: center;
}
.guide-hero__copy h1 {
  margin: 10px 0 24px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2.3rem, 5.5vw, 4.6rem); line-height: 1.25; letter-spacing: .03em;
}
.guide-hero__copy > p:last-of-type { margin: 0 0 28px; color: var(--muted); line-height: 2; }
.guide-hero__visual {
  position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden;
  border-radius: 32px; color: white; text-decoration: none; box-shadow: var(--shadow);
}
.guide-hero__visual::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(13,28,48,.82)); }
.guide-hero__visual img { width: 100%; height: 100%; display: block; object-fit: cover; }
.guide-hero__visual span { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 20px; font-weight: 800; }
.guide-stories { width: min(1120px, calc(100% - 36px)); margin: 0 auto 76px; scroll-margin-top: 24px; }
.guide-stories .book-card { min-height: 300px; }
.guide-article { width: min(860px, calc(100% - 36px)); margin: 0 auto; }
.guide-content, .guide-tips, .guide-faq {
  margin: 0 0 28px; padding: clamp(26px, 5vw, 48px); border: 1px solid var(--line);
  border-radius: 28px; background: var(--paper); box-shadow: 0 14px 40px rgba(37,50,71,.07);
}
.guide-content h2, .guide-tips h2, .guide-faq h2 { margin: 0 0 20px; font-family: "Yu Mincho", serif; font-size: clamp(1.5rem, 3vw, 2rem); }
.guide-content p, .guide-tips p, .guide-faq p { color: var(--muted); line-height: 2; }
.guide-content p:last-child, .guide-tips p:last-child { margin-bottom: 0; }
.guide-tips { background: var(--night); color: white; }
.guide-tips p { color: rgba(255,255,255,.76); }
.guide-tips__grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.guide-tips__grid > div { padding: 20px; border-radius: 18px; background: rgba(255,255,255,.08); }
.guide-tips__grid h3 { margin: 0 0 8px; color: var(--yellow); font-size: 1rem; }
.guide-tips__grid p { margin: 0; font-size: .82rem; }
.guide-faq details { border-top: 1px solid var(--line); }
.guide-faq details:last-child { border-bottom: 1px solid var(--line); }
.guide-faq summary { padding: 20px 34px 20px 0; cursor: pointer; font-weight: 800; line-height: 1.7; }
.guide-faq details p { margin: -4px 0 20px; }
.guide-related {
  width: min(860px, calc(100% - 36px)); margin: 38px auto 0; padding: 24px;
  border-radius: 22px; background: rgba(255,255,255,.65); text-align: center;
}
.guide-related a { display: inline-block; margin: 8px 12px; color: #315f78; font-weight: 800; text-underline-offset: 4px; }

.about-reading { width: min(920px, calc(100% - 36px)); margin: 70px auto 30px; padding: clamp(28px,6vw,62px); display: grid; grid-template-columns: 90px 1fr; gap: 30px; border-radius: 32px; background: var(--night); color: white; }
.about-reading__mark { width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--night); font-size: 2.4rem; }
.about-reading .eyebrow { color: var(--yellow); }
.about-reading p { color: rgba(255,255,255,.78); line-height: 2; }

.breadcrumb { width: min(1100px, calc(100% - 36px)); margin: 10px auto 24px; display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: .72rem; overflow-x: auto; white-space: nowrap; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.story-shell .breadcrumb { width: min(780px, calc(100% - 36px)); }
.back-library { width: min(760px, calc(100% - 36px)); margin: 28px auto 0; text-align: center; }
.back-library a { display: inline-block; padding: 12px 18px; text-decoration: none; font-weight: 800; border-bottom: 2px solid var(--yellow); }

.legal-page { width: min(960px, calc(100% - 36px)); margin: 28px auto 80px; }
.legal-page .breadcrumb { width: 100%; }
.legal-page__header { padding: 20px 0 30px; }
.legal-page__header h1 { margin: 5px 0 10px; font-family: "Yu Mincho", serif; font-size: clamp(2.2rem,5vw,3.8rem); }
.legal-page__header > p:last-child { color: var(--muted); line-height: 1.8; }
.legal-card, .contact-form, .contact-aside { background: var(--paper); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 16px 46px rgba(37,50,71,.08); }
.legal-card { padding: clamp(25px,6vw,58px); line-height: 1.9; }
.legal-card h2 { margin: 2.2em 0 .5em; font-family: "Yu Mincho", serif; font-size: 1.35rem; }
.legal-card h2:first-of-type { margin-top: 1.4em; }
.legal-card li { margin-bottom: .45em; }
.legal-card a { color: #315f78; }
.legal-date { margin-top: 36px; color: var(--muted); font-size: .85rem; }
.company-list { margin: 28px 0 0; }
.company-list > div { display: grid; grid-template-columns: 150px 1fr; border-top: 1px solid var(--line); padding: 19px 0; }
.company-list > div:last-child { border-bottom: 1px solid var(--line); }
.company-list dt { font-weight: 800; }
.company-list dd { margin: 0; }

.contact-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 24px; align-items: start; }
.contact-form { padding: clamp(24px,5vw,44px); }
.contact-form > label:not(.consent):not(.form-honeypot) { display: block; margin-bottom: 24px; font-weight: 800; font-size: .88rem; }
.contact-form label > span { margin-left: 7px; color: var(--coral); font-size: .7rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea { width: 100%; margin-top: 9px; padding: 13px 14px; border: 1px solid #ccd1d4; border-radius: 11px; background: white; color: var(--ink); font: inherit; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 3px solid rgba(248,201,95,.4); border-color: #a58238; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 22px; font-size: .83rem; }
.consent span { margin: 0 !important; color: var(--ink) !important; font-size: inherit !important; }
.form-honeypot { position: absolute !important; left: -9999px !important; }
.submit-button { width: 100%; border: 0; border-radius: 99px; padding: 16px; background: var(--night); color: white; font-weight: 800; cursor: pointer; }
.submit-button:hover { background: #24486f; }
.form-message { padding: 13px 15px; border-radius: 10px; font-weight: 700; }
.form-message--success { background: #e7f4e9; color: #285e37; }
.form-message--error { background: #fbe9e6; color: #8e382d; }
.contact-aside { padding: 28px; line-height: 1.8; }
.contact-aside h2 { margin: 4px 0 16px; font-family: "Yu Mincho", serif; }
.contact-aside a { word-break: break-all; color: #315f78; }

.app-install {
  width: min(1000px, calc(100% - 36px));
  margin: 0 auto 58px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border: 1px solid rgba(248,201,95,.65);
  border-radius: 24px;
  background: linear-gradient(115deg, #fff7dc, #fffef9 55%, #f0f5f2);
  box-shadow: 0 14px 34px rgba(37,50,71,.08);
}
.story-shell .app-install { width: min(760px, calc(100% - 36px)); margin-top: 24px; margin-bottom: 18px; }
.app-install[hidden] { display: none; }
.app-install__icon { display: block; border-radius: 19px; box-shadow: 0 8px 20px rgba(24,49,83,.2); }
.app-install__copy .eyebrow { margin-bottom: 3px; }
.app-install__copy h2 { margin: 0 0 5px; font-family: "Yu Mincho", serif; font-size: 1.25rem; }
.app-install__copy > p:last-child { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.7; }
.app-install__button {
  min-height: 48px; padding: 11px 18px; border: 0; border-radius: 999px;
  background: var(--night); color: white; font-weight: 800; font-size: .82rem; white-space: nowrap; cursor: pointer;
  box-shadow: 0 8px 18px rgba(24,49,83,.18);
}
.app-install__button:hover { background: #24486f; transform: translateY(-1px); }

.app-guide {
  width: min(430px, calc(100% - 32px)); padding: 32px; border: 0; border-radius: 28px;
  background: var(--paper); color: var(--ink); box-shadow: 0 28px 90px rgba(14,29,48,.34);
}
.app-guide::backdrop { background: rgba(18,31,47,.64); backdrop-filter: blur(4px); }
.app-guide[hidden] { display: none; }
.app-guide > img { display: block; margin-bottom: 18px; border-radius: 18px; }
.app-guide h2 { margin: 5px 0 20px; font-family: "Yu Mincho", serif; font-size: 1.55rem; }
.app-guide ol { margin: 0; padding-left: 1.55em; }
.app-guide li { margin: 0 0 15px; padding-left: 5px; line-height: 1.65; font-weight: 700; }
.app-guide__note { margin: 20px 0; padding: 13px 15px; border-radius: 12px; background: var(--cream); color: var(--muted); font-size: .78rem; line-height: 1.6; }
.app-guide__close { position: absolute; top: 15px; right: 15px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eef0ed; cursor: pointer; font-size: 1.3rem; }
.app-guide__done { width: 100%; padding: 13px; border: 0; border-radius: 99px; background: var(--night); color: white; font-weight: 800; cursor: pointer; }

.content-page { width: min(760px, calc(100% - 36px)); margin: 30px auto 80px; }
.content-page article { background: white; border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }

@media (max-width: 640px) {
  .site-header { min-height: 62px; }
  .brand__logo { width: 165px; }
  .site-nav { gap: 10px; }
  .site-nav a { font-size: .69rem; }
  .site-nav a:first-child { display: none; }
  .story-intro { margin-bottom: 12px; }
  .howto { grid-column: 1 / -1; justify-self: end; }
  .story-rail { gap: 14px; padding-top: 4px; padding-bottom: 20px; }
  .story-card { flex-basis: 88vw; border-radius: 23px; }
  .story-card__body { min-height: 190px; }
  .story-controls { grid-template-columns: 46px 1fr 46px; }
  .story-arrow { width: 46px; height: 46px; }
  .home-hero { grid-template-columns: 1fr; margin-top: 14px; }
  .home-hero__copy h1 { font-size: 2.35rem; }
  .featured-book { width: 84%; margin: 0 auto; aspect-ratio: 4 / 4.6; }
  .category-nav { grid-template-columns: 1fr 1fr; margin-bottom: 54px; }
  .category-nav a { min-height: 74px; font-size: .7rem; }
  .reading-guide-grid { grid-template-columns: 1fr; }
  .reading-guide-card { min-height: 220px; }
  .book-grid { grid-template-columns: 1fr; }
  .book-card { min-height: 200px; }
  .about-reading { grid-template-columns: 1fr; }
  .about-reading__mark { width: 62px; height: 62px; }
  .site-footer__inner { flex-direction: column; }
  .footer-nav { justify-content: flex-start; flex-direction: column; }
  .site-footer__copy { text-align: left; }
  .company-list > div { grid-template-columns: 1fr; gap: 6px; }
  .contact-layout { grid-template-columns: 1fr; }
  .app-install { grid-template-columns: 58px 1fr; padding: 18px; gap: 14px; }
  .app-install__icon { width: 58px; height: 58px; border-radius: 14px; }
  .app-install__copy h2 { font-size: 1.05rem; }
  .app-install__copy > p:last-child { font-size: .74rem; }
  .app-install__button { grid-column: 1 / -1; width: 100%; }
  .app-guide { padding: 28px 22px 22px; }
  .guide-hero { grid-template-columns: 1fr; margin-top: 14px; margin-bottom: 62px; }
  .guide-hero__copy h1 { font-size: 2.35rem; }
  .guide-hero__visual { border-radius: 24px; }
  .guide-tips__grid { grid-template-columns: 1fr; }
}

@media (min-width: 641px) and (max-width: 960px) {
  .book-grid { grid-template-columns: 1fr 1fr; }
  .reading-guide-grid { grid-template-columns: 1fr 1fr; }
  .guide-hero { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
