/* Store Ops 2.0: fulfil styles (Scan Order and Print Shipping Label pages).
   Loaded after admin.css and base.css. The shell draws the panel; these rules
   lay out what is inside each page's <main> on computers. Phones keep their
   own rules (admin.css and phone.css) until the phone pass. */

/* The scan count is drawn as two parts; phones show it as one plain text. */
.admin-scan-head [data-scan-progress] { gap: 0; }
.admin-scan-head [data-scan-progress] > :is(b, small) {
  color: inherit;
  font: inherit;
}

/* New pieces that only the computer layout shows. */
.admin-scan-progress-bar,
.admin-scan-order-meta,
.admin-scan-complete {
  display: none;
}

/* Pieces that only phones show: the task screen's close button, the camera
   frame, and the phone wording of the scan page's last step. */
.admin-task-close,
.admin-phone-camera-frame,
.admin-phone-camera-done,
.admin-scan-complete-phone,
.admin-remote-print-dial > svg,
.admin-remote-print-head {
  display: none;
}

@keyframes fulfil-in {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes fulfil-in-b {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes fulfil-shake-a {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}
@keyframes fulfil-shake-b {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}
@keyframes fulfil-alert {
  0%, 100% { border-color: color-mix(in srgb, var(--so-red) 35%, transparent); }
  50% { border-color: var(--so-red); }
}

/* ======================= Scan Order ======================= */

/* The old card (an .admin-panel) becomes a plain centred column on the panel. */
html[data-device="computer"] .admin-panel.admin-scan-page-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: none;
  align-content: start;
  justify-self: center;
  gap: 18px 0;
  box-sizing: border-box;
  width: min(744px, 100%);
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 26px 12px 8px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transform: none;
}
/* admin.css lifts every .admin-panel on hover; this one is not a card any more. */
html[data-device="computer"] .admin-panel:is(.admin-scan-page-card, .admin-print-page-card):hover { transform: none; }
html[data-device="computer"] .admin-scan-page-card > * {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
}

/* The camera's Try again button is for phones only. */
html[data-device="computer"] .admin-scan-page-card > [data-phone-camera-retry] { display: none; }

/* Visual order: head, bar, sold-out warning, phone scanner, status line,
   error, products. The sync note sits at the right end of the status line. */
html[data-device="computer"] .admin-scan-page-card > .admin-scan-head { order: 0; }
html[data-device="computer"] .admin-scan-page-card > .admin-scan-progress-bar { order: 1; margin-top: -8px; }
html[data-device="computer"] .admin-scan-page-card > .admin-phone-camera { order: 2; }
html[data-device="computer"] .admin-scan-page-card > .admin-scan-stock-alert { order: 3; }
html[data-device="computer"] .admin-scan-page-card > .admin-mobile-scanner-live-row { order: 4; }
html[data-device="computer"] .admin-scan-page-card > .admin-scanner-status-card { order: 5; grid-column: 1; }
html[data-device="computer"] .admin-scan-page-card > [data-sync-status] { order: 5; grid-column: 2; }
html[data-device="computer"] .admin-scan-page-card > [data-scan-error] { order: 6; margin-top: -8px; }
html[data-device="computer"] .admin-scan-page-card > .admin-scan-list { order: 7; }
html[data-device="computer"] .admin-scan-page-card > .admin-scan-complete { order: 8; }

/* Head: the order ID with its shop and size, the big count on the right. */
html[data-device="computer"] .admin-scan-page-card .admin-scan-head {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
html[data-device="computer"] .admin-scan-page-card .admin-scan-head > div {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}
html[data-device="computer"] .admin-scan-page-card .admin-scan-head h3 { display: none; }
html[data-device="computer"] .admin-scan-page-card [data-scan-order-id] {
  overflow-wrap: anywhere;
  color: var(--so-ink);
  font-family: var(--so-mono);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-transform: none;
}
html[data-device="computer"] .admin-scan-order-meta {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  color: var(--so-ink2);
  font-size: 13px;
  line-height: 1.4;
}
html[data-device="computer"] .admin-scan-order-meta:empty { display: none; }
html[data-device="computer"] .admin-scan-order-meta > span + span::before {
  content: '\00b7';
  padding: 0 0.42em;
}
html[data-device="computer"] .admin-scan-page-card [data-scan-progress] {
  display: inline-flex;
  flex: none;
  align-items: baseline;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--so-ink);
  font-family: var(--so-mono);
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
html[data-device="computer"] .admin-scan-page-card [data-scan-progress] b {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
html[data-device="computer"] .admin-scan-page-card [data-scan-progress] small {
  color: var(--so-ink3);
  font-size: 16px;
  font-weight: 500;
}
html[data-device="computer"] .admin-scan-progress-bar {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--so-line);
}
html[data-device="computer"] .admin-scan-progress-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--so-ink);
  transition: width 0.6s var(--so-ease), background-color 0.4s;
}
html[data-device="computer"] .admin-scan-progress-bar i.is-complete { background: var(--so-mint); }

/* No order: no count or bar, and the message in plain type. */
html[data-device="computer"] .admin-scan-page-card:has(.admin-board-empty) :is(.admin-scan-progress-bar, [data-scan-progress]) { display: none; }
html[data-device="computer"] .admin-scan-page-card:has(.admin-board-empty) [data-scan-order-id] { font-family: var(--so-font); }

/* Status line: a dot in the result's colour, the title, then the detail. */
html[data-device="computer"] .admin-scan-page-card .admin-scanner-status-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 9px 2px;
  border: 0;
  border-top: 1px solid var(--so-line);
  border-bottom: 1px solid var(--so-line);
  border-radius: 0;
  background: none;
}
html[data-device="computer"] .admin-scan-page-card .admin-scanner-status-card::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--so-ink3);
  transition: background-color 0.3s;
}
html[data-device="computer"] .admin-scan-page-card .admin-scanner-status-card:has(> .is-ok)::before { background: var(--so-mint); }
html[data-device="computer"] .admin-scan-page-card .admin-scanner-status-card:has(> .is-error)::before { background: var(--so-red); }
html[data-device="computer"] .admin-scan-page-card [data-scan-status] {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  min-width: 0;
}
html[data-device="computer"] .admin-scan-page-card [data-scan-status] > * {
  animation: fulfil-in 0.35s var(--so-ease) both;
}
html[data-device="computer"] .admin-scan-page-card [data-scan-status] strong {
  color: var(--so-ink);
  font-family: var(--so-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
html[data-device="computer"] .admin-scan-page-card [data-scan-status].is-error strong { color: var(--so-red); }
html[data-device="computer"] .admin-scan-page-card [data-scan-status] span {
  min-width: 0;
  color: var(--so-ink2);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}
html[data-device="computer"] .admin-scan-page-card [data-scan-status] span:empty { display: none; }
html[data-device="computer"] .admin-scan-page-card > [data-sync-status] {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 2px 0 14px;
  border: 0;
  border-top: 1px solid var(--so-line);
  border-bottom: 1px solid var(--so-line);
  border-radius: 0;
  background: none;
  color: var(--so-amber);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
html[data-device="computer"] .admin-scan-page-card > [data-sync-status].is-error { color: var(--so-red); }
html[data-device="computer"] .admin-scan-page-card > [data-sync-status][hidden] { display: none; }

html[data-device="computer"] .admin-scan-page-card > [data-scan-error] {
  color: var(--so-red);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  animation: fulfil-shake-a 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
html[data-device="computer"] .admin-scan-page-card > [data-scan-error].is-again {
  animation-name: fulfil-shake-b;
}

/* Sold out: a red outline that breathes, never a red fill. */
html[data-device="computer"] .admin-scan-page-card .admin-scan-stock-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--so-red);
  border-radius: 18px;
  background: var(--so-panel);
  color: var(--so-ink);
  box-shadow: none;
  animation: fulfil-alert 1.6s ease-in-out infinite;
}
html[data-device="computer"] .admin-scan-page-card .admin-scan-stock-alert[hidden] { display: none; }
html[data-device="computer"] .admin-scan-page-card .admin-scan-stock-alert-icon {
  flex: none;
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  border: 1.5px solid var(--so-red);
  border-radius: 50%;
  background: none;
  color: var(--so-red);
  font-family: var(--so-font);
  font-size: 15px;
  font-weight: 700;
}
html[data-device="computer"] .admin-scan-page-card .admin-scan-stock-alert > div {
  display: grid;
  flex: 1 1 280px;
  gap: 1px;
  min-width: 0;
}
html[data-device="computer"] .admin-scan-page-card .admin-scan-stock-alert strong {
  color: var(--so-red);
  font-family: var(--so-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
html[data-device="computer"] .admin-scan-page-card .admin-scan-stock-alert p {
  color: var(--so-ink);
  font-size: 13px;
  font-weight: 400;
}
html[data-device="computer"] .admin-scan-page-card .admin-scan-stock-alert b {
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 600;
}
html[data-device="computer"] .admin-scan-page-card .admin-scan-stock-alert button {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--so-red);
  border-radius: 999px;
  background: transparent;
  color: var(--so-red);
  font-family: var(--so-font);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.35s var(--so-ease), background-color 0.25s;
}
html[data-device="computer"] .admin-scan-page-card .admin-scan-stock-alert button:hover { transform: translateY(-1px); }
html[data-device="computer"] .admin-scan-page-card .admin-scan-stock-alert button:active { transform: scale(0.97); transition-duration: 0.08s; }
html[data-device="computer"] .admin-scan-page-card .admin-scan-stock-alert button:focus-visible { outline: 2px solid var(--so-ink2); outline-offset: 2px; }

/* Phone scanner relay: a status with a dot, and the switch back to USB. */
html[data-device="computer"] .admin-scan-page-card .admin-mobile-scanner-live-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
}
html[data-device="computer"] .admin-scan-page-card .admin-mobile-scanner-live-row[hidden] { display: none; }
html[data-device="computer"] .admin-scan-page-card .admin-mobile-scanner-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--so-mint);
  font-size: 13px;
  font-weight: 600;
}
html[data-device="computer"] .admin-scan-page-card .admin-mobile-scanner-live::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
html[data-device="computer"] .admin-scan-page-card .admin-mobile-scanner-live.is-waiting { color: var(--so-ink2); }
html[data-device="computer"] .admin-scan-page-card .admin-mobile-scanner-live.is-waiting::before { animation: so-breathe 1.2s ease-in-out infinite; }
html[data-device="computer"] .admin-scan-page-card .admin-mobile-scanner-live.is-error { color: var(--so-red); }
html[data-device="computer"] .admin-scan-page-card .admin-mobile-scanner-live-row .admin-ghost-btn {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  background: transparent;
  color: var(--so-ink);
  font-size: 12.5px;
  font-weight: 500;
}

