:root {
  color-scheme: light;
  --paper: #f6f4ed;
  --white: #fcfbf8;
  --ink: #25312d;
  --muted: #50605a;
  --line: #cdcfc0;
  --accent: #23483a;
  --danger: #853623;
  font: 15px/1.55 "PingFang SC", "Microsoft Yahei", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.masthead { min-height: 54px; background: var(--accent); color: var(--white); display: flex; justify-content: space-between; align-items: center; padding: 8px clamp(20px, 4vw, 64px); }
.brand { margin: 0; font: 700 18px/1.4 Georgia, "Songti SC", serif; }
.brand span { font-size: 13px; font-weight: 400; margin-inline-start: 10px; }
.masthead button { color: var(--white); }
main { max-width: 1800px; margin: auto; padding: 0 clamp(20px, 4vw, 64px) 40px; }
h1, h2, figcaption { font-family: Georgia, "Songti SC", "Noto Serif CJK SC", serif; }
h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 600; line-height: 1.15; margin: 0; }
h2 { font-size: 19px; margin: 0; overflow-wrap: anywhere; }
p { margin: 6px 0 14px; color: var(--muted); }
.brand, .intro h1 { color: inherit; }
.signin { margin: min(10vh, 120px) auto 0; max-width: 420px; }
.signin form { display: grid; gap: 14px; border-top: 1px solid var(--line); padding-top: 20px; }
.signin input { display: block; width: 100%; margin-top: 5px; }
.intro { padding: 32px 0 26px; border-bottom: 1px solid var(--ink); display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.intro p { margin-bottom: 0; }
#upload { display: grid; grid-template-columns: minmax(0, 260px) auto; gap: 5px 10px; align-items: center; }
#upload label { grid-column: 1 / -1; font-weight: 600; }
#source { max-width: 100%; }
button, .button, input { font: inherit; }
button, .button { border: 1px solid var(--accent); border-radius: 3px; padding: 6px 11px; color: var(--white); background: var(--accent); cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
button:disabled { opacity: .55; cursor: default; }
.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.danger { color: var(--danger); }
input:not([type=file]) { background: var(--white); padding: 7px 9px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); }
:focus-visible { outline: 2px solid #946417; outline-offset: 2px; }
.workspace { display: grid; grid-template-columns: minmax(180px, 245px) minmax(0, 1fr); gap: clamp(16px, 3vw, 42px); margin-top: 24px; }
aside { border-right: 1px solid var(--line); padding-right: 16px; }
#jobs { padding: 0; list-style: none; margin: 10px 0 0; }
#jobs li { border-top: 1px solid var(--line); }
#jobs a { display: block; color: var(--ink); text-decoration: none; padding: 8px; overflow-wrap: anywhere; }
#jobs a[aria-current="true"] { background: #e7ece3; box-shadow: inset 3px 0 var(--accent); }
#jobs small { display: block; color: var(--muted); }
.detail-head, .actions, .page-nav, #jump { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.detail-head { align-items: start; }
#progress { accent-color: var(--accent); width: min(100%, 240px); }
#expiration { font-size: 13px; }
#feedback:not(:empty), .warnings:not(:empty) { background: #eee6d2; color: #573a10; padding: 9px 12px; margin-top: 12px; }
.page-nav { position: sticky; top: 0; z-index: 1; background: var(--paper); border-block: 1px solid var(--line); padding: 8px 0; justify-content: center; }
#page { width: 72px; }
.paired { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
figure { margin: 0; min-width: 0; border: 1px solid var(--line); background: white; }
figcaption { background: var(--white); border-bottom: 1px solid var(--line); padding: 6px 10px; }
figure canvas { display: block; width: 100%; height: auto; }
footer { padding: 0 clamp(20px, 4vw, 64px) 20px; font-size: 13px; }
footer a { color: var(--accent); }
@media (max-width: 680px) {
  .workspace { grid-template-columns: 1fr; }
  aside { border-right: 0; }
  #jobs { max-height: 185px; overflow: auto; }
  .paired { grid-template-columns: 1fr; }
}
