:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  color: #172a22;
  background: #f3f5ef;
  --green: #1a5943;
  --deep: #15362d;
  --muted: #52665c;
  --line: #e0e7dc;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.frame { max-width: 62rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar .frame, .brand { display: flex; align-items: center; }
.topbar .frame { justify-content: space-between; min-height: 4.25rem; gap: .75rem; }
.brand { gap: .6rem; }
.brand strong { font-size: 1.25rem; letter-spacing: -.04em; }
.brand span { color: var(--muted); font-size: .88rem; border-left: 1px solid var(--line); padding-left: .65rem; }
.demo { color: #435b48; border: 1px solid #dfe8d8; background: #f2f7ee; border-radius: 2rem; padding: .23rem .65rem; font-size: .77rem; white-space: nowrap; }
main { padding-block: 1.75rem 3rem; }
.summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem);
  gap: 1.5rem;
  align-items: end;
  border-radius: 1.35rem;
  padding: clamp(1.25rem, 5vw, 2.45rem);
  color: #fff;
  background: radial-gradient(ellipse at 87% 1%, #34654f 0, transparent 56%), linear-gradient(119deg, #15362d, #1d4838);
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.15rem, 6vw, 3.65rem); line-height: 1; letter-spacing: -.055em; margin: .45rem 0 .75rem; }
h2 { font-size: clamp(1.15rem, 3vw, 1.45rem); letter-spacing: -.025em; }
h3 { font-size: 1.04rem; line-height: 1.45; }
.summary-label { font-size: .81rem; font-weight: 650; color: #ccebb7; }
#route-date { color: #d4e5da; font-size: .94rem; }
.progress-panel { background: #ffffff19; border: 1px solid #ffffff25; border-radius: .9rem; padding: .85rem 1rem; }
#status { font-size: .92rem; font-weight: 650; margin-bottom: .35rem; }
progress { display: block; width: 100%; height: .42rem; border: 0; border-radius: 1rem; accent-color: #b8e889; background: #ffffff29; overflow: hidden; }
progress::-webkit-progress-bar { background: #ffffff29; }
progress::-webkit-progress-value { background: #b8e889; border-radius: 1rem; }
#notice { margin-top: .9rem; color: #55431c; background: #fff3d4; border-radius: .6rem; padding: .65rem .85rem; }
#route, #details { margin-top: 1.5rem; }
.section-head { display: flex; gap: .6rem; align-items: baseline; justify-content: space-between; margin-bottom: .7rem; }
.meta { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.stop, .panel { background: #fff; border: 1px solid var(--line); border-radius: .9rem; }
.stop { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .9rem; margin-bottom: .65rem; padding: .85rem 1rem; }
.stop-number { display: grid; place-items: center; min-width: 2.25rem; height: 2.25rem; border-radius: .65rem; background: #e8f1e4; color: #28523f; font-weight: 750; }
.stop-copy { min-width: 0; }
.stop-copy .meta { margin-top: .18rem; }
.pill { display: inline-flex; align-items: center; min-height: 1.55rem; background: #e8f1e4; color: #28523f; border-radius: 2rem; padding: .1rem .6rem; font-size: .73rem; font-weight: 700; }
.pill.review { color: #74480f; background: #fff2d6; }
.pill.done { color: #345b26; background: #e9f4d8; }
.pill.queued { color: #485e72; background: #edf2f7; }
.detail-links { margin-block: .8rem .35rem; }
.proof-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .55rem; margin-block: .5rem; }
.proof-photos:empty { display: none; }
.proof-photo { margin: 0; min-width: 0; }
.proof-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #edf2eb; border-radius: .55rem; }
.proof-photo button { margin-top: .25rem; width: 100%; }
#details .actions + .meta { margin-top: .65rem; }
.stop-actions, .actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.stop-actions { justify-content: end; }
.order-controls { display: flex; gap: .3rem; align-items: center; }
.icon-control { width: 44px; padding: 0; }
.icon-control svg { width: 1.3rem; height: 1.3rem; pointer-events: none; }
.stop { transition: box-shadow 140ms ease-out, border-color 140ms ease-out; }
.grip { touch-action: none; user-select: none; cursor: grab; transition: background-color 140ms ease-out; }
.grip:hover { background: #e6f0e5; }
.grip:active, .dragging .grip { cursor: grabbing; }
.stop.dragging { position: relative; z-index: 1; pointer-events: none; transform: translateY(var(--drag-offset)); border-color: #9cbeaa; box-shadow: 0 .45rem 1.2rem #15362d40; opacity: .97; }
.stop.drop-before, .stop.drop-after { position: relative; }
.stop.drop-before::before, .stop.drop-after::after { content: ''; position: absolute; inset-inline: .5rem; height: 3px; border-radius: 2rem; background: #328a62; pointer-events: none; animation: show-drop-line 120ms ease-out; }
.stop.drop-before::before { top: -.43rem; }
.stop.drop-after::after { bottom: -.43rem; }
@keyframes show-drop-line { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .stop, .grip { transition: none; }
  .stop.drop-before::before, .stop.drop-after::after { animation: none; }
}
button, .action-link, select, textarea, input { font: inherit; max-width: 100%; }
button, .action-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .45rem .8rem; border: 1px solid transparent; border-radius: .55rem; background: var(--green); color: #fff; font-size: .88rem; font-weight: 700; text-decoration: none; cursor: pointer; }
button.secondary, .action-link { background: #f3f7f1; border-color: #dae7db; color: #24553f; }
button:disabled { background: #e8eee8; color: #4e6758; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #328a62; outline-offset: 3px; }
.panel { padding: clamp(.85rem, 3vw, 1.3rem); margin-block: .7rem; }
.panel p + p { margin-top: .3rem; }
.panel h2, .panel h3 { margin-bottom: .55rem; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.detail-actions .panel { margin-block: 0; }
label { display: grid; gap: .3rem; margin-bottom: .65rem; font-size: .9rem; }
select, textarea, input[type=file] { width: 100%; min-height: 44px; border: 1px solid #cddacf; border-radius: .55rem; padding: .45rem; background: #f9fbf8; color: #172a22; }
textarea { min-height: 5rem; resize: vertical; }
details summary { cursor: pointer; color: #24553f; font-weight: 700; min-height: 44px; display: list-item; padding-top: .55rem; }
@media (max-width: 38rem) {
  main { padding-top: 1rem; }
  .summary, .detail-actions { grid-template-columns: 1fr; }
  .summary { gap: .9rem; }
  .stop { grid-template-columns: auto minmax(0,1fr); align-items: start; gap: .55rem .7rem; padding: .75rem; }
  .stop-actions { grid-column: 2; justify-content: start; }
  .order-arrow { display: none; }
}
