:root {
  color-scheme: light;
  --paper: #f7f4eb;
  --surface: #fffdf8;
  --ink: #18372c;
  --muted: #526359;
  --green: #164735;
  --soft: #e5eee4;
  --gold: #a9562b;
  --line: #dedfd3;
  --shadow: 0 7px 22px #263b2a0b;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding: 18px 0 110px; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
a { color: var(--green); }
:focus-visible { outline: 3px solid #a9562b; outline-offset: 3px; }
p, h1, h2, h3 { margin: 0; }
p { line-height: 1.55; }
h1, h2 { font-family: "Songti SC", SimSun, serif; }
h1 { font-size: clamp(1.62rem, 6.7vw, 2.35rem); letter-spacing: -.04em; line-height: 1.2; }
h2 { font-size: 1.45rem; line-height: 1.2; }
h3 { font-size: .95rem; }
.masthead, main, .actionbar-inner { width: min(100%, 700px); margin-inline: auto; }
.masthead { min-height: 69px; padding: 9px clamp(12px, 4vw, 24px); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; background: var(--green); color: #fffdf5; width: 34px; height: 34px; border-radius: 10px; font-family: "Songti SC", SimSun, serif; font-size: 19px; }
.brand b { letter-spacing: .03em; font-size: 1.17rem; }
.brand-caption { border-left: 1px solid #caced0; padding-left: 8px; font-size: .76rem; color: var(--muted); }
.connection { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.connection[data-state="online"]::before { content: ""; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #2a7657; display: inline-block; }
main { padding: 0 clamp(12px, 4vw, 24px) 114px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) clamp(100px, 35%, 205px); align-items: stretch; gap: 10px; padding: 15px; border: 1px solid #dae0d5; background: #eaf0e5; border-radius: 17px; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.hero p { color: #465b4e; font-size: .85rem; max-width: 26ch; }
.hero img { width: 100%; height: 100%; min-height: 118px; max-height: 161px; object-fit: cover; border-radius: 11px; }
.pill, .text-button, .primary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none; }
.pill { padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: .83rem; font-weight: 650; }
.pill.outline { border-color: #bfcaba; }
.pill.soft { color: var(--green); border-color: #c2d2c5; background: #f5f8f1; }
.text-button { border: 0; background: none; color: var(--green); padding: 2px 4px; font-size: .82rem; font-weight: 650; }
.primary { border: 1px solid transparent; border-radius: 10px; background: var(--green); color: white; padding: 10px 17px; font-weight: 700; flex-shrink: 0; }
.catalog { margin-top: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.field { width: 100%; min-height: 46px; background: var(--surface); color: var(--ink); border: 1px solid #cbd2c5; border-radius: 10px; padding: 8px 12px; }
.field::placeholder { color: #65786c; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
#categories { margin-top: 9px; }
.chip { min-height: 44px; border: 1px solid #d6dbd0; border-radius: 9px; padding: 5px 10px; background: var(--surface); color: var(--ink); font-size: .8rem; }
.chip[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); font-weight: 650; }
.filter-panel, .selected-panel { margin-top: 9px; border: 1px solid var(--line); border-radius: 12px; background: #edece1; padding: 10px 12px; }
.filter-panel fieldset { margin: 0 0 10px; min-inline-size: 0; padding: 0; border: 0; }
.filter-panel legend { font-size: .9rem; font-weight: 750; }
.filter-panel p, .muted { color: var(--muted); font-size: .84rem; }
.filter-panel .chips, .selected-panel .chips { margin-top: 6px; }
.selected-panel .chip { min-height: 44px; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; color: var(--muted); font-size: .83rem; }
.recipes { display: grid; gap: 9px; }
.recipe { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.recipe[data-selected="true"] { border-color: #327256; background: #f5f8f0; }
.recipe[data-blocked="true"] { border-color: #b6633d; }
.recipe-select { display: grid; grid-template-columns: clamp(62px, 22vw, 88px) minmax(0, 1fr) 28px; width: 100%; align-items: center; text-align: left; gap: 10px; min-height: 83px; padding: 8px; background: transparent; color: var(--ink); border: 0; }
.recipe-select:focus-visible { outline-offset: -4px; }
.recipe-select img { width: 100%; height: 62px; object-fit: cover; border-radius: 8px; background: #e5e8dc; }
.recipe-name { display: block; font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
.recipe-tags { display: block; margin-top: 4px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.recipe-select i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-style: normal; border: 1px solid #c0cbbd; }
.recipe[data-selected="true"] i { background: var(--green); border-color: var(--green); color: white; }
.ingredient-details { padding-inline: 10px; margin: 0 0 4px; }
.ingredient-details summary, .detail-panel summary { cursor: pointer; display: list-item; padding: 11px 3px; min-height: 44px; font-size: .84rem; color: var(--green); }
.ingredient-details p { color: var(--muted); font-size: .82rem; padding: 0 3px 8px; overflow-wrap: anywhere; }
.more { width: 100%; margin-top: 11px; }
.message { margin-top: 8px; color: #843818; background: #f7e8db; padding: 9px 11px; border-radius: 8px; font-size: .86rem; overflow-wrap: anywhere; }
.actionbar { position: fixed; inset: auto 0 0; z-index: 5; border-top: 1px solid var(--line); background: #fffdf9; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -5px 20px #19392b14; }
.actionbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 70px; padding: 9px clamp(12px, 4vw, 24px); }
.action-total { display: flex; flex-wrap: wrap; align-items: center; column-gap: 5px; }
.action-total b { font-size: .93rem; }
.action-total span { display: block; width: 100%; color: var(--muted); font-size: .74rem; }
.action-total .text-button { min-height: 44px; padding: 0 5px; font-size: .73rem; }
.result-intro, .panel { padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.result-intro { background: #ebf0e7; padding-top: 5px; }
.result-intro .text-button { margin-bottom: 1px; }
.result-menu { color: var(--muted); font-size: .85rem; margin: 9px 0; overflow-wrap: anywhere; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.metric { background: var(--surface); border: 1px solid #dce2d7; border-radius: 9px; padding: 10px; }
.metric strong { display: block; font-size: 1.5rem; font-family: Georgia, serif; font-variant-numeric: tabular-nums; }
.metric small { font-family: system-ui, sans-serif; padding-left: 3px; font-size: .69rem; }
.metric span, .response-time { color: var(--muted); font-size: .79rem; }
.response-time { margin-top: 8px; }
.panel { margin-top: 10px; min-width: 0; }
.detail-panel { margin-top: 7px; border-top: 1px solid var(--line); }
.detail-panel ul, .detail-panel ol { margin: 0 0 8px; padding-inline-start: 22px; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.detail-panel li { padding-block: 4px; }
.next { background: #eef2e9; border-radius: 9px; padding: 10px 12px; }
.next p { font-size: .9rem; margin-top: 4px; }
.next span { font-size: .78rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; color: var(--muted); font-size: .77rem; }
.legend span { display: flex; align-items: center; gap: 4px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; }
.legend .manual, .task-bar.manual { background: #9b4c28; }
.legend .device, .task-bar.device { background: #24674e; }
.legend .waiting, .task-bar.waiting { background: #526779; }
.legend .locked, .task-bar.locked { outline: 2px solid #a57111; outline-offset: -2px; }
.gantt-scroll { overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--line); border-radius: 8px; --label-width: 100px; }
.gantt-row { display: grid; grid-template-columns: var(--label-width) auto; border-bottom: 1px solid #e4e7df; }
.gantt-row:last-child { border-bottom: 0; }
.gantt-label { position: sticky; left: 0; z-index: 2; background: #f1f4ec; display: flex; align-items: center; padding: 6px 8px; border-right: 1px solid #d4ded1; font-size: .75rem; line-height: 1.35; overflow-wrap: anywhere; }
.gantt-track { position: relative; min-height: 38px; background: repeating-linear-gradient(to right, transparent 0, transparent calc(var(--tick) - 1px), #e4e7df calc(var(--tick) - 1px), #e4e7df var(--tick)); }
.tick { position: absolute; padding: 7px 0 0 3px; color: var(--muted); font-size: .74rem; }
.task-bar { position: absolute; display: flex; align-items: center; overflow: hidden; background: var(--green); border-radius: 5px; border: 0; color: #fff; height: 34px; padding: 0 3px; font-size: .7rem; white-space: nowrap; line-height: 1; }
.task-bar[aria-pressed="true"] { outline: 3px solid #4d2521; outline-offset: -3px; }
.task-detail { margin-top: 8px; background: #eeeede; padding: 8px 10px; border-radius: 8px; color: #394d42; min-height: 44px; font-size: .82rem; line-height: 1.45; }
.replan form { display: grid; gap: 7px; margin-top: 9px; }
.replan label { font-size: .86rem; font-weight: 650; }
#elapsed { max-width: 190px; }
.replan .primary { margin-top: 3px; }
.changes { margin-top: 9px; padding: 10px; border-radius: 9px; background: #eaf1e6; font-size: .85rem; }
.changes p { margin-top: 6px; }
.qr-body { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.qr-sheet { max-width: 525px; background: var(--surface); border: 1px solid var(--line); margin: 0; padding: clamp(16px, 5vw, 35px); border-radius: 20px; box-shadow: var(--shadow); }
.qr-sheet h1 { margin: 16px 0 7px; }
.qr-sheet p { color: var(--muted); }
.qr-code { margin: 13px auto 10px; width: min(100%, 304px); background: white; border: 1px solid var(--line); }
.qr-code svg { display: block; width: 100%; height: auto; }
.qr-status { font-size: .86rem; margin-top: 5px; }
.address-link { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.qr-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 360px) {
  .hero { padding: 11px; }
  .hero-copy .pill { font-size: .73rem; padding-inline: 6px; }
  .brand-caption { font-size: .69rem; }
  .gantt-scroll { --label-width: 82px; }
}
@media (min-width: 620px) {
  .recipes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

