    :root {
      color-scheme: light;
      --paper: #ffffff;
      --desk: #fcf8f5;
      --row-alt: var(--desk);
      --row-hover: #fff3fa;
      --ink: #171717;
      --muted: #5f5f5f;
      --rule: #d8d8d8;
      --control: #767676;
      --pink: #ec008c;
      --green: #137333;
      --red: #a02923;
      --radius: 6px;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
      font-size: 16px;
    }
    * { box-sizing: border-box; }
    body { margin: 0; background: var(--desk); color: var(--ink); }
    [hidden] { display: none !important; }
    .sheet {
      max-width: 1120px;
      margin: 34px auto;
      width: calc(100% - 48px);
      background: var(--paper);
      border: 1px solid var(--rule);
      border-radius: 12px;
      overflow: clip;
    }
    .top { padding: 23px 34px 21px; }
    .brand { display: block; width: 138px; height: auto; margin-bottom: 13px; }
    .heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
    .order-identity { min-width: 0; }
    h1 { margin: 0; font-size: 34px; line-height: 1.18; letter-spacing: -.025em; font-weight: 670; }
    .customer-name { margin: 5px 0 0; color: var(--ink); font-size: 24px; line-height: 1.3; font-weight: 750; overflow-wrap: anywhere; }
    .order-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; margin: 9px 0 0; color: var(--muted); font-size: 13px; }
    .delivery { border-radius: var(--radius); background: var(--row-alt); color: var(--ink); padding: 4px 8px; }
    .packer { min-width: 184px; }
    label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 14px; font-weight: 650; }
    input, select, button {
      border: 1px solid var(--control);
      border-radius: var(--radius);
      color: var(--ink);
      background: var(--paper);
      min-width: 0;
      min-height: 44px;
      padding: 0 12px;
      font: inherit;
    }
    input::placeholder { color: var(--muted); }
    input:focus, select:focus, button:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
    select { width: 100%; }
    button { font-weight: 650; cursor: pointer; white-space: nowrap; }
    button:hover { background: var(--desk); }
    .primary { color: var(--paper); background: var(--ink); border-color: var(--ink); }
    .primary:hover { background: #353535; }
    button:disabled {
      color: #606060;
      border-color: var(--rule);
      background: var(--desk);
      cursor: default;
    }
    .entry { padding: 17px 34px; background: var(--paper); border-block: 1px solid var(--rule); }
    .box-controls, .box-switcher, .box-options { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
    .box-controls { margin-bottom: 9px; gap: 6px 12px; }
    .package-field { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .package-field label { margin: 0; white-space: nowrap; }
    .package-field select { width: 166px; font-size: 14px; }
    .box-switcher { flex-basis: 100%; margin-bottom: 4px; }
    .box-label { margin-right: 4px; font-size: 14px; font-weight: 650; }
    .carton-mark { flex-basis: 100%; margin: 3px 0 0; color: var(--muted); font-size: 13px; }
    .carton-mark strong { color: var(--ink); }
    #add-box { margin-left: auto; }
    .box-controls button, .entry-actions .quiet { font-size: 14px; }
    .box-options button { min-width: 44px; }
    .box-options button[aria-pressed="true"] { color: var(--paper); background: var(--ink); border-color: var(--ink); }
    .entry .primary:not(:disabled) {
      background: var(--pink); border-color: var(--pink); color: var(--paper); font-size: 19px; font-weight: 700;
    }
    .entry .primary:not(:disabled):hover { color: var(--pink); background: var(--paper); }
    .fields {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(80px, 106px) auto;
      gap: 10px;
      align-items: end;
      max-width: 720px;
    }
    .fields input { width: 100%; }
    .entry-actions { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 5px; }
    #quantity { font-variant-numeric: tabular-nums; }
    .message { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
    .message.error { color: var(--red); font-weight: 600; }
    .message.accepted { color: var(--green); font-weight: 650; }
    #scan-sound[aria-pressed="true"] { color: var(--green); }
    table { width: 100%; table-layout: fixed; border-collapse: collapse; line-height: 1.36; }
    .item-col { width: 57%; }
    .sku-col { width: 14%; }
    .quantity-col { width: 12%; }
    .checked-col { width: 17%; }
    thead { color: var(--paper); background: var(--ink); }
    th { font-size: 13px; font-weight: 650; text-align: left; padding: 12px 12px; }
    td { padding: 13px 12px; }
    th:first-child, td:first-child { padding-left: 34px; }
    th:last-child, td:last-child { padding-right: 34px; }
    thead tr, tbody tr { border-bottom: 1px solid var(--rule); }
    tbody tr:nth-child(even) { background: var(--row-alt); }
    tbody tr:hover { background: var(--row-hover); }
    tbody tr:last-child { border-bottom: 0; }
    .item { display: flex; align-items: center; gap: 15px; }
    .photo {
      display: block; flex: 0 0 auto; width: 64px; height: 64px; object-fit: contain;
      border: 1px solid #e5e5e5; border-radius: var(--radius); background: var(--paper);
    }
    .identity { min-width: 0; }
    .identity strong { display: block; font-weight: 650; overflow-wrap: anywhere; }
    .variant, .mobile-meta { color: var(--muted); font-size: 13px; }
    .mobile-meta { display: none; margin-top: 4px; }
    .sku, .order-qty, .checked { font-variant-numeric: tabular-nums; }
    .order-qty, .checked { text-align: right; }
    td.sku { color: var(--muted); }
    .count { display: block; font-size: 17px; font-weight: 650; white-space: nowrap; }
    .box-count { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; white-space: nowrap; }
    .verified {
      display: flex; justify-content: end; align-items: center; gap: 5px;
      color: var(--green); margin-top: 4px; font-size: 13px; font-weight: 650; white-space: nowrap;
    }
    .verified svg { width: 22px; height: 22px; flex: 0 0 auto; }
    .footer {
      display: flex; justify-content: space-between; align-items: center; gap: 16px;
      border-top: 1px solid var(--rule); padding: 16px 34px; background: var(--paper);
    }
    .summary {
      margin: 0; min-width: 0; padding: 7px 11px; border-radius: var(--radius);
      background: var(--paper); border: 1px solid var(--pink); font-weight: 650;
    }
    .summary.complete { display: flex; align-items: center; gap: 7px; color: var(--green); background: #f2fbf5; border-color: var(--green); }
    .summary.complete svg { width: 22px; height: 22px; flex: 0 0 auto; }
    .summary.skipped { color: var(--muted); background: var(--desk); border-color: var(--rule); }
    .actions { display: flex; align-items: center; justify-content: end; gap: 8px; }
    .quiet { border-color: transparent; }
    dialog { max-width: min(410px, calc(100% - 32px)); border: 1px solid var(--rule); border-radius: 10px; padding: 22px; color: var(--ink); }
    dialog::backdrop { background: #20202050; }
    dialog h2 { font-size: 21px; margin: 0; }
    dialog p { color: var(--muted); line-height: 1.45; margin: 10px 0 18px; }
    #package-review { width: min(710px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); }
    #package-review h2 { font-size: 24px; }
    #package-review > .review-note { margin: 6px 0 8px; }
    #package-review > .review-totals { margin: 0 0 16px; color: var(--green); font-weight: 650; }
    .review-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 268px), 1fr)); gap: 12px; margin-bottom: 16px; }
    .review-box { min-width: 0; border: 1px solid var(--rule); border-radius: var(--radius); overflow: clip; }
    .review-box header { padding: 12px 13px; background: var(--row-alt); }
    .review-box h3 { margin: 0; font-size: 16px; }
    .review-box header p { margin: 3px 0 0; font-size: 13px; }
    .review-box ul { margin: 0; padding: 0; list-style: none; }
    .review-box li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 8px 12px; border-top: 1px solid var(--rule); }
    .review-box li div { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
    .review-box li small { display: block; margin-top: 3px; color: var(--muted); }
    .review-box li button { min-width: 65px; font-size: 13px; }
    .review-actions { flex-wrap: wrap; }
    .move-form { margin-bottom: 16px; padding: 12px; background: var(--row-alt); border-radius: var(--radius); }
    .move-form .fields { grid-template-columns: minmax(70px, 94px) minmax(120px, 1fr) auto; }
    .move-form p { margin: 0 0 12px; font-size: 14px; }
    @media (max-width: 800px) {
      .item-col { width: 50%; }
      .sku-col { width: 15%; }
      .quantity-col { width: 15%; }
      .checked-col { width: 20%; }
      .top { padding-inline: 24px; }
      .entry, .footer { padding-inline: 24px; }
      th:first-child, td:first-child { padding-left: 24px; }
      th:last-child, td:last-child { padding-right: 24px; }
    }
    @media (max-width: 560px) {
      .sheet { width: calc(100% - 24px); margin: 12px auto; }
      .top { padding: 17px 15px; }
      .brand { width: 120px; margin-bottom: 11px; }
      .heading { align-items: start; flex-direction: column; gap: 13px; }
      .packer { min-width: 0; width: 100%; max-width: 240px; }
      h1 { font-size: 26px; }
      .customer-name { font-size: 21px; }
      .entry { padding: 13px 15px; }
      .package-field { gap: 6px; flex: 1 1 154px; }
      .package-field select { width: 116px; padding-inline: 7px; }
      #add-box { padding-inline: 6px; font-size: 13px; }
      .fields { grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; }
      .entry-actions { grid-column: 1 / -1; }
      .sku-col, .quantity-col, .sku, .order-qty { display: none; }
      .item-col { width: 69%; }
      .checked-col { width: 31%; }
      .mobile-meta { display: block; }
      .photo { width: 49px; height: 49px; }
      .item { gap: 8px; }
      td, th { padding-inline: 6px; }
      th:first-child, td:first-child { padding-left: 15px; }
      th:last-child, td:last-child { padding-right: 15px; }
      .identity strong { font-size: 14px; }
      .count { font-size: 15px; }
      .footer { padding: 14px 15px; align-items: start; flex-direction: column; gap: 9px; }
      .footer .actions { align-self: end; }
      #package-review { padding: 17px; }
      .move-form .fields { grid-template-columns: 76px minmax(0, 1fr); }
      .move-form .fields > button { grid-column: 1 / -1; justify-self: end; }
    }

    :root { --row-hover: #fcf8f1; }
    .workspace { width: min(1250px, calc(100% - 48px)); margin: 0 auto 30px; }
    .workspace .sheet { width: 100%; max-width: none; margin: 0; }
    .appbar { min-height: 79px; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
    .appbar .brand { width: 106px; margin: 0; }
    .app-name { font-weight: 700; margin: 0; }
    .appbar nav { display: flex; gap: 6px; margin-left: auto; }
    .appbar nav button { border-color: transparent; background: transparent; }
    .appbar nav button[aria-pressed=true] { border-color: var(--ink); color: white; background: var(--ink); }
    .notice { padding: 11px 15px; background: white; border: 1px solid var(--rule); border-radius: var(--radius); margin: 0 0 12px; }
    .notice.error { color: var(--red); }
    .order-links { display: flex; justify-content: flex-end; margin-bottom: 8px; }
    a, a:visited { color: var(--ink); text-underline-offset: 3px; }
    a:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
    #shipment-control { margin-top: 16px; max-width: 440px; }
    .package-field select { width: min(100%, 260px); }
    .dimension-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .dimension-field label { margin: 0; }
    .dimension-field input { width: min(260px, 100%); }
    .entry .primary:not(:disabled) { color: var(--ink); font-size: 16px; }
    .entry .primary:not(:disabled):hover { color: var(--ink); background: #ffecf7; }
    #reason { width: 100%; }
    .spaced { margin-top: 12px; }
    #scan-match select { width: min(100%, 370px); margin: 0 8px 7px 0; }
    .search { max-width: 480px; margin-top: 20px; }
    .search > div { display: flex; gap: 8px; }
    .search input { width: 100%; }
    .orders { margin: 0; padding: 0; list-style: none; }
    .orders li { border-top: 1px solid var(--rule); }
    .orders button { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .9fr); gap: 12px; align-items: center; background: white; text-align: left; border: 0; border-radius: 0; width: 100%; padding: 13px 34px; white-space: normal; font-weight: 400; }
    .orders li:nth-child(even) button { background: var(--desk); }
    .orders button:hover { background: var(--row-hover); }
    .orders button:focus-visible { outline-offset: -3px; }
    .row-customer, .list-status small { display: block; margin-top: 4px; }
    .list-detail, .list-status small, .row-customer { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
    .list-status { font-weight: 650; }
    .empty { padding: 20px 34px; color: var(--muted); }
    .record { border-top: 1px solid var(--rule); padding: 17px 34px; }
    .record h2 { font-size: 21px; margin: 0; }
    .record > p { color: var(--muted); margin: 7px 0 14px; }
    .record details { border-top: 1px solid var(--rule); padding: 9px 0; }
    .record summary { cursor: pointer; }
    .tracking { border-top: 1px solid var(--rule); padding: 10px 12px; }
    .tracking button { margin-top: 7px; }
    .actions { flex-wrap: wrap; }
    .box-count, .verified { white-space: normal; }
    @media (max-width: 560px) {
      .workspace { width: calc(100% - 20px); margin-bottom: 16px; }
      .appbar { min-height: 65px; gap: 5px; }
      .appbar .brand { width: 74px; }
      .app-name { font-size: 13px; }
      .appbar nav { gap: 0; }
      .appbar nav button { padding-inline: 7px; font-size: 13px; }
      .package-field select { width: 137px; }
      .orders button { grid-template-columns: 1fr 1fr; padding: 12px 15px; gap: 4px 9px; }
      .list-detail { grid-column: 1; }
      .list-status { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
      .record, .empty { padding-inline: 15px; }
    }
