:root {
  color-scheme: light;
  --ink: #172137;
  --muted: #506078;
  --blue: #075ac9;
  --line: #dce5f1;
  --pale: #eef4fc;
  --red: #a51934;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  background: radial-gradient(ellipse at top right, #deecff, transparent 48%), linear-gradient(#f9fbff, #eef3fa);
}
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid #72a6ed; outline-offset: 3px; }
.bar { background: #f9fbffeb; border-bottom: 1px solid var(--line); }
.bar > div { display: flex; align-items: center; gap: 10px; max-width: 720px; margin: auto; padding: 12px 16px; }
.brand { padding: 4px 9px; border-radius: 8px; background: #cc0b2e; color: white; font-weight: 800; letter-spacing: .015em; }
main { max-width: 720px; margin: auto; padding: 20px 16px max(24px, env(safe-area-inset-bottom)); }
.hero { margin-bottom: 16px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 5vw, 2.35rem); line-height: 1.22; letter-spacing: -.035em; overflow-wrap: anywhere; }
h2 { font-size: 1.125rem; line-height: 1.35; }
h3 { font-size: 1rem; line-height: 1.4; }
.eyebrow { color: var(--blue); font-size: .875rem; font-weight: 700; margin-bottom: 4px; }
.hero > p:not(.eyebrow), .status-card > p, .hint { margin-top: 8px; color: var(--muted); }
.order-id { overflow-wrap: anywhere; }
.card {
  min-width: 0;
  background: #ffffffed;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 8px 24px #2847790b;
  overflow-wrap: anywhere;
}
.entry { display: grid; gap: 10px; }
.entry > label, .fields label, .service legend { font-size: .875rem; font-weight: 700; }
.entry .primary { margin-top: 4px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.fields > label { display: grid; align-content: start; gap: 5px; }
.wide { grid-column: 1 / -1; }
.fields input, .fields select, .entry input, .pick-option select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 11px;
  color: var(--ink);
  background: #f7faff;
  border: 1px solid #cddbef;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 400;
}
.fields select, .pick-option select {
  appearance: none;
  padding-right: 30px;
  background: #f7faff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23506078' stroke-width='1.6'/%3E%3C/svg%3E") right 10px center / 10px no-repeat;
}
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin: 0 0 14px; padding: 4px; border: 1px solid var(--line); border-radius: 18px; background: var(--pale); }
.steps li { padding: 7px 3px; text-align: center; color: var(--muted); border-radius: 14px; font-size: .875rem; font-weight: 650; }
.steps [aria-current="step"] { background: white; color: var(--blue); box-shadow: 0 2px 6px #1d428419; }
.service, .pick-group { min-width: 0; margin: 0; }
.service { border: 0; padding: 0; }
.service > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 5px; }
.service label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.service label:has(:checked) { background: var(--pale); color: var(--blue); border-color: #b6d0f3; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--blue); width: 18px; height: 18px; margin: 0; flex: none; }
#buyer-location-status:not(:empty) { margin-top: 9px; }
.items { display: grid; gap: 12px; margin: 12px 0; }
.hint { font-size: .875rem; }
.pick-group { margin-top: 14px; padding: 4px 10px 6px; border: 1px solid var(--line); border-radius: 12px; }
.pick-group legend { max-width: 100%; padding: 0 4px; font-size: .875rem; font-weight: 700; }
.count { color: var(--muted); font-size: .8125rem; font-weight: 500; }
.pick-option + .pick-option { border-top: 1px solid var(--line); }
.pick-option > label { display: flex; gap: 9px; align-items: center; padding: 5px 2px; min-height: 44px; cursor: pointer; }
.pick-option > label:has(:checked) { color: var(--blue); }
.pick-option select { width: 78px; flex: none; }
.pick-nested { margin: 0 0 8px 10px; }
.pick-nested .pick-group { margin-top: 4px; background: #f8fbff; }
.extra { margin-left: auto; color: var(--red); white-space: nowrap; }
.actions { display: flex; gap: 8px; margin-top: 14px; }
.actions > * { flex: 1; }
.sticky { position: sticky; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 1; padding: 6px; background: #f8fbfff5; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 5px 20px #28477914; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 13px; color: var(--blue); background: #fff; border: 1px solid #cddbef; border-radius: 12px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .15s, transform .15s; }
.btn:hover { background: #edf4ff; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: white; }
.btn.primary:hover { background: #064bab; }
.notice { padding: 9px 12px; margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.error { color: var(--red); }
.error:empty { display: none; }
.notice.error { border-color: #efc5cf; background: #fff6f8; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.badge { background: #e8f1ff; color: var(--blue); padding: 3px 9px; border-radius: 999px; font-size: .8125rem; font-weight: 700; flex: none; }
[data-order-state="cancelled"] .badge { background: #fff0f3; color: var(--red); }
.details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; margin: 14px 0; }
.details dt, .details small { color: var(--muted); }
.details dd { margin: 0; min-width: 0; }
.details small { display: block; }
.portions { display: grid; gap: 8px; margin-top: 10px; }
.portion { border: 1px solid var(--line); background: #f7faff; border-radius: 14px; padding: 12px; }
.pickup { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pickup strong { color: var(--blue); font-size: 1.6rem; letter-spacing: .04em; }
.pickup .btn { margin-left: auto; font-size: .875rem; }
.review-items, .recap ul { margin: 7px 0 0; padding-left: 20px; }
.recap { margin-top: 8px; }
@media (max-width: 359px) {
  main { padding-inline: 12px; }
  .card { padding: 13px; }
  .fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}
