:root {
  --ink: #0F1B33;
  --ink-2: #1B253D;
  --mute: #394155;
  --soft: #6E7587;
  --paper: #F6F4EE;
  --paper-2: #EEEBE2;
  --white: #FFFFFF;
  --oak: #E3C9A0;
  --oak-deep: #C9A274;
  --sky: #DCEBF5;
  --brand: #FFD60A;
  --brand-deep: #F2C200;
  --line: rgba(15, 27, 51, .12);
  --font: "Noto Sans JP", "Helvetica Neue", Helvetica, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --en: "Helvetica Neue", Helvetica, Arial, "Noto Sans JP", sans-serif;
  --max: 1180px;
  --gutter: clamp(16px, 5vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.85; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.en { font-family: var(--en); font-weight: 700; letter-spacing: .22em; font-size: 12px; text-transform: uppercase; margin: 0; }
.en::before { content: ""; display: inline-block; width: 24px; height: 3px; border-radius: 2px; background: var(--brand); vertical-align: middle; margin-right: 10px; }

/* ヘッダー */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s, box-shadow .3s; background: linear-gradient(180deg, rgba(15,27,51,.35), transparent); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); }
.logo img { height: 30px; width: auto; }
.logo .dark { display: none; }
.logo b { font-family: var(--en); font-weight: 700; font-size: 18px; letter-spacing: .04em; white-space: nowrap; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--white); text-decoration: none; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.2); }
.site-header.solid { background: rgba(255,255,255,.94); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); }
.site-header.solid .logo, .site-header.solid .nav a { color: var(--ink); }
.site-header.solid .logo .light { display: none; }
.site-header.solid .logo .dark { display: block; }
.site-header.solid .nav a:hover { background: var(--paper-2); }
@media (max-width: 860px) { .nav { display: none; } }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 30px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid currentColor; transition: background .2s, color .2s, transform .2s, box-shadow .2s; cursor: pointer; font-size: 15px; font-family: var(--font); }
.btn:hover { transform: translateY(-2px); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: var(--ink); box-shadow: 0 8px 20px rgba(242,194,0,.35); }
.btn-brand:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-light { color: var(--white); }
.btn-light:hover { background: rgba(255,255,255,.18); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* 全面写真のシーン */
.scene { position: relative; min-height: 100vh; display: grid; align-items: end; color: var(--white); overflow: hidden; isolation: isolate; }
.scene > .bg { position: absolute; inset: 0; z-index: -2; }
.scene > .bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 8s ease-out; }
.scene.in > .bg img { transform: scale(1); }
.scene::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(15,27,51,0) 35%, rgba(15,27,51,.62) 100%); }
.scene .container { width: 100%; padding-bottom: clamp(56px, 10vh, 120px); }
.scene .en { color: var(--white); }

.hero h1 { font-weight: 900; font-size: clamp(48px, 10vw, 120px); line-height: 1; letter-spacing: -.01em; margin: 18px 0 22px; text-shadow: 0 4px 30px rgba(15,27,51,.35); }
.hero h1 span { color: var(--brand); }
.hero p { max-width: 560px; font-size: clamp(15px, 1.6vw, 18px); font-weight: 700; margin: 0 0 32px; text-shadow: 0 2px 12px rgba(15,27,51,.5); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.scroll-cue { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); font-family: var(--en); font-weight: 700; font-size: 11px; letter-spacing: .3em; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scroll-cue::after { content: ""; width: 2px; height: 40px; background: linear-gradient(var(--brand), transparent); animation: cue 2s infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* 奥へ続く通路：白いパネルで読みやすく */
.corridor { align-items: center; }
.corridor::after { background: rgba(15,27,51,.08); }
.corridor .container { padding-bottom: 0; display: flex; justify-content: center; }
.panel { background: rgba(255,255,255,.9); backdrop-filter: blur(10px); color: var(--ink); border-radius: 28px; padding: clamp(28px, 5vw, 56px); max-width: 640px; text-align: center; box-shadow: 0 30px 60px rgba(15,27,51,.18); }
.panel .en { color: var(--ink); }
.panel h2 { font-weight: 900; font-size: clamp(26px, 4vw, 42px); line-height: 1.45; margin: 14px 0 18px; }
.panel h2 mark { background: linear-gradient(transparent 60%, var(--brand) 60%); color: inherit; }
.panel p { margin: 0; color: var(--mute); }

/* 準備中のお知らせ */
.notice { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 10px 18px; border-radius: 999px; background: #FFF6CC; border: 1px solid #F2D45C; font-size: 14px; font-weight: 700; text-align: left; }
.notice i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-deep); box-shadow: 0 0 0 4px rgba(255,214,10,.35); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255,214,10,0); } }

