:root {
  color-scheme: dark;
  --paper: #e5dccb;
  --muted: #a09a8f;
  --gold: #cdb382;
  --ease: cubic-bezier(0.22, 0.65, 0.25, 1);
  /* 2026-09-21 표지 리뉴얼(①안 — 지록 "1로해줘") — 그림이 표지를 꽉 채우고, 그 위에 이 겹(.front-cover::after)을
     깔아 글이 앉을 자리를 만든다. 대부분은 아래(--cover-scrim, 글도 아래 .title-top 없는 기본값), house·stitch
     처럼 그림 위쪽이 하늘이면 --cover-scrim-top(글도 위, .title-top — books.js cover.titleAt). 책마다 배경
     밝기가 달라 겹 자체는 공통(진하기 고정). ⚠️ check-books.mjs 「제목 대비」 검사(실제 화면 픽셀, 4.5:1)에서
     game-book(보리의 첫걸음)이 4.36으로 한 번 걸렸다 — 겹 폭이 62%(옛 값)일 때 윗줄(series)이 겹의 맨 윗선
     (옅어지는 쪽) 바로 위로 살짝 나가, 그 자리 그림이 밝으면 겹이 거의 안 덮인 채로 글자가 앉았다. 겹을 68%까지
     늘리고 곡선도 더 진하게 다시 짰다 — 10권 전부 4.5:1을 넉넉히 넘긴다(재확인: check-books.mjs --all). */
  --cover-scrim: linear-gradient(to top, rgba(6, 7, 9, 0.97) 0%, rgba(6, 7, 9, 0.93) 26%, rgba(6, 7, 9, 0.78) 52%, rgba(6, 7, 9, 0.4) 82%, rgba(6, 7, 9, 0) 100%);
  /* 위쪽에 글을 앉힐 때(--cover-scrim 을 위아래로 뒤집은 것 — 진하기 곡선은 같다) */
  --cover-scrim-top: linear-gradient(to bottom, rgba(6, 7, 9, 0.97) 0%, rgba(6, 7, 9, 0.93) 26%, rgba(6, 7, 9, 0.78) 52%, rgba(6, 7, 9, 0.4) 82%, rgba(6, 7, 9, 0) 100%);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: #15171a;
  color: var(--paper);
}
body {
  font-family: var(--font-story);
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #d7bd85;
  outline-offset: 8px;
}
button[hidden],
[hidden] {
  display: none !important;
}
button {
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
.library {
  min-height: 100svh;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse at 66% 31%, #665b3b22, transparent 52%),
    linear-gradient(110deg, #181d22, #242321 65%, #191a1b);
}
.library:before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 3px,
    #a8987510 4px 5px
  );
}
.library-header {
  position: relative;
  padding: 35px 5.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ddd2b011;
}
.wordmark {
  font-size: 18px;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 13px;
}
.mark {
  font-size: 30px;
  line-height: 1;
  color: var(--gold);
}
.header-note {
  font:
    11px var(--font-ui),
    sans-serif;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.collection {
  position: relative;
  max-width: 1500px;
  margin: auto;
  min-height: calc(100svh - 177px);
  display: grid;
  grid-template-columns: 38% 62%;
  align-items: center;
  padding: 40px 6% 65px;
}
.intro {
  z-index: 2;
  align-self: center;
  transition:
    opacity 0.4s,
    transform 0.7s var(--ease);
}
.overline {
  font:
    10px/1.7 var(--font-ui),
    sans-serif;
  letter-spacing: 0.24em;
  color: var(--gold);
  margin: 0 0 27px;
}
.intro h1 {
  font-weight: 400;
  font-size: clamp(32px, 3.2vw, 52px);
  line-height: 1.55;
  letter-spacing: -0.04em;
  margin: 0 0 25px;
}
.intro-copy {
  font-size: 14px;
  line-height: 2.1;
  color: var(--muted);
  margin: 0;
}
.room {
  position: relative;
  height: 550px;
  perspective: 1500px;
  transform-style: preserve-3d;
}
.pool-of-light {
  position: absolute;
  left: 8%;
  top: -100px;
  width: 80%;
  height: 680px;
  background: radial-gradient(ellipse, #d7b37517, transparent 66%);
  pointer-events: none;
}
.wall-lines {
  position: absolute;
  inset: -180px -250px -40px -20px;
  background: linear-gradient(
    90deg,
    transparent 60%,
    #c9be9b10 60.1%,
    transparent 60.2%
  );
  transform: rotateY(-8deg);
}
.shelf {
  position: absolute;
  top: 448px;
  left: -7%;
  width: 118%;
  height: 28px;
  background: linear-gradient(#7a6147, #413426 25%, #352a21);
  box-shadow:
    0 25px 40px #0008,
    inset 0 1px #b1926c44;
  transform: rotateY(-8deg);
  transform-style: preserve-3d;
}
.shelf:before {
  content: "";
  position: absolute;
  bottom: 100%;
  height: 80px;
  width: 100%;
  background: repeating-linear-gradient(
    0deg,
    #766049 0px,
    #725b43 2px,
    #6c563f 4px
  );
  transform-origin: bottom;
  transform: rotateX(73deg);
}
.shelf-shadow {
  position: absolute;
  left: 21%;
  top: 412px;
  width: 60%;
  height: 48px;
  background: #0009;
  filter: blur(22px);
  transform: skewX(-30deg);
}
.book-stage {
  position: absolute;
  left: 28%;
  top: 46px;
  width: 260px;
  height: 385px;
  perspective: 1200px;
  transform-style: preserve-3d;
  transition: transform 1s var(--ease);
}
.volume {
  position: relative;
  display: block;
  width: 260px;
  height: 385px;
  padding: 0;
  background: none;
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(3deg);
  transition: transform 1s var(--ease);
  text-align: center;
  outline-offset: 18px !important;
}
.volume:hover {
  transform: rotateY(-16deg) rotateX(2deg) translateY(-7px);
}
.front-cover,
.back-cover {
  position: absolute;
  inset: 0;
  border-radius: 2px 7px 7px 2px;
  background: var(--cloth-c);
  backface-visibility: hidden;
}
.front-cover {
  /* position:absolute 는 위 공용 규칙(.front-cover,.back-cover)에서 이미 온다 — ::after(어두운 겹)의 기준
     상자가 되는 것도 그걸로 충분하다. 여기서 다시 relative 로 적으면 absolute+inset:0(꽉 채움)이 깨진다
     (실제로 한 번 그렇게 썼다가 표지가 쪼그라드는 걸 스크린샷에서 봤다 — check-books.mjs 로는 못 걸렀다). */
  transform: translateZ(20px);
  box-shadow:
    inset 5px 0 7px #000b,
    inset -1px 0 2px #ede1b388,
    7px 9px 20px #0006;
  overflow: hidden;
  display: flex;
  align-items: center;
  flex-direction: column;
  /* 2026-09-21 표지 리뉴얼(①안) — 그림이 통째로 표지를 채우고(.cover-illustration, inset:0) 그 위에 어두운 겹
     (::after)을 깔고, 그 위 아래쪽에 이 글 줄들이 앉는다. justify-content:flex-end 로 밑에서부터 쌓아 올리고,
     옆·아래 여백은 padding 으로(padding 은 absolute 자식의 기준 상자를 줄이지 않아 그림·겹은 그대로 꽉 찬다).
     2026-09-21 지록 지시(house 겹침) — 그림 위쪽이 비어 있는 책은 books.js cover.titleAt:"top" 을 주면
     shelf-sync.mjs 가 .volume 에 title-top 을 달고, 아래 .title-top 규칙이 이 자리를 통째로 뒤집는다. */
  justify-content: flex-end;
  padding: 0 9% 9%;
  transform-origin: left center;
  transition: transform 0.9s var(--ease);
  background: linear-gradient(110deg, var(--cloth-a), var(--cloth-b) 70%, var(--cloth-c));
}
.title-top .front-cover {
  justify-content: flex-start;
  /* 2026-09-22 팀장 결정(지록 재지적 — house 2D 카드 자체가 부제·밑줄을 지붕에 얹고 있었다) — 위쪽 배치는
     이제 두 자리로 갈린다: 윗줄(series)+제목만 위(패딩 9%, flex-start 로 그대로 packing), 부제·밑줄은
     아래 배치 책과 같은 자리(패딩-바닥 9%)로 내린다. 한 flex 세로줄 안에서 title 뒤 요소(.cover-subtitle)에
     margin-top:auto 를 주면 그 앞(series·title)은 위에서부터 그대로 쌓이고 그 뒤(subtitle·foot)는 통째로
     바닥에 붙는다(flexbox auto-margin이 남는 공간을 그 자리에서 다 먹는다) — 별도 래퍼 없이 마크업 그대로.
     바닥 패딩 9%를 새로 준다(전엔 위쪽 배치에 없었다 — subtitle·foot이 없었으니). */
  padding: 9% 9%;
}
.title-top .cover-subtitle {
  margin-top: auto;
}
.cover-border {
  position: absolute;
  inset: 13px;
  border: 1px solid #cab07760;
  pointer-events: none;
  /* 그림(z-index 0)·그라데이션(z-index 1)보다 위, 글(z-index 2)보다도 위 — 테두리는 늘 보인다 */
  z-index: 3;
}
/* 어두운 겹 — 그림 위, 글 아래. 진하기 곡선은 :root --cover-scrim(위 32%는 그림 그대로, 아래 68%에 글이 앉는다).
   .title-top 은 그림 쪽 대신 위쪽에 깐다(--cover-scrim-top, house·stitch — books.js cover.titleAt). */
.front-cover::after {
  content: "";
  position: absolute;
  /* 2026-09-27: 겹을 1px 넘겨 그림의 밝은 끝선까지 덮는다.
     최종 외곽은 .front-cover의 overflow:hidden과 둥근 모서리로 함께 자른다. */
  inset: -1px;
  border-radius: inherit;
  z-index: 1;
  pointer-events: none;
  background: var(--cover-scrim) bottom / 100% 68% no-repeat;
}
.title-top .front-cover::after {
  /* 2026-09-22 팀장 결정 — 부제·밑줄이 아래로 내려가면서(위 .title-top .cover-subtitle) 겹도 둘로 갈린다.
     위(series+제목, 3줄까지 담기게 56% — house·house-picture 3줄 제목의 아랫변이 1280 서가 실측 50.3%
     라 여유를 둔다)와 아래(부제+밑줄, 30% — 아래 배치 책의 부제·밑줄이 앉는 자리와 닮은 진하기가 나오게)
     둘 다 --cover-scrim 곡선 그대로(진하기 순서만 위/아래로 각각 씀), 옛 68%(제목+부제+밑줄을 한 덩어리로
     보던 값)보다 둘 다 짧다. */
  background:
    var(--cover-scrim-top) top / 100% 56% no-repeat,
    var(--cover-scrim) bottom / 100% 30% no-repeat;
}
/* 글 네 줄(series·title·subtitle·foot) 모두 그림·그라데이션 위에 뜨게(z-index 는 position 이 있어야 먹는다 —
   flex 항목이라 static 인 채로는 순서와 무관하게 absolute 인 그림·겹 밑에 깔린다). */
.cover-series,
.cover-title,
.cover-subtitle,
.cover-foot {
  position: relative;
  z-index: 2;
}
.cover-series {
  font:
    7px/1.6 var(--font-ui),
    sans-serif;
  letter-spacing: 0.25em;
  color: #c2ab7b;
  margin: 0 0 8px;
  text-shadow: 0 1px 3px #000c;
}
.cover-title {
  word-break: keep-all; /* 2026-10-06 — 사진관 두 권 「처 / 음이지?」. fitCoverTitles 가 폭에 맞춰 글자를 줄인다 */
  font-size: 36px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #e4cd96;
  /* 2026-09-21 — 흰 하이라이트(0 1px #fff2)는 어두운 천 바탕에서 쓰던 것. 이제 글 뒤가 사진이라 진한
     그림자로 바꿔 어떤 그림 위에서도 글자 윤곽이 산다(대비 재기: check-books.mjs 「제목 대비」). */
  text-shadow:
    0 1px 4px #000d,
    0 2px 14px #000a;
}
.cover-subtitle {
  font:
    6px/1.4 var(--font-ui),
    sans-serif;
  letter-spacing: 0.16em;
  color: #bbaa89;
  margin-top: 10px;
  text-shadow: 0 1px 3px #000c;
}
.cover-illustration {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  /* 2026-09-21 — 모든 책이 이제 자기 클래스(cover.shelfClass)를 가져서 이 값은 안 쓰인다. 클래스가 빠진 새 책이
     실수로 생겨도 무겁지 않게, 기본값도 카드용 작은 견본을 가리켜 둔다. */
  background: url("public/scene-01-320.webp") 39% 43% / cover;
}
.cover-foot {
  font-size: 8px;
  letter-spacing: 0.08em;
  color: #bbab88;
  margin-top: 9px;
  text-shadow: 0 1px 3px #000c;
}
.back-cover {
  transform: translateZ(-16px);
  box-shadow: 0 12px 25px #0008;
}
.spine {
  position: absolute;
  left: -18px;
  width: 36px;
  height: 385px;
  background: linear-gradient(90deg, var(--cloth-c), var(--cloth-b) 50%, var(--cloth-a));
  transform: rotateY(-90deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-top: 1px solid #a88c5555;
  border-bottom: 1px solid #a88c5555;
}
.spine span {
  writing-mode: vertical-rl;
  font-size: 15px;
  letter-spacing: 0.24em;
  color: #dbc398;
}
.spine small {
  position: absolute;
  bottom: 23px;
  font-size: 9px;
  color: #d7bd86;
}
.page-block {
  position: absolute;
  left: 14px;
  right: -11px;
  top: 5px;
  bottom: 5px;
  background: repeating-linear-gradient(
    90deg,
    #d3c9ad 0 1px,
    #b5ac94 1px 2px,
    #ede5cd 2px 4px
  );
  transform: translateZ(0);
  border-radius: 0 6px 6px 0;
  box-shadow: inset -4px 0 5px #2e271a66;
}
.shelf-label {
  position: absolute;
  left: 27%;
  top: 502px;
  display: flex;
  align-items: center;
  gap: 17px;
  color: #c3b9a5;
  font-size: 12px;
}
.library-footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 22px 5.5%;
  font:
    10px/1.8 var(--font-ui),
    sans-serif;
  letter-spacing: 0.08em;
  color: #77796f;
  border-top: 1px solid #ddd2b011;
}
.library-footer b {
  font-weight: 400;
  color: #b8ac91;
  margin-left: 18px;
}
.book-detail {
  position: absolute;
  right: 8%;
  width: 36%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  animation: detail-in 0.7s var(--ease);
}
.text-button {
  background: none;
  padding: 8px 0;
  color: #b6aa95;
  font: 12px var(--font-ui);
  margin-bottom: 35px;
}
.book-detail h2 {
  font-size: clamp(29px, 3vw, 43px);
  font-weight: 400;
  margin: 0 0 12px;
  letter-spacing: -0.04em;
}
.book-detail .overline {
  margin-bottom: 18px;
}
.detail-en {
  font-size: 12px;
  color: #8d908b;
  letter-spacing: 0.04em;
}
.synopsis {
  word-break: keep-all; /* 2026-10-06 일관성 검수(엄지우·유하람) — 폰에서 18/20권 줄거리가 낱말 중간에서 갈렸다. 규칙 11 */
  font-size: 15px;
  line-height: 2.15;
  color: #c2bcaf;
  margin: 30px 0;
}
.book-facts {
  word-break: keep-all; /* 2026-10-06 — 「한국 / 어」 꺾임 7권 */
  display: flex;
  gap: 18px;
  color: #a19886;
  font: 10px/1.8 var(--font-ui);
  margin-bottom: 28px;
}
.open-button {
  background: #d8c399;
  color: #252720;
  padding: 17px 24px;
  min-width: 205px;
  text-align: left;
  border-radius: 2px;
  font: 13px var(--font-ui);
  box-shadow: 0 4px 20px #0002;
}
.open-button span {
  float: right;
  margin-left: 45px;
}
.open-button:hover {
  background: #e5d3b0;
}
.quiet-note {
  font-size: 11px;
  color: #898b80;
  margin-top: 16px;
}
/* 2026-09-21 — 「같은 이야기, 다른 읽기」(규칙 23 · 팀장 지시, 지록 승인). 짝이 있는 책의 상세에서만 보인다
   (library.js fillDetail 이 hidden 을 켜고 끈다). 조용한 톤은 .quiet-note 와 같게, 안의 단추만 밑줄로 눌러진다. */
.story-pair {
  font-size: 11px;
  color: #898b80;
  margin-top: 16px;
}
.story-pair button {
  /* 2026-10-06 유하람 — 브라우저 기본 단추(회색 칩)로 그려지던 것. 밑줄 글자만 */
  border: 0; background: none; padding: 0; font: inherit; cursor: pointer;
  color: #d8c399;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.story-pair button:hover {
  color: #e5d3b0;
}
:is(body[data-view="detail"], body[data-view="returning"]) .intro,
body[data-view="opening"] .intro {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-25px);
}
:is(body[data-view="detail"], body[data-view="returning"]) .room,
body[data-view="opening"] .room {
  transform: translateX(-65%);
  transition: transform 1s var(--ease);
}
:is(body[data-view="detail"], body[data-view="returning"]) .volume {
  transform: rotateY(-7deg) rotateX(0) scale(1.08);
}
body[data-view="opening"] .volume {
  transform: rotateY(0) scale(1.18);
}
body[data-view="opening"] .front-cover {
  transform: translateZ(20px) rotateY(-125deg);
}
body[data-view="opening"] .book-detail {
  opacity: 0;
  transition: opacity 0.3s;
}
.room {
  transition: transform 1s var(--ease);
}
.reader {
  position: fixed;
  inset: 0;
  background: var(--reader-bg);
  z-index: 20;
  display: flex;
  flex-direction: column;
  animation: reader-in 0.6s var(--ease);
  height: 100dvh;
}
.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 7px max(22px, env(safe-area-inset-right)) 7px
    max(22px, env(safe-area-inset-left));
  background: var(--reader-bg);
  border-bottom: 1px solid #eee1;
}
.tool {
  background: none;
  padding: 10px 8px;
  min-height: 44px;
  font: 12px var(--font-ui);
  color: #c6c4bc;
  border-radius: 3px;
}
.tool:hover {
  background: #ffffff08;
}
.reader-title {
  font-size: 13px;
  letter-spacing: 0.06em;
}
.reader-title small {
  font: 10px var(--font-ui);
  color: #8b929b;
  margin-left: 19px;
}
.reader-tools {
  display: flex;
  gap: 9px;
}
.reading-surface {
  position: relative;
  flex: 1;
  min-height: 0;
}
.reading-surface iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.reading-surface > p {
  position: absolute;
  left: 0;
  right: 0;
  top: 35%;
  text-align: center;
  color: #c8bcaa;
  font-size: 14px;
  pointer-events: none;
}
.reader-status {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--reader-status);
  color: #dfd6c3;
  padding: 10px 18px;
  font: 12px/1.8 var(--font-ui);
  border-radius: 4px;
  max-width: 85%;
  text-align: center;
  /* 낱말 가운데서 줄이 끊기지 않게(「…소리가 나 / 요.」) — 애니북 안내와 같다 (09-15) */
  word-break: keep-all;
}
.reader-status:empty {
  display: none;
}
.chapter-panel {
  position: absolute;
  right: 20px;
  top: 70px;
  width: min(360px, calc(100% - 40px));
  background: var(--reader-panel);
  border: 1px solid #d8c59c33;
  padding: 26px;
  box-shadow: 0 15px 60px #0008;
}
.chapter-panel h2 {
  font-size: 23px;
  font-weight: 400;
}
.chapter-panel button {
  display: flex;
  gap: 14px;
  width: 100%;
  padding: 18px 0;
  background: none;
  text-align: left;
  border-top: 1px solid #fff2;
  border-bottom: 1px solid #fff2;
  font-size: 13px;
}
.chapter-panel button span {
  color: #bda87d;
  font-size: 11px;
}
.chapter-panel button span:last-child {
  margin-left: auto;
}
.chapter-panel > p:last-child {
  font: 12px/1.9 var(--font-ui);
  color: #9fa5af;
}
.reader:fullscreen {
  width: 100%;
  height: 100%;
}
@keyframes detail-in {
  from {
    opacity: 0;
    translate: 20px 0;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@keyframes reader-in {
  from {
    opacity: 0;
    scale: 1.015;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
@media (max-width: 760px) {
  .library-header {
    padding: 25px 7%;
  }
  .header-note {
    display: none;
  }
  .collection {
    display: block;
    padding: 30px 7% 20px;
    min-height: 0;
  }
  .intro h1 {
    font-size: 30px;
    line-height: 1.5;
    margin-bottom: 14px;
  }
  .intro .overline {
    margin-bottom: 15px;
    font-size: 9px;
  }
  .intro-copy {
    font-size: 12px;
  }
  .room {
    height: 430px;
    margin-top: 14px;
  }
  .book-stage {
    left: 50%;
    top: 36px;
    margin-left: -130px;
    transform: scale(0.76);
    transform-origin: 50% 0;
  }
  .shelf {
    top: 342px;
    left: -10%;
    width: 120%;
  }
  .shelf-shadow {
    top: 318px;
    left: 20%;
  }
  .shelf-label {
    top: 386px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    gap: 12px;
  }
  .library-footer {
    padding: 19px 7%;
    font-size: 9px;
  }
  .library-footer > span:first-child {
    max-width: 65%;
  }
  .book-detail {
    position: relative;
    right: auto;
    top: auto;
    width: auto;
    transform: none;
    animation: detail-in 0.5s;
  }
  .book-detail .text-button {
    position: absolute;
    top: -427px;
    left: 0;
  }
  .book-detail .overline {
    font-size: 9px;
  }
  .book-detail h2 {
    font-size: 28px;
  }
  .synopsis {
  word-break: keep-all; /* 2026-10-06 일관성 검수(엄지우·유하람) — 폰에서 18/20권 줄거리가 낱말 중간에서 갈렸다. 규칙 11 */
    font-size: 14px;
    margin: 20px 0;
  }
  .book-facts {
  word-break: keep-all; /* 2026-10-06 — 「한국 / 어」 꺾임 7권 */
    margin-bottom: 20px;
  }
  .open-button {
    width: 100%;
  }
  :is(body[data-view="detail"], body[data-view="returning"]) .intro,
  body[data-view="opening"] .intro {
    display: none;
  }
  /* 2026-10-12 지록 「모바일에서 책 위 공간이 너무 넓은데」 — 책을 고른 화면에서 「책장 · 책장 전체 보기」 줄이
     안 보이기만 하고(visibility) 자리는 그대로 차지해 머리줄과 책 사이가 비었다. 폰에서는 자리째 걷는다 */
  :is(body[data-view="detail"], body[data-view="returning"]) .layout-picker,
  body[data-view="opening"] .layout-picker {
    display: none;
  }
  :is(body[data-view="detail"], body[data-view="returning"]) .room,
  body[data-view="opening"] .room {
    transform: none;
    margin-top: 15px;
    height: 415px;
  }
  :is(body[data-view="detail"], body[data-view="returning"]) .book-stage {
    transform: scale(0.76);
  }
  .reader-toolbar {
    padding: 5px 10px;
    gap: 5px;
    min-height: 55px;
  }
  .reader-title {
    font-size: 11px;
  }
  .reader-title small {
    display: none;
  }
  .reader-tools {
    gap: 0;
  }
  .tool {
    font-size: 10px;
    padding: 8px 6px;
  }
  .library-footer {
    margin-top: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
  .volume:hover {
    transform: rotateY(-24deg);
  }
}
.spine {
  top: 0;
}
/* The shelf with several books. */
.collection {
  display: block;
  max-width: 1600px;
  padding: 28px 5.5% 45px;
  min-height: calc(100svh - 177px);
}
.intro {
  text-align: center;
  margin-bottom: 10px;
}
.intro .overline {
  margin-bottom: 10px;
}
.intro h1 {
  font-size: 30px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.intro h1 br {
  display: none;
}
.intro-copy {
  font-size: 12px;
  line-height: 1.8;
}
.intro-copy br {
  display: none;
}
.room {
  height: 460px;
  margin: 0;
  perspective: 1800px;
}
.shelf-viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  height: 413px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #8a765333 transparent;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  z-index: 1;
}
.book-track {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 1100px;
  height: 400px;
  padding: 20px 28px 0;
}
.book-stage {
  position: relative;
  left: auto;
  top: auto;
  width: 210px;
  height: 385px;
  flex: 0 0 210px;
  margin: 0;
  transform: none;
  scroll-snap-align: center;
  perspective: 1200px;
}
.volume {
  transform: scale(0.78) rotateY(-20deg);
  transform-origin: 0 100%;
}
.volume:hover {
  transform: scale(0.78) rotateY(-12deg) translateY(-4px);
}
.shelf {
  top: 400px;
  left: 0;
  width: 100%;
  transform: none;
}
.shelf-shadow {
  top: 377px;
  left: 5%;
  width: 90%;
  height: 30px;
  filter: blur(12px);
}
.shelf-label {
  top: 444px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}
.wall-lines {
  inset: 0;
  transform: none;
}
.pool-of-light {
  top: 0;
  height: 440px;
}
:is(body[data-view="detail"], body[data-view="returning"]) .room,
body[data-view="opening"] .room {
  transform: none;
}
:is(body[data-view="detail"], body[data-view="returning"]) .shelf-viewport,
body[data-view="opening"] .shelf-viewport {
  overflow: hidden;
  scroll-snap-type: none;
}
:is(body[data-view="detail"], body[data-view="returning"]) .book-stage,
body[data-view="opening"] .book-stage {
  opacity: 0.12;
  pointer-events: none;
}
:is(body[data-view="detail"], body[data-view="returning"]) .book-stage.chosen,
body[data-view="opening"] .book-stage.chosen {
  position: absolute;
  left: 13%;
  top: 0;
  z-index: 5;
  opacity: 1;
  pointer-events: auto;
}
:is(body[data-view="detail"], body[data-view="returning"]) .volume {
  transform: scale(0.68) rotateY(-24deg);
}
:is(body[data-view="detail"], body[data-view="returning"]) .volume.selected {
  transform: rotateY(-7deg);
}
body[data-view="opening"] .volume {
  transform: scale(0.68) rotateY(-24deg);
}
body[data-view="opening"] .volume.selected {
  transform: rotateY(0);
}
body[data-view="opening"] .volume:not(.selected) .front-cover {
  transform: translateZ(20px);
}
:is(body[data-view="detail"], body[data-view="returning"]) .shelf-label,
body[data-view="opening"] .shelf-label {
  visibility: hidden;
}
.book-detail {
  top: 57%;
  right: 7%;
  width: 38%;
  padding: 20px;
  background: linear-gradient(90deg, #242321e8, #242321);
}
.book-detail .text-button {
  margin-bottom: 20px;
}
@media (max-width: 760px) {
  .collection {
    padding: 25px 0 24px;
  }
  .intro {
    padding: 0 7%;
    margin-bottom: 0;
  }
  .intro h1 {
    font-size: 25px;
  }
  .intro h1 br {
    display: block;
  }
  .intro-copy br {
    display: block;
  }
  .room {
    height: 405px;
    margin-top: 0;
  }
  /* 2026-09-22 지록 「폰에서 명찰이 잘려서 보이네」 — 칸이 선반 앞판 중간에서 끝나 명찰 아래 11px 가 잘렸다. 앞판 끝까지 */
  .shelf-viewport {
    height: 375px;
  }
  .book-track {
    height: 346px;
    min-width: 0;
    width: max-content;
    gap: 12px;
    padding: 0 calc((100vw - 210px) / 2);
  }
  .book-stage {
    width: 210px;
    height: 385px;
    margin: 0;
    transform: none;
    flex-basis: 210px;
  }
  .shelf {
    top: 346px;
    left: 0;
    width: 100%;
  }
  .shelf-shadow {
    top: 328px;
  }
  .shelf-label {
    top: 389px;
    gap: 9px;
    font-size: 11px;
  }
  :is(body[data-view="detail"], body[data-view="returning"]) .room,
  body[data-view="opening"] .room {
    height: 390px;
    margin-top: 20px; /* 10-12 「책장 · 책장 전체 보기」 줄을 걷어 낸 뒤 책이 머리줄에 붙지 않게 */
  }
  :is(body[data-view="detail"], body[data-view="returning"]) .book-stage.chosen,
  body[data-view="opening"] .book-stage.chosen {
    left: calc(50% - 104px);
    top: -39px;
    transform: none;
  }
  :is(body[data-view="detail"], body[data-view="returning"]) .volume.selected,
  body[data-view="opening"] .volume.selected {
    transform: scale(0.8) rotateY(-7deg);
  }
  .book-detail {
    top: auto;
    right: auto;
    width: auto;
    margin: 0 7%;
    padding: 0;
    background: none;
  }
  .book-detail .text-button {
    position: static;
    margin-bottom: 20px;
    min-height: 44px;
  }
  .book-detail h2 {
    font-size: 28px;
  }
  .library-footer {
    margin-top: 0;
    gap: 12px;
  }
  .library-footer b {
    margin-left: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .volume:hover {
    transform: scale(0.78) rotateY(-20deg);
  }
}
:is(body[data-view="detail"], body[data-view="returning"]) .book-stage.chosen,
body[data-view="opening"] .book-stage.chosen {
  top: 15px;
}
.book-detail {
  background: none;
}
.shelf-label button {
  background: transparent;
  color: var(--gold);
  min-width: 44px;
  min-height: 44px;
  font-size: 18px;
}
.shelf-label button:disabled {
  opacity: 0.22;
  cursor: default;
}
@media (max-width: 760px) {
  :is(body[data-view="detail"], body[data-view="returning"]) .book-stage.chosen,
  body[data-view="opening"] .book-stage.chosen {
    top: -39px;
  }
  .shelf-label {
    top: 375px;
  }
}
@media (min-width: 761px) {
  .book-detail {
    top: 160px;
    transform: none;
  }
}
/* Continuous book-to-reader transition. */
.book-stage {
  transition: opacity 0.65s ease;
}
.reader {
  animation: none;
}
body[data-view="opening"] .volume.selected {
  visibility: hidden;
}
body[data-view="opening"] .volume.selected .front-cover {
  transform: translateZ(20px);
}
.book-transition {
  position: fixed;
  inset: 0;
  z-index: 40;
  perspective: 1800px;
  background: var(--reader-overlay);
  overflow: hidden;
}
.transition-spread {
  --spread-width: min(84vw, 860px);
  --spread-height: min(62vh, 440px);
  position: absolute;
  width: var(--spread-width);
  height: var(--spread-height);
  left: calc(50% - var(--spread-width) / 2);
  top: calc(47% - var(--spread-height) / 2);
  transform-origin: 50% 0;
  transform-style: preserve-3d;
  filter: drop-shadow(0 25px 30px #0006);
}
.transition-left,
.transition-right,
.transition-cover {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  border-radius: 3px;
  overflow: hidden;
}
.transition-left {
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  background: linear-gradient(90deg, #d6c9ab, #eee3cb 85%, #a99b7d);
  color: #584f3d;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.transition-left span {
  font-size: clamp(14px, 2vw, 25px);
}
.transition-left small {
  font-size: 7px;
  letter-spacing: 0.13em;
}
.transition-right {
  left: 50%;
  background:
    linear-gradient(90deg, #0005, transparent 12%),
    url("public/scene-01.png") 40% 50% / cover;
  box-shadow: inset -5px 0 5px #ece1c766;
}
.transition-cover {
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  /* 2026-09-21 표지 리뉴얼 — 앞표지(.front-cover)와 같은 짜임: 그림(i)이 꽉 차고 아래에 글이 앉는다.
     2026-09-21 지록 지시(house 겹침) — library.js dressTransition() 이 골라진 책의 titleAt 을 보고
     #book-transition 에 title-top 을 단다(달았다 뗐다), 아래 .title-top 규칙이 이 자리를 통째로 뒤집는다. */
  justify-content: flex-end;
  padding: 0 9% 9%;
  background: linear-gradient(110deg, var(--cloth-a), var(--cloth-b) 70%, var(--cloth-c));
  color: #e4cd96;
  transform-origin: 0 50%;
  backface-visibility: hidden;
  border: 1px solid #cab07770;
  box-shadow: inset 5px 0 10px #0008;
}
.title-top .transition-cover {
  justify-content: flex-start;
  padding: 9% 9% 0;
}
.transition-cover > span {
  order: 2;
  word-break: keep-all; /* 「청소부」가 「청소 / 부」로 쪼개지지 않게 — 낱말 사이에서만 줄을 바꾼다(2026-09-29 지록) */
  position: relative;
  z-index: 2;
  font-size: clamp(20px, 3vw, 42px);
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 1px 4px #000d, 0 2px 14px #000a;
}
.transition-cover i {
  /* library.js dressTransition() 가 골라진 책의 .cover-illustration 계산값(그림, 자리·크기)을 그대로 이 자리에
     인라인으로 옮겨 적는다 — 아래 값은 처음 그려질 때(책을 고르기 전)의 기본값일 뿐이다. */
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("public/scene-01.png");
  background-position: 39% 43%;
  background-size: cover;
}
.transition-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--cover-scrim) bottom / 100% 68% no-repeat;
}
.title-top .transition-cover::after {
  /* 2026-09-22 — 여는 모션 표지는 series·제목만 있다(subtitle·foot 요소 자체가 없다, 아래 .transition-cover
     마크업 참고) — 그래서 .front-cover::after 처럼 겹을 둘로 가를 게 없고, 위쪽 겹만 .front-cover 의 새
     제목용 크기(56%)와 맞춘다. */
  background: var(--cover-scrim-top) top / 100% 56% no-repeat;
}
.transition-cover small {
  order: 1;
  position: relative;
  z-index: 2;
  margin-bottom: 8px;
  font-size: 7px;
  letter-spacing: 0.18em;
  text-shadow: 0 1px 3px #000c;
}
.unfolded .transition-left {
  opacity: 1;
}
.unfolded .transition-cover {
  transform: rotateY(-178deg);
}
.transition-caption {
  position: absolute;
  bottom: 5%;
  left: 8%;
  right: 8%;
  text-align: center;
  font: 12px/1.8 var(--font-ui);
  color: #c2b89f;
}
.transition-caption .text-button {
  margin: 5px 0;
  padding: 10px;
  min-height: 44px;
}
@media (max-width: 760px) {
  .transition-spread {
    --spread-width: 92vw;
    --spread-height: min(48vh, 340px);
  }
  .transition-left small {
    font-size: 5px;
  }
  .transition-cover {
    padding: 7% 2%;
  }
  .transition-caption {
    bottom: 8%;
  }
}
.chapter-panel {
  animation: detail-in 0.3s var(--ease);
}
.shelf-viewport {
  scrollbar-width: none;
}
.shelf-viewport::-webkit-scrollbar {
  display: none;
}
#language-switch {
  font: 12px var(--font-ui);
  padding: 12px;
  color: var(--gold);
}
.layout-picker {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 0;
  position: relative;
  z-index: 3;
}
.layout-picker button {
  background: none;
  padding: 12px 17px;
  min-height: 44px;
  font: 12px var(--font-ui);
  color: var(--muted);
  border-bottom: 1px solid transparent;
}
.layout-picker button[aria-pressed="true"] {
  color: var(--gold);
  border-color: var(--gold);
}
body:not([data-view="shelf"]) .layout-picker {
  visibility: hidden;
}
.read-hint {
  color: var(--gold);
  font: 12px/1.8 var(--font-ui);
  margin: 18px 0;
}
#purchase-status {
  font: 12px/1.8 var(--font-ui);
  color: var(--gold);
}
body[data-layout="grid"][data-view="shelf"] .room {
  height: auto;
  min-height: 440px;
}
body[data-layout="grid"][data-view="shelf"] .shelf-viewport {
  height: auto;
  overflow: visible;
}
body[data-layout="grid"][data-view="shelf"] .book-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 35px 20px;
  min-width: 0;
  width: 100%;
  height: auto;
  padding: 35px 15px;
}
body[data-layout="grid"][data-view="shelf"] .book-stage {
  width: 210px;
  height: 320px;
  justify-self: center;
}
body[data-layout="grid"][data-view="shelf"] .volume {
  position: absolute;
  bottom: 0;
}
body[data-layout="grid"][data-view="shelf"] .shelf,
body[data-layout="grid"][data-view="shelf"] .shelf-shadow,
body[data-layout="grid"][data-view="shelf"] .shelf-label {
  display: none;
}
html[lang="en"] .cover-title {
  font-size: 25px;
  letter-spacing: 0;
  line-height: 1.35;
}
html[lang="en"] .spine span {
  font-size: 12px;
  letter-spacing: 0.06em;
}
html[lang="en"] .reader-title small {
  display: none;
}
@media (max-width: 760px) {
  .transition-spread {
    --page-width: min(78vw, 42svh);
    --spread-width: calc(var(--page-width) * 2);
    --spread-height: calc(var(--page-width) * 385/260);
    left: calc(50% - var(--page-width) * 1.5);
  }
  .transition-left {
    visibility: hidden;
  }
  body[data-layout="grid"][data-view="shelf"] .book-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 10px;
    padding: 25px 15px;
  }
  body[data-layout="grid"][data-view="shelf"] .book-stage {
    width: 145px;
    height: 225px;
  }
  body[data-layout="grid"][data-view="shelf"] .volume,
  body[data-layout="grid"][data-view="shelf"] .volume:hover {
    transform: scale(0.54) rotateY(-12deg);
  }
  html[lang="en"] .reader-title {
    max-width: 90px;
    line-height: 1.3;
  }
  html[lang="en"] .tool {
    font-size: 10px;
    padding: 8px 5px;
  }
}
html[lang="en"] .detail-en {
  display: none;
}
html[lang="en"] .cover-subtitle {
  visibility: hidden;
}
html[lang="en"] .intro h1 br,html[lang="en"] .intro-copy br {display:block}
/* 2026-09-15 첫 화면 문구를 새로 넣으며: 좁은 화면에서 마지막 낱말 하나만 다음 줄로 떨어지지 않게(영문 소개가 폰에서 「child.」만 남았다) */
.intro h1,.intro-copy {text-wrap:balance;word-break:keep-all}
/* 상세 제목도 줄을 고르게 — 영문 「The Child Who Stitched the / Moon」 처럼 한 낱말만 떨어지지 않게(2026-09-15 · 모든 책) */
.book-detail h2 {text-wrap:balance;word-break:keep-all}
/* Place each book on the upper plane of the shelf, above its front edge. */
.volume {translate:0 -14px}
/* 2026-09-15 지록 「책 하단에 선반에 그림자가 길게 있는데」 — 길게 보인 것은 선반 전체에 비스듬히 깔린 흐린 띠(.shelf-shadow)였다. 부품을 하나씩
   꺼 보니 이 띠만 끄면 선반 윗면의 긴 그림자가 없어졌다(상세 화면에서 가장 컸다). 띠는 끄고, 책 밑 그림자는 책 바닥에 눕힌 판 하나로 둔다 —
   옛 것은 책 틀(.book-stage) 왼쪽 끝부터 205px 가로로 깔렸는데, 이 판은 책과 같이 돌고 같이 커져 책 바닥만큼만 진다. */
.shelf-shadow {display:none}
.volume::after {content:"";position:absolute;left:-4px;right:-4px;top:100%;height:56px;transform-origin:50% 0;transform:translateZ(26px) rotateX(-90deg);background:radial-gradient(closest-side,#000b,#0000);filter:blur(3px);pointer-events:none}
body[data-layout="grid"][data-view="shelf"] .volume {translate:0 0}
/* 2026-09-25 상세의 아래 돌출: 바닥 그림자판(Z=26)이 앞표지(Z=20)보다 앞에 있어 원근과 blur로 밑선을 넘는다.
   선반이 없는 상세·복귀 화면에서는 이 판만 숨긴다. 표지·종이층·책등의 크기와 서가 그림자는 그대로 둔다. */
body[data-layout="grid"][data-view="shelf"] .volume::after,
:is(body[data-view="detail"], body[data-view="returning"]) .volume::after {display:none}
.transition-spread {perspective:1800px}
.transition-leaf {position:absolute;left:50%;top:1%;width:49.7%;height:98%;transform-origin:0 50%;border-radius:0 4px 4px 0;background:linear-gradient(90deg,#b9aa88,#f0e6ce 8%,#e8dcc0 90%,#c8b998);box-shadow:inset -1px 0 #fff8,2px 2px 3px #0003;z-index:calc(8 - var(--page));backface-visibility:visible;transform:rotateY(0deg)}
.transition-cover {z-index:10}
.unfolded .transition-leaf {transform:rotateY(calc(-176deg - var(--page)*.35deg))}
@media(max-width:760px) {.volume {translate:0 -12px}}
.volume {translate:0 -24px}
/* One continuous illustration across the open spread. */
.transition-left {background:linear-gradient(270deg,#0005,transparent 12%),url('public/scene-01.png') left center / 200% 100%;color:transparent}
.transition-left>span,.transition-left>small {visibility:hidden}
.transition-right {background:linear-gradient(90deg,#0005,transparent 12%),url('public/scene-01.png') right center / 200% 100%}
.transition-spread {--art-width:max(var(--spread-width),calc(var(--spread-height)*1672/941));--art-height:calc(var(--art-width)*941/1672)}
.transition-left {background-size:100% 100%,var(--art-width) var(--art-height);background-position:center,calc((var(--spread-width) - var(--art-width))/2) center}
.transition-right {background-size:100% 100%,var(--art-width) var(--art-height);background-position:center,calc(0px - var(--art-width)/2) center}
.paper-settled .transition-leaf {opacity:0;transition:opacity .18s ease}
@media(prefers-reduced-motion:reduce) {.paper-settled .transition-leaf {transition:none}}
@media(max-width:760px) {.transition-left {visibility:visible}}
/* Selected books may extend above the scrolling shelf. */
:is(body[data-view="detail"],body[data-view="returning"],body[data-view="opening"]) .shelf-viewport {overflow:visible}
:is(body[data-view="detail"],body[data-view="returning"],body[data-view="opening"]) .book-stage:not(.chosen) {visibility:hidden}
/* A page always has the same 260:385 ratio as its cover. */
.transition-spread {--page-width:min(38vw,40svh,300px);--spread-width:calc(var(--page-width)*2);--spread-height:calc(var(--page-width)*385/260);left:calc(50% - var(--page-width))}
@media(max-width:760px) {.transition-spread {--page-width:min(78vw,40svh);left:calc(50% - var(--page-width)*1.5)}}
/* Small controls share the same quiet motion language as the books. */
.library {animation:library-arrival .6s ease both}
@keyframes library-arrival {from {opacity:0} to {opacity:1}}
.layout-picker button,.tool,.text-button,.open-button,.shelf-label button,#language-switch,.wordmark {transition:color .2s ease,background-color .2s ease,border-color .2s ease,box-shadow .25s ease,translate .2s ease}
@media(hover:hover) {.layout-picker button:hover,.tool:hover,.text-button:hover,#language-switch:hover {color:#eed7aa;translate:0 -1px}.open-button:hover {translate:0 -2px;box-shadow:0 7px 22px #0004}.wordmark:hover {color:#eed7aa}}
.layout-picker button:active,.tool:active,.text-button:active,.open-button:active,.shelf-label button:active {translate:0 1px}
.chapter-panel {animation:none}
@media(prefers-reduced-motion:reduce) {.library {animation:none}.layout-picker button,.tool,.text-button,.open-button,.shelf-label button,#language-switch,.wordmark {transition:none;translate:none}}
.chapter-panel {max-height:75dvh;overflow-y:auto}
.chapter-panel button {min-height:44px}
.chapter-panel button[aria-current="page"] {color:#ead3a2;background:#ffffff06}

.transition-leaf {transform-style:preserve-3d;background:none}
.leaf-face {position:absolute;inset:0;backface-visibility:hidden;background-size:cover;background-position:center;border-radius:inherit;box-shadow:inset 12px 0 16px #1b140c45}
.leaf-verso {transform:rotateY(180deg);box-shadow:inset -12px 0 16px #1b140c45}

.leaf-face {background-size:200% 100%;background-position:right center}
.leaf-verso {background-position:left center}

/* Every sheet clips the same correctly proportioned, layered Scene 01. */
.transition-left,.transition-right,.leaf-face {background:var(--reader-page)!important}
.leaf-face {overflow:hidden}
.transition-leaf {top:0;width:50%;height:100%}
.unfolded .transition-leaf {transform:rotateY(-180deg)}
.unfolded .transition-leaf {z-index:calc(8 + var(--page))}
.transition-cover {z-index:15}
.spread-picture {position:absolute;top:0;left:-100%;width:200%;height:100%;display:block;pointer-events:none}
.transition-left .spread-picture,.leaf-verso .spread-picture {left:0}
.transition-spread {filter:none;transform-origin:50% 50%;transition:left .65s var(--ease),transform .65s var(--ease)}
.unfolded .transition-spread {left:calc(50% - var(--page-width));transform:scale(var(--open-scale,1))}
@media(prefers-reduced-motion:reduce){.transition-spread{transition:none}}
@media(max-width:760px){.reader-title{display:none}.reader-tools{gap:1px}.reader-tools .tool{padding:10px 7px;font-size:11px}}
.reader-toolbar {display:grid;grid-template-columns:auto minmax(0,1fr) auto}
.reader-title {min-width:0;text-align:center;line-height:1.5;text-wrap:balance;word-break:keep-all;font-size:clamp(11px,1vw,13px)}
@media(max-width:760px){
 .reader-toolbar{grid-template-columns:auto minmax(0,1fr);gap:0 8px;padding-bottom:10px}
 .reader-toolbar>#return-library{grid-column:1;grid-row:1}
 .reader-tools{grid-column:2;grid-row:1;justify-self:end}
 .reader-title{display:block;grid-column:1/-1;grid-row:2;font-size:11px;letter-spacing:.025em}
}

/* A centered library identity and legible type, with room for English covers. */
.library-header {display:flex;flex-direction:column;justify-content:center;gap:10px;padding:26px 90px}
.wordmark {justify-content:center;font-size:24px}
.header-note {display:block;text-align:center;font-size:14px;line-height:1.5;letter-spacing:.08em}
#language-switch {position:absolute;right:5.5%;top:50%;transform:translateY(-50%);font-size:15px}
.intro h1 {font-size:clamp(30px,2.8vw,42px)}
.intro-copy {font-size:17px;line-height:1.9}
.overline {font-size:12px}
.layout-picker button {font-size:15px;padding:14px 18px}
.shelf-label {font-size:17px;gap:18px}
.shelf-label button {font-size:24px;min-width:44px;min-height:44px}
.library-footer {font-size:13px;line-height:1.6}
.synopsis {font-size:18px;line-height:1.9}
.book-facts,.quiet-note,.purchase-note,.read-hint,.text-button {font-size:14px}
.open-button {font-size:16px}
.tool {font-size:14px}
.reader-title {font-size:15px}
.chapter-panel button {font-size:15px;line-height:1.6}
html[lang="en"] .cover-title {display:block;max-width:180px;margin-inline:auto;font-size:22px;line-height:1.3;letter-spacing:.01em;text-wrap:balance;word-break:normal}
@media(max-width:760px){
 .library-header{padding:22px 66px;gap:8px}
 .wordmark{font-size:21px;gap:8px;letter-spacing:.06em}
 .header-note{font-size:12px}
 #language-switch{font-size:13px;right:16px}
 .intro h1{font-size:29px}.intro-copy{font-size:15px}
 /* 권수 줄(전에는 여기서 폰 폭에 맞춰 이름·칸별 권수를 두 줄로 접었다)은 2026-09-16 지록 지시로 없앴다 — 화살표 두 개만
    남은 새 .shelf-label 규칙은 이 파일 맨 아래(row-wrap 절)에 있다. */
 .library-footer{font-size:12px}
 .reader-title,html[lang="en"] .reader-title{display:block;font-size:12px;max-width:none;width:100%;line-height:1.5}
 .reader-tools .tool,html[lang="en"] .tool{font-size:12px;padding-inline:6px}
}
@media(max-width:380px){
 html[lang] .reader-tools .tool{font-size:11px;padding-inline:4px}
 #return-library{font-size:12px;padding-inline:4px}
 #language-switch{top:8px;transform:none;font-size:11px}
}
/* Equal side columns keep the title on the illustration's actual center. */
@media(min-width:761px){.reader-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1.45fr) minmax(0,1fr)}.reader-toolbar>#return-library{justify-self:start}.reader-tools{justify-self:end}}
@media(min-width:761px) and (max-width:1100px){.reader-title{grid-row:2;grid-column:1/-1;padding-bottom:6px}.reader-toolbar{grid-template-columns:1fr 1fr;gap:0 10px}.reader-tools{grid-column:2;grid-row:1}}

/* Reserve title space so changing chapters never resizes the illustration. */
.reader-toolbar{flex-shrink:0}
@media(max-width:1100px){
 .reader-toolbar{grid-template-rows:44px 3em;font-size:12px;row-gap:2px}
 .reader-title{height:3em;display:flex!important;align-items:center;justify-content:center;padding:0;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
}
/* Keep the brand at the shelf's left edge, leaving the introduction centered. */
.library-header{display:grid;grid-template-columns:1fr auto 1fr;padding:26px 5.5%;gap:16px}
.library-header .wordmark{justify-content:flex-start;justify-self:start}
.library-header .header-actions{grid-column:3;justify-self:end} /* 가운데 「인터랙티브 책」을 걷은 뒤에도 메뉴가 오른쪽 칸에 (2026-09-15) */
#language-switch{position:static;transform:none;justify-self:end;grid-column:3}
@media(max-width:760px){
 .library-header{grid-template-columns:1fr auto;padding:22px 7%;gap:10px} /* 본문·아래줄과 같은 양옆 7% (폰에서 머리줄만 7px 바깥쪽이던 것 · 09-15) */
 .library-header .wordmark{font-size:20px}
 .library-header .header-actions{grid-row:1;grid-column:2}
 #language-switch{grid-row:1;grid-column:2}
}
/* Keep legal navigation quiet, wrapping independently of the shelf layout. */
.library-footer{flex-wrap:wrap}
.library-footer .legal-links{display:flex;flex-wrap:wrap;gap:12px 22px;width:100%;margin-top:12px;font-size:12px}
.legal-links a{color:inherit;text-underline-offset:4px}
.legal-links a:focus-visible{outline:2px solid currentColor;outline-offset:5px}
.read-hint a{display:inline-block;margin-top:18px;color:#e8d6ae;text-underline-offset:5px}
.read-hint a:focus-visible{outline:2px solid #e8d6ae;outline-offset:5px}
.book-detail .book-facts{margin:12px 0 4px}
/* 2026-09-21 — 서가 상세 정보 줄 옆 짧은 저작권 표시(locale.js copyright). 지록 09-21 "모든 책에 라이선스 내용도
   추가해야겠네" — 규칙 23 「하나 고치면 모두」의 서가 자리. */
.book-detail .book-facts-copyright{display:block;margin:0 0 20px;font-size:12px;line-height:1.6;color:#8d8674}
.book-detail .read-hint{margin:20px 0 12px}
.book-detail .quiet-note{max-width:32ch;line-height:1.8;word-break:keep-all}
/* 2026-10-07 「전자책 ↗」 아래 가격 줄 — .quiet-note 와 같은 결(같은 class 를 주면 fillDetail 의 .quiet-note 채우기가 이 줄을 잡아 버린다) */
.book-detail .price-note{margin:6px 0 0;max-width:46ch;line-height:1.8;word-break:keep-all;font-size:14px;color:inherit;text-align:start} /* 10-07 지록 「레이아웃 정리」 — 가운데(auto)로 밀리던 것을 단추 왼쪽 끝에 맞춤 */
.book-detail .price-note[hidden]{display:none}
.book-detail .price-note .nw{white-space:nowrap} /* 11-09 지록 「줄바꿈 신경써줘」 — 덩어리 안에서는 안 끊는다 */
.book-detail #purchase-status:empty{display:none}
.library-footer{justify-content:space-between;gap:16px;align-items:center}
.library-footer .legal-links{width:auto;margin:0}
.library-footer .copyright{margin-left:auto;white-space:nowrap;font:inherit}
.library-footer .copyright a{color:inherit;text-decoration:none;text-underline-offset:4px}
.library-footer .copyright a:hover{text-decoration:underline}
.header-actions{display:flex;align-items:center;justify-self:end;gap:24px;grid-column:3;white-space:nowrap;font:14px var(--font-ui)}
.header-actions a{color:#b6aa95;text-decoration:none;padding:8px 0}
.header-actions a:hover,.header-actions a[aria-current="page"]{color:#eed7aa}
.header-actions a:focus-visible{outline:2px solid #eed7aa;outline-offset:5px}
.header-actions #language-switch{font:inherit}
@media(max-width:760px){.header-actions{grid-column:2;grid-row:1;gap:14px;font-size:12px}.library-footer .legal-links{gap:14px}}
/* 2026-10-07 머리줄 누르는 자리 — 제작 노트 · BGM · EN 이 폰에서도 한 높이(세로 44px). 전에는 링크 33 · EN 41 로 어긋나 있었다(설계 bgm-메뉴 2절).
   가로 여백은 그대로(EN 만 12px). 359px 이하는 묶음을 둘째 줄 오른쪽으로 내려 로고와 부딪히지 않게 한다. */
.header-actions a{display:inline-flex;align-items:center;min-height:44px;padding-block:0}
.header-actions #language-switch{padding:0 12px}
@media(max-width:389px){.header-actions{gap:12px}}
@media(max-width:359px){.library-header .header-actions{grid-row:2;grid-column:1 / -1;justify-self:end}.library-header #language-switch{grid-row:auto;grid-column:auto}}

/* 2026-09-11 서가 적용안 — 칸 이름표(책 사이에 선 얇은 판) · 팝업북 표지 · 「새 칸이 곧 열립니다」 */
/* 2026-09-16 오상길 — 다섯째 칸(일러스트북)이 늘면서 책 줄 실제 폭(1372px)이 판(1139px)보다 넓어졌다. .book-track 의 상자는
   판 폭 그대로라 justify-content:center 가 넘친 양을 좌우로 똑같이 나눠 밀어내는데, 스크롤 상자는 음수 쪽(왼쪽으로 넘친 몫)을
   스크롤로 못 보여준다(왼쪽 화살표가 꺼진 채로 첫 책이 화면 밖). safe 를 붙이면 다 담기지 않을 때만 flex-start 로 접어
   왼쪽부터 채우고, 다 담기면 그대로 가운데 정렬한다(책이 적을 때 지금 모습 그대로). */
.book-track { justify-content: safe center; gap: 26px; }
.shelf-divider {
  flex: 0 0 34px; align-self: flex-end; height: 214px; margin-bottom: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid #cdb38255; border-radius: 3px; background: #1d2126;
  box-shadow: inset 0 0 0 3px #15171a, 0 8px 18px #0006;
  writing-mode: vertical-rl; color: var(--gold, #cdb382); letter-spacing: .18em;
}
.shelf-divider span { font-size: 15px; font-weight: 600; }
.shelf-divider small { font-size: 9px; letter-spacing: .12em; opacity: .7; text-transform: uppercase; }
.shelf-coming {
  flex: 0 0 124px; align-self: flex-end; margin-bottom: 22px; padding: 12px 8px; white-space: nowrap;
  border: 1px dashed #cdb38244; border-radius: 3px; color: #cdb38299;
  font-size: 12px; line-height: 1.5; text-align: center;
}
/* 2026-09-21 표지 리뉴얼(①안) — 그림이 표지를 꽉 채운다(.cover-illustration, inset:0, 단일 레이어 — 어두운 겹은
   .front-cover::after 가 따로 깐다). 전부 cover(자르는 최소 배율) — 가로로 넓은 그림(moon·stitch)은 아이 쪽을,
   세로로 긴 그림(magpie·letter·house)은 칸 비율과 거의 같아 자르는 양이 적다. house(팝업북)는 처음엔 그림 안에
   금색 넝쿨 테두리가 있어 160% auto로 크게 키워야 했는데, 테두리 없는 새 그림(챗지, 2026-09-21)으로 바뀌면서
   cover 로 충분해졌다. 카드는 작은 견본(-320.webp)을 쓴다. 원본은 상세·3D 표지에서만(바로 아래 body[data-view]
   규칙). */
.popup-book .cover-illustration { background: url("experiments/walking-house-rig/cover-art-320.webp") 50% 50% / cover; }
.game-book .cover-illustration { background: url("books/butterfly/cover-art-320.webp") 50% 40% / cover; }
.anim-book .cover-illustration { background: url("books/moon-stitch/cover-art-320.webp") 90% 50% / cover; }
.illust-book .cover-illustration { background: url("books/magpie/cover-art-320.webp") 50% 32% / cover; }
.moon-book .cover-illustration { background: url("public/scene-01-320.webp") 85% 42% / cover; }
/* 2026-09-21 — 그림책판 다섯(오상길). house-picture·bori-picture 는 표지가 없어 house·butterfly 와 클래스를
   그대로 같이 쓴다(popup-book·game-book — 위 두 줄이 이미 이 둘도 맡는다). moon-picture·stitch-picture·letter 는
   저마다 새 표지가 있다. */
.moon-picture-book .cover-illustration { background: url("books/moon-picture/cover-art-320.webp") 75% 45% / cover; }
.stitch-picture-book .cover-illustration { background: url("books/stitch-picture/cover-art-320.webp") 92% 45% / cover; }
.letter-book .cover-illustration { background: url("books/letter/cover-art-320.webp") 50% 38% / cover; }

/* 2026-09-21 — 상세·3D 표지(책이 크게 보일 때)는 원본을 쓴다. .selected 는 지금 펼쳐진 그 책 하나뿐이고(library.js
   selectBook 이 켜고 deselect 가 끈다), 서가로 돌아가기 전까지 detail→opening→reader→returning 내내 켜져 있다 —
   그래서 body[data-view=…] 로 가리지 않는다(처음엔 detail·returning만 넣었다가 opening 으로 넘어가는 순간
   다시 작은 견본으로 떨어지는 걸 check-books.mjs 여는 모션 검사가 잡았다). 카드로 남은 나머지 책은 여전히
   작은 견본을 받는다 — 상세에서도 무게가 늘지 않는다. .cover-illustration 은 그림 한 장짜리라(어두운 겹은
   .front-cover::after 가 따로 깐다) background-image 하나만 바꾸면 된다 — position·size 는 위 칸 규칙을 물려받는다. */
.popup-book.selected .cover-illustration { background-image: url("experiments/walking-house-rig/cover-art.png"); }
.game-book.selected .cover-illustration { background-image: url("books/butterfly/cover-art.webp"); }
.anim-book.selected .cover-illustration { background-image: url("books/moon-stitch/cover-art.webp"); }
.illust-book.selected .cover-illustration { background-image: url("books/magpie/cover-art.webp"); }
.moon-book.selected .cover-illustration { background-image: url("public/scene-01.png"); }
.moon-picture-book.selected .cover-illustration { background-image: url("books/moon-picture/cover-art.webp"); }
.stitch-picture-book.selected .cover-illustration { background-image: url("books/stitch-picture/cover-art.webp"); }
.letter-book.selected .cover-illustration { background-image: url("books/letter/cover-art.webp"); }
body[data-view="detail"] .shelf-divider, body[data-view="detail"] .shelf-coming,
body[data-view="opening"] .shelf-divider, body[data-view="opening"] .shelf-coming,
body[data-view="returning"] .shelf-divider, body[data-view="returning"] .shelf-coming { opacity: 0; pointer-events: none; }
body[data-layout="grid"][data-view="shelf"] .shelf-divider {
  writing-mode: horizontal-tb; flex: 0 0 100%; height: auto; margin: 6px 0 0; padding: 6px 10px;
  flex-direction: row; justify-content: flex-start; background: none; box-shadow: none; border: 0; border-bottom: 1px solid #cdb38233;
}
/* the grid view's track is a CSS grid: each label and the sign take a whole row, books line up under their label */
body[data-layout="grid"][data-view="shelf"] .shelf-divider { grid-column: 1 / -1; }
body[data-layout="grid"][data-view="shelf"] .shelf-coming { grid-column: 1 / -1; justify-self: start; margin: 14px 0 0; }
.read-button { margin-bottom: 10px; }
/* 「만든 방법 보기」 is a link now: same box as the 「책 읽기」 button */
a.open-button { display: inline-block; text-decoration: none; }
@media (max-width: 760px) {
  .book-track { justify-content: flex-start; }
  .shelf-divider { height: 170px; }
}

/* 2026-09-21 2차 — 지록이 사진을 보고 「책장 전체보기는 이전처럼 해줘 … 명찰처럼 한거 좋아보여, 다만 선반 앞부분
   위에 걸친 모습인데 중간에 붙여져있는 모습으로 해줘」. 그래서 마크업엔 책마다 둘 다 있다(shelf-sync.mjs) — 위
   세로 판(.shelf-divider)과 이 가로 명판(.shelf-tag). 어느 걸 보이느냐만 보기(data-layout)로 가른다: 책장(선반)
   보기는 이 명판만, 책장 전체 보기(격자)는 세로 판만(격자는 09-21 1차 이전 모습 그대로 되돌렸다, 위 규칙 손 안 댐).
   명판은 그 줄 선반의 앞판(.shelf/.row-shelf, 28px 두께 — .book-stage 바닥이 그 앞판의 윗모서리와 같은 자리) 안에
   세로로 가운데 앉는다: 앞판 세로 가운데는 책 바닥에서 14px 아래(28/2), 명판 자체 높이(H)의 절반만큼 그보다 더
   내려야 명판 중심이 거기 온다 — bottom: -(14 + H/2). 전엔 윗모서리에 걸쳐 있었다(지록이 두 번째로 잡은 자리). */
body:not([data-layout="grid"]) .shelf-divider { display: none; }
body[data-layout="grid"] .shelf-tag { display: none; }
.shelf-tag {
  position: absolute; left: 50%; bottom: -24.5px; transform: translateX(-50%); z-index: 2;
  max-width: calc(100% - 14px); padding: 3px 9px;
  border: 1px solid #cdb38244; border-radius: 2px;
  background: linear-gradient(180deg, var(--cloth-b, #262b33), var(--cloth-a, #1a1e24));
  box-shadow: 0 3px 7px #0007, inset 0 1px #ffffff14;
  color: var(--gold, #cdb382); font-size: 10px; font-weight: 600; letter-spacing: .09em;
  line-height: 1.3; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
body[data-view="detail"] .shelf-tag, body[data-view="opening"] .shelf-tag, body[data-view="returning"] .shelf-tag {
  opacity: 0; pointer-events: none;
}

/* 2026-10-08 서가 「순서·종류 고르기」(지록 「a안으로」 · 설계 docs/글로이드/서가-정렬-2026-10-07/설계.md) — 책장 전체 보기(격자)일 때만 뜬다.
   책장(선반) 보기에서는 아예 자리를 안 차지하고(display:none), 상세·읽기로 들어가면 「책장/책장 전체 보기」 줄처럼 자리는 둔 채 숨는다(책 FLIP 이 안 흔들리게).
   순서는 「책장/책장 전체 보기」와 같은 모양(글자 + 금색 밑줄), 종류는 둥근 윤곽 칩 — 눌린 칩은 그 칸의 천 색(kinds.css --cloth-a/b)으로 채운다.
   칸 색은 이 파일에 직접 쓰지 않는다(check-books 누수 검색). */
.sort-wrap { display: none; position: relative; z-index: 3; }
body[data-layout="grid"] .sort-wrap { display: block; animation: sort-in .25s ease both; }
body[data-layout="grid"]:not([data-view="shelf"]) .sort-wrap { visibility: hidden; }
/* 10-12 지록 「간격조절이 안된거같은데」(책장 전체 보기에서 책을 고른 폰 화면) — 정렬 줄도 안 보이기만 하고 자리(146px)를 차지했다. 폰에서는 자리째 걷는다 */
@media (max-width: 760px) { body[data-layout="grid"]:not([data-view="shelf"]) .sort-wrap { display: none; } }
@keyframes sort-in { from { opacity: 0; } }
.sortbar {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 30px;
  max-width: 1100px; margin: 2px auto 0; padding: 0 16px;
}
.sort-group { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 6px; }
.sort-label { margin-right: 6px; font: 12px var(--font-ui); letter-spacing: .06em; color: var(--muted); }
.sort-tabs { display: flex; gap: 2px; }
.sort-tab {
  background: none; border: 0; border-bottom: 1px solid transparent;
  padding: 14px 11px; min-height: 44px; font: 15px var(--font-ui); color: var(--muted);
  transition: color .2s ease;
}
.sort-tab[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
/* 종류·나이 드롭다운 — 2026-10-15 지록 「리스트가 너무 많은데 드롭다운 형식은 어떨까?」(칩 7+5 가 폰에서 다섯 줄). 시안 gloid-style-src/verify-2026-10-15/filter.
   단추는 옛 칩과 같은 둥근 테두리 · 종류를 고르면 그 칸의 천 색(kinds.css --cloth · data-kind) · 목록은 단추 아래 · 고른 줄 표시는 ✓ 대신 금색 점(지록 「체크 아이콘을 다른 걸로」) */
.sort-select { position: relative; margin: 6px 0; }
.sort-select-btn {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 13px 0 15px;
  background: none; border: 1px solid #cdb38233; border-radius: 999px; font: 13px var(--font-ui); color: var(--gold);
  transition: border-color .2s ease, background .2s ease;
}
.sort-select-btn[data-kind] { background: linear-gradient(180deg, var(--cloth-b, #262b33), var(--cloth-a, #1a1e24)); border-color: #cdb38255; }
.sort-select-btn[aria-expanded="true"] { border-color: var(--gold); }
.sort-select-caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--muted); transition: transform .2s ease; }
.sort-select-btn[aria-expanded="true"] .sort-select-caret { transform: rotate(180deg); }
.sort-select-menu {
  position: absolute; top: calc(100% - 2px); left: 0; z-index: 9; margin: 0; padding: 6px 0; list-style: none; min-width: 164px;
  border: 1px solid #cdb38255; border-radius: 12px; background: #1a1e24; box-shadow: 0 10px 30px #0008; text-align: left;
  animation: sort-menu-in .14s ease both;
}
.sort-select-menu[data-right] { left: auto; right: 0; }
@keyframes sort-menu-in { from { opacity: 0; translate: 0 -4px; } }
.sort-option {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px;
  font: 13px var(--font-ui); color: var(--muted); cursor: pointer; white-space: nowrap; transition: color .15s ease;
}
.sort-option::after { content: ""; flex: none; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; } /* 고른 줄의 점 자리 — 안 고른 줄도 자리는 같다 */
.sort-option[aria-selected="true"] { color: var(--gold); }
.sort-option[aria-selected="true"]::after { background: var(--gold); }
.sort-option:focus-visible { outline-offset: -2px; }
.sort-swatch { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #cdb38255; background: linear-gradient(180deg, var(--cloth-b, #262b33), var(--cloth-a, #1a1e24)); } /* 칸 색 — 「모두」는 천 없이 */
.sort-option:not([data-kind]) .sort-swatch { background: #ffffff0d; border-color: #cdb38233; }
.sort-tab:focus-visible, .sort-select-btn:focus-visible, .sort-reset:focus-visible { outline-offset: -2px; }
@media (hover: hover) {
  .sort-tab:hover, .sort-select-btn:hover, .sort-option:hover { color: #eed7aa; }
}
.sort-status {
  margin: 0; min-height: 30px; display: flex; justify-content: center; align-items: center; gap: 6px;
  font: 12px var(--font-ui); color: var(--muted);
}
.sort-status:empty { min-height: 8px; }
/* 「모두 보기」 — 누르는 면은 44px, 밑줄은 글자 바로 밑에 */
.sort-reset {
  background: none; border: 0; min-height: 44px; padding: 0 4px; font: 12px var(--font-ui); color: var(--gold);
  text-decoration: underline; text-decoration-color: #cdb38266; text-underline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  body[data-layout="grid"] .sort-wrap { animation: none; }
  .sort-tab, .sort-select-btn, .sort-select-caret, .sort-option { transition: none; }
  .sort-select-menu { animation: none; }
}
/* 빠진 책·칸 이름표 — 순서·종류에서 걸러진 것(library.js paintArrange) */
.book-stage[data-out], .shelf-divider[data-out] { display: none !important; }
/* 새로 온 순·가나다순 + 종류 모두: 칸이 섞이니 책마다 칸 꼬리표를 켠다. 선반 앞판이 아니라 책 바로 밑(8px)에 앉고, 한 단계 키운다(11px) —
   칸 정보가 이 꼬리표에만 있게 되므로. 천 무늬 · 금색 글 · 테두리는 그대로. 행 간격은 꼬리표 자리만큼 넓힌다(꼬리표 아래로 다음 줄 책틀까지 ~10px · 보이는 표지까지 16~21px — 실측 1280 · 390) */
body[data-layout="grid"] .book-track[data-flat] .shelf-tag { display: block; top: calc(100% + 8px); bottom: auto; font-size: 11px; }
body[data-layout="grid"] .book-track[data-flat] { row-gap: 40px; }

/* 2026-09-11 칸별 표지 힌트 — 레이어북은 옆면 종이층을 두툼하게 */
.volume[data-kind="layer"] .page-block {
  right: -15px; top: 4px; bottom: 4px;
  background: repeating-linear-gradient(90deg, #d3c9ad 0 1px, #8f8672 1px 2px, #ede5cd 2px 3px);
}
/* 2026-09-11 지록: 두 책의 마우스 오버는 같게 · 팝업북 표지의 사선 줄은 뺐다 */

/* 칸 설명 한 줄 — 격자 보기에서만(책장 보기의 좁은 세로 판에는 이름만) */
.shelf-divider em { display: none; }
body[data-layout="grid"][data-view="shelf"] .shelf-divider em { display: inline; font-style: normal; font-size: 12px; letter-spacing: .02em; color: #cdb382aa; margin-left: 4px; }

/* 2026-09-11 지록: 칸 천 색은 kinds.css(data-kind) · 마우스 오버는 모든 책이 팝업북처럼 표지가 살짝 벌어진다 */
body[data-view="shelf"] .volume:hover .front-cover { transform: translateZ(20px) rotateY(-9deg); }
@media (prefers-reduced-motion: reduce) { body[data-view="shelf"] .volume:hover .front-cover { transform: translateZ(20px); } }
/* 2026-09-15 지록 「책 외각에 노란색 박스가 모든 책에 있던데 그건 안보이게 해줘」 — 책에는 초점 네모를 그리지 않는다. Esc 로 상세를 닫거나 읽기 화면에서
   돌아오면 돌아온 책에 초점이 가고, 브라우저가 그 책 둘레에 노란 네모를 그렸다. 키보드로 책을 옮겨 다닐 때(Tab·방향키 — library.js 가 data-input 을
   적는다)만 마우스 오버처럼 표지가 살짝 벌어져 어느 책인지 보인다. 움직임을 줄인 기기는 표지가 밝아진다. */
.volume:focus-visible { outline: none; }
html[data-input="key"] body[data-view="shelf"] .volume:focus-visible .front-cover { transform: translateZ(20px) rotateY(-9deg); }
@media (prefers-reduced-motion: reduce) { html[data-input="key"] body[data-view="shelf"] .volume:focus-visible .front-cover { transform: translateZ(20px); filter: brightness(1.15); } }

/* 2026-09-11 모든 책 공통: 펼침·덮힘 모션은 고른 책의 표지와 칸 색으로 입는다(library.js dressTransition).
   다른 책을 펼칠 때는 레이어북 장면을 넣은 낱장 그림을 감추고 칸 색 종이만 보인다. */
.plain-pages .spread-picture { display: none; }
/* 2026-09-15 지록 「책이 차르르 펼쳐질때 이미지를 넣어줘 … 이건 모든책 공통이야」 — a book with pictures for its leaves (books.js
   opening.spreads, library.js dressLeaves) shows them the way the moon's leaves show its scenes: each face is one half of a
   spread (front = right half, back and the landing's left page = left half), cut to the page like the moon's (slice / cover). */
.leaf-art { position: absolute; top: 0; left: -100%; width: 200%; height: 100%; object-fit: cover; display: none; pointer-events: none; }
.transition-left .leaf-art, .leaf-verso .leaf-art { left: 0; }
.has-art .leaf-art { display: block; }
.has-art .spread-picture { display: none; }
/* 로고 (2026-09-15 지록 「로고 적용 부탁해, 파비콘도~」) — 한글·영문 두 장을 두고 화면 언어로 고른다(locale.js 가 html lang 을 바꾼다) */
.wordmark .logo{display:block;height:28px;width:auto}
html[lang="en"] .wordmark .logo-ko,html:not([lang="en"]) .wordmark .logo-en{display:none}
@media(max-width:760px){.wordmark .logo{height:24px}}

/* 2026-09-16 오상길 — 서가를 한 줄에 네 권씩, 넘치면 아랫줄로 (지록: 「4개씩 아래로 쌓이게 하자」). 한 줄 스크롤(캐러셀)은
   폰(≤760px)에서만 남긴다 — 그 폭은 그대로 손대지 않았다. 761px 이상은 옆으로 미는 대신 줄이 늘어난다: 컨테이너 폭이
   정해지면 flex-wrap 이 알아서 줄을 가른다(책 폭·이름표 폭·간격이 고정값이라 — 실측 1440폭 4권 · 1280폭 3권 · 768폭 2권,
   책이 늘어도 이 규칙은 그대로 저절로 한 줄 더 는다). 이름표(.shelf-divider)가 줄바꿈에서 혼자 떨어지지 않도록, 이름표 +
   그 칸의 첫 책을 .shelf-slot 하나로 미리 묶어둔다(shelf-sync.mjs — 칸이 새로 열리는 자리에서만 묶고, 같은 칸의 둘째
   책부터는 그냥 낱개 책이다). 줄마다 선반(.shelf)은 library.js layoutShelfRows() 가 줄 수만큼 복제해 꽂는다(원래 있던
   .shelf 하나는 숨긴다) — 복제본도 같은 클래스라 배경·그림자·기울기가 지금 한 줄짜리와 그대로 같다. */
/* 이름표+그 칸 첫 책을 한 조각으로 — 폰의 한 줄 캐러셀에서도 항상 필요하다(원래 낱개 형제였을 때와 같은 가로 배치) */
.shelf-slot { display: flex; align-items: flex-end; gap: 26px; }
@media (min-width: 761px) {
  .book-track {
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
    height: auto;
    column-gap: 26px;
    row-gap: 70px;
    padding: 20px 28px 46px;
    justify-content: safe center;
    align-content: flex-start;
  }
  .room { height: auto; min-height: 460px; }
  .shelf-viewport { height: auto; overflow: visible; scroll-snap-type: none; }
}
/* 「책장 전체 보기」(격자 보기)에서는 상자를 지워 이름표·책이 grid 의 직접 자식으로 돌아간다(이전 grid 규칙 그대로 동작) */
body[data-layout="grid"][data-view="shelf"] .shelf-slot { display: contents; }
/* library.js 가 줄마다 찍는 선반 — 상세·여는 중에는 감춘다(고른 책 하나만 도드라지게, 지금과 같은 규칙) */
:is(body[data-view="detail"], body[data-view="returning"]) .row-shelf,
body[data-view="opening"] .row-shelf { display: none; }

/* 권수 줄(「다섯 권의 서가 · 레이어 1 · …」)을 없앴다(2026-09-16 지록 지시) — 화살표 두 개만 남는다. 여러 줄로 접히는
   761px 이상은 옆으로 밀 일이 없어 화살표도 감춘다. 폰(≤760px)은 그대로 한 줄 스크롤이라 화살표를 남긴다. */
.shelf-label { display: none; }
@media (max-width: 760px) {
  .shelf-label {
    display: flex;
    grid-template-columns: none;
    width: auto;
    max-width: none;
    white-space: normal;
    gap: 24px;
    align-items: center;
    justify-content: center;
  }
}

/* 2026-09-25 허수아비의 이사 — 자기 표지(없으면 달 표지가 대신 뜬다) */
.scarecrow-book .cover-illustration { background: url("books/scarecrow-picture/art/cover-320.webp") 50% 42% / cover; }
.scarecrow-book.selected .cover-illustration { background-image: url("books/scarecrow-picture/art/cover.webp"); }
.whale-book .cover-illustration { background: url("books/whale-picture/art/cover-320.webp") 50% 45% / cover; }
.whale-book.selected .cover-illustration { background-image: url("books/whale-picture/art/cover.webp"); }
.whale-layer-book .cover-illustration { background: url("books/whale-picture/art/cover-320.webp") 50% 45% / cover; }
.whale-layer-book.selected .cover-illustration { background-image: url("books/whale-picture/art/cover.webp"); }
.momo-book .cover-illustration { background: url("books/momo/art/cover-320.webp") 50% 45% / cover; }
.momo-book.selected .cover-illustration { background-image: url("books/momo/art/cover.webp"); }
.blot-book .cover-illustration { background: url("books/blot/art/cover-320.webp") 50% 45% / cover; }
.blot-book.selected .cover-illustration { background-image: url("books/blot/art/cover.webp"); }
.mantle-book .cover-illustration { background: url("books/mantle-picture/art/cover-320.webp") 50% 40% / cover; }
.mantle-book.selected .cover-illustration { background-image: url("books/mantle-picture/art/cover.webp"); }
.lulu-picture-book .cover-illustration { background: url("books/lulu-picture/art/cover-320.webp") 50% 45% / cover; }
.lulu-picture-book.selected .cover-illustration { background-image: url("books/lulu-picture/art/cover.webp"); }
.lulu-game-book .cover-illustration { background: url("books/lulu-picture/art/cover-320.webp") 50% 45% / cover; }
.lulu-game-book.selected .cover-illustration { background-image: url("books/lulu-picture/art/cover.webp"); }

/* // receive.mjs — sobo */
.sobo-game-book .cover-illustration { background: url("books/sobo/art/b/cover-320.webp") 50% 50% / cover; }
.sobo-game-book.selected .cover-illustration { background-image: url("books/sobo/art/b/cover.webp"); }

/* // receive.mjs — sobo */
.sobo-photo-game-book .cover-illustration { background: url("books/sobo/art/studio/cover-320.webp") 50% 50% / cover; }
.sobo-photo-game-book.selected .cover-illustration { background-image: url("books/sobo/art/studio/cover.webp"); }

/* // receive.mjs — sobo-picture */
.sobo-picture-book .cover-illustration { background: url("books/sobo-picture/art/cover-320.webp") 50% 50% / cover; }
.sobo-picture-book.selected .cover-illustration { background-image: url("books/sobo-picture/art/cover.webp"); }

/* 10-12 탭 밑줄 — 지록 「탭 선택했을 때 밑에 바가 이름과 너무 떨어져 있는데 좀 붙여줘」. 단추 아래 테두리(누르기 좋은 44px 칸의 바닥)가 아니라
   글자 밑줄로 바꿔 이름 바로 아래(7px)에 붙인다 — 「책장 · 책장 전체 보기」 줄과 「순서」 줄 둘 다 */
.layout-picker button, .sort-tab { border-bottom-color: transparent !important; text-decoration-line: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 7px; transition: color .2s ease, text-decoration-color .2s ease; }
.layout-picker button[aria-pressed="true"], .sort-tab[aria-pressed="true"] { text-decoration-color: var(--gold); }

/* 10-14 「같은 이야기, 다른 읽기」 아래 형식 한 줄(books.js kinds.blurb) */
.story-pair-blurb{display:block;margin-top:4px;color:var(--muted,#a7a294);font-size:.86em;line-height:1.5}

/* 2026-10-20 김예진 4번(유하람 고침) — 폰 가로(915×412 · 844×390)에서 책 소개를 열면 「책 읽기」가 화면 아래(y 707~818)로 내려갔다.
   세로 폰의 「첫 화면에 책 읽기」는 폭 760 규칙이라 가로 폰(폭 761 이상 · 높이 540 이하)에는 안 걸린다.
   가로 폰만: 소개 칸을 머리글 바로 밑에서 시작하고, 「책 읽기 · 제작 가이드」를 제목 바로 아래로 올린다(요소는 그대로 · 놓는 순서만 —
   줄거리·나이·안내는 그 아래로 이어지고 내려서 읽는다). 고른 책 표지도 줄여 머리글 밑 한 화면 안에 */
@media (orientation: landscape) and (max-height: 540px) {
  .book-detail { display: flex; flex-direction: column; align-items: flex-start; }
  .book-detail > * { order: 2; }
  .book-detail > #deselect-book, .book-detail > .overline, .book-detail > #detail-title, .book-detail > .detail-en { order: 0; }
  .book-detail > #read-book, .book-detail > #open-book { order: 1; }
}
/* 폭 761 이상 가로 폰은 데스크톱 짜임(표지 왼쪽 · 소개 오른쪽)이라 소개 칸을 머리글 밑으로 당기고 표지를 줄여 같은 높이에 앉힌다
   (표지는 왼쪽 아래 모서리를 축으로 줄어든다 — 줄인 만큼 위로 296px · 844×390 에서도 표지 아래가 화면 안) */
@media (orientation: landscape) and (max-height: 540px) and (min-width: 761px) {
  .book-detail { top: 0; }
  :is(body[data-view="detail"], body[data-view="returning"]) .book-stage.chosen,
  body[data-view="opening"] .book-stage.chosen { top: -296px; }
  .book-detail .text-button { margin-bottom: 8px; }
  .book-detail .overline { margin-bottom: 8px; }
  .book-detail h2 { font-size: 26px; margin-bottom: 4px; }
  .book-detail .detail-en { margin: 0 0 14px; }
  .book-detail .synopsis { margin-top: 22px; }
  :is(body[data-view="detail"], body[data-view="returning"]) .volume.selected,
  body[data-view="opening"] .volume.selected { transform: scale(0.68) rotateY(-7deg); }
}

/* 11-02 눈 검수 — 소개 줄이 칸보다 길면 「루.」 한 글자만 다음 줄로 떨어졌다. 줄마다 고르게 나눈다 */
.synopsis span{display:block;word-break:keep-all;text-wrap:balance}

/* 11-03 지록 「책소개 아래 책구조 버튼」 — 특수책 상세에만(library.js fillAnatomy). 단추는 「같은 이야기, 다른 읽기」와 같은 밑줄 글자.
   덮개는 큰 화면에선 가운데 판(최대 1100px), 폰에선 화면 전체. 안의 그림이 종류 색 바탕을 갖고 있어 판 바탕도 같은 어둠으로 둔다 */
.anatomy-row{margin:10px 0 0;font-size:13px}
.anatomy-row button{border:0;background:none;padding:0;font:inherit;cursor:pointer;color:#d8c399;text-decoration:underline;text-underline-offset:3px}
.anatomy-row button:hover{color:#e5d3b0}
.anatomy-dialog{width:min(1100px,calc(100vw - 48px));height:min(860px,calc(100vh - 48px));max-width:none;max-height:none;padding:0;border:0;border-radius:0;background:transparent;overflow:hidden} /* 11-09 지록 「박스가 두개인데 바깥박스는 지워줘」 — 창 테두리·바탕 없이 그림 판 하나만 */
.anatomy-dialog::backdrop{background:#000000b8}
.anatomy-dialog iframe{display:block;width:100%;height:100%;border:0}
.anatomy-close{position:absolute;top:10px;right:12px;z-index:1;width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:50%;background:#ffffff14;color:#e6e6e6;font:20px/1 system-ui,sans-serif;cursor:pointer}
.anatomy-close:hover{background:#ffffff26}
@media (max-width:640px){.anatomy-dialog{width:100vw;height:100dvh;border:0;border-radius:0}}
.anatomy-dialog.has-inner-close .anatomy-close{display:none} /* 11-09 닫기 단추는 구조 그림 판 안에 있다(anatomy/*.html .shelf-close) */

/* 인스타·스레드 아이콘 (2026-11-16 지록 「각 사이트 푸터에 인스타, 스레드 아이콘」) — 누르는 자리 40px · 글자색 따름 */
.sns{display:inline-flex;align-items:center;margin-block:-10px}
.sns__a{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;color:inherit;text-decoration:none;border-radius:8px;transition:transform .14s cubic-bezier(.2,.8,.2,1),color .2s}
.sns__a svg{display:block;width:20px;height:20px}
.sns__a:active{transform:scale(.97)}
.sns__a:hover{color:#b8ac91}
.sns__a:focus-visible{outline:2px solid currentColor;outline-offset:-4px}
@media (prefers-reduced-motion:reduce){.sns__a{transition:none}}
