:root {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7f6;
  color: #20332f;
  font-size: 16px;
  --dark: #143c32;
  --green: #136e57;
  --muted: #4e645a;
  --line: #d7e3dc;
  --pale: #edf5ed;
  --danger: #9b2437;
  --warning: #745013;
  --radius: 9px;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
[hidden] { display: none !important; }
::selection { background: #cde8d6; color: var(--dark); }
button, input, select { font: inherit; }
button, input, select, summary { min-height: 44px; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #17816a; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .65; }
button {
  border: 1px solid #b5c7be;
  border-radius: var(--radius);
  background: white;
  color: var(--dark);
  padding: .55rem .85rem;
  font-weight: 650;
}
button:hover:not(:disabled) { background: var(--pale); }
button.primary { color: white; border-color: var(--green); background: var(--green); }
button.primary:hover:not(:disabled) { background: var(--dark); }
input, select {
  border: 1px solid #a9bfb3;
  border-radius: var(--radius);
  color: inherit;
  background: white;
  padding: .52rem .7rem;
  max-width: 100%;
  caret-color: var(--green);
}
input[type="number"] { width: 5.4rem; text-align: center; font-variant-numeric: tabular-nums; }
input[readonly] { color: var(--muted); background: var(--pale); }
.masthead { background: var(--dark); color: white; }
.masthead-inner {
  max-width: 1040px;
  padding: .8rem clamp(.8rem, 3vw, 1.6rem);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
#brand { font-size: clamp(1.23rem, 4vw, 1.7rem); line-height: 1.2; }
.appearance { display: flex; justify-content: flex-end; gap: .3rem; flex-wrap: wrap; }
.appearance button { background: transparent; color: white; border-color: #72978a; padding-inline: .55rem; }
.appearance button:hover, .appearance button[aria-pressed="true"] { background: #2a5d4d; }
.masthead :focus-visible { outline-color: #b9e5d0; }
main { max-width: 1040px; margin: auto; padding: clamp(.8rem, 3vw, 1.6rem); padding-block-end: 3rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 5vw, 2.25rem); letter-spacing: -.02em; line-height: 1.25; }
h2 { font-size: 1.25rem; line-height: 1.35; }
small, .subtle { color: var(--muted); }
body[data-bold] { font-weight: 660; }
.login {
  max-width: 440px;
  margin: clamp(1rem, 9vh, 6rem) auto 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1rem, 5vw, 2rem);
}
.login p { margin-top: .5rem; }
.login form, .field { display: grid; gap: .4rem; }
.login form { gap: 1rem; margin-top: 1.5rem; }
.login button.primary { margin-top: .25rem; min-height: 50px; }
.context, .heading, .actions {
  display: flex;
  align-items: flex-end;
  gap: .65rem;
  flex-wrap: wrap;
}
.heading { justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.context { margin: 1rem 0; }
.context > .field { min-width: 0; }
.context select { width: min(19rem, 100%); }
.feedback { color: var(--muted); min-height: 1.5em; overflow-wrap: anywhere; }
.feedback[data-error] { color: var(--danger); }
.feedback[role="status"]:empty { min-height: 0; }
.order, .overview, .form-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 1rem;
  padding: clamp(.8rem, 3vw, 1.25rem);
}
.order > * + *, .overview > * + *, .form-panel > * + * { margin-top: .9rem; }
.order-head { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: center; }
.order-head h2 { overflow-wrap: anywhere; }
.order-note { background: var(--pale); padding: .75rem; border-radius: var(--radius); }
.order-note ul { margin: .3rem 0 0; padding-inline-start: 1.3rem; }
.tag { padding: .22rem .55rem; background: var(--pale); color: var(--dark); border-radius: 6px; font-size: .9rem; font-weight: 700; }
.tag.missing { background: #fff1f3; color: var(--danger); }
.tag.attention { background: #fff5e4; color: var(--warning); }
.catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); gap: .6rem; }
.product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .65rem;
}
.product > label { min-width: 0; overflow-wrap: anywhere; display: flex; align-items: center; gap: .45rem; }
.product img { border-radius: 7px; object-fit: cover; flex: none; }
.product strong { font-size: 1.2rem; display: block; }
.product small { display: block; }
.stepper { display: flex; gap: .2rem; flex-shrink: 0; }
.stepper button { min-width: 44px; padding-inline: .3rem; font-size: 1.2rem; }
.stepper input { width: 3.15rem; padding-inline: .15rem; }
.receipt-action { min-height: 54px; }
.table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: end; font-variant-numeric: tabular-nums; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: .6rem .2rem; overflow-wrap: anywhere; }
.table th { color: var(--muted); font-size: .89rem; }
.table :is(th,td):first-child { text-align: start; width: 31%; }
.stall-list { display: grid; gap: .5rem; }
.stall-list button { text-align: start; min-width: 0; }
.stall-list button[aria-current="true"] { background: var(--pale); border-color: var(--green); }
.stall-list .tag { margin-inline-start: .4rem; display: inline-block; }
.history summary { padding-block: .65rem; font-weight: 700; }
.history li { margin-block: .4rem; overflow-wrap: anywhere; }
@media (min-width: 760px) {
  .board { display: grid; grid-template-columns: minmax(220px, 30%) minmax(0, 1fr); gap: 1rem; align-items: start; }
}
@media (max-width: 360px) {
  .appearance button { padding-inline: .35rem; font-size: .93rem; }
  .context { gap: .5rem; }
  .product > label { align-items: start; flex-direction: column; }
}