/* Products. */
html[data-device="computer"] .admin-scan-page-card .admin-scan-list {
  display: block;
}
html[data-device="computer"] .admin-scan-page-card .admin-scan-list > .admin-board-empty {
  display: block;
  min-height: 0;
  padding: 40px 16px;
  border: 1px dashed var(--so-line2);
  border-radius: 18px;
  background: none;
  color: var(--so-ink3);
  font-size: 13.5px;
  text-align: center;
}

/* Scan complete: the label page opens by itself; the link is for a slow tab. */
html[data-device="computer"] .admin-scan-complete:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: so-rise 0.6s var(--so-ease) 0.5s both;
}
html[data-device="computer"] .admin-scan-complete-spinner {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--so-ink2);
  stroke-width: 2.4;
  stroke-linecap: round;
  animation: so-spin 0.9s linear infinite;
}
html[data-device="computer"] .admin-scan-complete > span {
  flex: 1;
  color: var(--so-ink2);
  font-size: 13px;
}
html[data-device="computer"] .admin-scan-complete-link {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--so-ink);
  color: var(--so-panel);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.35s var(--so-ease);
}
html[data-device="computer"] .admin-scan-complete-link:hover { transform: translateY(-1px); color: var(--so-panel); }
html[data-device="computer"] .admin-scan-complete-link:active { transform: scale(0.97); transition-duration: 0.08s; }
html[data-device="computer"] .admin-scan-complete-link svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =================== Print Shipping Label ===================
   Left: the order, its status, the big red Print button and what follows a
   print. Right: the label itself. Screen only; admin.css owns the printout. */

.admin-label-loading,
.admin-label-print-done-icon,
.admin-label-print-spinner {
  display: none;
}

@keyframes fulfil-worm {
  0%, 100% { transform: scale(0.55); opacity: 0.35; }
  50% { transform: none; opacity: 1; }
}

