@font-face{font-family:'DPA Stencil';src:url('fonts/big-shoulders-stencil.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:'Barlow Condensed';src:url('fonts/barlow-condensed-700.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'Barlow Condensed';src:url('fonts/barlow-condensed-600.woff2') format('woff2');font-weight:600;font-style:normal;font-display:swap}

:root{
  --amber:#e0a34a;
  --gold:#d8b25c;
  --gold-hi:#f0d38a;
  --money:#a4bf66;
  --pale:#d8cebb;
  --dim:#948a78;
  --steel:#171310;
  --steel2:#221b15;
  --rust:#5b3522;
  --red:#bd3a25;
  --blue:#6fc0e8;
  --ink:#0a0806;
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;background:#0a0806;overflow:hidden;overscroll-behavior:none}
body{
  font-family:'Barlow Condensed','DPA Stencil',sans-serif;
  color:var(--pale);
  user-select:none;-webkit-user-select:none;
  display:flex;justify-content:center;align-items:stretch;
  height:100vh;height:100dvh;
  position:fixed;inset:0;
}
body::before{
  content:"";position:fixed;inset:-30px;z-index:-2;
  background:url('img/bg_day.jpg') center 45%/cover no-repeat;
  filter:blur(26px) brightness(.24) saturate(.8);
  transform:scale(1.08);
}
body::after{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(ellipse at 50% 42%,transparent 20%,rgba(0,0,0,.6) 100%);
}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer;-webkit-appearance:none;appearance:none}
button:focus{outline:none}
button:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
img{-webkit-user-drag:none;user-select:none}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

#app{
  position:relative;
  width:min(100vw,720px);
  height:100vh;height:100dvh;
  overflow:hidden;
  background:#171310;
  box-shadow:0 0 0 1px #000,0 0 70px rgba(0,0,0,.95);
  isolation:isolate;
  container-type:size;
  touch-action:manipulation;
}


#game{
  position:absolute;left:0;top:0;width:100%;height:62%;
  overflow:hidden;z-index:1;background:#1a1410;
  touch-action:none;
}
#game canvas{display:block;width:100%!important;height:100%!important;filter:brightness(1.09) saturate(1.08) contrast(1.02)}
#app.night #game canvas{filter:brightness(.94) saturate(1.1) contrast(1.03)}
.sceneShade{
  position:absolute;left:0;top:0;width:100%;height:62%;
  z-index:2;pointer-events:none;
  background:
    radial-gradient(ellipse at 52% 44%,transparent 42%,rgba(10,6,4,.24) 82%,rgba(5,3,2,.48) 100%),
    linear-gradient(to bottom,rgba(8,5,3,.12),transparent 16%,transparent 84%,rgba(8,5,3,.3));
}
#heat{
  position:absolute;left:0;top:0;width:100%;height:62%;
  z-index:3;pointer-events:none;opacity:.34;
  background:radial-gradient(circle at 52% 46%,transparent 38%,rgba(204,104,38,.12) 76%,rgba(90,28,8,.32) 100%);
  mix-blend-mode:soft-light;
  transition:opacity .35s,filter .35s;
}
#grain{
  position:absolute;inset:-10%;z-index:16;pointer-events:none;
  background:url('img/noise.png') repeat;
  background-size:128px 128px;
  opacity:.045;mix-blend-mode:overlay;
  animation:grainShift .38s steps(2) infinite;
}
@keyframes grainShift{
  0%{transform:translate(0,0)}
  50%{transform:translate(-2.5%,2%)}
  100%{transform:translate(2%,-2.5%)}
}
.clipping #grain{opacity:.16;animation-duration:.16s}
.clipping #heat{opacity:1;filter:saturate(1.4) contrast(1.05)}


#ui{
  position:absolute;inset:0;z-index:10;pointer-events:none;
  display:grid;
  grid-template-rows:7% 8% 47% 8% 20% 10%;
}


