:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #202e28;
  background: #f5f6f2;
  --green: #24594a;
  --ink: #1e4236;
  --muted: #52635a;
  --border: #d5ded6;
  --tint: #edf5ef;
  --white: #fff;
  --error: #943b26;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(26px, 4vw, 40px); line-height: 1.25; font-weight: 750; letter-spacing: -.035em; color: var(--ink); }
h2 { font-size: 22px; line-height: 1.4; color: var(--ink); }
h3 { font-size: 15px; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid #387f6a; outline-offset: 3px; }
.frame { width: min(100% - 44px, 1030px); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--border); background: var(--white); }
.masthead-inner { display: flex; align-items: center; gap: 14px; min-height: 58px; }
.brand { font: 700 25px/1.1 "Songti SC", "Noto Serif CJK SC", serif; color: var(--ink); }
.masthead-detail { color: var(--muted); font-size: 13px; border-left: 1px solid var(--border); padding-left: 14px; }
.intro { margin: 34px 0 21px; }
.intro p, .section-note, .muted { color: var(--muted); }
.intro p { margin-top: 8px; }
.section-note { margin-top: 6px; font-size: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.steps button { min-width: 0; text-align: left; padding: 8px 10px 11px; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; font-weight: 650; }
.steps button[aria-current] { color: var(--green); border-bottom-color: var(--green); }
.steps span { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px; border: 1px solid var(--border); border-radius: 50%; font-size: 12px; }
.steps button[aria-current] span { color: white; background: var(--green); border-color: var(--green); }
.panel { background: var(--white); border: 1px solid var(--border); border-radius: 17px; padding: 24px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.top-fields { margin-top: 16px; }
label { display: block; font-weight: 650; font-size: 14px; min-width: 0; }
.required, .optional { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.required { color: var(--green); }
input:not([type=checkbox]), select, textarea {
  display: block; width: 100%; min-width: 0; margin-top: 5px; color: #202e28; background: var(--white);
  border-radius: 8px; border: 1px solid var(--border); padding: 9px 10px; min-height: 43px; font-size: 16px; font-weight: 400;
}
input::placeholder, textarea::placeholder { color: #657468; opacity: 1; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--green); flex: none; }
textarea { resize: vertical; }
.members { margin-top: 14px; }
.member { border-top: 1px solid var(--border); display: grid; grid-template-columns: minmax(82px, .48fr) repeat(2,minmax(0, 1fr)); align-items: end; gap: 11px; padding: 8px 0; }
.member > span { align-self: center; color: var(--muted); font-size: 14px; }
fieldset { border: 0; margin: 24px 0 0; padding: 0; min-width: 0; }
legend { font-weight: 650; padding: 0; font-size: 15px; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.chip { position: relative; cursor: pointer; font-weight: 500; }
.chip input { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chip span { display: grid; place-items: center; padding: 6px 12px; min-height: 39px; border: 1px solid var(--border); border-radius: 8px; }
.chip input:checked + span { color: #174936; border-color: #55816c; background: var(--tint); font-weight: 650; }
.chip input:focus-visible + span { outline: 2px solid #387f6a; outline-offset: 2px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 42px; padding: 8px 15px; font-size: 14px; font-weight: 650; border-radius: 8px;
  border: 1px solid var(--green); color: white; background: var(--green);
}
.secondary { background: var(--white); color: var(--green); border-color: #bbcdbf; }
.primary:hover { background: #194739; }
.secondary:hover { background: var(--tint); }
button:disabled { opacity: .57; cursor: default; }
.route-settings { display: grid; grid-template-columns: minmax(0, 240px) 1fr; align-items: end; gap: 13px; margin: 17px 0 15px; }
.route-status { font-size: 14px; color: var(--green); background: var(--tint); border-radius: 8px; padding: 10px 12px; min-height: 43px; }
.route-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.route-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-width: 0; }
.route-card:has(input:checked) { border-color: #699982; background: #f8fcf8; }
.route-top { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
.art-button { border: 0; padding: 0; background: #ede7dc; display: block; border-radius: 5px; overflow: hidden; max-width: 100%; align-self: start; }
.art-button img { width: 100%; height: auto; aspect-ratio: 3/4; display: block; object-fit: contain; }
.art-caption { display: block; padding: 3px 0; font-size: 11px; background: var(--tint); color: var(--green); }
.route-title { color: var(--ink); font-size: 16px; line-height: 1.43; }
.route-card p { color: var(--muted); font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.simple-check { display: flex; align-items: center; gap: 7px; min-height: 42px; cursor: pointer; }
.simple-check input { margin: 0; }
.route-card .simple-check { margin-top: 7px; }
.route-card .route-date { margin-top: 7px; }
.route-card .route-date select { margin-bottom: 4px; }
.route-grid + .simple-check, .notes { margin-top: 15px; }
.site-footer, .save-state { font-size: 13px; margin: 12px 0 20px; }
.site-footer { margin-top: 23px; }
dialog { width: min(660px, calc(100% - 26px)); max-height: calc(100dvh - 34px); border: 1px solid var(--border); border-radius: 15px; padding: 18px; color: inherit; overscroll-behavior: contain; }
dialog::backdrop { background: #14231f9c; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dialog-head form { flex: none; }
.poster-dialog { width: min(850px, calc(100% - 20px)); }
.poster-scroll { max-height: calc(100dvh - 160px); overflow: auto; background: #f4f0e5; border-radius: 6px; }
.poster-scroll img { width: min(100%, 570px); height: auto; display: block; margin: auto; }
.image-link { display: block; margin-top: 11px; font-size: 14px; }
.review-summary { background: var(--tint); padding: 12px 14px; border-radius: 8px; margin-top: 10px; overflow-wrap: anywhere; }
.review-summary p + p { margin-top: 7px; }
.review-summary ul { margin: 4px 0 8px; padding-left: 22px; }
.receipt-number { font-weight: 650; color: var(--green); margin-top: 10px; }
.receipt-link { margin: 14px 0 5px; }
.error { color: var(--error); font-size: 14px; margin-top: 8px; }
.error:empty { display: none; }
.record { border: 1px solid var(--border); border-radius: 9px; margin-top: 8px; overflow-wrap: anywhere; }
.record summary { padding: 10px 12px; color: var(--ink); font-weight: 650; }
.record[open] summary { background: var(--tint); }
.record p, .record ul { margin: 10px 13px; }
.record ul { padding-left: 21px; }
.admin-actions { justify-content: flex-start; }
@media (max-width: 700px) {
  .frame { width: calc(100% - 26px); }
  .masthead-inner { min-height: 50px; }
  .intro { margin: 24px 0 16px; }
  .intro p { font-size: 14px; }
  .panel { padding: 15px; border-radius: 13px; }
  .route-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .route-settings { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .route-top { grid-template-columns: 82px minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 430px) {
  .fields { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .steps button { padding: 7px 2px 8px; font-size: 13px; }
  .steps span { width: 19px; height: 19px; margin-right: 4px; font-size: 11px; }
  .member { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .member > span { grid-column: 1 / -1; }
}
