:root {
  color-scheme: light;
  --paper: #f6f1e6;
  --surface: #fdfbf5;
  --ink: #2b2a24;
  --muted: #6b6352;
  --green: #3b5a34;
  --green-light: #e8eedf;
  --gold: #825519;
  --line: #e1d6bf;
  --danger: #923e28;
  --radius: 16px;
  font-family: Manrope, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: radial-gradient(ellipse at 82% 0, #f2e3bf 0, transparent 420px), var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .62; }
a { color: var(--green); }
.shell { width: min(100% - 32px, 1000px); margin-inline: auto; }
.header { border-bottom: 1px solid var(--line); background: #f6f1e6eb; }
.header-content { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; gap: 9px; align-items: center; border: 0; padding: 0; background: transparent; color: var(--green); text-align: left; font: 700 17px/1.02 Spectral, Georgia, serif; }
.brand:disabled { opacity: 1; }
.brand img { object-fit: contain; }
.account, .back, .secondary, .chip {
  min-height: 44px; background: var(--surface); color: var(--green);
  border: 1px solid var(--line); border-radius: 12px; padding: 8px 13px; font-weight: 650;
}
.back { margin-bottom: 12px; }
main { padding: 24px 0 calc(100px + env(safe-area-inset-bottom)); }
h1, h2, h3 { font-family: Spectral, Georgia, serif; }
h1 { margin: 0 0 16px; font-size: clamp(29px, 6vw, 49px); line-height: 1.08; letter-spacing: -.025em; }
h2 { margin: 0 0 9px; font-size: 23px; }
h3 { margin: 0 0 6px; font-size: 20px; }
p { line-height: 1.5; }
.muted, .muted-link { color: var(--muted); }
.empty { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 15px; }
.chip { flex: 0 0 auto; border-radius: 999px; font-size: .9rem; }
.chip[aria-pressed="true"] { background: var(--green); color: white; border-color: var(--green); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; overflow: hidden; min-width: 0; text-align: left; border-radius: var(--radius); border: 1px solid var(--line); padding: 0; background: var(--surface); color: var(--ink); }
.tile:hover { border-color: var(--green); }
.tile-photo, .product-photo { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--green-light); }
.product-photo { object-fit: contain; border-radius: var(--radius); }
.no-photo { display: grid; place-items: center; padding: 10px; font-size: .85rem; color: var(--muted); text-align: center; }
.tile-text { display: flex; flex-direction: column; gap: 8px; padding: 12px; height: 100%; }
.item-name { font: 700 clamp(17px, 3.6vw, 22px)/1.15 Spectral, Georgia, serif; overflow-wrap: anywhere; }
.tile-text .price { margin-top: auto; }
.price { color: var(--gold); font-weight: 750; }
.stock { font-size: .82rem; color: var(--muted); }
.product { display: grid; gap: 20px; }
.panel, .line-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel + .panel, .line-card + .line-card { margin-top: 10px; }
.panel p:first-child, .line-card p { margin: 0 0 9px; }
.gallery { display: grid; grid-auto-columns: 68px; grid-auto-flow: column; gap: 8px; overflow: auto; padding: 8px 3px; }
.thumb { border: 1px solid var(--line); border-radius: 8px; padding: 0; overflow: hidden; background: var(--surface); }
.thumb[aria-pressed="true"] { border: 2px solid var(--green); }
.thumb img { width: 100%; height: 53px; object-fit: cover; display: block; }
.details { padding: 0; margin: 18px 0; }
.details div, .summary div { display: flex; gap: 10px; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.details dd, .summary dd { margin: 0; text-align: end; }
.summary { padding: 0; margin: 13px 0; }
.summary div:last-child { font-weight: 800; }
.row { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; }
.field { display: grid; gap: 6px; margin: 12px 0; min-width: 0; }
.field span, .field legend { font-weight: 650; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px; color: var(--ink); background: white;
  border: 1px solid #b9ab90; border-radius: 9px;
}
.field textarea { resize: vertical; min-height: 84px; }
.row .field { margin: 0; }
.primary { min-height: 45px; border: 1px solid var(--green); border-radius: 11px; padding: 9px 15px; color: white; background: var(--green); font-weight: 750; }
.danger { color: var(--danger); border-color: #dfbeaa; }
.block { width: 100%; }
.action-panel { margin-top: 14px; }
.order { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; color: var(--ink); }
.status { color: var(--green); font-size: .9rem; }
.message { margin: 9px 0; border-radius: 13px; background: var(--green-light); padding: 12px; }
.message.customer { background: #f0e6d1; }
.message p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 0; }
.message time { display: block; margin-top: 5px; font-size: .8rem; color: var(--muted); }
.pager { margin-top: 13px; display: flex; justify-content: center; gap: 10px; align-items: center; }
.sticky { margin-top: 18px; }
.notice { position: fixed; z-index: 2; inset: auto 16px calc(80px + env(safe-area-inset-bottom)); margin-inline: auto; max-width: 510px; padding: 13px 16px; color: white; background: var(--green); border-radius: 13px; white-space: pre-wrap; }
.notice.error { background: var(--danger); }
nav { position: fixed; bottom: 0; inset-inline: 0; padding: 7px 0 max(7px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.nav-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.nav-content button { min-height: 47px; color: var(--muted); background: transparent; border: 0; border-radius: 10px; font-weight: 700; font-size: clamp(.78rem, 3.4vw, .98rem); padding: 4px; }
.nav-content button[aria-current="page"] { color: var(--green); background: var(--green-light); }
@media (min-width: 620px) {
  .shell { width: min(100% - 56px, 1000px); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
  .product { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .nav-content { max-width: 680px; }
}
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
