* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f4f5ef;
  color: #233c32;
  font:
    16px/1.6 system-ui,
    sans-serif;
}
main {
  width: min(100% - 32px, 480px);
  margin: 8vh auto;
}
.brand {
  font-size: 24px;
  font-weight: 750;
  margin-bottom: 28px;
}
.brand span {
  font-size: 13px;
  font-weight: 400;
  color: #657c70;
  margin-left: 10px;
}
section {
  background: #fff;
  border: 1px solid #dbe2d8;
  border-radius: 18px;
  padding: 28px;
}
h1 {
  font-size: 26px;
  margin: 0 0 8px;
}
h2 {
  font-size: 20px;
  margin-top: 28px;
}
p,
footer {
  color: #68796e;
}
label {
  display: block;
  margin: 16px 0;
}
input,
button {
  font: inherit;
  border-radius: 9px;
  padding: 12px;
  width: 100%;
}
input {
  border: 1px solid #b6c6ba;
  margin-top: 6px;
}
button {
  border: 0;
  background: #28674d;
  color: white;
  font-weight: 650;
  margin-top: 12px;
  cursor: pointer;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
summary {
  cursor: pointer;
  color: #28674d;
  padding: 12px 0;
  font-weight: 650;
}
summary:focus-visible {
  outline: 3px solid #b5d6a8;
  outline-offset: 2px;
}
input:focus,
button:focus-visible {
  outline: 3px solid #b5d6a8;
  outline-offset: 2px;
}
.secondary {
  background: #edf2ec;
  color: #28674d;
}
footer {
  font-size: 12px;
  text-align: center;
  margin: 24px 0;
}
.error {
  color: #a12429;
  background: #fff0ed;
  padding: 10px;
  border-radius: 8px;
}
.success {
  color: #28674d;
}
small {
  color: #68796e;
}
#message:empty {
  display: none;
}
@media (max-width: 420px) {
  section {
    padding: 22px;
  }
  main {
    margin: 5vh auto;
  }
}
select,
textarea {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid #b6c6ba;
  border-radius: 9px;
  margin-top: 6px;
  background: white;
  color: inherit;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
article {
  border-top: 1px solid #dbe2d8;
  padding: 20px 0;
  overflow-wrap: anywhere;
}
article img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #f4f5ef;
  border-radius: 10px;
}
article h3 {
  margin-bottom: 8px;
}
.price {
  color: #28674d;
  font-size: 22px;
  font-weight: 700;
}
dialog {
  width: min(92vw, 480px);
  max-height: 90vh;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  padding: 24px;
}
dialog::backdrop {
  background: #102b20aa;
}
.description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
a {
  color: #28674d;
}
.cart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-controls input {
  min-width: 60px;
  text-align: center;
}
.cart-controls button {
  min-width: 44px;
}

/* A prototype: quiet green sidebar, compact rows, and a focused workspace. */
body.admin-mode {
  background: #eef1f3;
  color: #20322d;
}
body.admin-mode main {
  width: min(1420px, calc(100% - 48px));
  margin: 24px auto;
}
.admin-mode main > .brand,
.admin-mode main > footer {
  display: none;
}
.admin-mode #app {
  padding: 0;
  border: 1px solid #dfe6e2;
  border-radius: 12px;
  background: #f8faf9;
}
.admin-shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 760px;
}
.admin-sidebar {
  padding: 32px 20px;
  background: #edf3ef;
  border-right: 1px solid #dce5df;
  border-radius: 12px 0 0 12px;
}
.wordmark {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.6px;
  margin-bottom: 42px;
}
.wordmark span {
  display: block;
  color: #84978c;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
}
.admin-nav {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 24px;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}
.admin-nav a[aria-current="page"] {
  background: #fff;
  box-shadow: 0 2px 6px #163d2710;
  color: #145a3c;
}
.admin-nav a:hover {
  background: #fff;
}
.admin-mode a:focus-visible,
.admin-mode summary:focus-visible {
  outline: 3px solid #87ad77;
  outline-offset: 3px;
}
.admin-mode .aside-note {
  margin-top: 80px;
}
.admin-workspace {
  padding: 32px;
  min-width: 0;
  position: relative;
}
.admin-workspace [hidden] {
  display: none !important;
}
.workspace-title {
  margin-bottom: 28px;
  padding-right: 150px;
}
.admin-mode .eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: #83948a;
  font-weight: 650;
}
.admin-mode h1 {
  font-size: 28px;
  letter-spacing: -0.7px;
  line-height: 1.3;
}
.workspace-title h1:focus {
  outline: none;
}
.admin-mode h2 {
  font-size: 19px;
  margin: 0;
}
.admin-mode h3 {
  font-size: 17px;
  margin: 0;
}
.admin-mode p {
  margin: 8px 0;
  color: #6d7a74;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.admin-mode label {
  font-size: 14px;
  margin: 8px 0;
}
.admin-mode input,
.admin-mode select,
.admin-mode textarea {
  background: white;
  font-size: 16px;
  min-width: 0;
}
.admin-mode button,
.admin-mode summary {
  width: auto;
  margin: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
}
.admin-mode button {
  background: #216449;
  color: white;
}
.admin-mode button.secondary,
.product-actions button,
.admin-mode .category-row button {
  background: transparent;
  border: 1px solid #d7e0db;
  color: #274b3c;
}
.admin-mode summary {
  color: #274b3c;
  cursor: pointer;
}
.admin-catalog[data-view="products"] .catalog-categories,
.admin-catalog[data-view="categories"] .catalog-products {
  display: none;
}
.new-product > summary,
.new-category > summary {
  position: absolute;
  right: 32px;
  top: 66px;
  background: #216449;
  color: white;
  list-style: none;
}
.new-product > summary::before,
.new-category > summary::before {
  content: "＋ ";
}
.new-product form,
.new-category form {
  padding: 24px;
  border: 1px solid #e0e6e2;
  border-radius: 10px;
  background: white;
  margin: 16px 0;
  max-width: 640px;
}
.catalog-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.admin-mode #admin-products {
  display: block;
  background: #fff;
  border: 1px solid #e0e6e2;
  border-radius: 10px;
  padding: 0 20px;
}
.admin-mode .product-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #edf0ed;
  padding: 20px 0;
}
.product-row:last-child {
  border-bottom: 0;
}
.admin-mode .product-row > img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 10px;
}
.product-info {
  flex: 1;
  min-width: 120px;
}
.product-price {
  font-size: 16px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: start;
}
.admin-mode .product-actions button,
.admin-mode .product-actions summary {
  padding: 7px 10px;
}
.product-actions summary {
  border: 1px solid #d7e0db;
  list-style: none;
}
.product-actions details[open] {
  flex-basis: 100%;
}
.price-editor form {
  padding: 12px;
  background: #f8faf9;
  border: 1px solid #d7e0db;
  border-radius: 8px;
}
.product-more[open] button {
  margin-top: 8px;
}
.admin-mode #category-list {
  padding: 8px 24px;
  background: #fff;
  border: 1px solid #e0e6e2;
  border-radius: 10px;
}
.category-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #edf0ed;
}
.category-row:last-child {
  border: 0;
}
.category-row > strong {
  flex: 1;
  overflow-wrap: anywhere;
  min-width: 80px;
}
.admin-mode .category-row summary {
  border: 1px solid #d7e0db;
  list-style: none;
}
.category-row details[open] {
  flex-basis: 100%;
  order: 2;
}
.category-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
}
.category-editor input {
  flex: 1;
  min-width: 120px;
}
.muted {
  color: #7d8b82;
  font-size: 13px;
}
.account-panel {
  max-width: 480px;
  padding: 24px;
  background: #fff;
  border: 1px solid #e0e6e2;
  border-radius: 10px;
}
.admin-mode .account-panel h1 {
  font-size: 19px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e4eee7;
  color: #38674c;
  margin-bottom: 16px;
}
.admin-mode .account-panel summary {
  background: #216449;
  color: white;
  margin: 16px 0;
  list-style: none;
  text-align: center;
}
.admin-mode .account-panel button {
  display: block;
  margin-top: 14px;
  width: 100%;
}
#account {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.admin-mode .order-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 18px;
  margin-top: 24px;
}
.admin-mode .order-list article {
  padding: 22px;
  border: 1px solid #e0e6e2;
  border-radius: 10px;
  background: #fff;
  min-width: 0;
}
.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.admin-mode .card-heading h3 {
  font-size: 18px;
  letter-spacing: 0.5px;
  overflow-wrap: anywhere;
}
.card-heading span {
  color: #8a958f;
  font-size: 12px;
  white-space: nowrap;
}
.order-list article > p {
  min-height: 44px;
}
.order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
}
.order-total strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.status {
  background: #e8f0e9;
  color: #437251;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
}
.order-breakdown {
  margin-bottom: 12px;
}
.admin-mode .order-breakdown summary {
  padding-left: 0;
}
.admin-mode .order-actions {
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-areas: "adjust cancel complete";
  justify-content: end;
  gap: 12px;
}
.admin-mode .order-actions button {
  margin: 0;
  padding: 10px 12px;
  white-space: nowrap;
}
.admin-mode .order-actions [data-action="completed"] {
  grid-area: complete;
}
.admin-mode .order-actions [data-action="adjust"] {
  grid-area: adjust;
  background: transparent;
  border: 1px solid #216449;
  color: #216449;
}
.admin-mode .order-actions [data-action="cancelled"] {
  grid-area: cancel;
  background: transparent;
  border: 1px solid transparent;
  color: #65736b;
}
.admin-mode .order-actions [data-action="adjust"]:hover,
.admin-mode .order-actions [data-action="cancelled"]:hover {
  background: #edf3ef;
}
#admin-orders > form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
#admin-orders > form label {
  width: min(100%, 340px);
  margin: 0;
}
.order-help {
  margin-bottom: 12px;
}
.order-help summary {
  display: inline-block;
  background: #dfede4;
  color: #1f5d3f;
}
.admin-mode dialog img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}
.admin-mode dialog button {
  margin-top: 12px;
}
@media (max-width: 700px) {
  body.admin-mode {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }
  body.admin-mode main {
    width: 100%;
    margin: 0;
  }
  .admin-mode #app {
    border: 0;
    border-radius: 0;
  }
  .admin-shell {
    display: block;
    min-height: 100vh;
  }
  .admin-sidebar {
    padding: 0;
    border: 0;
  }
  .wordmark,
  .aside-note {
    display: none;
  }
  .admin-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 10;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid #dfe6e2;
    background: #fff;
  }
  .admin-nav a {
    display: grid;
    justify-content: center;
    text-align: center;
    gap: 3px;
    padding: 5px 2px;
    font-size: 11px;
  }
  .admin-nav a > span {
    font-size: 20px;
  }
  .admin-nav a[aria-current="page"] {
    background: #edf4ee;
    box-shadow: none;
  }
  .admin-workspace {
    padding: 22px 18px;
  }
  .workspace-title {
    padding-right: 0;
    margin-bottom: 22px;
  }
  .admin-mode .workspace-title h1 {
    font-size: 25px;
  }
  .new-product > summary,
  .new-category > summary {
    position: static;
    display: inline-block;
    margin: 0 0 12px;
  }
  .catalog-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .catalog-filters > label:first-child {
    grid-column: 1 / -1;
  }
  .admin-mode #admin-products {
    padding: 0 12px;
  }
  .admin-mode .product-row {
    gap: 12px;
  }
  .admin-mode .product-row > img {
    width: 50px;
    height: 50px;
  }
  .admin-mode .product-info h3 {
    font-size: 15px;
  }
  .product-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .admin-mode #category-list {
    padding: 0 18px;
  }
  .category-row {
    gap: 8px;
  }
  .category-row > .muted:nth-of-type(2) {
    display: none;
  }
  .admin-mode .category-row button,
  .admin-mode .category-row summary {
    padding: 6px 10px;
  }
  .account-panel {
    padding: 18px;
  }
  .admin-mode .order-list {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 18px;
  }
  .admin-mode .order-list article {
    padding: 18px;
  }
  .admin-mode .order-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "complete complete" "adjust cancel";
    justify-content: stretch;
  }

  .order-list article > p {
    min-height: 0;
  }
  #admin-orders > form label {
    width: 100%;
  }
}

