:root {
  color-scheme: light;
  --ink: #17201a;
  --muted: #66716a;
  --line: #d9e0d8;
  --paper: #fbfbf7;
  --panel: #ffffff;
  --accent: #00796b;
  --accent-dark: #00584e;
  --warn: #be6a00;
  --danger: #b42318;
  --paid: #12633d;
  --shadow: 0 12px 30px rgba(23, 32, 26, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.app-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 128px;
}

.customer-shell {
  max-width: 560px;
}

.customer-page {
  touch-action: manipulation;
}

.customer-shell .topbar {
  margin-bottom: 12px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0 0 4px;
  font-size: 28px;
  line-height: 1.18;
}

.topbar p {
  margin: 0;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-nav-search {
  width: 210px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.nav-links a,
.ghost-button,
.primary-button,
.danger-button,
.warn-button,
.quick-delivery-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 14px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a,
.ghost-button {
  background: #eef3ed;
  color: var(--ink);
}

.quick-delivery-button {
  border: 1px solid #6fac84;
  background: #e7f6ec;
  color: #1f6b3d;
  font-weight: 900;
}

.quick-delivery-request-list {
  display: grid;
  gap: 10px;
}

.quick-delivery-request-card {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf7;
}

.quick-delivery-request-card.is-open {
  background: #fff;
  border-color: #9bbca3;
}

.quick-delivery-admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.quick-delivery-request-name {
  display: block;
  min-width: 0;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-delivery-delete-button {
  min-height: 34px;
  padding: 0 12px;
}

.quick-delivery-request-detail {
  min-width: 0;
}

.quick-delivery-detail-toggle {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cad9ca;
  border-radius: 8px;
  background: #fff;
  color: #25623b;
  font-weight: 900;
}

.quick-delivery-detail-body {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #e1e8df;
  border-radius: 8px;
  background: #ffffff;
}

.quick-delivery-request-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.quick-delivery-request-card p {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 8px;
  margin: 5px 0;
  color: var(--muted);
  line-height: 1.35;
}

.quick-delivery-request-card p span {
  color: #465149;
  font-weight: 800;
}

.quick-delivery-request-card time {
  display: block;
  margin-top: 6px;
  color: #7f897f;
  font-size: 12px;
}

.transfer-registration-notice {
  border-color: #dfb45d;
  background: #fff3c8;
  color: #7b4c00;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .quick-delivery-request-card {
    grid-template-columns: 1fr;
  }

  .quick-delivery-request-card .primary-button {
    width: 100%;
  }
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.danger-button {
  background: #ffe9e6;
  color: var(--danger);
}

.warn-button {
  background: #fff2d9;
  color: var(--warn);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: #edf2ee;
  color: var(--muted);
}

.status-pending_payment {
  background: #fff2d9;
  color: var(--warn);
}

.status-paid {
  background: #dbf4e6;
  color: var(--paid);
}

.status-amount_mismatch,
.status-cancelled {
  background: #ffe9e6;
  color: var(--danger);
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.search-panel {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  padding: 10px 0 12px;
  background: rgba(251, 251, 247, 0.96);
  backdrop-filter: blur(10px);
}

.search-panel label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-panel input {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}

.product-group {
  display: grid;
  gap: 10px;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.group-title h2 {
  margin: 0;
  font-size: 18px;
}

.group-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.product-group-list {
  display: grid;
  gap: 10px;
}

.product-card,
.panel,
.order-card,
.queue-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.product-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  min-height: 204px;
  overflow: hidden;
}

.preview-product-card {
  min-height: 154px;
}

.product-card img {
  width: 112px;
  height: 100%;
  min-height: 204px;
  object-fit: cover;
  background: #e9eee8;
}

.product-image-button {
  display: block;
  width: 112px;
  min-height: 204px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: #e9eee8;
  cursor: zoom-in;
  overflow: hidden;
}

.product-image-button img {
  display: block;
  border-right: 0;
}

.preview-product-card img {
  min-height: 154px;
}

.preview-product-card .product-image-button {
  min-height: 154px;
}

.product-body {
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.transfer-card {
  min-height: 176px;
}

.transfer-card img {
  min-height: 176px;
}

.transfer-memo {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  word-break: keep-all;
}

.transfer-apply-button {
  width: 100%;
}

.transfer-product-group {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.customer-page .transfer-group-title h2 {
  border-color: #d9e7dd;
  background: #f3fbf5;
  color: #246245;
}

.customer-transfer-card {
  border-color: #d9e7dd;
  background: #fcfffd;
}

.customer-transfer-card .transfer-apply-button {
  min-height: 48px;
  background: #2f7a55;
}

.transfer-submit-panel {
  margin-bottom: 12px;
}

.transfer-submit-form {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.transfer-image-picker {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f5f8;
  color: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

.transfer-image-picker img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.transfer-image-picker span {
  position: relative;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 18px rgba(42, 24, 35, 0.12);
}

.transfer-image-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.transfer-submit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.transfer-submit-fields .field:first-child,
.transfer-submit-fields .primary-button {
  grid-column: 1 / -1;
}

.transfer-admin-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.transfer-request-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.transfer-admin-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f1f5;
}

.transfer-admin-card strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.transfer-admin-card p,
.transfer-admin-card time {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.transfer-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.transfer-admin-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.product-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.product-title h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.price {
  margin: 5px 0 0;
  color: var(--accent-dark);
  font-weight: 800;
}

.full-box {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stock {
  color: var(--muted);
  font-size: 13px;
  flex: 0 0 auto;
  text-align: right;
}

.preview-stock {
  min-width: 68px;
  color: #7d465a;
  font-weight: 900;
}

.stepper {
  display: grid;
  grid-template-columns: 44px 52px 44px;
  align-items: center;
  width: 140px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.stepper button {
  height: 44px;
  background: #eef3ed;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.stepper span {
  text-align: center;
  font-weight: 800;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-controls {
  justify-content: flex-end;
}

.full-box-button {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #ddc7cf;
  border-radius: 8px;
  background: #fff8fa;
  color: #7d465a;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.checkout-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(251, 251, 247, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  padding: 12px 16px;
  z-index: 5;
}

.checkout-inner {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.checkout-total strong {
  display: block;
  font-size: 20px;
}

.checkout-total span {
  color: var(--muted);
  font-size: 13px;
}

.customer-page {
  background: #fbfbf7;
}

.customer-page .customer-shell {
  padding-top: 14px;
}

.customer-page .topbar {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-content: stretch;
  gap: 10px;
  padding: 14px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.customer-page .topbar > div {
  min-width: 0;
}

.customer-page .nav-links {
  margin-left: 0;
  width: 100%;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 5px;
  flex-wrap: nowrap;
}

.customer-page .topbar h1 {
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
}

.customer-page .topbar h1::after {
  content: none;
}

.customer-page .nav-links a,
.customer-page .ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.customer-page #previewProductsButton.has-preview-products {
  border-color: #c75055;
  background: #d95159;
  color: #fff;
}

.customer-page .quick-delivery-button {
  border-color: #6fac84;
  background: #e7f6ec;
  color: #1f6b3d;
  font-weight: 900;
}

.customer-page .guide-nav-button {
  border-color: #e0c400;
  background: #fee500;
  color: #191600;
  font-weight: 900;
}

.customer-contact-links {
  position: fixed;
  top: 38vh;
  right: 0;
  z-index: 80;
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #d9cbe2;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: #faf7fc;
  box-shadow: 0 4px 12px rgb(66 45 78 / 16%);
}

.customer-contact-links a {
  display: grid;
  width: 58px;
  min-height: 48px;
  padding: 5px 4px;
  place-items: center;
  border: 0;
  color: #634c70;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.customer-contact-links .contact-chat {
  border-top: 1px solid #e4c900;
  background: #fee500;
  color: #191600;
}

.guide-modal {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.guide-modal .modal-body {
  max-width: none;
}

.guide-important {
  margin: 0;
  color: var(--accent-dark);
  font-size: 25px;
  text-align: center;
}

.guide-steps {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.guide-steps li::before {
  counter-increment: guide-step;
  content: counter(guide-step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0e8f3;
  color: var(--accent-dark);
  font-weight: 900;
}

.guide-steps strong,
.guide-steps span {
  grid-column: 2;
}

.guide-steps strong {
  grid-row: 1;
}

.guide-steps span {
  grid-row: 2;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guide-help {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.guide-nickname-note {
  grid-column: 2;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid #eadde3;
  border-radius: 8px;
  background: #fff7fa;
  color: #654b57;
  font-size: 13px;
  line-height: 1.55;
}

.guide-nickname-note b:first-child {
  color: var(--accent-dark);
}

.guide-input-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-column: 2;
  gap: 6px;
  margin-top: 8px;
}

.guide-input-preview div {
  min-width: 0;
  padding: 7px 6px;
  border: 1px solid #dce4dd;
  border-radius: 7px;
  background: #fbfdfb;
}

.guide-input-preview b,
.guide-input-preview em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-input-preview b {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.guide-input-preview em {
  margin-top: 3px;
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.guide-modal a[x-apple-data-detectors] {
  color: inherit !important;
  font: inherit !important;
  text-decoration: none !important;
  pointer-events: none;
}

.guide-stepper-preview {
  display: flex;
  grid-column: 2;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}

.guide-stepper-preview img {
  display: block;
  width: 104px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.guide-stepper-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.guide-stepper-preview p b,
.guide-steps span b {
  color: var(--accent-dark);
}

.guide-shipping-note {
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid #e4d6bc;
  border-radius: 8px;
  background: #fffaf0;
  color: #69583a;
  font-size: 13px;
  line-height: 1.55;
}

.guide-shipping-note strong {
  display: block;
  margin-bottom: 3px;
}

.guide-limit-note {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
}

.guide-hide-options {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.guide-hide-options .check-row {
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
}

.guide-slide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.guide-slide-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.guide-slides {
  min-height: 390px;
}

.guide-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.guide-tabs button {
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.guide-tabs button.is-active {
  border-color: #e0c400;
  background: #fee500;
  color: #191600;
}

.guide-image-slides {
  display: block;
  min-height: 0;
}

.guide-image-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  overflow: visible;
  border: 1px solid #eadde3;
  border-radius: 10px;
  background: #fbfbf7;
  cursor: zoom-in;
}

.guide-slide-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(58dvh, 650px);
  border-radius: 8px;
  object-fit: contain;
}

.guide-zoom-modal {
  width: min(100vw, 560px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: auto;
  padding: 48px 10px 18px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: rgba(251, 251, 247, 0.98);
}

.guide-zoom-modal::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.guide-zoom-modal img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #fff;
}

.guide-zoom-close {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
  z-index: 2;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d9d9d0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.guide-slide {
  display: none;
  min-height: 390px;
  padding: 16px;
  border: 1px solid #eadde3;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, #fff8fb 100%);
  text-align: center;
}

.guide-slide.is-active {
  display: grid;
  align-content: start;
  gap: 10px;
}

.guide-slide-step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border-radius: 50%;
  background: #f0e8f3;
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 900;
}

.guide-slide h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
}

.guide-slide p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.guide-slide small {
  color: #654b57;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.guide-slide-visual {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 170px;
  margin: 8px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.guide-slide-visual img {
  max-width: 170px;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.guide-slide-visual strong {
  color: var(--accent-dark);
  font-size: 14px;
}

.guide-form-visual {
  grid-template-columns: 1fr;
  text-align: left;
}

.guide-form-visual span,
.guide-queue-visual span,
.guide-notice-visual span {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dce4dd;
  border-radius: 8px;
  background: #fbfdfb;
  color: var(--ink);
  font-weight: 900;
}

.guide-form-visual b,
.guide-form-visual em {
  display: block;
}

.guide-form-visual b {
  color: var(--muted);
  font-size: 12px;
}

.guide-form-visual em {
  margin-top: 3px;
  font-style: normal;
  font-size: 16px;
}

.guide-queue-visual,
.guide-notice-visual {
  align-content: center;
  text-align: left;
}

.guide-slide-actions {
  display: grid;
  grid-template-columns: 74px 1fr 74px;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.guide-slide-actions button {
  min-height: 38px;
}

.guide-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.guide-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d7c8cf;
}

.guide-dots button.is-active {
  width: 22px;
  border-radius: 999px;
  background: var(--accent);
}


.customer-page .primary-button,
.customer-page .checkout-bar .primary-button {
  background: #9a5f73;
  color: #fff;
}

.customer-page .primary-button:hover,
.customer-page .checkout-bar .primary-button:hover {
  background: #7d465a;
}

.customer-page .search-panel {
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 247, 0.95);
}

.customer-page .search-panel label,
.customer-page .group-title span {
  color: var(--muted);
}

.customer-page .search-panel input {
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 32, 26, 0.05);
}

.customer-page .group-title h2 {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #eadde3;
  border-radius: 8px;
  background: #fff7fa;
  color: #7d465a;
  font-size: 16px;
}

.customer-page .product-card {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 12px 26px rgba(23, 32, 26, 0.07);
}

.customer-page .product-card img {
  border-right: 1px solid var(--line);
}

.customer-page .product-image-button img {
  border-right: 0;
}

.customer-page .product-title h2 {
  color: var(--ink);
}

.customer-page .price {
  color: #8b4d61;
}

.customer-page .full-box {
  color: var(--muted);
}

.customer-page .stock {
  color: #7d465a;
  font-weight: 800;
}

.customer-page .stepper {
  border-color: var(--line);
  background: #fff;
}

.customer-page .stepper button {
  background: #f4eeee;
  color: #7d465a;
  font-weight: 900;
}

.customer-page .stepper span {
  background: #fff;
  color: var(--ink);
}

.customer-page .checkout-bar {
  border-top: 1px solid var(--line);
  background: rgba(251, 251, 247, 0.95);
}

.customer-page .checkout-total strong {
  color: var(--ink);
}

.queue-preview {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.queue-preview[hidden] {
  display: none;
}

.queue-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
}

.queue-preview-head strong {
  font-size: 14px;
}

.queue-preview-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.queue-preview-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.queue-preview-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #f1f6f1;
}

.queue-preview-item span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #5f7b66;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.queue-preview-item strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.modal {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(440px, calc(100vw - 32px));
  box-shadow: 0 30px 80px rgba(23, 32, 26, 0.26);
}

.order-complete-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 32px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.order-complete-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.order-complete-toast.is-visible .order-complete-modal,
.order-complete-toast.is-visible button {
  pointer-events: auto;
}

.order-complete-toast.is-fading {
  opacity: 0;
  transform: translate(-50%, -54%) scale(0.98);
}

.modal::backdrop {
  background: rgba(23, 32, 26, 0.45);
}

.modal-body {
  padding: 20px;
}

.lineup-image-modal {
  width: min(640px, calc(100vw - 32px));
}

.lineup-image-display {
  display: block;
  width: 100%;
  max-height: min(68vh, 700px);
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.product-lineup-button {
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.product-lineup-button.has-lineup-image {
  border-color: #87a892;
  background: #e7f2e9;
  color: #25623b;
}

.modal h2,
.panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.order-complete-modal {
  display: grid;
  gap: 12px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(23, 32, 26, 0.26);
  text-align: center;
}

.order-complete-modal h2 {
  margin: 0;
  font-size: 20px;
}

.order-complete-modal p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.order-complete-account {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #d9e3d8;
  border-radius: 8px;
  background: #f5f9f4;
  color: var(--ink);
  text-align: center;
}

.order-complete-account span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-complete-account input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.order-complete-modal .primary-button {
  width: 100%;
  min-height: 46px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.field input[readonly],
.field textarea[readonly] {
  background: #f5f7f4;
  color: var(--muted);
}

.helper-text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.login-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.login-status.active {
  color: #21734e;
}

.sales-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.sales-summary-cards article,
.sales-summary-table div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sales-summary-cards span,
.sales-summary-table span {
  color: var(--muted);
  font-size: 13px;
}

.sales-summary-cards strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.sales-summary-products h2 {
  margin: 20px 0 10px;
  font-size: 18px;
}

.sales-summary-table {
  display: grid;
  gap: 7px;
}

@media (max-width: 620px) {
  .sales-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 80px;
  resize: vertical;
}

.image-preview {
  display: none;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3ed;
}

.image-preview.visible {
  display: block;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-status[data-type="success"] {
  color: #25623b;
}

.form-status[data-type="error"] {
  color: #a83f3f;
}

.debug-panel {
  display: grid;
  gap: 10px;
}

.debug-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.debug-head h2 {
  margin: 0;
}

.debug-output {
  min-height: 120px;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f7f3;
  color: var(--ink);
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.check-row {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.completion {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.completion.visible {
  display: block;
}

.completion dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
}

.completion dt {
  color: var(--muted);
}

.completion dd {
  margin: 0;
  font-weight: 800;
}

.completion .primary-button {
  width: 100%;
  margin: 8px 0;
  min-height: 44px;
}

.payment-box {
  display: grid;
  gap: 8px;
  margin: 14px 0 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6faf6;
}

.payment-box p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.point-use-box[hidden],
.payment-summary-box [hidden] {
  display: none !important;
}

.point-use-box,
.payment-summary-box {
  display: grid;
  gap: 8px;
  margin: 12px 0 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.point-use-row,
.payment-summary-box div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.point-use-row strong,
.payment-summary-box strong {
  color: var(--ink);
  font-size: 15px;
}

.point-use-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.point-use-input-row button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(164, 93, 123, 0.28);
  border-radius: 8px;
  background: #fff6fa;
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

.payment-summary-box .payment-due {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
}

.payment-summary-box .payment-due strong {
  color: var(--primary);
  font-size: 18px;
}

@media (max-width: 620px) {
  .profile-readonly-grid {
    grid-template-columns: 1fr;
  }

  .order-modal-body {
    width: min(92vw, 360px);
    max-height: calc(100dvh - 44px);
    padding: 14px;
    overflow: auto;
  }

  .order-modal-body h2 {
    margin-bottom: 9px;
    font-size: 18px;
  }

  .order-modal-body .field {
    gap: 4px;
    margin-bottom: 8px;
  }

  .order-modal-body .field label {
    font-size: 12px;
  }

  .order-modal-body .field input {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 14px;
  }

  .order-modal-body .field textarea {
    min-height: 56px;
    padding: 8px 10px;
    font-size: 14px;
    resize: vertical;
  }

  .order-modal-body .point-use-box,
  .order-modal-body .payment-summary-box,
  .order-modal-body .payment-box {
    gap: 5px;
    margin: 8px 0 0;
    padding: 9px 10px;
  }

  .order-modal-body .point-use-row,
  .order-modal-body .payment-summary-box div {
    font-size: 12px;
  }

  .order-modal-body .point-use-row strong,
  .order-modal-body .payment-summary-box strong {
    font-size: 14px;
  }

  .order-modal-body .payment-summary-box .payment-due {
    padding-top: 5px;
  }

  .order-modal-body .payment-summary-box .payment-due strong {
    font-size: 16px;
  }

  .order-modal-body .payment-box p {
    font-size: 13px;
    line-height: 1.25;
  }

  .order-modal-body .form-actions {
    margin-top: 10px;
  }

  .order-modal-body .form-actions button {
    min-height: 40px;
    padding: 0 13px;
  }
}

.account-copy-box {
  margin: 12px 0 4px;
}

.account-number-display {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  letter-spacing: 0;
  text-align: center;
}

.account-bank-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
}

.account-bank-meta span + span::before {
  content: "·";
  margin-right: 8px;
}

.account-number-display strong {
  display: block;
  font-size: 17px;
  font-weight: 900;
}

.account-copy-button {
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
}

.account-auto-copy-note {
  margin: 6px 0 0;
  color: var(--muted) !important;
  font-size: 11px;
  text-align: center;
}

.card-notice-field textarea {
  min-height: 88px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
}

.payment-box .primary-button {
  width: 100%;
  min-height: 44px;
}

.lookup-result {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.lookup-section {
  display: grid;
  gap: 8px;
}

.lookup-section > h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 15px;
}

.lookup-order-list {
  display: grid;
  gap: 10px;
}

.lookup-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6faf6;
}

.lookup-card h3,
.lookup-card p {
  margin: 0;
}

.lookup-card ul {
  margin: 0;
  padding-left: 18px;
}

.point-balance-card {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d9c8d1;
  border-radius: 8px;
  background: #fff8fb;
  color: var(--ink);
}

.point-balance-card span {
  color: var(--muted);
  font-weight: 800;
}

.point-balance-card strong {
  color: var(--primary);
  font-size: 22px;
}

.customer-profile-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-profile-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.customer-profile-form {
  display: grid;
  gap: 10px;
}

.profile-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-readonly-grid div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
}

.profile-readonly-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.profile-readonly-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  word-break: break-all;
}

.customer-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: start;
}

.customer-toolbar {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.customer-register-form {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.customer-register-form h2 { margin: 0; font-size: 18px; }

.customer-register-form .helper-text { margin: 0; }

.customer-register-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.customer-register-fields .field { margin: 0; }

.customer-toolbar .field {
  flex: 1;
  margin: 0;
}

.customer-list {
  display: grid;
  gap: 8px;
}

.customer-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.customer-list-item span {
  color: var(--muted);
  font-size: 13px;
}

.customer-list-item b {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--primary);
}

.customer-list-item.selected {
  border-color: var(--primary);
  background: #fff8fb;
}

.point-admin-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.point-admin-head h2,
.point-admin-head p { margin: 0; }
.point-admin-head p { margin-top: 4px; color: var(--muted); }
.point-admin-head > strong { color: var(--primary); font-size: 22px; }
.point-admin-side {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 8px;
}
.point-admin-side > strong {
  color: var(--primary);
  font-size: 22px;
}
.point-admin-side .quick-delivery-button {
  min-height: 36px;
}
.customer-address-line {
  padding-top: 8px;
  line-height: 1.45;
}
.customer-address-line strong {
  color: var(--ink);
}
.customer-edit-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}
.customer-edit-form h3 {
  margin: 0;
  font-size: 16px;
}
.customer-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.customer-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.customer-edit-actions .primary-button,
.customer-edit-actions .ghost-button,
.customer-edit-actions .danger-button {
  flex: 1 1 auto;
}
.point-history { margin-top: 20px; }
.point-history h3 { margin: 0 0 10px; }
.point-history-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.point-history-row div { display: grid; gap: 2px; }
.point-history-row span, .point-history-row time { color: var(--muted); font-size: 13px; }
.point-plus { color: #16784d; }
.point-minus { color: #b33d54; }

@media (max-width: 760px) {
  .customer-admin-layout { grid-template-columns: 1fr; }
  .customer-toolbar { align-items: stretch; }
  .customer-register-fields { grid-template-columns: 1fr; }
  .customer-edit-grid { grid-template-columns: 1fr; }
  .customer-edit-actions { flex-direction: column; }
}

.admin-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

.panel {
  padding: 16px;
}

.stack {
  display: grid;
  gap: 12px;
}

.order-card {
  padding: 14px;
}

.order-card.order-row-even {
  background: #ffffff;
}

.order-card.order-row-odd {
  background: #eaf6ef;
}

.order-card.order-row-done {
  background: #e7e7e0;
  opacity: 0.82;
}

.order-card.order-row-done .order-head h3,
.order-card.order-row-done .order-head p {
  color: var(--muted);
}

.order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.order-head h3 {
  margin: 0;
  font-size: 17px;
}

.order-number-line {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.order-main-line {
  color: #102018;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.32;
  letter-spacing: 0;
}

.order-item-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.payment-due-meta strong {
  color: #8c4e65;
}

.payment-due-meta small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.order-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 55%);
  font-size: 14px;
  font-weight: 700;
}

.order-item-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.order-item-quantity,
.order-item-cancel {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.order-item-quantity {
  color: #25623b;
}

.order-item-cancel {
  color: #9a4254;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.meta-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  min-height: 58px;
}

.meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.meta-grid strong {
  font-size: 14px;
}

.copy-phone-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  text-align: left;
}

.copy-phone-button:hover {
  color: var(--primary);
  text-decoration: underline;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proxy-order-panel {
  margin-bottom: 12px;
}

.proxy-order-page {
  padding: 18px;
}

.proxy-order-page .proxy-order-head h2 {
  font-size: 22px;
}

.proxy-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.proxy-order-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.proxy-order-flow span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #cfe0d3;
  border-radius: 8px;
  background: #f2f8f3;
  color: #25623b;
  font-size: 13px;
  font-weight: 900;
}

.proxy-order-head h2,
.proxy-order-head p,
.proxy-order-column h3,
.proxy-cart h3 {
  margin: 0;
}

.proxy-order-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.proxy-order-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  gap: 14px;
  min-width: 0;
}

.proxy-order-column,
.proxy-cart {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.proxy-order-column,
.proxy-order-summary {
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
}

.proxy-result-list,
.proxy-cart-list {
  display: grid;
  gap: 8px;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding-right: 2px;
}

.proxy-cart-list {
  max-height: min(30vh, 260px);
}

.proxy-result-item,
.proxy-selected-box,
.proxy-cart-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
}

.proxy-result-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.proxy-result-item:hover {
  border-color: #9bc8ad;
  background: #f7fbf7;
}

.proxy-product-item img {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  background: #e9eee8;
}

.proxy-result-main {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.proxy-result-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proxy-customer-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #e6f4ea;
  color: #12633d;
  font-size: 16px;
  font-weight: 900;
}

.proxy-result-item strong,
.proxy-result-item span,
.proxy-selected-box strong,
.proxy-selected-box span {
  display: block;
}

.proxy-result-item span,
.proxy-selected-box span,
.proxy-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.proxy-selected-box.selected {
  border-color: #8dc7a5;
  background: #f0faf3;
}

.proxy-product-add,
.proxy-cart-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.proxy-product-add input {
  width: 46px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.proxy-cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.proxy-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.proxy-cart-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.proxy-cart-controls button {
  min-width: 32px;
  min-height: 30px;
  border-radius: 8px;
  background: #eef3ed;
  color: var(--ink);
  font-weight: 900;
}

.proxy-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.proxy-order-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
}

.point-add-button {
  color: #25623b;
}

@media (max-width: 1080px) {
  .proxy-order-body {
    grid-template-columns: 1fr;
  }

  .proxy-order-summary {
    order: 2;
  }

  .proxy-cart-list {
    max-height: 220px;
  }
}

@media (max-width: 900px) {
  .proxy-order-grid {
    grid-template-columns: 1fr;
  }
}

.transfer-redraw-button {
  color: #75519a;
}

.redraw-order-pill {
  border-color: #d7b6ce;
  background: #fbf1f6;
  color: #8b4d61;
}

.transfer-request-pill {
  border-color: #8bbba2;
  background: #edf8f1;
  color: #25623b;
}

.order-alert-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-queue-summary {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-queue-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-queue-summary h2,
.admin-queue-summary p {
  margin: 0;
}

.admin-queue-summary h2 {
  font-size: 17px;
}

.admin-queue-summary-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-queue-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.admin-queue-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  column-gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffafc;
}

.admin-queue-item strong {
  color: var(--accent-dark);
  font-size: 18px;
  line-height: 1.2;
}

.admin-queue-item span {
  align-self: center;
  font-weight: 800;
}

.admin-queue-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #efe3e8;
}

.admin-queue-name {
  min-width: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.admin-queue-item p {
  grid-column: 1 / -1;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.block-log-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.block-log-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.block-log-heading strong {
  flex: 0 0 auto;
}

.block-log-heading span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.block-release-button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
}

.quick-delivery-due-panel {
  border-color: #e2b9c8;
  background: #fff7fa;
}

.quick-delivery-due-item {
  grid-template-columns: minmax(0, 1fr) auto;
  background: #fff;
}

.quick-delivery-due-heading {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.quick-delivery-due-heading span {
  color: var(--muted);
  font-size: 13px;
}

.quick-delivery-due-delete {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
}

.admin-queue-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
}

#adminQueue.admin-queue-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

#adminQueue .admin-queue-item {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 4px;
  padding: 7px;
}

#adminQueue .admin-queue-number {
  width: 22px;
  height: 22px;
  font-size: 13px;
}

#adminQueue .admin-queue-name {
  font-size: 14px;
  line-height: 1.15;
}

#adminQueue .admin-queue-item p {
  display: none;
}

.order-alert-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(37 31 33 / 45%);
}

.order-alert-gate.hidden {
  display: none;
}

.order-alert-gate-card {
  width: min(100%, 390px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.order-alert-gate-card .eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.order-alert-gate-card h2 {
  margin: 0;
  font-size: 22px;
}

.order-alert-gate-card p:not(.eyebrow) {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.order-alert-gate-card .primary-button {
  width: 100%;
}

.order-alert-gate-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.order-alert-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.order-notice {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: none;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #e7c1ce;
  border-radius: 8px;
  background: #fff1f5;
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.order-notice.visible {
  display: block;
}

.ledger-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.ledger-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.ledger-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ledger-toolbar input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
}

.ledger-search-field {
  min-width: min(280px, 100%);
  flex: 1 1 240px;
}

.ledger-table {
  width: 100%;
  min-width: 2240px;
  border-collapse: collapse;
  font-size: 14px;
}

.ledger-table th,
.ledger-table td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.ledger-table th {
  background: #eef3ed;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.ledger-table td.num {
  text-align: right;
  white-space: nowrap;
}

.ledger-table .ledger-row-odd {
  background: #eaf6ef;
}

.ledger-table .ledger-row-even {
  background: #fff;
}

.gift-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf6;
}

.gift-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.gift-panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.gift-list {
  display: grid;
  gap: 8px;
}

.gift-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
}

.gift-row span {
  color: var(--muted);
  font-size: 13px;
}

.product-edit-grid {
  display: grid;
  grid-template-columns: 96px repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin: 12px 0;
}

.product-image-edit {
  display: grid;
  gap: 8px;
}

.product-image-edit input {
  display: none;
}

.product-image-edit img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3ed;
  align-self: stretch;
}

.inventory-controls {
  display: grid;
  gap: 7px;
  margin: 4px 0 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.inventory-control-row {
  display: grid;
  grid-template-columns: 72px 78px auto;
  gap: 7px;
  align-items: center;
}

.inventory-control-row strong {
  font-size: 13px;
}

.inventory-control-row input {
  min-width: 0;
}

.inventory-control-row button {
  min-height: 36px;
  padding: 6px 10px;
  white-space: nowrap;
}

.product-memo-field {
  grid-column: span 2;
}

.product-memo-field textarea {
  min-height: 60px;
  resize: vertical;
}

.inventory-history {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.inventory-history summary {
  cursor: pointer;
  font-weight: 800;
}

.inventory-history ul {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.inventory-history li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.inventory-history li strong {
  color: var(--ink);
}

.inventory-empty {
  margin: 8px 0 0;
}

.queue-list {
  display: grid;
  gap: 10px;
}

.seller-talk {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0 0 10px;
}

.seller-talk label {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.seller-talk span {
  display: grid;
  place-items: center;
  height: 100%;
  background: #eef3ed;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.seller-talk input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  outline: 0;
}

.queue-row {
  display: grid;
  grid-template-columns: 68px minmax(150px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.queue-name {
  min-width: 0;
}

.queue-number {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.queue-row h2 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.queue-row p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.queue-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-self: start;
  text-align: left;
  color: var(--ink);
  font-weight: 800;
}

.queue-items span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  line-height: 1.2;
}

.empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

@media (max-width: 760px) {
  .topbar {
    display: grid;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .proxy-order-body,
  .proxy-order-grid,
  .proxy-order-options,
  .proxy-order-flow {
    grid-template-columns: 1fr;
  }

  .proxy-result-list,
  .proxy-cart-list {
    max-height: none;
    overflow: visible;
  }

  .proxy-product-item,
  .proxy-cart-item {
    align-items: stretch;
    flex-direction: column;
  }

  .proxy-result-item {
    align-items: center;
  }

  .proxy-product-add {
    width: 100%;
  }

  .proxy-product-add input,
  .proxy-product-add button {
    flex: 1 1 0;
  }

  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gift-panel-head,
  .gift-row {
    grid-template-columns: 1fr;
  }

  .gift-panel-head {
    display: grid;
  }

  .product-edit-grid {
    grid-template-columns: 80px 1fr;
  }

  .product-edit-grid img {
    width: 80px;
    height: 80px;
  }

  .inventory-control-row {
    grid-template-columns: 72px 74px 1fr;
  }

  .product-memo-field {
    grid-column: auto;
  }

  .inventory-history li {
    display: grid;
    gap: 2px;
  }

  .transfer-admin-card,
  .transfer-request-card {
    grid-template-columns: 1fr;
  }

  .transfer-admin-card img {
    width: 100%;
    height: 160px;
  }

  .transfer-submit-form,
  .transfer-submit-fields {
    grid-template-columns: 1fr;
  }

  .transfer-submit-fields .field:first-child,
  .transfer-submit-fields .primary-button {
    grid-column: auto;
  }

  .transfer-admin-actions {
    justify-content: stretch;
  }

  .transfer-admin-actions button {
    flex: 1 1 90px;
  }

  .customer-page .quantity-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .customer-page .stepper {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin-top: 0;
  }

  .customer-page .full-box-button,
  .customer-page .product-lineup-button {
    width: 100%;
    min-height: 46px;
    padding: 8px 6px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding: 14px 10px 152px;
  }

  .customer-page .topbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
  }

  .customer-page .topbar > div {
    width: 100%;
  }

  .customer-page .nav-links {
    justify-self: end;
    justify-content: flex-end;
    gap: 4px;
  }

  .topbar h1 {
    font-size: 25px;
    line-height: 1.2;
    word-break: keep-all;
  }

  .topbar p {
    font-size: 13px;
  }

  .product-card {
    grid-template-columns: 104px 1fr;
    min-height: 224px;
  }

  .product-card img {
    width: 104px;
    min-height: 224px;
  }

  .product-image-button {
    width: 104px;
    min-height: 224px;
  }

  .product-body {
    padding: 12px 10px 18px;
    gap: 8px;
  }

  .product-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
  }

  .product-title h2 {
    font-size: 16px;
    min-height: 42px;
  }

  .price {
    margin-top: 3px;
  }

  .full-box {
    font-size: 12px;
  }

  .stock {
    font-size: 12px;
    justify-self: end;
    padding-top: 2px;
    white-space: nowrap;
  }

  .stepper {
    width: 148px;
    grid-template-columns: 48px 52px 48px;
    height: 46px;
    margin-top: 4px;
  }

  .stepper button {
    height: 46px;
  }

  .full-box-button {
    min-height: 46px;
    padding: 8px 9px;
    font-size: 12px;
  }

  .checkout-inner {
    grid-template-columns: 1fr;
  }

  .checkout-inner .primary-button {
    width: 100%;
    min-height: 48px;
  }

  .queue-row {
    grid-template-columns: 54px 1fr;
    gap: 10px;
    padding: 12px;
  }

  .seller-talk {
    grid-template-columns: 1fr;
  }

  .queue-number {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .queue-row h2 {
    font-size: 22px;
  }

  .queue-row p {
    font-size: 16px;
  }

  .queue-preview-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .queue-preview-item {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 3px;
    padding: 5px;
  }

  .queue-preview-item span {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .queue-preview-item strong {
    font-size: 11px;
    line-height: 1.15;
  }

  .guide-modal {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
  }

  .guide-modal .modal-body {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
    gap: 4px;
    height: 100dvh;
    min-height: 0;
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  }

  .guide-important {
    font-size: 19px;
    line-height: 1.1;
  }

  .guide-steps {
    gap: 6px;
    margin: 10px 0;
  }

  .guide-steps li {
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 7px;
    align-items: start;
    padding: 6px;
  }

  .guide-steps li::before {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .guide-steps strong {
    font-size: 12px;
    line-height: 1.2;
  }

  .guide-steps span {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.3;
  }

  .guide-nickname-note {
    margin-top: 5px;
    padding: 6px;
    font-size: 10px;
    line-height: 1.35;
  }

  .guide-input-preview {
    gap: 4px;
    margin-top: 5px;
  }

  .guide-input-preview div {
    padding: 5px 4px;
  }

  .guide-input-preview b {
    font-size: 8px;
  }

  .guide-input-preview em {
    margin-top: 2px;
    font-size: 9px;
  }

  .guide-stepper-preview {
    gap: 6px;
    margin-top: 5px;
  }

  .guide-stepper-preview img {
    width: 84px;
    border-radius: 5px;
  }

  .guide-stepper-preview p {
    font-size: 9px;
    line-height: 1.25;
  }

  .guide-shipping-note {
    margin-bottom: 6px;
    padding: 7px;
    font-size: 10px;
    line-height: 1.35;
  }

  .guide-shipping-note strong {
    margin-bottom: 1px;
  }

  .guide-limit-note {
    margin-bottom: 6px;
    font-size: 9px;
    line-height: 1.2;
  }

  .guide-hide-options {
    gap: 8px;
    margin-bottom: 5px;
  }

  .guide-hide-options .check-row {
    font-size: 10px;
  }

  .guide-slide-head {
    margin-bottom: 0;
  }

  .guide-slides {
    min-height: 0;
    overflow: hidden;
  }

  .guide-tabs {
    gap: 5px;
    margin-bottom: 0;
  }

  .guide-tabs button {
    min-height: 34px;
    padding: 0 6px;
    font-size: 12px;
  }

  .guide-image-slides {
    min-height: 0;
  }

  .guide-image-frame {
    height: 100%;
    max-height: none;
    overflow: hidden;
    border-radius: 8px;
    cursor: default;
  }

  .guide-slide-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
    border-radius: 8px;
    object-fit: contain;
  }

  .guide-slide-actions {
    position: static;
    z-index: 3;
    grid-template-columns: 56px 1fr 56px;
    margin: 0;
    padding: 4px;
    border: 1px solid rgba(234, 221, 227, 0.9);
    border-radius: 10px;
    background: rgba(251, 251, 247, 0.94);
    box-shadow: none;
  }

  .guide-slide-actions button {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .guide-dots {
    gap: 3px;
  }

  .guide-dots button {
    width: 5px;
    height: 5px;
  }

  .guide-dots button.is-active {
    width: 14px;
  }

  .guide-hide-options,
  .guide-modal .form-actions {
    position: static;
    z-index: 4;
    background: rgba(251, 251, 247, 0.96);
  }

  .guide-slide {
    min-height: 330px;
    padding: 12px;
    gap: 7px;
  }

  .guide-slide-step {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .guide-slide h3 {
    font-size: 20px;
  }

  .guide-slide p {
    font-size: 13px;
    line-height: 1.35;
  }

  .guide-slide small {
    font-size: 11px;
    line-height: 1.35;
  }

  .guide-slide-visual {
    min-height: 138px;
    margin: 5px 0;
    padding: 10px;
  }

  .guide-slide-visual img {
    max-width: 132px;
  }

  .guide-form-visual span,
  .guide-queue-visual span,
  .guide-notice-visual span {
    padding: 8px 10px;
  }

  .guide-form-visual em {
    font-size: 14px;
  }

  .guide-slide-actions {
    grid-template-columns: 64px 1fr 64px;
    margin: 6px 0;
  }

  .guide-modal .form-actions {
    margin-top: 0;
  }

  .guide-modal .primary-button {
    min-height: 38px;
    padding: 8px 12px;
  }

}
