.student {
  --ink: #1d1d1f;
  --cool: #44474d;
  --action: #0066cc;
  --canvas: #fff;
  --rule: #e5e5ea;
  --panel: #e9e9df;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", "Noto Sans Mono CJK SC", monospace;
  /* 取自 station-v2.css 的工作台与小票色 */
  --pf-bench: #f1f1e9;
  --pf-bench-dot: #b8c0b16b;
  --pf-bench-line: #b9bfb5;
  --pf-sage: #46584e;
  --pf-sage-2: #536159;
  --pf-ticket: #fffdf2;
  --pf-ticket-ink: #26343e;
  --pf-ticket-muted: #636b64;
  --pf-danger: #b3261e;
  --pf-danger-bg: #fbeceb;
  --pf-warn-bg: #fff4df;
  /* 动效 */
  --pf-spring: cubic-bezier(.34, 1.4, .5, 1);
  --pf-ease: cubic-bezier(.22, .68, .22, 1);
  --pf-window-w: 292px;
  --pf-window-h: 456px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.sheet-app { position: relative; width: min(100%, 1360px); margin: auto; padding: 0 clamp(20px, 4.2vw, 64px) 3rem; }
.print-back {
  position: absolute;
  inset-block-start: max(8px, env(safe-area-inset-top));
  inset-inline-start: clamp(20px, 4.2vw, 64px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  color: var(--ink);
  background: var(--canvas);
  text-decoration: none;
}
.print-back:hover { background: #f1f3f6; }
.print-back:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.print-back svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; }

/* 导航与标题：与现有 print.html 一致 */
.station-nav { height: 64px; display: flex; gap: 14px; padding-inline-start: 56px; align-items: center; font-size: 15px; color: var(--cool); }
.brand { display: flex; gap: 9px; align-items: center; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand-tile { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: #303034; color: #fff; font-size: 19px; }
.nav-divider { width: 1px; height: 18px; background: var(--rule); }
.help-link { margin-left: auto; color: var(--ink); font-weight: 600; text-decoration: none; }
.workspace-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 0 20px; gap: 12px 16px; }
.workspace-header h1 { font-size: clamp(26px, 3.2vw, 40px); letter-spacing: -.03em; line-height: 1.1; white-space: nowrap; }
#account { font-size: 14px; color: var(--cool); padding: 6px 12px; border-radius: 999px; background: var(--panel); white-space: nowrap; }
#account[data-tone="ok"]::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2f9e5b; margin-right: 7px; vertical-align: 1px; }
#account[data-tone="bad"] { background: var(--pf-danger-bg); color: var(--pf-danger); }

/* 顶部提示条：网络错误 / 提交失败 */
.banner { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--pf-danger-bg); border: 1px solid #efc4c0; color: #6d1a14; }
.banner-icon { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--pf-danger); color: #fff; font-weight: 800; }
.banner-text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.banner-text strong { font-size: 15px; }
.banner .btn-ghost { margin-left: auto; }
.btn-ghost { flex: none; min-height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid currentColor; background: #fff; font-weight: 650; }

/* 外层两栏：左取件单，右工作台 */
.station-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }

/* ---------- 取件单列 ---------- */
.slip-shelf { position: sticky; top: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 24px); min-height: 0; }
.shelf-heading { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 10px; }
.shelf-heading h2 { font-size: 15px; font-weight: 700; }
.shelf-count { font: 650 12px var(--mono); min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 999px; background: var(--panel); color: var(--cool); }
.slip-list { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 14px 2px; min-height: 0; scroll-snap-type: y proximity; outline-offset: 3px; }
.slip-empty { font-size: 13px; color: #8a8f8a; line-height: 1.6; border: 1.5px dashed #d4d6cd; border-radius: 10px; padding: 18px 14px; text-align: center; background: repeating-linear-gradient(-45deg, transparent 0 8px, #f6f6f1 8px 9px); }

/* 取件单 = 发票样式 */
.slip { position: relative; flex: none; scroll-snap-align: start; background: var(--pf-ticket); color: var(--pf-ticket-ink); padding: 14px 14px 16px; border-radius: 3px 3px 0 0; filter: drop-shadow(0 2px 2px #374c3b26); font-size: 12px; }
.slip::before, .slip::after { content: ""; position: absolute; left: 0; right: 0; height: 7px; background: linear-gradient(135deg, var(--pf-ticket) 25%, transparent 25%) -4px 0 / 9px 9px repeat-x, linear-gradient(225deg, var(--pf-ticket) 25%, transparent 25%) -4px 0 / 9px 9px repeat-x; }
.slip::after { bottom: -6px; }
.slip::before { top: -6px; transform: scaleY(-1); }
.slip-head { display: flex; justify-content: space-between; align-items: baseline; font: 650 10.5px/1.4 var(--mono); letter-spacing: .06em; color: var(--pf-ticket-muted); }
.slip-title { display: block; text-align: center; font-weight: 800; font-size: 13px; letter-spacing: .4em; margin: 6px 0 2px; padding-left: .4em; }
.slip-no { display: block; text-align: center; font: 600 10.5px var(--mono); color: var(--pf-ticket-muted); }
.slip-cut { position: relative; border-top: 1.5px dashed #c3c6ba; margin: 10px -14px; }
.slip-cut::before, .slip-cut::after { content: ""; position: absolute; top: -7px; width: 13px; height: 13px; border-radius: 50%; background: var(--canvas); }
.slip-cut::before { left: -7px; } .slip-cut::after { right: -7px; }
.slip-label { display: block; font: 600 10.5px var(--mono); letter-spacing: .1em; color: var(--pf-ticket-muted); }
.slip-number { display: block; font: 800 40px/1.12 var(--mono); letter-spacing: .12em; margin: 2px 0 4px; }
.slip-pin { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.slip-pin b { font: 800 20px var(--mono); letter-spacing: .14em; padding: 0 6px; border: 1.5px solid var(--pf-ticket-ink); border-radius: 4px; }
.slip-rows { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 11.5px; }
.slip-rows dt { color: var(--pf-ticket-muted); } .slip-rows dd { margin: 0; text-align: right; font-family: var(--mono); font-weight: 650; }
.slip-foot { margin-top: 8px; display: flex; justify-content: space-between; font: 600 10px var(--mono); color: #8c918a; }
.slip-how { margin-top: 8px; padding-top: 7px; border-top: 1px solid #e6e4d4; font-size: 10.5px; line-height: 1.5; color: var(--pf-ticket-muted); }
.slip[data-filing] { visibility: hidden; }
.slip.is-new { box-shadow: 0 0 0 2px #2f9e5b55; }

/* ---------- 工作台 ---------- */
.bench { position: relative; min-width: 0; background-color: var(--pf-bench); background-image: radial-gradient(var(--pf-bench-dot) .85px, transparent .9px); background-position: 6px 6px; background-size: 14px 14px; border: 1px solid var(--pf-bench-line); border-radius: 16px; box-shadow: 0 3px 0 #d8dbd0; }
.stage { position: relative; min-height: 540px; padding: 30px clamp(18px, 3vw, 40px); }
.sheet-app[data-has-files="false"] .stage { display: flex; align-items: center; justify-content: center; gap: clamp(28px, 5vw, 72px); }
.sheet-app[data-has-files="true"] .stage { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 18px; align-items: start; padding-left: 18px; }

.printer-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.printer-status { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.printer-caption { font-size: 14px; color: var(--pf-sage-2); font-weight: 600; text-align: center; min-height: 1.5em; }
.printer-where { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #cfd2c8; background: #fff; color: var(--cool); font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.printer-where svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.printer-where:hover { border-color: var(--action); color: var(--action); background: #f5f9ff; }
.printer-where:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.sheet-app[data-has-files="true"] .printer-col { position: sticky; top: 0; padding-top: 74px; }

/* 打印机占位：中性圆角盒子，顶部出纸口 + 前面开口。正式形象换进来时整块替换 */
#printer-dock { --pm-size: 230px; position: relative; width: var(--pm-size); aspect-ratio: 640/599; transform-origin: 50% 92%; }
.sheet-app[data-has-files="true"] #printer-dock { --pm-size: 152px; }
.printer-puppet,
.mascot-body {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.mascot-body {
  user-select: none;
  -webkit-user-drag: none;
}
.mascot-face {
  position: absolute;
  left: 28.5%;
  top: 33.9%;
  width: 44%;
  height: 15.5%;
  transform: rotate(7deg);
  transform-origin: center;
}
.mascot-eye,
.mascot-cheek,
.mascot-mouth,
.mascot-pupil {
  position: absolute;
  display: block;
}
.mascot-eye {
  top: 5%;
  width: 18.5%;
  aspect-ratio: 1.06;
}
.mascot-eye.left {
  left: 7.5%;
}
.mascot-eye.right {
  right: 7.5%;
}
.mascot-pupil {
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(
      ellipse at 39% 24%,
      #fff 0 9%,
      #f6f5f1 10% 13%,
      transparent 16%
    ),
    radial-gradient(ellipse at 69% 66%, #c7b9ac 0 4%, transparent 7%),
    radial-gradient(
      ellipse at 40% 30%,
      #50463f 0,
      #282321 43%,
      #130f0f 80%,
      #0c0a0a
    );
  box-shadow:
    inset 0 -1px 1px #100b0a,
    0 1px 1px #1b181899,
    0 -1px 0 #ede8dc26;
}
.mascot-eye::after {
  content: "";
  position: absolute;
  inset: 20% 0 14%;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(
    ellipse at 50% 105%,
    transparent 53%,
    #221b19 57% 72%,
    transparent 77%
  );
}
.mascot-cheek {
  top: 60%;
  width: 14%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 37% 30%,
    #f9c5b9,
    #e69e92 60%,
    #b87370
  );
  box-shadow: 0 1px 1px #3a292947;
}
.mascot-cheek.left {
  left: 0;
}
.mascot-cheek.right {
  right: 0;
}
.mascot-mouth {
  left: 39.5%;
  top: 38%;
  width: 21%;
  height: 42%;
  border-radius: 28% 28% 50% 50%;
  background: radial-gradient(
    ellipse at 50% -14%,
    transparent 62%,
    #211a18 65% 78%,
    transparent 82%
  );
}
body[data-print-motion="feeding"] .mascot-pupil {
  opacity: 0;
}
body[data-print-motion="feeding"] .mascot-eye::after {
  opacity: 1;
}
body[data-print-motion="feeding"] .mascot-mouth,
body[data-print-motion="issuing"] .mascot-mouth,
body[data-print-motion="filing"] .mascot-mouth {
  background:
    radial-gradient(
      ellipse at 51% 114%,
      #ffb5a9 0 33%,
      #e78781 45%,
      transparent 48%
    ),
    linear-gradient(#1f1616, #4a2627);
  border-radius: 23% 23% 52% 52% / 21% 21% 90% 90%;
  box-shadow:
    inset 0 1px 1px #150e0d,
    0 1px 0 #efe2da30;
}
body[data-print-motion="feeding"] .mascot-mouth {
  top: 30%;
  height: 57%;
  left: 37%;
  width: 26%;
}
#printer-inlet,
#printer-outlet {
  position: absolute;
  height: 2%;
  pointer-events: none;
}
#printer-inlet {
  left: 43%;
  width: 16%;
  top: 44%;
}
#printer-outlet {
  /* Roller contact line on the 640 × 599 sprite, from (249, 100) to (512, 127). */
  left: 38.9%;
  top: 16.7%;
  width: 41.3%;
  height: 0;
  z-index: 1;
  transform-origin: 0 0;
  transform: rotate(5.86deg);
}
/* ---------- 文件横排 ---------- */
.rail-wrap { position: relative; min-width: 0; }
.rail-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; min-height: 40px; padding: 2px 4px; font-size: 13px; color: var(--pf-sage-2); }
.rail-head b { font-family: var(--mono); color: var(--ink); }
.rail-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.rail-nav button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--pf-bench-line); background: #fff; font-size: 18px; line-height: 1; }
.rail-nav button:disabled { opacity: .35; cursor: default; }
.rail-nav output { font: 650 12.5px var(--mono); min-width: 44px; text-align: center; }
.rail { display: flex; gap: 18px; align-items: flex-start; outline-offset: 4px; border-radius: 12px; }
.sheet-app[data-has-files="true"] .rail { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 26px; padding: 6px 26px 18px; scrollbar-width: thin; }

/* 加号框 → 再加一张 */
.add-col { flex: none; display: flex; flex-direction: column; gap: 12px; scroll-snap-align: end; pointer-events: none; }
.add-col > :not(.drop-ghost) { pointer-events: auto; }
.adder { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 330px; height: 300px; padding: 22px; border: 2px dashed #9aa597; border-radius: 22px; background: #fffffcd9; cursor: pointer; text-align: center; transition: background .15s, border-color .15s; transform-origin: 0 0; }
.adder:hover, .adder:focus-visible, .stage.is-dragover .adder { background: #fff; border-color: var(--action); }
.adder:focus-visible { outline: 3px solid #0066cc55; outline-offset: 3px; }
.adder input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.adder-plus { position: relative; width: 58px; height: 58px; border-radius: 50%; background: var(--ink); }
.adder-plus::before, .adder-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 42%; height: 3px; border-radius: 2px; background: #fff; transform: translate(-50%, -50%); }
.adder-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.adder-label { font-size: 21px; font-weight: 750; }
.adder-types { font-size: 13px; color: var(--pf-sage-2); line-height: 1.6; }
.adder-more { display: none; }
.adder[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
.sheet-app[data-has-files="true"] .adder { flex-direction: row; width: 172px; height: 48px; padding: 0 14px; gap: 8px; border-radius: 999px; border-width: 1.5px; border-style: solid; border-color: var(--ink); background: var(--ink); color: #fff; }
.sheet-app[data-has-files="true"] .adder:hover, .sheet-app[data-has-files="true"] .adder:focus-visible { background: #000; }
.sheet-app[data-has-files="true"] .adder-plus { width: 20px; height: 20px; background: #fff; }
.sheet-app[data-has-files="true"] .adder-plus::before, .sheet-app[data-has-files="true"] .adder-plus::after { background: var(--ink); height: 2px; }
.sheet-app[data-has-files="true"] .adder-initial, .sheet-app[data-has-files="true"] .adder-types { display: none; }
.sheet-app[data-has-files="true"] .adder-more { display: inline; font-size: 15px; }
.drop-ghost { display: none; pointer-events: none; }
.sheet-app[data-has-files="true"] .drop-ghost { display: grid; place-items: center; width: 172px; height: calc(var(--pf-window-h) - 60px); border: 1.5px dashed #c3c8bd; border-radius: 14px; color: #9aa097; font-size: 13px; text-align: center; line-height: 1.7; }
.stage.is-dragover .drop-ghost { border-color: var(--action); color: var(--action); background: #eef5ff; }
.drop-veil { position: absolute; inset: 8px; display: none; place-items: center; border-radius: 12px; border: 2px dashed var(--action); background: #eef5ffd0; color: var(--action); font-weight: 700; font-size: 18px; pointer-events: none; z-index: 5; }
.stage.is-dragover .drop-veil { display: grid; }
.adder.is-shake { animation: shake .36s; }
@keyframes shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }

/* 文件窗口 */
.file-sheet { position: relative; z-index: 1; flex: none; display: flex; flex-direction: column; gap: 8px; width: var(--pf-window-w); height: var(--pf-window-h); padding: 12px 14px 14px; background: #fff; border: 1px solid #d6d9cf; border-radius: 14px; box-shadow: 0 1px 0 #d8dbd0, 0 10px 24px -14px #2c352f40; scroll-snap-align: start; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.file-sheet[data-active="true"] { border-color: #9aa597; }
.file-sheet:focus-visible { outline: 3px solid #0066cc55; outline-offset: 2px; }
.file-heading { display: flex; align-items: center; gap: 8px; }
.file-index { font: 750 13px var(--mono); color: var(--pf-sage-2); }
.file-kind { font: 700 11px var(--mono); padding: 2px 7px; border-radius: 5px; background: var(--panel); color: var(--cool); }
.file-heading-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.rotate-file { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; border: 0; background: transparent; color: #6b706b; font: 700 11.5px/1 var(--mono); transition: background .15s, color .15s; }
.rotate-file svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rotate-file:hover { background: #f1f1ea; color: var(--ink); }
.rotate-file[data-rotated="true"] { background: #e8f1fc; color: var(--action); padding-inline: 8px; }
.rotate-file:focus-visible, .remove-file:focus-visible { outline: 2px solid var(--action); outline-offset: 1px; }
.remove-file { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; font-size: 20px; line-height: 1; color: #6b706b; }
.remove-file:hover { background: #f1f1ea; color: var(--pf-danger); }
.file-sheet h3 { font-size: 15px; font-weight: 700; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 12.5px; color: #636b64; margin-top: -4px; }
.thumb-stage { position: relative; flex: none; display: grid; place-items: center; height: 200px; border-radius: 10px; background: #f3f3ee; overflow: hidden; }
.thumb-stage canvas { max-width: 86%; max-height: 88%; background: #fff; }
.loading { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #f3f3eef0; font-size: 13px; color: var(--pf-sage-2); }
.loading i { width: 60%; height: 5px; border-radius: 99px; background: #dfe2d8; overflow: hidden; position: relative; }
.loading i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: inherit; background: var(--pf-sage); animation: indeterminate 1.1s ease-in-out infinite; }
@keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.file-sheet[data-status="loading"] .loading, .file-sheet[data-status="queued"] .loading { display: flex; }
.range-wrap { display: block; font-size: 13px; font-weight: 650; }
.range-wrap span { font-weight: 500; color: #636b64; margin-left: 4px; }
.range-wrap input, .coordinates input, .order-options select { display: block; width: 100%; margin-top: 5px; height: 38px; padding: 0 10px; border: 1px solid #cfd2c8; border-radius: 8px; background: #fff; }
.range-wrap input[aria-invalid="true"] { border-color: var(--pf-danger); background: var(--pf-danger-bg); }
.crop-toggle { align-self: flex-start; min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid #cfd2c8; background: #fff; font-size: 13px; font-weight: 650; }
.card-crop[open] {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(8px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  border: 0;
  overflow-x: clip;
  background: #e7e9ec;
  color: var(--ink);
}
.crop-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-width: 0; }
.crop-head h2 { font-size: clamp(18px, 4vmin, 24px); }
.crop-head button:first-child { justify-self: start; }
.crop-head button:last-child { justify-self: end; }
.card-crop .image-stage {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  margin-block: 12px;
  container-type: size;
}
.image-stage canvas {
  display: block;
  width: min(100cqw, calc(100cqh * .707));
  height: auto;
  aspect-ratio: 595.28 / 841.89;
  box-shadow: 0 5px 24px #18253826;
  cursor: grab;
  touch-action: none;
}
.card-crop[data-orientation="landscape"] .image-stage canvas {
  width: min(100cqw, calc(100cqh * 1.414));
  aspect-ratio: 841.89 / 595.28;
}
.image-stage canvas:active { cursor: grabbing; }
.coordinates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 8px; min-width: 0; max-width: 100%; }
.coordinates label { font-size: 11.5px; font-weight: 600; min-width: 0; max-width: 100%; } .coordinates input { width: 100%; min-width: 0; max-width: 100%; height: 32px; margin-top: 2px; font-size: 13px; }
.crop-tools { width: min(100%, 420px); min-width: 0; max-width: 100%; margin-inline: auto; }
.crop-tools details { min-width: 0; max-width: 100%; }
.crop-tools summary { cursor: pointer; width: fit-content; margin: 4px auto; }
.crop-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px; min-width: 0; max-width: 100%; }
.crop-actions input { flex: 1 1 88px; min-width: 0; max-width: 100%; accent-color: var(--action); }
.crop-rotate { display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.crop-rotate svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.card-crop .text-action { min-width: 44px; min-height: 44px; padding-inline: 11px; }
.crop-head .text-action.strong { padding-inline: 18px; border-radius: 10px; background: var(--action); color: #fff; }
.crop-actions [data-role="crop-zoom-in"], .crop-actions [data-role="crop-zoom-out"] { font-size: 20px; }
.text-action { border: 0; background: none; padding: 4px 0; color: var(--action); font-size: 13px; font-weight: 600; }
.text-action.strong { font-weight: 750; }
.file-error { font-size: 13px; line-height: 1.5; padding: 9px 10px; border-radius: 8px; background: var(--pf-danger-bg); color: #7c1d16; }
.file-sheet[data-status="error"] { border-color: #e3aaa5; }
.file-sheet[data-status="error"] .thumb-stage { background: repeating-linear-gradient(-45deg, #f8eeed 0 10px, #f4e4e2 10px 20px); }
.file-sheet[data-status="error"] .thumb-stage canvas { opacity: .25; }

/* 底部汇总条 */
.bench-footer { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid #d6d9cf; background: #fcfcf6; border-radius: 0 0 16px 16px; }
.order-options { grid-column: 1 / -1; display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.order-options label, .option-label { font-size: 12.5px; font-weight: 650; color: var(--cool); }
.option-group { display: flex; flex-direction: column; }
.orientation-toggle { display: inline-grid; grid-template-columns: 1fr 1fr; margin-top: 5px; height: 40px; padding: 3px; gap: 3px; border: 1px solid #cfd2c8; border-radius: 8px; background: #f2f2eb; }
.orientation-toggle button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--cool); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.orientation-toggle button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.orientation-toggle button[aria-checked="true"] { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px #1d1d1f1f; }
.orientation-toggle button:hover:not([aria-checked="true"]):not(:disabled) { color: var(--ink); }
.orientation-toggle button:focus-visible { outline: 2px solid var(--action); outline-offset: 1px; }
.order-options select { min-width: 138px; height: 40px; }
.proof-mini { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 10px; border: 1px solid #d6d9cf; background: #fff; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.proof-mini canvas { width: 34px; height: 48px; border: 1px solid #e5e5ea; border-radius: 2px; background: #fff; transition: width .18s var(--pf-ease), height .18s var(--pf-ease); }
.sheet-app[data-orientation="landscape"] .proof-mini canvas { width: 48px; height: 34px; }
.proof-mini:disabled { opacity: .5; cursor: default; }
#estimate { font-size: 14px; color: var(--cool); text-align: right; line-height: 1.4; }
#estimate b { white-space: nowrap; }
#estimate small { font-size: 12px; color: #8a8f8a; }
#estimate b { font-family: var(--mono); color: var(--ink); }
#estimate[data-tone="bad"] { color: var(--pf-danger); }
#send { min-height: 48px; padding: 0 26px; border: 0; border-radius: 12px; background: var(--action); color: #fff; font-size: 16px; font-weight: 750; white-space: nowrap; box-shadow: 0 2px 0 #004f9e; }
#send:disabled { background: #b9c3cf; box-shadow: none; cursor: not-allowed; }
.notice { min-height: 0; padding: 0 20px; font-size: 13.5px; color: var(--pf-danger); }
.notice:not(:empty) { padding: 0 20px 14px; background: #fcfcf6; border-radius: 0 0 16px 16px; margin-top: -2px; }

.proof-dialog { border: 0; border-radius: 16px; padding: 18px; box-shadow: 0 20px 60px #0004; max-width: min(92vw, 480px); }
.proof-dialog[data-orientation="landscape"] { max-width: min(92vw, 680px); }
.proof-dialog::backdrop { background: #1d1d1f88; }
.proof-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.proof-head h2 { font-size: 16px; white-space: nowrap; } .proof-head > div { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.proof-head > h2 + .btn-ghost:last-child { margin-left: auto; }
.proof-head button:not(.btn-ghost) { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #ccc; background: #fff; }
.proof-head output { font: 650 13px var(--mono); white-space: nowrap; }
#proof-canvas { display: block; width: 100%; height: auto; max-height: calc(100dvh - 110px); object-fit: contain; border: 0; }

.location-card { display: flex; align-items: center; gap: 20px; margin-top: 22px; padding: 14px; border: 1px solid var(--rule); border-radius: 16px; background: #f8f8f5; }
.location-photo-btn { flex: none; width: min(100%, 300px); padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: transparent; line-height: 0; }
.location-photo-btn img { display: block; width: 100%; height: auto; border-radius: 12px; transition: transform .2s var(--pf-ease); }
.location-photo-btn:hover img { transform: scale(1.02); }
.location-photo-btn:focus-visible { outline: 3px solid #0066cc55; outline-offset: 2px; }
.location-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.location-info h2, .location-dialog .proof-head h2 { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 750; color: var(--ink); }
.location-info h2 svg, .location-dialog .proof-head h2 svg { width: 18px; height: 18px; fill: none; stroke: var(--action); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.location-place { font-size: 15px; font-weight: 600; color: var(--cool); }
.location-dialog { max-width: min(92vw, 640px); }
.location-dialog .proof-head .btn-ghost { margin-left: auto; }
.location-figure { margin: 0; display: grid; gap: 12px; justify-items: center; }
.location-figure img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 160px); object-fit: contain; border-radius: 12px; }
.location-figure figcaption { font-size: 16px; font-weight: 700; color: var(--ink); text-align: center; }

.format-guide { margin-top: 22px; font-size: 13.5px; color: var(--cool); }
.format-guide summary { cursor: pointer; font-weight: 650; color: var(--ink); }
.format-guide p { margin-top: 8px; }

.print-flight-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: hidden;
  pointer-events: none;
}
.print-flight-layer .print-flying-sheet,
.print-flight-layer .print-flying-ticket {
  position: absolute;
  inset: 0 auto auto 0;
  box-sizing: border-box;
  margin: 0;
  transform-origin: 0 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.print-flying-sheet {
  opacity: 0;
  background: #fffefa;
  border: 1px solid #b8beb2;
  box-shadow: 0 3px 6px #152f2424;
}
.print-flying-sheet canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.print-flight-layer .print-flying-sheet,
.print-flight-layer .print-paper-ball {
  transform-origin: 50% 50%;
}
.print-flying-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    conic-gradient(
      from 34deg at 41% 36%,
      transparent 0 56deg,
      #77828d63 58deg 88deg,
      #ffffffb3 91deg 132deg,
      transparent 135deg
    ),
    conic-gradient(
      from -40deg at 63% 70%,
      #c4cbd34a 0 73deg,
      #69788766 76deg 102deg,
      transparent 105deg
    );
  transition: opacity 160ms ease-in;
}
.print-flight-layer[data-feed-phase="crumple"] .print-flying-sheet::after {
  opacity: 1;
}
.print-paper-ball {
  position: absolute;
  inset: 0 auto auto 0;
  opacity: 0;
  border-radius: 43% 51% 44% 48%;
  will-change: transform, opacity;
  filter: drop-shadow(0 2px 2px #39455755);
}
.print-paper-ball::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  clip-path: polygon(
    19% 6%,
    55% 0,
    82% 9%,
    99% 35%,
    94% 68%,
    78% 91%,
    42% 100%,
    15% 84%,
    0 56%,
    3% 30%
  );
  background:
    conic-gradient(
        from 13deg at 34% 37%,
        transparent 0 52deg,
        #fffefa 55deg 94deg,
        #a9b0b7 95deg 116deg,
        transparent 118deg
      )
      0 0/78% 79% no-repeat,
    conic-gradient(
        from 82deg at 49% 41%,
        #ffffffba 0 49deg,
        #89949f88 51deg 98deg,
        transparent 101deg
      )
      100% 100%/72% 64% no-repeat,
    conic-gradient(
      from -22deg at 65% 60%,
      #fffef8 0 50deg,
      #d0d3d3 51deg 97deg,
      #eef0ed 98deg 139deg,
      #afb7bd 140deg 198deg,
      #efeee8 200deg 251deg,
      #c6cbd0 252deg 312deg,
      #f9f9f5 313deg
    ),
    #e8e8e4;
  box-shadow:
    inset -3px -4px 6px #56616d70,
    inset 2px 3px 5px #ffffffbd;
}
.ticket[data-print-filing] {
  opacity: 0 !important;
}
@media (prefers-reduced-motion: reduce) {
  .print-flight-layer {
    display: none;
  }
  .ticket[data-print-filing] {
    opacity: 1 !important;
  }
}

/* The body moves around its feet. Eye/mouth changes stay on the front panel. */
.printer-puppet {
  transform-origin: 50% 85%;
}
@media (prefers-reduced-motion: no-preference) {
  #printer-dock[data-mascot-live] .printer-puppet {
    rotate: var(--mascot-tilt, 0deg);
    transition:
      rotate 220ms ease-out,
      scale 150ms ease-out;
    animation: printer-rest 5.4s ease-in-out infinite;
  }
  #printer-dock[data-mascot-live] .mascot-pupil {
    translate: var(--gaze-x, 0px) var(--gaze-y, 0px);
    transition: translate 130ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .mascot-eye {
    transform-origin: 50% 62%;
    transition: scale 95ms ease-in-out;
  }
  .mascot-mouth,
  .mascot-cheek {
    transition:
      scale 145ms,
      translate 145ms,
      opacity 145ms;
  }
  #printer-dock[data-mascot-blink] .mascot-eye {
    animation: printer-blink 165ms ease-in-out;
  }
  #printer-dock[data-mascot-tap] .printer-puppet {
    animation: printer-greet 340ms cubic-bezier(0.2, 0.6, 0.25, 1);
  }
  #printer-dock[data-mascot-tap] .mascot-cheek {
    scale: 1.12;
  }
  body[data-print-motion] #printer-dock .printer-puppet {
    animation: none;
    rotate: 0deg;
  }
  body[data-print-motion] #printer-dock[data-mascot-live] .mascot-pupil {
    translate: 0 0;
  }
  body[data-print-motion="feeding"]
    #printer-dock[data-mascot-live]
    .printer-puppet {
    rotate: -1.3deg;
    scale: 1.008 0.99;
  }
  body[data-print-motion="feeding"] .mascot-cheek {
    scale: 1.14;
    translate: 0 -6%;
  }
  body[data-print-motion="feeding"]
    #printer-dock[data-mascot-bite]
    .printer-puppet {
    animation: printer-bite 345ms cubic-bezier(0.25, 0.73, 0.26, 1) both;
  }
  body[data-print-motion="waiting"] .mascot-eye {
    scale: 1 0.9;
  }
  body[data-print-motion="issuing"]
    #printer-dock[data-mascot-live]
    .printer-puppet {
    animation: printer-proud 495ms cubic-bezier(0.23, 0.7, 0.3, 1) both;
  }
  body[data-print-motion="issuing"]
    #printer-dock[data-mascot-live]
    .mascot-pupil {
    translate: 0 -7%;
  }
  body[data-print-motion="issuing"] .mascot-cheek,
  body[data-print-motion="filing"] .mascot-cheek {
    scale: 1.1;
  }
  @keyframes printer-rest {
    0%,
    34%,
    100% {
      translate: 0 0;
    }
    70% {
      translate: 0 -0.6%;
    }
  }
  @keyframes printer-blink {
    0%,
    100% {
      scale: 1 1;
    }
    45%,
    58% {
      scale: 1.03 0.09;
    }
  }
  @keyframes printer-greet {
    0%,
    100% {
      scale: 1 1;
      translate: 0 0;
    }
    34% {
      scale: 1.025 0.972;
      translate: 0 1%;
    }
    72% {
      scale: 0.992 1.012;
      translate: 0 -0.55%;
    }
  }
  @keyframes printer-bite {
    0% {
      scale: 1 1;
      rotate: -1.3deg;
    }
    49% {
      scale: 1.042 0.95;
      rotate: 1.2deg;
    }
    80% {
      scale: 0.994 1.012;
      rotate: -0.55deg;
    }
    100% {
      scale: 1 1;
      rotate: 0deg;
    }
  }
  @keyframes printer-proud {
    0%,
    100% {
      scale: 1 1;
      translate: 0 0;
      rotate: 0deg;
    }
    26% {
      scale: 1.021 0.97;
      translate: 0 0.8%;
    }
    61% {
      scale: 0.982 1.034;
      translate: 0 -2%;
      rotate: -1deg;
    }
    86% {
      scale: 1.004 0.994;
      translate: 0 0.2%;
    }
  }
}

/* Local roller mask: the paper can only appear above this sloping contact line. */
.print-exit-window {
  position: absolute;
  bottom: 0;
  left: 4%;
  width: 92%;
  overflow: hidden;
  pointer-events: none;
  transform: skewX(-2deg);
  transform-origin: 50% 100%;
}
.print-exit-window::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(transparent, rgba(27, 25, 24, 0.32));
}
.print-exit-strip {
  position: absolute;
  inset: 0;
  transform: translateY(100%);
  will-change: transform;
}

.ticket-dust-layer {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 9999;
  pointer-events: none;
}
.ticket[data-dissolving] {
  pointer-events: none;
  will-change: clip-path;
}
@media (prefers-reduced-motion: reduce) {
  .ticket-dust-layer {display:none;}
}

/* ---------- 手机 ---------- */
@media (max-width: 760px) {
  .student { --pf-window-w: min(82vw, 320px); --pf-window-h: 430px; font-size: 15px; }
  .sheet-app { padding: 0 14px calc(28px + env(safe-area-inset-bottom)); }
  .print-back { inset-inline-start: 14px; }
  .station-nav { height: 46px; font-size: 13px; gap: 8px; }
  .station-nav .nav-divider, .station-nav .nav-divider + span { display: none; }
  .brand-tile { width: 25px; height: 25px; font-size: 16px; }
  .help-link { font-size: 13px; }
  .workspace-header { flex-wrap: wrap; gap: 8px 12px; padding: 10px 0 12px; }
  .workspace-header h1 { font-size: 24px; white-space: nowrap; }
  #account { font-size: 12px; padding: 4px 10px; }
  .station-layout { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .station-layout > * { min-width: 0; max-width: 100%; }
  .bench { overflow: clip; }
  .slip-shelf { position: static; max-height: none; width: 100%; }
  .shelf-heading { padding: 0 2px 6px; }
  .slip-list { flex-direction: row; overflow-x: auto; overflow-y: visible; scroll-snap-type: x mandatory; gap: 12px; padding: 6px 2px 12px; }
  .slip { width: 176px; scroll-snap-align: start; }
  .slip-number { font-size: 32px; }
  .slip-empty { width: 100%; padding: 10px 12px; font-size: 12px; }
  .slip-empty br { display: none; }
  .bench { border-radius: 14px; }
  .stage { min-height: 0; padding: 18px 12px 12px; }
  .sheet-app[data-has-files="false"] .stage { flex-direction: column; gap: 14px; padding-top: 24px; padding-bottom: 24px; }
  .sheet-app[data-has-files="true"] .stage { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 0 8px; }
  #printer-dock { --pm-size: 168px; }
  .sheet-app[data-has-files="true"] #printer-dock { --pm-size: 96px; }
  .sheet-app[data-has-files="true"] .printer-col { position: static; padding-top: 0; flex-direction: row; justify-content: center; gap: 10px; }
  .sheet-app[data-has-files="true"] .printer-status { align-items: flex-start; gap: 4px; }
  .sheet-app[data-has-files="true"] .printer-caption { font-size: 12.5px; text-align: left; max-width: 9em; }
  .location-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px; }
  .location-photo-btn { width: 100%; }
  .adder { width: min(100%, 300px); height: 196px; }
  .adder-label { font-size: 18px; }
  .rail-head { padding: 2px 14px; min-height: 38px; height: auto; flex-wrap: wrap; gap: 6px 8px; }
  .student { --pf-window-h: 400px; }
  .sheet-app[data-has-files="true"] .rail { padding: 6px 14px 14px; scroll-padding-inline: 14px; gap: 12px; }
  .file-sheet { scroll-snap-align: center; }
  .sheet-app[data-has-files="true"] .adder { width: 136px; height: 44px; }
  .sheet-app[data-has-files="true"] .drop-ghost { width: 136px; }
  .thumb-stage { height: 180px; }
  .bench-footer { position: static; margin-top: 8px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid #d6d9cf; box-shadow: none; }
  .order-options { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
  .orientation-group { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
  .orientation-group .option-label { font-size: 12px; white-space: nowrap; }
  .orientation-toggle { margin-top: 0; height: 34px; flex: 1; max-width: 210px; }
  .orientation-toggle button { font-size: 13px; padding: 0 8px; }
  .order-options select { min-width: 0; height: 36px; font-size: 14px; }
  .order-options label { font-size: 11.5px; }
  .proof-mini { padding: 3px 8px 3px 3px; gap: 6px; font-size: 12px; } .proof-mini canvas { width: 28px; height: 40px; }
  .sheet-app[data-orientation="landscape"] .proof-mini canvas { width: 40px; height: 28px; }
  .rotate-file { min-width: 36px; height: 36px; }
  .remove-file { width: 40px; height: 40px; margin-right: -8px; }
  #estimate { text-align: left; font-size: 13px; line-height: 1.35; }
  #send { grid-column: 3; justify-self: end; min-height: 46px; padding: 0 18px; }
  .notice:not(:empty) { position: static; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #efc4c0; box-shadow: none; }
  .banner { padding: 10px; gap: 10px; }
  .banner-text { font-size: 12.5px; } .banner-text strong { font-size: 14px; }
  .banner .btn-ghost { min-height: 34px; padding: 0 12px; }
}

/* 减少动态效果：不飞、不弹，只做淡入淡出（JS 里同样走淡入淡出分支） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.crop-fields { border: 0; margin: 0; padding: 0; min-width: 0; max-width: 100%; display: flex; flex-direction: column; gap: 8px; }
.rail-nav .add-mini,
#add-mini { width: auto; white-space: nowrap; margin-right: 8px; height: 32px; display: inline-flex; align-items: center; padding: 0 12px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
#controls { border: 0; margin: 0; padding: 0; min-width: 0; }
.add-col { position: relative; }
#upload-login { position: absolute; inset: 0; z-index: 2; }
.account-area { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: end; }
#login { color: var(--action); font-size: 14px; }
.slip-no { overflow-wrap: anywhere; }
.sheet-app[data-has-files="false"] .rail-wrap { max-width: 100%; }
.print-flight-layer .print-flying-ticket { scroll-snap-align: none; }
body[data-print-motion="returning"] #add-col,
body[data-print-motion="issuing"] #add-col,
body[data-print-motion="filing"] #add-col { visibility: hidden; }
@media (min-width: 761px) and (max-width: 1180px) {
  .bench-footer { grid-template-columns: auto minmax(220px, 1fr) auto; }
  .order-options { grid-column: 1 / -1; }
}
@media (min-width: 761px) {
  .bench { container: bench / inline-size; }
  @container bench (max-width: 1120px) {
    .bench-footer { grid-template-columns: auto minmax(220px, 1fr) auto; }
    .order-options { grid-column: 1 / -1; }
  }
  @container bench (max-width: 660px) {
    .sheet-app[data-has-files="false"] .stage {
      flex-direction: column;
      gap: 18px;
      padding: 24px 16px;
    }
    .sheet-app[data-has-files="false"] .adder {
      width: min(100%, 330px);
    }
    .sheet-app[data-has-files="false"] .add-col {
      width: 100%;
    }
    .sheet-app[data-has-files="true"] .stage {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
      padding: 16px 14px 12px;
    }
    .sheet-app[data-has-files="true"] #printer-dock { --pm-size: 96px; }
    .sheet-app[data-has-files="true"] .printer-col {
      position: static;
      padding-top: 0;
      flex-direction: row;
      justify-content: center;
      gap: 10px;
    }
    .sheet-app[data-has-files="true"] .printer-status { align-items: flex-start; gap: 4px; }
    .sheet-app[data-has-files="true"] .printer-caption { font-size: 12.5px; text-align: left; }
    .bench-footer { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; }
    .estimate-col { grid-column: 1 / -1; align-items: flex-start; }
    #estimate { text-align: left; }
    .quota-advice { justify-content: flex-start; }
    #send { grid-column: 3; grid-row: 2; justify-self: end; }
  }
}
@media (max-width: 760px) {
  .bench { overflow: visible; }
  .sheet-app[data-has-files="false"] .rail-wrap { width: min(100%,300px); }
}
@media (max-width: 760px) {
  .sheet-app[data-has-files="false"] .add-col { width: 100%; }
}
.ticket.slip { display: flex; flex-direction: column; min-width: 0; }
.ticket .ticket-title { order: 1; }
.ticket .ticket-number { order: 2; }
.ticket .ticket-pin { order: 3; padding-bottom: 8px; border-bottom: 1px dashed #c3c6ba; }
.ticket .ticket-meta { order: 4; margin: 7px 0; font-family: var(--mono); }
.ticket .slip-rows { order: 5; margin: 0; }
.ticket .slip-how { order: 6; }
.slip-empty[hidden] { display: none; }
.ticket-dust-layer { position: fixed; inset: 0 auto auto 0; pointer-events: none; z-index: 1001; }

#printer-dock[data-state="offline"] .printer-puppet { filter: saturate(.45); }

.adder-asleep,
.mascot-sleep { display: none; }
.sheet-app[data-printer-asleep] .adder > :is(.adder-plus, .adder-initial, .adder-more, .adder-types),
.sheet-app[data-printer-asleep] :is(.drop-ghost, .stage.is-dragover .drop-veil, #add-mini) {
  display: none;
}
.sheet-app[data-printer-asleep] #add-file {
  background: #eef0f2;
  border-color: #d5dbdb;
  color: #3d4d52;
  opacity: 1;
}
.sheet-app[data-printer-asleep] .adder-asleep { display: block; }
.sheet-app[data-printer-asleep][data-has-files="true"] .adder-asleep { font-size: 15px; }
.sheet-app[data-has-files="true"] .add-col { align-items: center; }
.sheet-app[data-has-files="false"] .add-col { align-items: center; }
.transfer-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #cfd2c8; background: #fff; color: var(--cool); font-size: 13px; font-weight: 650; white-space: nowrap; }
.transfer-trigger svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.transfer-trigger:hover { border-color: var(--action); color: var(--action); background: #f5f9ff; }
.sheet-app[data-printer-asleep] .transfer-trigger { display: none; }
.sort-files { width: auto !important; padding: 0 10px !important; font-size: 12.5px !important; font-weight: 650; white-space: nowrap; }
.move-file { width: 26px; height: 28px; border-radius: 7px; border: 0; background: transparent; color: #6b706b; font-size: 17px; line-height: 1; }
.move-file:hover:not(:disabled) { background: #f1f1ea; color: var(--ink); }
.move-file:disabled { opacity: .28; cursor: default; }
.file-sheet.is-dragging { opacity: .55; }
.file-sheet.is-dragover { border-color: var(--action); box-shadow: 0 0 0 2px #0066cc33; }
.status-pill { font-size: 12.5px; font-weight: 650; padding: 5px 10px; border-radius: 999px; background: var(--panel); color: var(--cool); white-space: nowrap; }
.status-pill.warn { background: var(--pf-warn-bg); color: #7c4a03; }
.option-check { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 12.5px; font-weight: 650; color: var(--cool); cursor: pointer; }
.option-check input { width: 16px; height: 16px; accent-color: var(--action); margin: 0; }
.remark-wrap, .submit-when-wrap { display: flex; flex-direction: column; }
.remark-wrap input, .submit-when-wrap select { margin-top: 5px; height: 40px; padding: 0 10px; border: 1px solid #cfd2c8; border-radius: 8px; background: #fff; font-size: 13px; min-width: 126px; }
.estimate-col { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 0; }
.quota-advice { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--pf-warn-bg); color: #6b3e00; font-size: 12px; }
.quota-advice button { min-height: 28px; padding: 0 9px; border-radius: 7px; border: 1px solid #d4b06a; background: #fff; color: #5c3500; font-size: 12px; font-weight: 650; }
.range-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.page-picker-open, .long-split-toggle { align-self: flex-start; min-height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid #cfd2c8; background: #fff; font-size: 12.5px; font-weight: 650; color: var(--action); }
.split-col-wrap { min-height: 28px; }
.proof-sheets { display: flex; gap: 14px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.proof-face { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1 1 240px; min-width: 0; }
.proof-face-label { font-size: 12px; font-weight: 700; color: var(--cool); }
.proof-flip-hint { font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--panel); color: var(--cool); white-space: nowrap; }
.proof-flip-hint:empty { display: none; }
#proof-canvas-back { display: block; width: 100%; height: auto; max-height: calc(100dvh - 150px); object-fit: contain; border: 0; }
.proof-back-empty { display: grid; place-items: center; width: 100%; aspect-ratio: 595.28 / 841.89; border: 1.5px dashed #c3c8bd; border-radius: 8px; background: #fafaf7; color: var(--cool); font-size: 14px; font-weight: 650; }
.proof-dialog[data-orientation="landscape"] .proof-back-empty { aspect-ratio: 841.89 / 595.28; }
.proof-dialog:has(#proof-back-wrap:not([hidden])) { max-width: min(94vw, 860px); }
.proof-dialog[data-orientation="landscape"]:has(#proof-back-wrap:not([hidden])) { max-width: min(94vw, 960px); }
.crop-filter-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; min-width: 0; max-width: 100%; }
.crop-filter-bar button { min-width: 0; max-width: 100%; min-height: 34px; padding: 0 6px; border-radius: 8px; border: 1px solid #cfd2c8; background: #fff; font-size: 12.5px; font-weight: 650; color: var(--cool); white-space: nowrap; }
.crop-filter-bar button[aria-pressed="true"] { border-color: var(--action); background: #e8f1fc; color: var(--action); }
.crop-warp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: center; margin-bottom: 2px; min-width: 0; max-width: 100%; }
.crop-warp-bar button[aria-pressed="true"] { background: #e8f1fc; border-radius: 8px; }
.crop-warp-error { font-size: 12px; color: var(--pf-danger); }
.picker-dialog, .page-picker-dialog, .transfer-dialog, .qr-scan-dialog { width: min(94vw, 560px); max-width: 94vw; }
.picker-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.picker-summary { font-size: 12.5px; color: var(--cool); margin-left: auto; font-family: var(--mono); }
.zip-list { display: flex; flex-direction: column; gap: 6px; max-height: 50dvh; overflow-y: auto; padding: 4px 0; }
.zip-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 10px; background: #fafaf7; font-size: 13px; cursor: pointer; }
.zip-row input { width: 17px; height: 17px; accent-color: var(--action); flex: none; }
.zip-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.zip-row-badge { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--pf-warn-bg); color: #7c4a03; }
.zip-row-size { font: 600 11.5px var(--mono); color: var(--cool); flex: none; }
.picker-error, .pp-status { font-size: 13px; color: var(--pf-danger); margin: 8px 0 0; }
.btn-primary { min-height: 40px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--action); color: #fff; font-weight: 650; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; max-height: 56dvh; overflow-y: auto; padding: 4px 2px; }
.pp-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border: 1.5px solid var(--rule); border-radius: 10px; background: #fff; cursor: pointer; }
.pp-tile[data-selected="true"] { border-color: var(--action); background: #eef5ff; }
.pp-tile canvas { width: 100%; height: auto; max-height: 136px; object-fit: contain; background: #fff; border: 1px solid #e5e5ea; border-radius: 4px; }
.pp-tile-num { font: 700 12px var(--mono); color: var(--cool); }
.pp-tile[data-selected="true"] .pp-tile-num { color: var(--action); }
.schedule-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.schedule-presets button { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #cfd2c8; background: #fff; font-size: 12.5px; font-weight: 650; }
.schedule-presets button[aria-pressed="true"] { border-color: var(--action); background: #e8f1fc; color: var(--action); }
.print-job-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.print-job-actions > button { flex: 1 1 auto; min-height: 36px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; color: var(--action); font-size: 12.5px; font-weight: 650; padding: 0 8px; }
.print-job-actions > button:disabled { opacity: .45; cursor: default; }
.print-job-remark-row { display: flex; align-items: center; gap: 6px; }
.print-job-remark-input { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid var(--rule); border-radius: 6px; font-size: 12px; background: #fafaf7; }
.transfer-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; padding: 3px; border-radius: 10px; background: var(--panel); }
.transfer-tabs button { min-height: 34px; border: 0; border-radius: 7px; background: transparent; font-size: 13px; font-weight: 650; color: var(--cool); }
.transfer-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px #0001; }
.transfer-qr { display: grid; place-items: center; padding: 10px; background: #fff; border: 1px solid var(--rule); border-radius: 12px; margin-bottom: 10px; }
.transfer-qr svg { width: 180px; height: 180px; display: block; }
.transfer-link-row { display: flex; justify-content: center; margin-bottom: 10px; }
.transfer-list { display: flex; flex-direction: column; gap: 6px; max-height: 32dvh; overflow-y: auto; }
.transfer-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 10px; font-size: 13px; }
.transfer-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.transfer-panel, .transfer-pick { min-width: 0; max-width: 100%; }
.transfer-pick { display: grid; gap: 8px; padding: 18px; border: 1.5px dashed #9aa597; border-radius: 12px; text-align: center; font-weight: 650; cursor: pointer; }
#transfer-push-file { width: 100%; max-width: 100%; min-width: 0; }
.qr-video { width: 100%; max-height: 220px; border-radius: 10px; background: #000; margin-bottom: 10px; object-fit: cover; }
.qr-file-label { display: inline-flex; align-items: center; cursor: pointer; }
.qr-manual-wrap, .qr-job-select-wrap label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.qr-manual-wrap input, .qr-job-select-wrap select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #cfd2c8; border-radius: 8px; background: #fff; }
.import-range-meta { font-size: 13px; color: var(--cool); margin-bottom: 10px; }
@media (max-width: 760px) {
  .account-area { justify-content: flex-start; }
  .rail-nav { flex-wrap: nowrap; gap: 4px; max-width: 100%; }
  .rail-nav button { width: 30px; height: 30px; }
  .rail-nav output { min-width: 34px; font-size: 12px; }
  .rail-nav #add-mini, #add-mini { font-size: 11.5px; height: 30px; padding: 0 8px; margin-right: 2px; }
  .sort-files { font-size: 11.5px !important; height: 30px; padding: 0 7px !important; }
  .move-file { width: 34px; height: 36px; }
  .page-picker-open, .long-split-toggle { min-height: 36px; }
  .print-job-remark-input { height: 36px; }
  .proof-head { flex-wrap: wrap; gap: 8px; }
  .proof-head > div { gap: 4px; }
  .estimate-col { grid-column: 1 / -1; align-items: flex-start; }
  .quota-advice { justify-content: flex-start; }
  .order-options .option-check, .remark-wrap, .submit-when-wrap { grid-column: 1 / -1; }
  .remark-wrap input, .submit-when-wrap select { min-width: 0; width: 100%; }
}
.sheet-app:is([data-printer-asleep], [data-mascot-asleep]) #printer-dock[data-mascot-live] :is(.printer-puppet, .mascot-eye) {
  animation: none;
  rotate: 0deg;
}
.sheet-app:is([data-printer-asleep], [data-mascot-asleep]) .mascot-pupil { opacity: 0; }
.sheet-app:is([data-printer-asleep], [data-mascot-asleep]) .mascot-eye::after {
  inset: 40% 4% 25%;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  border-bottom: clamp(1.5px, calc(var(--pm-size) * .011), 2.5px) solid #211a18;
  background: none;
  opacity: 1;
}
.sheet-app:is([data-printer-asleep], [data-mascot-asleep]) .mascot-mouth {
  left: 44%;
  top: 57%;
  width: 12%;
  height: 47%;
  border-radius: 50%;
  background: #211a18;
}
.sheet-app:is([data-printer-asleep], [data-mascot-asleep]) .mascot-cheek { opacity: .65; }
.sheet-app:is([data-printer-asleep], [data-mascot-asleep]) .mascot-sleep {
  display: flex;
  align-items: end;
  gap: .14em;
  position: absolute;
  top: -8%;
  right: 3%;
  color: #53727e;
  font: 750 calc(var(--pm-size) * .135)/1 var(--mono);
  pointer-events: none;
}
.mascot-sleep span:first-child { font-size: .55em; translate: 0 .5em; }
.mascot-sleep span:nth-child(2) { font-size: .73em; translate: 0 .22em; }
@media (prefers-reduced-motion: no-preference) {
  .sheet-app:is([data-printer-asleep], [data-mascot-asleep]) .mascot-mouth {
    animation: sleep-breathe 3.2s ease-in-out infinite;
  }
  @keyframes sleep-breathe {
    50% { scale: 1.1 1.2; }
  }
  .mascot-sleep span { animation: sleep-drift 3.2s ease-in-out infinite; }
  .mascot-sleep span:nth-child(2) { animation-delay: .24s; }
  .mascot-sleep span:nth-child(3) { animation-delay: .48s; }
  @keyframes sleep-drift {
    0%, 100% { transform: translateY(0); opacity: .68; }
    55% { transform: translateY(-.36em); opacity: 1; }
  }
}

.bench { border: 0; box-shadow: none; background: transparent; }
.sheet-app:not(:has(#tickets > .ticket)) .ticket-shelf { display: none; }
.sheet-app:not(:has(#tickets > .ticket,.print-job)) .station-layout { grid-template-columns: minmax(0,1fr); }
.sheet-app[data-has-files="false"]:not(:has(#tickets > .ticket,.print-job)) {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding-block: max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-bottom));
}
.sheet-app[data-has-files="false"]:not(:has(#tickets > .ticket,.print-job))
:is(.station-nav,.workspace-header,.format-guide,.printer-caption,.location-card) { display: none; }
.sheet-app[data-has-files="false"] .stage { min-height: 0; }
.sheet-app[data-has-files="false"] .adder { border: 0; background: #f5f5f7; }
.sheet-app[data-has-files="false"] .banner { align-self: center; }

/* Keep task buttons clickable as the printer animates back across the workbench. */
#print-jobs { z-index: 3; }
.print-job {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  display: grid;
  gap: 6px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 2px 8px #1d1d1f0d;
}
.print-job-main {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 70px;
  padding: 12px 40px 12px 12px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  background: #f4f4f5;
}
.print-job-main:not(:disabled):hover { background: #e8f1fc; }
.print-job-main:disabled { cursor: default; }
.print-job-main strong { font-size: 15px; }
.print-job-main span { color: var(--cool); font-size: 12px; }
.print-job-remove {
  position: absolute;
  inset: 8px 8px auto auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cool);
  font-size: 22px;
}
.print-job-remove:hover { background: #0000000b; }
.print-job-schedule {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--action);
  font-size: 13px;
  font-weight: 650;
}
.print-job-schedule:disabled { opacity: .5; }
.schedule-dialog { width: min(92vw, 360px); }
.schedule-dialog h2 { margin-bottom: 16px; font-size: 20px; }
.schedule-dialog label { display: grid; gap: 6px; font-size: 14px; }
.schedule-dialog input { width: 100%; min-height: 44px; padding: 8px; border: 1px solid #cfd2d7; border-radius: 8px; }
.schedule-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.schedule-actions button { min-height: 44px; }
#schedule-confirm { padding-inline: 14px; border: 0; border-radius: 8px; background: var(--action); color: #fff; font-weight: 650; }
#schedule-error { margin-top: 8px; color: var(--pf-danger); font-size: 13px; }
@media (max-width: 760px) {
  .print-job { width: min(210px, 76vw); }
}

/* Dark theme synchronized with site-theme.js (keeps paper preview canvas crisp white) */
html.theme-dark { color-scheme: dark; }
html.theme-dark .student {
  --ink: #eef2f8;
  --cool: #aab5c8;
  --action: #60a5fa;
  --canvas: #0d121c;
  --rule: #293449;
  --panel: #192234;
  --pf-bench: #121a28;
  --pf-bench-dot: rgba(121, 167, 255, .14);
  --pf-bench-line: #2f3d56;
  --pf-sage: #7ea392;
  --pf-sage-2: #95b8a8;
  --pf-ticket: #1a2333;
  --pf-ticket-ink: #eef2f8;
  --pf-ticket-muted: #94a2b8;
  --pf-danger: #f87171;
  --pf-danger-bg: rgba(239, 68, 68, .15);
  --pf-warn-bg: rgba(245, 158, 11, .16);
}
html.theme-dark .print-back { background: #141c29; border-color: #293449; color: #eef2f8; }
html.theme-dark .print-back:hover { background: #1e2a3d; }
html.theme-dark .banner { color: #fecaca; border-color: rgba(248, 113, 113, .38); }
html.theme-dark .banner-text strong { color: #fee2e2; }
html.theme-dark .adder-plus { background: #2563eb; }
html.theme-dark .adder-plus::before,
html.theme-dark .adder-plus::after { background: #ffffff; }
html.theme-dark .sheet-app[data-has-files="true"] .adder { background: #2563eb; border-color: #2563eb; color: #ffffff; }
html.theme-dark .sheet-app[data-has-files="true"] .adder:hover,
html.theme-dark .sheet-app[data-has-files="true"] .adder:focus-visible { background: #1d4ed8; }
html.theme-dark .sheet-app[data-has-files="true"] .adder-plus { background: #ffffff; }
html.theme-dark .sheet-app[data-has-files="true"] .adder-plus::before,
html.theme-dark .sheet-app[data-has-files="true"] .adder-plus::after { background: #1d4ed8; }
html.theme-dark .btn-ghost,
html.theme-dark .rail-nav button,
html.theme-dark .crop-toggle,
html.theme-dark .proof-head button:not(.btn-ghost),
html.theme-dark .print-job-schedule { background: #192234; border-color: #2f3d56; color: #eef2f8; }
html.theme-dark .rail-nav #add-mini { background: #2563eb; color: #ffffff; }
html.theme-dark .sheet-app[data-has-files="false"] .adder { background: #141c29; border: 1px dashed #2f3d56; }
html.theme-dark .adder:hover,
html.theme-dark .adder:focus-visible,
html.theme-dark .stage.is-dragover .adder { background: #1a2639; border-color: #60a5fa; }
html.theme-dark .sheet-app[data-printer-asleep] #add-file {
  background: var(--panel);
  border-color: var(--pf-bench-line);
  color: var(--cool);
}
html.theme-dark .sheet-app[data-has-files="true"] .adder-plus { background: #1e2a3d; }
html.theme-dark .stage.is-dragover .drop-ghost { background: #1d2d48; }
html.theme-dark .file-sheet,
html.theme-dark .bench-footer,
html.theme-dark .proof-mini,
html.theme-dark .notice:not(:empty),
html.theme-dark .schedule-dialog,
html.theme-dark dialog,
html.theme-dark .card-crop[open],
html.theme-dark .print-job { background: #141c29; border-color: #293449; color: #eef2f8; }
html.theme-dark .print-job { box-shadow: none; }
html.theme-dark .crop-head .text-action.strong,
html.theme-dark .btn-primary,
html.theme-dark #send { background: #2563eb; color: #ffffff; }
html.theme-dark #send:disabled { background: #334155; color: #94a3b8; }
html.theme-dark .crop-warp-bar button[aria-pressed="true"] { background: rgba(96, 165, 250, .18); color: #60a5fa; }
html.theme-dark .thumb-stage { background: #1a2333; }
html.theme-dark .thumb-stage canvas { background: #ffffff; }
html.theme-dark .rotate-file,
html.theme-dark .remove-file,
html.theme-dark .move-file,
html.theme-dark .print-job-remove { color: #94a2b8; }
html.theme-dark .rotate-file:hover,
html.theme-dark .move-file:hover:not(:disabled),
html.theme-dark .print-job-remove:hover { background: #263146; color: #eef2f8; }
html.theme-dark .rotate-file[data-rotated="true"] { background: rgba(96, 165, 250, .18); color: #60a5fa; }
html.theme-dark .remove-file:hover { background: #263146; }
html.theme-dark .orientation-toggle { background: #0f1623; border-color: #2f3d56; }
html.theme-dark .orientation-toggle button { color: #aab5c8; }
html.theme-dark .orientation-toggle button[aria-checked="true"] { background: #22304a; color: #eef2f8; box-shadow: 0 1px 2px #0000004d; }
html.theme-dark .proof-mini canvas { border-color: #2f3d56; }
html.theme-dark .printer-where { background: #192234; border-color: #2f3d56; color: #aab5c8; }
html.theme-dark .printer-where:hover { border-color: #60a5fa; color: #60a5fa; background: #1e2d45; }
html.theme-dark .location-card { background: #141c29; border-color: #293449; }
html.theme-dark .slip-empty { border-color: #2f3d56; color: #94a2b8; }
html.theme-dark .slip-how { border-top-color: #293449; }
html.theme-dark .range-wrap input,
html.theme-dark .coordinates input,
html.theme-dark .order-options select,
html.theme-dark .schedule-dialog input,
html.theme-dark .remark-wrap input,
html.theme-dark .submit-when-wrap select,
html.theme-dark .qr-manual-wrap input,
html.theme-dark .qr-job-select-wrap select,
html.theme-dark .print-job-remark-input { background: #0f1623; border-color: #2f3d56; color: #eef2f8; }
html.theme-dark .print-job-main { background: #192234; color: #eef2f8; }
html.theme-dark .print-job-main:not(:disabled):hover { background: #202f49; }
html.theme-dark #schedule-confirm { background: #2563eb; color: #ffffff; }
html.theme-dark .transfer-trigger,
html.theme-dark .page-picker-open,
html.theme-dark .long-split-toggle,
html.theme-dark .crop-filter-bar button,
html.theme-dark .schedule-presets button,
html.theme-dark .print-job-actions > button { background: #192234; border-color: #2f3d56; color: #eef2f8; }
html.theme-dark .crop-filter-bar button[aria-pressed="true"],
html.theme-dark .schedule-presets button[aria-pressed="true"] { background: rgba(96, 165, 250, .18); border-color: #60a5fa; color: #60a5fa; }
html.theme-dark .zip-row,
html.theme-dark .pp-tile,
html.theme-dark .transfer-item,
html.theme-dark .proof-back-empty { background: #192234; border-color: #2f3d56; color: #eef2f8; }
html.theme-dark .pp-tile[data-selected="true"] { background: rgba(96, 165, 250, .16); border-color: #60a5fa; }
html.theme-dark .transfer-tabs button[aria-selected="true"] { background: #22304a; color: #eef2f8; }
html.theme-dark .quota-advice { background: var(--pf-warn-bg); color: #fde68a; }
html.theme-dark .quota-advice button { background: #192234; border-color: #92400e; color: #fde68a; }
html.theme-dark .status-pill.warn,
html.theme-dark .zip-row-badge { color: #fde68a; }
html.theme-dark .file-meta,
html.theme-dark .range-wrap span { color: #94a2b8; }
html.theme-dark .file-error { color: #fecaca; }
html.theme-dark .file-sheet[data-status="error"] { border-color: rgba(248, 113, 113, .45); }
html.theme-dark .file-sheet[data-status="error"] .thumb-stage { background: repeating-linear-gradient(-45deg, #251b26 0 10px, #2d1f2b 10px 20px); }
