*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080808;
  --bg2: #0f0f0f;
  --surface: rgba(255,255,255,0.03);
  --surface2: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.10);
  --accent: #e53e3e;
  --warning: #f6c90e;
  --danger: #e53e3e;
  --blue: #60a5fa;
  --text: #f2f2f2;
  --muted: #888;
  --radius: 16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.page-main, .track-main { flex: 1; }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 800px 500px at 50% -100px, rgba(229,62,62,0.05) 0%, transparent 70%),
    linear-gradient(180deg, #080808 0%, #0f0f0f 100%);
  pointer-events: none;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
}

.nav-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.nav-right { display: flex; align-items: center; gap: 8px; }

.nav-link {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--surface2);
}

.nav-cta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  transition: opacity 0.15s, transform 0.15s;
}

.nav-cta:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

.eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 14px;
}

.hero {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 28px 60px;
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 60px; }
  .hero-visual { display: none; }
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 240px;
  background: rgba(229,62,62,0.04);
  filter: blur(100px);
  border-radius: 50%;
  pointer-events: none;
}

h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 14px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--muted);
  max-width: 460px;
  margin-bottom: 32px;
}

.track-form { max-width: 480px; margin-bottom: 28px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }

.field-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.field-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 14px;
  font-family: 'Space Mono', monospace;
  color: #fff;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-input::placeholder { color: rgba(136,136,136,0.45); }

.field-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(229,62,62,0.1);
}

.field-input.is-error { border-color: var(--danger); }

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.btn-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  margin-bottom: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: none;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.btn-track:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn-track:active { transform: none; }

.form-error-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(229,62,62,0.08);
  border: 1px solid rgba(229,62,62,0.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

.trust-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
  border-radius: 40px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(242,242,242,0.7);
}

.pill svg { color: var(--accent); }

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 340px;
  height: 340px;
  margin: 0 auto;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  animation: spin-slow linear infinite;
}

.ring-1 { width: 100%; height: 100%; animation-duration: 42s; }
.ring-2 { width: 70%; height: 70%; animation-duration: 27s; animation-direction: reverse; }
.ring-3 { width: 42%; height: 42%; animation-duration: 18s; }

.orbit-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(229,62,62,0.7);
}

.dot-a { top: 5%; left: 50%; transform: translateX(-50%); animation: pdot-a 2.2s ease-in-out infinite; }
.dot-b { top: 50%; right: 5%; transform: translateY(-50%); animation: pdot-b 3s ease-in-out infinite; }

.orbit-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(229,62,62,0.07) 0%, transparent 70%);
  border-radius: 50%;
}

@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes pdot-a { 0%,100% { transform: translateX(-50%) scale(1); opacity: 1; } 50% { transform: translateX(-50%) scale(1.5); opacity: 0.5; } }
@keyframes pdot-b { 0%,100% { transform: translateY(-50%) scale(1); opacity: 1; } 50% { transform: translateY(-50%) scale(1.5); opacity: 0.5; } }

.steps-section {
  padding: 80px 0;
  background: rgba(0,0,0,0.18);
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 36px;
  letter-spacing: -0.02em;
}

.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }

@media (max-width: 680px) {
  .steps-grid { grid-template-columns: 1fr; }
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.12), transparent);
}

.step-card:hover {
  border-color: var(--border2);
  background: var(--surface2);
}

.step-num {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 500;
}

.step-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.track-main { padding: 40px 0 80px; }

.back-row { margin-bottom: 28px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.15s;
}

.back-link:hover { opacity: 0.8; }

.result-layout { max-width: 960px; }

.page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.track-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 40px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.status-badge.tone-success { background: rgba(229,62,62,0.1); border: 1px solid rgba(229,62,62,0.2); color: var(--accent); }
.status-badge.tone-active  { background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.2); color: var(--blue); }
.status-badge.tone-warning { background: rgba(246,201,14,0.1); border: 1px solid rgba(246,201,14,0.2); color: var(--warning); }
.status-badge.tone-neutral { background: rgba(136,136,136,0.1); border: 1px solid rgba(136,136,136,0.2); color: var(--muted); }

.track-number {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}

.dot-sep { color: rgba(255,255,255,0.15); }

.carrier-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.15s;
}

.carrier-link:hover { opacity: 0.7; }

.carrier-plain {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.rh-order {
  font-size: 13px;
  color: var(--muted);
}

.progress-stepper {
  display: flex;
  align-items: flex-start;
  margin-bottom: 40px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 11px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.08);
  z-index: 0;
}

