:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
    color: #263934;
    background: #f5f5f2;
    -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.topbar {
    position: sticky;
    z-index: 2;
    top: 0;
    background: rgba(255, 255, 253, .97);
    border-bottom: 1px solid #e4e7e1;
}
.topbar-inner {
    max-width: 1320px;
    min-height: 54px;
    padding: 12px 22px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .025em; }
.counter { flex-shrink: 0; font-size: 13px; font-variant-numeric: tabular-nums; color: #2b6f61; }
.counter span { color: #7e8982; }
.hint { max-width: 1280px; margin: 0 auto; padding: 13px 0 11px; color: #7e8982; font-size: 11px; }
.hint span { padding: 0 5px; }
.reader { max-width: 1280px; margin: 0 auto; padding-bottom: 30px; }
.sheet {
    position: relative;
    margin: 0 0 16px;
    width: 100%;
    aspect-ratio: 959.76 / 540;
    background: #fff;
    outline: 1px solid #e5e7e1;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.sheet canvas { display: block; width: 100%; height: 100%; }
.page-message {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #849089;
    font-size: 13px;
}
.retry {
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid #c5d4cb;
    border-radius: 6px;
    background: #fff;
    color: #236a58;
    font: inherit;
    cursor: pointer;
    touch-action: manipulation;
}
.retry:focus-visible { outline: 2px solid #2b7865; outline-offset: 3px; }
.notice { margin: 18vh auto 0; padding: 32px 20px; text-align: center; }
.notice-mark { color: #a7b5a9; font-size: 32px; }
.notice h2 { font-size: 19px; font-weight: 500; margin: 16px 0 12px; }
.notice p { font-size: 14px; color: #7e8982; line-height: 1.8; }
.notice .retry { margin-top: 10px; font-size: 14px; }
.print-notice { display: none; }
@media (max-width: 1320px) {
    .reader { margin: 0 16px; }
    .hint { padding-left: 16px; }
}
@media (max-width: 600px) {
    .topbar-inner { min-height: 48px; padding: 11px 14px; }
    h1 { font-size: 14px; }
    .reader { margin: 0; }
    .sheet { margin-bottom: 10px; outline: none; }
    .hint { padding: 10px 14px; }
}
@media print {
    body > * { display: none !important; }
    body > .print-notice { display: block !important; padding: 30px; color: #333; }
}