/* Customer A: image cards, category tabs, and a persistent selection summary. */
body.customer-mode {
  background: #f5f7f3;
  color: #243b32;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  line-height: 1.5;
}
.customer-mode main {
  width: min(1180px, 100%);
  padding: 0 30px 115px;
  margin: 0 auto;
}
.customer-mode main > .brand {
  display: none;
}
.customer-mode #app {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.customer-mode button {
  width: auto;
  margin: 0;
  font-size: 14px;
  padding: 12px 18px;
  min-height: 44px;
  background: #315f4b;
}
.customer-mode button:disabled {
  cursor: default;
}
.customer-mode h1,
.customer-mode h2,
.customer-mode h3,
.customer-mode p {
  margin: 0;
}
.customer-mode p {
  color: #758077;
}
.customer-mode .price {
  color: #243b32;
  font-weight: 700;
}
.customer-mode .customer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 27px 0;
  border-bottom: 1px solid #e3e8df;
  gap: 14px;
}
.customer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.6px;
}
.customer-brand small {
  display: block;
  letter-spacing: 2px;
  font-weight: 400;
  color: #758077;
  font-size: 10px;
  margin-top: 4px;
}
.customer-brand .brand-symbol {
  background: #315f4b;
  color: #fff;
  width: 37px;
  height: 42px;
  border-radius: 13px 13px 4px 13px;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 27px;
}
.customer-mode .customer-orders-toggle {
  border: 1px solid #e3e8df;
  background: #fff;
  color: #243b32;
  border-radius: 25px;
  padding: 10px 16px;
  font-size: 13px;
  white-space: nowrap;
  font-weight: 400;
}
.shop-intro {
  margin: 28px 0 22px;
  padding: 30px 38px;
  background: #e4ebdf;
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
}
.customer-mode .customer-eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  color: #758077;
  margin-bottom: 13px;
}
.shop-intro h1 {
  font-size: 36px;
  letter-spacing: -1px;
  line-height: 1.25;
  margin-bottom: 10px !important;
}
.shop-intro p:last-child {
  font-size: 13px;
  color: #637565;
}
.shop-intro > span {
  font-size: 100px;
  line-height: 1;
  color: #8fa882;
  transform: rotate(-12deg);
  margin-right: 50px;
}
.customer-categories {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  overflow: auto;
  scrollbar-width: none;
}
.customer-mode .customer-categories button {
  flex-shrink: 0;
  font-weight: 400;
  white-space: nowrap;
  font-size: 13px;
  padding: 11px 21px;
  border-radius: 25px;
  color: #758077;
  background: transparent;
}
.customer-mode .customer-categories [aria-pressed="true"] {
  background: #315f4b;
  color: white;
}
.customer-list-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 16px;
}
.customer-list-title h2 {
  font-size: 18px;
}
.customer-list-title span {
  font-size: 12px;
  color: #758077;
}
.customer-mode #products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.customer-mode .customer-product {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  background: #fff;
  border: 1px solid #e3e8df;
  border-radius: 14px;
  overflow: hidden;
}
.customer-mode .customer-picture {
  display: block;
  flex-shrink: 0;
  width: 100%;
  padding: 0;
  border-radius: 0;
  aspect-ratio: 1;
  background: #eef1e9;
}
.customer-mode .customer-picture img {
  height: 100%;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 0;
}
.customer-product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px;
}
.customer-mode .customer-category-caption {
  font-size: 10px;
  color: #758077;
  margin-bottom: 7px;
}
.customer-mode .customer-product h3 {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
}
.customer-product-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
}
.customer-mode .customer-product .price {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.customer-mode .cart-controls {
  width: auto;
  gap: 4px;
  max-width: 100%;
}
.customer-mode .cart-controls button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 400;
  border-radius: 10px;
}
.customer-mode .cart-controls button[aria-label="减少数量"] {
  background: #e8eee5;
  color: #315f4b;
}
.customer-mode .cart-controls input {
  min-width: 0;
  width: 42px;
  max-width: 100%;
  margin: 0;
  padding: 7px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 16px;
  text-align: center;
  appearance: textfield;
}
.customer-mode .cart-controls input::-webkit-inner-spin-button {
  appearance: none;
}
.customer-product-bottom .cart-controls {
  margin-left: auto;
}
.customer-mode .customer-cart-dock {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, calc(100% - 32px));
  padding: 12px;
  background: #fff;
  border: 1px solid #e3e8df;
  border-radius: 17px;
  box-shadow: 0 8px 35px #243b3218;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  z-index: 5;
}
.customer-mode .customer-bag-summary {
  padding: 8px;
  color: #315f4b;
  background: #e8eee5;
  font-size: 12px;
  overflow-wrap: anywhere;
  max-width: 40%;
}
.customer-cart-dock strong {
  font-size: 21px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.customer-cart-dock > button:last-child {
  flex-shrink: 0;
}
.customer-mode #shop-message:empty,
.customer-mode [role="alert"]:empty,
.customer-mode [role="status"]:empty {
  display: none;
}
.customer-mode .error,
.customer-mode [role="alert"]:not(:empty) {
  padding: 12px;
  border-radius: 9px;
  background: #fff0ed;
  color: #a12429;
  line-height: 1.7;
  margin: 12px 0;
}
.customer-mode .catalog-empty:not(:empty) {
  padding: 24px;
  border: 1px solid #e3e8df;
  border-radius: 12px;
  background: #fff;
  color: #52675a;
  text-align: center;
}
.customer-mode .catalog-empty button {
  display: block;
  margin: 16px auto 0;
}
.customer-mode main > footer {
  font-size: 11px;
  line-height: 1.8;
  margin: 45px 0 30px;
}
.customer-mode dialog {
  color: #243b32;
  background: #f5f7f3;
}
.customer-mode dialog::backdrop {
  background: #18251ee0;
  backdrop-filter: blur(4px);
}
.customer-mode .customer-detail {
  width: min(820px, calc(100% - 30px));
  padding: 0;
  max-height: 90dvh;
  border-radius: 20px;
  background: white;
}
.customer-mode #close-detail {
  position: absolute;
  right: 12px;
  top: 12px;
  background: #ffffffee;
  color: #243b32;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 25px;
  z-index: 2;
}
.customer-mode #detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.customer-gallery {
  background: #eef1e9;
  min-width: 0;
}
.customer-images {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.customer-images img {
  width: 100%;
  height: 100%;
  max-height: 410px;
  object-fit: contain;
}
.customer-mode [hidden] {
  display: none !important;
}
.customer-photo-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px;
}
.customer-mode .customer-photo-tabs button {
  padding: 7px 12px;
  background: transparent;
  border: 1px solid #d8ded2;
  color: #315f4b;
  min-width: 44px;
  min-height: 44px;
  font-size: 12px;
}
.customer-mode .customer-photo-tabs [aria-pressed="true"] {
  background: white;
  border-color: #315f4b;
}
.customer-photo-tabs span {
  font-size: 11px;
  color: #758077;
  margin-left: auto;
}
.customer-detail-info {
  padding: 46px 27px 24px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.customer-detail-info h2 {
  font-size: 25px;
  margin-bottom: 17px !important;
}
.customer-detail-info > .price {
  font-size: 25px;
}
.customer-detail-info .description {
  font-size: 13px;
  line-height: 1.9;
  margin: 25px 0;
}
.customer-fulfilment {
  border-block: 1px solid #e3e8df;
  padding: 15px 0;
  font-size: 12px;
}
.customer-detail-purchase {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 23px 0 14px;
}
.customer-flow-heading {
  padding: 0 0 30px;
}
.customer-mode .customer-flow-heading > button {
  background: transparent;
  color: #758077;
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 24px;
}
.customer-flow-heading h2 {
  font-size: 30px;
  letter-spacing: -1px;
  margin-bottom: 12px !important;
}
.customer-flow-heading > p:last-child {
  font-size: 13px;
  line-height: 1.7;
}
.customer-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
}
.customer-checkout-summary {
  background: white;
  padding: 26px;
  border: 1px solid #e3e8df;
  border-radius: 16px;
  align-self: start;
  min-width: 0;
  overflow-wrap: anywhere;
}
.customer-checkout-summary p:not(.price) {
  font-size: 12px;
  margin: 16px 0;
}
.customer-checkout-summary button {
  width: 100%;
  margin-top: 16px;
}
.customer-mode .customer-cart-total {
  font-size: 25px;
}
.customer-mode .customer-cart-line {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid #e3e8df;
  align-items: center;
}
.customer-mode .customer-cart-line img {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  flex-shrink: 0;
}
.customer-cart-line-info {
  flex: 1;
  min-width: 0;
}
.customer-cart-line-info h3 {
  font-size: 15px;
}
.customer-cart-line-info p {
  font-size: 12px;
  margin: 7px 0;
}

.customer-mode .customer-receipt {
  max-width: 590px;
  margin: 0 auto 26px;
  padding: 0;
  background: white;
  border: 1px solid #e3e8df;
  border-radius: 18px;
  overflow: hidden;
}
.customer-receipt-top {
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.customer-receipt-top small {
  font-size: 10px;
  color: #758077;
}
.customer-order-status {
  font-size: 11px;
  border-radius: 20px;
  background: #ecf1e7;
  color: #416346;
  padding: 7px 12px;
}
.customer-ticket-number {
  text-align: center;
  padding: 16px 18px 30px;
  border-bottom: 2px dashed #e3e8df;
}
.customer-ticket-number h3 {
  font-size: 28px;
  letter-spacing: 1px;
  font-family: ui-monospace, monospace;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.customer-ticket-number p {
  font-size: 13px;
  margin-top: 15px;
}
.customer-receipt-items {
  padding: 12px 26px;
}
.customer-receipt-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid #e3e8df;
  font-size: 14px;
}
.customer-receipt-line p,
.customer-receipt-line > span {
  font-size: 11px;
  color: #758077;
  margin-top: 6px;
}
.customer-receipt-items > .price {
  font-size: 23px;
  margin: 20px 0;
}
.customer-mode .customer-receipt footer {
  background: #e8eee5;
  padding: 16px;
  text-align: center;
  font-size: 11px;
  margin: 0;
}
@media (max-width: 900px) {
  .customer-mode #products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .customer-checkout-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}
@media (max-width: 600px) {
  .customer-mode main {
    padding: 0 16px 110px;
  }
  .customer-mode .customer-header {
    padding: 20px 0;
  }
  .customer-brand {
    font-size: 18px;
  }
  .customer-brand .brand-symbol {
    width: 32px;
    height: 36px;
    font-size: 23px;
  }
  .customer-mode .customer-orders-toggle {
    font-size: 11px;
    padding: 9px 12px;
  }
  .shop-intro {
    margin: 18px 0;
    padding: 25px 20px;
    border-radius: 14px;
  }
  .shop-intro h1 {
    font-size: 26px;
  }
  .shop-intro .customer-eyebrow {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  .shop-intro p:last-child {
    font-size: 11px;
  }
  .shop-intro > span {
    font-size: 65px;
    margin: 0 0 0 5px;
  }
  .customer-categories {
    gap: 3px;
    margin: 0 -5px;
  }
  .customer-mode .customer-categories button {
    font-size: 12px;
    padding: 10px 14px;
  }
  .customer-list-title {
    margin: 22px 0 14px;
  }
  .customer-list-title h2 {
    font-size: 16px;
  }
  .customer-mode #products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .customer-product-info {
    padding: 12px 10px;
  }
  .customer-mode .customer-product h3 {
    font-size: 14px;
  }
  .customer-mode .customer-category-caption {
    font-size: 9px;
  }
  .customer-product-bottom {
    gap: 9px;
    padding-top: 12px;
  }
  .customer-mode .customer-product .price {
    font-size: 15px;
  }
  .customer-mode .cart-controls button {
    font-size: 19px;
  }
  .customer-mode .cart-controls input {
    width: 42px;
    font-size: 16px;
  }
  .customer-mode .customer-cart-dock {
    padding: 9px 10px;
    width: calc(100% - 24px);
    gap: 8px;
  }
  .customer-cart-dock strong {
    font-size: 18px;
  }
  .customer-mode .customer-cart-dock > button:last-child {
    font-size: 12px;
    padding: 11px 13px;
  }
  .customer-mode .customer-detail {
    max-height: 90dvh;
    width: calc(100% - 24px);
  }
  .customer-mode #detail {
    display: block;
  }
  .customer-images {
    height: 260px;
    aspect-ratio: auto;
  }
  .customer-images img {
    max-height: 260px;
  }
  .customer-detail-info {
    padding: 24px 22px;
  }
  .customer-detail-info h2 {
    font-size: 24px;
  }
  .customer-detail-info .description {
    margin: 18px 0;
  }
  .customer-detail-purchase {
    align-items: center;
  }
  .customer-detail-purchase > button {
    flex: 1;
    padding: 13px 9px;
    font-size: 12px;
  }
  .customer-fulfilment {
    padding: 12px 0;
  }
  .customer-flow-heading h2 {
    font-size: 27px;
  }
  .customer-checkout-layout {
    display: block;
  }
  .customer-checkout-summary {
    margin-top: 26px;
    padding: 20px;
  }
  .customer-mode .customer-cart-line {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 11px;
  }
  .customer-mode .customer-cart-line img {
    grid-row: 1 / 3;
    width: 72px;
    height: 80px;
  }
  .customer-mode .customer-cart-line h3 {
    font-size: 14px;
  }
  .customer-mode .customer-cart-line-end {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    max-width: none;
    text-align: left;
  }
  .customer-mode .customer-cart-line-end button {
    margin-top: 0;
    flex-shrink: 0;
  }
  .customer-mode .customer-cart-line:not(:has(img)) .customer-cart-line-info,
  .customer-mode .customer-cart-line:not(:has(img)) .customer-cart-line-end {
    grid-column: 1 / -1;
  }
  .customer-mode .customer-receipt {
    border-radius: 12px;
  }
  .customer-receipt-top {
    padding: 18px;
  }
  .customer-receipt-items {
    padding: 8px 20px;
  }
  .customer-ticket-number h3 {
    font-size: 24px;
  }
}
.customer-mode .price small {
  font-size: 12px;
  font-weight: 400;
  color: #758077;
}
/* The fullscreen customer flow owns scrolling; restore the page on close/Escape. */
html:has(.customer-flow[open]),
body:has(.customer-flow[open]) {
  overflow: hidden;
}
.customer-mode .customer-flow {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  border-radius: 0;
  padding: 0 max(30px, calc((100vw - 1120px) / 2)) 40px;
}
/* These opaque fullscreen dialogs cover the backdrop entirely. */
.customer-mode .customer-flow::backdrop {
  backdrop-filter: none;
}
.customer-flow > .customer-header {
  margin-bottom: 30px;
}
.customer-cart-line-end {
  text-align: right;
  min-width: 0;
  max-width: 35%;
  font-size: 13px;
}
.customer-mode .customer-cart-line-end button {
  background: transparent;
  color: #758077;
  font-size: 11px;
  text-decoration: underline;
  padding: 8px 0;
  margin-top: 10px;
  font-weight: 400;
}
.customer-orders > p {
  max-width: 590px;
  margin: 20px auto !important;
  font-size: 12px;
  line-height: 1.8;
}
@media (max-width: 600px) {
  .customer-mode .customer-flow {
    padding: 0 16px max(32px, env(safe-area-inset-bottom));
  }
  .customer-flow > .customer-header {
    margin-bottom: 24px;
  }
  .customer-cart-line-end {
    font-size: 11px;
  }
}

/* Keep current publication status distinct from the available action. */
.admin-mode .product-metadata {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: #68796e;
  font-size: 13px;
}
.admin-mode .product-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.admin-mode .product-status.is-published {
  background: #e8f3e9;
  color: #28633d;
}
.admin-mode .product-status.is-unpublished {
  background: #edf0f2;
  color: #58636c;
}
.admin-mode .product-actions .publication-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fff;
}
.admin-mode .product-actions .action-publish {
  border: 1px solid #6f9c7e;
  color: #28633d;
}
.admin-mode .product-actions .action-unpublish {
  border: 1px solid #c68c57;
  color: #92501b;
}
.admin-mode .product-actions .action-publish:hover:not(:disabled) {
  background: #edf6ee;
}
.admin-mode .product-actions .action-unpublish:hover:not(:disabled) {
  background: #fff3e7;
}

