:root {
  --page: #eef2f0;
  --surface: #f9fbfa;
  --surface-strong: #ffffff;
  --surface-soft: #e2ebe6;
  --ink: #132019;
  --muted: #5b6961;
  --line: #ccd8d1;
  --accent: #23694d;
  --accent-strong: #154b36;
  --accent-soft: #d7e9df;
  --danger: #9d3636;
  --danger-soft: #f8e9e7;
  --radius-card: 18px;
  --radius-control: 12px;
  --shadow: 0 28px 85px rgba(25, 54, 40, .12);
  color: var(--ink);
  background: var(--page);
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; min-height: 100dvh; margin: 0; background: var(--page); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:active, a:active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent); outline-offset: 3px; }

.site-header {
  height: 68px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: #f3f7f5; background: var(--ink); border-radius: var(--radius-control); font-weight: 850; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 12px; letter-spacing: .14em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.header-link { color: var(--accent-strong); font-size: 13px; font-weight: 800; text-decoration: none; }

.track-shell { width: min(1040px, calc(100% - 36px)); margin: 0 auto; padding: clamp(34px, 7vw, 84px) 0 100px; }
.track-intro { max-width: 690px; margin-bottom: 34px; }
.intro-label { margin: 0 0 12px; color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 9em; margin-bottom: 18px; font-size: clamp(42px, 7vw, 74px); line-height: 1.02; letter-spacing: -.055em; }
.track-intro > p:last-child { max-width: 36em; margin-bottom: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }

.lookup-panel, .result-shell { border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.lookup-panel { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(0, 1.3fr); gap: clamp(28px, 6vw, 72px); padding: clamp(26px, 5vw, 52px); background: var(--surface-strong); }
.lookup-heading h2 { margin-bottom: 10px; font-size: 28px; letter-spacing: -.03em; }
.lookup-heading p, .privacy-note { color: var(--muted); font-size: 13px; line-height: 1.65; }
#lookupForm { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: grid; gap: 8px; }
.form-field label { font-size: 13px; font-weight: 800; }
.form-field input { width: 100%; min-height: 52px; padding: 12px 14px; color: var(--ink); background: var(--surface); border: 1px solid #9faea6; border-radius: var(--radius-control); }
.form-field input::placeholder { color: color-mix(in srgb, var(--muted) 84%, transparent); }
.primary-button { grid-column: 1 / -1; min-height: 52px; color: #f4f8f6; background: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-control); font-weight: 850; cursor: pointer; }
.primary-button:hover { background: var(--accent-strong); }
.primary-button:disabled { cursor: wait; opacity: .58; }
.form-error { grid-column: 1 / -1; min-height: 19px; margin: -5px 0 0; color: var(--danger); font-size: 12px; }
.privacy-note { grid-column: 2; margin: -40px 0 0; transform: translateY(62px); }

.result-shell { margin-top: 28px; padding: clamp(26px, 5vw, 52px); background: var(--surface-strong); }
.result-shell:not([hidden]) { animation: reveal .38s cubic-bezier(.16, 1, .3, 1); }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } }
.result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 30px; }
.order-number { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .04em; }
.result-heading h2 { margin-bottom: 8px; font-size: clamp(30px, 5vw, 48px); letter-spacing: -.04em; }
.result-message { max-width: 42em; margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.status-badge { flex: 0 0 auto; padding: 9px 12px; color: var(--accent-strong); background: var(--accent-soft); border-radius: 9px; font-size: 12px; font-weight: 850; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary-grid span, .shipment-section span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.summary-grid strong, .shipment-section strong { font-size: 14px; line-height: 1.5; }

.action-required { margin-top: 26px; padding: 22px 24px; background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 24%, transparent); border-radius: var(--radius-control); }
.action-label { display: inline-flex; margin-bottom: 12px; padding: 5px 8px; color: var(--danger); background: color-mix(in srgb, var(--surface-strong) 72%, transparent); border-radius: 7px; font-size: 11px; font-weight: 850; letter-spacing: .04em; }
.action-required h3 { margin-bottom: 8px; font-size: 19px; }
.action-required p { margin-bottom: 8px; color: var(--ink); line-height: 1.65; overflow-wrap: anywhere; }
.action-required small { display: block; color: var(--muted); font-size: 11px; }
.revision-upload-form { display: grid; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--danger) 18%, transparent); }
.revision-picker { display: grid; gap: 5px; padding: 16px; color: var(--accent-strong); background: var(--surface-strong); border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 10px; cursor: pointer; }
.revision-picker > span { font-size: 13px; font-weight: 850; }
.revision-picker small { line-height: 1.55; }
#revisionFiles { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.revision-file-list { display: grid; gap: 7px; }
.revision-file-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: color-mix(in srgb, var(--surface-strong) 76%, transparent); border-radius: 8px; }
.revision-file-item strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.revision-file-item span { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.revision-progress { height: 5px; overflow: hidden; background: color-mix(in srgb, var(--danger) 13%, var(--surface-strong)); border-radius: 999px; }
.revision-progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .18s ease; }
.revision-error { min-height: 18px; margin: 0 !important; color: var(--danger) !important; font-size: 11px; }
.revision-submit { min-height: 46px; color: white; background: var(--accent); border: 0; border-radius: 10px; font-weight: 850; cursor: pointer; }
.revision-submit:disabled { cursor: not-allowed; opacity: .48; }
.revision-success { display: grid; gap: 5px; margin-top: 26px; padding: 18px 20px; color: var(--accent-strong); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: var(--radius-control); }
.revision-success strong { font-size: 14px; }
.revision-success span { color: var(--muted); font-size: 12px; line-height: 1.55; }

