@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(../assets/fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(../assets/fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(../assets/fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 700 900; font-display: swap; src: url(../assets/fonts/inter-latin-700-normal.woff2) format('woff2'); }
/* Loopwhistle Thrillworks — fairground purple, ticket gold, candy red. Original styling. */
:root { --ink: #2a2440; --plum: #5b2a86; --plum2: #3a1d5c; --gold: #ffd23f; --red: #e8453c; --mint: #3fbf6a; --sky: #2f7fe0; --card: rgba(255,255,255,0.96); --r: 16px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: radial-gradient(ellipse at top, #7a3fb0, #3a1d5c 55%, #1d0f30); color: var(--ink); font: 500 15px/1.35 Inter, system-ui, -apple-system, Segoe UI, sans-serif; -webkit-tap-highlight-color: transparent; overflow-x: clip; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 12px; color: inherit; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.hidden { display: none !important; }
#app { display: flex; flex-direction: column; height: 100%; max-width: 1560px; margin: 0 auto; min-width: 0; }
/* ---------- HUD */
.hud { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: #fff; flex-wrap: wrap; }
.hud > * { min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 900; letter-spacing: 0.2px; font-size: 19px; margin-right: auto; text-shadow: 0 2px 8px rgba(0,0,0,0.35); white-space: nowrap; }
.brand em { font-style: normal; color: var(--gold); }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.pill { display: flex; align-items: center; gap: 6px; background: rgba(25,10,45,0.55); border: 1px solid rgba(255,255,255,0.16); border-radius: 999px; padding: 5px 12px 5px 6px; font-weight: 800; color: #fff; backdrop-filter: blur(6px); white-space: nowrap; }
.pill small { font-weight: 600; opacity: 0.8; font-size: 12px; }
.pill.bump { animation: bump 0.45s ease; } @keyframes bump { 30% { transform: scale(1.18); } }
.ico-coin, .ico-bolt { width: 22px; height: 22px; border-radius: 50%; display: inline-block; flex: none; }
.ico-coin { background: radial-gradient(circle at 35% 35%, #fff3b0, #ffd23f 55%, #c98a10); box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15); }
.ico-bolt { background: #7fe0ff; clip-path: polygon(55% 0, 15% 58%, 46% 58%, 38% 100%, 85% 38%, 54% 38%, 66% 0); border-radius: 0; }
.ico-bolt.sm { width: 12px; height: 13px; vertical-align: -2px; background: currentColor; }
.lvl { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(#ffe27a, #f2a91f); color: #5a2d00; font-weight: 900; }
.xpbar { width: 70px; height: 8px; background: rgba(255,255,255,0.2); border-radius: 5px; overflow: hidden; } .xpbar div { height: 100%; background: linear-gradient(90deg, #8ef0a8, #3fbf6a); transition: width 0.5s; }
.pill.rating .star { color: var(--gold); font-size: 18px; } .pill.rating, .pill.cash { cursor: pointer; }
.pill.cash .bfill { width: 46px; height: 7px; border-radius: 5px; background: rgba(255,255,255,0.2); overflow: hidden; } .pill.cash .bfill div { height: 100%; background: linear-gradient(90deg, #ffe27a, #ff9a2a); transition: width 0.6s; }
.pill.cash.ready { background: rgba(140,80,10,0.7); } .pill.cash.full { animation: want 1.1s infinite; background: #c8641a; }
@keyframes want { 50% { box-shadow: 0 0 0 5px rgba(255,210,63,0.55); } }
.iconbtn { width: 36px; height: 36px; border-radius: 50%; background: rgba(25,10,45,0.55); font-size: 17px; }
.mode { font-size: 12px; font-weight: 700; color: #e6d8ff; background: rgba(0,0,0,0.25); padding: 4px 10px; border-radius: 99px; } .mode.online { color: #8ef0a8; }
/* ---------- layout */
main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 12px; padding: 0 14px 14px; min-height: 0; }
.stage { display: flex; flex-direction: column; gap: 8px; min-height: 0; min-width: 0; }
.canvaswrap { position: relative; flex: 1; min-height: 420px; border-radius: 22px; overflow: hidden; background: #5d9c4f; box-shadow: 0 10px 40px rgba(0,0,0,0.4), inset 0 0 0 3px rgba(255,255,255,0.12); }
#park { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.banner { position: absolute; left: 10px; right: 10px; top: 10px; background: rgba(42,36,64,0.9); color: #fff; padding: 8px 12px; border-radius: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; z-index: 5; }
.banner button { background: var(--gold); color: #4a2a00; padding: 6px 10px; font-weight: 800; } .banner select { padding: 5px 6px; border-radius: 8px; border: 0; width: auto; }
.questchip { position: absolute; right: 10px; bottom: 10px; max-width: 340px; background: rgba(255,255,255,0.94); border-radius: 14px; padding: 8px 12px; font-size: 13px; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.25); z-index: 4; }
.questchip b { display: block; color: var(--plum); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; } .questchip.ready { background: #fff4c2; animation: want 1.2s infinite; } .questchip.ready b { color: #b05a00; }
.qbar, .grow, .bar { height: 7px; background: #ece6f6; border-radius: 5px; overflow: hidden; margin-top: 4px; } .qbar div, .grow div, .bar div { height: 100%; background: linear-gradient(90deg, #a77bf0, var(--plum)); border-radius: 5px; transition: width 0.4s; }
.bar.bad div { background: linear-gradient(90deg, #ff9a6a, var(--red)); }
.placehint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); background: rgba(42,36,64,0.92); color: #fff; padding: 8px 10px 8px 14px; border-radius: 14px; display: flex; gap: 8px; align-items: center; z-index: 6; font-size: 14px; white-space: nowrap; max-width: calc(100% - 20px); }
.zoom { position: absolute; left: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 4; } .zoom button { width: 36px; height: 36px; border-radius: 12px; background: rgba(255,255,255,0.9); font-weight: 900; font-size: 18px; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.card { position: absolute; top: 12px; left: 56px; width: 330px; max-height: calc(100% - 24px); overflow: auto; background: var(--card); border-radius: 18px; padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); z-index: 7; animation: pop 0.25s cubic-bezier(.2,1.5,.4,1); }
@keyframes pop { from { transform: scale(0.9); opacity: 0; } }
.card h3 { margin: 0 0 4px; font-size: 18px; } .card .x { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; background: #f0eaf8; border-radius: 50%; }
.cardhead { display: flex; gap: 10px; align-items: center; padding-right: 26px; margin-bottom: 6px; } .cardhead img { width: 60px; height: 60px; flex: none; }
.swatch { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 26px; box-shadow: inset 0 0 0 3px rgba(0,0,0,0.12); } .swatch.face { background: #fff4d6; font-size: 34px; } .swatch.star { background: var(--plum); color: var(--gold); font-size: 30px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: #ece6f6; color: #4b3a6e; margin: 2px 4px 2px 0; }
.tag.ok { background: #d6f5df; color: #1e7a3c; } .tag.bad { background: #ffe0dc; color: #b0281e; } .tag.warn { background: #fff0c2; color: #8a5a00; } .tag.gold { background: linear-gradient(90deg, #fff1a8, #ffd36a); color: #7a4a00; }
.need, .rate { display: grid; grid-template-columns: 82px 1fr 44px; gap: 8px; align-items: center; font-size: 13px; margin: 5px 0; } .need .bar, .rate .bar { margin: 0; }
.rate { grid-template-columns: 82px 1fr 44px 64px; } .rate small { color: #6b5f86; font-size: 11.5px; } .rate b { text-align: right; }
.rate.ex .bar div { background: linear-gradient(90deg, #8ef0a8, #2fa65a); } .rate.in .bar div { background: linear-gradient(90deg, #ffd66a, #f08a1c); } .rate.na .bar div { background: linear-gradient(90deg, #c2f06a, #7aa61c); }
.rates.big3 .rate { font-size: 15px; grid-template-columns: 96px 1fr 50px 70px; } .rates.big3 .bar { height: 12px; }
.thought { background: #fff5f2; border-left: 4px solid var(--red); padding: 6px 10px; border-radius: 8px; font-style: italic; } .thought.good { background: #effbf2; border-color: var(--mint); }
.says { padding-left: 4px; margin: 4px 0; list-style: none; font-size: 13px; } .says li { margin: 3px 0; } .says li.good { color: #1e7a3c; }
.muted { color: #6b5f86; font-size: 13px; } .bad { color: #b0281e; } .ok { color: #1e7a3c; }
.row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .row.center { justify-content: center; }
.btn { background: var(--plum); color: #fff; padding: 8px 14px; font-weight: 800; box-shadow: 0 3px 0 rgba(0,0,0,0.2); }
.btn.gold { background: linear-gradient(#ffe27a, #f2a91f); color: #5a2d00; } .btn.alt { background: #ece6f6; color: var(--plum); } .btn.warn { background: #ffe0dc; color: #b0281e; }
.btn.wide { width: 100%; padding: 12px; margin-top: 10px; } .btn.glow { animation: want 1.1s infinite; }
/* ---------- quick bar */
.quickbar { display: flex; gap: 8px; align-items: stretch; }
.act { background: rgba(255,255,255,0.94); color: var(--ink); padding: 8px 14px; display: flex; align-items: center; gap: 6px; font-weight: 800; box-shadow: 0 4px 0 rgba(0,0,0,0.22); min-width: 0; }
.act .e { font-size: 20px; } .act small { display: flex; align-items: center; gap: 2px; color: #6b5f86; } .act.hot { background: linear-gradient(#ffe27a, #f2a91f); color: #5a2d00; } .act.want { animation: want 1.2s infinite; }
.act:active, .btn:active { transform: translateY(2px); box-shadow: none; }
.litter { flex: 1; background: rgba(255,255,255,0.94); border-radius: 12px; padding: 6px 12px; display: flex; flex-direction: column; justify-content: center; font-size: 12px; font-weight: 700; min-width: 0; box-shadow: 0 4px 0 rgba(0,0,0,0.22); }
/* ---------- track editor */
.editor { background: rgba(255,255,255,0.97); border-radius: 18px; padding: 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,0.3); }
.ehead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .ehead .swatch { width: 42px; height: 42px; font-size: 22px; } .grow2 { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.estatus { font-size: 13px; } .ebtns { display: flex; gap: 6px; flex-wrap: wrap; }
.profile { width: 100%; height: 96px; display: block; background: #2a2440; border-radius: 12px; margin: 8px 0; }
.palette { display: flex; gap: 10px; flex-wrap: wrap; } .pg { min-width: 0; } .pg > small { font-weight: 800; color: #6b5f86; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.pcs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.pc { width: 74px; padding: 5px 2px 4px; background: #f3effa; display: flex; flex-direction: column; align-items: center; gap: 1px; box-shadow: 0 3px 0 rgba(0,0,0,0.15); border: 2px solid transparent; }
.pc i { font-style: normal; font-size: 20px; line-height: 1.1; } .pc span { font-size: 10.5px; font-weight: 700; line-height: 1.1; text-align: center; } .pc small { font-size: 10px; color: #1e7a3c; font-weight: 800; }
.pc:hover:not(.no) { border-color: var(--mint); background: #eafbef; } .pc.no { opacity: 0.55; } .pc.no small { color: #b0281e; } .pc.locked { opacity: 0.4; } .pc.warnp small { color: #c25a00; }
@media (min-width: 861px) { body.editing .panel > .tabsbar, body.editing .panel > .pbody { display: none; } .panel > .editor { flex: 1; overflow: auto; border-radius: 0; box-shadow: none; padding: 12px 14px; }
  .panel > .editor .pc { width: calc(25% - 4px); } .panel > .editor .palette { display: block; } .panel > .editor .pg { margin-bottom: 8px; } .panel > .editor .ebtns { width: 100%; } .panel > .editor .ebtns .btn { flex: 1; padding: 8px 6px; } .panel > .editor .profile { height: 120px; } }
/* ---------- side panel */
.panel { background: rgba(255,255,255,0.97); border-radius: 22px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.35); min-width: 0; }
.tabsbar { display: flex; gap: 2px; padding: 6px; background: var(--plum2); }
.tabsbar button { flex: 1; color: #e6d8ff; padding: 9px 2px; font-weight: 800; font-size: 13px; position: relative; background: transparent; min-width: 0; } .tabsbar button.on { background: #fff; color: var(--plum); }
.dot { position: absolute; top: 4px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; }
.pbody { padding: 12px 14px 18px; overflow: auto; flex: 1; } .pbody h2 { font-size: 17px; margin: 12px 0 8px; } .pbody h2 small { font-weight: 600; color: #6b5f86; font-size: 12.5px; } .pbody h3 { font-size: 15px; margin: 10px 0 6px; }
.seg { display: flex; gap: 4px; margin-bottom: 10px; } .seg button { flex: 1; background: #f0eaf8; padding: 7px 4px; font-weight: 800; color: #5d4a80; font-size: 13px; } .seg button.on { background: var(--plum); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.item { position: relative; background: #f8f5fd; border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.item img { width: 64px; height: 64px; } .item b { font-size: 13px; } .item small { font-size: 11px; color: #6b5f86; min-height: 2.3em; } .item button { margin-top: auto; width: 100%; background: var(--plum); color: #fff; padding: 6px 4px; font-weight: 800; font-size: 12.5px; }
.item.locked img { filter: grayscale(1) brightness(0.6); opacity: 0.6; } .item.locked button { background: #bdb3cf; }
.corner { position: absolute; top: 4px; right: 2px; } .bigemoji { font-size: 40px; line-height: 64px; }
.list { display: flex; flex-direction: column; gap: 6px; } .li { display: flex; gap: 10px; align-items: center; background: #f8f5fd; border-radius: 14px; padding: 8px 10px; }
.li button { background: var(--plum); color: #fff; padding: 6px 10px; font-weight: 800; } .li .col { display: flex; flex-direction: column; gap: 4px; } .li .col button { padding: 5px 10px; font-size: 12.5px; }
.li.coaster .swatch { width: 40px; height: 40px; font-size: 20px; }
.quest { background: #f8f5fd; border-radius: 14px; padding: 9px 11px; margin-bottom: 6px; } .quest.ready { background: #fff4c2; box-shadow: 0 0 0 2px #ffd36a; } .quest.done { opacity: 0.6; } .quest.later { opacity: 0.75; }
.quest button { float: right; margin-top: -2px; }
.medals { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; } .mdl { background: #f3effa; border-radius: 12px; padding: 6px 2px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.mdl i { font-style: normal; font-size: 22px; } .mdl small { font-size: 9.5px; line-height: 1.1; color: #6b5f86; } .mdl b { font-size: 11px; } .mdl.got { background: #fff1c2; } .mdl.cur { box-shadow: inset 0 0 0 2px var(--plum); }
.icons { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .icons img.no, .tp.no { filter: grayscale(1); opacity: 0.4; } .tp { font-size: 28px; width: 44px; text-align: center; }
.tree { display: flex; flex-direction: column; gap: 6px; } .node { background: #f8f5fd; border-radius: 12px; padding: 8px 10px; } .node.got { background: #effbf2; } .node.next { box-shadow: 0 0 0 2px var(--gold); }
.node .icons span, .unl span { display: flex; align-items: center; gap: 4px; background: #fff; border-radius: 9px; padding: 2px 8px 2px 2px; font-size: 12px; font-weight: 700; } .node .icons img, .unl img { width: 30px; height: 30px; } .pi { font-size: 20px; width: 30px; text-align: center; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; } .day { background: #f3effa; border-radius: 10px; padding: 6px 2px; text-align: center; font-size: 11.5px; font-weight: 700; } .day b { display: block; font-size: 10.5px; color: #6b5f86; }
.day.got { background: #d6f5df; } .day.today { background: #fff1c2; box-shadow: 0 0 0 2px #ffd36a; animation: want 1.2s infinite; }
.tips { padding-left: 18px; font-size: 13px; margin: 4px 0; } .tips li { margin: 3px 0; }
.pieces { display: flex; flex-wrap: wrap; gap: 4px; } .pieces span { background: #f3effa; border-radius: 9px; padding: 3px 8px 3px 4px; font-size: 12px; display: flex; gap: 4px; align-items: center; font-weight: 700; } .pieces i { font-style: normal; } .pieces small { color: #6b5f86; } .pieces .locked { opacity: 0.45; }
input, select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid #d5c8ea; width: 100%; background: #fff; }
.form { display: grid; gap: 8px; margin: 8px 0; } .mk { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; } .mk.online { background: #39d39a; }
/* ---------- ride camera */
.ride { position: fixed; inset: 0; z-index: 80; background: #000; } #rideCv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rtop { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 18px; text-shadow: 0 2px 6px rgba(0,0,0,0.6); }
.rtop .rbtns { margin-left: auto; display: flex; gap: 6px; } .rtop button { background: rgba(0,0,0,0.5); color: #fff; padding: 8px 12px; font-weight: 800; border: 1px solid rgba(255,255,255,0.3); }
.rhud { position: absolute; left: 14px; bottom: 26px; display: flex; gap: 14px; align-items: flex-end; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,0.7); }
.rhud b { font-size: 44px; font-weight: 900; line-height: 1; display: block; } .rhud small { font-weight: 700; opacity: 0.85; } .rhud .hgt b { font-size: 26px; }
.gm { display: flex; flex-direction: column; align-items: center; gap: 3px; } .gm b { font-size: 16px !important; } .gbar { width: 14px; height: 90px; border-radius: 8px; background: rgba(255,255,255,0.25); position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.gbar div { width: 100%; background: #8ef0a8; transition: height 0.08s; } .gbar div.hot { background: #ff5a5a; } .gbar div.air { background: #5fd0ff; } .gbar .g1 { position: absolute; left: 0; right: 0; bottom: 37.5%; height: 2px; background: #fff; }
.rprog { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255,255,255,0.2); } .rprog div { height: 100%; background: var(--gold); }
.rmsg { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-size: 54px; font-weight: 900; color: #fff; text-shadow: 0 4px 0 var(--plum), 0 8px 20px rgba(0,0,0,0.5); pointer-events: none; animation: pop 0.3s; }
body.riding { overflow: hidden; }
/* ---------- overlay + toasts */
.overlay { position: fixed; inset: 0; background: rgba(20,8,35,0.6); display: grid; place-items: center; z-index: 90; backdrop-filter: blur(3px); animation: fade 0.2s; } @keyframes fade { from { opacity: 0; } }
.ovbox { background: #fff; border-radius: 24px; padding: 22px; width: min(460px, 92vw); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.5); animation: pop 0.35s cubic-bezier(.2,1.6,.4,1); max-height: 90vh; overflow: auto; }
.ovbox h1 { margin: 4px 0; font-size: 30px; font-weight: 900; color: var(--plum); } .ovbox .big { font-size: 64px; font-weight: 900; line-height: 1; background: linear-gradient(#ffd96a, #f08a1c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ovbox .medal { font-size: 72px; animation: spin 1s ease; } @keyframes spin { from { transform: rotateY(360deg) scale(0.3); } }
.ovbox .unl { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0; } .ovbox .unl span { background: #f3effa; }
.ovbox.rare { background: linear-gradient(160deg, #fffdf0, #fff4d0); box-shadow: 0 0 0 4px #ffd36a, 0 20px 60px rgba(0,0,0,0.5); }
.ovbox .rates { text-align: left; margin: 10px 0; } .stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; margin: 8px 0; } .stats span { background: #f3effa; border-radius: 10px; padding: 5px; font-size: 11.5px; color: #6b5f86; } .stats b { display: block; font-size: 17px; color: var(--ink); }
.toasts { position: fixed; left: 50%; top: 66px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 95; pointer-events: none; align-items: center; width: max-content; max-width: 92vw; }
.toast { background: rgba(42,36,64,0.94); color: #fff; padding: 9px 16px; border-radius: 12px; font-weight: 700; animation: tin 0.25s ease, tout 0.4s ease 2.6s forwards; box-shadow: 0 6px 20px rgba(0,0,0,0.3); text-align: center; }
.toast.err { background: #b8324a; } .toast.good { background: #1f8a5c; } @keyframes tin { from { transform: translateY(-10px); opacity: 0; } } @keyframes tout { to { opacity: 0; transform: translateY(-8px); } }
.flycoin { position: fixed; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3b0, #ffd23f 55%, #c98a10); z-index: 70; pointer-events: none; transition: transform 0.75s cubic-bezier(.5,-0.3,.7,1), opacity 0.75s; }
/* ---------- phone */
@media (max-width: 860px) {
  html, body { font-size: 14px; } #app { height: auto; min-height: 100%; }
  .hud { padding: 8px; gap: 5px; flex-wrap: nowrap; } .brand, .mode, .sky, #enT, #xpTxt, .pill.cash .bfill, #perHour, #guestsN { display: none; } .xpbar { width: 34px; } .coins { margin-right: auto; }
  .pill { padding: 4px 8px 4px 5px; gap: 4px; } .pill b { font-size: 14px; } .iconbtn { width: 32px; height: 32px; flex: none; }
  main { grid-template-columns: minmax(0, 1fr); padding: 0 8px calc(70px + env(safe-area-inset-bottom)); gap: 8px; }
  .canvaswrap { min-height: 0; height: 54vh; flex: none; border-radius: 18px; }
  .act { flex: 1; padding: 8px 4px; flex-direction: column; gap: 0; font-size: 12px; } .act small { display: none; } .litter { display: none; }
  .panel { border-radius: 18px; } .pbody { overflow: visible; }
  .tabsbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; border-radius: 16px 16px 0 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(0,0,0,0.25); }
  .tabsbar button { font-size: 11.5px; padding: 10px 1px; }
  .card { left: 8px; right: 8px; width: auto; top: auto; bottom: 8px; max-height: 70%; }
  .questchip { right: 8px; left: auto; bottom: 8px; max-width: 64%; font-size: 11.5px; padding: 6px 10px; }
  .zoom { bottom: auto; top: 8px; } .zoom button { width: 32px; height: 32px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .pc { width: calc(25% - 4px); min-width: 64px; } .palette { display: block; } .pg { margin-bottom: 6px; } .ebtns { width: 100%; } .ebtns .btn { flex: 1; padding: 8px 6px; font-size: 13px; }
  .placehint { white-space: normal; font-size: 13px; top: auto; bottom: 8px; }
  .rhud b { font-size: 34px; } .rtop { font-size: 15px; flex-wrap: wrap; } .rmsg { font-size: 40px; }
  .medals small { display: none; }
}
@media (max-width: 420px) { .hud { gap: 4px; padding: 8px 6px; } .xpbar { display: none; } .lvl { width: 26px; height: 26px; } .ico-coin, .ico-bolt { width: 18px; height: 18px; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01s !important; transition-duration: 0.01s !important; } }
body.editing .panel > .pbody { display: none; }
body.riding #toasts { display: none; }