.order-adjustment-dialog {
  width: min(36rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  box-sizing: border-box;
}
.order-adjustment-line {
  padding: 1rem 0;
  border-bottom: 1px solid #dce5df;
}
.order-adjustment-line input {
  max-width: 10rem;
}
.order-adjustment-consent {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 0;
}
.order-adjustment-consent input {
  width: auto;
  flex: none;
}
.order-adjustment-history {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid #dce5df;
  border-radius: 0.6rem;
  overflow-wrap: anywhere;
}
.order-adjustment-history summary {
  cursor: pointer;
  color: #205c46;
  font-weight: 600;
}

.order-adjustment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-mode .order-adjustment-actions button {
  margin: 0;
}

/* Product editor: fixed context and actions around a scrolling form. */
.admin-mode .product-edit-dialog {
  width: min(92vw, 760px);
  max-width: none;
  height: min(90dvh, 900px);
  max-height: 90dvh;
  padding: 0;
  overflow: hidden;
  color: #20372d;
}
.product-edit-dialog[open] {
  display: flex;
  flex-direction: column;
}
.product-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #d6e1da;
  gap: 12px;
  flex-shrink: 0;
}
.product-edit-header h2 {
  margin: 0;
  font-size: 22px;
}
.product-edit-dialog form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  margin: 0;
}
.product-edit-body {
  overflow-y: auto;
  min-height: 0;
  padding: 24px;
  overscroll-behavior: contain;
}
.product-edit-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.product-edit-fields label {
  margin: 0;
  min-width: 0;
}
.product-edit-fields .editor-wide {
  grid-column: 1 / -1;
}
.product-edit-fields textarea {
  min-height: 100px;
  height: 100px;
}
.product-edit-images {
  margin-top: 24px;
}
.product-edit-images h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.product-edit-images p {
  font-size: 14px;
  color: #627369;
  margin: 8px 0 16px;
}
.image-editor {
  display: grid;
  gap: 12px;
}
.product-image-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid #d6e1da;
  border-radius: 12px;
  background: #f7faf8;
}
.admin-mode .product-image-card img {
  width: 112px;
  height: 112px;
  border-radius: 8px;
  background: #eaf0ec;
  object-fit: contain;
}
.image-position {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  background: #e0ede4;
  color: #24573d;
  font-size: 13px;
  font-weight: 700;
}
.product-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-mode .product-edit-dialog button {
  margin: 0;
}
.product-edit-dialog .product-image-actions button,
.product-edit-dialog .editor-cancel,
.product-edit-dialog .editor-close {
  background: white;
  color: #28553e;
  border: 1px solid #bbcfc2;
}
.product-edit-dialog .editor-close {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 26px;
  border: 0;
}
.product-edit-dialog .product-image-actions button {
  padding: 9px 12px;
  min-height: 44px;
  font-size: 14px;
}
.product-edit-dialog .product-image-actions .editor-remove {
  border-color: transparent;
  background: transparent;
  color: #8e4c3a;
}
.product-edit-dialog .editor-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #bbcfc2;
  border-radius: 8px;
  color: #28553e;
  background: white;
  cursor: pointer;
  margin: 0;
  font-size: 14px;
  overflow: hidden;
}
.product-edit-dialog .editor-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.editor-upload:focus-within {
  outline: 3px solid #9ecb91;
  outline-offset: 2px;
}
.editor-upload:has(input:disabled) {
  opacity: 0.5;
  cursor: wait;
}
.product-edit-images > .editor-upload {
  margin-top: 16px;
}
.product-edit-footer {
  flex-shrink: 0;
  padding: 16px 24px;
  border-top: 1px solid #d6e1da;
  background: white;
}
.product-edit-footer .edit-error {
  margin: 0 0 12px;
  font-size: 14px;
}
.product-edit-footer .edit-error:empty {
  display: none;
}
.product-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
@media (max-width: 700px) {
  .admin-mode .product-edit-dialog {
    width: calc(100vw - 24px);
    height: 92dvh;
    max-height: 92dvh;
    border-radius: 14px;
  }
  .product-edit-header {
    padding: 12px 16px;
  }
  .product-edit-body {
    padding: 16px;
  }
  .product-edit-fields {
    grid-template-columns: 1fr;
  }
  .product-edit-footer {
    padding: 12px 16px;
  }
  .product-edit-actions button {
    flex: 1;
  }
  .product-image-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .admin-mode .product-image-card img {
    width: 100%;
    height: 140px;
  }
}
.product-image-card .image-pending {
  min-height: 112px;
  border-radius: 8px;
  background: #eaf0ec;
  color: #627369;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  font-size: 14px;
}

