/* 포리의 그림책 소개 사이트.
   색·둥글기·그림자는 앱의 디자인 토큰(lib/app/design.dart)과 같다: 복숭아빛 방, 색종이 깃발, 바느질 자국이 있는 종이 카드,
   아래로 두께가 보이는 알약 단추. 빛은 왼쪽 위에서 하나라 그림자는 모두 오른쪽 아래로 떨어진다. */
@font-face { font-family: "Jua"; src: url("fonts/jua.795d76ae3c.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Gowun Dodum"; src: url("fonts/gowun.795d76ae3c.woff2") format("woff2"); font-display: swap; }

:root {
  --room: #FBEBDA; --room-deep: #F3D2B4; --paper: #FFFBF4; --paper-shade: #F8ECDF; --edge: #F1D3B3; --stitch: #F4C9A6;
  --wood: #D9A273; --wood-dark: #A86E3E;
  --ink: #3A2618; --ink-soft: #7A5238;
  --sun: #FFC94D; --sun-deep: #B07C14; --terra: #B5522E; --terra-deep: #8A3B1C; --coral: #F08A6C; --peach: #FFE0C7;
  --butter: #FFF0C2; --mint: #E3F3E1; --mint-edge: #CFE3C9; --pink: #FFE3E8; --lilac: #EDE6FA; --night: #34449E; --leaf: #2E7D4A;
  --shadow: 122 82 56;
  --fallback: "Hiragino Maru Gothic ProN", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans JP", "Malgun Gothic", "Yu Gothic UI", sans-serif;
  --display: "Jua", "Gowun Dodum", var(--fallback);
  --body: "Gowun Dodum", var(--fallback);
  --book: var(--coral);
  --c: var(--peach);
  color-scheme: light;
}
/* 앱의 두 글꼴에는 가나·한자가 없다. 일본어 화면은 앱처럼 기기의 일본어 글꼴(애플 기기는 둥근 히라기노)로 그린다. */
html:lang(ja) {
  --display: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  --body: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--room); color: var(--ink);
  font: 400 1.0625rem/1.7 var(--body); word-break: keep-all; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
html:lang(ja) body { word-break: normal; line-break: strict; }
/* 이야기에서 온 일본어 글(제목·대사·이름)은 낱말 사이를 띄어 쓴 히라가나라, 띈 자리에서만 줄을 바꾼다. */
html:lang(ja) :is(.book-title, .book-theme, .book-sub, .book-copy h2, .book-hero-copy h1, .book-hero-copy .tagline, .book-row .chip, .book-hero-copy .chip, .story-card, .fork-q, .opt, .lesson-words, .friend-bubble, .crumbs [aria-current], .listen-caption) { word-break: keep-all; }
img, video, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.22; margin: 0; text-wrap: balance; }
html:lang(ja) :is(h1, h2, h3, .pill, .brand, .book-title, .friend-name, .chip, summary) { font-weight: 700; }
p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--terra); text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--terra-deep); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--night); outline-offset: 3px; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(100% - 40px, 1120px); margin-inline: auto; }
.wrap.narrow { width: min(100% - 40px, 760px); }
.icon { display: inline-block; flex: none; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 10; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; }
.skip:focus { top: 12px; color: #fff; }

/* 색종이 깃발 */
.bunting {
  height: 46px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='46'%3E%3Crect y='8' width='300' height='2' fill='%23D9B48F'/%3E%3Cpath d='M12 9h36L30 39z' fill='%23F08A6C'/%3E%3Cpath d='M72 9h36L90 39z' fill='%23FFC94D'/%3E%3Cpath d='M132 9h36l-18 30z' fill='%239ED3A6'/%3E%3Cpath d='M192 9h36l-18 30z' fill='%23F7A9B8'/%3E%3Cpath d='M252 9h36l-18 30z' fill='%23B9A7E8'/%3E%3C/svg%3E") repeat-x center top;
}

/* 머리 */
.top { padding: 2px 0 6px; }
.top-row { display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; white-space: nowrap; font-family: var(--display); font-size: 1.3rem; line-height: 1.1; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-icon { border-radius: 11px; box-shadow: 2px 3px 6px rgb(var(--shadow) / 0.22); flex: none; }
.top-nav { display: none; gap: 4px; }
.top-nav a { padding: 8px 14px; border-radius: 999px; font-family: var(--display); font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.top-nav a:hover { background: var(--peach); }
.lang { position: relative; }
.lang summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px;
  background: var(--butter); border: 2px solid var(--edge); font-family: var(--display); font-size: 1.02rem; cursor: pointer; list-style: none;
}
.lang summary::-webkit-details-marker { display: none; }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; min-width: 150px; padding: 8px;
  background: var(--paper); border: 2px solid var(--edge); border-radius: 20px; box-shadow: 4px 12px 22px rgb(var(--shadow) / 0.2);
}
.lang li a { display: block; padding: 9px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.lang li a:hover { background: var(--butter); }
.top .top-get { display: none; }
.lang-hint { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 12px; background: var(--butter); border-block: 2px solid var(--edge); font-size: 0.98rem; }
.lang-hint[hidden] { display: none; }
.lang-hint button { border: 0; background: none; width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--ink-soft); }
.lang-hint button:hover { background: var(--paper); }

/* 알약 단추 */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 4px 26px;
  border-radius: 999px; border: 2px solid transparent; font-family: var(--display); font-size: 1.15rem; line-height: 1.15;
  color: var(--ink); text-decoration: none; text-align: center; cursor: pointer; transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}
