:root {
color-scheme: only light;
--font: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
--bg: #1d1a2b; --panel: #252137; --card: #2f2a45; --card2: #383252; --edge: #0e0c16; --line: #4a4368;
--text: #fbf6ea; --dim: #b9b3cf; --cash: #ffd23f; --eco: #9be35a; --tok: #3fe0b0;
--ok: #57b847; --ok2: #2f7d3a; --no: #4f4966; --danger: #e5484d; --accent: #f48c3a; --purple: #a06be0;
--nav-h: 62px;
--sat: env(safe-area-inset-top, 0px); --sar: env(safe-area-inset-right, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px);
}
* { box-sizing: border-box; }
html, body {
margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
font: 700 14px/1.25 var(--font); touch-action: none; overscroll-behavior: none;
-webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
button { font-family: var(--font); font-weight: 800; color: var(--text); cursor: pointer; touch-action: manipulation; }
img { image-rendering: pixelated; image-rendering: crisp-edges; }
.hidden { display: none !important; }
#game { position: fixed; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; }
#cv { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: block; image-rendering: pixelated; cursor: pointer; }
#cv:focus { outline: none; }
#hud-top { position: absolute; top: calc(6px + var(--sat)); left: calc(6px + var(--sal)); right: calc(6px + var(--sar)); display: flex; gap: 6px; align-items: flex-start; pointer-events: none; z-index: 5; }
#hud-top > * { pointer-events: auto; }
.hud-left { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 0 0 var(--side-l, 168px); width: var(--side-l, 168px); min-width: 0; }
.res { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; background: rgba(29, 26, 43, .9); border: 3px solid var(--edge); border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06), 0 3px 0 rgba(0,0,0,.35); }
.res img { width: 26px; height: 26px; }
.res b { font-size: 16px; letter-spacing: .3px; }
.res.cash { position: relative; max-width: 100%; }
.res.cash b { color: var(--cash); font-size: 21px; display: block; white-space: nowrap; }
.res.cash small { display: block; font-size: 12px; color: #ffe9a0; margin-top: -2px; white-space: nowrap; }
.res.cash.bump { animation: bump .35s; }
.res.bag { align-self: flex-start; padding: 1px 8px 1px 4px; border-width: 2px; }
.res.bag img { width: 20px; height: 20px; }
.res.bag b { font-size: 13px; }
.res.bag.full b { color: var(--accent); }
@keyframes bump { 40% { transform: scale(1.12); } }
#goal { flex: 1 1 0; min-width: 0; min-height: 40px; max-width: 420px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px; background: rgba(29,26,43,.92); border: 3px solid var(--edge); border-radius: 12px; text-align: left; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06), 0 3px 0 rgba(0,0,0,.35); }
#goal img { width: 26px; height: 26px; flex: 0 0 26px; }
#goal div { flex: 1; min-width: 0; }
#goal span { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#goal i { display: block; height: 6px; background: #120f1c; border-radius: 3px; margin-top: 3px; overflow: hidden; }
#goal i b { display: block; height: 100%; width: 0; background: var(--eco); transition: width .2s; }
#goal em { flex: 0 0 auto; font-style: normal; font-size: 13px; color: var(--cash); white-space: nowrap; }
#goal:hover { border-color: #3a3452; }
#goal.done { border-color: var(--eco); animation: goaldone .6s 2; }
#goal.done span { color: var(--eco); }
@keyframes goaldone { 50% { transform: scale(1.05); box-shadow: 0 0 16px var(--eco); } }
.hud-right { flex: 0 0 var(--side-r, 190px); width: var(--side-r, 190px); display: flex; gap: 6px; align-items: flex-start; justify-content: flex-end; }
#chips { display: flex; gap: 4px; flex-direction: column; align-items: flex-start; }
#chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; font-size: 12px; background: rgba(29,26,43,.9); border: 2px solid var(--edge); white-space: nowrap; }
.chip img { width: 16px; height: 16px; }
button.chip.gift { min-height: 36px; font: 800 13px var(--font); color: #fff; background: #b8323a; border-color: var(--edge); padding: 5px 10px 5px 6px; animation: giftbob 1s ease-in-out infinite alternate; }
button.chip.gift img { width: 20px; height: 20px; }
@keyframes giftbob { to { transform: translateY(-2px) rotate(-2deg); } }
.res.cash .gain { position: absolute; left: 44px; top: 30px; font-size: 14px; font-weight: 800; color: #9be35a; white-space: nowrap; pointer-events: none; text-shadow: 0 2px 0 #1e1a2b, 1px 1px 0 #1e1a2b, -1px 1px 0 #1e1a2b; animation: gainup 1.1s ease-out forwards; }
@keyframes gainup { 0% { opacity: 0; transform: translateY(4px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(26px); } }
button.res.stars { padding: 3px 8px 3px 5px; }
button.res.stars b { color: var(--cash); }
.hud-btn { position: relative; }
.hud-btn .badge { top: -6px; left: auto; right: -6px; }
#btn-coll, #btn-gear { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: rgba(29,26,43,.9); border: 3px solid var(--edge); border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06), 0 3px 0 rgba(0,0,0,.35); }
#btn-coll img, #btn-gear img { width: 26px; height: 26px; }
#event-banner { position: absolute; top: calc(64px + var(--sat)); left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; min-width: 240px; max-width: min(92vw, 440px); background: rgba(29,26,43,.94); border: 3px solid var(--accent); border-radius: 10px; pointer-events: none; animation: drop .35s; }
#event-banner img { width: 30px; height: 30px; }
#event-banner div { flex: 1; min-width: 0; }
#event-banner b { display: block; font-size: 15px; }
#event-banner span { display: block; font-size: 12px; color: var(--dim); }
#event-banner i { display: block; height: 5px; background: #120f1c; border-radius: 3px; margin-top: 4px; overflow: hidden; }
#event-banner i b { display: block; height: 100%; background: var(--cash); }
@keyframes drop { from { transform: translate(-50%, -20px); opacity: 0; } }
body.panel-open #event-banner, body.panel-open #combo, body.panel-open #jackpot { visibility: hidden; }
#combo { padding: 4px 10px; min-width: 150px; border-radius: 10px; background: rgba(29,26,43,.9); border: 3px solid #ff6fb5; pointer-events: none; }
#combo b#combo-txt { font-size: 14px; color: #ff9fd0; white-space: nowrap; }
#combo[data-lv="3"], #combo[data-lv="4"] { border-color: var(--cash); }
#combo[data-lv="3"] #combo-txt, #combo[data-lv="4"] #combo-txt { color: var(--cash); }
#combo[data-lv="5"], #combo[data-lv="6"] { border-color: var(--tok); animation: glow .5s infinite alternate; }
#combo[data-lv="5"] #combo-txt, #combo[data-lv="6"] #combo-txt { color: var(--tok); }
#combo i { display: block; height: 5px; background: #120f1c; border-radius: 3px; margin-top: 3px; overflow: hidden; }
#combo i b { display: block; height: 100%; background: #ff6fb5; transition: width .1s linear; }
@keyframes glow { to { box-shadow: 0 0 12px var(--tok); } }
#jackpot { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) scale(.6); z-index: 8; display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; background: rgba(29,26,43,.95); border: 3px solid var(--cash); border-radius: 14px; opacity: 0; pointer-events: none; }
#jackpot img { width: 56px; height: 56px; }
#jackpot b { display: block; font-size: 20px; color: var(--cash); }
#jackpot span { display: block; font-size: 14px; }
#jackpot b em { font-style: normal; font-size: 12px; background: var(--danger); color: #fff; padding: 1px 6px; border-radius: 6px; vertical-align: middle; }
#jackpot.show { animation: jp 2.4s ease-out forwards; }
@keyframes jp { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 20% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }
#actions { position: absolute; right: calc(10px + var(--sar)); bottom: calc(var(--nav-h) + var(--sab) + 12px); z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#btn-ctx { min-width: 140px; min-height: 54px; padding: 8px 16px; font-size: 18px; letter-spacing: .5px; background: var(--accent); color: #231c2e; border: 3px solid var(--edge); border-radius: 14px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 4px 0 rgba(0,0,0,.4); animation: ctxin .2s ease-out; }
#btn-ctx:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25), 0 2px 0 rgba(0,0,0,.4); }
#btn-ctx[data-kind="repair"] { background: var(--danger); color: #fff; }
#btn-ctx[data-kind="open"] { background: var(--purple); color: #fff; }
#btn-ctx[data-kind="boost"] { background: var(--cash); }
@keyframes ctxin { from { transform: scale(.7); opacity: 0; } }
@keyframes pulse { 50% { transform: scale(1.06); } }
#nav { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--sab)); padding-left: var(--sal); padding-right: var(--sar); z-index: 7; display: flex; background: #17141f; border-top: 3px solid var(--edge); padding-bottom: env(safe-area-inset-bottom); }
.nav-btn { flex: 1 1 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; border-right: 2px solid #0e0c16; font-size: 12.5px; padding: 4px 2px; min-width: 0; }
.nav-btn:last-child { border-right: 0; }
.nav-btn img { width: 30px; height: 30px; }
.nav-btn span { white-space: nowrap; }
.nav-btn:hover { background: #221e31; }
.nav-btn.active { background: var(--card); box-shadow: inset 0 3px 0 var(--cash); }
.nav-btn.pulse { background: #3d3514; }
.nav-btn.pulse img { animation: navbob .5s infinite alternate; }
@keyframes navbob { to { transform: translateY(-4px); } }
.badge { position: absolute; top: 3px; left: calc(50% + 8px); min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; background: var(--danger); border: 2px solid var(--edge); color: #fff; font-size: 12px; font-style: normal; line-height: 15px; text-align: center; }
#panel { position: absolute; left: var(--sal); right: var(--sar); top: calc(56px + var(--sat)); bottom: calc(var(--nav-h) + var(--sab)); z-index: 6; display: flex; flex-direction: column; background: var(--panel); border-top: 3px solid var(--edge); box-shadow: 0 -6px 0 rgba(0,0,0,.25); animation: slideup .18s ease-out; }
body.wide #panel { left: auto; width: min(500px, calc(46vw / var(--uiz, 1))); border-left: 3px solid var(--edge); animation: slidein .18s ease-out; }
@keyframes slideup { from { transform: translateY(24px); opacity: .5; } }
@keyframes slidein { from { transform: translateX(24px); opacity: .5; } }
.p-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; background: var(--card); border-bottom: 3px solid var(--edge); }
.p-head img { width: 30px; height: 30px; }
.p-head h2 { margin: 0; font-size: 20px; letter-spacing: .5px; text-transform: uppercase; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#p-tools { flex: 1 1 auto; display: flex; gap: 6px; justify-content: flex-end; align-items: center; min-width: 0; }
#p-close { width: 40px; height: 40px; flex: 0 0 40px; border: 3px solid var(--edge); border-radius: 10px; background: var(--danger); font-size: 18px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
#p-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 10px 24px; touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.buy-toggle { display: flex; border: 2px solid var(--edge); border-radius: 8px; overflow: hidden; }
.buy-toggle button { background: var(--card2); border: 0; padding: 6px 9px; font-size: 13px; min-width: 42px; min-height: 32px; }
.buy-toggle button.on { background: var(--cash); color: #231c2e; }
.section { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 2px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--cash); border-bottom: 2px dashed var(--line); padding-bottom: 3px; }
.info-box { background: #1f1b2e; border: 2px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--dim); }
.info-box b { color: var(--text); }
.info-box.dim { opacity: .85; font-style: italic; }
.warn { color: #ff8a70; }
.dim { color: var(--dim); }
.flow { margin-bottom: 8px; padding: 8px; background: #1f1b2e; border: 2px solid var(--line); border-radius: 10px; }
.flow-row { display: flex; align-items: stretch; gap: 4px; }
.flow-row > i { align-self: center; color: var(--dim); font-style: normal; font-size: 20px; }
.fl { flex: 1; min-width: 0; text-align: center; padding: 4px 2px; border-radius: 8px; background: var(--card); border: 2px solid var(--edge); }
.fl img { width: 22px; height: 22px; display: block; margin: 0 auto 1px; }
.fl span { display: block; font-size: 11px; color: var(--dim); text-transform: uppercase; }
.fl b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl.neck { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.flow .hint { margin: 6px 2px 0; font-size: 12.5px; color: var(--text); font-weight: 600; }
.flow .lf { margin: 3px 2px 0; font-size: 12px; color: #ff8a70; font-weight: 600; }
.card { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 8px; background: var(--card); border: 3px solid var(--edge); border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.04); }
.card.locked { opacity: .55; }
.card.current { border-color: var(--cash); }
.card.next { border-color: var(--tok); }
.card.new { border-color: var(--eco); }
.card.belt { border-color: #2f5a78; }
.card.prestige { border-color: var(--eco); }
.card.flash { animation: flash 1s 2; }
@keyframes flash { 50% { border-color: var(--cash); box-shadow: 0 0 14px var(--cash); } }
.c-icon { flex: 0 0 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: #1f1b2e; border-radius: 8px; border: 2px solid #17141f; overflow: hidden; }
.c-icon img { max-width: 52px; max-height: 52px; }
.card.mach .c-icon img { max-height: 54px; }
.c-main { flex: 1; min-width: 0; }
.c-title { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.c-title b { font-size: 15px; }
.c-title .lv { font-size: 12px; color: var(--cash); }
.c-desc { font-size: 12.5px; font-weight: 600; color: var(--dim); margin-top: 2px; }
.c-extra { margin-top: 3px; }
.c-info { font-size: 12.5px; font-weight: 600; margin-top: 3px; color: #d8d2ea; }
.c-info .money { color: var(--cash); }
.c-info em { font-style: normal; }
.c-info .boost { color: var(--cash); }
.c-bar { height: 6px; background: #17141f; border-radius: 3px; margin-top: 5px; overflow: hidden; }
.c-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--eco), var(--tok)); }
.c-btns { display: flex; flex-direction: column; gap: 5px; flex: 0 0 auto; }
.recycles { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.recycles small { font-size: 11px; color: var(--dim); text-transform: uppercase; }
.trash-mini { display: inline-flex; gap: 2px; flex-wrap: wrap; vertical-align: middle; }
.trash-mini img { width: 26px; height: 26px; background: #1f1b2e; border-radius: 5px; }
.btn { min-width: 112px; min-height: 44px; padding: 4px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border: 3px solid var(--edge); border-radius: 10px; background: var(--ok); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); font-size: 13px; position: relative; }
.btn b { font-size: 13px; color: #fff6c0; }
.btn small { font-size: 11px; color: #d8ffc8; font-weight: 700; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
.btn.no { background: var(--no); color: #cfc9e3; }
.btn.no b { color: #ffb3a8; }
.btn.no small { color: #bfb8d8; }
.btn.lock, .btn.max, .btn.done { background: #3a3550; color: var(--dim); box-shadow: none; }
.btn.done { background: #2f5a2c; color: #c8f7b8; }
.btn.danger { background: var(--danger); }
.btn.neutral { background: #5a5470; }
.btn.big { min-height: 54px; font-size: 16px; padding: 8px 16px; }
.btn.big b { font-size: 15px; }
.btn img.vid { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; }
.btn.has-vid { padding-left: 32px; }
.ad-note { margin: 6px 0 0; font-size: 11.5px; color: var(--dim); text-align: center; }
#p-body > .ad-note { margin: 0 0 8px; }
#boosts { display: flex; gap: 6px; margin-top: 2px; }
.boost-btn { position: relative; width: 66px; height: 48px; padding: 3px 4px 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 3px solid var(--edge); border-radius: 11px; box-shadow: inset 0 3px 0 rgba(255,255,255,.18), inset 0 -4px 0 rgba(0,0,0,.28), 0 3px 0 rgba(0,0,0,.35); }
.boost-btn.adSpeed { background: #1d8fa3; }
.boost-btn.adMoney { background: #d08a12; }
.boost-btn::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 8px; pointer-events: none; background: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.38) 50%, transparent 62%) no-repeat; background-size: 260% 100%; background-position: 160% 0; animation: shine 6s ease-in-out infinite; }
.boost-btn.adMoney::before { animation-delay: 3s; }
@keyframes shine { 0%, 78% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
.boost-btn > div { display: flex; align-items: center; gap: 3px; }
.boost-btn .bi { width: 18px; height: 18px; }
.boost-btn b { font-size: 17px; line-height: 1; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.45); }
.boost-btn small { font-size: 12px; line-height: 1; letter-spacing: .5px; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.5); white-space: nowrap; font-variant-numeric: tabular-nums; }
.boost-btn .bv { position: absolute; top: -12px; right: -11px; width: 19px; height: 19px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.45)); }
.boost-btn .bbar { position: absolute; left: 5px; right: 5px; bottom: 3px; height: 4px; border-radius: 2px; background: rgba(0,0,0,.4); overflow: hidden; visibility: hidden; }
.boost-btn .bbar span { display: block; height: 100%; width: 0; background: #fff6c0; }
.boost-btn.on { border-color: #fff6c0; animation: boostglow 1.2s ease-in-out infinite alternate; }
.boost-btn.on::before, .boost-btn.on .bv { display: none; }
.boost-btn.on .bbar { visibility: visible; }
.boost-btn.on small { color: #fff6c0; }
.boost-btn.adSpeed.on { --glow: #8be6f7; }
.boost-btn.adMoney.on { --glow: #ffd23f; }
@keyframes boostglow { to { box-shadow: inset 0 3px 0 rgba(255,255,255,.18), inset 0 -4px 0 rgba(0,0,0,.28), 0 0 12px var(--glow, #fff6c0); } }
.boost-btn.bump { animation: bump .35s; }
.boost-btn:active { transform: translateY(2px); }
.modal.boost-m { width: min(380px, 100%); }
#toasts { position: absolute; top: calc(64px + var(--sat)); right: calc(8px + var(--sar)); z-index: 9; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; pointer-events: none; max-width: min(340px, 70vw); }
.toast { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(29,26,43,.95); border: 2px solid var(--line); border-radius: 10px; font-size: 13px; animation: tin .25s ease-out; }
.toast img { width: 22px; height: 22px; flex: 0 0 22px; }
.toast.warn { border-color: var(--danger); }
.toast.tip { border-color: var(--eco); background: rgba(33,48,30,.96); }
.toast.out { opacity: 0; transform: translateX(20px); transition: all .3s; }
@keyframes tin { from { opacity: 0; transform: translateX(30px); } }
body.wide #panel:not(.hidden) ~ #toasts { right: calc(min(500px, calc(46vw / var(--uiz, 1))) + 8px); }
#big { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); z-index: 9; text-align: center; pointer-events: none; opacity: 0; padding: 6px 20px 9px; background: rgba(29,26,43,.9); border: 3px solid var(--edge); border-radius: 14px; box-shadow: 0 5px 0 rgba(0,0,0,.3); }
#big span:empty { display: none; }
body.wide.panel-open #big { top: 42%; left: calc((100vw - min(calc(500px * var(--uiz, 1)), 46vw)) / (2 * var(--uiz, 1))); }
body.wide.panel-open #big b { font-size: clamp(26px, 4.2vw, 44px); }
#big b { display: block; font-size: clamp(30px, 7vw, 60px); letter-spacing: 2px; -webkit-text-stroke: 2px #231c2e; text-shadow: 0 4px 0 #231c2e, 4px 4px 0 #231c2e, -3px 3px 0 #231c2e; white-space: nowrap; }
#big span { display: block; font-size: clamp(15px, 3vw, 22px); color: #fff; text-shadow: 0 2px 0 #231c2e, 2px 2px 0 #231c2e; margin-top: 2px; }
#big.show { animation: big 1.5s ease-out forwards; }
@keyframes big { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(-6deg); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(2deg); } 25% { transform: translate(-50%, -50%) scale(1) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%) scale(1); } }
#modal-root { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 10; pointer-events: none; }
.modal-wrap { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; padding: calc(12px + var(--sat)) calc(12px + var(--sar)) calc(12px + var(--sab)) calc(12px + var(--sal)); background: rgba(14,12,22,.72); pointer-events: auto; animation: fade .2s; touch-action: pan-y; }
@keyframes fade { from { opacity: 0; } }
.modal { position: relative; width: min(440px, 100%); max-height: 100%; overflow-y: auto; padding: 16px 16px 14px; background: var(--panel); border: 3px solid var(--edge); border-radius: 16px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.05), 0 8px 0 rgba(0,0,0,.4); text-align: center; animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.modal .m-icon { width: 48px; height: 48px; margin: -4px auto 0; display: block; }
.modal h2 { margin: 4px 0 8px; font-size: 24px; color: var(--cash); letter-spacing: .5px; }
.m-x { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border: 3px solid var(--edge); border-radius: 10px; background: var(--danger); font-size: 16px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.m-body { font-size: 14px; font-weight: 600; color: var(--dim); }
.m-body p { margin: 6px 0; }
.m-body b { color: var(--text); }
.m-body .sub { color: var(--eco); font-weight: 800; }
.m-body .big-num { font-size: 40px; color: var(--cash); margin: 4px 0; font-weight: 800; }
.m-btns { display: flex; gap: 8px; margin-top: 12px; }
.m-btns:empty { display: none; }
.m-btns .btn { flex: 1; }
.m-btns.equal { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.m-btns.equal .btn { min-width: 0; }
.off-rows { display: grid; gap: 4px; margin: 8px 0; text-align: left; }
.off-rows div { display: flex; justify-content: space-between; padding: 7px 10px; background: var(--card); border-radius: 8px; font-size: 14px; }
.off-rows b { color: var(--cash); }
.m-body .eff { font-size: 12px; }
.m-body .warn { font-size: 12.5px; }
.trash-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0; }
.trash-row span { display: flex; align-items: center; gap: 4px; font-size: 12px; background: var(--card); padding: 3px 8px 3px 3px; border-radius: 8px; color: var(--text); }
.trash-row img { width: 30px; height: 30px; }
.modal.celebrate { border-color: var(--cash); }
.goals ol { list-style: none; margin: 8px 0; padding: 0; text-align: left; }
.goals li { display: flex; align-items: center; gap: 8px; padding: 7px 8px; margin-bottom: 4px; border-radius: 8px; background: var(--card); border: 2px solid var(--edge); }
.goals li em { flex: 0 0 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; background: #1f1b2e; color: var(--dim); }
.goals li div { flex: 1; min-width: 0; }
.goals li span { display: block; font-size: 13.5px; color: var(--text); }
.goals li i { display: block; height: 5px; background: #120f1c; border-radius: 3px; margin-top: 3px; overflow: hidden; }
.goals li i b { display: block; height: 100%; background: var(--eco); }
.goals li > b { color: var(--cash); font-size: 13px; white-space: nowrap; }
.goals li.done { opacity: .6; }
.goals li.done em { background: var(--ok); color: #fff; }
.goals li.cur { border-color: var(--cash); background: #3a3350; }
.goals li.cur em { background: var(--cash); color: #231c2e; }
.goals li.next span { color: var(--dim); }
.goals .count { font-size: 12px; }
.settings { text-align: left; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 5px; background: var(--card); border: 2px solid var(--edge); border-radius: 10px; font-size: 15px; color: var(--text); }
.toggle { min-width: 70px; min-height: 36px; border: 3px solid var(--edge); border-radius: 18px; background: #5a5470; }
.toggle.on { background: var(--ok); }
select { font: 700 14px var(--font); padding: 6px 8px; border-radius: 8px; border: 2px solid var(--edge); background: var(--card2); color: var(--text); }
.stats h3 { margin: 10px 0 4px; font-size: 14px; color: var(--cash); text-transform: uppercase; letter-spacing: 1px; }
.stats div { display: flex; justify-content: space-between; padding: 4px 8px; font-size: 13px; border-bottom: 1px solid var(--line); }
.settings .controls { font-size: 12px; margin: 10px 2px; }
.settings .reset { width: 100%; min-height: 42px; }
.settings .ver { font-size: 11px; text-align: center; opacity: .6; }
.hint { position: absolute; left: 50%; bottom: calc(var(--nav-h) + var(--sab) + 10px); transform: translateX(-50%); z-index: 4; display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; background: rgba(29,26,43,.88); border: 3px solid var(--edge); border-radius: 14px; pointer-events: none; animation: fade .4s; max-width: calc(100% - 24px); text-align: center; }
.hint span { font-size: 13.5px; color: var(--text); white-space: nowrap; }
.hint.out { opacity: 0; transition: opacity .35s; }
.hint .kb { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.hint .kb div { display: flex; gap: 3px; }
.hint .kb i { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 900; color: #231c2e; background: #fbf6ea; border-radius: 5px; box-shadow: inset 0 -3px 0 #b9b3cf; animation: keytap 1.6s infinite; }
.hint .kb div i:nth-child(1) { animation-delay: .4s; } .hint .kb div i:nth-child(2) { animation-delay: .8s; } .hint .kb div i:nth-child(3) { animation-delay: 1.2s; }
@keyframes keytap { 0%, 20% { transform: translateY(2px); box-shadow: inset 0 -2px 0 #b9b3cf; background: var(--cash); } 30%, 100% { transform: none; } }
.hint .drag { position: relative; width: 64px; height: 34px; flex: 0 0 64px; }
.hint .drag::before { content: ""; position: absolute; left: 15px; top: 0; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(251,246,234,.7); }
.hint .drag i { position: absolute; left: 24px; top: 9px; width: 16px; height: 16px; border-radius: 50%; background: #fbf6ea; animation: dragme 1.6s ease-in-out infinite; }
@keyframes dragme { 0%, 100% { transform: translateX(-13px); } 50% { transform: translateX(13px); } }
body.panel-open .hint { visibility: hidden; }
.set-row.acct { gap: 10px; }
.set-row.acct span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-row.acct small { font-size: 12px; font-weight: 600; color: var(--dim); }
.set-row.acct .avatar { width: 36px; height: 36px; border-radius: 50%; image-rendering: auto; border: 2px solid var(--edge); }
.set-row.acct .login { min-width: 90px; min-height: 38px; }
.modal.coll-m { width: min(560px, 100%); }
.coll { text-align: left; }
.coll-bonus { text-align: center; font-size: 16px; color: var(--cash); background: #1f1b2e; border: 2px solid var(--line); border-radius: 10px; padding: 6px; margin: 6px 0; }
.coll h3 { margin: 12px 2px 6px; font-size: 14px; color: var(--cash); text-transform: uppercase; letter-spacing: 1px; }
.coll h3 small { text-transform: none; letter-spacing: 0; color: var(--dim); font-size: 12px; margin-left: 4px; }
.coll-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.coll-grid.finds { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.coll .cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px; padding: 4px 2px; background: var(--card); border: 2px solid var(--edge); border-radius: 8px; }
.coll .cell img { width: 36px; height: 36px; }
.coll-grid.finds .cell img { width: 44px; height: 44px; }
.coll .cell span { font-size: 10.5px; line-height: 1.1; text-align: center; color: var(--text); margin-top: 2px; }
.coll .cell em { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: 10px; color: var(--cash); }
.coll .cell.unk img { filter: brightness(0) opacity(.35); }
.coll .cell.unk span { color: var(--dim); }
.coll-set { margin-bottom: 6px; }
.coll-set > b { display: block; font-size: 12.5px; margin: 0 2px 3px; color: var(--dim); }
.coll-set.done > b { color: var(--eco); }
.coll-set.done .cell { border-color: #2f5a2c; }
.daily-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 10px 0 4px; }
.dd { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 1px; border-radius: 8px; background: var(--card); border: 2px solid var(--edge); opacity: .75; }
.dd small { font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.dd img { width: 28px; height: 28px; }
.dd.got { opacity: .5; }
.dd.cur { opacity: 1; border-color: var(--cash); background: #3a3350; box-shadow: 0 0 10px rgba(255,210,63,.45); transform: scale(1.06); }
.dd.cur small { color: var(--cash); }
.daily .find { color: var(--tok); font-size: 12.5px; }
#fade { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 25; background: #000; opacity: 0; pointer-events: none; transition: opacity .38s ease; }
#fade.on, #fade.block { pointer-events: auto; }
#fade.on { opacity: 1; }
#ad-block { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(14,12,22,.8); color: var(--dim); }
.spinner { width: 42px; height: 42px; border: 6px solid #463f66; border-top-color: var(--cash); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mock-ad { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #111, #111 20px, #1c1c1c 20px, #1c1c1c 40px); color: #ff0; font: 800 22px var(--font); text-align: center; }
.mock-ad small { font-size: 13px; color: #aaa; }
#loading { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle at 50% 40%, #2f2a45, #17141f); transition: opacity .35s; }
#loading.done { opacity: 0; pointer-events: none; }
.logo { display: flex; flex-direction: column; align-items: center; line-height: .95; transform: rotate(-3deg); }
.logo span { font-size: clamp(40px, 10vw, 78px); font-weight: 900; letter-spacing: 3px; -webkit-text-stroke: 3px #231c2e; text-shadow: 0 6px 0 #231c2e, 5px 5px 0 #231c2e; }
.logo .l1 { color: var(--eco); }
.logo .l2 { color: var(--cash); }
#loading .bar { width: min(280px, 70vw); height: 14px; border: 3px solid var(--edge); border-radius: 8px; background: #17141f; overflow: hidden; }
#loading .bar i { display: block; height: 100%; width: 10%; background: linear-gradient(90deg, var(--eco), var(--cash)); transition: width .2s; }
#loading p { color: var(--dim); font-size: 14px; margin: 0; }
body.narrow .res { padding: 2px 7px 2px 4px; }
body.narrow .res img { width: 22px; height: 22px; }
body.narrow .res.cash b { font-size: 17px; }
body.narrow #goal { padding: 4px 6px; gap: 5px; }
body.narrow #goal img { display: none; }
body.narrow #goal span { font-size: 12px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.15; }
body.narrow #goal em { font-size: 12px; }
body.narrow { --side-l: 112px; --side-r: 84px; }
body.narrow #stars { display: none !important; }
body.narrow #btn-coll, body.narrow #btn-gear { width: 38px; height: 38px; }
body.narrow #btn-coll img, body.narrow #btn-gear img { width: 22px; height: 22px; }
body.narrow #boosts { gap: 5px; }
body.narrow .boost-btn { width: 53px; }
body.narrow .boost-btn small { letter-spacing: 0; }
body.narrow .card { flex-wrap: wrap; }
body.narrow .c-btns { flex-direction: row; width: 100%; }
body.narrow .c-btns .btn { flex: 1; }
body.narrow .p-head h2 { font-size: 17px; }
body.narrow .buy-toggle button { min-width: 34px; padding: 6px 5px; }
body.narrow #p-icon { display: none; }
body.narrow .fl b { font-size: 13px; }
body.short { --nav-h: 54px; }
body.short .nav-btn img { width: 24px; height: 24px; }
body.short .nav-btn { font-size: 12px; gap: 1px; }
body.short #btn-ctx { min-height: 44px; }
body.short .c-icon { flex-basis: 46px; height: 46px; }
body.short .p-head { padding: 4px 8px; }
body.short #p-close { width: 36px; height: 36px; flex-basis: 36px; }
@media (max-height: 380px) { .nav-btn span { display: none; } :root { --nav-h: 46px; } .res.bag { display: none; } }
@media (max-height: 540px) {
.modal { padding: 10px 12px 10px; }
.modal .m-icon { display: none; }
.modal h2 { font-size: 20px; margin: 0 0 4px; }
.m-body p { margin: 3px 0; }
.off-rows { grid-template-columns: 1fr 1fr; gap: 3px; margin: 4px 0; }
.off-rows div { padding: 5px 8px; font-size: 13px; }
.m-btns { margin-top: 8px; }
.btn.big { min-height: 48px; }
}
@media (hover: hover) { .btn.ok:hover { filter: brightness(1.1); } }