:root { color-scheme: light; font-family: Arial, sans-serif; color: #333; background: #eee; }
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
.reader-header { display: flex; align-items: center; gap: 20px; padding: 16px 24px; background: #fff; border-bottom: 1px solid #ddd; }
.brand { color: #aa7527; text-decoration: none; font-size: 20px; font-weight: 700; white-space: nowrap; }
.brand span { font-size: 14px; color: #666; font-weight: 400; }
h1 { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.reader-toolbar { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; padding: 8px 16px; background: #fafafa; border-bottom: 1px solid #d7d7d7; }
.control-group { display: flex; align-items: center; gap: 8px; }
button, input, select { font: inherit; }
.icon-button { width: 36px; height: 36px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #444; text-decoration: none; cursor: pointer; }
.icon-button:hover:not(:disabled) { background: #f4e7ce; color: #765015; }
button:disabled { opacity: .35; cursor: default; }
:focus-visible { outline: 2px solid #96691e; outline-offset: 2px; }
input, select { height: 34px; border: 1px solid #ccc; border-radius: 4px; background: #fff; color: #333; padding: 4px 8px; }
#page-number { width: 60px; text-align: center; }
#page-count { min-width: 40px; font-size: 14px; white-space: nowrap; }
#zoom { width: 105px; }
#reader { flex: 1; min-height: 0; overflow: auto; padding: 24px; }
#status { text-align: center; color: #666; font-size: 14px; }
#retry { display: block; margin: 16px auto; padding: 8px 20px; cursor: pointer; }
#page { position: relative; margin: 0 auto; background: #fff; box-shadow: 0 1px 5px #0002; }
canvas { display: block; -webkit-touch-callout: none; user-select: none; }
.textLayer { -webkit-touch-callout: none; }
@media (max-width: 600px) {
    .reader-header { padding: 12px; gap: 12px; }
    .brand { font-size: 17px; }
    .brand span { display: none; }
    h1 { font-size: 13px; }
    .reader-toolbar { gap: 6px 12px; padding: 8px; }
    #reader { padding: 12px; }
}
@media print { body { display: none; } }