/* 館内案内 */
.floor { background: var(--white); padding: clamp(56px, 8vw, 96px) 0; }
.floor h2 { font-weight: 900; font-size: clamp(26px, 3.6vw, 38px); margin: 10px 0 32px; }
.floor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.floor-card { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; text-decoration: none; color: var(--white); display: flex; align-items: flex-end; isolation: isolate; transition: transform .3s, box-shadow .3s; }
.floor-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(15,27,51,.18); }
.floor-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s; }
.floor-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(15,27,51,0) 35%, rgba(15,27,51,.75)); }
.floor-card:hover img { transform: scale(1.06); }
.floor-card div { padding: 16px 18px; }
.floor-card b { display: block; font-size: 18px; font-weight: 900; line-height: 1.4; }
.floor-card small { font-size: 12px; font-weight: 700; }
.floor-card .num { position: absolute; top: 12px; right: 12px; background: var(--brand); color: var(--ink); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
@media (max-width: 760px) { .floor-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .floor-card b { font-size: 15px; } .floor-card div { padding: 12px 14px; } .floor-card small.en-name { display: none; } }

/* 書架 */
.wing-head { min-height: 74vh; }
.wing-head h2 { font-weight: 900; font-size: clamp(34px, 6vw, 68px); margin: 12px 0 10px; line-height: 1.2; text-shadow: 0 4px 24px rgba(15,27,51,.35); }
.wing-head p { max-width: 520px; margin: 0; font-weight: 700; text-shadow: 0 2px 12px rgba(15,27,51,.5); }
.wing-head .count { display: inline-block; margin-top: 18px; font-size: 13px; font-weight: 700; background: var(--brand); color: var(--ink); border-radius: 999px; padding: 4px 16px; }

.shelf-wrap { background: var(--paper); padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 9vw, 110px); }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 48px 28px; }
@media (max-width: 520px) { .shelf { grid-template-columns: repeat(2, 1fr); gap: 36px 18px; } }
.book { position: relative; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 14px; }
.book .cover { position: relative; aspect-ratio: 1 / 1.5; border-radius: 3px 8px 8px 3px; overflow: hidden; background: var(--paper-2); box-shadow: 0 12px 22px rgba(15,27,51,.18); transition: transform .35s, box-shadow .35s; }
.book .cover img { width: 100%; height: 100%; object-fit: cover; }
.book .cover::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 7px; background: linear-gradient(90deg, rgba(0,0,0,.22), transparent); z-index: 1; }
.book:hover .cover { transform: translateY(-12px) rotate(-1.5deg); box-shadow: 0 26px 36px rgba(15,27,51,.25); }
.book .plank { height: 12px; margin: -14px -14px 0; background: linear-gradient(180deg, var(--oak), var(--oak-deep)); border-radius: 3px; box-shadow: 0 8px 14px rgba(120,80,40,.18); }
.book b { font-size: 14px; line-height: 1.55; font-weight: 700; }
.book small { display: block; font-size: 12px; color: var(--soft); line-height: 1.6; margin-top: 2px; }

/* 出口 */
.finale .container { display: flex; justify-content: center; padding-bottom: 0; }
.finale { align-items: center; }
.finale::after { background: rgba(15,27,51,.06); }
.finale .panel .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.finale .btn-outline { color: var(--ink); }
.finale .btn-outline:hover { background: var(--paper); }

.site-footer { background: var(--ink); color: rgba(255,255,255,.75); font-size: 13px; padding: 40px 0; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; margin-right: 18px; }
.site-footer a:hover { color: var(--brand); }

