.ac-reader { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #15334a; overflow: hidden; z-index: 2147483100; }
.ac-reader::backdrop { background: rgba(5,22,37,.58); backdrop-filter: blur(3px); }
.ac-reader__shell { position: absolute; top: 0; right: 0; display: flex; flex-direction: column; width: min(1040px,92vw); height: 100%; background: #f1f5f9; box-shadow: -16px 0 60px rgba(0,0,0,.16); font-family: var(--font-sans,'Inter',sans-serif); animation: ac-reader-enter .22s ease-out; }
.ac-reader.is-expanded .ac-reader__shell,.ac-reader__shell:fullscreen { width: 100vw; height: 100dvh; }
.ac-reader__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; padding: 12px 20px; background: #fff; border-bottom: 1px solid #e1e9ef; }
.ac-reader__title { min-width: 0; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-reader__button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 1px solid #dbe5ed; border-radius: 8px; background: #fff; color: #15334a; font: 500 22px/1 sans-serif; cursor: pointer; }
.ac-reader__button:hover { background: #eaf6fd; border-color: #8bc8e8; }
.ac-reader__button:disabled { opacity: .35; cursor: default; }
.ac-reader :focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.ac-reader__toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px; background: #fff; border-bottom: 1px solid #e1e9ef; }
.ac-reader__select { flex: 1; min-width: 140px; width: 150px; height: 36px; padding: 0 30px 0 10px; border: 1px solid #dbe5ed; border-radius: 8px; color: #15334a; background: #f8fafc; font: inherit; font-size: 12px; }
.ac-reader__download { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border-radius: 8px; background: #0284c7; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.ac-reader__notice { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 20px; color: #34576e; background: #eaf5fc; font-size: 13px; }
.ac-reader__notice[hidden],.ac-reader__spinner[hidden] { display: none; }
.ac-reader__spinner { width: 17px; height: 17px; flex-shrink: 0; border: 2px solid #c6e1ee; border-top-color: #0284c7; border-radius: 50%; animation: ac-reader-spin .8s linear infinite; }
.ac-reader__stage { display: flex; flex: 1; min-height: 0; align-items: center; justify-content: flex-start; overflow: auto; padding: 20px 24px; perspective: 1800px; background: radial-gradient(ellipse at center,#e7edf2,#d8e2e9); }
.ac-reader__book { position: relative; display: flex; flex: 0 0 auto; margin: auto; align-items: flex-start; box-shadow: 0 12px 35px rgba(24,47,65,.2); perspective: 1600px; }
.ac-reader__canvas { display: block; flex-shrink: 0; background: #fff; }
.ac-reader__book.is-spread::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 24px; transform: translateX(-50%); pointer-events: none; background: linear-gradient(90deg,transparent,rgba(0,0,0,.12),rgba(255,255,255,.35),transparent); }
.ac-reader__leaf { position: absolute; top: 0; z-index: 2; backface-visibility: hidden; box-shadow: -4px 0 16px rgba(0,0,0,.12); pointer-events: none; }
.ac-reader__foot { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 20px; border-top: 1px solid #dbe5ed; background: #fff; }
.ac-reader__page { display: flex; align-items: center; gap: 6px; color: #536d80; font-size: 12px; white-space: nowrap; }
.ac-reader__page input { width: 56px; height: 34px; border: 1px solid #dbe5ed; border-radius: 7px; text-align: center; color: #15334a; background: #fff; font: inherit; }
.ac-reader__original { margin-left: auto; color: #0284c7; font-size: 12px; text-decoration: underline; }
@keyframes ac-reader-enter { from { transform: translateX(40px); opacity: .4; } to { transform: translateX(0); opacity: 1; } }
@keyframes ac-reader-spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) { .ac-reader__shell { width: 100vw; } .ac-reader__head,.ac-reader__toolbar,.ac-reader__foot { padding: 10px 12px; } .ac-reader__head { min-height: 56px; } .ac-reader__select { flex-basis: calc(100% - 50px); } .ac-reader__original { flex-basis: 100%; margin: 0; text-align: center; } .ac-reader__foot { flex-wrap: wrap; gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .ac-reader__shell,.ac-reader__spinner { animation: none; } }
/* Keep every edge reachable when zoomed, with mouse drag and native touch pan. */
.ac-reader__stage { align-items: flex-start; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.ac-reader__stage.is-pannable { cursor: grab; }
.ac-reader__stage.is-panning { cursor: grabbing; user-select: none; }
.ac-reader__canvas { user-select: none; -webkit-user-drag: none; }
