:root { --pink: #ff2f8a; --pink2: #ff7fc0; --ink: #2a1f4a; --mint: #6fe3d0; --lav: #b48cff; --gold: #ffcf3f; --font: 'Rubik', system-ui, -apple-system, Arial, sans-serif; --head: 'Unbounded', 'Rubik', Arial, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #ffd9ec; font-family: var(--font); color: var(--ink); }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#loading { position: fixed; inset: 0; background: linear-gradient(180deg, #ffe3f1, #fff4f8); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 50; gap: 14px; }
.ld-logo { font-size: 64px; animation: bob 1.2s ease-in-out infinite; }
.ld-t { font-weight: 600; font-size: 16px; opacity: .8; }
@keyframes bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
button { font-family: inherit; }
/* ---------- экраны ---------- */
#ui { position: fixed; inset: 0; display: none; z-index: 20; overflow: auto; }
#ui.on { display: block; }
.screen { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 18px; gap: 14px; text-align: center; background: radial-gradient(120% 80% at 50% 20%, rgba(255, 255, 255, .25), rgba(255, 210, 235, .35) 60%, rgba(120, 60, 140, .35)); }
.screen.title, .screen.final { background: radial-gradient(120% 80% at 50% 30%, rgba(255, 255, 255, .08), rgba(255, 200, 230, .18) 55%, rgba(80, 40, 120, .4)); }
.logo { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.logo-pony, .logo-shroom { font-size: 54px; filter: drop-shadow(0 6px 0 rgba(42, 31, 74, .35)); animation: bob 2.2s ease-in-out infinite; }
.logo-shroom { animation-delay: .6s; }
.logo-t { display: flex; flex-direction: column; line-height: .95; font-family: var(--head); font-weight: 800; letter-spacing: -.02em; }
.logo-t .l1 { font-size: clamp(30px, 6.5vw, 64px); color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink), 0 12px 30px rgba(0, 0, 0, .2); }
.logo-t .l2 { font-size: clamp(38px, 8.5vw, 84px); color: var(--pink); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink), 0 14px 34px rgba(0, 0, 0, .22); }
.tag { font-weight: 700; font-size: 17px; background: rgba(255, 255, 255, .85); padding: 8px 18px; border-radius: 30px; box-shadow: 0 6px 18px rgba(42, 31, 74, .15); }
.menu { display: flex; flex-direction: column; gap: 10px; width: min(360px, 92vw); margin-top: 6px; }
.menu.row-menu { flex-direction: row; flex-wrap: wrap; justify-content: center; width: auto; }
.btn { border: 0; cursor: pointer; background: #fff; color: var(--ink); font-weight: 800; font-size: 17px; padding: 13px 22px; border-radius: 18px; box-shadow: 0 8px 22px rgba(42, 31, 74, .18), inset 0 -4px 0 rgba(42, 31, 74, .12); transition: transform .1s, box-shadow .1s; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn:hover { transform: translateY(-2px); } .btn:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(42, 31, 74, .18), inset 0 -2px 0 rgba(42, 31, 74, .12); }
.btn.big { background: linear-gradient(180deg, #ff5fa8, var(--pink)); color: #fff; font-size: 20px; padding: 16px 26px; box-shadow: 0 10px 28px rgba(255, 47, 138, .4), inset 0 -4px 0 rgba(0, 0, 0, .15); }
.btn.small { font-size: 14px; padding: 8px 14px; } .btn.danger { background: #ffe0e8; color: #a0143c; }
.pill { background: var(--gold); color: #5a3a00; font-size: 13px; padding: 2px 9px; border-radius: 20px; }
.story { max-width: 520px; font-size: 15px; line-height: 1.45; background: rgba(255, 255, 255, .7); padding: 10px 16px; border-radius: 16px; }
.foot { font-size: 12px; opacity: .8; margin-top: 8px; } .foot a { color: var(--ink); font-weight: 700; }
h2 { margin: 0; font-family: var(--head); font-weight: 800; font-size: clamp(26px, 5vw, 44px); color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); }
h3 { margin: 0 0 8px; font-size: 17px; color: var(--pink); }
.hint { font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .7); padding: 6px 12px; border-radius: 20px; }
.card { background: rgba(255, 255, 255, .92); border-radius: 22px; padding: 18px 20px; box-shadow: 0 12px 32px rgba(42, 31, 74, .16); text-align: left; max-width: 520px; width: 100%; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; max-width: 1000px; width: 100%; }
.card table { border-collapse: collapse; width: 100%; font-size: 14px; } .card td { padding: 6px 4px; vertical-align: top; border-bottom: 1px solid #f0e4f4; } .card td:first-child { white-space: nowrap; width: 34%; font-weight: 700; }
kbd { display: inline-block; background: #f3ecff; border: 1px solid #d9c8f5; border-bottom-width: 3px; border-radius: 7px; padding: 1px 7px; font-family: inherit; font-weight: 800; font-size: 13px; }
.card ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; } .card p { margin: 0; font-size: 14px; line-height: 1.5; }
.card .row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0e4f4; font-weight: 600; } .card .row:last-child { border: 0; }
.card select, .card input[type=checkbox] { transform: scale(1.2); accent-color: var(--pink); } .card select { transform: none; font: inherit; padding: 6px 10px; border-radius: 10px; border: 2px solid #e8d8f4; }
.bar { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
/* уровни */
.levels .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; max-width: 1040px; width: 100%; }
.lvl { position: relative; border: 0; cursor: pointer; text-align: left; border-radius: 20px; padding: 14px 14px 12px; background: #fff; box-shadow: 0 10px 26px rgba(42, 31, 74, .16); display: flex; flex-direction: column; gap: 3px; transition: transform .12s; overflow: hidden; color: var(--ink); }
.lvl:hover { transform: translateY(-3px); } .lvl.locked { opacity: .55; filter: grayscale(.6); cursor: not-allowed; }
.lvl::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 6px; background: var(--th, var(--pink)); }
.lvl .n { font-family: var(--head); font-weight: 800; font-size: 26px; color: var(--th, var(--pink)); line-height: 1; } .lvl .nm { font-weight: 800; font-size: 16px; } .lvl .sb { font-size: 12px; opacity: .7; }
.lvl .row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-top: 4px; } .lvl .best em { font-style: normal; opacity: .6; }
.lvl .lock { position: absolute; right: 12px; top: 10px; font-size: 22px; }
.stars { display: flex; gap: 2px; } .st { font-style: normal; color: #ddd3ea; font-size: 20px; text-shadow: 0 2px 0 rgba(42, 31, 74, .15); } .st.on { color: var(--gold); text-shadow: 0 2px 0 #b07a00; }
.stars.big .st { font-size: 64px; opacity: 0; transform: scale(.3); } .stars.big .st.on { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) forwards; } .stars.big .st:not(.on) { animation: fadein .4s forwards; animation-delay: .3s; }
@keyframes pop { to { opacity: 1; transform: scale(1) } } @keyframes fadein { to { opacity: .5; transform: scale(1) } }
.golds { display: inline-flex; gap: 3px; } .g { width: 10px; height: 10px; border-radius: 50%; background: #e8e0f0; display: inline-block; border: 1px solid rgba(42, 31, 74, .15); } .g.on { background: var(--gold); border-color: #b07a00; box-shadow: 0 0 6px rgba(255, 207, 63, .8); }
.th-meadow { --th: #ff2f8a; } .th-grove { --th: #3fb95a; } .th-cave { --th: #7f5fd8; } .th-sky { --th: #4fa8ff; } .th-clockwork { --th: #d08a2a; } .th-night { --th: #3a2a8a; } .th-ice { --th: #4fb8e0; } .th-volcano { --th: #ff4f6a; } .th-factory { --th: #7a7aa0; } .th-tower { --th: #b02fa8; }
.complete .kicker, .pause .sub { font-weight: 700; background: rgba(255, 255, 255, .85); padding: 5px 14px; border-radius: 20px; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; text-align: center; }
.stats div { display: flex; flex-direction: column; gap: 2px; } .stats span { font-size: 12px; opacity: .7; font-weight: 600; } .stats b { font-size: 22px; font-family: var(--head); } .stats em { font-style: normal; font-size: 12px; opacity: .7; }
/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; display: none; font-weight: 700; }
#hud.on { display: block; }
.hud-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
.hud-left, .hud-right { display: flex; align-items: center; gap: 12px; }
.hud-right { flex-direction: column; align-items: flex-end; gap: 4px; }
.hearts { display: flex; gap: 4px; } .h { width: 26px; height: 24px; display: inline-block; background: #e8dcf0; clip-path: path('M13 22 C2 14 2 5 7.5 5 C10.5 5 13 8 13 9 C13 8 15.5 5 18.5 5 C24 5 24 14 13 22 Z'); opacity: .5; } .h.on { background: linear-gradient(180deg, #ff7fb0, #ff2f6a); opacity: 1; filter: drop-shadow(0 2px 0 rgba(42, 31, 74, .3)); }
.notes { background: rgba(255, 255, 255, .88); border-radius: 20px; padding: 4px 12px; font-size: 18px; display: flex; gap: 4px; align-items: baseline; box-shadow: 0 4px 12px rgba(42, 31, 74, .15); } .notes .ic { color: var(--pink); font-size: 20px; } .notes .of { font-size: 13px; opacity: .6; }
#golds { background: rgba(255, 255, 255, .88); border-radius: 20px; padding: 7px 10px; display: flex; gap: 4px; box-shadow: 0 4px 12px rgba(42, 31, 74, .15); } #golds .g { width: 12px; height: 12px; }
.timer { background: rgba(255, 255, 255, .88); border-radius: 14px; padding: 4px 12px; font-size: 18px; font-variant-numeric: tabular-nums; pointer-events: auto; box-shadow: 0 4px 12px rgba(42, 31, 74, .15); } .timer.over { color: #b03030; } .par { font-size: 12px; opacity: .75; background: rgba(255, 255, 255, .7); padding: 2px 8px; border-radius: 10px; }
.hbtn { pointer-events: auto; border: 0; background: rgba(255, 255, 255, .88); width: 38px; height: 34px; border-radius: 12px; font-weight: 900; cursor: pointer; margin-top: 2px; box-shadow: 0 4px 12px rgba(42, 31, 74, .15); }
.hud-center { position: absolute; left: 50%; transform: translateX(-50%); top: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lvlname { font-size: 13px; background: rgba(255, 255, 255, .7); padding: 3px 12px; border-radius: 20px; opacity: .85; }
.bossbar { display: none; width: min(420px, 70vw); flex-direction: column; align-items: center; gap: 4px; } .bossbar.on { display: flex; }
.bb-t { font-family: var(--head); font-size: 14px; color: #fff; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; text-shadow: 0 2px 0 var(--ink); letter-spacing: .05em; }
.bb-bar { width: 100%; height: 14px; border-radius: 10px; background: rgba(42, 31, 74, .55); padding: 2px; } .bb-bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #ff2fd8, #b02fa8); transition: width .3s; box-shadow: 0 0 10px #ff2fd8; }
.intro { position: absolute; left: 50%; top: 22%; transform: translate(-50%, -20px); opacity: 0; transition: opacity .4s, transform .4s; text-align: center; pointer-events: none; max-width: 90vw; }
.intro.on { opacity: 1; transform: translate(-50%, 0); }
.i-k { font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 0 var(--ink); }
.i-n { font-family: var(--head); font-weight: 800; font-size: clamp(30px, 6vw, 58px); color: var(--pink); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink), 0 12px 30px rgba(0, 0, 0, .2); line-height: 1.05; }
.i-s { font-size: 16px; font-weight: 700; color: #fff; text-shadow: 0 2px 0 var(--ink); margin-top: 4px; } .i-t { margin: 10px auto 0; font-size: 14px; max-width: 460px; background: rgba(255, 255, 255, .85); padding: 8px 14px; border-radius: 14px; font-weight: 500; line-height: 1.4; }
.i-u { margin-top: 8px; display: inline-block; background: var(--gold); color: #4a2a00; padding: 6px 14px; border-radius: 20px; font-size: 14px; }
.toast { position: absolute; left: 50%; top: 30%; transform: translate(-50%, 10px); opacity: 0; transition: .25s; background: rgba(255, 255, 255, .92); padding: 8px 18px; border-radius: 20px; font-size: 16px; box-shadow: 0 8px 22px rgba(42, 31, 74, .2); white-space: nowrap; max-width: 90vw; }
.toast.on { opacity: 1; transform: translate(-50%, 0); } .toast.gold { background: var(--gold); color: #4a2a00; } .toast.cp { background: var(--mint); } .toast.warn { background: #ffb0b0; } .toast.boss { background: var(--ink); color: #fff; font-family: var(--head); font-size: 26px; padding: 12px 28px; letter-spacing: .06em; }
.sign { position: absolute; left: 50%; bottom: 110px; transform: translate(-50%, 10px); opacity: 0; transition: .25s; background: rgba(255, 250, 235, .95); border: 2px solid #e0c890; padding: 10px 16px; border-radius: 16px; font-size: 15px; max-width: min(560px, 92vw); text-align: center; font-weight: 600; line-height: 1.35; box-shadow: 0 8px 22px rgba(42, 31, 74, .2); }
.sign.on { opacity: 1; transform: translate(-50%, 0); } .s-ic { color: var(--pink); font-size: 18px; margin-right: 6px; }
.deaths { position: absolute; left: 16px; bottom: 16px; font-size: 14px; opacity: .8; background: rgba(255, 255, 255, .7); padding: 3px 10px; border-radius: 12px; }
.deaths:empty { display: none; }
.abil { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 10px; padding-bottom: env(safe-area-inset-bottom); }
.ab { position: relative; width: 74px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, .9); box-shadow: 0 6px 16px rgba(42, 31, 74, .18); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.ab b { font-family: var(--head); font-size: 18px; color: var(--pink); z-index: 1; } .ab span { font-size: 10px; z-index: 1; opacity: .8; }
.ab i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(42, 31, 74, .22); transition: height .08s linear; }
.ab.active { background: linear-gradient(180deg, #fff, #ffd9ec); box-shadow: 0 0 0 3px var(--pink), 0 6px 16px rgba(255, 47, 138, .35); }
.ab.locked { opacity: .35; filter: grayscale(1); } .ab.locked::after { content: '🔒'; position: absolute; font-size: 16px; z-index: 2; }
.flash { position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 60, 120, 0) 40%, rgba(255, 60, 120, .55)); opacity: 0; } .flash.on { animation: flash .8s ease-out; } @keyframes flash { 0% { opacity: 1 } 100% { opacity: 0 } }
/* мобильные кнопки */
.touch { display: none; } body.mobile .touch { display: block; }
.t-left, .t-right { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; gap: 10px; pointer-events: auto; flex-wrap: wrap; }
.t-left { left: 14px; width: 130px; justify-content: flex-start; } .t-left .tb:nth-child(3) { order: -1; margin-left: 70px; }
.t-right { right: 14px; width: 170px; justify-content: flex-end; align-items: flex-end; } .t-right .jump { flex-basis: 100%; margin-left: auto; }
.tb { width: 60px; height: 60px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .55); font-size: 22px; font-weight: 900; color: var(--ink); touch-action: none; user-select: none; box-shadow: 0 4px 12px rgba(42, 31, 74, .2); }
.tb.on { background: rgba(255, 255, 255, .95); transform: scale(.95); } .tb.jump { width: 78px; height: 78px; background: rgba(255, 47, 138, .75); color: #fff; font-size: 30px; }
.tb.ab1, .tb.ab2, .tb.ab3 { width: 50px; height: 50px; font-size: 18px; }
body.mobile .abil { bottom: 150px; transform: translateX(-50%) scale(.8); } body.mobile .deaths { bottom: 150px; left: 50%; transform: translateX(-50%); } body.mobile .sign { bottom: 215px; }
@media (max-width: 480px) { body.mobile .abil { display: none; } }
body.og #hud, body.og #ui { display: none !important; }
@media (max-width: 640px) { .hud-left { gap: 6px; } .notes { font-size: 15px; } .h { width: 20px; height: 18px; } .hud-center { top: 52px; } .lvlname { display: none; } .ab { width: 62px; height: 50px; } .screen { padding: 18px 12px; } }

.rotate { display: none; position: absolute; left: 50%; top: 42%; transform: translateX(-50%); background: rgba(42, 31, 74, .85); color: #fff; padding: 10px 16px; border-radius: 16px; font-size: 14px; text-align: center; max-width: 80vw; animation: fadeout 1s 6s forwards; }
@media (orientation: portrait) { body.mobile .rotate { display: block; } }
@keyframes fadeout { to { opacity: 0; visibility: hidden; } }