/* Homepage announcements and hand-picked products share the existing shop flow. */
.home-promotion {
  margin: 22px 0 28px;
}
.home-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #eaf0e4;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}
.home-notice-label {
  flex-shrink: 0;
  font-weight: 700;
  color: #31563b;
}
.home-notice-copy {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.customer-mode .home-text-action {
  background: none;
  color: #31563b;
  padding: 4px;
  font-size: 13px;
  white-space: nowrap;
}
.home-featured-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.home-featured-heading h2 {
  font-size: 21px;
}
.home-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.home-pick {
  background: #fff;
  border: 1px solid #d5dfd3;
  border-radius: 16px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  min-width: 0;
}
.customer-mode .home-pick-open {
  display: flex;
  text-align: left;
  gap: 14px;
  background: none;
  color: #203b2d;
  padding: 0;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.home-pick-open img {
  flex-shrink: 0;
  width: 86px;
  height: 94px;
  object-fit: cover;
  border-radius: 10px;
}
.home-pick-info {
  display: grid;
  gap: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.home-pick-info strong {
  font-size: 18px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.home-pick-info > small {
  color: #62766b;
  font-size: 12px;
}
.home-pick .cart-controls {
  margin-left: auto;
}
.customer-product {
  position: relative;
}
.home-recommended-badge {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  background: #f9f4dc;
  color: #574c24;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  pointer-events: none;
}
.home-notice-dialog {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 24px;
  border: 0;
  border-radius: 20px;
  overflow-y: auto;
}
.home-notice-dialog p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
  margin: 16px 0 !important;
}
html:has(.home-notice-dialog[open]),
body:has(.home-notice-dialog[open]) {
  overflow: hidden;
}
.home-settings {
  max-width: 880px;
}
.home-settings-section {
  background: white;
  border: 1px solid #dce5df;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.home-settings-section h2 {
  margin: 0 0 12px;
}
.home-settings-section label {
  margin-top: 20px;
}
.home-settings-section small {
  display: block;
  color: #61736a;
}
.home-selected {
  padding: 0;
  list-style: none;
}
.home-selected-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #dce5df;
  padding: 16px 0;
}
.home-selected-item > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.home-item-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.home-choices {
  max-height: 340px;
  overflow-y: auto;
  margin-top: 12px;
}
.home-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1ee;
}
.home-choice span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.home-choice button {
  flex-shrink: 0;
}
@media (max-width: 650px) {
  .home-promotion {
    margin: 12px 0 16px;
  }
  .home-notice {
    gap: 8px;
    padding: 10px;
    margin-bottom: 12px;
  }
  .home-notice-label,
  .home-notice-copy,
  .customer-mode .home-notice .home-text-action {
    font-size: 11px;
  }
  .home-notice-copy {
    line-height: 1.5;
  }
  .home-featured-heading h2 {
    font-size: 19px;
  }
  .home-picks {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }
  .home-pick {
    flex: 0 0 255px;
    scroll-snap-align: start;
  }
  .home-pick-open img {
    width: 62px;
    height: 78px;
  }
  .home-pick-info strong {
    font-size: 15px;
  }
  .home-pick-info {
    gap: 4px;
  }
  .home-pick-info > small {
    font-size: 10px;
  }
  .home-pick .cart-controls input {
    width: 28px;
  }
  .home-pick .cart-controls button {
    width: 32px;
    height: 36px;
  }
  .home-settings-section {
    padding: 16px;
  }
  .home-selected-item {
    flex-wrap: wrap;
  }
  .home-item-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .admin-mode .home-item-actions button {
    padding: 8px 12px;
  }
}

.customer-mode .home-featured {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.customer-mode .home-notice {
  border: 0;
}
.customer-mode .home-pick .price {
  font-size: 17px;
}

/* Compact product workspace: price is the primary row action. */
.admin-shell[data-view="products"] .workspace-title {
  margin-bottom: 23px;
  padding-right: 130px;
}
.admin-shell[data-view="products"] .view-description {
  display: block;
}
.admin-shell[data-view="products"] .workspace-title .eyebrow {
  font-size: 11px;
}
.catalog-utility {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #718074;
  font-size: 12px;
  margin: 12px 0 20px;
}
.catalog-utility a {
  padding: 8px 0;
  text-decoration: none;
}
.admin-shell[data-view="products"] .new-product > summary {
  top: 60px;
}
.admin-mode .catalog-filters {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 0;
  align-items: start;
}
.compact-search > span {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.admin-mode .compact-search {
  margin: 0;
}
.admin-mode .compact-search input {
  margin: 0;
  height: 46px;
  min-height: 46px;
  border-color: var(--admin-line);
}
.admin-mode .compact-filter > summary {
  min-height: 46px;
  font-size: 12px;
  padding: 12px;
  border-color: var(--admin-line);
}
.compact-filter {
  position: relative;
}
.compact-filter > summary {
  list-style: none;
  border: 1px solid #cbd9cf;
  border-radius: 10px;
  background: white;
  padding: 10px 16px;
  min-height: 44px;
  box-sizing: border-box;
  cursor: pointer;
}
.compact-filter > summary::after {
  content: " ☷";
}
.compact-filter > div {
  position: absolute;
  z-index: 5;
  right: 0;
  top: 52px;
  width: min(300px, calc(100vw - 40px));
  padding: 16px;
  border: 1px solid #d7e0db;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 25px #20382e18;
}
.catalog-status-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid #dce4dc;
  margin-top: 10px;
}
.admin-mode .catalog-status-tabs button {
  min-height: 44px;
  min-width: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #6d7e72;
  background: transparent;
  padding: 8px 2px;
  font-size: 13px;
}
.admin-mode .catalog-status-tabs button[aria-pressed="true"] {
  border-bottom-color: #1d513c;
  color: #1d513c;
  font-weight: 700;
}
.catalog-result {
  font-size: 12px;
  color: #718074;
  margin: 12px 0;
}
.admin-mode .product-row {
  flex-wrap: nowrap;
  gap: 12px;
  padding: 16px 0;
  position: relative;
}
.admin-mode .product-info {
  min-width: 0;
}
.admin-mode .product-info h3 {
  font-size: 15px;
  margin: 0 0 7px;
  overflow-wrap: anywhere;
}
.admin-mode .product-row > img {
  width: 52px;
  height: 58px;
}
.admin-mode .product-metadata {
  font-size: 11px;
  gap: 8px;
}
.admin-mode .product-status {
  font-size: 10px;
  padding: 3px 7px;
}
.admin-mode .product-actions {
  width: auto;
  flex: none;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}
.admin-mode .price-editor > summary {
  border: 0;
  background: none;
  color: #24523e;
  padding: 6px 0;
  min-height: 44px;
  text-align: right;
}
.price-editor > summary > span {
  display: block;
  font-size: 11px;
  color: var(--admin-muted);
  font-weight: 400;
  margin-top: 4px;
}
.admin-mode .product-more > summary {
  font-size: 0;
  padding: 8px;
  min-width: 40px;
  min-height: 44px;
  border: 0;
  background: none;
  color: #24523e;
}
.product-more > summary::after {
  content: "•••";
  font-size: 16px;
}
.admin-mode .product-actions details[open] {
  flex-basis: auto;
}
.admin-mode .price-editor form,
.product-menu {
  position: absolute;
  z-index: 4;
  right: 0;
  top: calc(100% - 8px);
  background: white;
  border: 1px solid #d7e0db;
  box-shadow: 0 8px 25px #20382e20;
  border-radius: 12px;
  padding: 16px;
  width: min(300px, calc(100vw - 60px));
  box-sizing: border-box;
}
.product-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-mode .product-menu button {
  min-height: 44px;
  width: 100%;
  text-align: left;
}
.admin-mode .price-editor form input {
  width: 100%;
  box-sizing: border-box;
}
.admin-mode .price-editor form button {
  min-height: 44px;
  margin-top: 12px;
}
@media (max-width: 700px) {
  .admin-shell[data-view="products"] .admin-workspace {
    padding: 16px 16px 100px;
  }
  .admin-shell[data-view="products"] .workspace-title h1 {
    font-size: 24px;
  }
  .admin-shell[data-view="products"] .workspace-title .eyebrow {
    font-size: 10px;
    margin: 0 0 7px;
    letter-spacing: 0.06em;
  }
  .admin-shell[data-view="products"] .new-product > summary {
    position: absolute;
    top: 24px;
    right: 16px;
    font-size: 13px;
    padding: 12px;
  }
  .admin-mode .catalog-filters > label:first-child {
    grid-column: auto;
  }
  .catalog-utility {
    margin: 8px 0 14px;
  }
  .admin-mode .product-row {
    gap: 8px;
    padding: 15px 0;
  }
  .admin-mode .product-row > img {
    width: 48px;
    height: 53px;
  }
  .admin-mode .product-info h3 {
    font-size: 14px;
  }
  .admin-mode .product-metadata {
    font-size: 10px;
    gap: 5px;
  }
  .admin-mode .product-status {
    font-size: 9px;
    padding: 2px 5px;
  }
  .admin-mode .product-actions {
    gap: 6px;
  }
  .admin-mode .product-more > summary {
    min-width: 34px;
    padding: 5px;
  }
  .admin-mode .product-price {
    font-size: 16px;
  }
  .admin-mode #admin-products {
    padding: 0 10px;
  }
}
.admin-mode .product-action-dialog {
  width: min(420px, calc(100vw - 24px));
  max-height: 85dvh;
  overflow: auto;
  padding: 20px;
  border: 1px solid #d7e0db;
  border-radius: 16px;
  box-sizing: border-box;
}
.product-action-dialog::backdrop {
  background: #20382e66;
}
.product-action-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.product-action-dialog h2 {
  font-size: 18px;
  margin: 0;
  overflow-wrap: anywhere;
}
.admin-mode .product-action-dialog form,
.admin-mode .product-action-dialog .product-menu {
  position: static;
  width: 100%;
  padding: 0;
  border: 0;
  box-shadow: none;
}
.admin-mode .product-action-dialog header button {
  min-width: 44px;
  padding: 8px;
}
@media (max-width: 700px) {
  .admin-mode .product-action-dialog {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}
/* Long selection identities and large reference amounts stay inside mobile sheets. */
.customer-selection .selection-identity,
.customer-selection .customer-receipt-line {
  overflow-wrap: anywhere;
}
.customer-mode .customer-selection > button.secondary {
  background: #edf2ec;
  color: #28674d;
}

.selection-qr canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
}
.selection-review article {
  border-bottom: 1px solid #ddd;
  padding: 1rem 0;
  overflow-wrap: anywhere;
}
.selection-review input {
  max-width: 100%;
  box-sizing: border-box;
}

.selection-identity,
.record-summary {
  overflow-wrap: anywhere;
}
.record-summary {
  padding: 1rem 0;
  border-bottom: 1px solid #dbe2d8;
}

/* Selection sheet A: readable goods first, optional merchant handoff below. */
.customer-mode .customer-selection {
  background: #f4f5f1;
}
.selection-content {
  max-width: 540px;
  margin: 0 auto;
}
.customer-mode .selection-content > button {
  width: auto;
  background: transparent;
  color: #45604c;
  padding: 10px 0;
  font-size: 13px;
}
.selection-paper {
  background: #fff;
  border: 1px solid #e2e7df;
  border-radius: 18px;
  padding: 28px 24px;
  margin-top: 16px;
}
.selection-paper .customer-flow-heading {
  margin: 0;
  padding: 0 0 24px;
  border-bottom: 2px solid #344e3d;
  text-align: left;
}
.selection-paper .selection-eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #6d8073;
  margin: 0 0 10px;
}
.selection-paper .customer-flow-heading h2 {
  font-size: 30px;
  line-height: 1.3;
  margin: 0;
}
.selection-paper .customer-flow-heading .selection-subtitle {
  margin: 12px 0 0;
  font-size: 13px;
  color: #596a5f;
}
.selection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid #edf0e9;
}
.selection-item-info {
  min-width: 0;
  overflow-wrap: anywhere;
}
.selection-item h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
}
.selection-item-info p {
  font-size: 14px;
  color: #596a5f;
  margin: 6px 0 0;
}
.selection-quantity {
  display: flex;
  gap: 7px;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 55%;
  overflow-wrap: anywhere;
  text-align: right;
}
.selection-quantity strong {
  font-size: 34px;
  font-weight: 650;
  line-height: 1.2;
  min-width: 0;
}
.selection-quantity span {
  font-size: 14px;
  color: #596a5f;
}
.selection-total {
  padding: 26px 0 16px;
}
.selection-total > p:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  margin: 0;
  color: #344e3d;
}
.selection-total strong {
  font-size: 30px;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.selection-total .selection-count {
  font-size: 12px;
  color: #596a5f;
  margin: 4px 0 0;
}
.selection-paper .selection-note {
  font-size: 13px;
  line-height: 1.9;
  color: #596a5f;
  margin: 0;
}
.selection-handoff {
  margin-top: 24px;
}
.customer-mode button.selection-qr-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  color: #45604c;
  border: 1px solid #dce4db;
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  font-weight: 500;
}
.selection-qr-toggle svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.selection-qr-sign {
  margin-left: auto;
  font-size: 20px;
}
.selection-qr {
  padding: 20px 0 0;
  text-align: center;
}
.selection-qr[hidden] {
  display: none;
}
.selection-qr h3 {
  font-size: 16px;
  margin: 0;
}
.selection-qr p {
  font-size: 12px;
}
.selection-id-line {
  font-size: 10px;
  color: #8a938b;
  text-align: center;
  overflow-wrap: anywhere;
  margin: 18px 0;
}
@media (max-width: 350px) {
  .customer-product-bottom .cart-controls {
    min-height: 92px;
    align-items: flex-end;
  }
  .customer-product-bottom .cart-controls:has(input) {
    display: grid;
    grid-template-columns: 44px 44px;
    justify-content: space-between;
    width: 100%;
  }
  .customer-product-bottom .cart-controls:has(input) button {
    grid-row: 2;
  }
  .customer-mode .customer-product-bottom .cart-controls input {
    grid-row: 1;
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
  }
  .selection-paper {
    padding: 24px 18px;
  }
  .selection-quantity strong {
    font-size: 28px;
  }
  .selection-total strong {
    font-size: 26px;
  }
}

/* Merchant review B: compact editing with an optional note and sticky save bar. */
body:has(.merchant-review) {
  background: #f4f5f1;
}
body:has(.merchant-review) main {
  width: min(100% - 32px, 540px);
  margin: 24px auto;
}
#app:has(.merchant-review) {
  padding: 0;
  border: 0;
  background: transparent;
}
#app:has(.merchant-review) > h1 {
  font-size: 28px;
}
.merchant-review {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.review-intro {
  font-size: 13px;
  line-height: 1.8;
}
.merchant-review > .selection-identity {
  display: block;
  font-size: 10px;
  color: #899580;
  margin: 16px 0;
}
.merchant-review .selection-review {
  border-top: 2px solid #3b5943;
}
.merchant-review .selection-review article {
  padding: 18px 3px;
  border-color: #e2e7db;
}
.review-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.review-item-heading h2 {
  margin: 0;
  font-size: 18px;
}
.review-item-heading p {
  margin: 6px 0 0;
  font-size: 13px;
}
.merchant-review button.review-remove {
  background: transparent;
  color: #596a5f;
  font-size: 12px;
  width: auto;
  margin: 0;
  flex-shrink: 0;
}
.review-edit-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.review-edit-fields label {
  min-width: 0;
  margin: 14px 0 0;
  font-size: 13px;
  color: #596a5f;
}
.review-edit-fields input {
  background: white;
  color: #304b32;
  font-size: 16px;
  height: 44px;
}
.review-stepper {
  display: flex;
  align-items: center;
  border: 1px solid #b6c6ba;
  border-radius: 9px;
  overflow: hidden;
  margin-top: 6px;
  background: white;
}
.review-stepper input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  margin: 0;
  text-align: center;
  padding: 8px 0;
}
.review-stepper button {
  width: 44px;
  flex: 0 0 44px;
  padding: 0;
  height: 44px;
  min-height: 44px;
  border-radius: 0;
  margin: 0;
  background: #edf2e7;
  color: #47623a;
  font-size: 18px;
}
.review-settlement {
  border: 1px solid #e0e7d9;
  border-radius: 12px;
  background: white;
  padding: 18px;
  margin-top: 22px;
}
.review-settlement > [role="status"] {
  font-size: 12px;
  margin: 0 0 16px;
}
.review-settlement label {
  font-size: 13px;
}
.review-settlement input {
  font-size: 30px;
  font-weight: 650;
  color: #35583e;
  text-align: right;
}
.review-discount {
  font-size: 12px;
  color: #5e7b49;
}
.review-confirmation {
  font-size: 13px;
  line-height: 1.8;
}
.review-confirmation.needs-confirmation {
  background: #f7eedb;
  color: #80632f;
  border-radius: 7px;
  padding: 10px;
}
.review-amount-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.review-amount-actions button {
  min-height: 44px;
  font-size: 12px;
  margin: 0;
  padding: 10px 5px;
}
.review-reset-amount {
  background: transparent;
  color: #6a805f;
}
.review-confirm-amount {
  background: #e7efdf;
  color: #486335;
  border: 1px solid #afc39e;
}
.review-notes {
  margin: 16px 0;
}
.review-notes summary {
  font-size: 12px;
}
.review-notes label {
  font-size: 12px;
}
.review-notes textarea {
  background: white;
  font-size: 16px;
  min-height: 110px;
}
.review-note-count {
  font-size: 11px;
}
.review-save-dock {
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 8px 14px;
  background: white;
  border: 1px solid #dfe5d9;
  border-radius: 13px;
  padding: 15px 16px;
  margin: 20px 0;
  box-shadow: 0 -3px 20px #263d2010;
}
.review-final-total {
  font-size: 17px;
  font-weight: 650;
  color: #35583e;
  margin: 0;
  overflow-wrap: anywhere;
}
.review-save-dock button {
  margin: 0;
  padding: 14px 8px;
  font-size: 13px;
}
.review-save-dock .review-disclaimer {
  grid-column: 1 / -1;
  font-size: 12px;
  margin: 0;
  text-align: center;
}
.merchant-review > a {
  font-size: 12px;
}
.merchant-review input,
.merchant-review textarea,
.merchant-review button {
  scroll-margin: 120px 0 200px;
}
.record-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.record-history {
  margin-block: 16px;
}
.record-history:empty {
  display: none;
}
@media (max-width: 350px) {
  .review-edit-fields {
    gap: 14px;
  }
  .review-save-dock {
    padding: 13px 12px;
    gap: 8px;
  }
}
.merchant-review button.review-restore {
  background: transparent;
  color: #6a805f;
  font-size: 12px;
  padding: 12px;
}

.record-section + .record-section {
  margin-top: 24px;
}
.new-product form > small {
  display: block;
}
.new-product form > button {
  display: block;
  margin-top: 16px;
}
@media (max-width: 700px) {
  .record-section + .record-section {
    margin-top: 16px;
  }
}