#hud{
  grid-row:1;
  pointer-events:auto;
  display:flex;align-items:center;gap:calc(.7cqw + 1px);
  padding:0 2.2cqw;
  background:url('img/hud_plate.webp') center/100% 100% no-repeat,#1c1712;
  border-bottom:1px solid #050403;
  box-shadow:inset 0 1px 0 rgba(230,170,90,.16),0 4px 10px rgba(0,0,0,.6);
  position:relative;
  overflow:hidden;
}
#hud::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(0,0,0,.4),transparent 12%,transparent 88%,rgba(0,0,0,.45));
}
.hudg{display:flex;align-items:center;gap:.45cqw;flex:0 0 auto;position:relative;z-index:1}
.hudg .ico{width:2.8cqw;height:2.8cqw;min-width:10px;min-height:10px;max-width:18px;max-height:18px;object-fit:contain;filter:drop-shadow(0 1px 0 #000)}
.tint-money{filter:sepia(1) saturate(2.5) hue-rotate(48deg) brightness(1.08) drop-shadow(0 1px 0 #000)}
.tint-gold{filter:sepia(1) saturate(2) brightness(1.13) drop-shadow(0 1px 0 #000)}
.hudg b{
  font-family:'DPA Stencil';font-weight:700;
  font-size:max(8px,1.82cqw);letter-spacing:.03em;
  white-space:nowrap;text-shadow:0 1px 0 #000,0 0 5px rgba(0,0,0,.8);
  font-variant-numeric:tabular-nums;
}
.hudg.money b{color:var(--money)}
.hudg.rep b{color:var(--gold)}
.hudg.day b{color:#d9cfbd}
.hudg.job{flex:1 1 auto;min-width:0;overflow:hidden}
.hudg.job b{color:#efb64f;overflow:hidden;text-overflow:ellipsis;display:block}
#sound{
  flex:0 0 auto;margin-left:auto;width:7.2cqw;height:7.2cqw;min-width:34px;min-height:34px;max-width:40px;max-height:40px;
  border-radius:50%;position:relative;z-index:2;
  background:radial-gradient(circle at 38% 30%,#5b4a35,#2a2018 58%,#0c0907 100%);
  border:1px solid #050403;
  box-shadow:0 0 0 1px rgba(224,163,74,.3),inset 0 1px 0 rgba(255,220,160,.25),0 2px 4px #000;
  display:flex;align-items:center;justify-content:center;
}
#sound img{width:56%;height:56%;object-fit:contain;filter:sepia(.5) brightness(1.3)}
#sound[aria-pressed="false"]{filter:brightness(.72)}


#tagline{
  grid-row:2;position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:center;gap:.8cqw;
  padding:0 1.6%;
  background:url('img/tagline_board.webp') center/100% 100% no-repeat;
  filter:drop-shadow(0 5px 6px rgba(0,0,0,.8));
  z-index:1;
}
#tagline .slab{
  display:inline-block;font-family:'DPA Stencil';font-weight:700;
  font-size:max(10px,3.4cqw);line-height:1;letter-spacing:.025em;
  color:#f2e8d5;text-shadow:0 1px 0 #180c05,0 2px 3px rgba(0,0,0,.65),0 0 8px rgba(0,0,0,.35);
  white-space:nowrap;transform:rotate(-1.3deg);
}
#tagline .s2{transform:rotate(-.2deg);color:#eadfca}
#tagline .s3{transform:rotate(-1.7deg)}
#tagline .s4{transform:rotate(-.6deg);color:#e6dac4}
#app.night #tagline .s1,#app.night #tagline .s4{color:#efd7a3}
#app.night #tagline .s2,#app.night #tagline .s3{color:#dfc79a}


#sceneSpace{grid-row:3;pointer-events:none}


#actions{
  grid-row:4;display:flex;gap:1.4cqw;padding:.5cqw 2.2cqw .9cqw;
  pointer-events:auto;position:relative;
  background:linear-gradient(180deg,#211a14,#120e0b);
  border-top:1px solid #070504;
  box-shadow:0 -5px 12px rgba(0,0,0,.65),inset 0 1px 0 rgba(210,150,80,.12);
  z-index:20;
}
.plaque{
  flex:1 1 0;min-width:0;position:relative;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5%;
  padding:.4cqw .2cqw;
  background:url('img/stone.webp') center/100% 100% no-repeat,#5e5b54;
  text-shadow:0 1px 0 #000,0 2px 3px rgba(0,0,0,.6);
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.6));
  transition:transform .08s,filter .15s;
}
#actions .pl-ic{
  height:36%;max-height:27px;width:auto;min-height:11px;object-fit:contain;
  filter:sepia(.45) saturate(1.3) brightness(1.25) drop-shadow(0 1px 0 #000);
  opacity:.95;
}
#actions .plaque span{
  font-family:'DPA Stencil';font-weight:700;
  font-size:max(7.5px,1.9cqw);line-height:.92;letter-spacing:.035em;
  text-align:center;text-transform:uppercase;color:#d7cec0;
  white-space:nowrap;
}
#actions .plaque:active{transform:translateY(2px) scale(.985);filter:brightness(1.18) drop-shadow(0 0 2px rgba(0,0,0,.6))}
.plaque:hover{filter:brightness(1.08) drop-shadow(0 2px 2px rgba(0,0,0,.6))}
.plaque.pulse{animation:plaquePulse 1.5s ease-in-out infinite}
.plaque.on{box-shadow:0 0 0 1px rgba(224,163,74,.55),0 0 14px rgba(224,163,74,.35)}
@keyframes plaquePulse{
  0%,100%{filter:drop-shadow(0 2px 2px rgba(0,0,0,.6)) brightness(1)}
  50%{filter:drop-shadow(0 0 8px rgba(224,163,74,.6)) brightness(1.18)}
}


#tray{
  grid-row:5;position:relative;pointer-events:auto;overflow:hidden;
  background:url('img/tray.jpg') center/100% 100% no-repeat,#241a12;
  border-top:1px solid #080605;
  box-shadow:inset 0 5px 12px rgba(0,0,0,.55),inset 0 -6px 16px rgba(0,0,0,.55);
  z-index:20;
}
#tray::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(0,0,0,.34),transparent 22%,transparent 78%,rgba(0,0,0,.45));
}
.parts{
  position:absolute;inset:5% 2.4% 6%;display:flex;align-items:center;justify-content:space-evenly;
  gap:.6cqw;z-index:1;
}
.headunit{
  height:18%;max-height:34px;width:auto;object-fit:contain;
  filter:drop-shadow(0 3px 3px rgba(0,0,0,.7)) brightness(.92);
  opacity:.9;
}
.part{
  height:86%;display:flex;align-items:center;justify-content:center;
  padding:0;touch-action:none;position:relative;
  filter:drop-shadow(0 5px 4px rgba(0,0,0,.72));
  transition:filter .12s,opacity .12s;
}
.part img{height:100%;width:auto;object-fit:contain;pointer-events:none}
.part.sub{height:62%}
.part.amp{height:24%}
.part.wire{height:30%}
.part.selected{filter:drop-shadow(0 0 7px rgba(240,203,112,.85)) brightness(1.09)}
.part.locked{opacity:.52;filter:grayscale(.35) brightness(.8) drop-shadow(0 5px 4px rgba(0,0,0,.7))}
.part.dragging{opacity:0}
.part.gone{display:none}
.part:active{filter:drop-shadow(0 0 5px rgba(240,203,112,.6)) brightness(1.06)}


#tabs{
  grid-row:6;display:flex;gap:1.2cqw;padding:.6cqw 1.6cqw .8cqw;
  pointer-events:auto;background:#0d0a08;border-top:1px solid #000;
  box-shadow:0 -3px 8px rgba(0,0,0,.8);
  z-index:20;
}
.tab{
  flex:1 1 0;min-width:0;position:relative;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2%;
  background:url('img/tab.webp') center/100% 100% no-repeat,#24201b;
  padding:.3cqw .2cqw;overflow:hidden;
}
.tab .ic{height:32%;max-height:24px;width:auto;min-height:9px;object-fit:contain;opacity:.72;filter:sepia(.25) brightness(1.05)}
.tab .lock{position:absolute;top:7%;right:7%;width:9%;max-width:10px;min-width:6px;height:auto;opacity:.62;filter:brightness(1.1)}
.tab span{
  font-family:'DPA Stencil';font-weight:700;
  font-size:max(6.5px,1.65cqw);line-height:.95;letter-spacing:.015em;
  text-transform:uppercase;color:#8e8475;white-space:nowrap;overflow:hidden;
}
.tab.active{background-image:url('img/tab_active.webp');filter:drop-shadow(0 0 8px rgba(224,163,74,.35))}
.tab.active .ic{opacity:1;filter:brightness(.32) contrast(1.2)}
.tab.active span{color:#24190c;text-shadow:0 1px 0 rgba(255,235,190,.22)}
.tab.active .lock{display:none}
.tab:active{transform:translateY(1px)}


#card{
  position:absolute;left:max(4px,1cqw);top:15.7%;
  width:16%;aspect-ratio:74/200;
  background:url('img/rail_card.webp') center/100% 100% no-repeat;
  filter:drop-shadow(0 6px 7px rgba(0,0,0,.8));
  z-index:12;pointer-events:none;
}
#cardPhoto{
  position:absolute;left:10%;top:6%;width:80%;height:32%;
  object-fit:cover;object-position:center 52%;
  box-shadow:inset 0 0 10px rgba(0,0,0,.8),0 0 0 1px rgba(0,0,0,.8);
  filter:saturate(1.06) contrast(1.07) brightness(1.05);
}
.cardText{
  position:absolute;left:9.5%;right:8%;top:42.6%;height:14.5%;
  display:flex;flex-direction:column;justify-content:center;gap:.1em;
  font-family:'DPA Stencil';line-height:1;overflow:hidden;
}
.cardText div{display:flex;flex-direction:column;gap:0;min-width:0}
.cardText .pre{font-size:max(5px,1.25cqw);color:#c3b49a;letter-spacing:.06em;line-height:1.05}
.cardText b{font-weight:700;font-size:max(7.5px,1.8cqw);color:#f2e6d2;letter-spacing:.015em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cardText #custJob{color:#e4cb92;font-size:max(7px,1.7cqw)}
.slots{position:absolute;left:9%;right:7%;top:58%;height:30%;display:flex;flex-direction:column;justify-content:space-between}
.slots i{position:relative;height:28%;display:flex;align-items:center;padding-left:12%}
.slots i::before{
  content:"";width:7px;height:4px;border-left:2px solid var(--gold-hi);border-bottom:2px solid var(--gold-hi);
  transform:rotate(-45deg) scale(.55);opacity:0;transition:.25s;
  filter:drop-shadow(0 0 4px rgba(240,211,138,.9));
}
.slots i.done::before{opacity:1;transform:rotate(-45deg) scale(1)}


#hint{
  position:absolute;left:50%;top:56.1%;transform:translateX(-50%) rotate(-.35deg);
  width:76%;max-width:520px;height:5.6%;
  display:flex;align-items:center;justify-content:center;
  padding:0 2%;
  background:
    linear-gradient(180deg,rgba(255,250,232,.22),rgba(80,54,28,.2)),
    linear-gradient(180deg,#e4d4ae,#bea478 62%,#9b7f55);
  background-size:auto,auto;
  border:1px solid #231a0f;
  box-shadow:0 4px 11px rgba(0,0,0,.62),inset 0 1px 0 rgba(255,250,230,.35);
  color:#291d10;font-family:'DPA Stencil';font-weight:700;
  font-size:max(8.5px,2.0cqw);letter-spacing:.035em;text-transform:uppercase;
  text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  text-shadow:0 1px 0 rgba(255,245,222,.4);
  z-index:13;pointer-events:auto;
  transition:box-shadow .2s,border-color .2s;
}
#hint::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;
  background:linear-gradient(180deg,var(--gold-hi),#8e5c21);
}
#hint::after{
  content:"";position:absolute;left:7%;right:7%;top:-3px;height:6px;
  background:rgba(208,192,156,.5);border:1px solid rgba(68,48,22,.4);
  transform:rotate(.4deg);
}
#hint.action{
  border-color:rgba(151,104,37,.8);
  box-shadow:0 0 16px rgba(224,163,74,.35),0 4px 11px rgba(0,0,0,.62),inset 0 1px 0 rgba(255,250,230,.4);
  animation:hintPulse 1.8s ease-in-out infinite;
}
@keyframes hintPulse{
  0%,100%{box-shadow:0 0 8px rgba(224,163,74,.18),0 4px 11px rgba(0,0,0,.62),inset 0 1px 0 rgba(255,250,230,.38)}
  50%{box-shadow:0 0 22px rgba(224,163,74,.55),0 4px 11px rgba(0,0,0,.62),inset 0 1px 0 rgba(255,250,230,.45)}
}


