/* 絵本の本だな /books/ と読む窓(2026/11/07 ★ハミルトン T38)。字体・配色・.wrap・.section-title・.footer は /css/home.css(新トップ系)を読んだ上に足す。
   本だな: 3 列(767px 以下は 1 列)。表紙は cover.png の webp(文字入り・3:2)なので CSS で文字を重ねない。
   窓 dialog#book-reader: 全画面(arcade.css の .hm-game-dialog と同じ作り: PC は中央の大きな窓・767px 以下は 100vw×100dvh・角丸 0)。縦持ちは上に絵(3:2)・下に文(16px 以上)・横持ち(PC)は左に絵・右に文。
   動き(アニメーション)は足していない(透明から現れる演出なし=公開物ルール「演出の計測配慮」の対象になる物が無い)。*/
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
.books-body{background:var(--cream)}
.books-head{padding:38px 0 10px}
.books-back{font-size:12px;font-weight:800;letter-spacing:.06em}
.books-back a{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;border-radius:30px;background:#fff;color:#4c8ba1;box-shadow:0 4px 10px #425a4918}
.books-back a:hover{color:#236782;background:#f3fbfb}
.books-title{margin:34px 0 18px}
.books-lead{text-align:center;font-size:14px;line-height:2.1;font-weight:700;color:#5b6f6b}
.books-shelf{padding:34px 0 80px}
.books-empty{text-align:center;font-size:15px;font-weight:800;color:#6d7977;padding:40px 0}
.books-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:29px}
.books-item{min-width:0}
.book-card{display:block;width:100%;text-align:left;background:#fff;border-radius:22px;padding:16px 16px 20px;box-shadow:0 6px 12px #425a4920;transition:transform .2s;color:var(--ink)}
.book-card:hover{transform:translateY(-5px)}
.book-cover{display:block;aspect-ratio:3/2;border-radius:12px;overflow:hidden;background:#dfe9e4}
.book-cover img{width:100%;height:100%;object-fit:cover}
.book-title{display:block;margin-top:15px;font-size:16px;line-height:1.7;font-weight:900;letter-spacing:.02em}
.book-blurb{display:block;margin-top:7px;font-size:13px;line-height:1.9;color:#6d7977}
.book-read{display:inline-block;margin-top:12px;font-size:11px;font-weight:800;letter-spacing:.1em;color:#4c8ba1}
.books-text{display:none}
/* 読む窓(home.css の dialog の規則(幅 820px・高さ 90vh・角丸 27px)を .book-reader で上書き) */
.book-reader{padding:0;border:0;max-width:none;max-height:none;width:min(1240px,96vw);height:min(900px,94vh);background:#fffdf4;color:var(--ink);border-radius:24px;overflow:hidden;box-shadow:0 20px 90px #16352e66}
.book-reader::backdrop{background:#244e5ac2;backdrop-filter:blur(5px)}
.book-reader[open]{display:flex;flex-direction:column}
.book-reader-bar{flex:none;display:flex;align-items:center;gap:12px;min-height:52px;padding:6px 10px 6px 20px;background:#285761;color:#fff8de}
.book-reader-title{flex:1;min-width:0;margin:0;font-size:14px;font-weight:900;letter-spacing:.03em;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.book-reader-count{flex:none;margin:0;font-size:12px;font-weight:800;letter-spacing:.08em;color:#d9ecef}
.book-reader-close{flex:none;min-width:88px;min-height:44px;padding:0 16px;border-radius:30px;background:#ffdf54;color:#285761;font-weight:900;font-size:13px;border:2px solid #fff8de}
.book-reader-close:focus-visible{outline:3px solid #ee9226;outline-offset:3px}
.book-reader-stage{flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch}
.book-reader-stage .book{height:100%}
.book-reader-stage .book-heading{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:-1px}
.book-reader-stage .book-page{display:none}
.book-reader-stage .book-page.is-active{display:grid;grid-template-rows:auto 1fr;height:100%}
.book-art{background:#dfe9e4}
.book-art img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover}
.book-reader-stage .book-text{padding:22px 24px 28px;font-size:17px;line-height:2.05;font-weight:700;letter-spacing:.02em;overflow:auto}
.book-reader-stage .book-text .line{display:block}
.book-reader-stage .book-text .line.blank{min-height:1em}
.book-reader-stage .book-page[data-type="cover"].is-active{grid-template-rows:1fr}
.book-reader-stage .book-page[data-type="cover"] .book-art{display:flex;align-items:center;justify-content:center;height:100%}
.book-reader-stage .book-page[data-type="cover"] .book-art img{max-height:100%;object-fit:contain}
.book-reader-nav{flex:none;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid #e5e5d6;background:#fffdf4}
.book-reader-btn{min-height:48px;padding:0 20px;border-radius:30px;font-size:14px;font-weight:900;letter-spacing:.03em;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.book-reader-prev,.book-reader-next{background:#e9f0e5;color:#285761}
.book-reader-prev{justify-self:start}
.book-reader-next{justify-self:end;background:var(--orange);color:#fff;box-shadow:0 4px 0 #b65f2c}
.book-reader-btn:disabled{opacity:.35;cursor:default;box-shadow:none}
.book-reader-shelf{background:#fff;color:#4c8ba1;border:2px solid #cfe1e6;font-size:12px;min-height:44px}
.book-reader[data-last="true"] .book-reader-shelf{background:var(--orange);color:#fff;border-color:var(--orange);font-size:16px;min-height:56px;padding:0 34px;box-shadow:0 4px 0 #b65f2c}
.book-reader[data-last="true"] .book-reader-next{opacity:.35}
@media(min-width:768px) and (orientation:landscape){
.book-reader-stage .book-page.is-active{grid-template-rows:none;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);align-items:stretch}
.book-reader-stage .book-page[data-type="cover"].is-active{grid-template-columns:1fr}
.book-reader-stage .book-page[data-type="story"] .book-art,.book-reader-stage .book-page[data-type="reveal"] .book-art,.book-reader-stage .book-page[data-type="end"] .book-art{display:flex;align-items:center;justify-content:center;background:#dfe9e4}
.book-reader-stage .book-page[data-type="story"] .book-art img,.book-reader-stage .book-page[data-type="reveal"] .book-art img,.book-reader-stage .book-page[data-type="end"] .book-art img{max-height:100%;object-fit:contain}
.book-reader-stage .book-text{padding:34px 36px;font-size:18px;line-height:2.1;display:flex;flex-direction:column;justify-content:center}
}
@media(max-width:1100px){.books-grid{gap:18px}}
@media(max-width:767px){
.books-head{padding:22px 0 4px}.books-title{margin:24px 0 12px}.books-lead{font-size:12px;line-height:2}.books-shelf{padding:24px 0 54px}
.books-grid{grid-template-columns:1fr;gap:22px}.book-card{max-width:480px;margin:auto}
.book-reader{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100vh;max-height:100dvh;margin:0;inset:0;border-radius:0}
.book-reader-bar{min-height:48px;padding-left:14px}.book-reader-title{font-size:12px}.book-reader-close{min-width:80px;font-size:12px}
.book-reader-stage .book-text{padding:18px 18px 24px;font-size:16px;line-height:2}
.book-reader-nav{grid-template-columns:1fr 1fr;padding:10px 12px}
.book-reader-shelf{grid-column:1/3;grid-row:2;justify-self:center;margin-top:4px}
.book-reader[data-last="true"] .book-reader-shelf{width:100%;font-size:15px}
}
@media(prefers-reduced-motion:reduce){.book-card{transition:none}}
@media print{.book-reader,.hm-cursor{display:none}}