/* Merchant navigation C: task-first overview and category rail. */
.admin-shell {
  --admin-ink: #203c32;
  --admin-muted: #60715b;
  --admin-line: #e2e8df;
  font-size: 14px;
  line-height: 1.5;
  color: var(--admin-ink);
  -webkit-text-size-adjust: 100%;
}
.admin-shell .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.admin-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  vertical-align: middle;
}
.admin-nav a {
  color: #60715b;
  font-weight: 500;
}
.admin-nav a[aria-current="page"] {
  color: #315b45;
}
.admin-nav a[aria-current="page"] .admin-icon {
  stroke-width: 2;
}
.admin-mode #app {
  background: #f5f5ed;
}
.admin-shell .workspace-title {
  padding-right: 0;
}
.admin-shell .workspace-title .eyebrow {
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 400;
  margin: 0 0 9px;
  color: var(--admin-muted);
}
.admin-shell .workspace-title h1 {
  line-height: 1.25;
  margin: 0;
}
.admin-shell .workspace-title .view-description {
  font-size: 13px;
  line-height: 1.5;
  margin: 8px 0 0;
  color: var(--admin-muted);
}
.admin-secondary-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.admin-secondary-nav:empty {
  display: none;
}
.admin-secondary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  text-decoration: none;
  color: #45664b;
}
.admin-secondary-nav a::before {
  content: "‹";
  font-size: 22px;
  margin-right: 7px;
}
.admin-shell[data-view="records"] .admin-secondary-nav a::before {
  content: "";
  margin: 0;
}
.admin-mode .workbench-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 16px;
  border: 0;
  border-bottom: 1px solid #dce3d2;
  padding: 0 0 16px;
  border-radius: 0;
  background: none;
}
.workbench-summary > div + div {
  border-left: 1px solid #dce3d2;
  padding-left: 24px;
}
.workbench-summary span {
  display: block;
  font-size: 11px;
  color: #60715b;
}
.workbench-summary strong {
  display: block;
  font-size: 32px;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.admin-mode .workbench-summary > .error {
  grid-column: 1/-1;
  margin: 0;
}
.workbench-summary strong small {
  font-size: 12px;
  font-weight: 400;
}
.admin-mode .workbench-scope {
  color: var(--admin-muted);
  margin: 0 0 6px;
}
.admin-mode .workbench-scope summary {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  font-size: 11px;
  font-weight: 400;
  min-height: 44px;
  padding: 10px 0;
  color: var(--admin-muted);
}
.workbench-scope summary::-webkit-details-marker {
  display: none;
}
.workbench-scope summary > span {
  margin-left: auto;
  white-space: nowrap;
}
.workbench-scope summary .admin-icon {
  width: 13px;
  height: 13px;
  transform: rotate(90deg);
}
.workbench-scope[open] summary .admin-icon {
  transform: rotate(-90deg);
}
.admin-mode .workbench-scope p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0 0 14px;
}
.admin-task-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  text-decoration: none;
  min-height: 86px;
}
.admin-task-link > span {
  flex: 1;
  min-width: 0;
}
.admin-task-link strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #294d38;
}
.admin-task-link small {
  display: block;
  color: #60715b;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 5px;
}
.admin-task-link > .admin-icon:first-child {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 50%;
  background: #e6ecdc;
  color: #688761;
}
.admin-task-link > .admin-icon:last-child {
  width: 16px;
  height: 16px;
  color: #819176;
}
.admin-mode .workbench-feature {
  display: block;
  position: relative;
  overflow: hidden;
  background: #dae6cb;
  padding: 21px;
  border-radius: 4px 20px 20px 20px;
  min-height: 0;
}
.workbench-feature::before {
  content: "日常经营";
  position: absolute;
  left: 21px;
  top: 21px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #526444;
}
.workbench-feature > span {
  display: block;
  padding-top: 23px;
  position: relative;
}
.workbench-feature strong {
  font-size: 22px;
  line-height: 1.4;
}
.workbench-feature small {
  font-size: 11px;
  line-height: 1.5;
  margin-top: 7px;
  padding-right: 45px;
}
.workbench-go {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 18px;
  min-height: 44px;
  background: #315b45;
  color: white;
  font-size: 12px;
}
.workbench-go .admin-icon {
  width: 16px;
  height: 16px;
}
.workbench-feature > .admin-icon:first-child {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 94px;
  height: 94px;
  stroke-width: 1;
  background: transparent;
  color: #2c503b;
  opacity: 0.17;
  transform: rotate(-12deg);
  border-radius: 0;
  padding: 0;
}
.workbench-feature > .admin-icon:last-child {
  display: none;
}
.admin-mode .workbench-section-title {
  font-size: 15px;
  line-height: 1.4;
  margin: 25px 0 13px;
}
.workbench-tasks {
  border-top: 1px solid #dce3d2;
}
.workbench-tasks .admin-task-link {
  border-bottom: 1px solid var(--admin-line);
  padding: 16px 0;
  min-height: 80px;
  gap: 12px;
}
.workbench-tasks .admin-task-link strong {
  font-size: 15px;
}
.workbench-tasks .admin-task-link small {
  font-size: 11px;
  line-height: 1.5;
  margin-top: 4px;
}
.admin-mode .workbench-recent {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: none;
}
.workbench-recent-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 25px 0 13px;
}
.admin-mode .workbench-recent-heading h2 {
  font-size: 15px;
  line-height: 1.4;
}
.workbench-recent-heading > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -10px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  color: #315e4c;
}
.workbench-record {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  min-height: 85px;
  border: 1px solid #dfe6d5;
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
  color: var(--admin-ink);
}
.workbench-record-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 40px;
  border-radius: 9px;
  background: #f1f5ed;
  color: #6a8c74;
}
.workbench-record-mark .admin-icon {
  width: 20px;
  height: 20px;
}
.workbench-record-copy {
  flex: 1;
  min-width: 0;
}
.workbench-record-copy > strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
}
.workbench-record-copy > small {
  display: block;
  font-size: 11px;
  color: var(--admin-muted);
  margin-top: 5px;
}
.workbench-record-price {
  text-align: right;
  flex-shrink: 0;
  min-width: 0;
  max-width: 52%;
  overflow-wrap: anywhere;
}
.workbench-record-price > strong {
  display: block;
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.workbench-record-price > small {
  display: block;
  font-size: 10px;
  color: var(--admin-muted);
  margin-top: 4px;
}
.admin-mode .workbench-recent-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--admin-muted);
  margin: 10px 0 0;
}
.admin-mode .admin-empty {
  padding: 24px 16px;
  background: #fff;
  border: 1px solid #e0e6d8;
  border-radius: 14px;
  color: #76836d;
  line-height: 1.9;
}
.admin-shell[data-view="records"] .workspace-title {
  position: relative;
  padding-right: 96px;
}
.admin-shell[data-view="records"] .admin-secondary-nav {
  position: absolute;
  right: 0;
  bottom: 0;
  margin: 0;
}
.admin-mode .record-statistics {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.admin-mode .record-statistics h2 {
  font-size: 15px;
}
.admin-mode .record-statistics .record-total {
  font-size: 16px;
  color: var(--admin-ink);
  font-weight: 650;
  overflow-wrap: anywhere;
}
.admin-mode .record-statistics p {
  font-size: 12px;
}
.admin-mode .record-scope summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 10px 0;
  min-height: 44px;
  font-size: 11px;
  font-weight: 400;
  color: var(--admin-muted);
  list-style: none;
}
.record-scope summary::-webkit-details-marker {
  display: none;
}
.record-scope summary strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-ink);
  overflow-wrap: anywhere;
  min-width: 0;
}
.record-scope summary .scope-label {
  margin-left: auto;
}
.record-scope summary::after {
  content: "";
  width: 5px;
  height: 5px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
  margin: 0 4px 3px;
}
.record-scope[open] summary::after {
  transform: rotate(225deg);
  margin-bottom: -3px;
}
.record-statistics-body {
  padding: 12px 16px;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  margin: 0 0 12px;
  background: #fff;
}
.admin-mode .record-scope p {
  line-height: 1.8;
}
.record-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #e7ecdf;
  margin: 0 0 4px;
}
.admin-mode .record-tabs button {
  flex: 1;
  background: transparent;
  color: #6c7d62;
  font-weight: 500;
  border: 0;
  padding: 10px 8px;
}
.admin-mode .record-tabs button[aria-pressed="true"] {
  background: #fff;
  color: #315b45;
  font-weight: 650;
}
.admin-mode .record-timeline {
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  margin: 0;
}
.admin-mode .record-day {
  font-size: 16px;
  line-height: 1.4;
  color: var(--admin-ink);
  margin: 0;
  padding: 10px 0 15px;
  font-weight: 600;
}
.admin-mode .record-summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  border: 0;
  padding: 0 24px 24px 0;
  position: relative;
}
.admin-mode .record-summary::before {
  content: "";
  position: absolute;
  left: 43px;
  top: 9px;
  bottom: 0;
  border-left: 1px solid #d6dfca;
}
.admin-mode .record-summary:last-child::before {
  bottom: 22px;
}
.record-summary > time {
  font-size: 10px;
  margin-top: 8px;
  color: #60715b;
}
.record-timeline-card {
  position: relative;
  padding: 15px;
  background: #fff;
  border: 1px solid #dfe6d5;
  border-radius: 13px;
  text-decoration: none;
  min-width: 0;
  display: block;
}
.record-timeline-card::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  position: absolute;
  top: 12px;
  left: -8px;
  background: #78936b;
  box-shadow: 0 0 0 3px #f5f5ed;
}
.record-timeline-card::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border: solid #98a59a;
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
  right: -20px;
  top: calc(50% - 3px);
}
.record-timeline-card > strong {
  display: block;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--admin-ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.record-timeline-card > small {
  display: block;
  font-size: 10px;
  color: #60715b;
  margin: 4px 0;
}
.admin-mode .record-timeline-card > p {
  font-size: 12px;
  line-height: 1.8;
  color: #5b7054;
  margin: 5px 0 0;
}
.admin-mode .record-timeline-card > .timeline-note {
  border-top: 1px solid #edf1e6;
  padding-top: 9px;
  margin-top: 9px;
  font-size: 11px;
  color: #60715b;
  white-space: pre-wrap;
}
.admin-mode .admin-record {
  padding: 20px;
  border: 1px solid #e0e6d8;
  border-radius: 15px;
  background: #fff;
}
.admin-mode .admin-record textarea {
  width: 100%;
  box-sizing: border-box;
}
.admin-mode .admin-record button {
  margin: 8px 8px 8px 0;
}
.admin-record .record-amount-summary {
  display: flex;
  flex-direction: column;
  margin: 20px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--admin-line);
}
.admin-mode .admin-record .record-final-amount {
  order: -1;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--admin-muted);
}
.admin-record .record-final-amount strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--admin-ink);
  margin-top: 4px;
}
.admin-record .selection-review article:first-child {
  border-top: 0;
  padding-top: 0;
}
.store-profile {
  display: flex;
  gap: 16px;
  padding: 22px;
  border-radius: 16px;
  align-items: center;
  background: #e4ecda;
  font-weight: 600;
}
.store-profile-form,
.store-entry {
  max-width: 720px;
  overflow-wrap: anywhere;
}
.store-profile-form input,
.store-profile-form textarea,
.store-entry input {
  min-width: 0;
  max-width: 100%;
}
.store-avatar {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  object-fit: cover;
  border-radius: 16px;
}
.profile-avatar-editor {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e3e8df;
}
.profile-avatar-preview {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 1px solid #dce5df;
  border-radius: 16px;
  background: #f2f5ee;
  overflow: hidden;
}
.profile-avatar-preview .store-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}
.profile-avatar-empty {
  color: #71806e;
  font-size: 12px;
}
.profile-avatar-controls {
  min-width: 0;
}
.admin-mode .profile-avatar-title {
  margin: 0;
  font-size: 16px;
}
.admin-mode .profile-avatar-hint {
  margin: 4px 0 10px;
  font-size: 12px;
  line-height: 1.5;
}
.admin-mode .profile-avatar-error {
  color: #a32929;
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
}
.avatar-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}
.admin-mode .avatar-upload-button {
  font-size: 13px;
  padding: 10px 12px;
}
.admin-mode .avatar-remove {
  border: 0;
  padding: 10px 4px;
  font-size: 13px;
  color: #60715b;
  background: transparent;
}
.profile-avatar-controls > small {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .profile-avatar-editor {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }
  .profile-avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 12px;
  }
}
.store-entry canvas {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin: 20px auto;
}
.store-entry > a {
  display: inline-block;
  margin-bottom: 16px;
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 8px;
  background: #28674d;
  color: white;
  font-weight: 650;
  text-decoration: none;
}
.store-entry > a:focus-visible {
  outline: 3px solid #b5d6a8;
  outline-offset: 2px;
}
.customer-mode #app > .customer-header {
  padding: 18px 0;
}
.customer-brand {
  min-width: 0;
  flex: 1;
}
.customer-brand .brand-symbol {
  flex-shrink: 0;
}
.customer-brand-copy {
  min-width: 0;
}
.customer-brand-copy > small {
  margin: 0;
  color: #243b32;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.customer-brand .store-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
}
.customer-store-introduction {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: 0;
  color: #758077;
}
.customer-flow .customer-store-introduction {
  display: none;
}
#customer-orders-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}
.customer-mode .store-info-toggle {
  background: transparent;
  color: #456650;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.customer-mode .store-info-toggle:focus-visible,
.customer-mode .store-info-close:focus-visible {
  outline: 3px solid #96b696;
  outline-offset: 2px;
}
.customer-mode .customer-store-info-dialog {
  width: min(520px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  border: 1px solid #dce5df;
  border-radius: 20px;
  padding: 0;
  background: #fff;
  overflow: hidden;
}
.customer-store-info-dialog[open] {
  display: flex;
  flex-direction: column;
}
.customer-mode .customer-store-info-dialog::backdrop {
  background: #23352c80;
}
.store-info-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #e3e8df;
  flex-shrink: 0;
}
.store-info-heading h2 {
  font-size: 18px;
}
.customer-mode .store-info-close {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  color: #456650;
  background: #f1f5ed;
  font-size: 26px;
  flex-shrink: 0;
}
.store-info-body {
  padding: 22px 24px calc(24px + env(safe-area-inset-bottom));
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.store-info-body h3 {
  font-size: 22px;
  line-height: 1.5;
}
.store-info-body:focus-visible {
  outline: 3px solid #96b696;
  outline-offset: -3px;
}
.customer-mode .store-info-body p {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.8;
}
.store-info-body dl {
  margin: 24px 0 0;
}
.store-info-body dt {
  color: #758077;
  font-size: 12px;
  margin-top: 20px;
}
.store-info-body dd {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.7;
}
html:has(.customer-store-info-dialog[open]),
body:has(.customer-store-info-dialog[open]) {
  overflow: hidden;
}
@media (max-width: 600px) {
  .customer-mode #app > .customer-header {
    padding: 14px 0;
    gap: 8px;
  }
  .customer-brand-copy > small {
    font-size: 17px;
  }
  #customer-orders-link {
    flex-direction: column;
    align-items: flex-end;
  }
  .store-info-body {
    padding-left: 20px;
    padding-right: 20px;
  }
}
.store-profile .admin-icon {
  width: 42px;
  height: 42px;
  color: #55784a;
}
.store-menus {
  margin-top: 24px;
  border-top: 1px solid #dce3d2;
}
.store-menus .admin-task-link {
  border-bottom: 1px solid #dce3d2;
}
.admin-home[data-section="announcement"] .home-settings-section:nth-of-type(2),
.admin-home[data-section="featured"] .home-settings-section:first-of-type {
  display: none;
}
.admin-mode .account-panel {
  border-color: #dfe6d5;
}
.account-history {
  margin-top: 24px;
  border-top: 1px solid #dfe6d5;
}
.admin-mode .account-history summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 0;
  background: none;
  color: #45664b;
  text-align: left;
  font-weight: 500;
}
.account-history summary .admin-icon {
  width: 16px;
  height: 16px;
  transform: rotate(90deg);
}
.account-history[open] summary .admin-icon {
  transform: rotate(-90deg);
}
.admin-mode .account-history p {
  font-size: 12px;
  margin-top: 0;
}
.catalog-browser {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.catalog-category-rail {
  display: grid;
  gap: 6px;
  position: sticky;
  top: 16px;
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
}
.admin-mode .catalog-category-rail button {
  display: block;
  padding: 13px 12px;
  text-align: left;
  border: 0;
  background: transparent;
  color: #60715b;
  font-weight: 500;
  border-radius: 10px;
  overflow-wrap: anywhere;
  min-height: 65px;
  width: 100%;
}
.catalog-category-rail button span,
.catalog-category-rail button small {
  display: block;
}
.catalog-category-rail button small {
  font-size: 11px;
  font-weight: 400;
  margin-top: 4px;
  color: #56684f;
}
.admin-mode .catalog-category-rail button[aria-pressed="true"] {
  background: #dfe9d3;
  color: #355731;
  font-weight: 650;
}
.admin-mode #admin-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-items: start;
  gap: 14px;
  background: none;
  border: 0;
  padding: 0;
}
.admin-mode .product-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  background: #fff;
  border: 1px solid #dfe6d5;
  border-radius: 14px;
  min-width: 0;
}
.admin-mode .product-row > img {
  width: 52px;
  height: 60px;
}
.admin-mode .product-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.5;
}
.admin-mode .product-info .price-editor > summary {
  text-align: left;
  margin-top: 0;
  min-height: 44px;
  padding: 8px 0;
}
.admin-mode .product-info .price-editor > summary > span {
  display: inline;
  font-size: 11px;
  margin-left: 6px;
}
.admin-mode .product-price {
  font-size: 16px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.admin-mode .product-price small {
  font-size: 10px;
  font-weight: 400;
  color: var(--admin-muted);
}
.admin-mode .product-actions {
  display: flex;
  grid-column: 1/-1;
  border-top: 1px solid #edf1e6;
  justify-content: space-between;
  gap: 6px;
  padding-top: 2px;
}
.admin-mode .product-direct-edit {
  border: 0;
  padding: 8px 12px;
  color: #45664b;
  background: none;
  flex: 1;
}
.admin-mode .product-more > summary {
  min-width: 44px;
  min-height: 44px;
}
.admin-mode .catalog-utility {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 9px 0 5px;
}
.admin-mode .catalog-utility .catalog-result {
  flex: 1;
  min-width: 60px;
  margin: 0;
  font-size: 11px;
}
.admin-mode .catalog-utility a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font-size: 12px;
}
.admin-mode .catalog-result {
  margin: 0 0 12px;
  font-size: 12px;
}
@media (min-width: 701px) {
  .admin-dashboard,
  .admin-store {
    max-width: 760px;
  }
  .workbench-tasks {
    display: grid;
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  body.admin-mode {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .admin-nav {
    grid-template-columns: repeat(var(--admin-tab-count), minmax(0, 1fr));
    gap: 0;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  }
  .admin-nav a {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 6px 2px;
    min-height: 53px;
    font-size: 11px;
    border-radius: 0;
  }
  .admin-nav a > span {
    font-size: 11px;
  }
  .admin-nav a[aria-current="page"] {
    background: none;
    font-weight: 650;
  }
  .admin-nav a[aria-current="page"] .admin-icon {
    background: #e5eddc;
    border-radius: 7px;
    outline: 4px solid #e5eddc;
  }
  .admin-workspace {
    padding: 26px 20px;
  }
  .admin-shell .workspace-title {
    padding-right: 0;
    margin-bottom: 23px;
  }
  .admin-shell .workspace-title h1 {
    font-size: 25px;
  }
  .admin-mode .workbench-summary strong {
    font-size: 26px;
  }
  .workbench-summary > div + div {
    padding-left: 20px;
  }
  .workbench-feature strong {
    font-size: 22px;
  }
  .admin-mode .admin-record {
    padding: 16px;
  }
  .admin-mode input,
  .admin-mode select,
  .admin-mode textarea {
    font-size: 16px;
  }
  .catalog-browser {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .catalog-category-rail {
    display: none;
  }
  .admin-mode .catalog-category-rail button {
    font-size: 12px;
    padding: 12px 9px;
  }
  .admin-mode #admin-products {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }
  .admin-mode #admin-products {
    gap: 12px;
  }
  .admin-mode .product-row {
    grid-template-columns: 56px minmax(0, 1fr) 104px;
    gap: 4px 12px;
    padding: 12px;
  }
  .admin-mode .product-row > img {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
  }
  .admin-mode .product-info {
    display: contents;
  }
  .admin-mode .product-info h3 {
    grid-column: 2 / -1;
    grid-row: 1;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
  }
  .admin-mode .product-metadata {
    grid-column: 2 / -1;
    grid-row: 2;
    font-size: 12px;
    line-height: 1.5;
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .admin-mode .product-status {
    font-size: 12px;
    padding: 2px 6px;
  }
  .admin-mode .product-info .price-editor {
    grid-column: 1 / 3;
    grid-row: 3;
    min-width: 0;
  }
  .admin-mode .product-info .price-editor > summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 6px;
    min-height: 44px;
    padding: 4px 0;
  }
  .admin-mode .product-info .price-editor > summary > span {
    margin: 0;
    font-size: 12px;
  }
  .admin-mode .product-price {
    font-size: 18px;
    font-variant-numeric: tabular-nums;
  }
  .admin-mode .product-price small {
    font-size: 12px;
  }
  .admin-mode .product-actions {
    grid-column: 3;
    grid-row: 3;
    border: 0;
    padding: 0;
    gap: 4px;
    align-self: end;
  }
  .admin-mode .product-direct-edit {
    flex: none;
    min-width: 56px;
    padding: 8px;
    font-size: 14px;
  }
  .admin-shell[data-view="products"] .admin-workspace {
    padding: 16px;
  }
  .admin-shell[data-view="products"] .workspace-title {
    padding-right: 108px;
    margin-bottom: 16px;
  }
  .admin-shell[data-view="products"] .new-product > summary {
    top: 36px;
    right: 16px;
  }
  .admin-shell[data-view="products"] .workspace-title .view-description {
    display: none;
  }
  .admin-shell[data-view="products"] .workspace-title .eyebrow {
    white-space: nowrap;
  }
  .admin-mode .catalog-filters {
    gap: 8px;
  }
  .admin-mode .catalog-utility {
    gap: 0 12px;
    margin: 4px 0;
  }
  .admin-mode .catalog-utility .catalog-result {
    font-size: 12px;
  }
  .catalog-products:has(#admin-category option:checked:not([value=""]))
    .catalog-result {
    flex-basis: 100%;
    padding-top: 8px;
  }
  .catalog-products:has(#admin-category option:checked:not([value=""]))
    .product-metadata
    > span:first-child {
    display: none;
  }
  .admin-shell[data-view="products"] .workspace-title h1 {
    font-size: 25px;
  }
  .admin-shell[data-view="products"] .workspace-title .eyebrow {
    font-size: 12px;
  }
}
@media (max-width: 350px) {
  .admin-workspace {
    padding: 26px 16px;
  }
  .admin-mode .catalog-category-rail button {
    padding: 10px 6px;
  }
  .workbench-feature small {
    font-size: 11px;
  }
}

.admin-mode .product-info .price-editor > summary {
  list-style: none;
}
.admin-mode .product-info .price-editor > summary::-webkit-details-marker {
  display: none;
}

/* C palette: keep secondary labels legible on the paper and green surfaces. */
.admin-shell .product-metadata,
.admin-shell .catalog-result,
.admin-shell .catalog-status-tabs button:not([aria-pressed="true"]) {
  color: var(--admin-muted);
}
.admin-shell .workbench-feature small {
  color: #56684f;
}

/* Product maintenance keeps keyboard focus as clear as its touch controls. */
.admin-shell[data-view="products"]
  :is(a, button, summary, input, select, textarea):focus-visible,
.admin-mode
  .product-edit-dialog
  :is(button, input, select, textarea):focus-visible,
.admin-mode .product-action-dialog :is(button, input):focus-visible {
  outline: 2px solid var(--admin-ink);
  outline-offset: 3px;
}

/* Selected product layout A: continuous rows, with category management alongside. */
.catalog-sections {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--admin-line);
  margin: 0 0 18px;
}
.catalog-sections a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  font-size: 14px;
  color: var(--admin-muted);
}
.catalog-sections a[aria-current="page"] {
  border-bottom-color: #245b41;
  color: #245b41;
  font-weight: 650;
}
.admin-mode .catalog-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}
.admin-mode .compact-search {
  position: relative;
  width: 100%;
}
.compact-search > .admin-icon {
  position: absolute;
  left: 13px;
  top: 14px;
  width: 18px;
  height: 18px;
  color: #71856c;
  pointer-events: none;
}
.admin-mode .compact-search input {
  padding-left: 40px;
  border-radius: 10px;
}
.catalog-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.admin-mode .catalog-filter-row label {
  margin: 0;
  min-width: 0;
}
.admin-mode .catalog-filter-row select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  border: 0;
  background-color: transparent;
  font-size: 16px;
  padding: 8px 20px 8px 0;
  text-overflow: ellipsis;
  color: #315e47;
}
.admin-mode .catalog-utility {
  margin: 0 0 6px;
  gap: 8px;
}
.admin-mode .catalog-utility a {
  font-size: 11px;
  min-height: 36px;
}
.admin-mode .catalog-utility .catalog-result {
  font-size: 11px;
  padding: 0;
  flex-basis: auto;
}
.admin-mode .catalog-browser {
  display: block;
}
.admin-mode #admin-products {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 0;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: white;
  overflow: hidden;
}
.admin-mode #admin-products > p {
  padding: 16px;
}
.admin-mode .product-row {
  grid-template-columns: minmax(0, 1fr) 86px 44px;
  align-items: center;
  padding: 12px 14px;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid #e5eade;
  border-radius: 0;
  min-height: 90px;
  background: none;
}
.admin-mode .product-row:last-child {
  border-bottom: 0;
}
.admin-mode .product-direct-edit {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 0;
  border: 0;
  border-radius: 0;
  text-align: left;
  background: none;
  color: var(--admin-ink);
}
.product-direct-edit > img {
  flex: none;
  width: 52px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}
