* { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
[hidden] { display: none !important; }
body { margin: 0; font-family: system-ui, "Noto Sans TC", sans-serif; line-height: 1.5; }
main { width: min(100%, 420px); margin-inline: auto; padding: 12px 16px; }
header, #hud { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
header { justify-content: flex-start; }
h1 { margin: 0; font-size: 1.2rem; }
p { margin: 8px 0; }
#alley { display: grid; gap: 2px; width: min(100%, 48dvh); margin: 8px auto; touch-action: none; user-select: none; }
.cell { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: var(--surface); border-radius: 4px; font-weight: 700; }
.wall { background: var(--muted); }
.parcel, .doorstep { display: grid; place-items: center; width: 70%; height: 70%; color: var(--accent); border: 3px dashed currentColor; border-radius: 4px; }
.parcel { background: var(--accent); color: var(--on); border: 0; border-radius: 50%; }
.ready, .done { border-style: solid; }
.ready { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.done { color: var(--main); }
.courier { position: absolute; inset: 8%; border: 4px solid var(--main); border-radius: 50%; }
#message { min-height: 1.5em; text-align: center; }
button { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
#pad { display: grid; grid-template-columns: repeat(3, 56px); justify-content: center; gap: 4px; }
#pad button { font-size: 1.3rem; touch-action: manipulation; }
#pad [data-direction="up"] { grid-column: 2; }
#pad [data-direction="left"] { grid-column: 1; }
#controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
#actions { display: grid; gap: 8px; }
#actions button { padding: 0 12px; white-space: nowrap; }
button:disabled { opacity: .4; cursor: default; }
.main { background: var(--main); color: var(--on); }