@media screen {
  html[data-device="computer"] .admin-print-page-layout {
    container-type: inline-size;
  }
  html[data-device="computer"] .admin-panel.admin-print-page-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 16px;
    box-sizing: border-box;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 8px 12px 6px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    transform: none;
  }
  html[data-device="computer"] .admin-print-page-card > * {
    min-width: 0;
    margin: 0;
  }
  @container (min-width: 880px) {
    html[data-device="computer"] .admin-panel.admin-print-page-card {
      grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
      grid-template-rows: repeat(6, auto) 1fr;
      column-gap: 28px;
    }
    html[data-device="computer"] .admin-print-page-card > * { grid-column: 1; }
    html[data-device="computer"] .admin-print-page-card > .admin-label-preview {
      grid-column: 2;
      grid-row: 1 / -1;
    }
  }

  /* Head: order ID and the status pill. */
  html[data-device="computer"] .admin-print-page-card .admin-scan-head {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    min-height: 34px;
    animation: so-rise 0.55s var(--so-ease) backwards;
  }
  html[data-device="computer"] .admin-print-page-card .admin-scan-head h3 { display: none; }
  html[data-device="computer"] .admin-print-page-card [data-print-order-id] {
    color: var(--so-ink);
    font-family: var(--so-mono);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-transform: none;
  }
  /* No order: the heading already says so, the pill would only repeat it. */
  html[data-device="computer"] .admin-print-label-page.is-order-missing [data-print-order-id] { font-family: var(--so-font); }
  html[data-device="computer"] .admin-print-label-page.is-order-missing .admin-print-status { display: none; }
  html[data-device="computer"] .admin-print-page-card .admin-print-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--so-line2);
    border-radius: 999px;
    background: none;
    color: var(--so-ink);
    font-family: var(--so-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.3s;
  }
  html[data-device="computer"] .admin-print-page-card .admin-print-status::before {
    content: '';
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--so-ink3);
    animation: so-breathe 1.2s ease-in-out infinite;
    transition: background-color 0.3s;
  }
  html[data-device="computer"] .admin-print-page-card [data-print-status] { display: inline-block; animation: fulfil-in 0.35s var(--so-ease) both; }
  html[data-device="computer"] .admin-print-page-card [data-print-status].is-again { animation-name: fulfil-in-b; }
  html[data-device="computer"] [data-print-tone="ready"] .admin-print-status::before { background: var(--so-ink); animation: none; }
  html[data-device="computer"] [data-print-tone="ok"] .admin-print-status { color: var(--so-mint); }
  html[data-device="computer"] [data-print-tone="ok"] .admin-print-status::before { background: var(--so-mint); animation: none; }
  html[data-device="computer"] [data-print-tone="warn"] .admin-print-status { color: var(--so-amber); }
  html[data-device="computer"] [data-print-tone="warn"] .admin-print-status::before { background: var(--so-amber); animation: none; }
  html[data-device="computer"] [data-print-tone="error"] .admin-print-status { color: var(--so-red); }
  html[data-device="computer"] [data-print-tone="error"] .admin-print-status::before { background: var(--so-red); animation: none; }

  /* Errors and notes. While the confirmation is open its own error shows instead. */
  html[data-device="computer"] .admin-print-page-card :is([data-print-error], [data-print-confirmation-error]) {
    color: var(--so-red);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    animation: fulfil-shake-a 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  }
  html[data-device="computer"] .admin-print-page-card:has(> [data-print-confirmation]:not([hidden])) > [data-print-error] { display: none; }
  /* After a confirmed print the only note left is a calm one (the tab could not close itself). */
  html[data-device="computer"] [data-print-tone="ok"] .admin-print-page-card > [data-print-confirmation] { display: none; }
  html[data-device="computer"] [data-print-tone="ok"] .admin-print-page-card > [data-print-error]:not([hidden]) {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--so-line);
    order: 1;
    color: var(--so-ink2);
    font-size: 12.5px;
    font-weight: 400;
    animation: so-rise 0.5s var(--so-ease) backwards;
  }
  html[data-device="computer"] [data-print-tone="ok"] .admin-print-page-card > [data-print-error]::before {
    content: '';
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    background: var(--so-mint);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  html[data-device="computer"] [data-print-tone="ok"] .admin-print-page-card > .admin-label-print-done:not([hidden]) ~ [data-print-error] { border-top: 0; padding-top: 0; }

  /* The big red Print button (every device: phones reach it when reprinting). */
  .admin-print-page-card .admin-label-option-grid {
    display: block;
  }
  .admin-print-page-card .admin-label-print-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 76px;
    box-sizing: border-box;
    padding: 12px 22px;
    border: 0;
    border-radius: 22px;
    background: var(--so-danger-fill);
    color: #ffffff;
    text-align: left;
    cursor: pointer;
    transition: opacity 0.4s, transform 0.35s var(--so-ease);
    animation: so-rise 0.55s var(--so-ease) 0.06s backwards;
  }
  .admin-print-page-card .admin-label-print-card:hover:not(:disabled) { transform: translateY(-1px); }
  .admin-print-page-card .admin-label-print-card:active:not(:disabled) { transform: scale(0.98); transition-duration: 0.08s; }
  .admin-print-page-card .admin-label-print-card:focus-visible { outline: 2px solid var(--so-ink2); outline-offset: 3px; }
  .admin-print-page-card .admin-label-print-card:disabled {
    cursor: not-allowed;
    opacity: 0.62;
  }
  [data-print-tone="busy"] .admin-label-print-card:disabled { cursor: wait; }
  .admin-print-page-card .admin-label-print-card svg {
    flex: none;
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .admin-print-page-card .admin-label-print-spinner {
    width: 26px;
    height: 26px;
    margin: 1px;
    stroke-width: 2.4;
    animation: so-spin 0.9s linear infinite;
  }
  [data-print-tone="working"] .admin-label-print-icon { display: none; }
  [data-print-tone="working"] .admin-label-print-spinner { display: block; }
  .admin-print-page-card .admin-label-print-card > span {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
  }
  .admin-print-page-card .admin-label-print-card strong {
    color: inherit;
    font-family: var(--so-font);
    font-size: 22px;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }
  .admin-print-page-card .admin-label-print-card small {
    color: rgba(255, 255, 255, 0.82);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
  }
  .admin-print-page-card .admin-label-print-card small > span { display: inline; }
  .admin-print-page-card .admin-label-print-card small > span + span::before {
    content: '\00b7';
    padding: 0 0.42em;
    font-family: var(--so-font);
  }
  .admin-print-page-card .admin-label-print-card small > [data-no-i18n] { font-family: var(--so-mono); }

  /* After Print: confirm, done, or the browser dialog fallback. */
  html[data-device="computer"] .admin-print-page-card .admin-label-print-confirmation {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px 0 0;
    border-top: 1px solid var(--so-line);
    animation: so-rise 0.5s var(--so-ease) backwards;
  }
  html[data-device="computer"] .admin-print-page-card .admin-label-print-confirmation[hidden] { display: none; }
  html[data-device="computer"] .admin-print-page-card .admin-label-print-confirmation .admin-print-success-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 0;
    height: 48px;
    min-height: 0;
    box-sizing: border-box;
    padding: 0 22px;
    border: 1px solid var(--so-danger-fill);
    border-radius: 999px;
    background: var(--so-danger-fill);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 650;
    box-shadow: none;
    transition: background-color 0.35s, color 0.35s, border-color 0.35s, transform 0.35s var(--so-ease);
  }
  html[data-device="computer"] .admin-print-page-card .admin-label-print-confirmation .admin-print-success-btn:hover:not(:disabled),
  html[data-device="computer"] .admin-print-page-card .admin-label-print-confirmation .admin-print-success-btn:focus-visible {
    border-color: var(--so-danger-fill);
    background: var(--so-danger-fill);
    color: #ffffff;
    box-shadow: none;
    transform: translateY(-1px);
  }
  html[data-device="computer"] .admin-print-page-card .admin-label-print-confirmation .admin-print-success-btn:disabled {
    border-color: var(--so-line);
    background: transparent;
    color: var(--so-ink3);
    cursor: progress;
    transform: none;
  }
  html[data-device="computer"] .admin-print-page-card .admin-label-print-done {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0 0;
    border-top: 1px solid var(--so-line);
    text-align: left;
    animation: so-rise 0.5s var(--so-ease) backwards;
  }
  html[data-device="computer"] .admin-print-page-card .admin-label-print-done[hidden] { display: none; }
  html[data-device="computer"] .admin-print-page-card .admin-label-print-done-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 24px;
    height: 24px;
    box-sizing: border-box;
    border: 1.5px solid var(--so-mint);
    border-radius: 50%;
    color: var(--so-mint);
  }
  html[data-device="computer"] .admin-print-page-card .admin-label-print-done-icon svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  html[data-device="computer"] .admin-print-page-card .admin-label-print-done strong {
    flex: 1;
    color: var(--so-ink);
    font-family: var(--so-font);
    font-size: 14px;
    font-weight: 600;
  }
  html[data-device="computer"] .admin-print-page-card :is(.admin-label-print-done button, .admin-label-browser-print) {
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    border: 1px solid var(--so-line2);
    border-radius: 999px;
    background: transparent;
    color: var(--so-ink);
    font-size: 13px;
    font-weight: 500;
    transition: transform 0.35s var(--so-ease), background-color 0.25s;
  }
  html[data-device="computer"] .admin-print-page-card .admin-label-print-done button {
    height: 36px;
    padding: 0 16px;
  }
  html[data-device="computer"] .admin-print-page-card .admin-label-browser-print {
    justify-self: stretch;
    height: 40px;
    padding: 0 18px;
    animation: so-rise 0.5s var(--so-ease) backwards;
  }
  html[data-device="computer"] .admin-print-page-card :is(.admin-label-print-done button, .admin-label-browser-print):hover { transform: translateY(-1px); background: var(--so-card2); }

  /* The label: the browser's PDF viewer, edge to edge in a rounded frame. */
  html[data-device="computer"] .admin-print-page-card .admin-label-preview {
    display: block;
    position: relative;
    height: max(560px, calc(100svh - 140px));
    box-sizing: border-box;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--so-line);
    border-radius: 22px;
    background: none;
    animation: so-rise 0.6s var(--so-ease) 0.08s backwards;
  }
  html[data-device="computer"] .admin-print-page-card .admin-label-preview[hidden] { display: none; }
  html[data-device="computer"] .admin-print-page-card .admin-label-frame-shell {
    width: 100%;
    height: 100%;
  }
  html[data-device="computer"] .admin-print-page-card .admin-shopee-label-frame {
    display: block;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  /* The Store Ops print action over the viewer's own print icon: same neutral
     grey as the viewer's toolbar so it reads as that icon. */
  html[data-device="computer"] .admin-print-page-card .admin-label-viewer-print { background: #3c3c3c; }
  html[data-device="computer"] .admin-print-page-card .admin-label-viewer-print:is(:hover, :focus-visible) { background: #4a4a4a; }
  /* While the label is fetched, the frame waits with a row of dots. */
  html[data-device="computer"] [data-print-tone="busy"] .admin-print-page-card .admin-label-preview[hidden] {
    display: grid;
    place-items: center;
  }
  html[data-device="computer"] .admin-label-preview[hidden] .admin-label-frame-shell { display: none; }
  html[data-device="computer"] .admin-label-preview[hidden] .admin-label-loading {
    display: flex;
    gap: 8px;
  }
  html[data-device="computer"] .admin-label-loading i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--so-ink3);
    animation: fulfil-worm 1.05s ease-in-out infinite;
  }
  html[data-device="computer"] .admin-label-loading i:nth-child(2) { animation-delay: 0.12s; }
  html[data-device="computer"] .admin-label-loading i:nth-child(3) { animation-delay: 0.24s; }
  html[data-device="computer"] .admin-label-loading i:nth-child(4) { animation-delay: 0.36s; }
  html[data-device="computer"] .admin-label-loading i:nth-child(5) { animation-delay: 0.48s; }
}

