@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%; height: 100dvh; 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; }
}

/* ---------- Район: поверх стилей Яйцехвата ---------- */
body { background: #9db8cc; }
#hud { z-index: 2; }
.rub { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d9ffd0, #4fc36a 50%, #23843d); color: #0f3a19;
  display: grid; place-items: center; font-size: 17px; box-shadow: inset 0 -2px 0 #1b6a30; }
#map { position: absolute; right: 10px; top: calc(max(10px, env(safe-area-inset-top)) + 56px); width: 132px; height: 132px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.85); box-shadow: 0 6px 16px rgba(0,0,0,.3); background: #3c4048; }
#jobCard { position: absolute; left: 50%; top: calc(max(10px, env(safe-area-inset-top)) + 54px); transform: translateX(-50%); min-width: 190px; max-width: 58%;
  text-align: center; font-size: 16px; line-height: 1.2; background: rgba(18,32,58,.72); padding: 8px 14px; border-radius: 14px; display: none; }
#jobCard.show { display: block; }
#jobCard small { display: block; font-size: 13px; color: #ffe37a; margin-top: 2px; }
#side { position: absolute; right: 10px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 8px); display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.act { min-width: 118px; padding: 13px 16px; border-radius: 18px; font-size: 18px; color: #fff; background: linear-gradient(#ff9d4a, #f0621f);
  box-shadow: 0 4px 0 #a8400f, 0 6px 14px rgba(0,0,0,.25); }
.act.blue { background: linear-gradient(#5aa8ff, #2f6fe0); box-shadow: 0 4px 0 #1d4aa3, 0 6px 14px rgba(0,0,0,.25); }
.act.green { background: linear-gradient(#8ee36a, #3da82a); box-shadow: 0 4px 0 #24701a, 0 6px 14px rgba(0,0,0,.25); }
.act[hidden], #bX2[hidden] { display: none; }
#speed { position: absolute; left: 50%; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 6px); transform: translateX(-50%); font-size: 30px;
  text-shadow: 0 2px 0 rgba(0,0,0,.45); display: none; }
#speed small { font-size: 14px; opacity: .85; }
#speed.show { display: block; }
h1.ray { font-size: 70px; text-shadow: 0 5px 0 #c4501a, 0 10px 24px rgba(0,0,0,.35); }
.overlay#start { background: linear-gradient(180deg, rgba(20,28,44,.35), rgba(20,28,44,.75)); }
@media (max-width: 600px) { #jobCard { left: 10px; transform: none; max-width: calc(100% - 160px); min-width: 0; font-size: 15px; } }

#jobCard.late small { color: #ff6b5b; }
#streak { position: absolute; left: 50%; top: calc(max(10px, env(safe-area-inset-top)) + 118px); transform: translateX(-50%); padding: 4px 12px; border-radius: 14px;
  background: linear-gradient(90deg, #ff7a18, #ff3d3d); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 3px 10px rgba(0,0,0,.35); pointer-events: none; }

/* ---------- управление как в Genshin mobile: джойстик слева, кнопки справа, карта и задание слева сверху ---------- */
#top .tr { display: flex; gap: 8px; }
#bFull[hidden] { display: none; }
#pad { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: calc(max(10px, env(safe-area-inset-bottom)) + 4px); width: 206px; height: 200px; pointer-events: none; }
#pad > button { position: absolute; border-radius: 50%; display: none; flex-direction: column; align-items: center; justify-content: center; touch-action: none;
  background: rgba(20,30,50,.45); border: 2px solid rgba(255,255,255,.7); box-shadow: 0 4px 14px rgba(0,0,0,.3); color: #fff; line-height: 1; }
#pad > button b { font-size: 26px; } #pad > button small { font-size: 10px; margin-top: 2px; opacity: .9; }
#pad > button.on, #pad > button:active { background: rgba(255,170,40,.75); }
#bUse { right: 0; bottom: 0; width: 82px; height: 82px; } #bUse b { font-size: 32px; }
#bJump { right: 96px; bottom: 4px; width: 64px; height: 64px; }
#bRun { right: 84px; bottom: 84px; width: 58px; height: 58px; }
#pad > #bAct { right: 8px; bottom: 98px; min-width: 0; width: 66px; height: 66px; padding: 0; font-size: 12px; border-radius: 50%; display: flex;
  background: linear-gradient(#ff9d4a, #f0621f); border: 2px solid rgba(255,255,255,.8); white-space: pre-line; text-align: center; }
#pad > #bAct[hidden] { display: none; }
.touch #pad > button:not(#bAct) { display: flex; }
.touch #joy { display: block; width: 130px; height: 130px; margin: -65px 0 0 -65px; }
.touch #side { right: max(10px, env(safe-area-inset-right)); bottom: auto; top: calc(max(10px, env(safe-area-inset-top)) + 58px); gap: 8px; }
.touch #side .act { min-width: 0; padding: 9px 12px; font-size: 15px; border-radius: 14px; }
.touch #map { left: max(10px, env(safe-area-inset-left)); right: auto; top: calc(max(10px, env(safe-area-inset-top)) + 56px); width: 104px; height: 104px; }
.touch #jobCard { left: max(10px, env(safe-area-inset-left)); transform: none; top: calc(max(10px, env(safe-area-inset-top)) + 168px); max-width: 46%; min-width: 0; text-align: left; font-size: 14px; }
.touch #hint { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 210px); }
@media (orientation: landscape) { .touch #jobCard { left: calc(max(10px, env(safe-area-inset-left)) + 114px); top: calc(max(10px, env(safe-area-inset-top)) + 56px); max-width: 34%; }
  .touch #hint { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 8px); max-width: 40%; } }
.ios-steps { text-align: left; line-height: 1.4; font-weight: 700; } .ios-steps b { font-weight: 800; }

/* ---------- Склад: поверх стилей Района ---------- */
body { background: #2a3442; }
#top { justify-content: flex-start; }
#top .tr { margin-left: auto; }
.clk { font-size: 20px; } .late .clk, .clk.late { color: #ff8a7a; }
#norm { position: relative; width: 190px; height: 34px; border-radius: 999px; background: rgba(18,32,58,.55); overflow: hidden; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
#norm i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #ff9d4a, #f0621f); transition: width .3s; }
#norm.done i { background: linear-gradient(90deg, #8ee36a, #3da82a); }
#norm span { position: relative; display: block; text-align: center; line-height: 34px; font-size: 15px; text-shadow: 0 1px 0 rgba(0,0,0,.4); }
#orders { position: absolute; right: max(10px, env(safe-area-inset-right)); top: calc(max(10px, env(safe-area-inset-top)) + 58px); display: flex; flex-direction: column; gap: 5px; align-items: flex-end; font-size: 14px; }
#orders div { background: rgba(18,32,58,.65); padding: 4px 10px 4px 4px; border-radius: 12px; }
#orders b { display: inline-block; padding: 2px 8px; border-radius: 9px; margin-right: 4px; }
#hands { position: absolute; left: 50%; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 8px); transform: translateX(-50%); background: rgba(18,32,58,.65); padding: 6px 10px; border-radius: 14px; font-size: 14px; white-space: nowrap; max-width: 60%; overflow: hidden; }
#hands span { display: inline-block; background: rgba(255,255,255,.18); border-radius: 8px; padding: 1px 6px; margin-left: 4px; }
#hands i { opacity: .7; font-weight: 700; }
#bUse.ready { background: rgba(80,190,70,.8); }
#pad > #bAct { width: auto; min-width: 120px; height: 52px; border-radius: 16px; padding: 0 14px; right: 0; bottom: 0; font-size: 16px; }
#scan, #pick { position: fixed; left: 50%; top: calc(max(10px, env(safe-area-inset-top)) + 58px); transform: translateX(-50%); width: min(440px, 92%); z-index: 3; display: none;
  background: linear-gradient(#ffffff, #eaf3ff); color: #22385e; border-radius: 20px; padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
#scan.show, #pick.show { display: block; } #scan.miss { animation: shake .3s; }
@keyframes shake { 25% { translate: -8px 0; } 75% { translate: 8px 0; } }
.scrow { display: flex; gap: 10px; align-items: center; }
.scbox { position: relative; font-size: 46px; width: 64px; text-align: center; } .scbox.bad { filter: sepia(1) saturate(.6) brightness(.8); }
.scbox span { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font-size: 11px; background: #b3261e; color: #fff; padding: 1px 6px; border-radius: 8px; white-space: nowrap; }
.scbox span:empty { display: none; }
.sctx { flex: 1; font-size: 14px; line-height: 1.25; } .sctx small { display: block; opacity: .7; font-weight: 700; margin-top: 3px; }
.scbar { position: relative; height: 22px; margin: 10px 0; border-radius: 11px; background: #ffd0c8; overflow: hidden; }
.scbar i { position: absolute; top: 0; bottom: 0; background: #69d25a; }
.scbar b { position: absolute; top: -2px; width: 6px; height: 26px; margin-left: -3px; background: #22385e; border-radius: 3px; }
.scbtn { display: flex; gap: 8px; } .scbtn button { flex: 1; padding: 12px; border-radius: 14px; font-size: 18px; color: #fff; background: linear-gradient(#5aa8ff, #2f6fe0); box-shadow: 0 4px 0 #1d4aa3; touch-action: none; }
.scbtn #bBrak { background: linear-gradient(#ff8a6a, #e2452c); box-shadow: 0 4px 0 #9a2a18; }
#toast.bad { color: #ffb4a8; font-size: 22px; }
.lv { font-size: 18px; margin: -8px 0 16px; }
.rep { display: flex; gap: 8px; } .rep div { flex: 1; background: #fff; border-radius: 14px; padding: 10px 4px; text-align: center; font-size: 15px; }
.rep b { font-size: 24px; } .rep small { display: block; font-weight: 700; opacity: .7; font-size: 12px; }
.ops { font-size: 13px; font-weight: 700; margin: 8px 0; opacity: .85; line-height: 1.35; }
.lvlup { background: #fff4c2; border-radius: 14px; padding: 10px; margin: 8px 0; text-align: center; }
.card h3 { margin: 12px 0 8px; font-size: 18px; }
.card .ad { margin: 8px auto; font-size: 18px; } .card .big { display: block; margin: 12px auto 0; }
.touch #jobCard { top: calc(max(10px, env(safe-area-inset-top)) + 56px); }
.touch #hands { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 4px); max-width: 40%; }
@media (orientation: landscape) { .touch #jobCard { left: max(10px, env(safe-area-inset-left)); top: calc(max(10px, env(safe-area-inset-top)) + 56px); max-width: 34%; } }
@media (max-width: 600px) { #norm { width: 120px; } .clk { font-size: 16px; } #top .pill { font-size: 18px; padding: 4px 10px 4px 6px; } #top { flex-wrap: wrap; gap: 6px; }
  #orders { font-size: 12px; top: calc(max(10px, env(safe-area-inset-top)) + 104px); }
  .touch #jobCard { top: calc(max(10px, env(safe-area-inset-top)) + 104px); max-width: 50%; } #scan, #pick { top: auto; bottom: 220px; } }
@media (max-width: 600px) { .touch #hands { left: max(10px, env(safe-area-inset-left)); transform: none; bottom: auto; top: calc(max(10px, env(safe-area-inset-top)) + 168px); max-width: 48%; } }
#pkBtns button { font-size: 15px; padding: 10px 6px; line-height: 1.1; } #pkBtns small { display: block; font-size: 11px; font-weight: 700; opacity: .9; margin-top: 2px; }