.admin-mode .product-info {
  display: block;
  min-width: 0;
  flex: 1;
}
.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.admin-mode .product-metadata {
  display: block;
  margin: 4px 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-flags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 8px;
}
.admin-mode .product-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 400;
  line-height: 16px;
  background: none;
  padding: 0;
  border-radius: 0;
}
.admin-mode .product-status > span:first-child {
  font-size: 8px;
}
.product-featured {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  color: #50733b;
  line-height: 16px;
}
.product-featured .admin-icon {
  width: 12px;
  height: 12px;
}
.admin-mode .product-row > .price-editor {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
}
.admin-mode .product-row > .price-editor > summary {
  list-style: none;
  display: block;
  text-align: right;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
}
.product-row > .price-editor > summary::-webkit-details-marker {
  display: none;
}
.admin-mode .product-price {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.admin-mode .product-price-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--admin-muted);
}
.product-price-meta small {
  min-width: 0;
  font-size: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-price-meta > span {
  flex-shrink: 0;
}
.admin-mode .product-row > .product-more {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.admin-mode .product-more > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 8px;
}
.product-more > summary::-webkit-details-marker {
  display: none;
}
.admin-mode .catalog-pagination {
  padding: 20px 0 10px;
  text-align: center;
  color: var(--admin-muted);
}
.catalog-pagination p {
  font-size: 12px;
  margin: 0 0 10px;
}
.catalog-pagination > div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.admin-mode .catalog-pagination button,
.admin-mode .catalog-pagination select {
  width: auto;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  font-size: 16px;
  color: #315e47;
  background: white;
  border: 1px solid var(--admin-line);
}
.catalog-pagination small {
  display: block;
  margin-top: 10px;
  font-size: 11px;
}
.admin-mode .recommendation-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  padding: 14px 12px;
  margin: 8px 0;
  min-height: 66px;
}
.admin-mode .recommendation-choice input {
  flex: none;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: #245b41;
}
.recommendation-choice strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.recommendation-choice small {
  display: block;
  color: var(--admin-muted);
  margin-top: 6px;
  font-size: 12px;
}
.recommendation-choice:has(:checked) {
  background: #f0f5e9;
  border-color: #245b41;
}
.admin-mode .recommendation-dialog form > button {
  margin-top: 12px;
  width: 100%;
}
.creation-images {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 0;
  margin-bottom: 12px;
}
.creation-image {
  flex: 0 0 108px;
}
.creation-image img {
  display: block;
  width: 108px;
  height: 108px;
  border-radius: 8px;
  object-fit: cover;
}
.admin-mode .creation-image button {
  font-size: 12px;
  min-height: 44px;
  padding: 8px;
  width: 100%;
  margin: 4px 0 0;
}
@media (min-width: 701px) {
  .admin-shell[data-view="products"] .workspace-title {
    padding-right: 140px;
    margin-bottom: 20px;
  }
  .admin-shell[data-view="products"] .workspace-title .view-description {
    display: none;
  }
  .admin-shell[data-view="products"] .new-product > summary {
    top: 40px;
  }
  .admin-mode .product-row {
    grid-template-columns: minmax(0, 1fr) 120px 44px;
  }
}
@media (max-width: 700px) {
  .admin-mode .product-row {
    grid-template-columns: minmax(0, 1fr) 74px 44px;
    padding: 12px;
  }
  .admin-shell[data-view="products"] .workspace-title {
    margin-bottom: 18px;
  }
  .admin-shell[data-view="products"] .workspace-title h1 {
    font-size: 27px;
  }
  .admin-shell[data-view="products"] .new-product > summary {
    top: 24px;
  }
  .admin-shell[data-view="categories"] .admin-secondary-nav {
    display: none;
  }
}
@media (max-width: 350px) {
  .admin-mode .product-row {
    grid-template-columns: minmax(0, 1fr) 64px 44px;
    padding: 10px;
    gap: 6px;
  }
  .product-direct-edit > img {
    width: 36px;
    height: 52px;
  }
  .admin-mode .product-direct-edit {
    gap: 8px;
  }
  .product-name {
    font-size: 14px;
  }
  .admin-mode .product-price {
    font-size: 16px;
  }
  .catalog-filter-row {
    gap: 4px;
  }
  .admin-mode .catalog-pagination button,
  .admin-mode .catalog-pagination select {
    padding: 8px;
  }
}