.progress-section { padding-top: 34px; }
.progress-section h3, .detail-section h3 { margin-bottom: 22px; font-size: 17px; }
.timeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; min-width: 0; padding: 26px 12px 0 0; color: var(--muted); font-size: 12px; }
.timeline li::before { content: ""; position: absolute; top: 6px; left: 0; width: 12px; height: 12px; background: var(--surface-strong); border: 2px solid var(--line); border-radius: 50%; }
.timeline li::after { content: ""; position: absolute; top: 12px; right: 0; left: 12px; height: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.complete, .timeline li.current { color: var(--ink); font-weight: 750; }
.timeline li.complete::before, .timeline li.current::before { border-color: var(--accent); background: var(--accent); }
.timeline li.complete::after { background: var(--accent); }
.timeline small { display: block; margin-top: 5px; color: var(--muted); font-weight: 500; line-height: 1.45; }
.detail-section { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.file-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.file-item { min-width: 0; padding: 14px 16px; background: var(--surface-soft); border-radius: var(--radius-control); }
.file-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.file-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.shipment-section { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; padding: 20px; color: #edf5f1; background: var(--ink); border-radius: var(--radius-control); }
.shipment-section span { color: #aebeb5; }
.last-updated { margin: 28px 0 0; color: var(--muted); font-size: 11px; text-align: right; }

.loading-shell { display: grid; gap: 15px; }
.skeleton { height: 62px; border-radius: var(--radius-control); background: var(--surface-soft); }
.skeleton-wide { height: 110px; }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: pulse 1.2s ease-in-out infinite alternate; } }
@keyframes pulse { to { opacity: .48; } }

@media (max-width: 720px) {
  .site-header { height: 62px; }
  .track-shell { width: min(100% - 24px, 1040px); padding-top: 30px; }
  h1 { font-size: clamp(42px, 13vw, 58px); }
  .track-intro > p:last-child { font-size: 14px; }
  .lookup-panel { grid-template-columns: 1fr; gap: 24px; padding: 24px 18px; }
  #lookupForm { grid-template-columns: 1fr; gap: 14px; }
  .primary-button, .form-error { grid-column: auto; }
  .privacy-note { grid-column: auto; margin: -3px 0 0; transform: none; }
  .result-shell { padding: 26px 18px; }
  .result-heading { display: grid; }
  .status-badge { width: fit-content; grid-row: 1; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline li { min-height: 70px; padding: 0 0 26px 34px; }
  .timeline li::before { top: 2px; }
  .timeline li::after { top: 14px; bottom: -2px; left: 6px; width: 2px; height: auto; }
  .file-list { grid-template-columns: 1fr; }
  .shipment-section { grid-template-columns: 1fr; }
  .last-updated { text-align: left; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111713;
    --surface: #17201b;
    --surface-strong: #1b2520;
    --surface-soft: #25342c;
    --ink: #edf3ef;
    --muted: #a5b2ab;
    --line: #35433b;
    --accent: #79bd99;
    --accent-strong: #b2dfc5;
    --accent-soft: #294236;
    --danger: #ef9b9b;
    --danger-soft: #392725;
    --shadow: 0 28px 90px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
  .brand-mark { color: #102018; background: #dcebe3; }
  .shipment-section { background: #0d1410; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 2026-08-20:复购按钮 */
.reorder-button {
  width: 100%;
  margin-top: 14px;
  padding: 13px 18px;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  background: #2f6e54;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.reorder-button:hover { background: #1e503e; transform: translateY(-1px); }
.reorder-button:active { transform: translateY(1px); }
