:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  color: #30231e;
  background: #fff8f1;
}
* { box-sizing: border-box; }
body { max-width: 55rem; margin: auto; padding: 1.5rem 1rem 3rem; }
header { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
a { color: #813c28; }
h1, h2 { line-height: 1.15; }
.card { background: white; border: 1px solid #ebdcd0; border-radius: 1rem; padding: clamp(1rem, 4vw, 2rem); margin-block: 1rem; }
.status { color: #753a29; background: #fff0e4; border-radius: 0.5rem; padding: .65rem 1rem; font-weight: bold; }
label { display: grid; gap: .3rem; margin-block: .5rem; font-weight: 600; }
input, select, textarea, button { font: inherit; }
input, select, textarea { min-width: 0; width: 100%; border: 1px solid #ad978a; border-radius: .5rem; padding: .55rem; }
button { border: 1px solid #883e28; border-radius: .55rem; background: #883e28; color: white; padding: .55rem .85rem; cursor: pointer; }
button.secondary { background: white; color: #813c28; }
button:disabled { opacity: .65; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .8rem; }
.item { display: grid; grid-template-columns: minmax(8rem, 3fr) minmax(4rem, 1fr) minmax(6rem, 1fr) auto; gap: .5rem; align-items: end; margin-bottom: .5rem; }
.item button { margin-bottom: .5rem; }
.list { display: grid; gap: .5rem; margin-bottom: 1rem; }
.list button { text-align: left; overflow-wrap: anywhere; }
.summary { padding-left: 1.25rem; }
.summary li { margin-bottom: .45rem; }
[role=status] { min-height: 1.5em; }
[hidden] { display: none !important; }
.delivery-fields { border: 1px solid #ebdcd0; border-radius: .8rem; margin: 1rem 0; padding: .8rem 1rem 1rem; }
.delivery-fields legend { padding: 0 .4rem; font-weight: 700; }
.customer {
  --ink: #3f2923;
  --muted: #755d54;
  max-width: 58rem;
  color: var(--ink);
}
.customer .brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  font-weight: 750;
}
.brand img { border-radius: .65rem; }
.tracking-heading h1 {
  margin: 1.75rem 0 .9rem;
  font: 700 clamp(2rem, 5vw, 3.25rem)/1.05 Georgia, serif;
  letter-spacing: -.035em;
}
.customer main > [role=status]:empty, #pushMessage:empty { display: none; }
.status-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid #eed4c8;
  border-radius: 1.45rem;
  background: radial-gradient(ellipse at top right, #fff8ed, transparent 65%), #f9e1d6;
}
.status-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .65;
  background: radial-gradient(circle, #cea698 1px, transparent 1.5px) right top / 15px 15px;
  mask-image: linear-gradient(100deg, transparent 55%, black);
}
.status-icon {
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  background: #fff8f3;
  color: #883e28;
  border-radius: 50%;
  font-size: 1.6rem;
}
.status-caption { margin: .9rem 0 .25rem; color: #683e32; font-size: .9rem; }
.status-hero h2 { font: 700 clamp(1.85rem, 5vw, 3rem)/1.1 Georgia, serif; margin: 0; }
#statusTime { margin: .45rem 0 0; color: #683e32; }
.customer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1rem; margin-top: 1rem; }
.customer-grid .card { margin: 0; }
.customer .card h2 { margin: 0 0 1rem; font: 700 1.45rem/1.1 Georgia, serif; }
.order-lines, .timeline { list-style: none; padding: 0; }
.order-lines li, .order-cost > div, .timeline li { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.order-lines li { padding: .55rem 0; border-bottom: 1px solid #f3e8df; }
.order-lines li span:first-child { overflow-wrap: anywhere; }
.order-lines li span:last-child, .order-cost dd { white-space: nowrap; }
.order-cost { margin: 1rem 0 0; }
.order-cost > div { padding: .3rem 0; }
.order-cost dd, .delivery-summary dd { margin: 0; }
.order-cost .grand-total { margin-top: .45rem; padding: .6rem .75rem; background: #fff2e7; border-radius: .55rem; font-weight: 750; }
.delivery-summary { margin: 0; }
.delivery-summary div + div { margin-top: .8rem; }
.delivery-summary dt, .timeline span:last-child { color: var(--muted); font-size: .875rem; }
.delivery-summary dd { white-space: pre-line; overflow-wrap: anywhere; }
.timeline { border-left: 2px solid #f0dbcc; margin-left: .35rem; }
.timeline li { position: relative; padding: .35rem 0 .65rem .9rem; }
.timeline li::before { content: ''; position: absolute; width: .6rem; height: .6rem; background: #b57f6a; border-radius: 50%; left: -.36rem; top: .7rem; }
.timeline li:first-child { font-weight: 750; }
.timeline li:first-child::before { background: #883e28; box-shadow: 0 0 0 3px #fff0e7; }
@media (max-width: 620px) {
  .customer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .item { grid-template-columns: 1fr 1fr; }
  .item label:first-child { grid-column: 1 / -1; }
}