.admin-home[data-section="featured"] .home-settings-section {
  padding: 0;
  border: 0;
  background: none;
}
.admin-home[data-section="featured"] .home-settings-section > h2 {
  display: none;
}
.admin-home[data-section="featured"] .home-settings-section > .muted {
  font-size: 12px;
  margin: 0 0 16px;
}
.admin-mode .home-selected-item {
  display: block;
  padding: 14px;
  background: white;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  margin-bottom: 12px;
}
.home-selected-item > div:first-child {
  display: flex;
  gap: 12px;
  align-items: center;
}
.home-selected-item > div:first-child > div {
  min-width: 0;
}
.home-selected-item img {
  width: 54px;
  height: 66px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}
.home-selected-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.5;
}
.home-selected-item small {
  font-size: 11px;
  margin: 0 0 4px;
}
.home-selected-price {
  display: block;
  font-size: 13px;
  margin-top: 4px;
}
.home-item-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--admin-line);
}
.admin-mode .home-item-actions button {
  min-width: 0;
  width: 100%;
  padding: 8px 2px;
  font-size: 12px;
  min-height: 44px;
  border: 0;
  background: none;
}
.admin-mode .home-pick-add {
  width: 100%;
  min-height: 48px;
}
.admin-mode .home-feature-picker {
  padding: 18px;
}
.home-feature-picker .home-choices {
  max-height: 55dvh;
}
.home-feature-picker h2 {
  font-size: 19px;
}
.home-feature-picker .home-choice {
  font-size: 14px;
}
.home-feature-picker .home-choice button {
  font-size: 12px;
  min-height: 44px;
}

.admin-mode .category-browse {
  flex: 1;
  min-width: 80px;
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--admin-ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.admin-mode .product-menu {
  display: grid;
  gap: 0;
}
.admin-mode .product-menu button {
  background: none;
  color: var(--admin-ink);
  border: 0;
  border-bottom: 1px solid var(--admin-line);
  border-radius: 0;
  padding: 12px 4px;
  min-height: 50px;
  margin: 0;
  text-align: left;
  font-size: 15px;
}
.admin-mode .product-menu button:last-child {
  color: #974536;
  border-bottom: 0;
}

/* Product A fidelity: reference geometry and a shared sheet, scoped to management. */
.admin-shell:has(.admin-catalog:not([hidden])),
.admin-shell[data-view="featured"] {
  --admin-ink: #203d30;
  --admin-muted: #617361;
  --admin-line: #dce3d6;
  --catalog-paper: #f5f5ed;
}
.admin-shell:is(
    [data-view="products"],
    [data-view="categories"],
    [data-view="featured"]
  )
  .admin-workspace {
  background: var(--catalog-paper);
  padding: 28px 32px 110px;
}
.admin-shell:is(
    [data-view="products"],
    [data-view="categories"],
    [data-view="featured"]
  )
  .workspace-title {
  margin: 0 0 20px;
  padding: 0 100px 0 0;
}
.admin-shell:is(
    [data-view="products"],
    [data-view="categories"],
    [data-view="featured"]
  )
  .workspace-title
  .eyebrow {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.07em;
  margin: 0 0 6px;
}
.admin-shell:is(
    [data-view="products"],
    [data-view="categories"],
    [data-view="featured"]
  )
  .workspace-title
  h1 {
  font-size: 27px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.03em;
  margin: 0;
}
.admin-shell:is(
    [data-view="products"],
    [data-view="categories"],
    [data-view="featured"]
  )
  .view-description {
  display: none;
}
.catalog-heading-count {
  font-size: 14px;
  font-weight: 450;
  letter-spacing: 0;
  margin-left: 8px;
  color: var(--admin-muted);
}
.catalog-sections {
  margin-bottom: 16px;
}
.catalog-sections a {
  font-size: 15px;
  gap: 8px;
}
.catalog-sections small {
  font-size: 12px;
  font-weight: 450;
}
.admin-mode .catalog-filters {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 8px 0 4px;
  gap: 0;
  background: var(--catalog-paper);
}
.admin-mode .compact-search input {
  height: 46px;
  min-height: 46px;
  border-radius: 9px;
  padding: 10px 12px 10px 42px;
}
.compact-search > .admin-icon {
  width: 20px;
  height: 20px;
  left: 14px;
  top: 13px;
}
.catalog-filter-row {
  grid-template-columns: minmax(0, 1fr) auto 44px;
  align-items: center;
  margin-top: 4px;
  gap: 8px;
}
.admin-mode .catalog-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 0;
  margin: 0;
  border: 0;
  background: none;
  color: #245b41;
  font: 550 13px/1.4 inherit;
  text-align: left;
}
.catalog-filter-button > span {
  overflow-wrap: anywhere;
}
.catalog-filter-button .admin-icon {
  width: 16px;
  height: 16px;
}
.admin-mode [data-catalog-sort] {
  justify-content: flex-end;
}
.admin-mode .catalog-utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 12px;
  margin: 0;
  min-height: 40px;
  color: var(--admin-muted);
  font-size: 12px;
}
.admin-mode .catalog-utility .catalog-result {
  font-size: 12px;
  min-height: 0;
  margin: 0;
  line-height: 1.5;
}
.catalog-sort-caption {
  flex-shrink: 0;
}
.admin-mode .catalog-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  color: var(--admin-muted);
}
.admin-mode .product-row {
  grid-template-columns: minmax(0, 1fr) 74px 44px;
  padding: 12px;
  min-height: 0;
}
.admin-mode .product-direct-edit {
  min-height: 44px;
}
.admin-mode .product-status.is-published,
.admin-mode .product-status.is-unpublished {
  background: none;
  padding: 0;
  font-size: 11px;
  font-weight: 450;
  gap: 5px;
}
.admin-mode .product-status > span:first-child {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: #39805a;
  font-size: 0;
}
.admin-mode .product-status.is-unpublished > span:first-child {
  background: transparent;
  border: 1px solid #859180;
}
.admin-mode .catalog-products .product-metadata > span:first-child {
  display: inline;
}
.admin-mode .product-price {
  letter-spacing: -0.02em;
}
.admin-mode .product-price-meta {
  font-size: 11px;
  margin-top: 4px;
}
.admin-mode .product-more > summary {
  list-style: none;
  font-size: 0;
}
.admin-mode .product-more > summary::after,
.admin-mode .product-more > summary::before {
  content: none;
}
.product-more > summary .admin-icon {
  width: 20px;
  height: 20px;
}
.admin-mode .catalog-pagination {
  padding: 22px 0 10px;
}
.catalog-pagination p {
  margin-bottom: 8px;
}
.catalog-pagination small {
  margin-top: 12px;
}
.admin-mode .catalog-pagination button {
  font-size: 13px;
}
.catalog-empty {
  text-align: center;
  padding: 50px 20px;
}
.catalog-empty > .admin-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  color: var(--admin-muted);
}
.catalog-empty h2 {
  font-size: 19px;
  margin: 0;
}
.catalog-empty p {
  font-size: 14px;
}
.admin-mode .catalog-empty button {
  background: white;
  color: #245b41;
  border: 1px solid var(--admin-line);
  min-height: 44px;
}
.admin-mode :is(.catalog-sheet, .product-action-dialog) {
  box-sizing: border-box;
  width: min(460px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--admin-line);
  border-radius: 18px;
  overflow: auto;
  background: white;
  color: var(--admin-ink);
}
:is(.catalog-sheet, .product-action-dialog)::backdrop {
  background: #152c3380;
}
.admin-mode :is(.catalog-sheet, .product-action-dialog) > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--admin-line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
  margin: 0;
}
.admin-mode :is(.catalog-sheet, .product-action-dialog) > header h2 {
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0;
  overflow-wrap: anywhere;
}
.admin-mode :is(.catalog-sheet, .product-action-dialog) > header button {
  display: grid;
  place-items: center;
  flex: none;
  background: none;
  color: #245b41;
  width: 44px;
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px;
  margin: 0;
  border: 0;
  border-radius: 8px;
}
.catalog-sheet-body {
  padding: 18px 20px 24px;
}
.catalog-sheet-body > :last-child {
  margin-bottom: 0;
}
.admin-mode .catalog-filter-options {
  display: grid;
  gap: 2px;
}
.admin-mode .catalog-filter-options button {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 450;
  background: none;
  color: var(--admin-ink);
}
.catalog-filter-options button > span {
  flex: 1;
  overflow-wrap: anywhere;
}
.catalog-filter-options small {
  font-size: 12px;
  color: var(--admin-muted);
}
.catalog-filter-options .admin-icon {
  width: 20px;
  height: 20px;
}
.admin-mode .catalog-filter-options button[aria-pressed="true"] {
  background: #e5eddb;
}
@media (min-width: 701px) {
  .product-name {
    font-size: 16px;
  }
}
@media (max-width: 700px) {
  .admin-shell:is(
      [data-view="products"],
      [data-view="categories"],
      [data-view="featured"]
    )
    .admin-workspace {
    padding: 20px 16px calc(110px + env(safe-area-inset-bottom));
  }
  .admin-shell:is(
      [data-view="products"],
      [data-view="categories"],
      [data-view="featured"]
    )
    .workspace-title {
    margin-bottom: 16px;
  }
  .admin-mode :is(.catalog-sheet, .product-action-dialog) {
    width: 100%;
    max-width: 100%;
    max-height: 90dvh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .admin-mode :is(.catalog-sheet, .product-action-dialog) > header {
    padding-inline: 18px;
  }
}
@media (max-width: 350px) {
  .admin-shell:is(
      [data-view="products"],
      [data-view="categories"],
      [data-view="featured"]
    )
    .workspace-title
    h1 {
    font-size: 24px;
  }
  .admin-mode .product-row {
    grid-template-columns: minmax(0, 1fr) 64px 44px;
    padding: 10px;
    gap: 6px;
  }
  .catalog-filter-row {
    gap: 5px;
  }
  .admin-mode .product-metadata {
    font-size: 10px;
  }
}
.admin-mode .catalog-filter-button {
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
}
.admin-shell:is([data-view="categories"], [data-view="featured"])
  .workspace-title {
  padding-left: 56px;
  min-height: 52px;
}
.admin-shell:is([data-view="categories"], [data-view="featured"])
  .workspace-title
  h1 {
  font-size: 24px;
}
.admin-shell:is([data-view="categories"], [data-view="featured"])
  .workspace-title
  .eyebrow {
  font-size: 10px;
}
.admin-shell:is([data-view="categories"], [data-view="featured"])
  .admin-secondary-nav {
  display: none;
}
.catalog-page-back {
  position: absolute;
  left: 0;
  top: 4px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #245b41;
}
.catalog-page-back .admin-icon {
  width: 20px;
  height: 20px;
}
.admin-mode .catalog-category-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}
.catalog-category-intro > span {
  width: 44px;
  height: 44px;
  background: #e5eddb;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
}
.catalog-category-intro .admin-icon {
  width: 20px;
  height: 20px;
}
.admin-mode .catalog-category-intro p {
  font-size: 15px;
  margin: 0;
}
.catalog-category-intro small {
  display: block;
  font-size: 12px;
  margin-top: 3px;
  color: var(--admin-muted);
}
.admin-mode #category-list {
  padding: 0;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  overflow: hidden;
  background: white;
}
.admin-mode .category-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 12px;
  min-height: 88px;
  border-bottom: 1px solid #e7ecdf;
}
.admin-mode .category-row:last-child {
  border: 0;
}
.category-number {
  min-width: 20px;
  color: #8b9786;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.admin-mode .category-browse {
  display: block;
  min-width: 0;
  flex: 1;
  font-size: 15px;
}
.category-browse small {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
  color: var(--admin-muted);
  margin-top: 5px;
}
.category-browse .admin-icon {
  width: 14px;
  height: 14px;
}
.admin-mode .category-more {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: #245b41;
  padding: 10px;
  margin: 0;
}
.category-more .admin-icon {
  width: 20px;
  height: 20px;
}
.catalog-category-footnote,
.catalog-help {
  font-size: 12px;
  color: var(--admin-muted);
  line-height: 1.6;
  margin: 18px 0;
}
.admin-mode .new-category > summary,
.admin-mode .new-product > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 550;
  padding: 12px 15px;
  border-radius: 8px;
  background: #245b41;
  color: white;
  border: 0;
}
.admin-mode .new-category > summary {
  position: absolute;
  right: 32px;
  top: 28px;
}
.new-category > summary .admin-icon,
.new-product > summary .admin-icon {
  width: 20px;
  height: 20px;
}
.admin-mode .new-category,
.admin-mode .new-product {
  margin: 0;
  padding: 0;
  border: 0;
}
.admin-mode .catalog-sheet label {
  font-size: 14px;
  margin: 0 0 18px;
}
.admin-mode .catalog-sheet :is(input, select, textarea) {
  font-size: 16px;
  min-height: 46px;
  padding: 11px;
  border: 1px solid #c8d5c3;
  border-radius: 8px;
  margin-top: 6px;
}
.admin-mode .catalog-sheet form > button {
  width: 100%;
  min-height: 44px;
  margin: 0;
}
.category-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.admin-mode .category-sheet-actions button {
  min-height: 44px;
  font-size: 14px;
  border: 1px solid var(--admin-line);
  background: none;
  color: #245b41;
}
.admin-mode .catalog-danger {
  width: 100%;
  background: none;
  color: #9b5944;
  min-height: 44px;
}
@media (max-width: 700px) {
  .admin-mode .new-category > summary {
    right: 16px;
    top: 24px;
  }
}
@media (max-width: 350px) {
  .admin-shell:is([data-view="categories"], [data-view="featured"])
    .workspace-title
    h1 {
    font-size: 22px;
  }
  .admin-shell:is([data-view="categories"], [data-view="featured"])
    .workspace-title {
    padding-left: 48px;
  }
}
.admin-mode .product-edit-dialog {
  width: min(460px, calc(100% - 24px));
  height: auto;
  max-height: 90dvh;
  padding: 0;
  border: 1px solid var(--admin-line);
  border-radius: 18px;
  background: white;
  color: var(--admin-ink);
}
.admin-mode .product-edit-dialog::backdrop {
  background: #152c3380;
}
.admin-mode .product-edit-header {
  padding: 12px 16px;
  min-height: 69px;
}
.admin-mode .product-edit-header h2 {
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
}
.admin-mode .product-edit-header button {
  background: none;
  color: #245b41;
  border: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.product-edit-header button .admin-icon {
  width: 20px;
  height: 20px;
}
.admin-mode .product-edit-body {
  padding: 18px 20px 24px;
  max-height: calc(90dvh - 153px);
}
.admin-mode .product-edit-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
}
.admin-mode .product-edit-fields label {
  font-size: 14px;
  margin: 0;
}
.admin-mode .product-edit-fields :is(input, select, textarea) {
  min-height: 46px;
  font-size: 16px;
  line-height: 1.5;
  padding: 11px;
  margin: 6px 0 0;
  border: 1px solid #c8d5c3;
  border-radius: 8px;
}
.admin-mode .product-edit-fields textarea {
  height: 72px;
  min-height: 72px;
  resize: vertical;
}
.admin-mode .product-edit-images {
  margin: 0 0 20px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--admin-line);
  border-radius: 0;
  background: none;
}
.photo-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.photo-heading strong {
  font-size: 14px;
}
.photo-heading strong > span {
  font-size: 12px;
  font-weight: 400;
  color: var(--admin-muted);
  margin-left: 4px;
}
.admin-mode .photo-heading button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  min-height: 44px;
  font-size: 13px;
  border: 0;
  background: none;
  color: #245b41;
}
.photo-heading button .admin-icon {
  width: 20px;
  height: 20px;
}
.admin-mode .photo-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 3px 3px 10px;
  margin: 0;
}
.admin-mode .photo-choice {
  display: flex;
  flex: 0 0 92px;
  flex-direction: column;
  gap: 0;
  min-width: 92px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: none;
  overflow: hidden;
  color: #245b41;
}
.admin-mode .photo-choice[aria-pressed="true"] {
  border-color: #245b41;
  background: #edf3e5;
}
.admin-mode .photo-choice img {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
}
.photo-choice > span {
  font-size: 11px;
  font-weight: 500;
  line-height: 24px;
}
.admin-mode .photo-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
}
.admin-mode .photo-actions button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 2px;
  font-size: 12px;
  font-weight: 450;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: none;
  color: #245b41;
}
.admin-mode .photo-editor input[hidden] {
  display: none !important;
}
.admin-mode .photo-editor .catalog-help {
  font-size: 11px;
  line-height: 1.6;
  margin: 10px 0 0;
}
.admin-mode .photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 114px;
  border: 1px dashed #aabd9c;
  background: #f6f8f0;
  color: #245b41;
  border-radius: 8px;
  font-size: 13px;
}
.photo-empty .admin-icon {
  width: 26px;
  height: 26px;
}
.admin-mode .product-edit-footer {
  padding: 12px 20px;
}
.admin-mode .product-edit-actions button {
  min-height: 44px;
  font-size: 14px;
}
.admin-mode .product-edit-actions button[type="submit"] {
  flex: 1;
}
.admin-mode .product-edit-actions .editor-cancel {
  flex: 0 0 auto;
  min-width: 66px;
}
.admin-shell[data-view="products"] .new-product > summary {
  top: 28px;
  right: 32px;
}
@media (max-width: 700px) {
  .admin-mode .product-edit-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 90dvh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .admin-mode .product-edit-header {
    padding-inline: 18px;
  }
  .admin-shell[data-view="products"] .new-product > summary {
    top: 24px;
    right: 16px;
  }
}

