:root { font-family: -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; color: #24383f; background: #eef1f2; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
.reader { width: 100%; height: 100%; display: flex; flex-direction: column; }
.reader:fullscreen, .reader.is-fullscreen { width: 100%; height: 100dvh; background: #eef1f2; }
.reader.is-fullscreen { position: fixed; inset: 0; z-index: 100; }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: white; border-bottom: 1px solid #d9e1e3; flex-wrap: wrap; }
.page-controls, .view-controls { display: flex; align-items: center; gap: 8px; }
.view-controls { margin-left: auto; }
.toolbar label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
button, select { min-height: 44px; border: 1px solid #b1c1c5; border-radius: 6px; padding: 8px 12px; background: white; color: #24383f; font: inherit; font-size: 13px; }
button { cursor: pointer; font-weight: 700; white-space: nowrap; }
button:disabled { cursor: default; opacity: .4; }
button:hover:not(:disabled) { background: #e9f2f3; }
button:focus-visible, select:focus-visible { outline: 3px solid #b78e24; outline-offset: 2px; }
select { max-width: 290px; }
#page-status { min-width: 92px; text-align: center; font-size: 12px; color: #53676d; }
#book { flex: 1; min-height: 0; height: auto; --fb-bg: #eef1f2; }
#book:focus-visible { outline: 3px solid #327e90; outline-offset: -3px; }
.hint { padding: 10px 16px; margin: 0; text-align: center; font-size: 12px; line-height: 1.6; background: white; border-top: 1px solid #d9e1e3; }
.failure { padding: 24px; line-height: 1.8; text-align: center; }
.failure a { color: #144d62; font-weight: bold; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  .toolbar { padding: 10px; gap: 8px; }
  .page-controls, .view-controls { width: 100%; justify-content: center; gap: 6px; }
  .view-controls { margin-left: 0; }
  select { min-width: 0; max-width: none; flex: 1; font-size: 11px; padding: 6px 4px; }
  #page-status { display: none; }
  button { padding: 8px; font-size: 12px; }
  .view-controls button { flex: 1; }
  .hint { font-size: 11px; padding: 8px 10px; }
}
