/* Individual phone apps (see js/phone/apps/). Scope app-only rules with #screen[data-app=<id>]
   when a class name could clash. The look is the Sticker Street kit's (css/kit/, --gd-* tokens). */

.statusbar { position: absolute; top: 18px; left: 34px; right: 34px; display: flex; justify-content: space-between; font: 700 13px/1 var(--gd-font); z-index: 4; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
#screen[data-app="lock"] { background: radial-gradient(circle at 30% 10%, rgba(255, 224, 102, .5), transparent 45%), linear-gradient(165deg, #ff8a4a, #e8452f 55%, #5a2a8a); color: #fff; }
#screen[data-app="home"] { background: radial-gradient(circle at 20% 15%, rgba(255, 224, 102, .5), transparent 40%), linear-gradient(165deg, #ff9a4a, #e8452f 55%, #b02a1a); color: #fff; }
.lock { display: flex; flex-direction: column; align-items: center; height: 100%; }
.lockTime { font: 300 64px/1 var(--gd-font); margin-top: 30px; text-shadow: 3px 3px 0 rgba(0, 0, 0, .2); }
.lockDate { font: 600 14px/1.3 var(--gd-font); margin-top: 4px; }
.lockNote { margin-top: 36px; width: 100%; display: flex; gap: 10px; align-items: center; background: #fff; color: var(--gd-ink); padding: 10px 12px; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); cursor: pointer; animation: noteIn .5s .3s both cubic-bezier(.2,1.5,.4,1); }
.lockNote img { width: 40px; height: 40px; border-radius: 12px; background: var(--gd-app-red); padding: 3px; border: var(--gd-line) solid var(--gd-ink); box-shadow: 2px 2px 0 var(--gd-ink); flex: none; }
.lockNote div { display: flex; flex-direction: column; font: 500 12.5px/1.3 var(--gd-font); }
.unlock { margin-top: auto; margin-bottom: 10px; background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 5px 14px 5px 6px; font: 700 13.5px/1 var(--gd-font); text-transform: uppercase; letter-spacing: .03em; display: flex; align-items: center; gap: 8px; animation: gd-breathe 1.6s infinite; cursor: pointer; }
.home { display: flex; flex-direction: column; height: 100%; }
.wall { font: 700 26px/1.05 var(--gd-font); margin: 6px 4px 18px; text-shadow: 2px 2px 0 rgba(0,0,0,.2); text-wrap: balance; }
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 6px; justify-items: center; }
.appIcon { background: none; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; cursor: pointer; }
.appIcon small { font: 600 11.5px/1 var(--gd-font); text-shadow: 0 1px 3px rgba(0,0,0,.4); }
/* app tiles: one flat color, an ink outline and a hard shadow */
.ai { --c: var(--gd-app-red); position: relative; width: 62px; height: 62px; border-radius: 17px; display: flex; align-items: center; justify-content: center; background: var(--c); border: var(--gd-line) solid var(--gd-ink); box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); transition: transform .06s, box-shadow .06s; }
.appIcon:hover .ai { transform: translate(-1px, -1px); box-shadow: calc(var(--gd-sh) + 1px) calc(var(--gd-sh) + 1px) 0 var(--gd-ink); }
.appIcon:active .ai { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--gd-ink); }
.ai img { width: 88%; height: 88%; object-fit: contain; image-rendering: auto; }
.ai img[src^="data:image/svg+xml"] { width: 64%; height: 64%; } /* (the kit's flat icons: game/visuals.js makeIcons) */
.ai.red { --c: var(--gd-app-red); }
.ai.blue { --c: var(--gd-app-blue); }
.ai.green { --c: var(--gd-app-green); }
.ai.purple { --c: var(--gd-app-purple); }
.ai.gray { --c: #e3e6ee; }
.ai.gray img { width: 70%; height: 70%; }
.ai.dark { --c: var(--gd-app-dark); }
.ai.orange { --c: var(--gd-app-orange); }
.ai.pink { --c: var(--gd-app-pink); }
.ai.steel { --c: var(--gd-app-steel); }
.ai.angel { --c: var(--gd-app-angel); }
.ai.race { --c: var(--gd-app-race); }
.appbar.race { --c: var(--gd-app-race); }
.badge { position: absolute; top: -9px; right: -9px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--gd-red); color: #fff; font: 700 11.5px/1 var(--gd-font); font-style: normal; display: flex; align-items: center; justify-content: center; border: 2px solid var(--gd-ink); animation: pop 1s infinite; }
.dock { margin-top: auto; background: rgba(255,255,255,.55); border: var(--gd-line) solid var(--gd-ink); border-radius: 26px; box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 10px; display: flex; justify-content: space-around; }
.dock .ai { width: 54px; height: 54px; border-radius: 15px; box-shadow: 3px 3px 0 var(--gd-ink); }
/* status tags (online, offline...): a tilted sticker */
.status { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border: 2px solid var(--gd-ink); border-radius: var(--gd-r-xs); box-shadow: 2px 2px 0 var(--gd-ink); background: var(--gd-gray); color: var(--gd-ink); font: 700 11px/1.4 var(--gd-font); text-transform: uppercase; letter-spacing: .05em; transform: rotate(-4deg); white-space: nowrap; }
.status.on { background: var(--gd-green); }
.gdHero { text-align: center; padding: 10px 6px; }
.gdHero img { width: 110px; height: 110px; }
.gdHero h3 { margin: 6px 0; font: 700 20px/1.1 var(--gd-font); text-transform: uppercase; }
.gdHero p { margin: 0; color: var(--gd-mute); font: 500 13px/1.35 var(--gd-font); }
.gdStats { display: flex; gap: 8px; margin-top: 16px; }
/* number cards (Grub Dash's stats, Profile) */
.gdStats div, .grid2 div { flex: 1; background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 8px 4px; text-align: center; }
.gdStats b, .grid2 b { display: block; font: 700 20px/1.1 var(--gd-font); font-variant-numeric: tabular-nums; }
.gdStats small, .grid2 small { color: var(--gd-mute); font: 700 10px/1 var(--gd-font); text-transform: uppercase; letter-spacing: .06em; }
/* "Looking for orders": rings going out from a red dot */
.radar { position: relative; width: 90px; height: 90px; margin: 16px auto; border-radius: 50%; }
.radar::after { content: ''; position: absolute; inset: 27px; border-radius: 50%; background: var(--gd-red); border: var(--gd-line) solid var(--gd-ink); }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: var(--gd-line) solid var(--gd-red); animation: gd-radar 2s infinite ease-out; }
.radar i:last-child { animation-delay: 1s; }
.offer { background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 11px 12px; animation: noteIn .35s cubic-bezier(.2,1.5,.4,1); }
.offerTop { display: flex; justify-content: space-between; align-items: center; }
.offerTop .pill { display: inline-flex; align-items: center; padding: 2px 9px; border: 2px solid var(--gd-ink); border-radius: var(--gd-r-xs); box-shadow: 2px 2px 0 var(--gd-ink); background: var(--gd-red); color: #fff; font: 700 11px/1.4 var(--gd-font); text-transform: uppercase; letter-spacing: .05em; transform: rotate(-4deg); }
.expire { font: 700 12px/1 var(--gd-font); color: var(--gd-mute); }
/* the pay: a green money sticker */
.pay { display: inline-block; margin: 6px 0; padding: 1px 10px; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-sm); box-shadow: 2px 2px 0 var(--gd-ink); background: var(--gd-green); color: var(--gd-ink); font: 700 30px/1.2 var(--gd-font); font-variant-numeric: tabular-nums; transform: rotate(-2deg); white-space: nowrap; }
.pay small { font-size: 13px; color: var(--gd-ink); font-weight: 600; opacity: .75; }
.rest, .cust { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 2px dashed rgba(27, 29, 36, .18); }
.rest img { width: 46px; height: 46px; border-radius: 11px; background: #ffe1da; border: var(--gd-line) solid var(--gd-ink); flex: none; }
.rest div, .cust div { display: flex; flex-direction: column; font: 500 14px/1.25 var(--gd-font); }
.rest span, .cust span { color: var(--gd-mute); font-size: 12.5px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gd-purple); color: #fff; font: 700 17px/1 var(--gd-font); display: flex; align-items: center; justify-content: center; flex: none; border: var(--gd-line) solid var(--gd-ink); box-shadow: 2px 2px 0 var(--gd-ink); }
.items { margin: 4px 0 8px; padding-left: 18px; font: 500 14px/1.3 var(--gd-font); }
.items li { margin: 2px 0; }
.items.small { font-size: 13px; color: var(--gd-mute); }
.meta { display: flex; gap: 8px; }
.meta div { flex: 1; background: var(--gd-cream); border: 2px solid var(--gd-ink); border-radius: var(--gd-r-sm); padding: 7px 4px; text-align: center; }
.meta b { display: block; font: 700 16px/1.15 var(--gd-font); font-variant-numeric: tabular-nums; }
.meta small { color: var(--gd-mute); font: 700 10px/1 var(--gd-font); text-transform: uppercase; letter-spacing: .05em; }
.active { background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 11px 12px; }
/* the order's clock: a big number on a mustard sticker (white when paused) */
.timerBig { text-align: center; padding: 6px 8px 8px; background: var(--gd-mustard); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); box-shadow: 2px 2px 0 var(--gd-ink); font: 700 46px/1 var(--gd-font); font-variant-numeric: tabular-nums; }
.timerBig small { display: block; margin-top: 3px; font: 700 10.5px/1.2 var(--gd-font); text-transform: uppercase; letter-spacing: .06em; color: var(--gd-ink); opacity: .7; }
.timerBig.paused { background: #fff; color: var(--gd-mute); }
.steps { margin: 8px 0; }
.step { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; opacity: .45; }
.step.cur { opacity: 1; }
.step.done { opacity: .55; text-decoration: line-through; }
.step i { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: var(--gd-line) solid var(--gd-ink); margin-top: 1px; flex: none; }
.step.cur i { background: var(--gd-red); box-shadow: 0 0 0 4px rgba(232, 69, 47, .25); }
.step.done i { background: var(--gd-green); }
.step div { display: flex; flex-direction: column; font: 700 13.5px/1.2 var(--gd-font); }
.step span { color: var(--gd-mute); font: 500 11.5px/1.3 var(--gd-font); }
.mapWrap { position: relative; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); overflow: hidden; }
#bigMap { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 8px 2px; font: 600 11.5px/1 var(--gd-font); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--gd-ink); margin-right: 4px; vertical-align: -2px; }
.balance { background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 16px; text-align: center; margin-bottom: 10px; }
.balance small { color: var(--gd-mute); font: 700 11px/1.2 var(--gd-font); text-transform: uppercase; letter-spacing: .1em; }
.balance b { display: block; font: 700 38px/1.15 var(--gd-font); font-variant-numeric: tabular-nums; }
.profile { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 12px; }
.profile img { width: 96px; height: 96px; border-radius: 50%; background: #e9e3ff; border: var(--gd-line) solid var(--gd-ink); box-shadow: 4px 4px 0 var(--gd-ink); }
.profile b { font: 700 20px/1.2 var(--gd-font); margin-top: 8px; }
.profile span { color: var(--gd-mute); font-size: 13px; }
.rating { color: var(--gd-gold); font-size: 20px; margin-top: 4px; }
.rating small { color: var(--gd-mute); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* the controls list: dashed lines between the rows */
.help h4 { margin: 12px 0 6px; font: 700 12px/1.2 var(--gd-font); text-transform: uppercase; letter-spacing: .08em; }
.hk { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 6px 0; margin: 0; font: 600 12.5px/1.2 var(--gd-font); }
.hk + .hk { border-top: 2px dashed rgba(27, 29, 36, .14); }
.hk span { color: var(--gd-mute); margin: 0 3px; font-size: 10.5px; }
.hk em { font-style: normal; margin-left: 6px; }
.help p { font: 500 13px/1.4 var(--gd-font); color: #4a4f5c; }
/* ---------- round 2: offers, radio, settings ---------- */
.appbar .expire { font: 700 11px/1 var(--gd-font); background: var(--gd-ink); color: #fff; padding: 4px 8px; border-radius: 6px; }
.offers { display: flex; flex-direction: column; gap: 9px; margin-bottom: 8px; }
.offerRow { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); padding: 9px 10px; box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); color: var(--gd-ink); transition: transform .06s, box-shadow .06s; animation: noteIn .3s cubic-bezier(.2,1.5,.4,1); cursor: pointer; }
.offerRow:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--gd-ink); }
.offerRow:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--gd-ink); }
.offerRow img { width: 40px; height: 40px; border-radius: 11px; background: #ffe1da; border: var(--gd-line) solid var(--gd-ink); flex: none; }
.offerRow .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.offerRow .mid b { font: 700 14px/1.2 var(--gd-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offerRow .mid span { font: 500 11.5px/1.3 var(--gd-font); color: var(--gd-mute); }
.offerRow .end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.offerRow .end b { font: 700 15px/1.2 var(--gd-font); padding: 0 7px; background: var(--gd-green); color: var(--gd-ink); border: 2px solid var(--gd-ink); border-radius: var(--gd-r-xs); transform: rotate(-2deg); }
/* (how long the offer has left: a bar along the bottom) */
.offerRow .exp { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--gd-tight); border-top: 1.5px solid var(--gd-ink); transition: width .25s linear; }
/* the order's urgency (Relaxed, Tight, Rush: its color comes from the game) */
.chip { color: #fff; font: 700 10.5px/1.4 var(--gd-font); text-transform: uppercase; letter-spacing: .04em; padding: 1px 7px; border: 2px solid var(--gd-ink); border-radius: var(--gd-r-xs); white-space: nowrap; }
#offerMap { width: 100%; height: auto; display: block; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); margin-top: 8px; }
.offer .meta div { border-width: 2px; }
/* the Radio app */
.radio { display: flex; flex-direction: column; gap: 8px; }
.radio .art { position: relative; height: 170px; border-radius: var(--gd-r-lg); border: var(--gd-line) solid var(--gd-ink); box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); background: radial-gradient(circle at 30% 20%, hsl(var(--h) 90% 70%), hsl(calc(var(--h) + 40) 70% 35%)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.radio .disc { width: 124px; height: 124px; border-radius: 50%; background: repeating-radial-gradient(circle, #1b1d24 0 3px, #2b2e38 3px 5px); display: flex; align-items: center; justify-content: center; border: var(--gd-line) solid var(--gd-ink); }
.radio .disc i { width: 40px; height: 40px; border-radius: 50%; background: hsl(var(--h) 85% 60%); border: 5px solid #fff; box-shadow: 0 0 0 2px var(--gd-ink); }
.radio .disc.spin { animation: spin 3s linear infinite; }
.radio .onair { position: absolute; top: 10px; left: 10px; padding: 2px 9px; border: 2px solid var(--gd-ink); border-radius: var(--gd-r-xs); box-shadow: 2px 2px 0 var(--gd-ink); background: #fff; color: var(--gd-ink); font: 700 11px/1.4 var(--gd-font); text-transform: uppercase; letter-spacing: .05em; transform: rotate(-4deg); }
.radio .onair.on { background: var(--gd-pink); color: #fff; animation: pop 1.4s infinite; }
.radio .now { text-align: center; display: flex; flex-direction: column; }
.radio .now b { font: 700 18px/1.2 var(--gd-font); }
.radio .now span { color: var(--gd-mute); font-size: 13px; }
.radio .now .artist { align-self: center; color: var(--gd-blue); font: 600 13px/1.3 var(--gd-font); text-decoration: underline; text-underline-offset: 2px; } /* (their page on lib-music.com, in a new tab) */
.radio input[type=range] { width: 100%; accent-color: var(--gd-pink); }
.radio .times { display: flex; justify-content: space-between; font: 700 11px/1 var(--gd-font); color: var(--gd-mute); margin-top: -6px; font-variant-numeric: tabular-nums; }
.radio .controls { display: flex; justify-content: space-between; align-items: center; padding: 0 6px; }
/* round player buttons; the big play button is pink */
.rb { width: 44px; height: 44px; border-radius: 50%; border: var(--gd-line) solid var(--gd-ink); background: #fff; font-size: 18px; color: var(--gd-ink); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; transition: transform .06s; }
.rb:hover { background: var(--gd-cream); }
.rb:active { transform: translate(2px, 2px); }
.rb.on { background: #ffd1e5; }
.rb.play { width: 58px; height: 58px; font-size: 22px; background: var(--gd-pink); color: #fff; box-shadow: 3px 3px 0 var(--gd-ink); }
.rb.play:active { box-shadow: none; }
.radio .vol { display: flex; align-items: center; gap: 6px; }
.radio .replay { align-self: center; }
.tracks { background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); overflow: hidden; }
.trk { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-bottom: 2px dashed rgba(27, 29, 36, .18); background: none; padding: 9px 12px; text-align: left; color: var(--gd-ink); font: 500 13.5px/1.25 var(--gd-font); cursor: pointer; }
.trk:last-child { border-bottom: 0; }
.trk span { width: 18px; text-align: center; color: var(--gd-mute); font-weight: 700; }
.trk div { display: flex; flex-direction: column; }
.trk small { color: var(--gd-mute); }
.trk.cur { background: #ffe0ee; }
.trk.cur span, .trk.cur b { color: var(--gd-pink); }
/* the Maps app: saved places */
.pins { background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); overflow: hidden; margin-bottom: 8px; }
.pinRow { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-bottom: 2px dashed rgba(27, 29, 36, .18); background: none; padding: 9px 12px; text-align: left; color: var(--gd-ink); font: 600 13.5px/1.25 var(--gd-font); cursor: pointer; }
.pinRow:last-child { border-bottom: 0; }
.pinRow:hover, .pinRow.sel { background: #fff3c4; }
.pinRow div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pinRow div span { font: 500 11.5px/1.3 var(--gd-font); color: var(--gd-mute); }
.pinRow em { font-style: normal; color: var(--gd-mute); font-size: 20px; }
.pinDot { width: 30px; height: 30px; flex: none; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; border: var(--gd-line) solid var(--gd-ink); box-shadow: 2px 2px 0 var(--gd-ink); }
.pinDot i { transform: rotate(45deg); font: 700 13px/1 var(--gd-font); font-style: normal; color: #fff; }
.pinAsk { background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: 0 0 0 3px var(--gd-route), var(--gd-sh-sm) var(--gd-sh-sm) 0 3px var(--gd-ink); padding: 12px; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; animation: noteIn .3s cubic-bezier(.2,1.5,.4,1); }
.pinAsk > div:not(.two) { flex: 1; display: flex; flex-direction: column; font: 700 14px/1.2 var(--gd-font); }
.pinAsk > div span { font: 500 12px/1.3 var(--gd-font); color: var(--gd-mute); }
.pinAsk .two { width: 100%; }
.navNow { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--gd-route); color: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 8px 12px; margin: 8px 0; font: 700 14px/1.2 var(--gd-font); }
.areaSwitch { background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 10px; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.areaSwitch > small:first-child { font: 700 11px/1.2 var(--gd-font); text-transform: uppercase; letter-spacing: .08em; color: var(--gd-mute); }
.seg button.locked { color: #a9a08c; background: var(--gd-hatch); border: 2px dashed #b9ae94; }
/* Phone bottom: back / close, with a small tooltip */
.homebar { position: relative; width: 100%; border: 0; background: transparent; cursor: pointer; height: 30px; display: flex; align-items: center; justify-content: center; padding: 0 12px; }
.homebar i { width: 110px; height: 5px; background: var(--gd-ink); opacity: .55; border-radius: 3px; }
#screen[data-app="lock"] ~ .homebar i, #screen[data-app="home"] ~ .homebar i { background: #fff; opacity: .9; }
#phoneWrap.open .homebar:hover #homeTip { opacity: 1; }
#homeBar.homebar { align-self: stretch; border-radius: 0; }
/* Profile: character picker */
.avatarBtn { position: relative; border: 0; background: none; padding: 0; cursor: pointer; }
.avatarBtn img { width: 96px; height: 96px; border-radius: 50%; background: #e9e3ff; border: var(--gd-line) solid var(--gd-ink); box-shadow: 4px 4px 0 var(--gd-ink); transition: transform .1s; }
.avatarBtn:hover img { transform: rotate(-3deg); }
.avatarBtn em { position: absolute; right: -4px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--gd-mustard); color: var(--gd-ink); font-style: normal; display: flex; align-items: center; justify-content: center; font-size: 14px; border: var(--gd-line) solid var(--gd-ink); }
.skins { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0 6px; width: 100%; }
.skin, .acc { border: var(--gd-line) solid var(--gd-ink); background: var(--gd-cream); border-radius: var(--gd-r-sm); padding: 0; overflow: hidden; cursor: pointer; box-shadow: 2px 2px 0 var(--gd-ink); }
.skin img { width: 100%; display: block; }
.skin.on, .acc.on { outline: 3px solid var(--gd-ink); outline-offset: 2px; transform: translate(2px, 2px); box-shadow: none; background: var(--gd-mustard); }
/* order item pictures */
.items.pics { list-style: none; padding-left: 0; }
.items.pics li { display: flex; align-items: center; gap: 6px; }
.items.pics img { width: 28px; height: 28px; border-radius: 7px; background: #ffe1da; border: 2px solid var(--gd-ink); }
/* picker thumbnails keep their shape (the big avatar style must not apply) */
.profile .skins img { width: 100%; height: auto; aspect-ratio: 1; border: 0; border-radius: 0; box-shadow: none; background: var(--gd-cream); display: block; }
.profile .accs img { width: 38px; height: 38px; border-radius: 50%; background: #f3f0ff; border: 2px solid var(--gd-ink); box-shadow: none; }
.profile .skins { grid-template-columns: repeat(6, 1fr); gap: 6px; }
/* ---------- Joe's Garage ---------- */
.mechHero { text-align: center; padding: 8px 12px 4px; }
.mechHero .big { font-size: 42px; line-height: 1; }
.mechHero h3 { margin: 6px 0 4px; font: 700 18px/1.15 var(--gd-font); text-transform: uppercase; }
.mechHero p { margin: 0; font: 500 13px/1.35 var(--gd-font); color: var(--gd-mute); }
.mechTabs { margin: 8px 10px; }
/* paint swatches: round stickers; the one you've picked is ringed */
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; padding: 0 12px; }
.swatches .sw { aspect-ratio: 1; border-radius: 50%; border: var(--gd-line) solid var(--gd-ink); box-shadow: 2px 2px 0 var(--gd-ink); padding: 0; cursor: pointer; }
.swatches .sw.on, .swatches .sw.focus { outline: 3px solid var(--gd-ink); outline-offset: 3px; transform: translate(2px, 2px); box-shadow: none; }
.customRow { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 0; font: 700 12px/1 var(--gd-font); text-transform: uppercase; letter-spacing: .04em; color: var(--gd-ink); }
input[type=color] { -webkit-appearance: none; appearance: none; width: 30px; height: 30px; border: 2px solid var(--gd-ink); border-radius: 50%; padding: 0; background: none; cursor: pointer; vertical-align: middle; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
.gradBar { height: 22px; margin: 4px 12px 8px; border-radius: 11px; border: var(--gd-line) solid var(--gd-ink); box-shadow: 2px 2px 0 var(--gd-ink); }
.paintNow { display: inline-flex; align-items: center; gap: 6px; }
/* (the paint you've got on, as a little round swatch) */
i.chip { display: inline-block; vertical-align: middle; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 2px solid var(--gd-ink); }
/* radio sliders: draggable with mouse and touch */
#screen input[type=range] { touch-action: none; cursor: pointer; pointer-events: auto; }
/* Developer app */
.list.dev .row span small { display: block; font-size: 11px; color: var(--gd-mute); font-weight: 500; }
.mapWrap.tp { cursor: crosshair; box-shadow: 0 0 0 3px var(--gd-gold), var(--gd-sh-sm) var(--gd-sh-sm) 0 3px var(--gd-ink); }
.mapWrap.tp canvas { cursor: crosshair; }
/* Mechanic app spacing */
#screen[data-app=mechanic] .mechHero { padding: 14px 12px 6px; }
#screen[data-app=mechanic] .mechHero + .btn { margin-top: 14px; }
#screen[data-app=mechanic] .btn + .btn { margin-top: 12px; }
#screen[data-app=mechanic] .btn + .list, #screen[data-app=mechanic] .list + .btn { margin-top: 18px; }
#screen[data-app=mechanic] .btn.primary { margin-bottom: 4px; }
#screen[data-app=mechanic] .two { margin-top: 10px; }
#screen[data-app=mechanic] .two .btn { flex: 1; margin: 0; } /* (side by side: the same size, lined up) */
/* status bar battery: horizontal, 75% charged */
.statusbar .sig { display: inline-flex; align-items: center; gap: 5px; height: 16px; line-height: 16px; } /* (the wifi sign's fallback font would make the row 34px tall, and the icons sat lower than the clock) */
.statusbar { align-items: flex-start; }
.statusbar .batt { position: relative; display: inline-block; width: 22px; height: 11px; border: 2px solid currentColor; border-radius: 3px; box-sizing: border-box; }
.statusbar .batt::after { content: ''; position: absolute; right: -4px; top: 2px; width: 2px; height: 3px; border-radius: 0 1px 1px 0; background: currentColor; }
.statusbar .batt b { position: absolute; left: 1px; top: 1px; bottom: 1px; width: calc((100% - 2px) * .75); border-radius: 1px; background: currentColor; }
/* ---------- Multiplayer ---------- */
.roomCode { display: flex; align-items: center; gap: 10px; background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 12px 14px; margin-bottom: 6px; }
.roomCode small { color: var(--gd-mute); font: 700 11px/1.2 var(--gd-font); text-transform: uppercase; letter-spacing: .08em; }
.roomCode b { flex: 1; font: 700 28px/1 var(--gd-font); letter-spacing: .18em; }
.joinRow { display: flex; gap: 8px; align-items: stretch; }
/* text boxes: white with an ink outline; blue while you type */
.joinRow input { flex: 1; min-width: 0; height: 46px; font: 700 20px/1 var(--gd-font); letter-spacing: .35em; text-transform: uppercase; text-align: center; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); padding: 0 8px; background: #fff; color: var(--gd-ink); box-shadow: inset 2px 2px 0 rgba(27, 29, 36, .08); -webkit-user-select: text; user-select: text; }
.joinRow input:focus { outline: none; border-color: var(--gd-blue); box-shadow: 3px 3px 0 var(--gd-blue); }
.joinRow .btn { width: auto; margin: 0; padding: 0 18px; }
.mpErr { color: var(--gd-ketchup); font: 600 12.5px/1.3 var(--gd-font); text-align: center; margin: 8px 0 0; }
.pname { display: inline-flex; align-items: center; gap: 6px; }
.pname em { font-style: normal; color: var(--gd-mute); font-weight: 700; width: 14px; }
.pdot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gd-ink); flex: none; }
.racers { display: block; font-style: normal; font: 700 11px/1.2 var(--gd-font); color: var(--gd-purple); margin-top: 2px; }
.racers.big { font-size: 13px; text-align: center; margin: 10px 0 0; }

/* Multiplayer chat: speech bubbles (yours in mustard on the right) */
.chatLog { display: flex; flex-direction: column; gap: 5px; background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 8px 10px; max-height: 150px; overflow-y: auto; margin-bottom: 8px; font: 500 12.5px/1.35 var(--gd-font); }
.chatLog p { align-self: flex-start; max-width: 86%; margin: 0; padding: 4px 9px; border: 2px solid var(--gd-ink); border-radius: 10px 10px 10px 3px; background: #fff; word-wrap: break-word; }
.chatLog p b { color: var(--gd-blue); margin-right: 4px; }
.chatLog p.me { align-self: flex-end; border-radius: 10px 10px 3px 10px; background: var(--gd-mustard); }
.chatLog p.me b { color: var(--gd-ketchup); }
.chatLog p.sys { align-self: center; border: 0; background: none; color: #7a4a00; font-size: 11.5px; }
.chatLog p.sys b { color: #c77700; }
.chatRow { margin-bottom: 10px; }
.chatRow input { font-size: 15px; letter-spacing: 0; text-transform: none; text-align: left; font-weight: 500; }

/* Multiplayer setup: "your game is saved", name */
.mpSave { display: flex; gap: 10px; align-items: flex-start; background: #d6f5e3; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 10px 12px; margin: 4px 0 10px; }
.mpSave > span { font-size: 22px; line-height: 1; }
.mpSave b { display: block; font: 700 14px/1.2 var(--gd-font); }
.mpSave small { display: block; font: 500 12px/1.3 var(--gd-font); color: #4a4f5c; }
.mpNameInput { width: 100%; box-sizing: border-box; height: 44px; font: 600 16px/1 var(--gd-font); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); padding: 0 12px; background: #fff; color: var(--gd-ink); box-shadow: inset 2px 2px 0 rgba(27, 29, 36, .08); margin-bottom: 6px; -webkit-user-select: text; user-select: text; }
.mpNameInput:focus { outline: none; border-color: var(--gd-blue); box-shadow: 3px 3px 0 var(--gd-blue); }

/* Order details: buttons on top, the price and tip, the time to beat */
.offerBtns { margin-bottom: 10px; }
.offer .pay { margin: 2px 0 0; }
.tipLine { margin: 6px 0 10px; font: 600 13px/1.3 var(--gd-font); color: var(--gd-mute); }
/* (the time to beat: its color, for how tight it is, comes from the game) */
.within { text-align: center; padding: 5px 10px; margin-bottom: 4px; background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); box-shadow: 2px 2px 0 var(--gd-ink); }
.within b { display: block; font: 700 22px/1.1 var(--gd-font); font-variant-numeric: tabular-nums; }
.within small { color: var(--gd-mute); font: 700 10px/1.2 var(--gd-font); text-transform: uppercase; letter-spacing: .04em; }
.offer #offerMap { margin-top: 10px; }
/* Get orders from: an (i) that shows Downtown's pay on hover or tap */
.areaHead { display: flex; align-items: center; gap: 6px; }
.areaHead > small { font: 700 11px/1.2 var(--gd-font); text-transform: uppercase; letter-spacing: .08em; color: var(--gd-mute); }
.info { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--gd-blue); color: #fff; border: 2px solid var(--gd-ink); font: 700 12px/1 var(--gd-font); font-style: normal; cursor: help; outline: none; }
.info em { display: none; position: absolute; left: 50%; bottom: calc(100% + 9px); transform: translateX(-50%); white-space: nowrap; background: var(--gd-ink); color: #fff; font: 600 12.5px/1.3 var(--gd-font); font-style: normal; padding: 7px 11px; border-radius: var(--gd-r-sm); z-index: 5; pointer-events: none; }
.info em::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--gd-ink); border-bottom: 0; }
.info:hover em, .info:focus em { display: block; }
.gdStats b.money, .grid2 b.money { color: var(--gd-green-dk); }

/* Settings: sound and music sliders */
.list .row .vol { display: flex; align-items: center; gap: 6px; width: 100%; }
.list .row .vol input { flex: 1; accent-color: var(--gd-pink); }
.mechTabs button { font-size: 11px; padding: 6px 2px 5px; white-space: nowrap; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mechTabs button .gl { width: 20px; height: 20px; }
.mechTabs button.on .gl { color: var(--gd-ink); }
/* (Career, Joe's waiting to fit your Boost: Performance glows until you've had it fitted) */
.mechTabs.four { display: grid; grid-template-columns: 1fr 1fr; } /* (Joe's four: two by two, each icon beside its name, so they fit a phone) */
.mechTabs.four button { flex-direction: row; justify-content: center; gap: 5px; padding: 6px 4px; }
.mechTabs button.hint { box-shadow: 0 0 0 3px var(--gd-gold); animation: gd-breathe 1.1s ease-in-out infinite; }
.mechSub { margin: -2px 34px 8px; }
.mechStyle { margin: 0 46px 6px; }
.mechSub button, .mechStyle button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; } /* (each with its icon) */
.mechLights { border: 0; min-height: 0; padding: 4px 16px 0; font-weight: 700; }

/* Multiplayer: breathing room between "Host a game" and "Or join one" */
.listHead.mpOr { margin-top: 18px; text-align: center; }

/* Settings: a row title with a line of explanation under it */
.row .sub small { display: block; font-size: 11px; color: var(--gd-mute); font-weight: 500; }

/* Icons in place of emoji */
.mechHero .big .gl { width: 46px; height: 46px; color: var(--gd-red); }
.mechHero .big.warn .gl { color: var(--gd-tight); }
.mpSave > span { color: var(--gd-green-dk); }
.mpSave > span .gl { width: 24px; height: 24px; }
.trk.cur span { color: var(--gd-pink); }
.pinDot i .gl { width: 14px; height: 14px; display: block; }
.gl.crown { color: var(--gd-tight); vertical-align: -0.15em; }
.racers .gl { color: var(--gd-purple); }
.seg .gl { vertical-align: -0.25em; }

/* Settings: Controls is a single centered button */
.row.ctlRow { justify-content: center; }
.row.ctlRow .btn { width: auto; min-width: 60%; margin: 0; }

/* Profile: gold stars, late deliveries in red */
.profile .rating { display: flex; align-items: center; justify-content: center; gap: 6px; }
.profile .rating .gd-stars .is-off path { fill: #fff; }
.grid2 b.late { color: var(--gd-ketchup); }

/* Profile: tap your name to change it */
.nameBtn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 8px; border-radius: 10px; color: inherit; font: inherit; cursor: pointer; }
.nameBtn:hover { background: var(--gd-cream); }
.nameBtn .gl { color: var(--gd-purple); }

/* Joe's: a picture of your car */
.mechHero .big img.myCar { width: 120px; height: auto; display: block; margin: 0 auto; }

/* Joe's Garage: your vehicles, on one screen (no scrolling: the 3D view takes what's left) */
#screen[data-app=mechanic]:has(.vehApp) { display: flex; flex-direction: column; overflow: hidden; }
/* (in the showroom, under its tabs: a view of a set size, and the page scrolls when the music player takes room) */
#screen[data-app=mechanic]:has(.vehApp.inShop) { overflow-y: auto; }
.vehApp.inShop { flex: none; }
.vehApp.inShop .vehStage { flex: none; height: 150px; }
.vehApp.inShop .statTri { flex: none; height: 96px; }
.vehApp { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; padding-top: 4px; }
/* (the vehicle on a little yellow stage) */
.vehStage { position: relative; flex: 1 1 150px; min-height: 80px; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); background: radial-gradient(ellipse 46% 16% at 50% 78%, rgba(27, 29, 36, .16), transparent 70%), var(--gd-dots), #ffe7a8; overflow: hidden; }
.vehStage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vehLock { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(-45deg, rgba(241, 230, 204, .7) 0 6px, rgba(232, 220, 191, .7) 6px 12px); }
.vehLock .gl { width: 52px; height: 52px; color: var(--gd-ink); }
.vehName { display: flex; justify-content: space-between; align-items: baseline; font: 700 17px/1.1 var(--gd-font); text-transform: uppercase; padding: 0 4px; }
.vehName span { font: 600 12px/1.2 var(--gd-font); text-transform: none; color: var(--gd-mute); }
.vehApp .listHead { margin: 0; }
.vehApp .two { align-items: stretch; display: flex; gap: 8px; }
#screen[data-app=mechanic] .vehApp .two .btn { flex: 1; margin: 0; padding: 0 8px; height: 40px; min-height: 0; font-size: 12px; white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 6px; } /* (both the same height) */
.vehApp > .btn { margin: 0; }
.vehApp .statTri { flex: 0 1 112px; min-height: 64px; height: auto; } /* (gives up height on a short phone, after the stage: the arrows below always show) */
/* the Speed / Handling / Armor triangle (garage-kit.js statTriangle) */
.statTri { width: 100%; height: 112px; flex: none; }
.statTri .tri { fill: #fff; stroke: var(--gd-ink); stroke-width: 2.5; stroke-linejoin: round; }
.statTri .spoke { stroke: var(--gd-ink); stroke-opacity: .18; stroke-width: 2; stroke-dasharray: 4 4; }
.statTri .dot { fill: var(--gd-mustard); stroke: var(--gd-ink); stroke-width: 2; }
/* (statTriangle(st, from): where it was, hollow and dashed, and a line to where it is now) */
.statTri .dot.base { fill: none; stroke: var(--gd-ink); stroke-width: 2; stroke-dasharray: 3 2; }
.statTri .move { stroke: var(--gd-red); stroke-width: 2.5; stroke-linecap: round; }
.statTri text { font: 700 11px var(--gd-font); letter-spacing: 1px; fill: var(--gd-ink); }
.vehNav { display: flex; align-items: center; justify-content: space-between; flex: none; padding: 0 8px 4px; } /* (in from the screen's rounded bottom corners) */
.vehNav .btn { width: 46px; height: 46px; min-height: 0; padding: 0; border-radius: 50%; margin: 0; }
.vehNav .btn .chev { width: 22px; height: 22px; display: block; margin: 0 auto; }
