@font-face { font-family: Nunito; font-weight: 700; font-display: block; src: url(fonts/nunito-cyr-700.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Nunito; font-weight: 800; font-display: block; src: url(fonts/nunito-cyr-800.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Nunito; font-weight: 800; font-display: block; src: url(fonts/nunito-lat-800.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
body { font-family: Nunito, system-ui, sans-serif; font-weight: 800; color: #fff; background: #7cc7ea; }
button { font-family: inherit; font-weight: 800; color: inherit; border: 0; cursor: pointer; }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.stroke { text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 6px rgba(0,0,0,.25); }

#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.lb { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); white-space: nowrap; font-size: 15px; pointer-events: none;
  text-shadow: 0 2px 0 rgba(0,0,0,.45), 0 0 5px rgba(0,0,0,.3); will-change: transform; }
.lb.timer { background: rgba(20,30,50,.62); padding: 2px 9px; border-radius: 10px; font-size: 13px; text-shadow: none; }
.lb.zzz { color: #d9ecff; font-size: 18px; }
.lb.alert { color: #ffd23a; font-size: 30px; }
.lb.chase { color: #ff4b4b; font-size: 32px; }
.fl { position: absolute; left: 0; top: 0; font-size: 18px; color: #ffe066; pointer-events: none; animation: fl 1.1s ease-out forwards;
  text-shadow: 0 2px 0 rgba(0,0,0,.5); }
@keyframes fl { from { opacity: 1; translate: -50% -100%; } to { opacity: 0; translate: -50% -260%; } }

#joy { position: fixed; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 3px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.12); display: none; pointer-events: none; }
#knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: rgba(255,255,255,.75);
  box-shadow: 0 3px 10px rgba(0,0,0,.25); }

#hud { position: fixed; inset: 0; pointer-events: none; padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); }
#hud button { pointer-events: auto; }
#top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tile { width: 46px; height: 46px; border-radius: 15px; font-size: 18px; background: linear-gradient(#fff, #e6f1ff); color: #2c4a7a;
  box-shadow: 0 4px 0 #9fb6d6, 0 6px 14px rgba(0,0,0,.2); }
.tile:active, .btn:active, .ad:active, .big:active { transform: translateY(2px); }
.pill { display: flex; align-items: center; gap: 7px; padding: 6px 16px 6px 8px; border-radius: 999px; background: rgba(18,32,58,.55);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); font-size: 24px; }
.pill small { font-size: 14px; color: #9ef08a; }
.coin { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b0, #ffc92e 45%, #e08a00);
  box-shadow: inset 0 -2px 0 #b86c00; }
#zone { text-align: center; margin-top: 8px; font-size: 22px; opacity: 0; transition: opacity .5s; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
#zone.show { opacity: 1; }
#hint { position: absolute; left: 50%; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 62px); transform: translateX(-50%); max-width: 92%; text-align: center; font-size: 17px; line-height: 1.25;
  background: rgba(18,32,58,.6); padding: 8px 14px; border-radius: 14px; display: none; }
#hint.show { display: block; }

#boosts { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.ad { display: flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 14px; font-size: 15px; color: #4a2600;
  background: linear-gradient(#ffe37a, #ffb320); box-shadow: 0 4px 0 #c47a00, 0 6px 14px rgba(0,0,0,.2); }
.ad i { font-style: normal; font-size: 11px; background: #4a2600; color: #ffd23a; border-radius: 6px; padding: 3px 5px; }
.ad.on { background: linear-gradient(#b8f59c, #57c93a); box-shadow: 0 4px 0 #2f8a1f; color: #10380a; }
.ad[hidden] { display: none; }
#bRescue { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); font-size: 18px; padding: 12px 20px; }
#bottom { position: absolute; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.btn { padding: 11px 16px; border-radius: 16px; font-size: 16px; color: #fff; background: linear-gradient(#5aa8ff, #2f6fe0);
  box-shadow: 0 4px 0 #1d4aa3, 0 6px 14px rgba(0,0,0,.2); }
.btn span { opacity: .85; font-size: 13px; }
#bTop[hidden] { display: none; }

.overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(10,22,44,.55); z-index: 5; padding: 14px; }
.overlay.show { display: flex; }
.menu { text-align: center; max-width: 420px; }
h1 { font-size: 64px; line-height: 1; letter-spacing: 1px; color: #fff; text-shadow: 0 5px 0 #2f6fe0, 0 10px 24px rgba(0,0,0,.35); }
h1 span { color: #ffd23a; text-shadow: 0 5px 0 #d48300, 0 10px 24px rgba(0,0,0,.35); }
.sub { margin: 18px 0 22px; font-size: 18px; line-height: 1.3; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.how { margin-top: 18px; font-size: 14px; opacity: .9; line-height: 1.35; font-weight: 700; }
.big { padding: 16px 54px; font-size: 26px; border-radius: 22px; color: #10380a; background: linear-gradient(#c6ff9e, #5bd23a);
  box-shadow: 0 6px 0 #2f8a1f, 0 10px 24px rgba(0,0,0,.3); }
.big:disabled { filter: grayscale(.6); opacity: .8; }
.card { position: relative; width: min(560px, 100%); max-height: 88vh; overflow: auto; background: linear-gradient(#ffffff, #eaf3ff); color: #22385e;
  border-radius: 24px; padding: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.card h2 { font-size: 26px; text-align: center; margin-bottom: 12px; }
.x { position: absolute; right: 10px; top: 10px; width: 38px; height: 38px; border-radius: 12px; background: #dfe9f7; color: #22385e; font-size: 18px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: #fff; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(30,60,120,.1); }
.row .ic { font-size: 30px; width: 44px; text-align: center; }
.row .tx { flex: 1; line-height: 1.2; }
.row .tx small { display: block; font-weight: 700; opacity: .7; font-size: 13px; }
.buy { padding: 10px 14px; border-radius: 14px; font-size: 16px; color: #4a2600; background: linear-gradient(#ffe37a, #ffb320); box-shadow: 0 3px 0 #c47a00; white-space: nowrap; }
.buy:disabled { filter: grayscale(1); opacity: .5; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pet { background: #fff; border-radius: 16px; padding: 6px 4px 8px; text-align: center; font-size: 13px; line-height: 1.15; box-shadow: 0 2px 8px rgba(30,60,120,.1); border: 3px solid transparent; }
.pet img { width: 80px; height: 80px; display: block; margin: 0 auto 2px; }
.pet.no img { filter: brightness(0) opacity(.25); }
.pet small { display: block; font-weight: 700; opacity: .75; }
.r0 { border-color: #b9c4d3; } .r1 { border-color: #4aa8ff; } .r2 { border-color: #b05cff; } .r3 { border-color: #ffb320; } .r4 { border-color: #ff4f7a; }
.lbrow { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: #fff; margin-bottom: 6px; }
.lbrow.me { background: #fff4c2; }

#toast { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%) scale(.8); font-size: 30px; text-align: center; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; text-shadow: 0 3px 0 rgba(0,0,0,.45), 0 0 12px rgba(0,0,0,.3); z-index: 4; width: 92%; }
#toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#toast small { display: block; font-size: 18px; }

@media (max-width: 520px) {
  .btn { padding: 10px 11px; font-size: 14px; }
  .ad { font-size: 13px; padding: 8px 10px; }
  h1 { font-size: 52px; }
}

.days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.day { position: relative; background: #fff; border-radius: 14px; padding: 6px 2px; text-align: center; font-size: 12px; line-height: 1.2; box-shadow: 0 2px 8px rgba(30,60,120,.1); border: 3px solid transparent; }
.day b { display: block; font-size: 24px; }
.day span { display: block; font-weight: 800; }
.day.now { border-color: #ffb320; background: #fff6d8; }
.day.got { opacity: .5; }
.day em { position: absolute; top: 2px; right: 6px; font-style: normal; color: #2fae4a; font-weight: 900; }
.day:last-child { grid-column: span 2; }
.day .coin { display: inline-block; width: 26px; height: 26px; margin: 2px 0; }
.qbar { height: 7px; border-radius: 4px; background: #e3e9f2; margin-top: 5px; overflow: hidden; }
.qbar i { display: block; height: 100%; background: linear-gradient(90deg, #7bdc5a, #2fae4a); }
#bQuest.glow { background: linear-gradient(#ffcf3a, #ff9a1a); color: #4a2600; animation: qpulse 1.2s ease-in-out infinite; }
@keyframes qpulse { 50% { transform: scale(1.06); } }
.row .tx .coin { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; box-shadow: none; }
.row .ic .coin { display: inline-block; width: 30px; height: 30px; }
#bQuest .lbl { font-weight: inherit; }
@media (max-width: 520px) { #bQuest .lbl { display: none; } }
@media (max-width: 520px) { #hint { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 118px); } } /* онбординг: подсказка выше двух рядов кнопок */
