:root {
  color-scheme: light;
  --ink: #183638;
  --muted: #4c6665;
  --line: #cbd8d3;
  --paper: #ffffff;
  --page: #f5f8f5;
  --teal: #14656a;
  --teal-dark: #104e53;
  --tint: #e4f3ee;
  --rust: #9a441d;
  --focus: #126eb0;
  font: 16px/1.5 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button, select, input { font: inherit; color: inherit; }
button, select, a, summary { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .54; }
button { border: 0; background: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.3; }
select, input { min-height: 44px; max-width: 100%; min-width: 0; border: 1px solid #a9bdb6; border-radius: 6px; background: white; }
select { padding: 6px 26px 6px 10px; }
input { padding: 7px 11px; width: 100%; }
:is(a, button, select, input, summary, [role="button"]):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button:disabled:focus { outline: none; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 15; inset: 8px auto auto 8px; padding: 9px 16px; color: white; background: var(--teal); }
.masthead { background: var(--paper); border-bottom: 1px solid #d7e2dc; }
.mast-inner, main { width: min(100%, 1776px); margin-inline: auto; padding-inline: clamp(14px, 2.15vw, 40px); }
.mast-inner, .mast-tools, .brand, .cover-link, .button, .dialog-head, .dialog-actions, .segment-switch, .segment-buttons, .clock-actions, .chart-selector, .panel-title, .detail-summary, .chart-head { display: flex; align-items: center; }
.mast-inner { justify-content: space-between; min-height: 57px; }
.brand { gap: 10px; font-size: 20px; font-weight: 750; letter-spacing: .035em; }
.mast-tools { gap: 19px; }
.cover-link { min-height: 44px; gap: 7px; color: var(--muted); }
.cover-link:hover, .menu-content a:hover { color: var(--teal); }
.account-menu { position: relative; }
.account-menu summary, .detail-summary { list-style: none; }
.account-menu summary::-webkit-details-marker, .detail-summary::-webkit-details-marker { display: none; }
.account-menu summary { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; color: var(--teal-dark); font-weight: 700; border: 1px solid #c0d6ce; border-radius: 50%; background: #e3efe8; }
.menu-content { position: absolute; z-index: 5; top: calc(100% + 3px); right: 0; display: grid; min-width: 174px; padding: 5px; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 24px #193c3019; }
.menu-content :is(button, a) { min-height: 44px; padding: 9px 11px; text-align: left; border-radius: 4px; }
.menu-content :is(button, a):hover { background: var(--tint); }
main { padding-block: 22px 16px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px 22px; margin-bottom: 18px; }
h1 { font-size: clamp(30px, 2.6vw, 44px); font-weight: 730; letter-spacing: -.035em; }
.title-group p, .dialog-intro, .form-note, .boot-message { color: var(--muted); }
.title-group p { margin-top: 5px; font-size: 17px; }
.button { justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 6px; line-height: 1.45; font-weight: 600; }
.button.primary { background: var(--teal); color: white; }
.button.primary:hover:enabled, a.button.primary:hover { background: var(--teal-dark); }
.button.plain { background: white; color: var(--ink); border-color: #adbfba; }
.button.plain:hover:enabled, a.button.plain:hover { background: #edf5ef; border-color: #71988d; }
.new-order { flex: none; padding-inline: 18px; }
.plus-mark { position: relative; width: 15px; height: 15px; flex: none; }
.plus-mark::before, .plus-mark::after { content: ""; position: absolute; top: 7px; left: 1px; width: 13px; height: 2px; border-radius: 2px; background: currentColor; }
.plus-mark::after { transform: rotate(90deg); }
.boot-message { margin: 24px 0; padding: 20px; border: 1px solid var(--line); background: white; }
.overview { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 13px 19px; background: #eaf2ec; border-block: 1px solid #cfddd0; }
.traffic-metrics, .clock-group { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 36px); }
.metric { display: flex; align-items: baseline; gap: 8px; color: var(--muted); }
.metric > div { white-space: nowrap; }
.metric strong { font-size: 29px; line-height: 1.1; font-weight: 680; color: var(--ink); font-variant-numeric: tabular-nums; }
.clock-readout { display: flex; align-items: baseline; gap: 9px; color: var(--muted); }
.clock-readout time { font-size: 24px; line-height: 1.25; color: var(--teal-dark); font-weight: 650; font-variant-numeric: tabular-nums; }
.clock-actions { flex-wrap: wrap; gap: 7px; }
.clock-actions .button { padding-inline: 11px; }
.scope-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding-block: 15px; }
.segment-switch { gap: 11px; }
.control-label { color: var(--muted); }
.segment-buttons { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid #bdcec6; border-radius: 7px; background: #e8efea; }
.segment-buttons button { min-height: 41px; min-width: 71px; padding: 6px 12px; border-radius: 5px; color: var(--muted); }
.segment-buttons button[aria-pressed="true"] { color: white; background: var(--teal-dark); font-weight: 650; }
.scope-summary { color: var(--muted); }
.mobile-switch { display: none; }
.workbench { display: grid; grid-template-columns: minmax(243px,.9fr) minmax(350px,1.94fr) minmax(284px,1fr); align-items: start; overflow: clip; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: white; }
.workbench > section { min-width: 0; }
.queue-panel, .detail-panel { align-self: stretch; background: white; }
.queue-panel { border-right: 1px solid var(--line); }
.detail-panel { border-left: 1px solid var(--line); }
.panel-title, .detail-summary, .chart-head { justify-content: space-between; gap: 8px; min-height: 62px; padding: 12px clamp(13px,1.25vw,23px); }
.workbench h2 { font-size: 21px; font-weight: 700; letter-spacing: -.025em; }
.panel-title > span { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.filter-label { display: flex; align-items: center; gap: 8px; margin: 0 clamp(13px,1.25vw,23px) 13px; color: var(--muted); }
.filter-label span { flex: none; }
.filter-label select { flex: 1; }
.order-list { border-top: 1px solid var(--line); max-height: 675px; overflow-y: auto; overscroll-behavior: contain; }
.order-row { position: relative; width: 100%; display: grid; text-align: left; gap: 4px; border-bottom: 1px solid #dfe7e1; padding: 14px clamp(13px,1.25vw,23px); background: white; }
.order-row:hover { background: #f0f6f1; }
.order-row[aria-pressed="true"] { background: #e9f4ed; box-shadow: inset 4px 0 var(--teal); }
.order-row:focus-visible { outline-offset: -3px; }
.row-top, .row-footer, .selection-top, .progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; }
.row-meal { font-size: 18px; font-weight: 680; overflow-wrap: anywhere; }
.row-vessel, .row-footer, .data-note, .vessel-line, .order-identity, .empty-copy, .selection-heading p { color: var(--muted); overflow-wrap: anywhere; }
.row-footer { font-size: 16px; font-variant-numeric: tabular-nums; }
.state-text { display: inline-flex; align-items: center; gap: 5px; color: #506667; font-size: 16px; line-height: 1.4; white-space: nowrap; }
.state-text::before { content: ""; width: 7px; height: 7px; background: currentColor; border-radius: 50%; flex: none; }
.state-text[data-color="warm"] { color: #915018; }
.state-text[data-color="blue"] { color: #1f6384; }
.state-text[data-color="green"] { color: #1d6960; }
.state-text[data-color="red"] { color: #9a442b; }
.empty-list { padding: 17px clamp(13px,1.25vw,23px) 23px; }
.empty-list .button { margin-top: 12px; }
.chart-panel { min-width: 0; background: #f9fbf7; }
.chart-head { background: white; }
.branch-control { min-width: 0; }
.branch-control select { max-width: 100%; }
.chart-stage { position: relative; width: 100%; height: clamp(430px, 50vh, 640px); overflow: hidden; background: #eef2e6; border-block: 1px solid #c2d4c7; }
.river-chart { display: block; width: 100%; height: 100%; }
.river-chart text { font-family: inherit; }
.river-chart [data-map-branch], .river-chart [data-map-vessel] { cursor: pointer; }
.river-chart [data-map-vessel]:focus-visible .boat-focus, .river-chart [data-map-vessel]:hover .boat-focus { opacity: 1; }
.map-label { font-size: 16px; font-weight: 620; paint-order: stroke; stroke: #f8fbf5; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.map-caption { font-size: 15px; fill: #3e5f58; paint-order: stroke; stroke: #f6f8f0; stroke-width: 3px; stroke-linejoin: round; }
.chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; padding: 10px 15px; color: #425c58; border-bottom: 1px solid #d7e1d9; font-size: 16px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.key { display: inline-block; flex: none; width: 13px; height: 13px; }
.key.ship { width: 19px; height: 9px; background: #246d74; clip-path: polygon(0 10%,70% 10%,100% 50%,70% 90%,0 90%); }
.key.station { border: 2px solid #206451; border-radius: 2px; background: #b5d3ab; }
.key.route { height: 0; width: 18px; border-top: 3px dashed #a34c21; }
.key.task { width: 10px; height: 10px; border: 2px solid #676ea0; border-radius: 50%; background: #f3f1fc; }
.chart-context { display: grid; gap: 9px; padding: 13px 15px 16px; background: #fafcf9; }
.chart-selector { gap: 8px; flex-wrap: wrap; }
.chart-selector select { max-width: 100%; flex: 1; }
.branch-info { color: #405c57; overflow-wrap: anywhere; }
.branch-info p + p { margin-top: 4px; }
.branch-info strong { color: var(--ink); }
.detail-summary { min-height: 62px; border-bottom: 1px solid #dbe5df; }
.fold-label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 16px; }
.fold-label::before { content: "展开"; }
.fold-label::after { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: -3px 3px 0 2px; }
details[open] > .detail-summary .fold-label::before { content: "收起"; }
details[open] > .detail-summary .fold-label::after { transform: rotate(225deg); margin-top: 5px; }
.selection-detail { display: grid; gap: 15px; padding: 15px clamp(13px,1.25vw,23px) 18px; }
.selection-heading { display: grid; gap: 4px; }
.selection-heading h3 { font-size: 21px; font-weight: 700; overflow-wrap: anywhere; }
.order-identity { font-variant-numeric: tabular-nums; }
.arrival { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; padding: 10px 12px; row-gap: 3px; border-left: 3px solid #619a8d; background: #ecf4ef; }
.arrival span { color: #41645b; }
.arrival strong { font-size: 27px; font-weight: 660; line-height: 1.1; font-variant-numeric: tabular-nums; color: #1b5148; }
.detail-data { margin: 0; display: grid; gap: 6px; }
.detail-data > div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 12px; }
.detail-data dt { color: var(--muted); }
.detail-data dd { text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.detail-block { display: grid; gap: 8px; padding-top: 13px; border-top: 1px solid #d8e2da; }
.detail-block h3 { font-size: 18px; }
.time-line { list-style: none; padding: 0; }
.time-line li { position: relative; display: grid; grid-template-columns: 12px 1fr auto; align-items: baseline; column-gap: 8px; min-height: 30px; color: #586d66; }
.time-line li::before { content: ""; z-index: 1; width: 10px; height: 10px; border-radius: 50%; background: white; border: 1.5px solid #8fa59a; }
.time-line li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 13px; bottom: -5px; border-left: 1px solid #c4d2c8; }
.time-line li.is-done::before { border-color: #367465; background: #367465; }
.time-line li.is-current::before { border: 2px solid #a8571b; background: #fff0d9; }
.time-line li.is-current { color: #814315; font-weight: 650; }
.time-line time { font-variant-numeric: tabular-nums; text-align: right; }
.detail-actions { display: grid; gap: 7px; }
.selection-links { display: flex; flex-wrap: wrap; gap: 6px; }
.small-order { border: 1px solid #b8cdc2; color: var(--teal-dark); border-radius: 5px; padding: 5px 8px; min-height: 42px; }
.small-order[aria-pressed="true"] { background: var(--tint); font-weight: 650; }
.status-note { color: var(--rust); }
.desk-footer { display: flex; gap: 8px 15px; flex-wrap: wrap; padding: 14px 1px 0; color: var(--muted); }
.desk-footer span:first-child { font-weight: 640; }
.sheet-dialog { width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 32px); margin: auto; overflow-y: auto; padding: 22px; border: 1px solid #abc5b9; border-radius: 10px; color: var(--ink); background: white; box-shadow: 0 15px 50px #203d382b; }
.sheet-dialog::backdrop { background: #15352f68; }
.dialog-head { justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.dialog-head h2 { font-size: 25px; font-weight: 680; }
.close-button { flex: none; width: 44px; height: 44px; color: var(--muted); font-size: 27px; line-height: 1; border-radius: 5px; }
.close-button:hover { background: #eef4ef; }
.dialog-intro { margin-bottom: 12px; }
.field { display: grid; gap: 5px; margin-block: 12px; font-weight: 620; }
.field :is(select,input) { width: 100%; font-weight: 400; }
.form-note, .compact-dialog p { margin-block: 13px; }
.form-error { color: #933c21; margin-block: 10px; }
.dialog-actions { justify-content: end; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.notice { position: fixed; z-index: 9; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; max-width: min(560px, calc(100% - 22px)); width: max-content; transform: translateX(-50%); padding: 10px 17px; border-radius: 7px; color: #fff; background: #214c45; box-shadow: 0 4px 18px #162f272e; pointer-events: none; }
.notice:empty { display: none; }
@media (min-width: 1450px) {
  .chart-stage { height: clamp(500px, 55vh, 680px); }
}
@media (max-width: 1120px) and (min-width: 801px) {
  .workbench { grid-template-columns: minmax(236px,.72fr) minmax(0,1.65fr); }
  .queue-panel { grid-row: 1 / 3; }
  .detail-panel { grid-column: 2; border-left: 0; border-top: 1px solid var(--line); }
  .selection-detail { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .selection-heading, .detail-actions, .selection-links, .selection-detail > .status-note { grid-column: 1 / -1; }
  .overview { gap: 10px; }
  .traffic-metrics, .clock-group { gap: 14px; }
  .metric { flex-direction: column; gap: 1px; }
  .chart-stage { height: 420px; }
}
@media (max-width: 800px) {
  .mast-inner, main { padding-inline: 14px; }
  main { padding-top: 16px; }
  .mast-inner { min-height: 50px; }
  .mast-tools { gap: 8px; }
  .brand { font-size: 19px; gap: 7px; }
  .brand svg { width: 30px; height: 30px; }
  .page-head { margin-bottom: 12px; align-items: start; }
  h1 { font-size: 30px; }
  .title-group p { margin-top: 5px; font-size: 16px; }
  .new-order { min-height: 44px; padding: 8px 11px; }
  .overview { padding: 11px 12px; display: grid; grid-template-columns: 1fr; gap: 10px; }
  .traffic-metrics, .clock-group { display: flex; width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 6px 11px; }
  .metric { gap: 6px; }
  .metric strong { font-size: 25px; }
  .clock-readout { gap: 5px; }
  .clock-readout time { font-size: 21px; }
  .clock-actions { gap: 5px; }
  .clock-actions .button { min-height: 42px; padding-inline: 8px; }
  .scope-bar { padding-block: 12px 9px; }
  .segment-switch { gap: 8px; }
  .segment-buttons button { min-width: 58px; min-height: 40px; padding-inline: 10px; }
  .scope-summary { width: 100%; }
  .mobile-switch { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-block: 2px 0; background: white; border: 1px solid var(--line); border-radius: 7px 7px 0 0; }
  .mobile-switch button { min-width: 0; min-height: 46px; padding: 6px; color: var(--muted); }
  .mobile-switch button[aria-pressed="true"] { color: var(--teal-dark); box-shadow: inset 0 -3px var(--teal); font-weight: 700; }
  .workbench { display: block; border-radius: 0 0 7px 7px; border-top: 0; }
  .workbench > section { display: none; border: 0; }
  .workbench[data-mobile-pane="orders"] .queue-panel, .workbench[data-mobile-pane="map"] .chart-panel, .workbench[data-mobile-pane="details"] .detail-panel { display: block; }
  .panel-title, .detail-summary, .chart-head { min-height: 55px; padding: 10px 12px; }
  .filter-label { margin-inline: 12px; }
  .order-list { max-height: none; overflow: visible; }
  .order-row { padding: 13px 14px; }
  .chart-stage { height: clamp(335px, 52svh, 500px); }
  .chart-head { flex-wrap: wrap; }
  .chart-legend { gap: 7px 12px; padding: 10px 12px; }
  .chart-context { padding: 11px 12px 14px; }
  .selection-detail { padding: 13px 14px 16px; gap: 14px; }
  .sheet-dialog { padding: 16px; }
}
@media (max-width: 440px) {
  .metric { display: block; }
  .metric > div { display: inline; }
  .metric strong { margin-left: 4px; }
  .clock-group { align-items: end; }
  .clock-readout { display: grid; gap: 0; }
  .clock-readout time { font-size: 20px; }
  .title-group p { max-width: 23ch; }
  .scope-summary { margin-top: 1px; }
}
@media (max-width: 360px) {
  .mast-inner, main { padding-inline: 10px; }
  .page-head { gap: 7px; }
  h1 { font-size: 27px; }
  .new-order { gap: 4px; padding-inline: 7px; }
  .new-order .plus-mark { width: 12px; }
  .traffic-metrics { gap: 8px; align-items: start; }
  .metric { display: grid; gap: 0; }
  .metric strong { margin: 0; }
  .overview { padding-inline: 9px; }
  .clock-group { column-gap: 4px; }
  .clock-actions .button { padding-inline: 5px; }
  .chart-selector { align-items: start; flex-direction: column; }
  .chart-selector select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
.embedded-only, .patrol-only { display: none; }
body[data-embedded="true"] .public-only, body[data-mode="patrol"] .delivery-only { display: none !important; }
body[data-embedded="true"] .embedded-only { display: inline-flex; }
body[data-embedded="true"] .session-line { display: block; margin-top: 5px; font-size: 16px; }
.footer-action { min-height: 44px; align-items: center; padding: 5px 9px; color: var(--teal-dark); border: 1px solid var(--line); border-radius: 5px; background: white; }
.desk-footer { align-items: center; }
body[data-mode="patrol"] .patrol-only { display: block; }
body[data-mode="patrol"] .traffic-metrics.patrol-only, body[data-mode="patrol"] a.button.patrol-only { display: flex; }
body[data-mode="patrol"] .workbench { grid-template-columns: minmax(0, 1.8fr) minmax(265px, 1fr); }
body[data-mode="patrol"] .workbench .chart-panel { display: block; }
.patrol-panel { align-self: stretch; border-left: 1px solid var(--line); }
.patrol-group > summary { padding: 11px 15px; border-block-start: 1px solid var(--line); color: var(--teal-dark); font-weight: 650; }
.patrol-group > div { padding: 1px 12px 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; max-height: 325px; overflow-y: auto; }
.patrol-job { display: grid; gap: 1px; width: 100%; min-width: 0; min-height: 52px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; text-align: left; background: #f7faf6; }
.patrol-job strong { font-size: 16px; overflow-wrap: anywhere; }
.patrol-job span { color: var(--muted); font-size: 16px; }
.patrol-job[aria-pressed="true"] { background: var(--tint); border-color: var(--teal); }
.route-coverage { border-top: 1px solid var(--line); padding-top: 9px; color: var(--muted); }
.route-coverage strong { color: var(--ink); }
.commercial-board { margin-top: 13px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.commercial-board summary { padding: 10px 15px; font-size: 18px; font-weight: 650; }
#commercial-glance { display: inline-block; margin-left: 11px; color: var(--teal-dark); font-size: 16px; font-weight: 500; }
.commercial-totals { padding: 0 15px 14px; display: grid; gap: 8px; }
.commercial-lines { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.commercial-totals strong, .quote-box strong { font-variant-numeric: tabular-nums; }
.price-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.price-fields .field { margin-block: 5px; }
.quote-box { display: grid; gap: 6px; padding: 10px 12px; border-left: 3px solid #66988c; background: #eff6f0; margin-block: 12px; }
.quote-box p, .conflict-copy p { margin: 0; overflow-wrap: anywhere; }
.quote-box .detail-data { margin-top: 4px; }
.conflict-copy { display: grid; gap: 4px; }
.conflict-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-block: 8px; }
.form-altitudes { border-block: 1px solid var(--line); }
.form-altitudes > summary { min-height: 44px; padding: 9px 1px; font-weight: 620; }
.form-altitudes[open] { padding-bottom: 9px; }
@media (min-width: 1121px) {
  .detail-panel { max-height: clamp(610px, 69vh, 850px); overflow-y: auto; }
  .detail-summary { position: sticky; top: 0; z-index: 1; background: white; }
}
@media (max-width: 440px) {
  #commercial-glance { display: block; margin: 2px 0 0 18px; }
}
@media (max-width: 800px) {
  body[data-mode="patrol"] .workbench { border-top: 1px solid var(--line); border-radius: 7px; }
  body[data-mode="patrol"] .workbench .patrol-panel { border-block-start: 1px solid var(--line); }
  .patrol-panel { border-left: 0; }
  .patrol-group > div { max-height: none; }
  body[data-mode="patrol"] a.button.patrol-only { flex: 0 0 auto; padding-inline: 8px; }
}