#trunkHit{
  position:absolute;display:none;z-index:11;pointer-events:none;
  border:1px solid rgba(239,198,112,.36);
  border-radius:6px;
  background:radial-gradient(ellipse at 50% 55%,rgba(239,198,112,.17),transparent 68%);
  box-shadow:0 0 26px rgba(239,198,112,.28),inset 0 0 22px rgba(239,198,112,.18);
  opacity:0;transition:opacity .12s;
}
#trunkHit.on{display:block;opacity:1}
#trunkHit.over{border-color:rgba(255,224,150,.85);box-shadow:0 0 40px rgba(239,198,112,.55),inset 0 0 30px rgba(239,198,112,.35)}


#gainPanel{
  position:absolute;left:2%;top:70%;width:96%;height:20%;
  display:none;flex-direction:column;justify-content:space-between;
  padding:1.1% 2.6% 1.2%;
  background:url('img/hud_plate.webp') center/100% 100% no-repeat,#1c1712;
  border:1px solid #060504;
  box-shadow:0 -8px 24px rgba(0,0,0,.8),inset 0 0 26px rgba(0,0,0,.55);
  z-index:40;pointer-events:auto;
}
#gainPanel.open{display:flex}
.gTop{display:flex;align-items:baseline;gap:2%;font-family:'DPA Stencil';text-transform:uppercase;line-height:1}
.gLabel{font-size:max(8px,1.65cqw);color:#b7aa93;letter-spacing:.07em}
#gainOut{font-size:max(15px,3.5cqw);font-weight:700;color:var(--gold-hi);margin-left:auto;text-shadow:0 1px 0 #000}
#gainStatus{font-size:max(8px,1.55cqw);font-weight:700;letter-spacing:.06em;padding-left:2%;min-width:22%}
#gainStatus.clean{color:#a9c46c}
#gainStatus.hot{color:#e0a34a}
#gainStatus.clip{color:#e65a3b;text-shadow:0 0 8px rgba(230,90,59,.6)}
#gainStatus.low{color:#a99e8c}
.meter{position:relative;height:6px;margin:.2cqw 0;background:linear-gradient(90deg,#3f4b2c,#799345 36%,#b8973e 61%,#bd5c2c 83%,#a5261b);border:1px solid #000;box-shadow:inset 0 1px 0 rgba(255,255,255,.14)}
#gainZone{position:absolute;top:-3px;bottom:-3px;border-left:2px solid #f0d38a;border-right:2px solid #f0d38a;box-shadow:0 0 5px rgba(240,211,138,.4)}
#gainMarker{position:absolute;top:-4px;bottom:-4px;width:3px;background:#fff3d4;box-shadow:0 0 7px #fff3d4;transition:left .05s linear}
#gain{
  width:100%;height:32px;background:transparent;-webkit-appearance:none;appearance:none;margin:0;
  touch-action:pan-x;
}
#gain::-webkit-slider-runnable-track{height:7px;background:#0a0705;border:1px solid #000;box-shadow:inset 0 2px 4px #000}
#gain::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:26px;height:26px;margin-top:-10px;border-radius:50%;
  background:radial-gradient(circle at 35% 28%,#f7dda0,#c69644 52%,#63411c 100%);
  border:2px solid #241607;box-shadow:0 2px 4px #000,inset 0 1px 0 #ffedc2;cursor:grab;
}
#gain::-moz-range-track{height:7px;background:#0a0705;border:1px solid #000}
#gain::-moz-range-thumb{width:24px;height:24px;border-radius:50%;background:radial-gradient(circle at 35% 28%,#f7dda0,#c69644 52%,#63411c 100%);border:2px solid #241607;box-shadow:0 2px 4px #000}
.gBtns{display:flex;gap:2%;align-items:stretch}
.gold{
  flex:1 1 auto;display:flex;align-items:center;justify-content:center;
  min-height:38px;padding:.6cqw 1.6cqw;
  background:linear-gradient(180deg,#f3d38a,#cb9c4e 55%,#9a6a2b);
  color:#201407;font-family:'DPA Stencil';font-weight:700;
  font-size:max(9px,1.9cqw);letter-spacing:.05em;text-transform:uppercase;
  border:1px solid #160d04;box-shadow:0 2px 0 #120b03,inset 0 1px 0 #ffe9b8,0 0 14px rgba(224,163,74,.2);
  text-shadow:0 1px 0 rgba(255,240,200,.35);
}
.gold:active{transform:translateY(2px);box-shadow:0 0 0 #120b03,inset 0 1px 0 #ffe9b8;filter:brightness(1.07)}
.gold:disabled{filter:grayscale(.5) brightness(.6);box-shadow:none}
.small{
  flex:0 0 22%;display:flex;align-items:center;justify-content:center;
  min-height:38px;padding:.4cqw 2%;
  background:linear-gradient(180deg,#3a2f24,#17110c);
  border:1px solid #060403;color:#b8ab96;
  font-family:'DPA Stencil';font-weight:700;font-size:max(8px,1.5cqw);letter-spacing:.06em;text-transform:uppercase;
  box-shadow:0 2px 0 #070503,inset 0 1px 0 rgba(255,220,160,.16);
}
.small:active{transform:translateY(1px)}
#testBtn.testing{filter:brightness(1.15);animation:testPulse .8s ease-in-out infinite}
@keyframes testPulse{0%,100%{box-shadow:0 0 10px rgba(224,163,74,.3)}50%{box-shadow:0 0 26px rgba(240,200,120,.75)}}


#resultPanel{
  position:absolute;left:2.5%;top:70%;width:95%;height:20%;
  display:none;flex-direction:column;align-items:center;justify-content:center;gap:1.1cqw;
  padding:1.4% 4%;text-align:center;
  background:
    linear-gradient(180deg,rgba(26,17,10,.64),rgba(14,9,6,.86)),
    url('img/stone.webp') center/100% 100% no-repeat,#2a231c;
  border:1px solid #050403;
  box-shadow:0 -8px 26px rgba(0,0,0,.85),inset 0 0 34px rgba(0,0,0,.5);
  z-index:50;pointer-events:auto;
}
#resultPanel.open{display:flex}
.resHead{
  font-family:'DPA Stencil';font-weight:700;
  font-size:max(17px,4.3cqw);line-height:1;letter-spacing:.06em;text-transform:uppercase;
  color:#f4d792;text-shadow:0 2px 0 #000,0 0 12px rgba(240,200,120,.35);
}
.resStats{display:flex;gap:4.5%;justify-content:center;align-items:baseline;font-family:'DPA Stencil';font-size:max(9.5px,2.2cqw);letter-spacing:.04em;color:#ecdcc3;text-transform:uppercase;text-shadow:0 1px 0 #000}
.resStats span{white-space:nowrap}
#resPay{color:var(--money)}
#resRep{color:var(--gold-hi)}
.resSub{font-family:'Barlow Condensed';font-weight:600;font-size:max(8.5px,1.8cqw);letter-spacing:.05em;color:#cbbda5;text-transform:uppercase;text-shadow:0 1px 0 #000}
#nextBtn{flex:0 0 auto;width:72%;max-width:360px;height:40px;min-height:40px;font-size:max(10px,2.15cqw)}


#clipWarn{
  position:absolute;right:3%;top:17%;z-index:20;display:none;pointer-events:none;
  padding:.7cqw 1.8cqw;transform:rotate(-2.5deg);
  background:rgba(30,5,2,.72);border:2px solid #d74a2e;
  color:#ff6e4d;font-family:'DPA Stencil';font-weight:700;
  font-size:max(10px,2.4cqw);letter-spacing:.08em;
  text-shadow:0 0 10px rgba(255,70,40,.7);box-shadow:0 0 22px rgba(215,74,46,.35);
  animation:clipBlink .32s steps(2) infinite;
}
#clipWarn.on{display:block}
@keyframes clipBlink{0%,100%{opacity:.95}50%{opacity:.45}}
#speech{
  position:absolute;z-index:14;pointer-events:none;opacity:0;
  transform:translate(-50%,-100%) rotate(-2deg);
  padding:.5cqw 1.4cqw;background:rgba(12,8,6,.86);
  border-left:2px solid var(--gold);
  color:#f2e6cf;font-family:'DPA Stencil';font-weight:700;
  font-size:max(8px,1.7cqw);letter-spacing:.06em;text-transform:uppercase;
  transition:opacity .18s;white-space:nowrap;
}
#speech.show{opacity:1}
#spray{
  position:absolute;z-index:62;pointer-events:none;opacity:0;
  transform:translate(-50%,-50%) rotate(-3deg);
  padding:.5cqw 1.4cqw;
  background:rgba(9,7,5,.7);border-left:2px solid var(--gold);
  color:#f4e8d2;font-family:'DPA Stencil';font-weight:700;
  font-size:max(9px,1.9cqw);letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;
  text-shadow:0 1px 0 #000;transition:opacity .18s;
}
#spray.show{opacity:1}
#ghost{
  position:fixed;z-index:100;display:none;pointer-events:none;
  transform:translate(-50%,-50%) rotate(0deg);
  transform-origin:50% 70%;
  filter:drop-shadow(0 12px 10px rgba(0,0,0,.72));
  will-change:left,top,transform;
}
#ghost.back{transition:left .24s ease-out,top .24s ease-out,width .24s,height .24s,opacity .24s,transform .24s}
#wireSag{position:fixed;inset:0;width:100%;height:100%;z-index:90;pointer-events:none;display:none;overflow:visible}
#wireSag.on{display:block}
#wirePath{filter:drop-shadow(0 2px 2px rgba(0,0,0,.8))}
#cashFly{position:fixed;z-index:70;display:none;pointer-events:none;width:34px;height:auto;filter:drop-shadow(0 4px 6px rgba(0,0,0,.8))}
#cashFly img{width:100%;height:auto}
.cashFloat{
  position:absolute;z-index:65;pointer-events:none;
  font-family:'DPA Stencil';font-weight:700;font-size:max(13px,3cqw);
  color:#cfe08f;text-shadow:0 2px 0 #000,0 0 10px rgba(160,200,90,.5);
  animation:cashUp 1.15s ease-out forwards;
}
@keyframes cashUp{
  0%{opacity:0;transform:translate(-50%,0) scale(.7)}
  18%{opacity:1}
  100%{opacity:0;transform:translate(-50%,-46px) scale(1.05)}
}


@media (max-width:420px){
  .hudg.job b{font-size:max(7px,1.7cqw)}
  .hudg{gap:.35cqw}
  #hud{gap:.7cqw;padding:0 1.8cqw}
  .cardText .pre{font-size:5px}
  .cardText b{font-size:6px}
  #hint{font-size:max(7.5px,1.8cqw)}
  #actions .plaque span{font-size:max(6.5px,1.6cqw)}
}
@media (max-height:520px){
  #hint{top:53.5%;height:6.6%}
  #actions{gap:1cqw}
}
@media (prefers-reduced-motion:reduce){
  #grain{animation:none}
  #hint.action,.plaque.pulse,#clipWarn{animation:none}
}


/* CAR LOT + BASS BATTLES */
.viewPanel{
  position:absolute;left:0;right:0;top:15.1%;bottom:10%;z-index:30;
  display:none;flex-direction:column;overflow:hidden;pointer-events:auto;
  background:
    linear-gradient(180deg,rgba(9,6,4,.38),rgba(9,6,4,.9)),
    url('img/steel_tile.webp') center/cover no-repeat,#171310;
  border-top:1px solid #000;border-bottom:1px solid #000;
  box-shadow:inset 0 0 70px rgba(0,0,0,.85);
  touch-action:pan-y;
}
.viewPanel.active{display:flex}
#app.viewing #game,#app.viewing .sceneShade,#app.viewing #heat{visibility:hidden}
.viewPanel::after{
  content:"";position:absolute;inset:0;z-index:5;pointer-events:none;
  background:url('img/noise.png') repeat;background-size:128px 128px;
  opacity:.05;mix-blend-mode:overlay;
}
.viewHead{
  position:relative;z-index:6;flex:0 0 auto;
  padding:2.6% 4% 2.2%;
  background:linear-gradient(180deg,rgba(40,29,19,.94),rgba(16,11,8,.72));
  border-bottom:1px solid #050403;
  box-shadow:0 3px 0 rgba(224,163,74,.16),0 5px 14px rgba(0,0,0,.55);
}
.vKicker{
  font-family:'Barlow Condensed';font-weight:700;font-size:max(7px,1.45cqw);
  letter-spacing:.2em;color:#c08b45;text-transform:uppercase;
}
.viewHead h2{
  font-family:'DPA Stencil';font-weight:700;
  font-size:max(21px,5.3cqw);line-height:.92;letter-spacing:.02em;
  color:#f2d894;text-transform:uppercase;
  text-shadow:0 2px 0 #000,0 0 14px rgba(224,163,74,.28);
}
.viewHead p{
  margin-top:.5em;font-family:'Barlow Condensed';font-weight:600;
  font-size:max(8.5px,1.95cqw);letter-spacing:.06em;color:#b6a68d;text-transform:uppercase;
}
.viewBody{
  position:relative;z-index:6;flex:1 1 auto;min-height:0;overflow-y:auto;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  padding:2.4% 3.2% 6%;
  display:flex;flex-direction:column;gap:2.4%;
  scrollbar-width:thin;scrollbar-color:#5b4327 #140f0b;
}
.viewBody::-webkit-scrollbar{width:7px}
.viewBody::-webkit-scrollbar-track{background:#140f0b}
.viewBody::-webkit-scrollbar-thumb{background:#5b4327;border:1px solid #000}
.viewMsg{
  flex:0 0 auto;padding:1.5% 2.4%;border-left:3px solid var(--gold);
  background:rgba(0,0,0,.34);box-shadow:inset 0 0 12px rgba(0,0,0,.5);
  font-family:'Barlow Condensed';font-weight:600;
  font-size:max(8.5px,1.9cqw);line-height:1.2;letter-spacing:.045em;
  color:#d9c9ab;text-transform:uppercase;
}
.viewMsg.win{border-left-color:#a9c46c;color:#d6e6a6}
.viewMsg.lose{border-left-color:#c9563a;color:#f0b39f}
.boxHead{
  display:flex;align-items:baseline;justify-content:space-between;gap:2%;
  margin-bottom:.8em;padding-bottom:.35em;border-bottom:1px solid rgba(224,163,74,.22);
}
.boxHead span{
  font-family:'DPA Stencil';font-weight:700;font-size:max(10px,2.35cqw);
  letter-spacing:.06em;color:#e8d2a4;text-transform:uppercase;
}
.boxHead b{
  font-family:'Barlow Condensed';font-weight:700;font-size:max(7.5px,1.6cqw);
  letter-spacing:.12em;color:#9b8b74;text-transform:uppercase;
}
.garageBox,.lotBox,.rivalBox{flex:0 0 auto}
.garageList,.carList{display:flex;flex-direction:column;gap:2.6%}
.carCard{
  display:grid;grid-template-columns:33% 1fr;grid-template-rows:auto auto;
  column-gap:3%;row-gap:1.4%;align-items:start;
  padding:1.7%;
  background:
    linear-gradient(180deg,rgba(255,244,224,.06),rgba(0,0,0,.24)),
    url('img/stone.webp') center/100% 100% no-repeat,#2a231c;
  border:1px solid #0a0705;
  box-shadow:0 2px 0 #070503,0 5px 12px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,230,180,.12);
}
.carShot{
  grid-row:1 / span 2;width:100%;height:100%;min-height:66px;
  aspect-ratio:16/10;object-fit:cover;object-position:center 58%;
  border:1px solid #050403;filter:saturate(1.04) contrast(1.03) brightness(1.02);
  box-shadow:0 2px 5px rgba(0,0,0,.7),inset 0 0 12px rgba(0,0,0,.35);
}
.carInfo{min-width:0}
.carName{
  font-family:'DPA Stencil';font-weight:700;font-size:max(11px,2.55cqw);
  line-height:1;letter-spacing:.02em;color:#f3e5ca;text-transform:uppercase;
  text-shadow:0 1px 0 #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.carMeta{
  margin-top:.28em;font-family:'Barlow Condensed';font-weight:600;
  font-size:max(7.5px,1.6cqw);letter-spacing:.07em;color:#a99982;text-transform:uppercase;
}
.carStats{
  display:flex;gap:4%;flex-wrap:wrap;margin-top:.4em;
  font-family:'Barlow Condensed';font-weight:700;font-size:max(8px,1.75cqw);
  letter-spacing:.04em;text-transform:uppercase;text-shadow:0 1px 0 #000;
}
.carStats .ask{color:#e6c274}
.carStats .flip{color:var(--money)}
.carStats .built{color:#9fc4e0}
.carActions{display:flex;flex-wrap:wrap;gap:1.6%;min-width:0}
.vBtn{
  flex:1 1 30%;min-width:0;min-height:28px;padding:.35em .5em;
  display:flex;align-items:center;justify-content:center;text-align:center;
  background:linear-gradient(180deg,#f0cf86,#c19245 58%,#8d6127);
  border:1px solid #160d04;box-shadow:0 2px 0 #120b03,inset 0 1px 0 #ffe9b8;
  color:#201407;font-family:'DPA Stencil';font-weight:700;
  font-size:max(7.5px,1.55cqw);line-height:1;letter-spacing:.03em;
  text-transform:uppercase;text-shadow:0 1px 0 rgba(255,240,200,.3);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.vBtn.steel{
  background:linear-gradient(180deg,#4a3c2d,#241c14 62%,#120d09);
  border-color:#050403;color:#cdbfa9;
  box-shadow:0 2px 0 #070503,inset 0 1px 0 rgba(255,220,160,.18);
}
.vBtn:active{transform:translateY(1px);filter:brightness(1.08)}
.vBtn:disabled{filter:grayscale(.7) brightness(.55);box-shadow:none;transform:none}
.vBtn.done{background:linear-gradient(180deg,#3d4b30,#26301f);border-color:#0a0d07;color:#a9bd86;box-shadow:inset 0 1px 0 rgba(190,220,150,.15)}
.garageEmpty{
  padding:3% 2%;border:1px dashed rgba(224,163,74,.26);
  font-family:'Barlow Condensed';font-weight:600;font-size:max(8px,1.75cqw);
  letter-spacing:.06em;color:#9c8d77;text-transform:uppercase;text-align:center;
}
.trophyStrip{display:flex;gap:2%;flex:0 0 auto}
.trophyStrip div{
  flex:1 1 0;min-width:0;padding:2.4% 1.6%;text-align:center;
  background:url('img/stone.webp') center/100% 100% no-repeat,#2a231c;
  border:1px solid #090605;box-shadow:0 2px 0 #070503,inset 0 1px 0 rgba(255,230,180,.12);
}
.trophyStrip span{
  display:block;font-family:'Barlow Condensed';font-weight:600;font-size:max(6.5px,1.35cqw);
  letter-spacing:.12em;color:#a3947d;text-transform:uppercase;
}
.trophyStrip b{
  display:block;margin-top:.25em;font-family:'DPA Stencil';font-weight:700;
  font-size:max(12px,2.7cqw);line-height:1;color:var(--gold-hi);
  text-transform:uppercase;text-shadow:0 1px 0 #000;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.eventList{display:flex;flex-direction:column;gap:2.4%;flex:0 0 auto}
.eventCard{
  display:grid;grid-template-columns:1fr auto;column-gap:3%;row-gap:1%;
  align-items:center;padding:2%;
  background:
    linear-gradient(180deg,rgba(255,244,224,.05),rgba(0,0,0,.26)),
    url('img/stone.webp') center/100% 100% no-repeat,#2a231c;
  border:1px solid #0a0705;
  box-shadow:0 2px 0 #070503,0 5px 12px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,230,180,.1);
}
.eventCard.locked{filter:brightness(.82)}
.eventName{
  font-family:'DPA Stencil';font-weight:700;font-size:max(11px,2.5cqw);
  line-height:1;color:#f3e5ca;text-transform:uppercase;text-shadow:0 1px 0 #000;
}
.eventMeta{
  margin-top:.3em;font-family:'Barlow Condensed';font-weight:600;
  font-size:max(7.5px,1.6cqw);letter-spacing:.06em;color:#a99982;text-transform:uppercase;
}
.eventMeta b{color:#e3c079;font-weight:700}
.eventReq{
  margin-top:.2em;font-family:'Barlow Condensed';font-weight:600;
  font-size:max(7px,1.5cqw);letter-spacing:.05em;color:#8d806c;text-transform:uppercase;
}
.eventReq.ready{color:#a9c46c}
.eventCard .vBtn{flex:0 0 auto;min-width:31%;min-height:34px;font-size:max(8px,1.7cqw)}
.rivals{list-style:none;display:flex;flex-direction:column;gap:1px;background:#0b0806;border:1px solid #050403}
.rivals li{
  display:flex;align-items:center;gap:3%;padding:1.1% 2%;
  background:rgba(34,27,20,.86);
  font-family:'Barlow Condensed';font-weight:600;font-size:max(8px,1.75cqw);
  letter-spacing:.05em;color:#b7a88f;text-transform:uppercase;
}
.rivals li:nth-child(odd){background:rgba(27,21,15,.86)}
.rivals li .rank{
  font-family:'DPA Stencil';font-weight:700;color:#c59747;font-size:max(9px,2cqw);
  min-width:1.4em;
}
.rivals li .who{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rivals li .rp{color:#e0c07a;font-weight:700;white-space:nowrap}
.rivals li.me{background:rgba(62,48,25,.9);color:#f0dfbd}
.rivals li.me .rank,.rivals li.me .rp{color:#f0d38a}

@media (max-width:390px){
  .carName{font-size:max(10px,2.9cqw)}
  .vBtn{font-size:max(7px,1.75cqw);min-height:26px}
  .eventCard .vBtn{min-width:30%}
  .carCard{grid-template-columns:31% 1fr}
}
@media (min-width:600px){
  .carCard{grid-template-columns:26% 1fr}
  .carList,.garageList{gap:1.4%}
}

#app.viewing #card,#app.viewing #hint,#app.viewing #actions,#app.viewing #tray,
#app.viewing #trunkHit,#app.viewing #clipWarn,#app.viewing #speech{visibility:hidden}
