/* Delivery Dash: world map, run HUD and cards. The run itself is drawn on a canvas (js/dash.js). */

.dash-root { position: absolute; inset: 0; overflow: hidden; }

/* ---- World map */
.dash-map { position: absolute; inset: 0; overflow: hidden; }
.dash-map-hills { position: absolute; left: 0; right: 0; bottom: 0; height: 55%; }
.dash-map-path { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.dash-map-path path { fill: none; stroke-linecap: round; }
.dash-path-edge { stroke: rgba(122, 94, 40, .28); stroke-width: 30; transform: translateY(2px); }
.dash-path-road { stroke: #E8D3A8; stroke-width: 26; }
.dash-path-dash { stroke: rgba(255, 255, 255, .6); stroke-width: 3; stroke-dasharray: 8 12; }

.dash-house { position: absolute; width: 150px; height: 130px; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .18)); }
.dash-house-layer { position: absolute; left: 0; top: 0; }
.dash-house-lights { position: absolute; left: 0; right: 0; top: 69.3px; display: flex; justify-content: center; gap: 9px; }
.dash-house-lights i { width: 7px; height: 7px; border-radius: 50%; animation: dash-twinkle .6s ease-in-out infinite alternate; }
.dash-house-lights i:nth-child(even) { animation-direction: alternate-reverse; }
@keyframes dash-twinkle { from { box-shadow: 0 0 2px 0 rgba(255, 230, 0, .9); } to { box-shadow: 0 0 7px 2px rgba(255, 230, 0, .9); } }
.dash-puff { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .7); opacity: 0; animation: dash-puff 2.2s ease-out infinite; }
@keyframes dash-puff { from { transform: translateY(0); opacity: .9; } to { transform: translateY(-26px); opacity: 0; } }

.dash-stop { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .22s var(--spring); white-space: nowrap; }
.dash-stop:active:not(:disabled) { transform: translate(-50%, -50%) scale(.92); transition-duration: .08s; }
.dash-stop-coin {
  position: relative; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle 34px at 35% 30%, #FFF3B0, #FFC94B);
  box-shadow: inset 0 0 0 3px #fff, inset 0 -5px 8px rgba(214, 140, 20, .35), 0 4px 5px rgba(0, 0, 0, .2);
}
.dash-stop-coin::before { content: ""; position: absolute; left: 16%; right: 16%; top: 8%; height: 34%; border-radius: 50%; background: linear-gradient(rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); pointer-events: none; }
.dash-stop.locked .dash-stop-coin { background: radial-gradient(circle 34px at 50% 50%, #D9D9D9, #A9A9A9); box-shadow: inset 0 0 0 3px #fff, inset 0 -5px 8px rgba(0, 0, 0, .12), 0 4px 5px rgba(0, 0, 0, .2); }
.dash-stop-emoji { position: relative; font-size: 28px; line-height: 1; }
.dash-stop-done { position: absolute; left: 50%; top: 50%; font-size: 16px; line-height: 1; transform: translate(calc(-50% + 22px), calc(-50% - 22px)); }

.dash-map-daisy { position: absolute; pointer-events: none; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .18)); }

.dash-map-top { position: absolute; left: 12px; right: 12px; top: 8px; z-index: 5; }
.dash-map-row { display: flex; align-items: center; }
.dash-map-title { flex: 1; text-align: center; }
.dash-map-spacer { width: 42px; flex: none; }
.dash-map-hint { margin-top: 4px; text-align: center; white-space: pre-line; font-size: 12px; font-weight: 900; line-height: 1.3; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .4); }

/* ---- The run */
.dash-run { position: absolute; inset: 0; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
.dash-canvas { position: absolute; inset: 0; }
.dash-canvas canvas { position: absolute; left: 0; top: 0; }

.dash-hud { position: absolute; left: 12px; right: 12px; top: 8px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.dash-hud-row { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.dash-hud-row .round-btn { pointer-events: auto; }
.dash-x { display: grid; place-items: center; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25)); }
/* Solid pill, no blur: cheap to keep over a moving canvas. */
.hud-pill.dash-pill { background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 0 0 2.5px var(--rim), 0 3px 6px rgba(0, 0, 0, .18); }
.dash-pill-star { font-size: 18px; line-height: 1; }
.dash-hearts { gap: 2px; }
.dash-heart { font-size: 16px; line-height: 1; }

.dash-bar { position: relative; width: calc(100% - 56px); height: 26px; }
.dash-bar-track { position: absolute; left: 0; right: 0; top: 8px; height: 10px; border-radius: 5px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.dash-bar-fill { position: absolute; left: 0; top: 8px; width: 10px; height: 10px; border-radius: 5px; background: linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 55%), linear-gradient(90deg, #FFE38A, #FFC94B); }
.dash-bar-duck { position: absolute; left: 0; top: -6px; will-change: transform; }
.dash-bar-house { position: absolute; left: calc(100% - 30px); top: 50%; transform: translateY(-50%); font-size: 16px; line-height: 1; }

.dash-slot { position: relative; height: 34px; width: 100%; display: grid; place-items: start center; }
.dash-slot > * { grid-area: 1 / 1; }
.dash-power {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .3);
  box-shadow: inset 0 0 0 2px #C59BFF; opacity: 0; transform: scale(.6); transition: transform .3s var(--spring), opacity .2s ease;
}
.dash-power.on { opacity: 1; transform: scale(1); }
.dash-power-emoji { font-size: 18px; line-height: 1; }
.dash-power-track { position: relative; width: 90px; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .3); overflow: hidden; }
.dash-power-track i { position: absolute; left: 0; top: 0; height: 8px; border-radius: 4px; background: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 60%), #C59BFF; }
.dash-level-name { opacity: 0; transition: opacity .25s ease; padding-top: 2px; }
.dash-level-name.on { opacity: 1; }

/* ---- Cards (start, delivered, oh no) */
.dash-cards { position: absolute; inset: 0; z-index: 3; display: none; place-items: center; background: rgba(0, 0, 0, .25); }
.dash-cards.on { display: grid; }
.dash-cards.fail { background: rgba(0, 0, 0, .3); }
.dash-card { width: 310px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.dash-pop { animation: dash-pop .4s var(--spring) both; }
@keyframes dash-pop { from { transform: scale(.8); opacity: 0; } }
.dash-card-pair { display: flex; align-items: flex-end; justify-content: center; }
.dash-critter { display: block; flex: none; }
.dash-card-pair > * + * { margin-left: -6px; }
.dash-card-pair.tight > * + * { margin-left: -8px; }
.dash-card-plate { position: relative; top: 10px; align-self: center; }
.dash-card-head { white-space: pre-line; font-size: 17px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.dash-card-tip { white-space: pre-line; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--muted); }
.dash-card-go { padding-top: 4px; width: 100%; }
.dash-card-body { white-space: pre-line; font-size: 17px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.dash-card-body b { font-weight: 900; }
.dash-card-unlock { font-size: 15px; font-weight: 900; color: var(--cabbage-dark); }
.dash-card-note { font-size: 12px; font-weight: 700; color: var(--muted); }
.dash-card-note:empty { display: none; }

@media (prefers-reduced-motion: reduce) { .dash-house-lights i, .dash-puff { animation: none; } }
