/* 電子カタログの閲覧画面（/ebook/）。サイト本体の CSS は読まない（html{font-size:62.5%} の影響を受けないよう px で書く） */
*{box-sizing:border-box;}
html,body{margin:0;height:100%;}
body{background:#3a3a3a;color:#fff;font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;font-size:14px;overflow:hidden;}
[hidden]{display:none!important;}
#bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:6px 10px;background:#222;min-height:48px;}
.bar-l{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 200px;}
.bar-l .home{color:#fff;text-decoration:none;font-weight:bold;white-space:nowrap;border:1px solid #666;border-radius:4px;padding:3px 8px;font-size:12px;}
.bar-l h1{font-size:15px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bar-r{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
#bar button,#bar .btnlike{background:#555;color:#fff;border:none;border-radius:4px;padding:6px 10px;font-size:13px;cursor:pointer;text-decoration:none;font-family:inherit;line-height:1.3;}
#bar button:hover,#bar .btnlike:hover{background:#777;}
#bar button:disabled{opacity:.35;cursor:default;}
.pno{display:inline-flex;align-items:center;gap:4px;font-size:13px;white-space:nowrap;}
#pageInput{width:52px;padding:4px;border-radius:4px;border:1px solid #666;background:#111;color:#fff;font-size:13px;text-align:center;}
#pageLabel:empty{display:none;}
#stage{position:relative;height:calc(100% - 48px);display:flex;align-items:center;justify-content:center;}
#bookHost{display:flex;align-items:center;justify-content:center;}
#book .page{background:#fff;overflow:hidden;}
#book .page canvas{display:block;width:100%;height:100%;object-fit:contain;}
#book .page .pg-load{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#999;font-size:13px;}
#book .page.ready .pg-load{display:none;}
#loading{text-align:center;color:#ddd;}
.spinner{width:44px;height:44px;margin:0 auto 12px;border:4px solid #666;border-top-color:#fff;border-radius:50%;animation:spin 1s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}
#error{text-align:center;max-width:480px;padding:0 16px;line-height:1.8;}
#error a{color:#9cf;}
#hint{position:absolute;bottom:6px;left:0;right:0;text-align:center;font-size:12px;color:#bbb;margin:0;pointer-events:none;}
.ov-hd{display:flex;align-items:center;gap:8px;padding:8px 10px;background:#222;}
.ov-hd button{background:#555;color:#fff;border:none;border-radius:4px;padding:6px 12px;font-size:15px;cursor:pointer;}
.ov-hd #zoomClose,.ov-hd #tocClose{margin-left:auto;}
.zoom-note{font-size:12px;color:#bbb;}
#zoom{position:fixed;inset:0;background:#2a2a2a;z-index:20;display:flex;flex-direction:column;}
#zoomBody{flex:1;overflow:auto;padding:12px;display:flex;gap:8px;align-items:flex-start;}
#zoomBody canvas{background:#fff;display:block;flex:none;margin:0 auto;}
#toc{position:fixed;top:0;right:0;bottom:0;width:min(360px,90vw);background:#2a2a2a;z-index:15;display:flex;flex-direction:column;box-shadow:-4px 0 16px rgba(0,0,0,.5);}
#tocList{list-style:none;margin:0;padding:6px 0;overflow:auto;flex:1;}
#tocList ul{list-style:none;margin:0;padding-left:14px;}
#tocList a{display:block;color:#fff;text-decoration:none;padding:7px 14px;font-size:13px;}
#tocList a:hover{background:#444;}
@media(max-width:640px){
  .lbl{display:none;}
  .bar-l{flex-basis:100%;}
  #bar{padding:6px 8px;}
  #stage{height:calc(100% - 92px);}
  #bar .btnlike{font-size:12px;}
}
/* PC：上の帯のボタンを大きく・明るく（藤田様のご要望 2026-11-16「ボタンの場所が分かりにくい」）。スマホは下の @media のまま */
@media(min-width:641px){
  #bar{min-height:60px;padding:8px 14px;}
  .bar-r{gap:8px;}
  #bar button,#bar .btnlike{background:#f3efe6;color:#222;border:1px solid #fff;padding:9px 16px;font-size:15px;font-weight:bold;box-shadow:0 1px 3px rgba(0,0,0,.4);}
  #bar button:hover,#bar .btnlike:hover{background:#fff;}
  #bar button:disabled{opacity:.4;}
  .pno{font-size:15px;}
  #pageInput{width:60px;padding:7px 4px;font-size:15px;}
  .bar-l .home{font-size:13px;padding:5px 10px;}
}