/* ======================= Phones: task screens =======================
   Scan Order, label check, print status: no shell bar, a slim top row with a
   round close button, the one main action as a pill at the bottom. */

@keyframes fulfil-scanline {
  from { transform: translate3d(0, -62px, 0); }
  to { transform: translate3d(0, 62px, 0); }
}
@keyframes fulfil-lock {
  0% { transform: translate(-50%, -50%) scale(1); }
  40% { transform: translate(-50%, -50%) scale(0.965); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
@keyframes fulfil-pop-center {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

html[data-device="phone"] :is(.admin-store-scan-page, .admin-print-label-page) .admin-store-topbar { display: none; }

/* ----- Scan Order: the camera fills the top, the order panel overlaps it ----- */
html[data-device="phone"] .admin-store-scan-page {
  --scan-panel-top: 61.6svh;
  /* The scan frame and the status chip stay where they are when the panel
     rises for a sold-out warning, moving only as far as they must. */
  --scan-frame-y: calc(min(61.6svh, var(--scan-panel-top) + 40px) / 2);
  --scan-chip-top: min(calc(61.6svh - 156px), calc(var(--scan-panel-top) - 94px));
}
html[data-device="phone"] .admin-store-scan-page:has(.admin-scan-stock-alert:not([hidden])) { --scan-panel-top: 52svh; }
html[data-device="phone"] .admin-store-scan-page:has(.admin-board-empty) { --scan-panel-top: 83.4svh; }

/* The old card is the panel's scroll area; ::before draws the panel and
   ::after the dark camera backdrop behind everything. */
html[data-device="phone"] .admin-store-scan-page .admin-panel.admin-scan-page-card {
  position: fixed;
  top: var(--scan-panel-top);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-content: start;
  gap: 12px 14px;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 22px 14px calc(92px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transform: none;
  transition: top 0.6s var(--so-ease);
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card::-webkit-scrollbar { display: none; }
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card::before {
  content: '';
  position: fixed;
  top: var(--scan-panel-top);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  border-radius: 28px 28px 0 0;
  background: var(--so-panel);
  pointer-events: none;
  transition: top 0.6s var(--so-ease);
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #0a0a0a;
  pointer-events: none;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > *,
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card [data-scan-progress] {
  position: relative;
  z-index: auto;
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
}

/* Top row over the camera: close, title, order ID. */
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card .admin-scan-head,
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card .admin-scan-head > div {
  display: contents;
}
html[data-device="phone"] .admin-store-scan-page .admin-task-close {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 14px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.4);
  color: #ededed;
  text-decoration: none;
  transition: transform 0.35s var(--so-ease);
}
html[data-device="phone"] :is(.admin-store-scan-page, .admin-print-label-page) .admin-task-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
html[data-device="phone"] :is(.admin-store-scan-page, .admin-print-label-page) .admin-task-close:active { transform: scale(0.94); transition-duration: 0.08s; }
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card .admin-scan-head h3 {
  position: fixed;
  top: calc(19px + env(safe-area-inset-top, 0px));
  right: 14px;
  left: 70px;
  z-index: 6;
  display: block;
  margin: 0;
  color: #ededed;
  font-family: var(--so-font);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
  white-space: nowrap;
  animation: so-rise 0.5s var(--so-ease) both;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card [data-scan-order-id] {
  position: fixed;
  top: calc(41px + env(safe-area-inset-top, 0px));
  right: 14px;
  left: 70px;
  z-index: 6;
  margin: 0;
  color: #8c8c8c;
  font-family: var(--so-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  animation: so-rise 0.5s var(--so-ease) both;
}
html[data-device="phone"] .admin-store-scan-page:has(.admin-board-empty) .admin-scan-page-card [data-scan-order-id] {
  color: #a8a8a8;
  font-family: var(--so-font);
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-order-meta { display: none; }

/* Panel, first row: big count, bar, sync note. */
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card [data-scan-progress] {
  grid-row: 1;
  grid-column: 1;
  display: inline-flex;
  align-items: baseline;
  align-self: center;
  margin: 0 0 0 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--so-ink);
  font-family: var(--so-font);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  animation: so-rise 0.55s var(--so-ease) both;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card [data-scan-progress] b {
  font-size: 30px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
  transition: color 0.4s;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card [data-scan-progress] small {
  color: var(--so-ink3);
  font-size: 15px;
  font-weight: 500;
}
html[data-device="phone"] .admin-store-scan-page:has([data-scan-bar].is-complete) [data-scan-progress] b { color: var(--so-mint); }
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > .admin-scan-progress-bar {
  grid-row: 1;
  grid-column: 2 / -1;
  display: block;
  align-self: center;
  height: 4px;
  margin-right: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--so-line);
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card:has(> [data-sync-status]:not([hidden])) > .admin-scan-progress-bar {
  grid-column: 2;
  margin-right: 0;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-progress-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--so-ink);
  transition: width 0.6s var(--so-ease), background-color 0.4s;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-progress-bar i.is-complete { background: var(--so-mint); }
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > [data-sync-status] {
  grid-row: 1;
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  align-self: center;
  height: 26px;
  min-height: 0;
  margin-right: 4px;
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid var(--so-amber);
  border-radius: 999px;
  background: none;
  color: var(--so-amber);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  animation: so-pop 0.3s var(--so-ease) both;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > [data-sync-status].is-error {
  border-color: var(--so-red);
  color: var(--so-red);
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > [data-sync-status][hidden] { display: none; }
html[data-device="phone"] .admin-store-scan-page:has(.admin-board-empty) :is([data-scan-progress], .admin-scan-progress-bar) { display: none; }

/* Sold out: a red outline in the panel; its button becomes the bottom pill. */
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > .admin-scan-stock-alert {
  position: relative;
  top: auto;
  order: 1;
  display: flex;
  gap: 12px;
  padding: 12px 14px 13px 12px;
  box-sizing: border-box;
  border: 1.5px solid var(--so-red);
  border-radius: 18px;
  background: none;
  color: var(--so-ink);
  box-shadow: none;
  animation: fulfil-alert 1.6s ease-in-out infinite;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > .admin-scan-stock-alert[hidden] { display: none; }
html[data-device="phone"] .admin-store-scan-page .admin-scan-stock-alert-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  box-sizing: border-box;
  border: 1.5px solid var(--so-red);
  border-radius: 50%;
  background: none;
  color: var(--so-red);
  font-family: var(--so-font);
  font-size: 14px;
  font-weight: 700;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-stock-alert > div { display: block; min-width: 0; }
html[data-device="phone"] .admin-store-scan-page .admin-scan-stock-alert strong {
  display: block;
  color: var(--so-red);
  font-family: var(--so-font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-stock-alert p {
  margin: 0;
  color: var(--so-ink);
  font-size: 13px;
  font-weight: 400;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-stock-alert b {
  display: block;
  color: var(--so-ink2);
  font-size: 12.5px;
  font-weight: 600;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-stock-alert button {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 52px;
  min-height: 0;
  padding: 0 18px;
  border: 1px solid var(--so-red);
  border-radius: 999px;
  background: var(--so-panel);
  color: var(--so-red);
  font-family: var(--so-font);
  font-size: 15px;
  font-weight: 600;
  animation: so-rise 0.5s var(--so-ease) both;
  transition: transform 0.35s var(--so-ease);
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-stock-alert button:active { transform: scale(0.97); transition-duration: 0.08s; }
html[data-device="phone"] .admin-store-scan-page .admin-scan-stock-alert button:focus-visible { outline: 2px solid var(--so-ink2); outline-offset: 2px; }

/* Errors the status chip does not already say (e.g. a sync that failed). */
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > [data-scan-error] {
  order: 2;
  padding: 0 4px;
  color: var(--so-red);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card:has([data-scan-status].is-error) > [data-scan-error] { display: none; }
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > .admin-scan-list {
  order: 3;
  display: block;
  margin: 0;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-list > .admin-board-empty {
  display: block;
  min-height: 0;
  padding: 18px 14px 0;
  border: 0;
  background: none;
  color: var(--so-ink2);
  font-size: 13.5px;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
  animation: so-rise 0.5s var(--so-ease) both;
}
html[data-device="phone"] .admin-store-scan-page .admin-mobile-scanner-live-row { display: none; }

/* The camera: edge to edge, the scan frame centred in what the panel leaves. */
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > .admin-phone-camera {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: -1;
  height: calc(var(--scan-panel-top) + 28px);
  max-height: none;
  aspect-ratio: auto;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #0a0a0a;
  transition: height 0.6s var(--so-ease);
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > .admin-phone-camera[hidden] { display: none; }
html[data-device="phone"] .admin-store-scan-page .admin-phone-camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
html[data-device="phone"] .admin-store-scan-page .admin-phone-camera::after {
  top: calc(var(--scan-frame-y) - 1px);
  right: auto;
  left: calc(50% - 106px);
  width: 212px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: none;
  animation: fulfil-scanline 2.6s ease-in-out infinite alternate;
}
html[data-device="phone"] .admin-store-scan-page .admin-phone-camera-frame {
  position: absolute;
  top: var(--scan-frame-y);
  left: 50%;
  display: block;
  width: 260px;
  height: 160px;
  overflow: visible;
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translate(-50%, -50%);
  transition: stroke 0.45s var(--so-ease), opacity 0.5s;
}
html[data-device="phone"] .admin-store-scan-page .admin-phone-camera.is-hit .admin-phone-camera-frame {
  stroke: #5ee0a6;
  animation: fulfil-lock 0.45s var(--so-ease);
}
html[data-device="phone"] .admin-store-scan-page .admin-phone-camera-done {
  position: absolute;
  top: var(--scan-frame-y);
  left: 50%;
  place-items: center;
  width: 60px;
  height: 60px;
  box-sizing: border-box;
  border: 2px solid #5ee0a6;
  border-radius: 50%;
  color: #5ee0a6;
  transform: translate(-50%, -50%);
}
html[data-device="phone"] .admin-store-scan-page .admin-phone-camera-done svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html[data-device="phone"] .admin-store-scan-page:has([data-scan-complete]:not([hidden])) .admin-phone-camera-done {
  display: grid;
  animation: fulfil-pop-center 0.5s var(--so-spring) 0.1s both;
}
html[data-device="phone"] .admin-store-scan-page:has([data-scan-complete]:not([hidden])) .admin-phone-camera-frame { stroke: #5ee0a6; }
html[data-device="phone"] .admin-store-scan-page:has([data-scan-complete]:not([hidden])) .admin-phone-camera::after { display: none; }
html[data-device="phone"] .admin-store-scan-page:has(.admin-phone-camera-msg:not([hidden])) .admin-phone-camera-frame { opacity: 0.35; }
html[data-device="phone"] .admin-store-scan-page:has(.admin-phone-camera-msg:not([hidden])) .admin-phone-camera::after { display: none; }

/* Opening / blocked camera: a dim layer over the camera with the message. */
html[data-device="phone"] .admin-store-scan-page .admin-phone-camera-msg {
  inset: 0 0 28px;
  z-index: 1;
  gap: 14px;
  padding: 60px 40px 20px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 14px;
  line-height: 1.45;
  animation: so-fade 0.4s var(--so-ease) both;
}
html[data-device="phone"] .admin-store-scan-page .admin-phone-camera-msg[hidden] { display: none; }
html[data-device="phone"] .admin-store-scan-page .admin-phone-camera-msg > span {
  max-width: 290px;
  text-wrap: balance;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card:has(> [data-phone-camera-retry][hidden]) .admin-phone-camera-msg {
  flex-direction: row;
  gap: 10px;
  padding-top: 40px;
  font-weight: 500;
}
html[data-device="phone"] .admin-store-scan-page .admin-phone-camera-msg::before {
  content: '';
  flex: none;
  width: 28px;
  height: 28px;
  background: currentColor;
  opacity: 0.8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5A2.5 2.5 0 0 1 6.5 6H8l1.5-2h5L16 6h1.5A2.5 2.5 0 0 1 20 8.5v8a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 16.5zM4 4l16 16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5A2.5 2.5 0 0 1 6.5 6H8l1.5-2h5L16 6h1.5A2.5 2.5 0 0 1 20 8.5v8a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 16.5zM4 4l16 16'/%3E%3C/svg%3E") center / contain no-repeat;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card:has(> [data-phone-camera-retry][hidden]) .admin-phone-camera-msg::before {
  width: 16px;
  height: 16px;
  opacity: 1;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M21 12a9 9 0 1 1-6.2-8.6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M21 12a9 9 0 1 1-6.2-8.6'/%3E%3C/svg%3E");
  animation: so-spin 0.9s linear infinite;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > [data-phone-camera-retry] {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 16px;
  z-index: 5;
  height: 52px;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  background: var(--so-ink);
  color: var(--so-panel);
  font-family: var(--so-font);
  font-size: 15px;
  font-weight: 600;
  animation: so-rise 0.5s var(--so-ease) both;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > [data-phone-camera-retry][hidden] { display: none; }

/* Status chip floating over the camera, above the panel. */
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > .admin-scanner-status-card {
  position: fixed;
  top: var(--scan-chip-top);
  right: 16px;
  left: 16px;
  z-index: 3;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  pointer-events: none;
  transition: top 0.6s var(--so-ease);
}
html[data-device="phone"] .admin-store-scan-page:has(.admin-phone-camera-msg:not([hidden])) .admin-scanner-status-card,
html[data-device="phone"] .admin-store-scan-page:has(.admin-phone-camera[hidden]) .admin-scanner-status-card { display: none; }
html[data-device="phone"] .admin-store-scan-page .admin-scanner-status-card [data-scan-status] {
  display: grid;
  flex: 0 1 auto;
  grid-template-columns: 7px auto;
  align-items: start;
  column-gap: 10px;
  max-width: 100%;
  padding: 10px 16px 10px 13px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(14, 14, 14, 0.86);
  color: #ededed;
}
html[data-device="phone"] .admin-store-scan-page .admin-scanner-status-card [data-scan-status]::before {
  content: '';
  grid-row: 1 / span 2;
  width: 7px;
  height: 7px;
  margin-top: 6.5px;
  border-radius: 50%;
  background: #a8a8a8;
  animation: so-breathe 2.4s ease-in-out infinite;
}
html[data-device="phone"] .admin-store-scan-page .admin-scanner-status-card [data-scan-status].is-ok::before { background: #5ee0a6; animation: none; }
html[data-device="phone"] .admin-store-scan-page .admin-scanner-status-card [data-scan-status].is-error::before { background: #ff6b81; animation: none; }
html[data-device="phone"] .admin-store-scan-page .admin-scanner-status-card [data-scan-status] > * {
  grid-column: 2;
  min-width: 0;
  animation: fulfil-in 0.35s var(--so-ease) both;
}
html[data-device="phone"] .admin-store-scan-page .admin-scanner-status-card [data-scan-status] strong {
  color: #ededed;
  font-family: var(--so-font);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}
html[data-device="phone"] .admin-store-scan-page .admin-scanner-status-card [data-scan-status].is-ok strong { color: #5ee0a6; }
html[data-device="phone"] .admin-store-scan-page .admin-scanner-status-card [data-scan-status].is-error strong { color: #ff6b81; }
html[data-device="phone"] .admin-store-scan-page .admin-scanner-status-card [data-scan-status] span {
  color: #bdbdbd;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}
/* Routine lines ("Point the camera…", "Checking this scan…") stay off the camera. */
html[data-device="phone"] .admin-store-scan-page .admin-scanner-status-card [data-scan-status]:not(.is-ok):not(.is-error) span,
html[data-device="phone"] .admin-store-scan-page .admin-scanner-status-card [data-scan-status] span:empty { display: none; }

/* Bottom pill: "Check the label", filling in when the scan is complete. */
html[data-device="phone"] .admin-store-scan-page .admin-scan-page-card > .admin-scan-complete {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 16px;
  z-index: 5;
  display: block;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-complete > :not(a),
html[data-device="phone"] .admin-store-scan-page .admin-scan-complete-computer { display: none; }
html[data-device="phone"] .admin-store-scan-page .admin-scan-complete-phone { position: relative; display: inline; }
html[data-device="phone"] .admin-store-scan-page .admin-scan-complete-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  overflow: hidden;
  border-radius: 999px;
  background: none;
  box-shadow: inset 0 0 0 1px var(--so-line);
  color: var(--so-ink3);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  pointer-events: none;
  transition: color 0.3s, box-shadow 0.3s, transform 0.35s var(--so-ease);
  animation: so-rise 0.6s var(--so-ease) 120ms both;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-complete-link::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--so-ink);
  transition: width 0.9s var(--so-ease);
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-complete-link svg {
  position: relative;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-complete:not([hidden]) .admin-scan-complete-link {
  box-shadow: inset 0 0 0 1px var(--so-ink);
  color: var(--so-panel);
  pointer-events: auto;
  transition: color 0.3s 0.3s, box-shadow 0.3s;
}
html[data-device="phone"] .admin-store-scan-page .admin-scan-complete:not([hidden]) .admin-scan-complete-link::before { width: 100%; }
html[data-device="phone"] .admin-store-scan-page:has(.admin-board-empty) .admin-scan-complete,
html[data-device="phone"] .admin-store-scan-page:has(.admin-scan-stock-alert:not([hidden])) .admin-scan-complete,
html[data-device="phone"] .admin-store-scan-page:has([data-phone-camera-retry]:not([hidden])) .admin-scan-complete { display: none; }

/* ----- Label check and print on computer (and the phone's own reprint) ----- */
html[data-device="phone"] .admin-print-label-page .admin-panel.admin-print-page-card {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  border: 0;
  border-radius: 0;
  background: var(--so-panel);
  box-shadow: none;
  transform: none;
}
html[data-device="phone"] .admin-print-label-page .admin-print-page-card::-webkit-scrollbar { display: none; }
html[data-device="phone"] .admin-print-label-page .admin-print-page-card > * { flex: none; margin: 0; }

/* Top row: close, title, order ID. The status pill would only repeat the title. */
html[data-device="phone"] .admin-print-label-page .admin-print-page-card .admin-scan-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 0 0 6px;
  animation: so-rise 0.5s var(--so-ease) both;
}
html[data-device="phone"] .admin-print-label-page .admin-task-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--so-line2);
  border-radius: 50%;
  color: var(--so-ink);
  text-decoration: none;
  transition: transform 0.35s var(--so-ease);
}
html[data-device="phone"] .admin-print-label-page .admin-scan-head > div {
  display: block;
  flex: 1;
  min-width: 0;
  text-align: left;
}
html[data-device="phone"] .admin-print-label-page .admin-print-page-card .admin-scan-head h3 {
  margin: 0;
  color: var(--so-ink);
  font-family: var(--so-font);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
html[data-device="phone"] .admin-print-label-page .admin-print-title-check { display: none; }
html[data-device="phone"] .admin-print-label-page:has([data-remote-layout]:not([hidden])) .admin-print-title-check { display: inline; }
html[data-device="phone"] .admin-print-label-page:has([data-remote-layout]:not([hidden])) .admin-print-title-print { display: none; }
html[data-device="phone"] .admin-print-label-page .admin-print-page-card [data-print-order-id] {
  display: block;
  margin: 0;
  color: var(--so-ink3);
  font-family: var(--so-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}
html[data-device="phone"] .admin-print-label-page.is-order-missing [data-print-order-id] { font-family: var(--so-font); }
html[data-device="phone"] .admin-print-label-page .admin-print-page-card .admin-print-status { display: none; }
html[data-device="phone"] .admin-print-label-page .admin-print-page-card > [data-print-error] {
  padding: 0 4px;
  color: var(--so-red);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

/* Label check: the label as large as the screen allows, the tools below it. */
html[data-device="phone"] .admin-print-label-page .admin-remote-layout {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  margin: 0;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout[hidden] { display: none; }
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-preview {
  display: grid;
  flex: 1 1 0;
  place-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-preview canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--so-line2);
  animation: so-pop 0.6s var(--so-ease) both;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-preview canvas[hidden] { display: none; }
/* Until it is drawn: a blank label with the loading line, or the note. */
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-preview p {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(100%, 362px);
  height: min(100%, 543px);
  margin: 0;
  padding: 0 34px;
  box-sizing: border-box;
  border: 1px solid var(--so-line2);
  border-radius: 5px;
  background: var(--so-card);
  color: var(--so-ink2);
  font-size: 13.5px;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
  animation: so-fade 0.45s var(--so-ease) both;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-preview p[hidden] { display: none; }
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-preview p:not([data-state]) { animation: so-fade 0.45s var(--so-ease) both, so-breathe 1.6s ease-in-out 0.45s infinite; }
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-preview p[data-state]::before {
  content: '!';
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  border: 1.5px solid var(--so-line2);
  border-radius: 50%;
  color: var(--so-ink2);
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-preview p[data-state='failed']::before {
  border-color: var(--so-amber);
  color: var(--so-amber);
}

/* Pages: a pager and an All / This page switch with a gliding thumb. */
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-pages {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  animation: so-rise 0.55s var(--so-ease) both;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-pages[hidden] { display: none; }
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-pager {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0;
  height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout :is(.admin-remote-layout-pager, .admin-remote-layout-size) :is(.admin-ghost-btn, .admin-ghost-btn:hover) {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 0;
  height: 42px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--so-ink);
  font-size: 0;
  transition: color 0.3s;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout :is(.admin-remote-layout-pager, .admin-remote-layout-size) .admin-ghost-btn::before {
  content: '';
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--fulfil-icon) center / contain no-repeat;
  mask: var(--fulfil-icon) center / contain no-repeat;
}
html[data-device="phone"] .admin-print-label-page [data-remote-layout-prev] { --fulfil-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 6-6 6 6 6'/%3E%3C/svg%3E"); }
html[data-device="phone"] .admin-print-label-page [data-remote-layout-next] { --fulfil-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E"); }
html[data-device="phone"] .admin-print-label-page [data-remote-layout-smaller] { --fulfil-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E"); }
html[data-device="phone"] .admin-print-label-page [data-remote-layout-larger] { --fulfil-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 12h12M12 6v12'/%3E%3C/svg%3E"); }
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-size .admin-ghost-btn::before { width: 16px; height: 16px; }
html[data-device="phone"] .admin-print-label-page .admin-remote-layout .admin-remote-layout-pager :is(.admin-ghost-btn, .admin-ghost-btn:hover) { width: 38px; }
html[data-device="phone"] .admin-print-label-page .admin-remote-layout :is(.admin-ghost-btn:disabled, .admin-ghost-btn:disabled:hover) { border-color: transparent; background: transparent; color: var(--so-ink3); cursor: default; }
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-pager strong {
  min-width: 44px;
  color: var(--so-ink);
  font-family: var(--so-mono);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-choice {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 4px;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--so-card);
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-choice::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--so-raise);
  box-shadow: var(--so-sh1);
  transition: transform 0.5s var(--so-ease);
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-choice:has([data-remote-layout-one][aria-pressed='true'])::before { transform: translate3d(100%, 0, 0); }
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-choice :is(.admin-ghost-btn, .admin-ghost-btn:hover) {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  height: 36px;
  min-height: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--so-ink3);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-choice :is(.admin-ghost-btn[aria-pressed='true'], .admin-ghost-btn[aria-pressed='true']:hover) {
  background: transparent;
  color: var(--so-ink);
  font-weight: 600;
}

/* Turn and size. */
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  height: 44px;
  animation: so-rise 0.55s var(--so-ease) 50ms both;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-controls > :is(.admin-ghost-btn, .admin-ghost-btn:hover) {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-height: 0;
  box-sizing: border-box;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  background: transparent;
  color: var(--so-ink);
  transition: color 0.3s, border-color 0.3s, transform 0.35s var(--so-ease);
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-controls > .admin-ghost-btn[hidden] { display: none; }
html[data-device="phone"] .admin-print-label-page [data-remote-layout-rotate] {
  width: 44px;
  padding: 0;
  font-size: 0;
}
html[data-device="phone"] .admin-print-label-page [data-remote-layout-rotate] svg { width: 18px; height: 18px; }
html[data-device="phone"] .admin-print-label-page [data-remote-layout-reset] {
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 500;
  animation: so-pop 0.4s var(--so-spring) both;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-controls > :is(.admin-ghost-btn:disabled, .admin-ghost-btn:disabled:hover) {
  border-color: var(--so-line);
  color: var(--so-ink3);
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-size {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  min-width: 0;
  height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  transition: border-color 0.3s;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-size:has(.admin-ghost-btn:disabled) { border-color: var(--so-line); }
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-size output {
  min-width: 64px;
  color: var(--so-ink);
  font-family: var(--so-mono);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  background: var(--so-ink);
  color: var(--so-panel);
  font-size: 15px;
  font-weight: 650;
  animation: so-rise 0.55s var(--so-ease) 100ms both;
  transition: transform 0.35s var(--so-ease);
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout-send::after,
html[data-device="phone"] .admin-print-label-page [data-remote-print-retry]::after {
  content: '';
  flex: none;
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-layout :is(button):active { transform: scale(0.97); transition-duration: 0.08s; }

/* Print on computer: one calm ring that fills by stage, title, one line, action at the bottom. */
html[data-device="phone"] .admin-print-label-page .admin-remote-print {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print[hidden] { display: none; }
html[data-device="phone"] .admin-print-label-page .admin-remote-print-dial {
  position: relative;
  display: block;
  flex: none;
  width: 188px;
  height: 188px;
  margin-top: auto;
  animation: so-pop 0.7s var(--so-ease) both;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print-dial > svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 188px;
  height: 188px;
  overflow: visible;
  fill: none;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print-track { stroke: var(--so-line2); stroke-width: 2; }
html[data-device="phone"] .admin-print-label-page .admin-remote-print-arc {
  stroke: var(--so-ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 559.2;
  stroke-dashoffset: calc(559.2 * (1 - var(--remote-fill, 0)));
  transition: stroke-dashoffset 1.1s var(--so-ease), stroke 0.45s;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print[data-tone='ok'] .admin-remote-print-arc { stroke: var(--so-mint); }
html[data-device="phone"] .admin-print-label-page .admin-remote-print[data-tone='error'] .admin-remote-print-arc { stroke: var(--so-red); }
html[data-device="phone"] .admin-print-label-page .admin-remote-print-head {
  position: absolute;
  top: 0;
  left: 89px;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--so-ink);
  transform: rotate(calc(var(--remote-fill, 0) * 360deg));
  transform-origin: 5px 94px;
  transition: transform 1.1s var(--so-ease), opacity 0.3s;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print-head::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: so-breathe 1.6s ease-in-out infinite; }
html[data-device="phone"] .admin-print-label-page .admin-remote-print:is([data-tone='ok'], [data-tone='error']) .admin-remote-print-head { opacity: 0; }
html[data-device="phone"] .admin-print-label-page .admin-remote-print-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--so-ink2);
  font-size: 0;
  animation: none;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print-icon::before {
  content: '';
  width: 40px;
  height: 40px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 9V5h10v4M7 17H6a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-1M8 14h8v6H8z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 9V5h10v4M7 17H6a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-1M8 14h8v6H8z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: so-pop 0.45s var(--so-ease) both;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print[data-tone='ok'] .admin-remote-print-icon { color: var(--so-mint); }
html[data-device="phone"] .admin-print-label-page .admin-remote-print[data-tone='ok'] .admin-remote-print-icon::before {
  width: 46px;
  height: 46px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  animation: so-pop 0.55s var(--so-spring) 0.2s both;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print[data-tone='error'] .admin-remote-print-icon { color: var(--so-red); }
html[data-device="phone"] .admin-print-label-page .admin-remote-print[data-tone='error'] .admin-remote-print-icon::before {
  width: 42px;
  height: 42px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 6.5v7M12 17.5h.01'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 6.5v7M12 17.5h.01'/%3E%3C/svg%3E");
  animation: so-pop 0.45s var(--so-spring) both, fulfil-shake-a 0.5s ease 0.45s;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print strong {
  margin-top: 26px;
  color: var(--so-ink);
  font-family: var(--so-font);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
  animation: fulfil-in 0.45s var(--so-ease) both;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print[data-tone='ok'] strong { color: var(--so-mint); }
html[data-device="phone"] .admin-print-label-page .admin-remote-print[data-tone='error'] strong { color: var(--so-red); }
html[data-device="phone"] .admin-print-label-page .admin-remote-print p {
  max-width: 30ch;
  margin: 6px 0 auto;
  padding: 0 14px 40px;
  color: var(--so-ink2);
  font-size: 13.5px;
  line-height: 1.45;
  text-wrap: balance;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print-actions {
  display: flex;
  flex: none;
  flex-wrap: nowrap;
  justify-content: stretch;
  gap: 8px;
  width: 100%;
  margin: 0;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print-actions [hidden],
html[data-device="phone"] .admin-print-label-page [data-remote-print-back] { display: none; }
html[data-device="phone"] .admin-print-label-page .admin-remote-print-actions :is(button, button:hover) {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: 52px;
  min-height: 0;
  padding: 0 16px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--so-ink);
  color: var(--so-panel);
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  animation: so-rise 0.5s var(--so-ease) both;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.35s var(--so-ease);
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print-actions button:active { transform: scale(0.97); transition-duration: 0.08s; }
html[data-device="phone"] .admin-print-label-page [data-remote-print-confirm] { flex-grow: 1.45; }
html[data-device="phone"] .admin-print-label-page [data-remote-print-again]::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12a7 7 0 1 1-2-4.9M19 5v3.5h-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12a7 7 0 1 1-2-4.9M19 5v3.5h-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Next to "Printed successfully", Print again steps back to an outline. */
html[data-device="phone"] .admin-print-label-page .admin-remote-print-actions:has([data-remote-print-confirm]:not([hidden])) :is([data-remote-print-again], [data-remote-print-again]:hover) {
  order: -1;
  border-color: var(--so-line2);
  background: transparent;
  color: var(--so-ink);
  font-weight: 500;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print-actions :is(button:disabled, button:disabled:hover) {
  border-color: var(--so-line);
  background: transparent;
  color: var(--so-ink3);
  cursor: progress;
}
html[data-device="phone"] .admin-print-label-page .admin-remote-print-actions button:disabled::before {
  content: '';
  flex: none;
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M21 12a9 9 0 1 1-6.2-8.6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M21 12a9 9 0 1 1-6.2-8.6'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: so-spin 0.9s linear infinite;
}

/* ================= Remote scanner (/mobile-scanner/) =================
   A phone page on its own (no shell). Waiting: a calm pulse and the one
   step to take. Active: the camera fills the top, the order below it. */
.ms-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--so-panel);
  color: var(--so-ink);
  font-family: var(--so-font);
  font-size: 13.5px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
.ms {
  --ms-panel-top: 61.6svh;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.ms [hidden] { display: none !important; }
.ms * { box-sizing: border-box; }
.ms-head {
  position: relative;
  z-index: 6;
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  color: var(--so-ink);
  transition: color 0.4s;
}
.ms-round {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--so-line2);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: color 0.4s, border-color 0.4s, background-color 0.4s, transform 0.35s var(--so-ease);
}
.ms-round:active { transform: scale(0.94); transition-duration: 0.08s; }
.ms-round svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ms-title { flex: 1; min-width: 0; }
.ms-title h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.ms-title small {
  display: block;
  color: #8c8c8c;
  font-family: var(--so-mono);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  animation: fulfil-in 0.4s var(--so-ease) both;
}
.ms:not(:has([data-ms-active]:not([hidden]))) .ms-title small { display: none; }
.ms:has([data-ms-active]:not([hidden])) .ms-head { color: #ededed; }
.ms:has([data-ms-active]:not([hidden])) .ms-round {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(10, 10, 10, 0.4);
}
.ms-error {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--so-red);
  border-radius: 14px;
  background: var(--so-panel);
  color: var(--so-red);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  animation: so-rise 0.5s var(--so-ease) both;
}

/* Waiting for an order. */
.ms-wait {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px 24px;
  text-align: center;
}
.ms-pulse {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin-bottom: 12px;
  animation: so-pop 0.7s var(--so-ease) both;
}
.ms-pulse::before,
.ms-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--so-line2);
  border-radius: 50%;
  animation: fulfil-worm 3.2s ease-in-out infinite;
}
.ms-pulse::after { inset: 24px; animation-delay: 0.6s; }
.ms-pulse i {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--so-card);
}
.ms-pulse i::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--so-cyan);
  animation: so-breathe 1.6s ease-in-out infinite;
}
.ms-wait > strong {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  animation: so-rise 0.6s var(--so-ease) 60ms both;
}
.ms-wait > span {
  max-width: 290px;
  color: var(--so-ink2);
  font-size: 14px;
  line-height: 1.5;
  text-wrap: balance;
  animation: so-rise 0.6s var(--so-ease) 110ms both;
}
.ms-wait b { color: var(--so-ink); font-weight: 600; }

/* Bottom of the waiting screen: add to home screen, allow the camera. */
.ms-dock {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 10px;
}
.ms:has([data-ms-active]:not([hidden])) .ms-dock { display: none; }
.ms-install {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px 2px 10px 12px;
  border: 1px solid var(--so-line2);
  border-radius: 16px;
  animation: so-rise 0.6s var(--so-ease) 160ms both;
}
.ms-install img {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.ms-install > div { flex: 1; min-width: 0; }
.ms-install strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.ms-install p {
  margin: 0;
  color: var(--so-ink2);
  font-size: 12px;
  line-height: 1.45;
}
.ms-install p b { color: var(--so-ink); font-weight: 600; }
.ms-install p svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--so-ink);
  color: var(--so-panel);
  font-family: var(--so-font);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  transition: transform 0.35s var(--so-ease), opacity 0.3s;
}
.ms-btn:active { transform: scale(0.97); transition-duration: 0.08s; }
.ms-btn:disabled { opacity: 0.6; }
.ms-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ms-install-go { flex: none; height: 40px; padding: 0 14px; font-size: 13px; }
.ms-install-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--so-ink3);
  cursor: pointer;
}
.ms-install-close svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}
.ms-btn-wide { width: 100%; animation: so-rise 0.6s var(--so-ease) 160ms both; }

/* Active: camera edge to edge, the order panel over its bottom edge. */
.ms-camera {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 0;
  height: calc(var(--ms-panel-top) + 28px);
  overflow: hidden;
  background: #0a0a0a;
  animation: so-fade 0.6s var(--so-ease) both;
}
.ms-camera video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ms-camera::after {
  content: '';
  position: absolute;
  top: calc(var(--ms-panel-top) / 2 - 1px);
  left: calc(50% - 106px);
  width: 212px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.7);
  animation: fulfil-scanline 2.6s ease-in-out infinite alternate;
}
.ms-frame {
  position: absolute;
  top: calc(var(--ms-panel-top) / 2);
  left: 50%;
  width: 260px;
  height: 160px;
  overflow: visible;
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translate(-50%, -50%);
  transition: stroke 0.45s var(--so-ease), opacity 0.5s;
}
.ms-camera.is-hit .ms-frame { stroke: #5ee0a6; animation: fulfil-lock 0.45s var(--so-ease); }
.ms-done {
  position: absolute;
  top: calc(var(--ms-panel-top) / 2);
  left: 50%;
  display: none;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 2px solid #5ee0a6;
  border-radius: 50%;
  color: #5ee0a6;
  transform: translate(-50%, -50%);
}
.ms-done svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ms-active.is-complete .ms-done { display: grid; animation: fulfil-pop-center 0.5s var(--so-spring) 0.1s both; }
.ms-active.is-complete .ms-frame { stroke: #5ee0a6; }
.ms-active.is-complete .ms-camera::after,
.ms-camera:has(.ms-camera-msg:not([hidden]))::after { display: none; }
.ms-camera:has(.ms-camera-msg:not([hidden])) .ms-frame { opacity: 0.35; }

/* The latest scan, as a chip over the camera. */
.ms-result {
  position: absolute;
  top: calc(var(--ms-panel-top) - 156px);
  right: 16px;
  left: 16px;
  z-index: 2;
  display: grid;
  grid-template-columns: 7px auto;
  align-items: start;
  column-gap: 10px;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 10px 16px 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(14, 14, 14, 0.86);
  color: #ededed;
  animation: fulfil-in 0.35s var(--so-ease) both;
}
.ms-result::before {
  content: '';
  grid-row: 1 / span 2;
  width: 7px;
  height: 7px;
  margin-top: 6.5px;
  border-radius: 50%;
  background: #4fd8f0;
  animation: so-breathe 1s ease-in-out infinite;
}
.ms-result.is-ok::before { background: #5ee0a6; animation: none; }
.ms-result.is-error::before { background: #ff6b81; animation: none; }
.ms-result strong {
  grid-column: 2;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}
.ms-result.is-ok strong { color: #5ee0a6; }
.ms-result.is-error strong { color: #ff6b81; }
.ms-result span {
  grid-column: 2;
  color: #bdbdbd;
  font-size: 12px;
  line-height: 1.4;
}
.ms-result span:empty { display: none; }
.ms-camera-msg {
  position: absolute;
  inset: 0 0 28px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 40px 20px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  text-align: center;
  animation: so-fade 0.4s var(--so-ease) both;
}
.ms-camera-msg > span {
  max-width: 290px;
  font-size: 14px;
  line-height: 1.45;
  text-wrap: balance;
}
.ms-camera-msg::before {
  content: '';
  width: 28px;
  height: 28px;
  background: currentColor;
  opacity: 0.8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5A2.5 2.5 0 0 1 6.5 6H8l1.5-2h5L16 6h1.5A2.5 2.5 0 0 1 20 8.5v8a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 16.5zM4 4l16 16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5A2.5 2.5 0 0 1 6.5 6H8l1.5-2h5L16 6h1.5A2.5 2.5 0 0 1 20 8.5v8a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 16.5zM4 4l16 16'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ms-camera-msg:has(> [data-ms-start-camera][hidden]) { flex-direction: row; gap: 10px; padding-top: 40px; }
.ms-camera-msg:has(> [data-ms-start-camera][hidden])::before {
  width: 16px;
  height: 16px;
  opacity: 1;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M21 12a9 9 0 1 1-6.2-8.6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M21 12a9 9 0 1 1-6.2-8.6'/%3E%3C/svg%3E");
  animation: so-spin 0.9s linear infinite;
}
.ms-btn-light {
  height: 44px;
  padding: 0 22px;
  background: #ffffff;
  color: #0b0b0b;
  font-size: 14px;
}
.ms-panel {
  position: fixed;
  top: var(--ms-panel-top);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 0;
  border-radius: 28px 28px 0 0;
  background: var(--so-panel);
  animation: so-sheet 0.6s var(--so-ease) both;
}
.ms-progress {
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
  height: 34px;
  padding: 0 4px;
}
.ms-progress [data-ms-progress] {
  flex: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ms-progress [data-ms-progress] b {
  font-size: 30px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
  transition: color 0.4s;
}
.ms-progress [data-ms-progress] small {
  color: var(--so-ink3);
  font-size: 15px;
  font-weight: 500;
}
.ms-active.is-complete [data-ms-progress] b { color: var(--so-mint); }
.ms-bar {
  position: relative;
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--so-line);
}
.ms-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--so-ink);
  transition: width 0.6s var(--so-ease), background-color 0.4s;
}
.ms-bar i.is-complete { background: var(--so-mint); }
.ms-list {
  flex: 1;
  min-height: 0;
  margin: 12px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.ms-list::-webkit-scrollbar { display: none; }
.ms-manual {
  display: flex;
  flex: none;
  gap: 8px;
  padding: 8px 2px calc(16px + env(safe-area-inset-bottom, 0px));
}
.ms-manual input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 20px;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  background: var(--so-card);
  color: var(--so-ink);
  font-family: var(--so-mono);
  font-size: 16px;
}
.ms-manual input::placeholder { color: var(--so-ink3); font-family: var(--so-font); }
.ms-manual input:focus { outline: none; border-color: var(--so-ink3); box-shadow: 0 0 0 4px var(--so-line); }
