:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #17233d;
  background: #f6f8fc;
  --blue: #1958ee;
  --muted: #5d6b82;
  --border: #cdd8ec;
  --soft: #edf3ff;
  --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #5786f4; outline-offset: 3px; }
.top { background: #fff; border-bottom: 1px solid #dde6f6; }
.top-inner, .shell, .tray-inner { width: min(100%, 620px); margin-inline: auto; }
.top-inner { display: flex; align-items: center; justify-content: space-between; padding: 9px 15px; gap: 8px; min-height: 54px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #1555df; font-size: 18px; font-weight: 780; white-space: nowrap; }
.brand img { border-radius: 8px; }
.shell { padding: 0 12px 12px; }
.intro { padding: 16px 4px 15px; margin: 0 -12px; padding-inline: 16px; background: linear-gradient(to bottom, transparent 25%, #f6f8fc 98%), repeating-linear-gradient(0deg, transparent 0 11px, #dce8fc 11px 12px), repeating-linear-gradient(90deg, #f0f5fe 0 11px, #dce8fc 11px 12px); }
h1 { font-size: clamp(29px, 8vw, 39px); line-height: 1.13; font-weight: 800; letter-spacing: -.02em; }
.intro p { margin-top: 7px; color: var(--muted); font-size: 14px; }
.steps { list-style: none; padding: 0; margin: 16px 4px 0; display: flex; align-items: center; gap: 10px; }
.steps li { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.steps li:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: #acb8cd; margin-inline: 4px; }
.steps li:last-child { flex: 0 0 auto; }
.steps b { display: grid; place-items: center; min-width: 23px; height: 23px; border-radius: 50%; color: #fff; background: #7d8ca7; }
.steps [aria-current="step"] { color: #17233d; }
.steps [aria-current="step"] b { background: var(--blue); }
.panel { margin: 0 0 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 27px; }
h2 { font-size: 19px; line-height: 1.3; font-weight: 760; }
.text-link { padding: 8px 0; min-height: 36px; border: 0; color: #1453de; background: transparent; font-size: 14px; font-weight: 700; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; border: 1px dashed #9db4e3; background: var(--soft); border-radius: 12px; padding: 10px; margin-top: 7px; }
.pick.dragging { border-color: var(--blue); background: #e2edff; }
.pick svg { color: var(--blue); }
.pick strong { font-size: 16px; max-width: 100%; overflow-wrap: anywhere; }
.pick p, .printer-note, .muted, .preview p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.pick .button { margin-top: 3px; width: min(100%, 205px); }
.button { min-height: 44px; display: inline-flex; justify-content: center; align-items: center; border-radius: 10px; border: 1px solid transparent; font-size: 15px; font-weight: 700; padding: 8px 15px; }
.button.primary { color: white; background: var(--blue); }
.button.primary:disabled { color: #173869; background: #a9c7f5; }
.button.outline { color: #1552d6; background: white; border-color: #376cf1; }
.button.outline:disabled { color: var(--muted); border-color: var(--border); }
.account { font-size: 13px; min-height: 39px; padding: 5px 13px; }
label { display: block; font-size: 13px; font-weight: 720; margin: 6px 0 4px; }
input:not([type=file]), select { height: 42px; padding: 6px 9px; width: 100%; min-width: 0; border: 1px solid #adb9ce; border-radius: 8px; color: #17233d; background: white; font-size: 16px; }
select:disabled, input:disabled { color: #576782; background: #f7f9fe; opacity: 1; }
input::placeholder { color: #65738a; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.printer-note { margin-top: 4px; }
.printer-select { margin-top: 5px; }
.printer-select button { flex: 0 0 auto; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.printer-select .row { flex-wrap: nowrap; }
.preview { background: #f1f5fd; }
.preview .actions { margin-top: 8px; }
#preview-document { margin-top: 8px; }
#pdf-frame { display: block; width: 100%; border: 1px solid var(--border); border-radius: 8px; height: min(60vh, 580px); background: #fff; }
#image-frame { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto; object-fit: contain; }
#open-pdf { display: inline-flex; align-items: center; }
.notice { border-radius: 10px; background: #fff1e8; color: #7b3118; border: 1px solid #f6d3c1; font-size: 13px; padding: 10px; margin: 0 0 10px; overflow-wrap: anywhere; }
.tray { position: fixed; inset: auto 0 0; background: white; border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); z-index: 2; }
.tray-inner { padding: 9px 12px 6px; text-align: center; }
.tray .button, .wide { width: 100%; }
.tray p { font-size: 12px; line-height: 1.4; color: var(--muted); margin-top: 4px; }
dialog { border: 1px solid var(--border); border-radius: 16px; padding: 16px; width: min(390px, calc(100% - 24px)); color: #17233d; }
dialog::backdrop { background: #1022497a; }
dialog .wide { margin-top: 14px; }
dialog .muted { margin: 5px 0 10px; }
.form-error { margin-top: 8px; color: #922b1d; font-size: 13px; }
.jobs-list { list-style: none; padding: 0; margin: 0; }
.jobs-list li { padding: 11px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.jobs-list strong { display: block; font-size: 15px; }
.jobs-list span { color: var(--muted); font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (min-width: 600px) {
  .top-inner { padding-inline: 16px; }
  .intro { padding-top: 22px; padding-bottom: 20px; }
  .panel { padding: 16px; }
  .pick { padding: 16px; }
}
