:root { --background: #0b0303; --app-h: 100dvh; }
* { box-sizing: border-box; }
html, body {
  position: fixed; inset: 0; width: 100%; height: 100%; margin: 0;
  overflow: hidden; background: var(--background); color: #fff5e9;
  overscroll-behavior: none; touch-action: none; user-select: none;
  -webkit-user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent; font: 14px system-ui, sans-serif;
}
#stage {
  position: fixed; inset: 0; height: var(--app-h);
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#book { position: relative; height: 100%; width: 100%; overflow: hidden; }
#book img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center; pointer-events: none;
  will-change: transform; visibility: hidden;
}
#loading, #toast, #indicator {
  position: absolute; left: 50%; transform: translateX(-50%);
  margin: 0; text-align: center; pointer-events: none;
}
#loading { top: 50%; transform: translate(-50%, -50%); }
#indicator, #toast {
  border-radius: 1rem; background: rgba(15,6,6,.85); padding: .3em .8em;
  opacity: 0; transition: opacity 180ms; font-variant-numeric: tabular-nums;
}
#indicator { bottom: calc(env(safe-area-inset-bottom) + 10px); }
#toast { top: calc(env(safe-area-inset-top) + 12px); width: max-content; max-width: 95%; }
#indicator.visible, #toast.visible { opacity: 1; }