.pill:hover { color: var(--ink); }
.pill-sun { background: var(--sun); box-shadow: 0 5px 0 var(--sun-deep); }
.pill-terra { background: var(--terra); color: #fff; box-shadow: 0 5px 0 var(--terra-deep); }
.pill-terra:hover { color: #fff; }
.pill-paper { background: var(--paper); border-color: var(--edge); box-shadow: 0 5px 0 var(--edge); }
.pill-sun:active, .pill-terra:active, .pill-paper:active { transform: translateY(3px); }
.pill-sun:active { box-shadow: 0 2px 0 var(--sun-deep); }
.pill-terra:active { box-shadow: 0 2px 0 var(--terra-deep); }
.pill-paper:active { box-shadow: 0 2px 0 var(--edge); }
.pill-soon { background: var(--paper-shade); border: 2px dashed var(--stitch); color: var(--ink-soft); cursor: default; }
.pill-small { min-height: 44px; padding: 2px 18px; font-size: 1.05rem; }
.chip { display: inline-block; padding: 3px 14px; border-radius: 999px; background: var(--butter); border: 2px solid var(--edge); font-family: var(--display); font-size: 0.95rem; line-height: 1.5; color: var(--ink); }

/* 종이 카드 */
.card { position: relative; background: var(--paper); border: 2px solid var(--edge); border-radius: 32px; padding: 28px; box-shadow: 0 6px 0 var(--edge), 5px 16px 26px rgb(var(--shadow) / 0.12); }
.card.stitched::before { content: ""; position: absolute; inset: 9px; border: 2px dashed var(--stitch); border-radius: 23px; pointer-events: none; }

/* 구역 */
.section { padding-block: clamp(52px, 8vw, 100px); }
.section.tight { padding-block: clamp(36px, 5.5vw, 68px); }
.section-head { max-width: 760px; margin-bottom: clamp(26px, 4vw, 44px); }
.section-head h2, .tour-copy h2, .get-copy h2 { font-size: clamp(1.75rem, 3.2vw + 0.8rem, 2.6rem); }
.section-head p { margin-top: 12px; font-size: 1.15rem; color: var(--ink-soft); }
.band { background: var(--paper); }
.lead { font-size: clamp(1.1rem, 0.6vw + 1rem, 1.25rem); line-height: 1.7; }
.more { margin-top: 36px; text-align: center; }

/* 첫 화면 */
.hero { padding-block: clamp(20px, 4vw, 48px) clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.eyebrow { display: inline-block; padding: 4px 16px; border-radius: 999px; background: var(--peach); font-family: var(--display); font-size: 1rem; color: var(--ink-soft); }
.hero h1 { margin-top: 14px; font-size: clamp(2.7rem, 7vw + 0.8rem, 4.6rem); line-height: 1.08; letter-spacing: -0.01em; }
.tagline { margin-top: 10px; font-family: var(--display); font-size: clamp(1.25rem, 1.6vw + 0.9rem, 1.7rem); line-height: 1.3; color: var(--terra); }
html:lang(ja) .tagline { font-weight: 700; }
.hero .lead { margin-top: 18px; max-width: 34em; }
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }
.badge { display: inline-block; border-radius: 10px; transition: transform 0.12s ease-out; }
.badge:hover { transform: translateY(-2px); }
.badge img { height: 54px; width: auto; }
.stores-note { margin-top: 12px; font-size: 0.98rem; color: var(--ink-soft); }
.stores-note + .stores-note { margin-top: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.facts li { padding: 4px 14px; border-radius: 999px; background: var(--paper); border: 2px solid var(--edge); font-family: var(--display); font-size: 0.98rem; }
html:lang(ja) .facts li { font-weight: 700; }

.hero-art { position: relative; width: min(100%, 520px); aspect-ratio: 1 / 1.14; margin-inline: auto; }
.hero-disc { position: absolute; inset: 9% 2% 5% 2%; border-radius: 50%; background: var(--peach); }
.hero-art .phone { position: absolute; }
.hero-art .phone-back { left: 5%; top: 3%; width: 41%; transform: rotate(-7deg); }
.hero-art .phone-front { right: 6%; top: 7%; width: 45%; transform: rotate(4deg); }
.hero-pori { position: absolute; left: 0; bottom: 1%; width: 40%; filter: drop-shadow(4px 8px 8px rgb(var(--shadow) / 0.25)); animation: float 5s ease-in-out infinite; }
.spark { position: absolute; width: 26px; aspect-ratio: 1; background: var(--sun); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 3.2s ease-in-out infinite; }
.spark-a { left: 2%; top: 12%; }
.spark-b { right: 0; top: 2%; width: 20px; background: var(--coral); animation-delay: 0.8s; }
.spark-c { right: 3%; bottom: 10%; width: 22px; background: #9ED3A6; animation-delay: 1.6s; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes twinkle { 50% { transform: scale(0.6) rotate(20deg); opacity: 0.55; } }

/* 기기 모양 */
.phone { width: min(100%, 280px); margin-inline: auto; padding: 2.6%; border-radius: 13% / 6.2%; background: var(--ink); box-shadow: 0 0 0 2px #5B4130 inset, 8px 18px 30px rgb(var(--shadow) / 0.3); position: relative; }
.phone-screen { display: block; border-radius: 11% / 5.1%; overflow: hidden; background: var(--room); }
.phone-screen img { width: 100%; }
.phone::after { content: ""; position: absolute; left: 50%; top: 3.1%; width: 27%; height: 2.6%; border-radius: 999px; background: var(--ink); transform: translateX(-50%); }
.phone-mini { width: 100%; padding: 3%; box-shadow: 0 0 0 1.5px #5B4130 inset, 4px 10px 16px rgb(var(--shadow) / 0.26); }
.tablet { padding: 2.2%; border-radius: 4.6% / 6.4%; background: var(--ink); box-shadow: 0 0 0 2px #5B4130 inset, 8px 18px 30px rgb(var(--shadow) / 0.3); }
.tablet-screen { display: block; border-radius: 2.8% / 4%; overflow: hidden; }
.tablet-screen img { width: 100%; }
.phone-land { position: relative; padding: 1.2%; border-radius: 6.2% / 13%; background: #20140c; box-shadow: 8px 18px 30px rgb(0 0 0 / 0.28); }
.phone-land .phone-screen { border-radius: 5.1% / 11%; background: #20140c; }
.phone-land video { width: 100%; }

/* 약속 */
.promises { display: grid; gap: 20px; }
.promise { padding: 24px; border-radius: 28px; background: var(--room); border: 2px solid var(--edge); }
.promise svg { width: 52px; height: 52px; }
.promise h3 { margin-top: 12px; font-size: 1.35rem; }
.promise p { margin-top: 8px; color: var(--ink-soft); }

/* 책장 */
.shelf { --gap: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 30px; }
.shelf > li { display: flex; flex-direction: column; min-width: 0; }
.book-link { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.book-link:hover { color: var(--ink); }
.cover { display: block; aspect-ratio: 3 / 4; border-radius: 6px 16px 16px 6px; overflow: hidden; border: 4px solid #fff; background: var(--paper-shade); box-shadow: 3px 8px 14px rgb(var(--shadow) / 0.26); transform-origin: 50% 100%; transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.ghost { visibility: hidden; }
.tilt-a { transform: rotate(-2deg); } .tilt-b { transform: rotate(1.5deg); } .tilt-c { transform: rotate(-1deg); } .tilt-d { transform: rotate(2deg); }
.book-link:hover .cover, .book-link:focus-visible .cover, .book-cover:hover .cover { transform: translateY(-8px) rotate(0deg); }
.plank { display: block; height: 14px; margin-inline: calc(var(--gap) / -2); background: var(--wood); box-shadow: 0 6px 0 var(--wood-dark), 3px 14px 12px rgb(var(--shadow) / 0.2); }
.shelf > li:first-child .plank, .shelf > li:nth-child(3n + 1) .plank { margin-left: -10px; border-radius: 8px 0 0 8px; }
.shelf > li:nth-child(3n) .plank { margin-right: -10px; border-radius: 0 8px 8px 0; }
.book-title { margin-top: 22px; font-family: var(--display); font-size: clamp(1rem, 1.2vw + 0.75rem, 1.3rem); line-height: 1.3; }
.book-theme { margin-top: 4px; font-size: 0.92rem; color: var(--ink-soft); }

/* 이렇게 읽어요 */
.feature { display: grid; gap: 28px; align-items: center; padding-block: clamp(26px, 4vw, 48px); }
.feature + .feature { border-top: 2px dashed var(--stitch); }
.feature-icon { margin-bottom: 10px; }
.feature h3 { font-size: clamp(1.5rem, 2vw + 0.9rem, 2.05rem); }
.feature-copy p { margin-top: 12px; font-size: 1.12rem; max-width: 32em; }
.listen-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 22px; }
.listen-caption { font-size: 0.96rem; color: var(--ink-soft); }
.listen.is-playing { background: var(--terra-deep); box-shadow: 0 2px 0 #5d2610; transform: translateY(3px); }
.listen-row audio { width: 100%; margin-top: 8px; }

/* 친구들이 서는 무대 */
.stage { position: relative; padding: 46px 12px 0; border-radius: 28px; overflow: hidden; background: radial-gradient(120% 80% at 50% 20%, #FAD08A, #F3B25C 70%); border: 2px solid var(--edge); }
.stage::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 22px; background: radial-gradient(circle at 20px 0, var(--coral) 19px, transparent 20px) 0 0 / 80px 22px repeat-x, radial-gradient(circle at 60px 0, #F7A9B8 19px, transparent 20px) 0 0 / 80px 22px repeat-x; }
.stage::after { content: ""; display: block; height: 30px; margin: -22px -12px 0; background: var(--wood); border-top: 6px solid var(--wood-dark); }
.stage-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; row-gap: 6px; }
.friend { flex: 0 0 25%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 34px 2px 0; min-width: 0; border: 0; background: none; cursor: pointer; position: relative; border-radius: 16px; -webkit-tap-highlight-color: transparent; }
.friend-art { position: relative; display: block; width: min(100%, 104px); aspect-ratio: 1; }
.friend-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(2px 5px 4px rgb(59 36 14 / 0.3)); transform-origin: 50% 100%; transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.friend:hover .friend-art img { transform: translateY(-4px); }
.friend.is-playing .friend-art img { animation: hop 0.5s ease-out 2; }
.friend-name { display: inline-block; margin: 6px 0 12px; padding: 2px 8px; border-radius: 14px; background: var(--paper); font-family: var(--display); font-size: 0.82rem; line-height: 1.3; text-align: center; min-width: min-content; max-width: 100%; overflow-wrap: normal; word-break: keep-all; text-wrap: balance; }
.friend-bubble { position: absolute; left: 50%; top: 0; transform: translate(-50%, 6px) scale(0.6); opacity: 0; padding: 2px 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 34%, #fff); border: 2px solid color-mix(in srgb, var(--c) 70%, var(--ink-soft)); font-family: var(--display); font-size: 0.92rem; line-height: 1.5; white-space: nowrap; pointer-events: none; transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.3), opacity 0.2s; }
.friend.is-playing .friend-bubble { transform: translate(-50%, 0) scale(1); opacity: 1; }
@keyframes hop { 30% { transform: translateY(-14px) rotate(-5deg); } 60% { transform: translateY(0) rotate(4deg); } }

/* 네 언어 */
.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; max-width: 720px; margin-inline: auto; width: 100%; }
.four li { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.four li:nth-child(odd) { margin-top: 18px; }
.four .chip { font-size: 0.85rem; padding: 1px 10px; }
.devices { position: relative; padding-bottom: 8%; }
.phone-over { position: absolute; right: 2%; bottom: 0; width: 23%; }

/* 둘러보기 영상 */
.tour { background: var(--terra); color: #fff; }
.tour-grid { display: grid; gap: 28px; align-items: center; }
.tour .lead { margin-top: 12px; color: #FFE9DD; }
.tour-note { margin-top: 10px; font-size: 0.95rem; color: #F7CDBB; }
.tour-toggle { position: absolute; right: 4%; bottom: 8%; width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--edge); background: var(--paper); box-shadow: 0 4px 0 var(--edge); cursor: pointer; }
.tour-toggle::before { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-left: 16px solid var(--ink); border-block: 10px solid transparent; transform: translateX(3px); }
.tour-toggle.is-playing::before { width: 16px; height: 18px; border: 0; border-inline: 5px solid var(--ink); transform: none; }
.tour-toggle[hidden] { display: none; }

/* 함께 읽기 */
.tips { display: grid; gap: 22px; }
.tip { padding: 26px 24px 24px; }
.tip-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); box-shadow: 0 4px 0 var(--sun-deep); font-family: var(--display); font-size: 1.3rem; }
.tip h3 { margin-top: 16px; font-size: 1.35rem; }
.tip p { margin-top: 8px; color: var(--ink-soft); }

/* 묻고 답하기 */
.qa { border-bottom: 2px dashed var(--stitch); }
.qa summary { display: flex; align-items: center; gap: 12px; padding: 18px 4px; font-family: var(--display); font-size: 1.2rem; line-height: 1.35; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; flex: none; margin-left: auto; width: 12px; height: 12px; border-right: 3px solid var(--terra); border-bottom: 3px solid var(--terra); transform: rotate(45deg) translate(-3px, -3px); transition: transform 0.2s; }
.qa[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.qa p { padding: 0 4px 20px; color: var(--ink-soft); }

/* 받기 */
.get-card { display: grid; gap: 22px; padding: clamp(30px, 5vw, 52px); background: var(--butter); border-color: #F2D98A; box-shadow: 0 6px 0 #F2D98A, 5px 16px 26px rgb(var(--shadow) / 0.12); }
.get-card.stitched::before { border-color: #EBCB6F; }
.get-pori { width: 120px; filter: drop-shadow(3px 6px 6px rgb(var(--shadow) / 0.22)); }
.get-copy .lead { margin-top: 10px; }
.qr { display: none; }
.qr img { width: 132px; padding: 8px; border-radius: 16px; background: var(--paper); border: 2px solid var(--edge); }
.qr figcaption { margin-top: 8px; max-width: 150px; font-size: 0.86rem; line-height: 1.45; color: var(--ink-soft); }

/* 발 */
.foot { padding: 44px 0 56px; background: var(--room-deep); font-size: 0.98rem; }
.foot-row { display: grid; gap: 22px; margin-bottom: 26px; }
.foot-brand strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.4rem; }
html:lang(ja) .foot-brand strong { font-weight: 700; }
.foot-brand span { color: var(--ink-soft); }
.foot-links, .foot-langs { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { color: var(--ink); }
.foot-langs a[aria-current] { font-weight: 700; text-decoration: none; }
.foot-small { margin-top: 6px; font-size: 0.84rem; line-height: 1.6; color: var(--ink-soft); }

/* 속 페이지 머리 */
.page-head { padding-block: clamp(18px, 3vw, 32px) clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.1rem, 4.4vw + 0.8rem, 3.4rem); }
.page-head .lead { margin-top: 14px; max-width: 36em; }
.crumbs { margin-bottom: 20px; font-size: 0.95rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--ink-soft); }
.crumbs [aria-current] { color: var(--ink-soft); }

/* 동화책 소개 */
.book-rows { display: grid; gap: 28px; }
.book-row { display: grid; gap: 24px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: 32px; background: color-mix(in srgb, var(--book) 11%, var(--paper)); border: 2px solid color-mix(in srgb, var(--book) 24%, var(--edge)); }
.book-cover { display: block; width: min(60%, 240px); margin-inline: auto; }
.book-copy h2 { margin-top: 12px; font-size: clamp(1.6rem, 2.4vw + 0.9rem, 2.2rem); }
.book-copy h2 a { color: var(--ink); text-decoration: none; }
.book-copy h2 a:hover { text-decoration: underline; }
.book-sub { margin-top: 6px; font-family: var(--display); font-size: 1.15rem; color: var(--terra); }
html:lang(ja) .book-sub { font-weight: 700; }
.book-copy > p { margin-top: 14px; }
.faces { display: flex; gap: 6px; margin-top: 16px; }
.faces li { width: 48px; height: 48px; padding: 5px; border-radius: 50%; background: var(--paper); border: 2px solid var(--edge); }
.faces img { width: 100%; height: 100%; object-fit: contain; }

/* 책 한 권 */
.book-head { background: linear-gradient(color-mix(in srgb, var(--book) 15%, var(--room)), var(--room)); }
.book-hero { display: grid; gap: 28px; align-items: center; }
.book-hero > .cover { width: min(62%, 280px); margin-inline: auto; }
.book-hero-copy h1 { margin-top: 12px; }
.split { display: grid; gap: 32px; align-items: center; }
.split h2, .lesson h2 { font-size: clamp(1.6rem, 2.4vw + 0.9rem, 2.15rem); }
.split .lead { margin-top: 10px; color: var(--ink-soft); }
.story-card { margin-top: 20px; display: grid; gap: 12px; font-size: 1.2rem; line-height: 1.75; }
.say { display: flex; align-items: flex-start; gap: 10px; }
.say-face { flex: none; width: 44px; height: 44px; padding: 4px; border-radius: 50%; background: var(--paper); border: 2px solid var(--edge); }
.say-face img { width: 100%; height: 100%; object-fit: contain; }
.say-words { padding: 6px 16px; border-radius: 18px; background: color-mix(in srgb, var(--c) 30%, #fff); }
.fork { margin-top: 22px; }
.fork-q { font-family: var(--display); font-size: 1.3rem; line-height: 1.4; }
html:lang(ja) .fork-q { font-weight: 700; }
.opts { display: grid; gap: 12px; margin-top: 16px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 20px; border: 2px solid var(--edge); font-family: var(--display); font-size: 1.12rem; line-height: 1.35; }
html:lang(ja) .opt { font-weight: 700; }
.opt img { flex: none; width: 96px; border-radius: 13px; }
.opt-butter { background: var(--butter); border-color: #F2D98A; }
.opt-mint { background: var(--mint); border-color: var(--mint-edge); }
.opt-pink { background: var(--pink); border-color: #F5C9D2; }
.lesson { text-align: center; padding: 36px 28px; }
.lesson-icon { margin-inline: auto; }
.lesson-words { margin-top: 12px; font-family: var(--display); font-size: clamp(1.3rem, 1.6vw + 1rem, 1.7rem); line-height: 1.45; color: var(--terra); text-wrap: balance; }
html:lang(ja) .lesson-words { font-weight: 700; }
.talk { margin-top: 18px; display: grid; gap: 12px; counter-reset: talk; }
.talk li { position: relative; padding: 14px 18px 14px 58px; border-radius: 20px; background: var(--room); border: 2px solid var(--edge); font-size: 1.1rem; counter-increment: talk; }
.talk li::before { content: counter(talk); position: absolute; left: 14px; top: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sun); font-family: var(--display); }

/* 글 문서(지원 · 개인정보 처리방침) */
.doc { padding: clamp(26px, 5vw, 48px); }
.doc h1 { font-size: clamp(1.9rem, 3vw + 1rem, 2.6rem); }
.doc h2 { margin-top: 34px; font-size: 1.4rem; }
.doc p, .doc ul { margin-top: 12px; }
.doc ul { padding-left: 1.3em; list-style: disc; }
.doc-date { color: var(--ink-soft); font-size: 0.95rem; }
.doc-intro { font-size: 1.15rem; }
.doc-more { margin-top: 28px; }
.mail { font-size: 1.15rem; word-break: break-all; }

/* 404 */
.lost { padding-block: 40px 80px; text-align: center; }
.lost-pori { width: 150px; margin-inline: auto; }
.lost-langs { display: grid; gap: 28px; margin-top: 24px; }
.lost-langs h2 { font-size: 1.5rem; }
.lost-langs p { margin-top: 6px; }
.lost-langs p + p { margin-top: 14px; }

@media (min-width: 560px) {
  .promises { grid-template-columns: repeat(2, 1fr); }
  .stage { padding-inline: 24px; }
  .stage::after { margin-inline: -24px; }
  .friend-name { font-size: 0.95rem; }
  .qr { display: block; }
  .get-card { grid-template-columns: auto 1fr auto; align-items: center; }
  .foot-row { grid-template-columns: 1fr auto; align-items: end; }
  .foot-langs { grid-column: 1 / -1; }
}
@media (min-width: 720px) {
  .top-nav { display: flex; }
  .top .top-get { display: inline-flex; }
  .brand { margin-right: 8px; }
  .top-nav { margin-right: auto; }
  .tips { grid-template-columns: repeat(3, 1fr); }
  .friend { flex-basis: 12.5%; }
  .book-row { grid-template-columns: 240px 1fr; gap: 40px; }
  .book-row.flip { grid-template-columns: 1fr 240px; }
  .book-row.flip .book-cover { order: 2; }
  .book-cover { width: 100%; }
  .book-hero { grid-template-columns: 280px 1fr; gap: 48px; }
  .book-hero > .cover { width: 100%; }
  .split { grid-template-columns: 1fr 300px; gap: 56px; }
  .split.flip { grid-template-columns: 300px 1fr; }
  .split.flip > :first-child { order: 2; }
  .split:has(.lesson) { grid-template-columns: 1fr 1.2fr; }
}
@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 24px; }
  .promises { grid-template-columns: repeat(4, 1fr); }
  .shelf { grid-template-columns: repeat(5, minmax(0, 1fr)); --gap: 30px; }
  .shelf-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 880px; margin-inline: auto; }
  .shelf .shelf-fill { display: none; }
  .shelf > li .plank, .shelf > li:nth-child(3n) .plank, .shelf > li:nth-child(3n + 1) .plank { margin-inline: calc(var(--gap) / -2); border-radius: 0; }
  .shelf > li:first-child .plank { margin-left: -16px; border-radius: 8px 0 0 8px; }
  .shelf > li:nth-last-child(1 of :not(.shelf-fill)) .plank { margin-right: -16px; border-radius: 0 8px 8px 0; }
  .feature { grid-template-columns: 1fr 1fr; gap: 56px; }
  .feature.flip .feature-copy { order: 2; }
  .feature.wide { grid-template-columns: 1fr; }
  .feature.wide .feature-copy { max-width: 720px; }
  .tour-grid { grid-template-columns: 0.8fr 1.2fr; gap: 56px; }
  .friend-art { width: min(100%, 112px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 책과 인물의 색(stories/*/story.json) */
.b-moon_wolf{--book:#4B5FD7}
.b-seed_kong{--book:#5CB85C}
.b-whale_popo{--book:#2EA8D8}
.b-robot_pipi{--book:#F2A93B}
.b-bear_mungchi{--book:#B5651D}
.c-wolf_lulu{--c:#8FA3FF}
.c-rabbit_tori{--c:#FFD1E3}
.c-owl_grandpa{--c:#C9A67A}
.c-star_byeol{--c:#FFE066}
.c-fireflies{--c:#B9FF8A}
.c-moon{--c:#FFF4C2}
.c-rabbit_mom{--c:#F5B7CF}
.c-seed_kong{--c:#9BE37D}
.c-worm_gil{--c:#E8A0BF}
.c-sun_haenim{--c:#FFC94D}
.c-cloud_guru{--c:#D6E6F5}
.c-butterfly_nabi{--c:#B28DFF}
.c-rainbow_small{--c:#FFB3C6}
.c-whale_popo{--c:#7CC8F0}
.c-turtle_dodo{--c:#8FD18F}
.c-crab_jjib{--c:#FF8C69}
.c-seagull_kkak{--c:#E9EEF5}
.c-fish_school{--c:#FFD166}
.c-trash_pile{--c:#A9A9A9}
.c-kids_beach{--c:#FFCBA4}
.c-robot_pipi{--c:#C9CDD6}
.c-apple_red{--c:#FF5A5A}
.c-frog_green{--c:#6BD46B}
.c-bird_blue{--c:#5AA9FF}
.c-rainbow_mujigae{--c:#FFB3C6}
.c-town_friends{--c:#F4D7A1}
.c-bear_mungchi{--c:#D2A26D}
.c-squirrel_ttori{--c:#F0A868}
.c-hedgehog_gasi{--c:#A88B6A}
.c-fox_yeoni{--c:#FF9E5E}
.c-honey_pot{--c:#FFC94D}
.c-snowflakes{--c:#E3F4FF}