.progress-step.is-done:not(:last-child)::after { background: var(--accent); }

.progress-step.is-active:not(:last-child)::after {
  background: linear-gradient(to right, var(--accent) 0%, rgba(255,255,255,0.08) 100%);
}

.progress-step.is-done.is-current:not(:last-child)::after {
  background: linear-gradient(to right, var(--accent) 0%, rgba(255,255,255,0.08) 100%);
}

.step-node {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.progress-step.is-done .step-node {
  background: var(--accent);
  border-color: var(--accent);
}

.progress-step.is-active .step-node {
  background: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(229,62,62,0.12);
  animation: pulse-node 2s ease-in-out infinite;
}

@keyframes pulse-node {
  0%,100% { box-shadow: 0 0 0 4px rgba(229,62,62,0.12); }
  50% { box-shadow: 0 0 0 8px rgba(229,62,62,0.04); }
}

.step-check { color: #000; }

.step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.step-label {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}

.progress-step.is-active .step-label { color: #fff; font-weight: 700; }
.progress-step.is-done .step-label { color: rgba(242,242,242,0.6); }

.shipping-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 720px) {
  .shipping-grid { grid-template-columns: 1fr; gap: 40px; }
}

.section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 16px;
}

.tl-date-header {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
  margin-top: 24px;
}

.tl-date-header:first-child { margin-top: 0; }

.tl-day-group {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.tl-item {
  display: flex;
  gap: 12px;
  padding: 11px 14px;
  transition: background 0.12s;
}

.tl-item + .tl-item { border-top: 1px solid rgba(255,255,255,0.04); }
.tl-item:hover { background: rgba(255,255,255,0.02); }

.tl-time {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 36px;
  padding-top: 2px;
}

.tl-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.tl-detail {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

.tl-item.is-first .tl-detail {
  color: var(--text);
  font-weight: 700;
}

.tl-addr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.carrier-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.35);
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

.sidebar { display: flex; flex-direction: column; gap: 32px; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 14px;
}

.pkg-list { display: flex; flex-direction: column; }

.pkg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pkg-item:first-child { padding-top: 0; }
.pkg-item:last-child { border-bottom: none; padding-bottom: 0; }

.pkg-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.pkg-img img { width: 100%; height: 100%; object-fit: cover; }

.pkg-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.pkg-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.pkg-variant {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.pkg-qty {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.carrier-detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.carrier-logo-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.carrier-detail-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.carrier-detail-num {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  margin-left: auto;
  transition: opacity 0.15s;
}

.carrier-detail-num:hover { opacity: 0.7; }

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 32px;
}

.info-item { display: flex; flex-direction: column; gap: 3px; }

.info-item-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.info-item-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.lastmile-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--bg2);
  margin-bottom: 24px;
  font-size: 13px;
}

.lastmile-note strong { color: var(--text); }

.state-block {
  max-width: 520px;
  margin: 60px auto;
  text-align: center;
  padding: 36px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.state-icon.tone-warning {
  color: var(--warning);
  background: rgba(246,201,14,0.1);
  border: 1px solid rgba(246,201,14,0.2);
}

.state-icon.tone-danger {
  color: var(--danger);
  background: rgba(229,62,62,0.08);
  border: 1px solid rgba(229,62,62,0.22);
}

.state-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.state-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 360px;
  margin: 0 auto;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.btn-back:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.not-found {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 80px 24px;
}

.not-found-code {
  font-size: 96px;
  font-weight: 800;
  color: rgba(255,255,255,0.05);
  line-height: 1;
}

.not-found-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.not-found-desc {
  font-size: 14px;
  color: var(--muted);
  max-width: 340px;
}

.footer {
  background: #0f0f0f;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 44px 28px 28px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto 28px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand { max-width: 280px; }

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
}

.footer-logo svg { color: var(--accent); }

.footer-tagline {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.footer-cols { display: flex; gap: 44px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }

.footer-col-head {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.2);
  margin-bottom: 4px;
}

.footer-link {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s;
}

.footer-link:hover { color: #fff; }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 11px;
  color: rgba(136,136,136,0.35);
}

.footer-app-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.app-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  cursor: default;
  user-select: none;
}

.app-badge-icon {
  color: rgba(255,255,255,0.4);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.app-badge-text { flex: 1; }

.app-badge-sub {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1;
  margin-bottom: 3px;
}

.app-badge-store {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  line-height: 1;
}

.app-badge-status {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(136,136,136,0.12);
  border: 1px solid rgba(136,136,136,0.18);
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}