:root { color-scheme: light; font-family: Arial, sans-serif; color: #24334b; background: #f4f6fa; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1220px; margin: auto; padding: 32px 24px; }
.page-header, .toolbar, .result { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.page-header { margin-bottom: 24px; }
h1 { font-size: 30px; margin: 8px 0; }
p { line-height: 1.5; margin: 8px 0; }
.eyebrow { font-size: 11px; font-weight: bold; letter-spacing: 1.5px; color: #46618a; }
.privacy-note { font-size: 13px; padding: 9px 14px; background: #e4f3ed; color: #25664e; border-radius: 24px; }
.toolbar, .result { background: white; border: 1px solid #dce3ee; border-radius: 12px; padding: 18px; justify-content: flex-start; }
button, .upload-button, #download { font: inherit; font-size: 14px; border: 1px solid #cad5e5; border-radius: 7px; background: white; padding: 11px 14px; color: #24334b; cursor: pointer; text-decoration: none; }
.primary, #download { background: #244599; color: white; border-color: #244599; }
button:hover:not(:disabled), .upload-button:hover { filter: brightness(.94); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, .upload-button:focus-within { outline: 3px solid #739eee; outline-offset: 3px; }
.upload-button { position: relative; background: #edf3ff; color: #244599; font-weight: bold; }
.upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-button:has(input:disabled) { opacity: .5; cursor: wait; }
.filename { margin-left: auto; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
input, select { font: inherit; padding: 8px; border: 1px solid #cad5e5; border-radius: 6px; background: white; color: #24334b; min-width: 0; }
.filename input { width: 190px; }
.help, footer, #count { color: #58677d; font-size: 12px; }
#status { min-height: 24px; font-size: 14px; }
progress { width: 100%; height: 8px; accent-color: #244599; }
.result { margin: 16px 0; justify-content: space-between; border-color: #9cccba; }
.result p { font-size: 13px; }
#errors { color: #a02929; background: #fff1f1; padding: 12px; border-radius: 8px; white-space: pre-line; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 70px 15px; background: white; border: 1px dashed #bfcde0; border-radius: 12px; margin-top: 20px; }
.empty span { font-size: 48px; color: #8aa2c7; }
.empty h2 { font-size: 20px; }
.empty p { color: #58677d; font-size: 14px; }
#pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.page-card { border: 1px solid #dce3ee; background: white; border-radius: 12px; padding: 16px; min-width: 0; }
.page-card h2 { font-size: 15px; margin: 0 0 5px; }
.photo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #58677d; font-size: 12px; }
.sheet-wrap { padding: 12px; background: #edf0f5; border-radius: 6px; margin: 12px 0; }
.sheet { position: relative; width: 100%; background: white; box-shadow: 0 2px 6px #24334b20; overflow: hidden; }
.sheet img { position: absolute; max-width: none; transform-origin: center; }
.page-controls { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.page-controls button { padding: 8px 10px; font-size: 12px; }
.page-options { display: flex; gap: 10px; }
.page-options label { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; font-size: 12px; }
footer { margin-top: 28px; line-height: 1.6; }
[hidden] { display: none !important; }
@media (max-width: 600px) { main { padding: 20px 14px; } .filename { margin-left: 0; width: 100%; } .filename input { width: 100%; } #pages { grid-template-columns: 1fr; } .toolbar { gap: 12px; } h1 { font-size: 26px; } }
