:root {
  --ink: #17211f;
  --ink-soft: #586560;
  --paper: #f4f1eb;
  --card: #fffdf9;
  --line: #dcd7cd;
  --teal: #187c71;
  --teal-dark: #0f5e56;
  --danger: #9b3d37;
  --shadow: 0 12px 32px rgba(29, 38, 34, .1);
  --bottom-action-min-height: 69px;
  --bottom-action-clearance: 32px;
  --bottom-action-reserve: calc(var(--bottom-action-min-height) + var(--bottom-action-clearance) + env(safe-area-inset-bottom) + var(--visual-viewport-bottom, 0px));
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  padding-bottom: 0;
  background: radial-gradient(circle at 8% -5%, rgba(24, 124, 113, .12), transparent 28rem), var(--paper);
}

button, input { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

.brand-header {
  min-height: 104px;
  padding: 18px max(20px, calc((100vw - 860px) / 2));
  color: #fff;
  background: linear-gradient(125deg, #111b19, #1c3d36 65%, #1e5a50);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-copy h1 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 500;
  letter-spacing: .12em;
}

.brand-copy p { margin: 3px 0 0; color: #d7e7e3; letter-spacing: .26em; }
.header-meta { display: grid; gap: 6px; text-align: right; font-size: 13px; }
.header-meta span { color: #d7e7e3; }
.header-meta strong { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.owner-mode-badge { padding: 6px 9px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; color: #fff; background: rgba(24, 124, 113, .72); font-size: 12px; font-weight: 800; white-space: nowrap; }
.owner-mode-button { min-height: 36px; padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 8px; color: #fff; background: transparent; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.owner-mode-button:hover, .owner-mode-button:focus-visible { background: rgba(255, 255, 255, .14); }
.owner-waiver-button { color: #fff; background: #8d3e31; border-color: #8d3e31; }
.owner-waiver-button:hover, .owner-waiver-button:focus-visible { background: #712d24; }
.owner-mode-modal-card { width: min(100%, 390px); }
.owner-mode-modal-card p { color: var(--ink-soft); line-height: 1.6; }
.owner-mode-code-label { display: block; margin-top: 16px; font-weight: 700; }
.owner-mode-code { width: 100%; min-height: 46px; margin-top: 7px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; letter-spacing: .12em; text-transform: uppercase; }
.voucher-purchase-entry {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.voucher-purchase-entry:hover, .voucher-purchase-entry:focus-visible { background: rgba(255, 255, 255, .18); }
.cart-trigger {
  flex: 0 0 auto;
  min-width: 108px;
  padding: 7px 10px 7px 13px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
}
.cart-trigger:disabled { color: #858d89; background: #f1eee8; opacity: .78; cursor: not-allowed; }
.cart-trigger.has-items { color: var(--teal-dark); border-color: rgba(24, 124, 113, .45); background: #f5fbf9; }
.cart-badge { min-width: 24px; height: 24px; padding-inline: 6px; border-radius: 999px; color: var(--ink-soft); background: #e4e0d8; display: grid; place-items: center; font-size: 12px; }
.cart-trigger.has-items .cart-badge { color: #fff; background: var(--teal); }

.customer-shell {
  width: min(860px, calc(100% - 28px));
  margin: 16px auto 20px;
  padding-bottom: var(--bottom-action-reserve);
}

.panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 249, .97);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading h2 { margin: 0; font-size: 18px; }
.state-pill { padding: 5px 9px; border-radius: 999px; color: var(--teal-dark); background: #dceeea; font-size: 11px; font-weight: 700; }

.print-session-panel {
  width: min(100%, 620px);
  margin: 0 auto 14px;
  padding: 12px 14px;
  border: 1px solid #cfe0da;
  border-radius: 13px;
  background: #f1f7f4;
}

.print-session-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.print-session-title { display: flex; align-items: center; gap: 10px; }
.print-session-heading > strong { font-size: 14px; }
.print-session-title > strong { font-size: 14px; }
.print-session-status {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #dceeea;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.print-session-status.stopped { color: #743f38; background: #fae9e7; }
.print-session-status.completed { color: #285c4c; background: #d8eee5; }
.print-session-heading button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(24, 124, 113, .3);
  border-radius: 7px;
  color: var(--teal-dark);
  background: #eef7f5;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.print-batch-context {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--ink-soft);
  font-size: 11px;
}
.print-batch-context strong { color: var(--ink); }
.print-batch-context[hidden], .print-batch-list[hidden], .print-history-actions[hidden], .print-session-photos[hidden] { display: none; }

.print-batch-list {
  margin-top: 7px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.print-batch-list:empty { display: none; }
.print-batch-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.print-batch-button.active { color: var(--teal-dark); border-color: var(--teal); background: #eef7f5; }

.print-session-details {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.print-session-details[hidden] { display: none; }
.print-session-details strong { color: var(--ink); }
.print-session-progress-row { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(100px, 1fr); align-items: center; gap: 10px; }
.print-session-progress-row > strong { min-width: 42px; font-size: 14px; }
.print-session-progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #d5e3de; }
.print-session-progress-track > span { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--teal); transition: width .2s ease; }
.print-history-actions { display: flex; gap: 8px; margin-top: 7px; }
.print-history-actions button { flex: 1 1 0; min-height: 36px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.print-history-actions button[hidden] { display: none; }
.print-session-alert {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 3px solid var(--danger);
  color: var(--danger);
  background: #faeeec;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-line;
}
.print-session-alert.confirmation { border-left-color: #8a6b2f; color: #6f5521; background: #faf4e7; }
.print-session-alert.completion { border-left-color: var(--teal); color: var(--teal-dark); background: #e8f5f1; }

.print-session-photos { margin-top: 8px; }
.print-session-photos > strong { display: block; margin-bottom: 5px; color: var(--ink-soft); font-size: 11px; }
.print-session-photo-strip { display: flex; gap: 6px; overflow-x: auto; }
.print-session-photo-button {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #e4e1da;
  cursor: pointer;
}
.print-session-photo-button.active { border-color: var(--teal); }
.print-session-photo-button img { width: 100%; height: 100%; display: block; object-fit: cover; }
.print-session-photo-button span { font-size: 10px; color: var(--ink-soft); }
.print-session-preview {
  min-height: 104px;
  margin-top: 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f2ed;
}
.print-session-preview img { width: 100%; max-height: 210px; display: block; object-fit: contain; background: #fff; }
.print-session-preview p { margin: 0; padding: 12px; color: var(--ink-soft); font-size: 12px; text-align: center; }

.orientation-switch {
  width: fit-content;
  margin: 0;
  padding: 3px;
  border-radius: 12px;
  background: #e9e5de;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.orientation-switch button {
  min-width: 82px;
  min-height: 40px;
  padding: 7px 15px;
  border: 0;
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
}

.orientation-switch button.active { color: #fff; background: var(--ink); box-shadow: 0 4px 12px rgba(20, 30, 28, .18); }
.editing-toolbar { width: min(100%, 480px); margin: 12px auto 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.delivery-mode-switch { width: min(100%, 560px); margin: 12px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.delivery-mode-card { min-height: 68px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-soft); text-align: left; cursor: pointer; }
.delivery-mode-card strong, .delivery-mode-card small { display: block; }
.delivery-mode-card small { margin-top: 4px; font-size: 11px; line-height: 1.35; }
.delivery-mode-card.active { border-color: var(--ink); background: var(--ink); color: #fff; }
@media (max-width: 520px) { .delivery-mode-switch { grid-template-columns: 1fr; } .delivery-mode-card { min-height: 54px; } }
.toolbar-button { min-width: 74px; min-height: 40px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft); background: #fff; font: inherit; cursor: pointer; }
.toolbar-button:disabled { opacity: .42; cursor: not-allowed; }

.photo-queue-panel {
  width: min(100%, 520px);
  margin: 0 auto 10px;
}

.photo-queue-summary {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}

.photo-queue-summary strong { color: var(--ink); order: 1; }
.photo-queue-summary > span { order: 2; }

.photo-queue-sort-controls {
  order: 3;
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.photo-queue-sort-controls button {
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.photo-queue-sort-controls button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.photo-queue-strip {
  min-height: 70px;
  padding: 5px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0ede7;
}

.photo-queue-item {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #d8d4cc;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.photo-queue-item.current { border-color: var(--teal); }
.photo-queue-item.unedited { border-color: #b6afa3; }
.photo-queue-item.editing { border-color: var(--teal); }
.photo-queue-item.ready { border-color: #4f7a68; }
.photo-queue-item.submitted { border-color: #4f7a68; }
.photo-queue-item.skipped { border-color: #90836d; filter: saturate(.58); }
.photo-queue-item.failed { border-color: var(--danger); }
.photo-queue-item.submitted { cursor: default; }
.photo-queue-item img { width: 100%; height: 100%; display: block; object-fit: cover; }
.photo-queue-status {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  padding: 2px 3px;
  color: #fff;
  background: rgba(17, 27, 25, .78);
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
}

.preview-stage {
  position: relative;
  width: min(100%, 480px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 2px;
  background: #fff;
  outline: 2px solid rgba(47, 72, 66, .72);
  box-shadow: 0 4px 14px rgba(29, 38, 34, .12);
  touch-action: pan-y;
}

.preview-stage canvas { display: block; width: 100%; height: auto; background: #fff; }
.viewing-preview-image { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; object-fit: contain; background: #fff; pointer-events: none; }
.viewing-preview-image[hidden] { display: none; }

.crop-hint {
  position: absolute;
  z-index: 3;
  padding: 5px 8px;
  color: rgba(255, 255, 255, .94);
  background: rgba(19, 39, 35, .62);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  transform: translateY(-100%);
  pointer-events: none;
}

.crop-hint[hidden] { display: none; }

.photo-boundary {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(43, 77, 69, .38);
  pointer-events: none;
}

.empty-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  color: #fff;
  background: rgba(21, 31, 29, .66);
  text-align: center;
  width: 100%;
  border: 0;
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}

.empty-hint.hidden { display: none; }
.empty-hint small { color: #d9e5e2; }
.upload-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #b8ceca; border-radius: 50%; font-size: 24px; }

.caption-row {
  width: min(100%, 480px);
  margin: 10px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
  align-items: center;
}

.caption-input {
  width: 100%;
  max-width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid rgba(23, 33, 31, .16);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 4px 13px rgba(23, 33, 31, .08);
  backdrop-filter: blur(5px);
  outline: none;
  text-align: center;
  font-size: 16px;
}

.caption-input::placeholder { color: rgba(88, 101, 96, .82); }
.caption-input:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(24, 124, 113, .12); }
.caption-clear-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: #fff;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}
.caption-clear-button:disabled { opacity: .35; cursor: not-allowed; }

.editor-actions { width: min(100%, 480px); margin: 10px auto 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.editor-tip { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.35; }
.editor-actions > .button { width: 100%; min-height: 50px; }
.button { min-height: 42px; border: 1px solid transparent; border-radius: 11px; padding: 9px 14px; font-weight: 700; cursor: pointer; }
.button:disabled { opacity: .42; cursor: not-allowed; }
.button.primary { color: #fff; background: var(--teal); }
.button.secondary { color: var(--ink); border-color: var(--line); background: #fff; }
.upload-button { display: grid; place-items: center; }
.editor-actions > .upload-button { width: auto; min-width: 150px; min-height: 38px; padding-block: 6px; justify-self: center; color: var(--teal-dark); border-color: rgba(24, 124, 113, .3); background: #eef7f5; }
.editor-actions > .compact-button { min-height: 42px; }
.editor-secondary-actions { display: flex; align-items: center; justify-content: center; gap: 8px 14px; flex-wrap: wrap; }
.text-action { min-height: 38px; padding: 5px 2px; border: 0; color: var(--teal-dark); background: transparent; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.text-action[hidden] { display: none; }
.text-action:disabled { opacity: .42; cursor: not-allowed; }
.danger-text-action { color: var(--danger); }
.photo-edit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-edit-actions .button { min-height: 44px; }
.button.quiet-button { color: var(--ink-soft); border-color: var(--line); background: #f4f2ed; }
.button.danger-button { color: #8a4038; border-color: #d9aaa5; background: #fff; }
.button.clear-order-button { min-height: 38px; color: var(--danger); border-color: transparent; background: transparent; font-size: 13px; font-weight: 600; }
.button.clear-order-button:hover { border-color: #e6c7c3; background: #fff7f5; }
.file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

.batch-complete {
  width: min(100%, 420px);
  margin: 10px auto 0;
  padding: 12px;
  border: 1px solid rgba(24, 124, 113, .28);
  border-radius: 8px;
  background: #e8f5f1;
  display: grid;
  gap: 5px;
  text-align: center;
}
.batch-complete[hidden] { display: none; }
.batch-complete > span { color: var(--ink-soft); font-size: 13px; }
.batch-complete-actions { margin-top: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.batch-complete-actions .button { min-height: 44px; padding-inline: 9px; }

.service-panel { display: grid; gap: 10px; }
.service-heading { margin-bottom: 0; }
.voucher-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.voucher-row input {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
.voucher-row input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24, 124, 113, .12); }
.compact-status { margin: 0; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.compact-status { color: var(--teal-dark); background: #e8f5f1; }
.compact-status.error { color: var(--danger); background: #fae9e7; }
.server-cart-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.server-cart-actions .compact-status { margin: 0; flex: 1 1 220px; }
.staged-upload-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.staged-upload-actions .compact-status { margin: 0; flex: 1 1 220px; }
.server-cart-actions[hidden], .staged-upload-actions[hidden] { display: none; }

.package-grid {
  height: 184px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.package-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  cursor: pointer;
}

.package-card.recommended { border-color: var(--teal); box-shadow: inset 0 0 0 1px rgba(24, 124, 113, .15); }
.package-main { font-size: clamp(22px, 3vw, 26px); font-weight: 800; line-height: 1; }
.package-unit { color: var(--ink-soft); font-size: 13px; line-height: 1.1; }
.recommended-mark { position: absolute; top: 4px; right: 5px; padding: 2px 6px; border-radius: 999px; color: #fff; background: var(--teal); font-size: 9px; font-weight: 800; }

.bottom-action {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + var(--visual-viewport-bottom, 0px));
  z-index: 12;
  padding: 10px max(14px, calc((100vw - 860px) / 2)) 10px;
  border-top: 1px solid rgba(209, 205, 197, .9);
  background: rgba(246, 243, 237, .93);
  backdrop-filter: blur(12px);
}
.bottom-action { display: block; }
.bottom-action[hidden] { display: none; }
.bottom-action-inner { width: min(100%, 860px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 8px; }
.bottom-action .button { min-height: 48px; }
.confirm-button { min-width: 0; color: #fff; background: var(--teal); box-shadow: 0 8px 22px rgba(24, 124, 113, .2); }
.bottom-action .danger-button { color: var(--danger); border-color: #e6c7c3; background: #fff7f5; }

.modal { width: min(92vw, 440px); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, .28); overflow: auto; }
.modal::backdrop { background: rgba(7, 13, 12, .72); }
.modal-card { padding: 20px; }
.modal-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.modal-heading h2 { margin: 0; font-size: 20px; }
.icon-button { width: 40px; height: 40px; border: 0; border-radius: 50%; color: var(--ink); background: #eeeae3; font-size: 22px; cursor: pointer; }
.modal-actions { margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.voucher-purchase-dialog { width: min(calc(100vw - 28px), 760px); }
.voucher-purchase-modal-card { padding: 20px; }
.voucher-purchase-heading { align-items: flex-start; }
.voucher-purchase-heading > div { min-width: 0; }
.voucher-purchase-heading p { margin: 5px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.voucher-package-panel { min-height: 150px; }
.voucher-catalog-state { min-height: 150px; padding: 24px; border: 1px dashed var(--line); border-radius: 8px; color: var(--ink-soft); display: grid; place-items: center; gap: 12px; text-align: center; }
.voucher-catalog-state[hidden] { display: none; }
.voucher-catalog-state.error { color: var(--danger); background: #fff7f5; }
.voucher-single-price { margin: 0 0 12px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.voucher-package-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.voucher-purchase-card { position: relative; min-width: 0; padding: 34px 12px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: grid; align-content: start; gap: 9px; }
.voucher-purchase-card.recommended { border-color: var(--teal); box-shadow: inset 0 0 0 1px rgba(24, 124, 113, .16); background: #f7fcfa; }
.voucher-purchase-card h3 { min-width: 0; margin: 0; padding: 0; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.voucher-purchase-price { color: var(--teal-dark); font-size: 25px; font-weight: 850; line-height: 1.1; }
.voucher-purchase-credit, .voucher-purchase-note, .voucher-purchase-gift { margin: 0; font-size: 13px; line-height: 1.5; }
.voucher-purchase-credit, .voucher-purchase-note { color: var(--ink-soft); }
.voucher-purchase-gift { min-height: 40px; color: var(--ink); font-weight: 700; }
.voucher-purchase-card .button { width: 100%; min-height: 42px; }
.voucher-recommended-badge { position: absolute; top: 12px; right: 12px; padding: 3px 7px; border-radius: 999px; color: #fff; background: var(--teal); font-size: 11px; font-weight: 800; }
.voucher-pending-panel { display: grid; gap: 14px; }
.voucher-pending-panel[hidden] { display: none; }
.voucher-pending-status { padding: 12px 14px; border-radius: 8px; background: #edf6f3; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.voucher-pending-status span { color: var(--ink-soft); font-size: 13px; }
.voucher-pending-status strong { color: var(--teal-dark); }
.voucher-order-summary { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.voucher-order-summary > div { padding: 10px 12px; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
.voucher-order-summary > div + div { border-top: 1px solid var(--line); }
.voucher-order-summary dt { color: var(--ink-soft); }
.voucher-order-summary dd { margin: 0; font-weight: 750; overflow-wrap: anywhere; }
.payment-area { min-height: 250px; padding: 18px; border: 1px dashed #b9c9c4; border-radius: 8px; background: #f7f9f8; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; }
.payment-area p, .payment-area small { margin: 0; color: var(--ink-soft); }
.payment-area small { font-size: 12px; }
.payment-qr-state { min-height: 150px; width: min(100%, 240px); display: grid; place-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.payment-qr-state span { color: var(--ink-soft); font-size: 13px; }
.payment-qr { width: 220px; height: 220px; display: block; object-fit: contain; }
.payment-qr[hidden] { display: none; }
.cart-submit-modal-card { padding: 18px; }
.cart-submit-modal-card .modal-heading { margin-bottom: 10px; }
.checkout-heading { position: sticky; top: 0; z-index: 2; padding-bottom: 10px; background: #fff; display: grid; grid-template-columns: auto minmax(0, 1fr); justify-content: start; }
.checkout-back-button { min-height: 40px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--teal-dark); background: #f5f8f6; font: inherit; font-weight: 800; cursor: pointer; }
.checkout-heading h2 { text-align: left; }
.cart-submit-content { display: grid; gap: 10px; }
.cart-submit-content p { margin: 0; }
.cart-item-list { display: grid; gap: 9px; max-height: min(48vh, 420px); overflow-y: auto; }
.cart-item-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: #f7f5f0; }
.cart-item-thumb { width: 62px; height: 62px; overflow: hidden; border-radius: 8px; background: #d8d4cc; }
.cart-item-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cart-item-details { min-width: 0; display: grid; gap: 4px; }
.cart-item-details strong { color: var(--ink); font-size: 14px; }
.cart-item-details span { color: var(--ink-soft); font-size: 12px; }
.cart-item-actions { display: grid; gap: 6px; }
.cart-item-actions button { min-height: 32px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.cart-item-actions .cart-item-delete { color: var(--danger); border-color: #e6c7c3; }
.cart-submit-summary { color: var(--teal-dark); font-size: 15px; font-weight: 700; line-height: 1.45; }
.cart-submit-warning { display: grid; gap: 8px; padding: 11px 12px; border-radius: 10px; background: #edf6f3; }
.cart-submit-warning p { color: var(--ink); font-size: 14px; line-height: 1.55; }
.cart-submit-plan-only { padding-left: 10px; border-left: 3px solid #b88a39; color: #6f5521; font-size: 12px; line-height: 1.5; }
.cart-submit-plan-only[hidden] { display: none; }
.cart-submit-modal-card .modal-actions { flex-wrap: nowrap; }
.cart-submit-modal-card .modal-actions .button { flex: 1 1 0; min-width: 0; white-space: nowrap; }
.voucher-disclosure { border-top: 1px solid var(--line); }
.voucher-disclosure summary { min-height: 42px; padding: 10px 2px 8px; color: var(--ink-soft); display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.voucher-disclosure summary::-webkit-details-marker { display: none; }
.voucher-disclosure summary::after { content: "+"; color: var(--teal-dark); font-size: 18px; line-height: 1; }
.voucher-disclosure[open] summary::after { content: "−"; }
.voucher-content { display: grid; gap: 8px; padding: 2px 0 8px; }
.clear-order-modal-card { padding: 20px; }
.clear-order-modal-card .modal-heading { margin-bottom: 10px; }
.clear-order-message { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.6; }
.clear-order-message.error { padding-left: 10px; border-left: 3px solid var(--danger); color: var(--danger); }
.clear-order-actions { flex-wrap: nowrap; }
.clear-order-actions .button { flex: 1 1 0; min-width: 0; }
.draft-recovery-modal-card { padding: 20px; }
.draft-recovery-content { display: grid; gap: 11px; }
.draft-recovery-content p { margin: 0; }
.draft-recovery-message { color: var(--ink); font-size: 15px; line-height: 1.6; }
.draft-recovery-summary { display: grid; gap: 5px; padding: 12px; border-radius: 12px; color: var(--teal-dark); background: #edf6f3; font-weight: 700; line-height: 1.5; }
.draft-recovery-actions { align-items: stretch; }
.draft-recovery-actions .button { flex: 1 1 170px; min-height: 44px; }
body.draft-recovery-gated .customer-shell,
body.draft-recovery-gated .bottom-action { pointer-events: none; user-select: none; }

.toast { position: fixed; left: 50%; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 30; max-width: min(90vw, 460px); padding: 11px 15px; border-radius: 999px; color: #fff; background: rgba(20, 31, 29, .95); box-shadow: 0 12px 32px rgba(0, 0, 0, .25); opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: .2s ease; text-align: center; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

.service-home { display: grid; gap: 12px; }
.service-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.service-choice { min-height: 92px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.service-choice:hover, .service-choice:focus-visible { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24, 124, 113, .1); outline: 0; }
.service-choice strong, .service-choice span { display: block; }
.service-choice strong { font-size: 17px; }
.service-choice span { margin-top: 6px; color: var(--ink-soft); font-size: 13px; }
.document-print-panel { display: grid; gap: 14px; }
.document-print-panel[hidden] { display: none; }
.document-print-panel .section-heading { align-items: flex-start; }
.panel-subtitle { margin: 5px 0 0; color: var(--ink-soft); font-size: 13px; }
.document-spec { display: grid; gap: 5px; padding: 13px 14px; border-radius: 10px; background: #f3f7f5; }
.document-spec span { color: var(--ink-soft); font-size: 14px; }
.document-upload-target { width: 100%; min-height: 56px; font-size: 16px; }
.document-upload-note, .document-status { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.document-status { min-height: 21px; color: var(--teal-dark); font-weight: 700; }
.document-status.error { color: var(--danger); }
.document-quote, .document-confirmation { display: grid; gap: 13px; padding-top: 14px; border-top: 1px solid var(--line); }
.document-quote[hidden], .document-confirmation[hidden] { display: none; }
.document-quote h3, .document-confirmation h3 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.document-meta { margin: -7px 0 0; color: var(--ink-soft); font-size: 13px; }
.document-rows { display: grid; gap: 8px; }
.document-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 14px; }
.document-row strong { text-align: right; overflow-wrap: anywhere; }
.document-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 11px; border-top: 1px solid var(--line); font-weight: 800; }
.document-total strong { color: var(--teal-dark); font-size: 24px; }
.document-copies { display: inline-grid; grid-template-columns: 44px 64px 44px; align-items: center; gap: 7px; }
.document-copies button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; font-size: 22px; cursor: pointer; }
.document-copies button:disabled { opacity: .42; cursor: not-allowed; }
.document-copies output { text-align: center; font-size: 16px; font-weight: 800; }
.document-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.document-actions .button { min-height: 46px; }
.document-waiting { padding: 13px; border-radius: 10px; color: #6f5521; background: #fff7e7; font-size: 14px; line-height: 1.5; }
.fulfillment-availability { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfa; }
.fulfillment-availability h3, .fulfillment-availability p { margin: 0; }
.fulfillment-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fulfillment-choice { display: grid; gap: 4px; min-height: 58px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.fulfillment-choice small { color: var(--ink-soft); font-size: 12px; line-height: 1.35; }
.fulfillment-choice[aria-pressed="true"] { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(24, 124, 113, .12); }
.fulfillment-choice:disabled, .fulfillment-recheck:disabled { opacity: .55; cursor: not-allowed; }
.fulfillment-message { color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.fulfillment-recheck { justify-self: start; }
@media (max-width: 520px) {
  .service-choice-grid { grid-template-columns: 1fr; }
  .service-choice { min-height: 78px; }
  .document-row { align-items: flex-start; }
  .document-actions { grid-template-columns: 1fr; }
  .fulfillment-choices { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .brand-header { min-height: 82px; padding: 12px 15px; gap: 10px; }
  .brand-copy h1 { font-size: 27px; }
  .brand-copy p { font-size: 11px; }
  .header-meta { display: none; }
  .header-actions { margin-left: auto; }
  .customer-shell { margin-top: 10px; }
  .panel { padding: 13px; border-radius: 15px; }
  .section-heading { margin-bottom: 8px; }
  .section-heading h2 { font-size: 16px; }
  .print-session-panel, .photo-queue-panel, .preview-stage, .editing-toolbar, .caption-row, .editor-actions, .batch-complete { width: min(100%, 340px); }
  .editor-actions { margin-top: 8px; }
  .package-grid { height: 184px; }
}

@media (min-width: 761px) and (max-width: 768px) {
  .customer-shell { grid-template-columns: 1fr; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .package-main { font-size: 20px; white-space: nowrap; }
}

@media (max-width: 420px) {
  :root { --bottom-action-min-height: 84px; }
  .customer-shell { width: calc(100% - 16px); }
  .brand-header { align-items: flex-start; }
  .brand-copy h1 { font-size: 24px; }
  .voucher-purchase-entry { min-height: 44px; padding-inline: 11px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .owner-mode-button { min-height: 44px; }
  .header-meta span { max-width: 130px; line-height: 1.35; }
  .orientation-switch button { min-width: 74px; min-height: 44px; }
  .photo-queue-sort-controls button { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .print-session-panel, .photo-queue-panel, .preview-stage, .editing-toolbar, .caption-row, .editor-actions, .batch-complete { width: min(100%, 318px); }
  .print-session-details { grid-template-columns: 1fr; gap: 3px; }
  .caption-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .caption-input { width: 100%; min-height: 44px; padding: 10px 11px; font-size: 16px; line-height: 20px; }
  .caption-clear-button { width: 44px; height: 44px; }
  .editor-actions > .compact-button,
  .voucher-row .button,
  .modal-actions .button { min-width: 44px; min-height: 44px; }
  .voucher-row input { min-height: 44px; }
  .modal .icon-button { width: 44px; height: 44px; }
  #cartSubmitDialog { width: min(calc(100vw - 24px), 440px); }
  .cart-submit-modal-card { padding: 16px; }
  .cart-submit-modal-card .modal-heading h2 { font-size: 19px; line-height: 1.35; }
  .checkout-back-button { min-height: 44px; }
  .cart-submit-modal-card .modal-actions { margin-top: 12px; }
  .cart-submit-warning p { overflow-wrap: break-word; }
  #clearCurrentOrderDialog { width: min(calc(100vw - 24px), 440px); }
  .clear-order-modal-card { padding: 16px; }
  .clear-order-modal-card .modal-heading h2 { font-size: 19px; line-height: 1.35; }
  .clear-order-message { overflow-wrap: anywhere; }
  .draft-recovery-modal-card { padding: 16px; }
  .draft-recovery-modal-card .modal-heading h2 { font-size: 19px; line-height: 1.35; }
  .draft-recovery-message, .draft-recovery-summary { overflow-wrap: anywhere; }
  .draft-recovery-actions { display: grid; grid-template-columns: 1fr; }
  .draft-recovery-actions .button { width: 100%; }
  .batch-complete-actions { grid-template-columns: 1fr; }
  .package-card { padding: 8px; }
  .voucher-purchase-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .voucher-purchase-modal-card { padding: 14px; }
  .voucher-purchase-grid, .voucher-package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voucher-purchase-card { padding: 34px 10px 10px; }
  .voucher-order-summary > div { grid-template-columns: 78px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
.template-picker { display:flex; flex-wrap:wrap; gap:6px; margin-left:8px; max-width:420px; }
.template-choice { min-height:34px; padding:7px 10px; border:1px solid #cbd8d6; border-radius:6px; color:#36504b; background:#fff; cursor:pointer; }
.template-choice.active { border-color:#187c71; color:#fff; background:#187c71; }
.template-load-status { min-height:20px; margin:5px 0 0 8px; color:#856404; font-size:12px; }
@media (max-width:760px) { .template-picker { width:100%; margin:8px 0 0; }.template-choice { min-height:40px; } .template-load-status { margin-left:0; } }