/* ===== 本のページ ===== */
.book-hero { min-height: auto; padding-top: 110px; align-items: center; }
.book-hero::after { background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(246,244,238,.96) 70%); }
.book-hero, .book-hero .en { color: var(--ink); }
.book-hero .container { padding-bottom: clamp(48px, 8vw, 88px); display: grid; grid-template-columns: 260px 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.book-hero .big-cover { width: 260px; border-radius: 4px 10px 10px 4px; box-shadow: 0 30px 50px rgba(15,27,51,.3); }
.book-hero .series { font-size: 13px; font-weight: 700; color: var(--soft); letter-spacing: .06em; }
.book-hero h1 { font-weight: 900; font-size: clamp(30px, 5vw, 52px); line-height: 1.3; margin: 8px 0 10px; }
.book-hero .sub { font-size: clamp(15px, 1.8vw, 18px); color: var(--mute); margin: 0 0 20px; font-weight: 700; }
.book-hero .lead { color: var(--mute); margin: 0 0 28px; max-width: 620px; }
.tag-wing { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 14px; border-radius: 999px; background: var(--brand); text-decoration: none; }
@media (max-width: 720px) { .book-hero .container { grid-template-columns: 1fr; } .book-hero .big-cover { width: 180px; } }

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section h2 { font-weight: 900; font-size: clamp(24px, 3.4vw, 34px); margin: 10px 0 12px; }
.section .lead { color: var(--mute); margin: 0 0 28px; }
.prep { display: flex; gap: 12px; align-items: center; background: #FFF6CC; border: 1px solid #F2D45C; border-radius: 14px; padding: 14px 18px; margin-bottom: 28px; font-size: 15px; font-weight: 700; }
.prep i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-deep); animation: pulse 2s infinite; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.media { background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s; }
.media:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(15,27,51,.12); }
.media .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.media .thumb img { width: 100%; height: 100%; object-fit: cover; }
.media .thumb::after { content: ""; position: absolute; inset: 0; background: rgba(15,27,51,.28); }
.media .thumb svg { position: absolute; z-index: 1; left: 50%; top: 50%; width: 56px; height: 56px; transform: translate(-50%, -50%); stroke: var(--white); }
.media .badge { position: absolute; z-index: 1; top: 12px; left: 12px; background: var(--brand); color: var(--ink); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.media .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.media h3 { margin: 0; font-size: 18px; font-weight: 900; }
.media p { margin: 0; font-size: 14px; color: var(--mute); line-height: 1.7; flex: 1; }
.media .btn { padding: 10px 18px; font-size: 14px; }
.media .btn.is-pending { color: var(--soft); border-color: var(--line); background: var(--paper); cursor: default; }
.media .btn.is-pending:hover { transform: none; }

.buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; background: var(--ink); color: var(--white); border-radius: 24px; padding: clamp(24px, 4vw, 40px); }
.buy h3 { margin: 0 0 6px; font-size: 22px; font-weight: 900; }
.buy p { margin: 0; color: rgba(255,255,255,.75); font-size: 14px; }

.mini-shelf { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
@media (max-width: 860px) { .mini-shelf { grid-template-columns: repeat(3, 1fr); gap: 20px 16px; } }

/* ふわっと現れる */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scene > .bg img { transform: none; transition: none; }
  .scroll-cue::after, .notice i, .prep i { animation: none; }
}

/* 本のページ：紹介文 */
.about { background: var(--white); }
.about .container { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-main h2 { line-height: 1.5; margin-bottom: 24px; }
.about-main p:not(.en) { margin: 0 0 1.2em; color: var(--ink-2); font-size: 16px; line-height: 2; }
.about-side { background: var(--paper); border-radius: 20px; padding: 26px 26px 20px; }
.about-side h3 { margin: 0 0 12px; font-size: 16px; font-weight: 900; }
.about-side ul { list-style: none; margin: 0 0 22px; padding: 0; }
.recommend li { position: relative; padding: 0 0 10px 28px; font-size: 15px; font-weight: 700; line-height: 1.6; }
.recommend li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 14px; height: 8px; border-left: 3px solid var(--brand-deep); border-bottom: 3px solid var(--brand-deep); transform: rotate(-45deg); }
.keywords { display: flex; flex-wrap: wrap; gap: 8px; }
.keywords li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 13px; font-weight: 700; }
.media .thumb.is-shot::after { background: none; }
.media .thumb.is-shot img { object-position: top; }
@media (max-width: 860px) {
  .about .container { grid-template-columns: 1fr; }
}

/* スライドを、ページの中でめくって読む */
.media .dl { font-size: 13px; color: var(--soft); text-align: center; }
.viewer { position: fixed; inset: 0; z-index: 100; background: #0A101E; display: flex; flex-direction: column; color: var(--white); }
.viewer[hidden] { display: none; }
.viewer-top { display: flex; align-items: center; gap: 16px; padding: 12px 16px; font-size: 14px; }
.viewer-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-top .count { font-family: var(--en); font-weight: 700; color: rgba(255,255,255,.75); }
.viewer .close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: var(--white); font-size: 24px; line-height: 1; cursor: pointer; }
.viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 16px; }
.viewer-stage img { flex: 0 1 auto; min-width: 0; width: auto; max-width: min(calc(100% - 120px), 1200px); max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.4); user-select: none; }
.viewer .nav-btn { flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--brand); color: var(--ink); font-size: 30px; line-height: 1; cursor: pointer; }
.viewer .nav-btn:disabled { opacity: .25; cursor: default; }
.viewer-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 16px; }
.viewer-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.3); cursor: pointer; }
.viewer-dots button.on { background: var(--brand); }
@media (max-width: 640px) {
  .viewer-stage { position: relative; padding: 0 8px; }
  .viewer-stage img { max-width: 100%; }
  .viewer .nav-btn { position: absolute; bottom: -64px; width: 44px; height: 44px; }
  .viewer .prev { left: 16px; } .viewer .next { right: 16px; }
  .viewer-dots { padding-bottom: 28px; }
}
.notify { margin: 24px 0 0; font-size: 14px; color: var(--mute); text-align: center; }
.notify a { margin-left: .5em; font-weight: 700; color: var(--ink); text-decoration-color: var(--brand-deep); text-decoration-thickness: 2px; text-underline-offset: 4px; white-space: nowrap; }
