:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px; color: #203b35; background: #faf9f4;
  --paper: #faf9f4; --ink: #203b35; --subtle: #56675f; --green: #185d4b;
  --rule: #d5d9ca; --white: #fffefa; --pale: #edf2e7;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
[hidden], body[data-embedded="true"] .public-only, .small-screen { display: none !important; }
a { color: var(--green); text-underline-offset: .22em; }
button, input, select { font: inherit; color: inherit; }
button, a.link-button { touch-action: manipulation; cursor: pointer; }
button { border: 0; background: transparent; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid #986923; outline-offset: 3px; }
.skip { position: absolute; top: -4rem; left: 1rem; background: white; padding: .6rem; z-index: 10; }
.skip:focus { top: .5rem; }
.wrap { width: min(1240px, 100%); margin: auto; padding-inline: clamp(16px, 4.2vw, 62px); }
.mast { border-bottom: 1px solid var(--rule); }
.mast-line, .heading, .section-head, .dialog-head, .amount, .line-title, .dialog-actions, .product-bottom, .row-actions, .cart-controls { display: flex; align-items: center; gap: 12px; }
.mast-line, .heading, .section-head, .dialog-head, .amount, .line-title, .product-bottom { justify-content: space-between; }
.mast-line { min-height: 62px; }
.mast-line a { text-decoration: none; }
.brand { color: var(--ink); font-size: 21px; font-weight: 750; letter-spacing: .065em; }
.heading { align-items: flex-end; padding-block: clamp(24px, 4vw, 55px) 24px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.3; }
h1 { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif; font-size: clamp(36px, 4.5vw, 60px); letter-spacing: .035em; }
h2 { font-size: clamp(24px, 2.5vw, 31px); }
h3 { font-size: 21px; overflow-wrap: anywhere; }
.heading p { color: var(--subtle); margin-top: 8px; }
.link-button, .secondary, .primary, .danger, .dialog-head button, .step, .text-button, .refresh { min-height: 44px; }
.link-button, .secondary, .primary, .danger, .step, .text-button { display: inline-flex; align-items: center; justify-content: center; }
.link-button, .secondary, .step { color: var(--green); background: var(--white); border: 1px solid #9cae9e; border-radius: 4px; padding: 7px 13px; font-weight: 600; text-decoration: none; }
.link-button:hover, .secondary:hover:enabled, .step:hover:enabled { background: var(--pale); }
.primary, .danger { background: var(--green); color: white; border-radius: 4px; padding: 9px 17px; font-weight: 650; }
.primary:hover:enabled { background: #114634; }
.danger { background: #8a402f; }
.text-button, .dialog-head button, .refresh { color: var(--green); text-decoration: underline; text-underline-offset: .23em; padding: 5px; }
.navigation { display: flex; align-items: stretch; gap: clamp(8px, 1.8vw, 25px); border-bottom: 1px solid #aeb9aa; }
.navigation [data-view] { padding: 10px 3px 12px; border-bottom: 3px solid transparent; font-weight: 600; white-space: nowrap; font-size: 18px; }
.navigation [aria-current="page"] { color: var(--green); border-color: var(--green); }
.navigation .refresh { margin-inline-start: auto; white-space: nowrap; }
.feedback { margin-top: 13px; padding: 9px 13px; background: var(--pale); border-left: 3px solid var(--green); overflow-wrap: anywhere; }
.feedback:empty { display: none; }
.feedback[data-tone="error"], .issue { background: #fff1df; color: #7b3c1e; }
.feedback[data-tone="error"] { border-color: #a15d2f; }
.shop-layout, .order-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.shop-layout, .view { margin-top: clamp(20px, 3vw, 35px); }
.shelf, .cart, .receipt, .orders-list, .view, .product, .inventory-row { min-width: 0; }
.section-head { align-items: center; flex-wrap: wrap; margin-bottom: 17px; }
.section-head p { margin-top: 3px; }
.muted, .small-copy, .footnote { color: var(--subtle); }
.small-copy { margin-top: 5px; }
.filters, .form-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px 16px; }
.filters { margin-bottom: 18px; }
label { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
input:not([type="checkbox"]), select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #a6b1a4; background: var(--white); border-radius: 3px; padding: 7px 10px; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.product { display: flex; flex-direction: column; align-items: stretch; padding: 18px 15px 18px 0; border-bottom: 1px solid var(--rule); }
.product:nth-child(even) { border-left: 1px solid var(--rule); padding-inline: 16px 0; }
.category-name { color: var(--green); font-weight: 620; margin-bottom: 4px; }
.product h3 { margin-bottom: 10px; }
.price { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.unit { color: var(--subtle); margin-left: 4px; }
.product-bottom { flex-wrap: wrap; align-items: flex-end; margin-top: auto; padding-top: 12px; gap: 6px; }
.product-bottom button { padding-inline: 12px; }
.cart, .receipt { background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--green); padding: clamp(16px, 2vw, 25px); }
.cart { position: sticky; top: 12px; scroll-margin-top: 12px; }
.cart-line, .receipt-line { padding: 12px 0; border-top: 1px solid var(--rule); overflow-wrap: anywhere; }
.cart-line .line-title { align-items: flex-start; }
.cart-controls { flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.step { width: 42px; min-height: 42px; font-size: 19px; padding: 0; }
.cart-controls .text-button { margin-left: auto; }
.vessel-label { margin-top: 20px; font-weight: 600; }
.vessel-label select { font-weight: 400; }
.amount { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); }
.amount strong { font-size: 27px; font-variant-numeric: tabular-nums; }
.wide { width: 100%; margin-top: 12px; }
.empty, .issue { padding: 11px 12px; margin: 8px 0; }
.empty { background: #f2f2e9; color: var(--subtle); }
.footnote { padding: 18px 0 30px; border-top: 1px solid var(--rule); margin-top: 28px; }
.order-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; }
.order-row, .inventory-row { padding: 15px 0; border-top: 1px solid var(--rule); }
.order-row h3, .inventory-row h3 { margin-bottom: 4px; }
.order-row.selected { border-top: 2px solid var(--green); }
.row-actions { flex-wrap: wrap; margin-top: 10px; gap: 6px 10px; }
.detail-heading p, .order-row p, .inventory-row p, .receipt p { overflow-wrap: anywhere; }
.detail-heading { padding-bottom: 12px; }
.receipt .amount strong { font-size: 23px; }
.route { border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 15px; }
.route h3 { margin-bottom: 6px; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.metrics div { border-left: 2px solid #a5b7a1; padding-left: 8px; }
.metrics dt { color: var(--subtle); }
.metrics dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.order-id { font-variant-numeric: tabular-nums; color: var(--subtle); word-break: break-all; }
.receipt .line-title { flex-wrap: wrap; }
.inventory-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.inventory-row .row-actions { margin: 0; }
dialog { width: min(520px, calc(100% - 20px)); max-height: 90dvh; overflow: auto; color: var(--ink); background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: clamp(16px, 3vw, 28px); }
dialog::backdrop { background: rgb(28 45 35 / .43); }
.dialog-head { margin-bottom: 12px; }
.dialog-actions { justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.form-grid { margin-top: 13px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.check { flex-direction: row; align-items: center; gap: 8px; }
.check input { width: 22px; height: 22px; accent-color: var(--green); }
@media (max-width: 870px) {
  .shop-layout { grid-template-columns: minmax(0, 1.45fr) minmax(255px, 1fr); gap: 15px; }
  .products { grid-template-columns: minmax(0, 1fr); }
  .product, .product:nth-child(even) { border-left: 0; padding: 15px 0; }
}
@media (max-width: 680px) {
  .small-screen { display: inline-flex !important; }
  .wrap { padding-inline: 15px; }
  .heading { align-items: flex-start; flex-wrap: wrap; padding-block: 20px 15px; gap: 8px; }
  .mast-line { min-height: 50px; }
  .heading .link-button { min-height: 42px; }
  .navigation { gap: 4px; justify-content: space-between; flex-wrap: wrap; }
  .navigation [data-view], .navigation .refresh { font-size: 16px; padding-inline: 2px; }
  .shop-layout, .order-layout { grid-template-columns: minmax(0, 1fr); }
  .cart { position: static; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product { padding-right: 10px; }
  .product:nth-child(even) { border-left: 1px solid var(--rule); padding-left: 10px; }
  .product h3 { font-size: 20px; }
  .inventory-row { grid-template-columns: minmax(0, 1fr); }
  .inventory-row .row-actions { gap: 6px; }
  .receipt { scroll-margin-top: 10px; }
  .filters { gap: 8px; }
}
@media (max-width: 370px) {
  .wrap { padding-inline: 12px; }
  .section-head { gap: 7px; }
  .product-bottom { align-items: flex-start; flex-direction: column; }
  .navigation { gap: 3px; }
  .form-grid { gap: 8px; }
}
