/* Keep the existing 320x568 play surface. Emphasis changes no hit targets. */
body.game-mode.game-mode .goal-chip.goal-needed{background:#fff2cc;box-shadow:inset 0 0 0 2px #c48b24;border-radius:9px}
body.game-mode.game-mode .goal-panel.goal-focus .move-counter{color:#7c4312}
body.game-mode.game-mode #puzzle-note.goal-focus-note{color:#fff5b0;font-weight:700}
.remaining-summary{background:#fff5dd;border:1px solid #e6c89c;border-radius:16px;padding:12px;text-align:left;margin:12px 0}
.remaining-summary h3{font-size:16px;margin:0 0 8px}.remaining-summary ul{list-style:none;padding:0;margin:0;display:grid;gap:7px}
.remaining-summary li{display:flex;align-items:center;gap:12px}.remaining-summary b{min-width:35px;text-align:center;font-size:24px;color:#594022}.remaining-summary span{font-size:14px}

/* The order slip reuses the goal panel's space at both supported phone sizes. */
#game-screen.opening-delivery .goal-content{position:relative}
#game-screen.opening-delivery .goal-heading{display:block;color:#60401b;font-size:10px;line-height:12px;font-weight:800;letter-spacing:.04em}
#game-screen.opening-delivery .goal-chip{height:32px;grid-template:1fr / auto auto;align-items:center;justify-content:center;column-gap:5px}
#game-screen.opening-delivery .goal-symbol{grid-area:1 / 1}
#game-screen.opening-delivery .goal-chip b{grid-area:1 / 2}
#game-screen.opening-delivery .goal-track{bottom:0}
#game-screen.opening-delivery .goal-chip[data-sent]::after{content:attr(data-sent);position:absolute;right:0;top:-7px;padding:1px 4px;border-radius:6px;background:#196653;color:#fff;font:700 11px/14px system-ui;pointer-events:none}
#game-screen.opening-delivery .goal-chip.done{opacity:1}
#game-screen.opening-delivery #puzzle-note.special-tip{color:#234d55}
.opening-stop .map-selection{background:#fff6da;border:1px solid #d9b56e}
.opening-stop #map-record{position:static;display:block;clip-path:none;width:auto;height:auto;font-size:11px;line-height:16px;color:#60401b}
.opening-next{display:grid;gap:3px;text-align:left;padding:8px 12px;margin:6px 0;border-left:4px solid #197766;background:#f1f6de;color:#234f43;border-radius:6px}
.opening-next span,.opening-next small{font-size:12px;line-height:16px}
.opening-route{position:relative;display:block;height:34px;border-bottom:3px dashed #71997b}
.opening-route img{position:absolute;left:calc(100% - 32px);bottom:0;width:32px;height:32px;object-fit:contain}

/* Direction stays visible on baked and native faces, independently of colour. */
#board .match-cell .package:is(.special-h,.special-v)::after{
 content:'↔';display:grid;place-items:center;position:absolute;inset:auto -2% -2% auto;
 width:52%;height:36%;border-radius:5px;background:#163e51;color:white;
 font:bold clamp(12px,3.7vw,17px)/1 system-ui;box-shadow:0 0 0 1px #fff0b7;z-index:4;pointer-events:none
}
#board .match-cell .package.special-v::after{content:'↕';width:36%;height:52%}
body.game-mode #board .match-cell.express-axis{background:#f1d68c}
#board .fx-drone-target{display:grid;place-items:center;color:#163f42;background:#fff7b9c9;font:bold 20px/1 system-ui}
#game-screen .goal-chip.remaining-order{background:#fff9df;box-shadow:inset 0 0 0 2px #22766a;border-radius:8px}
#game-screen .goal-chip.done,#game-screen.opening-delivery .goal-chip.done{opacity:1;background:#dfedda;border-radius:8px}
#game-screen .goal-chip.done b{color:#206044}
#game-screen .goal-chip.done .goal-symbol{opacity:.64}
body.game-mode.game-mode #pocket-parcel{align-content:center;gap:1px;padding:1px 1px 14px}
body.game-mode.game-mode #pocket-parcel>.package{width:23px;height:23px}
#pocket-parcel .held-name{font:800 10px/12px system-ui;letter-spacing:-.2px;white-space:nowrap;color:#513320}
body.game-mode #power-pocket.holding-power{visibility:hidden}
body.game-mode.game-mode #power-pocket small{line-height:10px}
:is(.post-station,.district-stop){position:absolute;left:20%;z-index:2;width:clamp(60px,18%,82px);margin:0;pointer-events:none;text-align:center}
:is(.post-station,.district-stop) svg{width:100%;display:block;filter:drop-shadow(0 3px 2px #3f562c55)}
:is(.post-station,.district-stop) figcaption{display:inline-block;background:#fff1ce;color:#533b24;border:1px solid #b49a60;border-radius:8px;padding:2px 5px;font:700 11px/13px system-ui}
:is(.post-station,.district-stop) figcaption b{display:block;font-size:10px}
:is(.post-station,.district-stop).open figcaption b{color:#0b675b}
.station-awning{transform-box:fill-box;transform-origin:center top}
.district-stop{left:5%}
.priority-drop{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:12;overflow:visible}
.priority-drop text{font:bold 21px system-ui;text-anchor:middle;fill:#fff}
.priority-drop .drop-arrow{fill:#fff0a6;stroke:#184e53;stroke-width:8;stroke-linecap:round;stroke-linejoin:round}
.priority-drop .drop-arrow path{fill:none;filter:drop-shadow(0 0 2px #fff)}
.priority-drop .drop-delivery rect{fill:#16634d;stroke:#fff1b8;stroke-width:3}
.priority-drop .drop-tape rect{fill:#73441b;stroke:#fff1b8;stroke-width:2}
.priority-drop .drop-express rect{fill:#124f63;stroke:#fff3bc;stroke-width:4}
.priority-drop .drop-express text{font-size:31px}
#goals .sun-forecast{position:absolute;left:calc(50% + 16px);top:0;background:#59420d;color:#fff5bf;border-radius:6px;padding:1px 4px;font:bold 12px/15px system-ui;pointer-events:none}
.priority-drop .drop-crate rect{fill:#66411e;stroke:#ffe5a5;stroke-width:3}
.opened-field{position:absolute;inset:1px;z-index:4;pointer-events:none;border:2px solid #fff1b8;border-radius:inherit;box-shadow:inset 0 0 0 2px #755124}
body.game-mode #game-screen #puzzle-note.special-tip{color:#234d55}
body.game-mode #board .gated-ramp .ramp-marker{width:15px;height:14px;left:calc(50% - 8px);z-index:3;font-size:0;border:2px solid #68411e;background:linear-gradient(45deg,transparent 41%,#84512d 42% 57%,transparent 58%),linear-gradient(-45deg,transparent 41%,#84512d 42% 57%,transparent 58%),#ffd98c}
.drop-tape-preview .floor-tape{visibility:hidden}
.stop-reveal{transform-box:fill-box;transform-origin:center bottom}
.game-heading div:has(>#power-discovery:not([hidden])) :is(#puzzle-number,#puzzle-title){display:none}
#power-discovery:not([hidden]){display:block;font:700 12px/1.15 system-ui;color:#fff8d8;text-wrap:pretty}
/* A cell-sized overlay stays put while the two dragged parcels move underneath. */
#board .first-wave-hit::before,#board .express-hit::before{content:"";position:absolute;inset:1px;border:2px solid #fff4ac;box-shadow:inset 0 0 0 2px #624422;border-radius:inherit;pointer-events:none;z-index:5}
#board .express-line-v::before,#board .express-line-h::before{content:"";position:absolute;inset:3px;pointer-events:none;z-index:4}
#board .express-line-v::before{border-left:3px dashed #184f58}
#board .express-line-h::before{border-top:3px dashed #184f58}
#board .first-wave-hit.drone-aim::before{border:3px dashed #fff8ad;box-shadow:inset 0 0 0 2px #145860}
#goals .goal-chip[data-sorter-gain]::after{content:attr(data-sorter-gain);position:absolute;top:0;right:1px;border-radius:6px;background:#17594e;color:#fff8dc;padding:1px 4px;font:bold 11px/14px system-ui;pointer-events:none}

/* Sorting tray, raised ceramic wells and a paper delivery slip. Keep the full cell as the input target. */
@media (forced-colors:none){
 body.game-mode.game-mode .match-machine{background:#124d58;box-shadow:0 0 0 2px #174c57,0 0 0 4px #91cbbb,0 5px 0 3px #16404f}
 body.game-mode.game-mode .match-board{background:#184c58}
 body.game-mode.game-mode .match-cell:where(:not(.taped,.crate-cell,.board-hole,.board-empty,.selected,.pressed,.express-axis)){
  background:#398080;border-radius:5px;box-shadow:inset 0 1px 1px #164f58,inset 0 -1px #68a69d
 }
 body.game-mode.game-mode .match-cell:nth-child(even):where(:not(.taped,.crate-cell,.board-hole,.board-empty,.selected,.pressed,.express-axis)){background:#448e89}
 body.game-mode.game-mode .goal-panel{background:linear-gradient(165deg,#fffbea,#ffecbc);box-shadow:inset 0 1px #fffdf1,0 2px 0 #164f58}
 body.game-mode.game-mode .move-counter{background:#275769;border:0;border-radius:11px;color:#fff4d6;padding:2px 5px;box-shadow:inset 0 1px #437385}
 body.game-mode.game-mode .move-counter :is(strong,span){color:inherit}
 body.game-mode.game-mode .move-counter.low{background:#853e36}
 body.game-mode:not(.monochrome) :is(#game-screen,.match-score-flight-layer) .package.special-cargo{border:2px solid #945021;border-radius:16% 16% 24% 16%;background:linear-gradient(155deg,#fffbee,#ffe2a0);box-shadow:inset 0 2px #fff9db,0 2px #825331}
 body.game-mode:not(.monochrome) .package.special-cargo .package-tape{left:4%;top:8%;height:84%;width:17%;opacity:1;border-radius:2px;background:repeating-linear-gradient(145deg,#d86851 0 3px,#fff4d1 3px 6px,#276d82 6px 9px,#fff4d1 9px 12px)}
 body.game-mode:not(.monochrome) .package.special-cargo .package-symbol{inset:14% 9% 14% 25%;color:#265a65}
 html:not(.parcel-art-unavailable) body.game-mode:not(.monochrome) #board .match-cell .package:is(.special-h,.special-v)::after{display:none}
}
.match-fx-layer .fx-parcel-band{border-radius:3px;background:repeating-linear-gradient(120deg,#fff4bf 0 6px,#217780 6px 10px);border:1px solid #805828}
.goal-panel:has(.delivery-seal){position:relative}
.delivery-seal{position:absolute;z-index:5;inset:0 0 0 auto;width:76%;display:flex;align-items:center;justify-content:center;gap:12px;background:#fff5db;color:#15574d;border:2px solid #258775;border-radius:14px;box-shadow:0 3px 8px #12453f33;animation:ink-seal .25s ease-out}
.delivery-seal strong{padding:3px 7px;border:2px solid currentColor;border-radius:4px;font-size:18px;text-transform:uppercase;transform:rotate(-4deg)}
.delivery-seal small{font-size:12px;text-decoration:underline}
@keyframes ink-seal{from{opacity:.3;transform:scale(1.09)}to{opacity:1;transform:none}}
.campaign-stop #map-record{position:static;display:block;clip-path:none;width:auto;height:auto;white-space:normal;font-size:11px;line-height:1.2}
#dialog:has(.delivery-receipt){width:min(370px,calc(100% - 20px));padding:0;border-color:#d5b780;background:#fff9e7}
.delivery-receipt{display:grid;gap:8px;padding:18px;text-align:left;color:#254d48;background:repeating-linear-gradient(130deg,#297e74 0 10px,#fff3d7 10px 20px,#db735c 20px 30px,#fff3d7 30px 40px) top/100% 5px no-repeat}
.delivery-receipt header{padding-right:28px}
.delivery-receipt .receipt-id{display:block;text-transform:uppercase;letter-spacing:.1em;font-size:10px;font-weight:800;color:#6c513b}
#dialog-content .delivery-receipt h2{margin:3px 0;color:#184e48;font-size:25px}
.delivery-receipt header>span:last-child{font-size:13px}
.receipt-goals{border-block:1px dashed #b9ac8f;padding:7px 0}
.receipt-goals h3{font-size:14px;margin:0 0 4px}
#dialog-content .receipt-goals ul{list-style:none;display:grid;gap:3px;margin:0;padding:0}
.receipt-goals li{display:flex;align-items:center;gap:8px;min-height:24px;line-height:1.2}
.receipt-goals li b{margin-left:auto;min-width:28px;text-align:center;background:#e0ecce;color:#245340;border-radius:7px;font-variant-numeric:tabular-nums}
.loss-receipt .receipt-goals li b{background:#f7e0c5;color:#744423}
.receipt-goals .goal-symbol,.receipt-goals .goal-symbol>*{position:relative;width:23px;height:24px;display:grid;place-items:center}
.receipt-total{display:flex;align-items:center;justify-content:space-between}
.receipt-total .result-stars{margin:0;gap:3px}.receipt-total .result-stars span,.receipt-total .result-stars span svg{width:28px;height:28px;margin:0}
.receipt-total .result-score{font-size:30px}.receipt-total .result-score small{display:inline;font-size:14px}
.receipt-bonus,.delivery-receipt details{font-size:13px}
.delivery-receipt .eco-reward{margin:0;padding:5px 9px;display:flex;align-items:center;flex-wrap:wrap;gap:2px 8px}
.delivery-receipt .eco-reward strong{font-size:15px}.delivery-receipt .eco-reward span{font-size:11px}.delivery-receipt .eco-reward span:empty{display:none}
#dialog-content .delivery-receipt button{margin:0;width:100%;min-height:44px}
.delivery-receipt summary{cursor:pointer;padding:6px 0;font-weight:700}
#dialog-content .delivery-receipt .contract-result{margin:0;line-height:1.2;font-size:12px}
@media(max-height:620px){.delivery-receipt{gap:5px;padding:13px}.receipt-goals{padding:4px 0}}
@media(prefers-reduced-motion:reduce){.delivery-seal{animation:none}}
.campaign-motion #board .drag-source::before,.campaign-motion #board .drag-target::before{
 content:"";position:absolute;inset:3%;border:2px dashed #245f70;border-radius:22%;pointer-events:none;
}
.campaign-motion #board .drag-target::before{border:3px solid #ffe774;box-shadow:inset 0 0 0 2px #805321,0 0 0 1px #87562d}
.campaign-motion #board .drag-source .package{translate:0 -3px;filter:brightness(1.07) drop-shadow(0 5px 2px #183e52a6)}
.campaign-motion.reduce-motion #board .drag-source .package{translate:none}
@media(prefers-reduced-motion:reduce){.campaign-motion #board .drag-source .package{translate:none}}
.fx-footprint{position:absolute;pointer-events:none;overflow:visible;color:#ffe985;z-index:3}
.fx-footprint.pallet{color:#ffca7e}.fx-footprint.sorter{color:#e6abff}.fx-footprint.drone{color:#86ffec}
.range-edge,.range-source{stroke:currentColor;stroke-width:.065;stroke-linejoin:round;fill:none}
.range-source{fill:#fff8c555;stroke:#fffcea;stroke-width:.09}
.sorter-selection{fill:#f2c5ff55;stroke:#fff1ff;stroke-width:.045}
.campaign-stop #map-forecast{display:block;margin-top:2px;border-top:1px dashed #c9ad76;padding-top:2px;font-size:11px;line-height:1.2;color:#28574e}