/* A: action sheets use the same quiet rows and supporting values. */
.product-menu {
  display: grid;
  gap: 4px;
}
.product-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 15px;
  font-weight: 500;
}
.product-menu button:last-child {
  color: #914e42;
}
.product-menu .menu-detail,
.product-menu .menu-status {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.product-menu .menu-status {
  border-radius: 5px;
  background: #e7efdf;
  padding: 3px 6px;
}
.product-menu svg {
  width: 18px;
  height: 18px;
}
.price-product-name {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 18px;
}
.recommendation-dialog .secondary {
  width: 100%;
  margin-top: 10px;
}

/* A: curated picks and the photo-led product picker. */
.admin-shell[data-view="featured"] .view-description,
.admin-shell[data-view="featured"] .admin-secondary-nav,
.admin-shell[data-view="featured"] .home-settings-section > h2 {
  display: none;
}
.admin-shell[data-view="featured"] .workspace-title {
  margin-bottom: 16px;
}
.admin-shell[data-view="featured"] .home-settings-section {
  padding: 0;
  background: transparent;
  border: 0;
}
.admin-shell[data-view="featured"] .home-settings-section > .muted {
  margin: 0 0 18px;
  font-size: 14px;
}
.admin-shell[data-view="featured"] .home-item-actions {
  grid-template-columns: 1fr 1fr 1fr 1.3fr;
}
.featured-footnote {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  margin: 16px 0;
}
.home-feature-picker .feature-picker-help,
.home-feature-picker .feature-picker-count {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}
.home-feature-picker .feature-picker-count {
  margin-top: 16px;
}
.home-feature-picker .home-choices {
  display: grid;
  gap: 0;
}
.home-feature-picker .home-choice {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  min-height: 74px;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  text-align: left;
}
.home-choice img {
  width: 44px;
  height: 54px;
  object-fit: cover;
  border-radius: 7px;
}
.home-choice strong,
.home-choice small {
  display: block;
}
.home-choice strong {
  font-size: 14px;
  font-weight: 550;
}
.home-choice small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.home-choice svg {
  width: 20px;
  height: 20px;
}
/* Remove legacy control chrome left over from the earlier admin layout. */
.admin-shell:has(.admin-catalog:not([hidden])),
.admin-shell[data-view="featured"] {
  --ink: var(--admin-ink);
  --muted: var(--admin-muted);
  --line: var(--admin-line);
}
.admin-mode :is(.new-product, .new-category) > summary::before {
  content: none;
}
.admin-mode .category-row .category-more {
  border: 0;
  border-radius: 0;
  background: none;
}
.admin-mode .catalog-category-intro p {
  color: var(--admin-ink);
}
.admin-mode .catalog-page-back {
  top: 4px;
  display: grid;
  place-items: center;
  padding: 12px;
}
.admin-mode .catalog-page-back svg {
  display: block;
}
.admin-mode .home-feature-picker .home-choice {
  padding: 12px 0;
  min-height: 79px;
}
.admin-mode .home-feature-picker .home-choice img {
  width: 44px;
  height: 54px;
  border-radius: 7px;
}
.admin-mode .home-feature-picker .home-choice small {
  font-size: 11px;
  font-weight: 400;
  color: var(--admin-muted);
}
.admin-mode .product-menu button {
  min-height: 56px;
  padding: 12px 0;
  font-weight: 500;
}
@media (max-width: 600px) {
  .admin-mode :is(.catalog-sheet, .product-action-dialog) > header,
  .admin-mode .product-edit-header {
    padding: 18px;
    min-height: 81px;
  }
}

.admin-shell:is([data-view="categories"], [data-view="featured"])
  .workspace-title {
  position: relative;
  padding-left: 52px;
}
.admin-shell[data-view="categories"] .catalog-category-intro {
  margin-top: 8px;
}
.admin-shell[data-view="categories"] .catalog-sections small {
  display: none;
}
.admin-mode .catalog-option-menu {
  gap: 4px;
}
.admin-mode .catalog-option-menu button {
  min-height: 56px;
  padding: 12px 0;
  border-bottom: 1px solid var(--admin-line);
  border-radius: 0;
}
.admin-mode .catalog-option-menu button[aria-pressed="true"] {
  background: none;
}
.admin-mode .price-product-name {
  color: var(--admin-ink);
  font-size: 17px;
  margin: 0 0 18px;
}
.admin-mode .price-editor form > button {
  width: 100%;
  min-height: 48px;
}
.admin-mode .home-pick-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.home-pick-add svg {
  width: 20px;
  height: 20px;
}
.admin-mode .home-feature-picker .home-choices {
  max-height: none;
  margin-top: 0;
}
.admin-mode .home-feature-picker .feature-picker-count {
  margin-bottom: 0;
}
.admin-mode .home-feature-picker .feature-picker-help {
  margin-top: 10px;
}
.admin-mode .photo-heading {
  margin-top: 6px;
}
@media (max-width: 700px) {
  .admin-shell:is([data-view="categories"], [data-view="featured"])
    .admin-workspace {
    padding-top: 28px;
  }
}
.admin-mode :is(.new-product, .new-category) > summary {
  min-width: 84px;
  background: #245b41;
}
.admin-shell:is(
    [data-view="products"],
    [data-view="categories"],
    [data-view="featured"]
  )
  :is(.catalog-sheet-body, .product-edit-footer)
  > button:not(.secondary),
.admin-shell:is(
    [data-view="products"],
    [data-view="categories"],
    [data-view="featured"]
  )
  :is(.catalog-sheet-body, .product-edit-footer)
  button[type="submit"],
.admin-mode .price-editor form > button {
  background: #245b41;
}

.merchant-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.merchant-row {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1rem;
  overflow-wrap: anywhere;
}
[aria-label="临时密码交付"] {
  padding: 1rem;
  background: #f4f8ed;
  border-radius: 12px;
  margin-block: 1rem;
  overflow-wrap: anywhere;
}
[aria-label="临时密码交付"] code {
  display: block;
  user-select: all;
  margin-block: 1rem;
}

[aria-label="商家管理"] {
  margin-block: 1rem;
  padding: 1rem;
  border: 1px solid #ccd7ce;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
[aria-label="商家管理"] code {
  display: block;
  user-select: all;
  margin-block: 1rem;
  padding: 1rem;
  background: #f4f8ed;
}
.merchant-row button {
  margin-block-start: 1rem;
}
.reset-confirm {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.reset-confirm input {
  width: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.remember-login {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.remember-login input[type="checkbox"] {
  width: auto;
  margin: 0;
}
