/* Оформление «Горячей доставки»: улица, эмалевые таблички, чек доставки. */
body { background: #1b5fb8; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: #fff; }
#scr-menu { background: #4aa8ff; }
#scr-game { background: #4aa8ff; }
#cv { position: absolute; left: 0; top: 0; display: block; touch-action: none; }

/* кнопки */
.btn { min-width: 220px; min-height: 46px; padding: 0 18px; border: 3px solid #0b1f4a; border-radius: 14px; font: inherit; font-size: 17px; font-weight: 900; color: #fff;
  background: linear-gradient(#5aa0ff, #1b5fd0 60%, #123f9a); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .4), 0 4px 0 #0b1f4a; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .4), 0 1px 0 #0b1f4a; }
.btn-play { min-height: 54px; font-size: 21px; border-color: #7a1a00; background: linear-gradient(#ffd23a, #ff7a1a 50%, #f24a12); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 5px 0 #7a1a00; }
.btn-shop { border-color: #6a4a00; background: linear-gradient(#ffe98a, #e0a100 60%, #b87a00); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 4px 0 #6a4a00; color: #3a1c00; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.btn-sm { min-height: 40px; font-size: 14px; background: linear-gradient(#8a92b8, #4a5278); border-color: #1d2240; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 3px 0 #1d2240; }
.btn-share { background: linear-gradient(#7fffb0, #1fae6a); border-color: #0b3a2a; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 #0b3a2a; }
.btn * { pointer-events: none; }
.btn-icon { width: 46px; height: 46px; border: 3px solid #0b1f4a; border-radius: 12px; color: #fff; background: linear-gradient(#5aa0ff, #1b5fd0); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 #0b1f4a; display: flex; align-items: center; justify-content: center; }
.btn-icon * { pointer-events: none; }

/* окна: эмалевая табличка, результат — чек */
.overlay { background: rgba(10, 20, 50, .62); }
.panel { width: 330px; padding: 16px 18px 18px; align-items: center; border-radius: 18px; border: 3px solid #0b1f4a; color: #fff;
  background: linear-gradient(#3f8cff, #1b5fd0 40%, #123f9a); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px #1b5fd0, 0 14px 30px rgba(0, 0, 0, .5); animation: pin .25s ease-out; }
@keyframes pin { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
.panel-title { font-size: 25px; font-weight: 900; text-align: center; text-shadow: 0 3px 0 #0b1f4a; color: #ffe14a; }
.res-line { font-size: 15px; text-align: center; font-weight: 700; }
.panel.ticket { width: 360px; color: #3a1c33; background: #fffaf0; border-color: #3a1c33; box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
  background-image: radial-gradient(circle at 0 50%, transparent 9px, #fffaf0 10px), radial-gradient(circle at 100% 50%, transparent 9px, #fffaf0 10px); gap: 8px; }
.ticket .panel-title { color: #ff5a1a; text-shadow: 0 3px 0 #ffd0a0; }
.ticket .panel-title.lose { color: #4a5278; text-shadow: 0 3px 0 #c8ccd6; }
.ticket .res-line { color: #3a1c33; }
.stars { display: flex; gap: 6px; height: 46px; }
.stars svg { animation: starin .4s backwards cubic-bezier(.3, 1.6, .5, 1); }
@keyframes starin { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1); } }
.res-reason { font-size: 14px; font-weight: 800; color: #c42a5a; text-align: center; min-height: 18px; }
.res-grid { display: flex; gap: 6px; width: 100%; border-top: 2px dashed #c8b8a8; border-bottom: 2px dashed #c8b8a8; padding: 6px 0; }
.res-grid div { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: 12px; font-weight: 700; color: #6a4a5a; }
.res-grid b { font-size: 17px; color: #3a1c33; }
.res-ach { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 800; color: #7a3aff; }
.res-ach div { display: flex; align-items: center; gap: 5px; }
.res-ach .rec { color: #ff5a1a; }
.res-btns { display: flex; gap: 8px; width: 100%; }
.res-btns .btn { min-width: 0; flex: 1; }

/* рейтинг и списки */
#lb-list { width: 290px; max-height: 210px; }
.lb-row { border-radius: 10px; background: rgba(255, 255, 255, .14); font-weight: 800; font-size: 14px; }
.lb-row.top-1 { background: linear-gradient(90deg, #ffd23a, #ff9a1a); color: #3a1c00; }
.lb-row.top-2 { background: linear-gradient(90deg, #e6ecf6, #9aa8c0); color: #1d2240; }
.lb-row.top-3 { background: linear-gradient(90deg, #ffb38a, #c8643a); color: #3a1000; }
.lb-row.me { outline: 3px solid #7fffb0; }
.lb-medal { font-weight: 900; } .lb-medal.gold, .lb-medal.silver, .lb-medal.bronze { width: 28px; height: 28px; line-height: 26px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .4); background: rgba(255, 255, 255, .5); }
.lb-avatar { background: #ff7a1a; color: #fff; font-weight: 900; }
.lb-empty { font-weight: 700; }
#ach-list { width: 300px; max-height: 230px; display: flex; flex-direction: column; gap: 6px; }
.arow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(0, 0, 0, .22); opacity: .78; }
.arow.on { background: rgba(255, 225, 74, .25); opacity: 1; }
.areward { display: flex; align-items: center; gap: 3px; font-size: 14px; color: #ffe14a; }

/* ежедневная награда */
.daily { display: flex; gap: 5px; }
.dday { width: 40px; padding: 4px 0; border-radius: 9px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: rgba(0, 0, 0, .25); font-size: 13px; }
.dday small { font-size: 8px; font-weight: 700; }
.dday.cur { background: #ff7a1a; box-shadow: 0 0 0 2px #fff; animation: m3pulse 1s infinite; }
.dday.got { opacity: .45; }

/* тост */
#toast { bottom: 22px; padding: 10px 18px; border-radius: 14px; background: #3a1c33; border: 2px solid #ffe14a; font-size: 15px; font-weight: 800; }

/* экраны карты и гаража */
.scr-wrap { display: flex; flex-direction: column; background: linear-gradient(#2f8fee, #8fd8ff 70%, #d9cbb3 70%, #d9cbb3 74%, #5a5f6e 74%); }
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px 6px; }
.btn-back { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; border: 3px solid #0b1f4a; background: linear-gradient(#ff8a5a, #f24a12); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 3px 0 #0b1f4a; display: flex; align-items: center; justify-content: center; }
.btn-back:active { transform: translateY(2px); }
.btn-back * { pointer-events: none; }
.bar-title { flex: 1; font-size: 24px; font-weight: 900; text-shadow: 0 3px 0 #0b1f4a; }
.bar-stat { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 12px; background: #0b1630; color: #ffe27a; font-size: 18px; font-weight: 900; border: 2px solid #fff; }
.dtabs { display: flex; gap: 10px; padding: 4px 14px; }
.dtab { width: 50px; height: 44px; border-radius: 12px; border: 3px solid #0b1f4a; font: inherit; font-size: 20px; font-weight: 900; color: #3a1c33; background: var(--dc); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 3px 0 #0b1f4a; display: flex; align-items: center; justify-content: center; }
.dtab.sel { box-shadow: 0 0 0 3px #fff, 0 3px 0 #0b1f4a; transform: translateY(-2px); }
.dtab.locked { background: #8a92b8; }
.dtab * { pointer-events: none; }
.dname { padding: 4px 16px 6px; font-size: 14px; font-weight: 700; text-shadow: 0 2px 0 #0b1f4a; }
.dname b { font-size: 18px; color: #ffe14a; }
.lvgrid { display: grid; grid-template-columns: repeat(5, 112px); gap: 10px; padding: 0 16px; }
.lvb { position: relative; height: 92px; border-radius: 16px; border: 3px solid #0b1f4a; font: inherit; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: linear-gradient(#ffd23a, #ff9a1a 60%, #e07a00); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5), 0 4px 0 #0b1f4a; }
.lvb:active { transform: translateY(3px); }
.lvb.cur { box-shadow: 0 0 0 3px #fff, inset 0 3px 0 rgba(255, 255, 255, .5), 0 4px 0 #0b1f4a; animation: m3pulse 1.2s infinite; }
.lvb.boss { background: linear-gradient(#ff8ac8, #e0306a 60%, #a8104a); }
.lvb.locked { background: linear-gradient(#a8b0cc, #6a7290); }
.lvb * { pointer-events: none; }
.lvn { font-size: 28px; font-weight: 900; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); line-height: 1; }
.lvboss { font-size: 11px; font-weight: 900; background: #3a1c33; padding: 1px 6px; border-radius: 6px; }
.lvs { display: flex; gap: 1px; }
.stabs { display: flex; gap: 6px; padding: 2px 14px 6px; }
.stab { flex: 1; height: 38px; border-radius: 11px; border: 3px solid #0b1f4a; font: inherit; font-size: 14px; font-weight: 900; color: #fff; background: linear-gradient(#5aa0ff, #1b5fd0); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 3px 0 #0b1f4a; }
.stab.sel { background: linear-gradient(#ffd23a, #ff7a1a); color: #3a1c00; }
.shop-body { flex: 1; min-height: 0; display: flex; gap: 10px; padding: 0 14px 12px; }
.shop-prev { width: 210px; flex-shrink: 0; border-radius: 16px; border: 3px solid #0b1f4a; background: linear-gradient(#bfe8ff, #ffe9c8); position: relative; overflow: hidden; }
.shop-prev canvas { display: block; }
.prev-name { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; line-height: 26px; text-align: center; font-size: 13px; font-weight: 900; background: #0b1f4a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; }
#shop-list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 7px; padding-right: 2px; }
.srow { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 6px 10px; border-radius: 14px; border: 2px solid #0b1f4a; background: linear-gradient(#ffffff, #e6f0ff); color: #1d2240; flex-shrink: 0; }
.srow.on { background: linear-gradient(#fff6c8, #ffe08a); }
.sic { flex-shrink: 0; }
.swatch { width: 38px; height: 38px; border-radius: 10px; border: 3px solid #1d2240; flex-shrink: 0; box-shadow: inset 0 4px 0 rgba(255, 255, 255, .45); }
.sinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sinfo b { font-size: 15px; font-weight: 900; }
.sinfo span { font-size: 12px; font-weight: 600; opacity: .8; }
.arow .sinfo b { color: #fff; } .arow .sinfo span { color: #e6f0ff; }
.pips { display: flex; gap: 3px; margin-top: 3px; }
.pips i { width: 16px; height: 6px; border-radius: 3px; background: #c8ccd6; }
.pips i.on { background: #ff7a1a; }
.sbuy { min-width: 96px; height: 42px; display: flex; align-items: center; justify-content: center; gap: 4px; border-radius: 12px; border: 3px solid #0b3a2a; font: inherit; font-size: 15px; font-weight: 900; color: #fff;
  background: linear-gradient(#7fffb0, #1fae6a); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 #0b3a2a; text-shadow: 0 1px 0 #0b5a3a; flex-shrink: 0; }
.sbuy.poor { background: linear-gradient(#c8ccd6, #8a92b8); border-color: #3a4258; box-shadow: 0 3px 0 #3a4258; }
.sbuy.own { background: linear-gradient(#5aa0ff, #1b5fd0); border-color: #0b1f4a; box-shadow: 0 3px 0 #0b1f4a; }
.sbuy:active { transform: translateY(2px); }
.sbuy * { pointer-events: none; }
.sdone { min-width: 96px; text-align: center; font-weight: 900; color: #1fae6a; display: flex; justify-content: center; }
.sdone svg { background: #1fae6a; border-radius: 50%; padding: 2px; }

/* табло игры */
.hud { pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-l { position: absolute; left: 10px; top: 8px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.heat { display: flex; align-items: center; gap: 5px; padding: 3px 8px 3px 4px; border-radius: 12px; background: rgba(11, 22, 48, .75); border: 2px solid #fff; }
.heat-bar { width: 110px; height: 12px; border-radius: 6px; background: #0b1630; overflow: hidden; }
#heat-fill { height: 100%; width: 100%; transform-origin: 0 50%; transition: transform .3s; }
.heat b { font-size: 14px; min-width: 40px; text-align: right; color: #ffb21a; }
.heat b.cold { color: #9ae0ff; animation: m3pulse .6s infinite; }
.hp { display: flex; gap: 2px; }
.hud-prog { position: absolute; left: 50%; top: 14px; width: 210px; margin-left: -105px; height: 22px; pointer-events: none; }
.prog-line { position: absolute; left: 0; right: 10px; top: 9px; height: 5px; border-radius: 3px; background: rgba(11, 22, 48, .7); border: 1px solid #fff; }
.prog-dot { position: absolute; top: 3px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #ff7a1a; border: 2px solid #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.prog-dot.rival { background: #a35cff; display: none; }
.prog-end { position: absolute; right: -6px; top: 0; }
.hud-r { position: absolute; right: 10px; top: 8px; display: flex; align-items: center; gap: 8px; }
.hud-coins { display: flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 12px; background: rgba(11, 22, 48, .75); border: 2px solid #fff; font-size: 17px; font-weight: 900; color: #ffe27a; pointer-events: none; }
.hud-lv { position: absolute; left: 50%; top: 38px; transform: translateX(-50%); font-size: 12px; font-weight: 800; text-shadow: 0 2px 0 #0b1f4a; pointer-events: none; white-space: nowrap; }

/* управление */
.ctrl-group { position: absolute; bottom: 10px; touch-action: none; }
.ctrl-l { left: 10px; width: 184px; height: 128px; transform-origin: 0 100%; }
.ctrl-r { right: 12px; width: 110px; height: 110px; transform-origin: 100% 100%; }
.dp { position: absolute; width: 74px; height: 74px; border-radius: 22px; border: 3px solid rgba(11, 31, 74, .9); background: linear-gradient(rgba(90, 160, 255, .78), rgba(27, 95, 208, .78));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 4px 0 rgba(11, 31, 74, .8); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.dp-l { left: 0; bottom: 30px; } .dp-l svg { transform: scaleX(-1); }
.dp-r { left: 110px; bottom: 30px; }
.dp-d { left: 63px; bottom: 0; width: 58px; height: 52px; border-radius: 16px; } .dp-d svg { transform: rotate(90deg); }
.dp.on { background: linear-gradient(rgba(255, 210, 58, .9), rgba(255, 122, 26, .9)); transform: translateY(3px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 1px 0 rgba(11, 31, 74, .8); }
.jb { position: absolute; inset: 0; border-radius: 50%; border: 4px solid #7a1a00; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none;
  background: radial-gradient(circle at 40% 30%, #ffd23a, #ff7a1a 60%, #e04a12); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .5), 0 6px 0 #7a1a00; opacity: .92; }
.jb span { font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 0 #7a1a00; }
.jb.on { transform: translateY(4px); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .5), 0 2px 0 #7a1a00; }
.prog-tick { position: absolute; top: 5px; width: 6px; height: 13px; margin-left: -3px; border-radius: 3px; background: #ff7a1a; border: 1px solid #fff; }
.prog-tick.got { background: #7fffb0; }
.hud-prog { width: 260px; margin-left: -130px; }
.res-btns .btn { padding: 0 6px; white-space: nowrap; }
.res-btns .btn-play { font-size: 19px; }
.res-btns .btn-sm { font-size: 13px; }
