:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #16281d;
  background: #f5f7f5;
  font-size: 16px;
  --green: #163d25;
  --muted: #627269;
  --border: #dce5de;
  --lime: #c6f27c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover,
.button:hover {
  filter: brightness(1.08);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.secondary,
.button.secondary {
  background: #fff;
  border-color: var(--border);
  color: var(--green);
}
button.danger {
  background: #fff1ef;
  color: #a42c20;
  border-color: #f3d6d0;
}
button.small,
.button.small {
  font-size: 0.875rem;
  padding: 8px 12px;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #b8c9bd;
  border-radius: 8px;
  background: white;
  color: inherit;
  min-height: 46px;
}
textarea {
  min-height: 92px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 19px;
  min-height: 19px;
  height: 19px;
  accent-color: var(--green);
  flex-shrink: 0;
}
label {
  display: grid;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 600;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #6aa779;
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #73a840;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.045em;
  line-height: 1.15;
}
h2 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1rem;
}
p {
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 0.8125rem;
}
.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 750;
  color: #637b69;
  margin-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  font-weight: 800;
}
.brand img {
  width: 34px;
  height: 34px;
}
.brand-name {
  overflow-wrap: anywhere;
}
.shell {
  display: grid;
  grid-template-columns: 228px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar nav {
  display: grid;
  gap: 7px;
  margin-top: 40px;
}
.sidebar nav button {
  font-size: 0.9375rem;
  text-align: left;
  padding-left: 12px;
  padding-right: 12px;
  white-space: nowrap;
  background: transparent;
  color: #64746a;
  justify-content: flex-start;
  font-weight: 550;
}
.sidebar nav button.active {
  background: #e9f1e9;
  color: var(--green);
  font-weight: 750;
}
.nav-symbol {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid #d5e1d5;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}
.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 12px;
  font-size: 0.8125rem;
}
.pilot-label {
  color: #54685a;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.workspace {
  max-width: 1480px;
  width: 100%;
  padding: 28px 44px 60px;
  margin: 0 auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 30px;
  gap: 12px;
  color: var(--muted);
  font-size: 0.875rem;
}
.pill {
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 10px;
  background: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 14px 0 28px;
}
.pagehead p {
  color: var(--muted);
  margin-top: 10px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  background: white;
  border: 1px solid var(--border);
  padding: 22px;
  border-radius: 14px;
}
.stat:first-child {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.stat:first-child small {
  color: #c6d9cc;
}
.stat strong {
  display: block;
  font-size: 2.1rem;
  letter-spacing: -0.04em;
  margin: 14px 0 6px;
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}
.panel-body {
  padding: 24px;
}
.split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
}
.row {
  padding: 18px 24px;
  border-bottom: 1px solid #e9eeea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.row:last-child {
  border: 0;
}
.row h3 {
  margin-bottom: 5px;
}
.row-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 650;
  background: #eef2ef;
  color: #47614f;
}
.badge.pending {
  background: #fff4d5;
  color: #806211;
}
.badge.approved {
  background: #e8f6e9;
  color: #246332;
}
.badge.rejected {
  background: #fbeae7;
  color: #963e33;
}
.badge.active {
  background: #e8f6e9;
  color: #246332;
}
.empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}
.empty strong {
  display: block;
  color: var(--green);
  margin-bottom: 8px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.full {
  grid-column: 1/-1;
}
.form-note {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
  background: #f3f7f2;
  padding: 14px;
  border-radius: 9px;
}
.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.product {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product h3 {
  font-size: 1.0625rem;
  line-height: 1.5;
}
.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.product-number {
  font-weight: 750;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}
.product dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 2px 0;
  gap: 8px;
  font-size: 0.8125rem;
}
.product dt {
  color: var(--muted);
}
.product dd {
  margin: 0;
  text-align: right;
}
.product button {
  margin-top: auto;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #e9eeea;
  cursor: pointer;
  font-weight: 400;
}
.check-row:last-child {
  border: 0;
}
.check-row:has(input:checked) {
  background: #eff7e9;
}
.check-row strong {
  font-size: 0.9375rem;
}
.check-row small {
  display: block;
  margin-top: 4px;
}
.selection {
  max-height: 420px;
  overflow: auto;
}
.stepnum {
  display: inline-grid;
  place-items: center;
  background: #eaf2e7;
  color: var(--green);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 0.875rem;
  margin-right: 8px;
}
.builder-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--green);
  color: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  position: sticky;
  bottom: 16px;
  box-shadow: 0 8px 25px #173e2420;
}
.builder-summary button {
  background: var(--lime);
  color: var(--green);
}
.builder-summary small {
  color: #c5d8c9;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}
.toolbar input {
  max-width: 360px;
}
.toolbar select {
  max-width: 220px;
}
.order-lines {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 16px;
  display: grid;
  gap: 10px;
  font-size: 0.875rem;
}
.order-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.order-card {
  padding: 24px;
}
.order-card .order-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.order-card .actions {
  margin-top: 18px;
}
.order-card small {
  display: block;
  margin-top: 7px;
}
.total {
  font-size: 1.25rem;
  font-weight: 750;
}
.subtle {
  font-size: 0.8125rem;
  color: var(--muted);
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-story {
  background: var(--green);
  padding: 70px;
  display: flex;
  flex-direction: column;
  color: white;
  justify-content: space-between;
}
.login-story .eyebrow {
  color: var(--lime);
}
.login-story .brand {
  font-size: 1.7rem;
}
.login-story h1 {
  font-size: clamp(2.6rem, 5vw, 5rem);
  max-width: 680px;
  letter-spacing: -0.06em;
  line-height: 1.05;
}
.login-story h1 span {
  color: var(--lime);
}
.login-story p {
  color: #c4d6c8;
  max-width: 400px;
  margin-top: 24px;
  font-size: 1.125rem;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form form {
  max-width: 380px;
  width: 100%;
  display: grid;
  gap: 22px;
}
.login-form h2 {
  font-size: 1.9rem;
}
.login-form .brand {
  display: none;
}
.login-foot {
  font-size: 0.875rem;
  color: #c2d7c7;
}
.error {
  padding: 12px 15px;
  background: #fff0ed;
  color: #a52f21;
  border-radius: 8px;
  font-size: 0.875rem;
}
.error:empty {
  display: none;
}
dialog {
  width: min(640px, calc(100% - 32px));
  max-height: 90vh;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  color: inherit;
  box-shadow: 0 20px 80px #112e2733;
}
dialog::backdrop {
  background: #102c2470;
  backdrop-filter: blur(3px);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-header button {
  padding: 5px 12px;
  background: #f0f4f0;
  color: var(--green);
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #173d25;
  color: white;
  padding: 14px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 30px #0002;
  z-index: 10;
  display: none;
  max-width: calc(100% - 32px);
  font-size: 0.9375rem;
}
#notice.show {
  display: block;
}
.buyer {
  max-width: 1050px;
  margin: auto;
  padding: 28px 30px 100px;
}
.buyer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding-bottom: 30px;
}
.buyer-header select {
  width: 140px;
}
.buyer-hero {
  background: var(--green);
  border-radius: 16px;
  padding: 32px;
  color: white;
  margin-bottom: 24px;
}
.buyer-hero .eyebrow {
  color: var(--lime);
}
.buyer-hero h1 {
  max-width: 700px;
}
.buyer-hero p {
  color: #d3e4d5;
  margin-top: 12px;
}
.offer-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 22px;
  font-size: 0.875rem;
  color: #cee1d1;
}
.buyer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.buyer-product {
  padding: 22px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  gap: 14px;
}
.buyer-product h2 {
  font-size: 1.1rem;
  line-height: 1.4;
}
.buyer-product .price {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.quantity {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 8px;
}
.checkout {
  margin-top: 26px;
}
.checkout .panel-body {
  display: grid;
  gap: 18px;
}
.checkout-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.success {
  max-width: 640px;
  margin: 30px auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}
.success .check {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: #e7f4dd;
  border-radius: 50%;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.success h1 {
  font-size: 1.8rem;
}
.success p {
  margin-top: 12px;
}
.boot {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
.link-box {
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
  padding: 12px;
  background: #f1f5f1;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.mobile-only {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1150px) {
  .workspace {
    padding: 24px;
  }
  .shell {
    grid-template-columns: 200px 1fr;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .split {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 45px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 17px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar .brand {
    font-size: 1.2rem;
  }
  .sidebar nav {
    display: flex;
    margin-top: 16px;
    gap: 5px;
    overflow: auto;
    padding-bottom: 2px;
  }
  .sidebar nav button {
    font-size: 0.875rem;
    white-space: nowrap;
    padding: 9px 12px;
    min-height: 42px;
  }
  .nav-symbol {
    display: none;
  }
  .sidebar-foot {
    display: none;
  }
  .workspace {
    padding: 18px 18px 40px;
  }
  .topbar {
    padding-bottom: 14px;
    gap: 8px;
    font-size: 0.8125rem;
  }
  .topbar span:first-child {
    overflow-wrap: anywhere;
  }
  .pagehead {
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 14px 0 22px;
  }
  .pagehead h1 {
    font-size: 1.8rem;
  }
  .pagehead p {
    font-size: 0.9375rem;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat strong {
    font-size: 1.75rem;
  }
  .stat small {
    font-size: 0.75rem;
  }
  .card-grid,
  .buyer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .product {
    padding: 16px;
  }
  .row {
    padding: 16px;
    flex-wrap: wrap;
  }
  .row .actions {
    width: 100%;
  }
  .panel-heading,
  .panel-body {
    padding: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  .builder-summary {
    padding: 16px;
    bottom: 10px;
    flex-wrap: wrap;
  }
  .builder-summary button {
    width: 100%;
  }
  .login-wrap {
    display: block;
  }
  .login-story {
    display: none;
  }
  .login-form {
    min-height: 100vh;
    padding: 30px;
  }
  .login-form .brand {
    display: flex;
    margin-bottom: 28px;
  }
  .buyer {
    padding: 20px 16px 40px;
  }
  .buyer-header {
    padding-bottom: 22px;
    flex-wrap: wrap;
  }
  .buyer-header .brand {
    font-size: 1.15rem;
  }
  .buyer-header select {
    width: 145px;
    flex-shrink: 0;
  }
  .buyer-hero {
    padding: 24px;
  }
  .buyer-hero h1 {
    font-size: 1.8rem;
  }
  .buyer-product {
    padding: 15px;
    gap: 12px;
  }
  .buyer-product h2 {
    font-size: 1rem;
  }
  .quantity {
    grid-template-columns: 1fr;
  }
  .checkout-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .order-card {
    padding: 18px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar input,
  .toolbar select {
    max-width: none;
  }
  .mobile-only {
    display: inline-flex;
  }
  .success {
    padding: 24px;
  }
  .topbar .pill {
    display: none;
  }
}
@media (max-width: 390px) {
  .card-grid,
  .buyer-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .buyer-header {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .panel,
  .product,
  .buyer-product {
    animation: rise 0.25s ease-out;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* PlantOffer mobile workspace */
input,
select,
textarea {
  font-size: 16px;
}
button,
.button {
  touch-action: manipulation;
}
body {
  -webkit-text-size-adjust: 100%;
}
.workspace,
.buyer,
.row-copy,
.product,
.buyer-product {
  min-width: 0;
}
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}
.product-photo,
.photo-placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 5/4;
  border-radius: 12px;
  object-fit: cover;
  background: #edf2ea;
}
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #728672;
  border: 1px dashed #c6d4c2;
}
.photo-placeholder > span {
  font-size: 48px;
  line-height: 1;
}
.product-photo.thumb,
.photo-placeholder.thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 8px;
}
.photo-placeholder.thumb > span {
  font-size: 26px;
}
.product,
.buyer-product {
  box-shadow: 0 4px 18px #173d2505;
}
.product .product-photo,
.product .photo-placeholder {
  margin-bottom: 4px;
}
.photo-editor {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 24px;
}
.photo-editor small {
  display: block;
  margin: 10px 0;
  line-height: 1.6;
}
.photo-pick {
  position: relative;
  overflow: hidden;
}
.photo-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.photo-pick:focus-within {
  outline: 3px solid #73a840;
}
#photo-status,
#scan-status {
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0;
}
.sticker-choice {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: grid;
  gap: 12px;
}
.toggle-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
}
.sticker-instruction {
  display: block;
  color: #396542;
  font-size: 12px;
  margin-top: 6px;
}
.badge.daily {
  color: #754600;
  background: #fff0b9;
}
.list-members {
  margin-top: 16px;
}
#scan-video {
  width: 100%;
  max-height: 280px;
  aspect-ratio: 4/3;
  background: #12251c;
  border-radius: 14px;
  margin-top: 20px;
  object-fit: cover;
}
.nav-symbol {
  border: none;
}
.nav-symbol svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-grid {
  display: grid;
  gap: 12px;
}
.buyer-product {
  align-content: start;
}
.buyer-product .sticker-choice {
  margin-top: auto;
}
@media (max-width: 760px) {
  body {
    background: #f6f8f4;
  }
  .sidebar {
    padding: max(14px, env(safe-area-inset-top)) 20px 14px;
    background: #fff;
  }
  .sidebar nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    margin: 0;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    background: #ffffffed;
    backdrop-filter: blur(18px);
    border-top: 1px solid #dce5de;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
    box-shadow: 0 -4px 24px #15382006;
  }
  .sidebar nav button {
    flex-direction: column;
    gap: 5px;
    font-size: 10px;
    padding: 7px 0;
    min-height: 56px;
    justify-content: center;
    border-radius: 12px;
    white-space: normal;
  }
  .sidebar nav button[data-page="offers"],
  .sidebar nav button[data-page="settings"] {
    display: none;
  }
  .sidebar nav .nav-symbol {
    display: flex;
    width: 22px;
    height: 22px;
  }
  .sidebar nav button[data-page="builder"] {
    background: var(--green);
    color: #fff;
  }
  .workspace {
    padding: 16px 16px calc(110px + env(safe-area-inset-bottom));
  }
  .topbar {
    gap: 6px;
    align-items: center;
  }
  .topbar > span {
    font-size: 12px;
    max-width: 50%;
  }
  .topbar .actions {
    flex-wrap: nowrap;
    gap: 6px;
  }
  .topbar .actions [data-action="logout"],
  .topbar .actions [data-action="refresh"] {
    display: none;
  }
  .pagehead .eyebrow {
    display: none;
  }
  .pagehead {
    margin: 10px 0 22px;
  }
  .pagehead > .actions {
    width: 100%;
  }
  .pagehead > .actions button {
    flex: 1;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .product {
    padding: 12px;
    border-radius: 16px;
    gap: 10px;
  }
  .product h3 {
    font-size: 15px;
  }
  .product .product-top {
    flex-wrap: wrap;
  }
  .product .product-number {
    font-size: 18px;
  }
  .product .product-number small {
    display: block;
  }
  .product dl {
    font-size: 11px;
  }
  .product button {
    padding: 10px 6px;
    font-size: 12px;
  }
  .buyer {
    padding: max(16px, env(safe-area-inset-top)) 16px
      calc(30px + env(safe-area-inset-bottom));
  }
  .buyer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .buyer-product {
    border-radius: 20px;
    padding: 18px;
    gap: 12px;
  }
  .buyer-product .product-photo,
  .buyer-product .photo-placeholder {
    aspect-ratio: 4/3;
  }
  .buyer-product h2 {
    font-size: 19px;
  }
  .quantity {
    grid-template-columns: minmax(0, 1fr) 92px;
  }
  .buyer-header {
    flex-wrap: nowrap;
    gap: 10px;
  }
  .buyer-header select {
    width: 118px;
    padding: 10px 7px;
  }
  .buyer-header .brand {
    font-size: 17px;
    min-width: 0;
  }
  .buyer-header .brand img {
    width: 29px;
    height: 29px;
  }
  .buyer-hero {
    border-radius: 20px;
    padding: 25px;
  }
  .buyer-hero h1 {
    font-size: 28px;
  }
  .builder-summary {
    bottom: calc(88px + env(safe-area-inset-bottom));
    border-radius: 16px;
  }
  .selection {
    max-height: 360px;
  }
  .panel-heading #builder-group {
    max-width: 155px;
  }
  dialog {
    position: fixed;
    margin: auto 0 0;
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    overscroll-behavior: contain;
  }
  .modal-header {
    position: sticky;
    top: -22px;
    z-index: 2;
    background: white;
    padding: 12px 0;
  }
  .photo-editor {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px;
  }
  .photo-editor .button {
    font-size: 14px;
    padding: 10px;
  }
  #notice {
    bottom: calc(100px + env(safe-area-inset-bottom));
    z-index: 30;
    width: max-content;
  }
  .form-footer {
    flex-wrap: wrap;
  }
  .form-footer > button {
    flex: 1;
  }
  .order-title {
    flex-wrap: wrap;
  }
  .order-line {
    overflow-wrap: anywhere;
  }
  .order-line > strong {
    white-space: nowrap;
  }
  .checkout {
    scroll-margin-top: 20px;
    border-radius: 20px;
  }
  .checkout-footer button {
    min-height: 52px;
  }
  .buyer-jump {
    position: fixed;
    right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 10;
    box-shadow: 0 6px 24px #163d2530;
    border: 1px solid #ffffff40;
  }
  .buyer-jump[hidden] {
    display: none;
  }
}
@media (max-width: 350px) {
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .photo-editor {
    grid-template-columns: 1fr;
  }
  .photo-editor #photo-preview {
    max-width: 120px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.photo-placeholder {
  text-align: center;
  padding: 10px;
}
.photo-placeholder svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: #789176;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 760px) {
  .sidebar nav button {
    text-align: center;
  }
  .pagehead > .actions {
    align-items: stretch;
  }
  .pagehead > .actions button {
    font-size: 14px;
  }
  .buyer-product > .badge {
    justify-self: start;
  }
}
.import-dialog {
  width: min(1080px, calc(100% - 32px));
}
.import-intro {
  display: grid;
  gap: 16px;
}
.import-intro > .badge {
  justify-self: start;
}
.import-intro > button {
  justify-self: start;
}
.import-drop {
  border: 2px dashed #bbcdb4;
  border-radius: 16px;
  padding: 24px;
  background: #f4f8f0;
  cursor: pointer;
}
.import-drop input {
  background: #fff;
}
.import-options,
.import-mapping {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
#import-map-form > .form-note {
  margin-bottom: 24px;
}
.import-source {
  margin-top: 24px;
}
.import-source summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
}
.table-scroll {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 16px 0;
  overscroll-behavior-x: contain;
}
.table-scroll table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
}
.table-scroll th {
  background: #f2f6ef;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.table-scroll td,
.table-scroll th {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  min-width: 80px;
  max-width: 280px;
  overflow-wrap: anywhere;
}
.table-scroll td {
  vertical-align: top;
}
.import-review {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
  scroll-margin-top: 70px;
}
.import-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.import-counts span {
  border-radius: 8px;
  padding: 9px 12px;
  background: #edf5e8;
  font-size: 14px;
}
.import-counts .error-count {
  background: #fff0ed;
  color: #a52f21;
}
.row-error {
  background: #fff5f2;
}
.import-results {
  max-height: 400px;
}
@media (max-width: 760px) {
  .import-dialog {
    width: 100%;
  }
  .import-options,
  .import-mapping {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .import-options > label:last-child {
    grid-column: 1/-1;
  }
  .import-drop {
    padding: 16px;
  }
  .pagehead > .actions {
    flex-wrap: wrap;
  }
  .pagehead > .actions [data-action="import-open"] {
    flex-basis: 100%;
  }
  .import-dialog .form-footer button {
    font-size: 15px;
    min-width: 0;
  }
  .import-dialog .form-note {
    font-size: 13px;
  }
}
@media (max-width: 360px) {
  .import-options,
  .import-mapping {
    grid-template-columns: 1fr;
  }
}
.photo-figure {
  margin: 0;
  min-width: 0;
}
.photo-figure.thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.photo-figure figcaption {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 5px;
}
.photo-figure figcaption a {
  color: inherit;
  text-underline-offset: 2px;
}

.departure-days { margin: 0; padding: 16px; border: 1px solid #dce5df; border-radius: 14px; min-width: 0; }
.departure-days legend { padding: 0 6px; font-weight: 650; }
.day-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 8px; }
.departure-days .toggle-row { min-height: 44px; }
