@font-face { font-family: 'KenneyFuture'; src: url(assets/fonts/KenneyFuture.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'KenneyFutureNarrow'; src: url(assets/fonts/KenneyFutureNarrow.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'Rubik'; src: url(assets/fonts/Rubik.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }
:root { --vh: 1vh; --bg: #1c1f26; --card: #2a2f38; --card2: #323844; --line: #3c4350; --txt: #f1f3f6; --mute: #a6afbd; --gold: #ffc400; --green: #5fd068; --red: #ff6b5b; --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--txt); font-family: Rubik, -apple-system, system-ui, sans-serif; overflow: hidden; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font-family: inherit; touch-action: manipulation; }
#app { position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: calc(var(--vh) * 100); overflow: hidden; --tabh: 58px; }
/* full-screen 3D stage */
#stage { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #8fd3ff; overflow: hidden; }
#c3d { width: 100%; height: 100%; display: block; touch-action: none; }
#pops { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; overflow: hidden; }
.pop { position: absolute; left: 0; top: 0; font-family: KenneyFuture, Rubik, sans-serif; font-size: 17px; color: #7dff8a; text-shadow: 0 2px 0 #000, 0 0 8px rgba(0,0,0,.6); white-space: nowrap; will-change: transform; }
.pop.scrap { color: #dfe6ee; } .pop.parts { color: #ffd84a; }
/* compact HUD chips */
#hud { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; padding: calc(var(--sat) + 6px) calc(env(safe-area-inset-right, 0px) + 8px) 0 calc(env(safe-area-inset-left, 0px) + 8px); z-index: 5; pointer-events: none; }
#hud > * { pointer-events: auto; }
.chip { display: flex; flex-direction: row; align-items: center; height: 32px; max-height: 32px; overflow: hidden; background: rgba(15,17,21,.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 16px; padding: 0 10px 0 6px; font-family: KenneyFuture, Rubik, sans-serif; font-size: 14px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.chip img { width: 20px !important; height: 20px !important; max-width: 20px; max-height: 20px; flex: none; object-fit: contain; margin-right: 4px; display: block; }
.chip.money { color: #7dff8a; min-width: 0; }
.chip.scrap { color: #dfe6ee; font-size: 12px; }
.chip.scrap img { width: 15px !important; height: 15px !important; }
.chip.lvl { color: var(--gold); position: relative; padding-right: 8px; font-size: 13px; overflow: hidden; }
.chip.lvl img { width: 16px !important; height: 16px !important; }
.xp { position: absolute; left: 6px; right: 6px; bottom: 3px; height: 3px; background: #0006; border-radius: 2px; overflow: hidden; }
#hud-xp { height: 100%; width: 0; background: linear-gradient(90deg, #ffb300, #ffe066); transition: width .4s; }
.sp { flex: 1; }
.hbtn { width: 34px; height: 34px; border: 0; border-radius: 17px; background: rgba(15,17,21,.74); display: flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.hbtn img { width: 19px; height: 19px; }
#topline { position: absolute; left: 0; right: 0; top: calc(var(--sat) + 44px); display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; z-index: 4; padding: 0 10px; }
#hud-event { display: none; background: linear-gradient(90deg, #ff7a00, #ffb300); color: #1a1000; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 800; max-width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hint { display: none; max-width: 92%; background: rgba(15,17,21,.8); border: 2px solid var(--gold); color: #fff; padding: 4px 12px; border-radius: 14px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: hintb 1.6s infinite; }
@keyframes hintb { 50% { border-color: #fff3; } }
#skipbtn { display: none; position: absolute; right: calc(env(safe-area-inset-right, 0px) + 8px); top: calc(var(--sat) + 46px); z-index: 6; align-items: center; gap: 4px; border: 0; background: rgba(15,17,21,.8); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .5px; padding: 7px 12px; border-radius: 16px; }
#skipbtn img { width: 14px; height: 14px; }
#app.cine #skipbtn { display: flex; }
#app.cine #stage::before, #app.cine #stage::after { content: ''; position: absolute; left: 0; right: 0; height: 5%; background: #000; z-index: 1; pointer-events: none; animation: bars .5s; }
#app.cine #stage::before { top: 0; } #app.cine #stage::after { bottom: 0; }
@keyframes bars { from { height: 0; } }
/* quick actions (above the tab bar) */
#actions { position: absolute; left: calc(env(safe-area-inset-left, 0px) + 8px); right: calc(env(safe-area-inset-right, 0px) + 8px); bottom: calc(var(--tabh) + var(--sab) + 8px); z-index: 4; display: flex; flex-direction: column; gap: 6px; pointer-events: none; max-width: 520px; margin: 0 auto; }
#actions > * { pointer-events: auto; }
#app.sheet-open #actions { display: none; }
.offer { position: relative; overflow: hidden; display: flex; align-items: center; background: rgba(20,22,27,.9); border-radius: 16px; padding: 6px 6px 6px 6px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.offer img.th { width: 46px; height: 46px; border-radius: 10px; }
.offer .grow b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer .grow span { display: block; font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oprice { font-family: KenneyFuture, Rubik, sans-serif; font-size: 14px; color: #7dff8a; white-space: nowrap; }
.offer.free .oprice, .offer.payyou .oprice { color: var(--gold); }
.offer .btn { min-height: 40px; font-size: 13px; }
.offer .btn.ib { min-width: 46px; }
.offer .btn.hg { min-width: 50px; font-size: 12px; }
.offer .more { position: absolute; top: 3px; left: 4px; font-style: normal; background: var(--red); color: #fff; font-size: 10px; border-radius: 8px; padding: 0 5px; line-height: 15px; }
.offer.flash { animation: flash 1.2s 2; }
.arow { display: flex; justify-content: center; }
.arow > * + * { margin-left: 6px; }
.btn.ab { flex: 1 1 0; max-width: 170px; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 5px; position: relative; font-size: 14px; }
.btn.ab img { width: 20px; height: 20px; flex: none; margin-right: 4px; }
.btn.ab em { font-style: normal; font-size: 10px; background: #0005; color: #fff; border-radius: 8px; padding: 0 5px; line-height: 15px; }
.abar { position: absolute; left: 2px; right: 2px; bottom: -6px; height: 4px; background: #0004; border-radius: 2px; overflow: hidden; }
.abar div { height: 100%; width: 0; background: #2f9e44; }
/* slide-up sheet (closed by default) */
#sheet { position: absolute; left: 0; right: 0; bottom: calc(var(--tabh) + var(--sab)); max-height: calc(var(--vh) * 56); height: auto; min-height: 180px; z-index: 7; display: flex; flex-direction: column; background: rgba(28,31,38,.97); border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.4); transform: translateY(115%); transition: transform .28s cubic-bezier(.2,.8,.2,1); max-width: 640px; margin: 0 auto; visibility: hidden; }
#app.sheet-open #sheet { transform: none; visibility: visible; }
.shead { position: relative; display: flex; align-items: center; padding: 12px 10px 4px 16px; flex: none; }
.shead b { flex: 1; font-family: KenneyFuture, Rubik, sans-serif; font-weight: 400; color: var(--gold); font-size: 17px; letter-spacing: .5px; }
.grab { position: absolute; left: 50%; top: 5px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #555c69; }
#panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 10px 16px; overscroll-behavior: contain; }
#tabs { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; justify-content: center; background: rgba(17,19,23,.94); padding: 3px calc(env(safe-area-inset-right, 0px) + 2px) calc(var(--sab) + 3px) calc(env(safe-area-inset-left, 0px) + 2px); height: calc(var(--tabh) + var(--sab)); }
#tabs button { flex: 1; max-width: 96px; background: none; border: 0; color: var(--mute); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px 0; position: relative; font-size: 9px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; border-radius: 12px; }
#tabs button.locked { display: none; }
#tabs button img { width: 28px; height: 26px; object-fit: contain; opacity: .8; transition: transform .2s; }
#tabs button.on { color: var(--gold); background: #262b34; }
#tabs button.on img { opacity: 1; transform: translateY(-2px) scale(1.1); }
#tabs button.new::after { content: 'NEW'; position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: var(--gold); color: #2a1c00; font-size: 8px; border-radius: 6px; padding: 0 4px; line-height: 12px; animation: pulse .8s infinite alternate; }
#tabs button.pop-in { animation: popin .6s; }
@keyframes popin { 0% { transform: scale(.2); } 70% { transform: scale(1.2); } }
.badge { display: none; position: absolute; top: 0; right: 16%; background: var(--red); color: #fff; font-style: normal; font-size: 10px; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; padding: 0 4px; }
h3 { font-family: KenneyFuture, Rubik, sans-serif; font-weight: 400; font-size: 15px; margin: 14px 2px 6px; color: #ffd84a; letter-spacing: .5px; display: flex; align-items: baseline; gap: 8px; }
h3 small { font-family: Rubik, sans-serif; font-size: 11px; color: var(--mute); letter-spacing: 0; }
.card { background: var(--card); border-radius: 14px; padding: 10px; margin-bottom: 8px; box-shadow: 0 3px 0 #15171c; position: relative; overflow: hidden; }
.card.dim { opacity: .55; }
.card.flash { animation: flash 1.2s 2; }
@keyframes flash { 50% { box-shadow: 0 0 0 3px var(--gold); } }
.crow { display: flex; align-items: center; gap: 10px; }
.crow.sep { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.grow { flex: 1; min-width: 0; }
.th { width: 64px; height: 64px; object-fit: contain; flex: none; background: radial-gradient(#3a414d, #2a2f38 70%); border-radius: 12px; }
.th.sm { width: 42px; height: 42px; }
.th.dark { background: #3a3f47; padding: 6px; }
.th.avatar { background: radial-gradient(#4b5361, #2a2f38 70%); }
.ic { width: 40px; height: 40px; background: #3d4452; border-radius: 10px; padding: 7px; flex: none; }
.t1 { font-weight: 700; font-size: 15px; }
.t1 small { color: var(--mute); font-weight: 400; font-size: 12px; }
.t2 { font-size: 12px; color: #d8dde5; font-style: italic; margin: 2px 0; }
.t3 { font-size: 12px; color: var(--mute); margin-top: 2px; line-height: 1.35; }
.center { text-align: center; }
.gold { color: var(--gold); } .bad { color: var(--red) !important; } .up { color: var(--green); } .down { color: var(--red); }
.price { font-family: KenneyFuture, Rubik, sans-serif; font-size: 16px; color: #7dff8a; text-align: right; flex: none; max-width: 34%; }
.price.free { color: var(--gold); }
.price small { display: block; font-family: Rubik; font-size: 11px; color: var(--mute); }
.row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.row .btn { flex: 1; }
.empty { color: var(--mute); font-size: 13px; padding: 14px; text-align: center; background: #22262e; border-radius: 12px; border: 2px dashed #353b46; }
.timer { position: absolute; left: 0; top: 0; right: 0; height: 3px; background: #0003; }
.timer div { height: 100%; background: var(--gold); width: 100%; }
.bar { position: relative; height: 10px; background: #15181d; border-radius: 6px; overflow: hidden; margin: 6px 0 2px; }
.bar div { height: 100%; background: linear-gradient(90deg, #3fbf6a, #8cf08f); border-radius: 6px; width: 0; transition: width .12s linear; }
.bar.big { height: 22px; border-radius: 11px; }
.bar.big div { background: linear-gradient(90deg, #ffb300, #ffe066); }
.bar i { position: absolute; top: 0; left: 0; right: 0; bottom: 0; text-align: center; font-style: normal; font-size: 12px; line-height: 22px; font-weight: 800; color: #1a1000; text-shadow: 0 1px 0 #fff6; }
/* Kenney buttons */
.btn { border-style: solid; border-width: 10px 12px 14px; border-image: url(assets/ui/btn_grey.png) 16 18 22 18 fill stretch; background: none; color: #222; font-weight: 800; font-size: 13px; padding: 0 4px; min-height: 42px; line-height: 1.1; cursor: pointer; white-space: nowrap; transition: transform .06s; }
.btn:active { transform: translateY(2px) scale(.98); }
.btn.gold { border-image-source: url(assets/ui/btn_yellow.png); color: #3a2600; }
.btn.green { border-image-source: url(assets/ui/btn_green.png); color: #fff; text-shadow: 0 1px 0 #0005; }
.btn.red { border-image-source: url(assets/ui/btn_red.png); color: #fff; text-shadow: 0 1px 0 #0005; }
.btn.blue { border-image-source: url(assets/ui/btn_blue.png); color: #fff; }
.btn.sm { min-height: 36px; font-size: 12px; flex: 0 0 auto !important; }
.btn.wide { width: 100%; margin-top: 10px; min-height: 50px; font-size: 16px; }
.btn:disabled { filter: grayscale(1) brightness(.65); }
.btn.tap { min-width: 92px; min-height: 52px; font-family: KenneyFuture, sans-serif; font-weight: 400; }
.btn.bump { animation: bump .15s; }
@keyframes bump { 50% { transform: scale(1.12) rotate(-3deg); } }
.btn.pulse { animation: pulse 1s infinite alternate; }
@keyframes pulse { to { transform: scale(1.06); } }
/* builder */
.hscroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; -webkit-overflow-scrolling: touch; }
.bp { flex: none; width: 82px; background: var(--card); border: 2px solid transparent; border-radius: 12px; padding: 4px; color: var(--txt); display: flex; flex-direction: column; align-items: center; font-size: 10px; position: relative; }
.bp img { width: 62px; height: 54px; object-fit: contain; }
.bp span { text-align: center; line-height: 1.1; height: 22px; overflow: hidden; }
.bp.on { border-color: var(--gold); background: #353b47; }
.bp.ok::after { content: '✓'; position: absolute; top: 2px; right: 6px; color: var(--green); font-weight: 900; }
.bp.locked img { filter: brightness(0) opacity(.5); }
.bp.locked { color: var(--mute); }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.slot { background: #20242b; border-radius: 10px; padding: 4px; display: flex; flex-direction: column; align-items: center; font-size: 9px; text-align: center; border: 2px solid #3fbf6a55; position: relative; }
.slot.miss { border-color: #ff6b5b66; }
.slot.miss img { opacity: .35; }
.slot img { width: 40px; height: 34px; object-fit: contain; }
.slot b { font-size: 13px; }
.slot span { color: var(--mute); line-height: 1.1; }
.slot em { position: absolute; top: 2px; right: 4px; font-style: normal; font-weight: 800; font-size: 10px; }
.paints { display: flex; gap: 8px; justify-content: center; margin: 8px 0 2px; flex-wrap: wrap; }
.paint { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #0006; color: #222; font-weight: 900; font-size: 12px; }
.paint.on { border-color: #fff; transform: scale(1.15); }
.buildsum { display: flex; justify-content: space-around; margin-top: 8px; text-align: center; font-size: 11px; color: var(--mute); }
.buildsum b { display: block; font-family: KenneyFuture, sans-serif; font-weight: 400; font-size: 17px; color: #fff; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; border: 1px solid #0008; }
/* parts */
.ptype .crow { cursor: pointer; }
.ptype canvas { width: 90px; height: 34px; flex: none; }
.card canvas[data-spark="scrap"] { width: 70px; height: 34px; flex: none; }
.tapmore { text-align: right; font-size: 11px; margin-top: 4px; }
.plist { margin-top: 8px; border-top: 1px solid var(--line); }
.prow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #2f3540; font-size: 12px; }
.prow small { color: var(--mute); }
.rar { width: 8px; height: 30px; border-radius: 4px; flex: none; }
.qbar { height: 5px; background: #15181d; border-radius: 3px; margin-top: 4px; overflow: hidden; }
.qbar div { height: 100%; }
.prow .q { width: 34px; text-align: right; color: var(--mute); }
/* upgrades */
.pips { display: flex; gap: 3px; margin-top: 5px; flex-wrap: wrap; }
.pips i { width: 12px; height: 6px; background: #444b57; border-radius: 3px; }
.pips i.on { background: var(--gold); }
.sw { font-size: 12px; color: var(--mute); display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.sw input { width: 18px; height: 18px; accent-color: #3fbf6a; }
.card.upg .btn { min-width: 96px; }
/* office */
.seg { display: flex; background: #111317; border-radius: 12px; padding: 3px; margin-top: 8px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; color: var(--mute); padding: 8px 0; border-radius: 9px; font-size: 11px; font-weight: 700; }
.seg button.on { background: var(--gold); color: #2a1c00; }
.achs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ach { background: var(--card); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; font-size: 11px; color: var(--mute); opacity: .55; }
.ach img { width: 26px; height: 26px; margin-bottom: 4px; }
.ach b { color: #fff; font-size: 12px; }
.ach.got { opacity: 1; background: linear-gradient(135deg, #3d3520, #2a2f38); box-shadow: inset 0 0 0 2px #ffc40066; }
.stats div { display: flex; justify-content: space-between; padding: 6px 2px; border-bottom: 1px solid #353b46; font-size: 13px; }
.stats span { color: var(--mute); }
.banner { background: #262b34; border-radius: 12px; padding: 8px 12px; font-size: 12px; margin-top: 8px; color: var(--mute); }
.banner.ev { background: linear-gradient(90deg, #ff7a0033, #ffb30022); color: #ffd28a; border: 1px solid #ff9a2a66; }
.banner b { color: #fff; }
.hero { text-align: center; background: var(--card); border-radius: 16px; padding: 16px; margin-top: 10px; }
.hero img { width: 140px; }
.hero h2 { font-family: KenneyFuture, sans-serif; font-weight: 400; margin: 6px 0; font-size: 20px; color: var(--gold); }
.hero p { font-size: 13px; color: #cfd5de; line-height: 1.45; }
/* toasts & modal */
#toasts { position: fixed; left: 50%; top: calc(var(--sat) + 76px); transform: translateX(-50%); width: min(90vw, 380px); z-index: 40; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.toast { max-width: 100%; background: rgba(20,22,27,.92); border-left: 4px solid #6a7486; border-radius: 12px; padding: 5px 11px; font-size: 12px; box-shadow: 0 4px 14px #0007; animation: tin .25s; transition: opacity .35s, transform .35s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast b { font-weight: 700; }
.toast span { color: var(--mute); margin-left: 5px; }
.toast.good { border-color: var(--green); } .toast.bad { border-color: var(--red); } .toast.gold { border-color: var(--gold); } .toast.level { border-color: #4da3ff; }
.toast.unlock { border: 2px solid var(--gold); background: linear-gradient(90deg, #3a2f10f2, #16181df2); font-size: 13px; padding: 6px 12px; }
.toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes tin { from { opacity: 0; transform: translateY(-10px) scale(.96); } }
#modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); display: none; align-items: flex-end; justify-content: center; z-index: 50; }
#modal.show { display: flex; }
.sheet { background: #22262e; width: 100%; max-width: 520px; max-height: 84%; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(var(--sab) + 18px); animation: sheet .25s; }
@keyframes sheet { from { transform: translateY(40%); opacity: 0; } }
.sheet h2 { font-family: KenneyFuture, sans-serif; font-weight: 400; color: var(--gold); margin: 0 0 8px; }
.sheet p { font-size: 14px; color: #d4dae3; line-height: 1.45; }
.sheet textarea { width: 100%; height: 110px; background: #111; color: #9fe; border: 1px solid #444; border-radius: 10px; font-size: 11px; padding: 8px; -webkit-user-select: text; user-select: text; }
.credits p { font-size: 13px; }
/* boot */
#boot { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 30%, #3a3020, #14161b 70%); transition: opacity .5s; padding: 20px; }
#boot.hide { opacity: 0; pointer-events: none; }
.bootin { text-align: center; width: 100%; max-width: 380px; }
.logo { font-family: KenneyFuture, sans-serif; line-height: .95; transform: rotate(-4deg); margin-bottom: 8px; }
.logo span { display: block; font-size: 44px; color: #fff; text-shadow: 0 4px 0 #000; letter-spacing: 1px; }
.logo b { display: block; font-weight: 400; font-size: 56px; color: var(--gold); text-shadow: 0 5px 0 #7a4b00, 0 10px 18px #000; }
.tag { color: #d7c9a8; font-size: 14px; margin-bottom: 12px; }
.cars { display: flex; justify-content: center; gap: 4px; margin: 6px 0 16px; }
.cars img { width: 100px; animation: bob 2s infinite ease-in-out; }
.cars img:nth-child(2) { animation-delay: .3s; } .cars img:nth-child(3) { animation-delay: .6s; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }
#loadbar { height: 12px; background: #0008; border-radius: 6px; overflow: hidden; margin: 8px 20px; }
#loadbar div { height: 100%; width: 0; background: linear-gradient(90deg, #ffb300, #ffe066); transition: width .2s; }
#loadtxt { font-size: 12px; color: var(--mute); margin-bottom: 14px; }
#startbtn { font-family: KenneyFuture, sans-serif; font-weight: 400; font-size: 20px; min-height: 64px; padding: 0 30px; }
.tiny { font-size: 11px; color: #8a8f99; margin-top: 18px; }
#err { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #a00; color: #fff; font-size: 11px; padding: 6px; z-index: 200; }
/* landscape / desktop: sheet becomes a right-side panel, 3D stays full screen */
@media (orientation: landscape) {
  #sheet { left: auto; right: 0; top: calc(var(--sat) + 46px); bottom: calc(var(--tabh) + var(--sab)); width: min(400px, 46vw); height: auto; max-height: none; border-radius: 18px 0 0 18px; transform: translateX(110%); margin: 0; }
  #actions { right: auto; width: min(460px, 60vw); }
}
@media (orientation: landscape) and (max-height: 500px) {
  #app { --tabh: 50px; }
  #tabs button span { display: none; }
}

/* iOS-safe spacing without relying on flex gap; hard caps on all icon images */
#hud > * + * { margin-left: 5px; }
.offer > * + * { margin-left: 7px; }
.offer > .timer + *, .offer > .more + * { margin-left: 0; }
.hbtn img, #skipbtn img, .shead img { flex: none; object-fit: contain; display: block; }
#skipbtn img { width: 14px !important; height: 14px !important; margin-left: 4px; }
.shead .hbtn img { width: 16px !important; height: 16px !important; }
#tabs button img { max-width: 30px; max-height: 26px; }
#topline > * + * { margin-top: 5px; }
.btn.ab.work img { -webkit-filter: brightness(0.2); filter: brightness(0.2); opacity: .9; }

/* v5: step tracker + one primary action */
#actions .track { display: flex; align-items: center; justify-content: center; margin: 0 auto 4px; background: rgba(15,17,21,.78); border-radius: 14px; padding: 3px 8px; font-size: 11px; font-weight: 700; color: #9aa3ae; width: max-content; max-width: 100%; }
#actions .track span { display: flex; align-items: center; white-space: nowrap; }
#actions .track span b { display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 8px; background: #3a414c; color: #cfd5dc; font-size: 10px; margin-right: 3px; }
#actions .track span.on { color: #fff; }
#actions .track span.on b { background: var(--gold); color: #2a1c00; }
#actions .track span.done b { background: #2e9e5b; color: #fff; }
#actions .track i { display: inline-block; width: 10px; height: 2px; background: #4a515c; margin: 0 5px; }
#actions .ystat { text-align: center; font-size: 11px; color: #e9edf2; text-shadow: 0 1px 2px #000; margin: 0 0 4px; }
.btn.ab.main { flex: 1 1 auto; max-width: 300px; min-height: 50px; font-size: 16px; }
.btn.ab.main span small { display: block; font-size: 10px; font-weight: 600; opacity: .75; }
.btn.ab.chip2 { flex: none; max-width: 110px; min-height: 50px; font-size: 13px; }
#tabs button.guide { animation: guide 0.9s infinite alternate; color: #fff; }
#tabs button.guide img { opacity: 1; }
@keyframes guide { from { background: rgba(255,193,58,.15); } to { background: rgba(255,193,58,.55); } }
/* v6: rendered car pictures, rarity tags, metallic paint chips */
.th.car { width: 76px; height: 56px; }
.rtag { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; padding: 1px 5px; border-radius: 6px; vertical-align: middle; margin-left: 2px; background: #2f6b3c; color: #c9f7d3; }
.rtag.r2 { background: #20497a; color: #cfe5ff; }
.rtag.r3 { background: #7a5a12; color: #ffe9b3; }
.t2 .dot { margin-right: 4px; }
.paint { position: relative; overflow: hidden; }
.paint .shine { position: absolute; left: 4px; top: 3px; width: 10px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.75); transform: rotate(-30deg); }
/* v7: scrap side vs build side */
h3.zone.scrap { color: #ff8a4c; }
h3.zone.build { color: #5ec8ff; }
.card.sbay { border-left: 4px solid #e8642c; }
.card.bbay { border-left: 4px solid #2f9de0; }
#actions .track span.on.b5 b { background: #3aa7e8; color: #fff; }
/* v7.1: on the deed.page host a "Published with deed.page" badge sits in the bottom-right ~55px of the screen.
   Lift the tab bar (and everything stacked on it) above that strip so no game control sits under the badge. */
html.hosted { --sab: max(calc(env(safe-area-inset-bottom, 0px) + 22px), 58px); }
html.hosted #tabs { box-shadow: inset 0 -1px 0 rgba(255,255,255,.04); }
/* v9: Tuning Shop */
.btn.purple { border-image: none; background: linear-gradient(#b05cff, #7a2fd6); border: 0; border-radius: 12px; color: #fff; box-shadow: 0 3px 0 #4d1a8f; }
.btn.purple:disabled { opacity: .5; }
.tunerow { align-items: center; }
.tunerow .style { color: #e2b8ff; font-weight: 800; font-size: 12px; margin-right: auto; }
.tunehead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.tunehead .price small { display: block; color: #7dff8a; }
.stylebar { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: #e2b8ff; margin-bottom: 8px; }
.stylebar .bar { flex: 1; height: 8px; background: #20232b; border-radius: 4px; overflow: hidden; }
.stylebar .bar div { height: 100%; background: linear-gradient(90deg, #7a2fd6, #ff4fc3, #3de8ff); }
.tcats { gap: 6px; }
.tcat { flex: none; border: 0; border-radius: 16px; padding: 7px 12px; background: #2a2f38; color: var(--mute); font-weight: 800; font-size: 12px; white-space: nowrap; }
.tcat.set { color: #e2b8ff; }
.tcat.on { background: #7a2fd6; color: #fff; }
.topts { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; margin: 4px 0 8px; }
.topt { position: relative; border: 2px solid transparent; border-radius: 12px; background: #2a2f38; color: var(--txt); padding: 8px 6px; text-align: left; min-height: 52px; }
.topt b { display: block; font-size: 13px; }
.topt small { display: block; color: var(--mute); font-size: 10px; margin-top: 2px; }
.topt i { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 10px; color: #e2b8ff; font-weight: 800; }
.topt.on { border-color: #b05cff; background: #352a48; }
.tcols { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.tcol { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #ffffff40; padding: 0; }
.tcol.on { border-color: #fff; box-shadow: 0 0 0 3px #b05cff; }
.tunefoot { position: sticky; bottom: 0; background: rgba(28,31,38,.97); padding-top: 6px; }
#app.tuning #sheet { max-height: calc(var(--vh) * 50); }
#app.tuning .topt { min-height: 44px; padding: 6px; }

/* v10: hidden finds */
.fdot { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 8px; background: #ff5b4a; color: #fff; font-size: 10px; line-height: 16px; margin-left: 3px; }
#findcard { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 64px); width: min(300px, 84vw); transform: translate(-50%, -16px) scale(.92); opacity: 0; pointer-events: none; z-index: 60; transition: transform .28s cubic-bezier(.2,1.4,.4,1), opacity .2s; }
#findcard.show { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
#findcard .fc-in { background: rgba(22,24,29,.94); border: 2px solid var(--rc, #ccc); border-radius: 18px; padding: 12px 14px 12px; text-align: center; box-shadow: 0 0 22px var(--rc, #ccc), 0 8px 24px rgba(0,0,0,.5); }
#findcard .fc-ic { font-size: 40px; line-height: 1.1; filter: drop-shadow(0 0 8px var(--rc)); animation: fcpop .6s ease-out; }
#findcard .fc-r { color: var(--rc); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
#findcard .fc-n { font-size: 18px; font-weight: 800; margin: 2px 0; }
#findcard .fc-s { font-size: 12px; color: var(--mute); margin-bottom: 8px; }
#findcard .row { justify-content: center; gap: 8px; }
#findcard .btn { min-height: 40px; }
@keyframes fcpop { 0% { transform: scale(.2) rotate(-30deg); } 70% { transform: scale(1.25) rotate(8deg); } 100% { transform: none; } }
.fset .t1 small { color: var(--mute); font-weight: 600; margin-left: 4px; }
.fset.done { border: 1px solid #5fd068; }
.fset .ok { color: #5fd068; font-style: normal; font-size: 11px; margin-left: 4px; }
.fgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.ftile { background: #111317; border-radius: 10px; padding: 6px 3px; text-align: center; border-bottom: 3px solid var(--rc); display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.ftile .fic { font-size: 24px; line-height: 1.2; }
.ftile b { font-size: 10px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ftile small { font-size: 10px; color: var(--mute); }
.ftile .btn.sm { padding: 3px 6px; min-height: 26px; font-size: 10px; margin-top: 2px; }
.ftile.unk { opacity: .45; }
.ftile.unk .fic { filter: grayscale(1); }
.frow { border-left: 4px solid var(--rc); }
.frow .fic { font-size: 28px; margin-right: 8px; }
.fnote { text-align: center; margin: 8px 0 4px; }

/* v11: naming places */
#modal.naming { align-items: flex-start; padding-top: calc(env(safe-area-inset-top, 0px) + 56px); }
#modal.naming .sheet { border-radius: 20px; width: min(360px, 92vw); }
.namerow { display: flex; gap: 8px; margin: 10px 0 4px; }
.namerow input { flex: 1; min-width: 0; font-size: 18px; padding: 10px 12px; border-radius: 12px; border: 2px solid #3a3f47; background: #111317; color: #fff; font-weight: 700; text-transform: uppercase; -webkit-appearance: none; }
.namerow input:focus { outline: none; border-color: var(--gold); }
.namerow .dice { font-size: 22px; min-width: 52px; padding: 0; }
.nameerr { color: #ff6b5b; font-size: 12px; min-height: 16px; margin-bottom: 4px; }
.names .pname { font-size: 13px; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nameoffer { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 60px); transform: translate(-50%, -12px); opacity: 0; pointer-events: none; z-index: 45; border: 2px solid var(--gold); background: rgba(22,24,29,.94); color: #fff; font: 700 13px Rubik, sans-serif; padding: 9px 14px; border-radius: 20px; box-shadow: 0 6px 18px rgba(0,0,0,.45); transition: opacity .2s, transform .25s; white-space: nowrap; }
#nameoffer.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#nameoffer b { color: var(--gold); }

/* v12: test track */
.btn.teal { border-image: none; background: linear-gradient(#2fc7b5, #17998a); border: 0; border-radius: 12px; color: #fff; box-shadow: 0 3px 0 #0b6b60; }
.btn.teal:disabled { opacity: .5; }
.driven { font-size: 11px; font-weight: 800; color: #5fe0c8; align-self: center; }
#app.driving #tabs, #app.driving #actions, #app.driving #sheet, #app.driving #topline, #app.driving .chip.scrap, #app.driving .chip.lvl, #app.driving #hud-menu, #app.driving #skipbtn { display: none !important; }
#drivehud { position: fixed; inset: 0; z-index: 40; pointer-events: none; display: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#drivehud.show { display: block; }
#drivehud .dtop { position: absolute; left: 10px; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 54px); display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
#drivehud .dtop .btn { pointer-events: auto; min-height: 40px; padding: 8px 12px; }
#drivehud .dtime { text-align: center; background: rgba(15,17,21,.72); border-radius: 14px; padding: 4px 12px; }
#drivehud .dtime b { display: block; font: 800 26px KenneyFuture, Rubik, sans-serif; color: #ffd84a; }
#drivehud .dtime small, #drivehud .dspd small { font-size: 11px; color: #d6dbe2; }
#drivehud .dspd { text-align: center; background: rgba(15,17,21,.72); border-radius: 14px; padding: 4px 10px; min-width: 62px; }
#drivehud .dspd b { display: block; font: 800 22px KenneyFuture, Rubik, sans-serif; color: #fff; }
#dmsg { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%) scale(.9); opacity: 0; transition: opacity .2s, transform .2s; font: 800 22px Rubik, sans-serif; color: #fff; text-align: center; text-shadow: 0 2px 6px rgba(0,0,0,.7); white-space: normal; width: max-content; max-width: 92vw; }
#dmsg.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#dmsg.bad { color: #ff7a6b; } #dmsg.good { color: #7dffb0; font-size: 24px; }
#drivehud .dctl { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); height: 150px; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 12px; pointer-events: auto; touch-action: none; }
html.hosted #drivehud .dctl { bottom: 72px; }
#drivehud .dsteer, #drivehud .dped { display: flex; gap: 10px; align-items: flex-end; }
#drivehud .dbtn { width: 78px; height: 78px; border-radius: 22px; border: 2px solid rgba(255,255,255,.35); background: rgba(20,22,27,.55); color: #fff; font: 800 26px Rubik, sans-serif; touch-action: none; -webkit-tap-highlight-color: transparent; }
#drivehud .dbtn.on { background: rgba(255,216,74,.55); border-color: #ffd84a; transform: scale(.96); }
#drivehud .dbtn.brake { font-size: 13px; height: 70px; background: rgba(160,40,40,.55); }
#drivehud .dbtn.gas { font-size: 15px; height: 118px; width: 82px; background: rgba(30,140,70,.6); }
/* v14 yard editor */
#app.editing #tabs, #app.editing #actions, #app.editing #sheet, #app.editing #topline, #app.editing .chip.scrap, #app.editing .chip.lvl, #app.editing #hud-menu, #app.editing #skipbtn, #app.editing #hud { display: none !important; }
#edithud { position: fixed; inset: 0; z-index: 40; pointer-events: none; display: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#edithud.show { display: block; }
#edithud .etop { position: absolute; left: 10px; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 10px); display: flex; gap: 8px; align-items: center; pointer-events: auto; }
#edithud .eappeal { flex: 1; background: rgba(20,22,28,.82); border-radius: 12px; padding: 7px 12px; color: #fff; font-weight: 800; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
#edithud .eappeal b { color: var(--gold); margin: 0 3px; }
#edithud .eappeal small { color: #9fe8a6; font-size: 14px; }
#edithud .edrawer { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 8px calc(env(safe-area-inset-bottom, 0px) + 8px); background: rgba(24,26,33,.94); border-top: 2px solid rgba(255,255,255,.12); border-radius: 16px 16px 0 0; pointer-events: auto; max-height: 52vh; overflow-y: auto; }
html.hosted #edithud .edrawer { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 60px); }
#edithud .seg { margin-bottom: 6px; }
#edithud .ebar { min-height: 40px; display: flex; gap: 6px; align-items: center; padding: 4px 6px; border-radius: 10px; margin-bottom: 6px; background: rgba(255,255,255,.06); color: #fff; }
#edithud .ebar.ok { background: rgba(60,200,120,.18); } #edithud .ebar.bad { background: rgba(255,77,77,.2); }
#edithud .estat { flex: 1; font-size: 13px; font-weight: 800; line-height: 1.15; }
#edithud .ebar .btn.sm { min-width: 40px; padding: 8px 9px; }
#edithud .eitems { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
#edithud .eitem { flex: 0 0 76px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 12px; border: 2px solid rgba(255,255,255,.14); background: rgba(255,255,255,.07); color: #fff; font: inherit; position: relative; }
#edithud .eitem.on { border-color: var(--gold); background: rgba(255,191,47,.18); }
#edithud .eitem:disabled { opacity: .45; }
#edithud .eitem .ei { font-size: 26px; line-height: 1.1; } #edithud .eitem .en { font-size: 11px; font-weight: 800; text-align: center; line-height: 1.05; } #edithud .eitem .ep { font-size: 11px; color: #9fe8a6; font-weight: 800; }
#edithud .eitem .ea { position: absolute; top: 2px; right: 4px; font-size: 10px; color: var(--gold); font-weight: 900; }
#edithud .ethemes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#edithud .etheme { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; padding: 8px; border-radius: 12px; border: 2px solid rgba(255,255,255,.14); background: rgba(255,255,255,.07); color: #fff; font: inherit; text-align: left; }
#edithud .etheme.on { border-color: var(--gold); } #edithud .etheme:disabled { opacity: .45; } #edithud .etheme small { color: #9fe8a6; font-weight: 800; }
#edithud .sw3 { display: flex; gap: 3px; } #edithud .sw3 i { width: 22px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.3); }
#edithud .erow { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
#edithud .chipb { padding: 7px 10px; border-radius: 10px; border: 2px solid rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; gap: 5px; }
#edithud .chipb.on { border-color: var(--gold); background: rgba(255,191,47,.2); }
#edithud .chipb.em { font-size: 18px; padding: 4px 8px; min-width: 40px; justify-content: center; }
#edithud .chipb .dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6); display: inline-block; }
#edithud .swb { width: 30px; height: 30px; border-radius: 8px; border: 2px solid rgba(255,255,255,.25); padding: 0; }
#edithud .swb.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; margin: 6px 0; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, #4fe39a, var(--gold)); }
b.gold { color: var(--gold); }
/* v15 orders + car shows */
.order ul.chk { list-style: none; margin: 3px 0 2px; padding: 0; display: flex; flex-wrap: wrap; gap: 3px 8px; }
.order ul.chk li { font-size: 12.5px; font-weight: 800; }
.order ul.chk li.ok { color: #5fd068; } .order ul.chk li.no { color: #ffb0a8; }
.order.ready { border-color: var(--gold) !important; }
.order .price small, .card .price small { display: block; font-size: 10px; opacity: .7; }
.t3.gold, .gold { color: var(--gold); }
.timer i { position: absolute; right: 6px; top: 4px; font-style: normal; font-size: 10px; font-weight: 800; opacity: .8; }
.card.show { border: 2px solid rgba(255,191,47,.45); }
.entries { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; -webkit-overflow-scrolling: touch; }
.ent { flex: 0 0 96px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px; border-radius: 12px; border: 2px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: inherit; font: inherit; }
.ent img { width: 84px; height: 52px; object-fit: contain; } .ent b { font-size: 11px; line-height: 1.1; text-align: center; } .ent small { font-size: 11px; color: #9fe8a6; font-weight: 800; }
.ent.on { border-color: var(--gold); background: rgba(255,191,47,.16); } .ent:disabled { opacity: .45; }
#modal.showmodal .sheet { max-height: 92vh; overflow-y: auto; }
.showres .podium { display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin: 8px 0; }
.showres .pod { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.showres .pod img { width: 100%; max-width: 110px; height: 64px; object-fit: contain; animation: podIn .6s ease-out both; }
.showres .pod b { font-size: 12px; text-align: center; line-height: 1.1; } .showres .pod small { font-weight: 800; color: var(--gold); }
.showres .pod .step { width: 100%; border-radius: 10px 10px 0 0; background: linear-gradient(#5a6170, #3a404c); display: flex; align-items: flex-start; justify-content: center; font-size: 28px; padding-top: 6px; margin-top: 4px; }
.showres .pod.p1 .step { height: 92px; background: linear-gradient(#ffd45c, #c08a12); } .showres .pod.p2 .step { height: 66px; background: linear-gradient(#e3e7ee, #9aa2ad); } .showres .pod.p3 .step { height: 48px; background: linear-gradient(#e0a070, #9a5a2a); }
.showres .pod.me b { color: var(--gold); }
.showres .pod.p2 img { animation-delay: .25s; } .showres .pod.p1 img { animation-delay: .5s; }
@keyframes podIn { from { opacity: 0; transform: translateY(-20px) scale(.8); } to { opacity: 1; transform: none; } }
.judges { display: flex; gap: 6px; margin: 6px 0; } .judges div { flex: 1; text-align: center; background: rgba(255,255,255,.07); border-radius: 10px; padding: 5px 2px; animation: podIn .4s ease-out both; }
.judges small { display: block; font-size: 10.5px; opacity: .8; } .judges b { font-size: 20px; color: var(--gold); }
.trophies { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.tro { display: flex; flex-direction: column; align-items: center; background: linear-gradient(#3a2d14, #22252c); border-radius: 10px; padding: 6px 2px; }
.tro span { font-size: 30px; } .tro small { font-size: 9.5px; text-align: center; line-height: 1.1; opacity: .85; }
/* v16 regulars, rivals, town */
.seg { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; padding-left: 7px; padding-right: 7px; }
.pface { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-size: 19px; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.35); box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.reg { display: flex; align-items: center; gap: 5px; font-size: 12px; margin: 2px 0; flex-wrap: wrap; } .reg i { opacity: .8; } .reg .fr { color: #ff7aa8; font-weight: 800; } .reg .tip { color: var(--gold); font-weight: 800; }
.auc .alog { display: flex; flex-direction: column; gap: 1px; margin: 3px 0; font-size: 12px; } .auc .alog span { opacity: .7; } .auc .alog span.top { opacity: 1; font-weight: 800; } .auc .alog span.me { color: #5fd068; }
.person .fbar { position: relative; height: 8px; border-radius: 6px; background: rgba(255,255,255,.12); margin: 4px 0; overflow: hidden; } .person .fbar i { display: block; height: 100%; background: linear-gradient(90deg, #ff7aa8, #ffbf2f); } .person .fbar em { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(0,0,0,.5); }
.person.dim { opacity: .5; } .person .story { margin-top: 6px; font-size: 13px; line-height: 1.3; } .person .story p { margin: 4px 0; } .person .story .lock { opacity: .55; }
.rivals .rrow { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.07); } .rivals .rrow:last-child { border: 0; }
.rivals .rk { width: 16px; text-align: center; color: var(--gold); } .rivals .sc { font-size: 16px; color: var(--gold); } .rivals .rrow.me .t1 { color: var(--gold); }
.tunerow .reserved { color: #ffd166; font-weight: 800; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* v19: recenter camera */
#recenter { display: none; position: absolute; right: calc(env(safe-area-inset-right, 0px) + 8px); top: calc(var(--sat) + 190px); z-index: 6; width: 42px; height: 42px; border-radius: 21px; border: 2px solid rgba(255,255,255,.35); background: rgba(15,17,21,.8); color: #fff; font-size: 20px; line-height: 1; padding: 0; touch-action: manipulation; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
#recenter.show { display: block; animation: rcIn .25s ease-out; }
@keyframes rcIn { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* v20: toast queue — lower while a close-up's SKIP button is up; duplicate counter */
#toasts { transition: top .25s; }
#toasts.low { top: calc(var(--sat) + 96px); }
.toast i.n { font-style: normal; font-weight: 800; color: var(--gold); margin-left: 6px; }
/* v21: decor categories */
#edithud .ecats { display: flex; gap: 5px; overflow-x: auto; padding: 2px 0 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
#edithud .ecats::-webkit-scrollbar { display: none; }
#edithud .ecats .chipb { flex: 0 0 auto; white-space: nowrap; font-size: 12px; padding: 5px 9px; }
/* v22: Tuning Shop interior (full screen, yard paused) */
#garage { position: fixed; inset: 0; z-index: 42; display: none; flex-direction: column; pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#garage.show { display: flex; }
#app.ingarage #hud, #app.ingarage #tabs, #app.ingarage #actions, #app.ingarage #sheet, #app.ingarage #pops, #app.ingarage #recenter, #app.ingarage #topline, #app.ingarage #skipbtn, #app.ingarage #nameoffer, #app.ingarage #findcard { visibility: hidden; }
#garage .gtop { pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px; background: linear-gradient(#111317ee, #11131700); }
#garage .gback { flex: none; }
#garage .gname { flex: 1; min-width: 0; line-height: 1.15; } #garage .gname b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #garage .gname small { color: var(--mute); font-size: 11px; }
#garage .gval { text-align: right; font-weight: 800; color: var(--green); font-size: 17px; line-height: 1.1; } #garage .gval small { display: block; font-size: 11px; color: var(--mute); font-weight: 600; }
#garage .up { color: var(--green) !important; } #garage .dn { color: #ff6b5b !important; }
#garage .gview { flex: 1; pointer-events: auto; touch-action: none; min-height: 120px; }
#garage .gpanel { pointer-events: auto; background: rgba(22,24,29,.97); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 8px 10px calc(var(--sab, env(safe-area-inset-bottom, 0px)) + 8px); display: flex; flex-direction: column; gap: 6px; max-height: calc(var(--vh) * 66); overflow-y: auto; }
#garage .gsets, #garage .ggrp { display: flex; gap: 6px; } #garage .gsets button, #garage .ggrp button { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--card); color: var(--txt); border-radius: 10px; padding: 6px 4px; font: 700 12.5px system-ui, sans-serif; white-space: nowrap; }
#garage .gsets button em { font-style: normal; font-size: 10px; color: var(--mute); display: block; font-weight: 600; }
#garage .gsets button.on { border-color: #3ad0ff; background: #173444; } #garage .ggrp button.on { background: var(--gold); color: #1a1a1a; border-color: var(--gold); }
#garage .hscroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; } #garage .hscroll::-webkit-scrollbar { display: none; }
#garage .gcat { flex: none; border: 1px solid var(--line); background: transparent; color: var(--txt); border-radius: 999px; padding: 5px 11px; font: 600 12.5px system-ui, sans-serif; } #garage .gcat.on { background: #fff; color: #111; } #garage .gcat.set:not(.on) { border-color: var(--green); color: var(--green); }
#garage .gopt { flex: none; width: 112px; text-align: left; border: 2px solid var(--line); background: var(--card); color: var(--txt); border-radius: 12px; padding: 6px 8px; position: relative; font: 12px system-ui, sans-serif; }
#garage .gopt b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #garage .gopt small { color: var(--mute); display: block; }
#garage .gopt.on { border-color: var(--gold); background: #3a3320; } #garage .gopt.fit small { color: var(--green); }
#garage .gopt .tier { position: absolute; right: 6px; top: 4px; font-size: 8px; letter-spacing: 1px; color: #3ad0ff; }
#garage .gopt .gd { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; min-height: 14px; } #garage .gopt .gd i { font-style: normal; font-size: 10px; font-weight: 700; } #garage .gopt .gd i.st { color: var(--gold); }
#garage .gcols .tcol { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #ffffff44; } #garage .gcols .tcol.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
#garage .gstats { display: grid; gap: 3px; } #garage .gst { display: grid; grid-template-columns: 70px 1fr 78px; align-items: center; gap: 6px; font-size: 11.5px; } #garage .gst span { color: var(--mute); } #garage .gst b { text-align: right; font-size: 11.5px; }
#garage .gbar { position: relative; height: 7px; border-radius: 4px; background: #ffffff14; overflow: hidden; } #garage .gbar div { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; } #garage .gbar .a { background: #cfd6e0; } #garage .gbar .b.up { background: var(--green); } #garage .gbar .b.dn { background: #ff6b5b; }
#garage .gfoot { display: flex; align-items: center; gap: 8px; } #garage .gfoot .t3 { flex: 1; font-size: 11.5px; color: var(--mute); } #garage .gfoot .btn { flex: none; min-width: 120px; }
@media (max-height: 700px) {
  #garage .gpanel { gap: 4px; padding-top: 6px; } #garage .gsets button, #garage .ggrp button { padding: 4px 3px; font-size: 12px; } #garage .gcat { padding: 4px 10px; font-size: 12px; }
  #garage .gopt { padding: 4px 7px; } #garage .gopt .gd { margin-top: 1px; } #garage .gcols .tcol { width: 24px; height: 24px; } #garage .gstats { gap: 1px; } #garage .gst { font-size: 10.5px; } #garage .gst b { font-size: 10.5px; }
}

/* v23: Build Bay interior shares the shop layout */
#buildbay { position: fixed; inset: 0; z-index: 42; display: none; flex-direction: column; pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#buildbay.show { display: flex; }
#buildbay .gtop { pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px; background: linear-gradient(#111317ee, #11131700); }
#buildbay .gback { flex: none; }
#buildbay .gname { flex: 1; min-width: 0; line-height: 1.15; } #buildbay .gname b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #buildbay .gname small { color: var(--mute); font-size: 11px; }
#buildbay .gval { text-align: right; font-weight: 800; color: var(--green); font-size: 17px; line-height: 1.1; } #buildbay .gval small { display: block; font-size: 11px; color: var(--mute); font-weight: 600; }
#buildbay .up { color: var(--green) !important; } #buildbay .dn { color: #ff6b5b !important; }
#buildbay .gview { flex: 1; pointer-events: auto; touch-action: none; min-height: 120px; }
#buildbay .gpanel { pointer-events: auto; background: rgba(22,24,29,.97); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 8px 10px calc(var(--sab, env(safe-area-inset-bottom, 0px)) + 8px); display: flex; flex-direction: column; gap: 6px; max-height: calc(var(--vh) * 66); overflow-y: auto; }
#buildbay .gsets, #buildbay .ggrp { display: flex; gap: 6px; } #buildbay .gsets button, #buildbay .ggrp button { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--card); color: var(--txt); border-radius: 10px; padding: 6px 4px; font: 700 12.5px system-ui, sans-serif; white-space: nowrap; }
#buildbay .gsets button em { font-style: normal; font-size: 10px; color: var(--mute); display: block; font-weight: 600; }
#buildbay .gsets button.on { border-color: #3ad0ff; background: #173444; } #buildbay .ggrp button.on { background: var(--gold); color: #1a1a1a; border-color: var(--gold); }
#buildbay .hscroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; } #buildbay .hscroll::-webkit-scrollbar { display: none; }
#buildbay .gcat { flex: none; border: 1px solid var(--line); background: transparent; color: var(--txt); border-radius: 999px; padding: 5px 11px; font: 600 12.5px system-ui, sans-serif; } #buildbay .gcat.on { background: #fff; color: #111; } #buildbay .gcat.set:not(.on) { border-color: var(--green); color: var(--green); }
#buildbay .gopt { flex: none; width: 112px; text-align: left; border: 2px solid var(--line); background: var(--card); color: var(--txt); border-radius: 12px; padding: 6px 8px; position: relative; font: 12px system-ui, sans-serif; }
#buildbay .gopt b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #buildbay .gopt small { color: var(--mute); display: block; }
#buildbay .gopt.on { border-color: var(--gold); background: #3a3320; } #buildbay .gopt.fit small { color: var(--green); }
#buildbay .gopt .tier { position: absolute; right: 6px; top: 4px; font-size: 8px; letter-spacing: 1px; color: #3ad0ff; }
#buildbay .gopt .gd { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; min-height: 14px; } #buildbay .gopt .gd i { font-style: normal; font-size: 10px; font-weight: 700; } #buildbay .gopt .gd i.st { color: var(--gold); }
#buildbay .gcols .tcol { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #ffffff44; } #buildbay .gcols .tcol.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
#buildbay .gstats { display: grid; gap: 3px; } #buildbay .gst { display: grid; grid-template-columns: 70px 1fr 78px; align-items: center; gap: 6px; font-size: 11.5px; } #buildbay .gst span { color: var(--mute); } #buildbay .gst b { text-align: right; font-size: 11.5px; }
#buildbay .gbar { position: relative; height: 7px; border-radius: 4px; background: #ffffff14; overflow: hidden; } #buildbay .gbar div { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; } #buildbay .gbar .a { background: #cfd6e0; } #buildbay .gbar .b.up { background: var(--green); } #buildbay .gbar .b.dn { background: #ff6b5b; }
#buildbay .gfoot { display: flex; align-items: center; gap: 8px; } #buildbay .gfoot .t3 { flex: 1; font-size: 11.5px; color: var(--mute); } #buildbay .gfoot .btn { flex: none; min-width: 120px; }
#buildbay .bsteps { display: flex; gap: 4px; justify-content: space-between; } #buildbay .bsteps span { flex: 1; text-align: center; font-size: 14px; padding: 4px 0; border-radius: 8px; background: #ffffff10; } #buildbay .bsteps span.done { background: #1f4a2a; color: var(--green); font-weight: 800; } #buildbay .bsteps span.on { background: var(--gold); }
#buildbay .bstep b { font-size: 15px; } #buildbay .bstep small { color: var(--mute); font-size: 12px; }
#buildbay .bcard { flex: none; width: 128px; text-align: left; border: 2px solid var(--line); background: var(--card); color: var(--txt); border-radius: 12px; padding: 6px 8px; font: 12px system-ui, sans-serif; } #buildbay .bcard b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #buildbay .bcard small { display: block; color: var(--mute); }
#buildbay .bcard.on { border-color: var(--gold); background: #3a3320; } #buildbay .bcard.locked { opacity: .55; }
#buildbay .bpart { flex: none; width: 66px; border: 2px solid var(--line); border-bottom: 3px solid var(--rc); background: var(--card); color: var(--txt); border-radius: 10px; padding: 4px; font: 11px system-ui, sans-serif; } #buildbay .bpart b { display: block; font-size: 14px; } #buildbay .bpart small { color: var(--mute); font-size: 10px; } #buildbay .bpart.on { border-color: var(--gold); background: #3a3320; }
#buildbay .breveal { text-align: center; padding: 4px 0; } #buildbay .brar { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--rc); color: #111; font-weight: 800; font-size: 12px; } #buildbay .bbig { font-size: 30px; font-weight: 900; color: var(--green); } #buildbay .bq { color: var(--mute); font-size: 13px; }
#buildbay .bacts { display: flex; gap: 6px; } #buildbay .bacts .btn { flex: 1; } #buildbay .bscrap { align-self: center; opacity: .75; font-size: 11px; }

@media (max-height: 700px) {
  #buildbay .gpanel { gap: 4px; padding-top: 6px; } #buildbay .gsets button, #buildbay .ggrp button { padding: 4px 3px; font-size: 12px; } #buildbay .gcat { padding: 4px 10px; font-size: 12px; }
  #buildbay .gopt { padding: 4px 7px; } #buildbay .gopt .gd { margin-top: 1px; } #buildbay .gcols .tcol { width: 24px; height: 24px; } #buildbay .gstats { gap: 1px; } #buildbay .gst { font-size: 10.5px; } #buildbay .gst b { font-size: 10.5px; }
}

/* v24: Collector Garage showroom */
#collectroom { position: fixed; inset: 0; z-index: 42; display: none; flex-direction: column; pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#collectroom.show { display: flex; }
#collectroom .gtop { pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px; background: linear-gradient(#111317ee, #11131700); }
#collectroom .gback { flex: none; }
#collectroom .gname { flex: 1; min-width: 0; line-height: 1.15; } #collectroom .gname b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #collectroom .gname small { color: var(--mute); font-size: 11px; }
#collectroom .gval { text-align: right; font-weight: 800; color: var(--green); font-size: 17px; line-height: 1.1; } #collectroom .gval small { display: block; font-size: 11px; color: var(--mute); font-weight: 600; }
#collectroom .up { color: var(--green) !important; } #collectroom .dn { color: #ff6b5b !important; }
#collectroom .gview { flex: 1; pointer-events: auto; touch-action: none; min-height: 120px; }
#collectroom .gpanel { pointer-events: auto; background: rgba(22,24,29,.97); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 8px 10px calc(var(--sab, env(safe-area-inset-bottom, 0px)) + 8px); display: flex; flex-direction: column; gap: 6px; max-height: calc(var(--vh) * 66); overflow-y: auto; }
#collectroom .gsets, #collectroom .ggrp { display: flex; gap: 6px; } #collectroom .gsets button, #collectroom .ggrp button { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--card); color: var(--txt); border-radius: 10px; padding: 6px 4px; font: 700 12.5px system-ui, sans-serif; white-space: nowrap; }
#collectroom .gsets button em { font-style: normal; font-size: 10px; color: var(--mute); display: block; font-weight: 600; }
#collectroom .gsets button.on { border-color: #3ad0ff; background: #173444; } #collectroom .ggrp button.on { background: var(--gold); color: #1a1a1a; border-color: var(--gold); }
#collectroom .hscroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; } #collectroom .hscroll::-webkit-scrollbar { display: none; }
#collectroom .gcat { flex: none; border: 1px solid var(--line); background: transparent; color: var(--txt); border-radius: 999px; padding: 5px 11px; font: 600 12.5px system-ui, sans-serif; } #collectroom .gcat.on { background: #fff; color: #111; } #collectroom .gcat.set:not(.on) { border-color: var(--green); color: var(--green); }
#collectroom .gopt { flex: none; width: 112px; text-align: left; border: 2px solid var(--line); background: var(--card); color: var(--txt); border-radius: 12px; padding: 6px 8px; position: relative; font: 12px system-ui, sans-serif; }
#collectroom .gopt b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #collectroom .gopt small { color: var(--mute); display: block; }
#collectroom .gopt.on { border-color: var(--gold); background: #3a3320; } #collectroom .gopt.fit small { color: var(--green); }
#collectroom .gopt .tier { position: absolute; right: 6px; top: 4px; font-size: 8px; letter-spacing: 1px; color: #3ad0ff; }
#collectroom .gopt .gd { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; min-height: 14px; } #collectroom .gopt .gd i { font-style: normal; font-size: 10px; font-weight: 700; } #collectroom .gopt .gd i.st { color: var(--gold); }
#collectroom .gcols .tcol { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #ffffff44; } #collectroom .gcols .tcol.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
#collectroom .gstats { display: grid; gap: 3px; } #collectroom .gst { display: grid; grid-template-columns: 70px 1fr 78px; align-items: center; gap: 6px; font-size: 11.5px; } #collectroom .gst span { color: var(--mute); } #collectroom .gst b { text-align: right; font-size: 11.5px; }
#collectroom .gbar { position: relative; height: 7px; border-radius: 4px; background: #ffffff14; overflow: hidden; } #collectroom .gbar div { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; } #collectroom .gbar .a { background: #cfd6e0; } #collectroom .gbar .b.up { background: var(--green); } #collectroom .gbar .b.dn { background: #ff6b5b; }
#collectroom .gfoot { display: flex; align-items: center; gap: 8px; } #collectroom .gfoot .t3 { flex: 1; font-size: 11.5px; color: var(--mute); } #collectroom .gfoot .btn { flex: none; min-width: 120px; }
#app.ingarage #collectroom { visibility: visible; }
#collectroom .cperks { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--mute); } #collectroom .cperks span { background: #ffffff10; border-radius: 999px; padding: 2px 8px; } #collectroom .cperks span.got { color: var(--gold); }
#collectroom .ccar { flex: none; width: 118px; text-align: left; border: 2px solid var(--line); border-bottom: 3px solid var(--rc, var(--line)); background: var(--card); color: var(--txt); border-radius: 12px; padding: 6px 8px; font: 12px system-ui, sans-serif; } #collectroom .ccar b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #collectroom .ccar small { color: var(--mute); }
#collectroom .ccar.on { border-color: var(--gold); background: #3a3320; } #collectroom .ccar.add { border-style: dashed; }
#collectroom .cstat .t1 small { color: var(--mute); font-weight: 600; font-size: 12px; } #collectroom .cgrid { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12px; margin-top: 4px; } #collectroom .cgrid span { color: var(--mute); } #collectroom .cgrid b { text-align: right; font-weight: 700; }
#collectroom .cacts { display: flex; gap: 6px; } #collectroom .cacts .btn { flex: 1; }
@media (max-height: 700px) { #collectroom .cgrid { font-size: 11px; gap: 1px 8px; } #collectroom .gpanel { gap: 4px; } }
