@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; filter: saturate(.75); } /* мир глуше, не «летняя открытка» */
.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.red { background: linear-gradient(#ff6a5a, #c8281e); box-shadow: 0 4px 0 #8a1810, 0 6px 14px rgba(0,0,0,.25); }
#bKick[hidden], #bCur[hidden], #bShout[hidden] { display: none; }
.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: #3a4448; }
h1.ray span { display: block; font-size: 54px; color: #b8ff6a; text-shadow: 0 5px 0 #3d7a1a, 0 10px 24px rgba(0,0,0,.4); }
.pill.st { gap: 12px; padding: 6px 14px; font-size: 16px; }
.bar { display: flex; align-items: center; gap: 5px; } .bar i { display: block; width: 74px; height: 10px; border-radius: 6px; background: rgba(255,255,255,.2); overflow: hidden; }
.bar b { display: block; height: 100%; width: 100%; border-radius: 6px; background: #ff4b4b; transition: width .2s; } .bar.fd b { background: #ffb43a; } .bar.wt b { background: #3aa8ff; } .bar.en b { background: #b48aff; }
#mood { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 94px); display: flex; flex-wrap: wrap; justify-content: center; width: max-content; max-width: 94vw; gap: 6px; pointer-events: none; } #mood button.g { border-color: #5fd36a; } #mood button { pointer-events: auto; }
#mood button { font-size: 18px; line-height: 1; padding: 4px 6px; border-radius: 10px; background: rgba(0,0,0,.45); color: #fff; border: 2px solid transparent; } #mood button.l2 { border-color: #ffb43a; } #mood button.l3 { border-color: #ff4b4b; animation: rzPulse .7s ease-in-out infinite alternate; }
#sleep { position: absolute; inset: 0; z-index: 30; background: rgba(5,8,16,.62); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #dfe6ff; font-size: 22px; pointer-events: auto; } #sleep b { font-size: 54px; } #sleep small { opacity: .7; font-size: 14px; } #sleep[hidden], #bNeed[hidden] { display: none; }
#day { font-size: 15px; color: #d6ffb0; white-space: nowrap; }
#inv { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 54px); display: flex; gap: 6px; }
#inv > * { pointer-events: auto; display: flex; align-items: center; gap: 3px; padding: 4px 9px; border-radius: 12px; background: rgba(18,24,30,.6); font-size: 17px; color: #fff; }
#inv > span { pointer-events: none; } /* счётчики не кнопки — пропускают тап к джойстику под ними */
#inv b { font-size: 14px; } #inv button { box-shadow: inset 0 0 0 2px rgba(184,255,106,.55); }
#bleed { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 134px); padding: 4px 12px; border-radius: 12px; background: #b3261e; font-size: 15px; }
#bleed[hidden], #bAid[hidden], #bBuild[hidden] { display: none; }
#pad { width: 230px; height: 210px; }
#bAtk { right: 0; bottom: 0; width: 86px; height: 86px; background: rgba(150,30,30,.55) !important; } #bAtk b { font-size: 34px; }
#bUse { right: 4px; bottom: 100px; width: 60px; height: 60px; } #bUse b { font-size: 24px; }
#bJump { right: 98px; bottom: 2px; width: 62px; height: 62px; }
#bRun { right: 86px; bottom: 80px; width: 58px; height: 58px; }
#pad > #bAct { right: 150px; bottom: 80px; }
.lfs { margin: 4px 0 6px; font-size: .85em; opacity: .85; } /* RZKC */
.dead h2 { color: #b3261e; } .dead p.dth { font-weight: 400; line-height: 1.5; } .dead p.dth b { font-size: 1.15em; color: #b3261e; } .dead p { text-align: center; margin: 6px 0 14px; font-weight: 700; }
.mcp-login { margin-top: 14px; padding: 10px 18px; border-radius: 16px; font-size: 16px; color: #fff; background: linear-gradient(#5ab8ff, #2a8ad8); box-shadow: 0 4px 0 #1a5a9a; }
@media (orientation: portrait) { .touch #inv { top: auto; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 220px); left: 10px; transform: none; flex-wrap: wrap; max-width: 60%; } .bar i { width: 46px; } }
#hud.hurt::after { content: ''; position: fixed; inset: 0; box-shadow: inset 0 0 90px rgba(200,0,0,.65); pointer-events: none; }
#pad > #bUse.ready { background: rgba(255,210,60,.7); box-shadow: 0 0 16px #ffd23a; }
/* стартовый экран: HUD за ним не просвечивает; на телефоне горизонтально (высота ~390) всё влезает */
.overlay#start { background: linear-gradient(180deg, rgba(14,20,32,.82), rgba(14,20,32,.94)); overflow-y: auto; }
@media (max-height: 520px) {
  h1.ray { font-size: 40px; } h1.ray span { display: inline; font-size: 40px; }
  #start .sub { font-size: 14px; margin: 8px 0 12px; } #start .how { display: none; }
}

#map { pointer-events: auto; cursor: pointer; }
.mapbox { position: relative; text-align: center; }
.mapbox .x { right: 8px; top: 8px; z-index: 1; }
#big { display: block; width: min(calc(100vw - 28px), calc(100vh - 80px)); height: min(calc(100vw - 28px), calc(100vh - 80px)); border-radius: 16px; border: 3px solid #fff; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.legend { margin-top: 8px; font-size: 13px; font-weight: 700; text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.legend span { display: inline-block; white-space: nowrap; } /* RZMAP: пункт легенды не рвётся посередине */
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin: 0 4px 0 10px; vertical-align: -1px; border: 1px solid #222; }

/* инвентарь: рюкзак и окно контейнера */
.card.wide { width: min(880px, 100%); }
.invw { display: grid; gap: 12px; } .card.wide .invw { grid-template-columns: 1fr 1fr; }
.invw h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 18px; margin-bottom: 6px; }
.invw h3 span { font-size: 14px; opacity: .8; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; min-height: 74px; padding: 6px; border-radius: 14px; background: #dfe9f7; }
.cell { position: relative; height: 62px; border-radius: 12px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(30,60,120,.15); }
.cell b { font-size: 26px; line-height: 1.1; } .cell small { font-size: 10px; opacity: .75; }
.cell i { position: absolute; right: 5px; top: 2px; font-style: normal; font-size: 12px; font-weight: 800; }
.cell.r1 { outline: 2px solid #4a8fe0; outline-offset: -2px; } .cell.r2 { outline: 2px solid #e0b030; outline-offset: -2px; background: #fff8e2; } .acts .hint { flex-basis: 100%; font-size: 11px; opacity: .75; }
.cell.sel { box-shadow: 0 0 0 3px #ff9b2e; } .cell.on { background: #dcffc4; }
.cell.drag { z-index: 9; pointer-events: none; opacity: .85; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
#gC .cell { touch-action: none; }
.wbar { height: 8px; border-radius: 6px; background: #c9d6ea; overflow: hidden; margin-bottom: 6px; } .wbar i { display: block; height: 100%; background: #5bd23a; } .wbar i.full { background: #e04a3a; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-weight: 800; }
.acts button, .invw h3 button { padding: 8px 12px; border-radius: 12px; background: #2f6fe0; color: #fff; font-size: 15px; }
.invw h3 button:disabled { opacity: .4; } .acts button.red { background: #e04a3a; }
.empty { grid-column: 1 / -1; text-align: center; opacity: .6; font-size: 13px; align-self: center; }
.tip { font-size: 12px; opacity: .65; margin-top: 4px; }
@media (max-height: 520px) { .card { max-height: 94vh; padding: 12px; } .card h2 { font-size: 20px; margin-bottom: 6px; } .cell { height: 54px; } .grid { min-height: 62px; } }
.cell b img { width: 30px; height: 30px; display: block; } .cell em { font-style: normal; font-size: 9.5px; line-height: 1.1; max-width: 100%; padding: 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acts span img { width: 22px; height: 22px; vertical-align: middle; }
#tag { position: fixed; left: 0; top: 0; z-index: 4; pointer-events: none; display: none; background: rgba(20,24,30,.82); color: #fff; border-radius: 10px; padding: 6px 9px; font-size: 13px; line-height: 1.35; white-space: nowrap; }
#tag.show { display: block; } #tag b { display: block; font-size: 11px; opacity: .7; } #tag span { display: flex; align-items: center; gap: 5px; } #tag img { width: 20px; height: 20px; }
@media (max-height: 520px) { .cell b img { width: 24px; height: 24px; } }

/* ---------- этап A: меню с песочницей, игра лёжа ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.big.alt { padding: 12px 22px; font-size: 18px; color: #fff; background: linear-gradient(#5aa8ff, #2f6fe0); box-shadow: 0 5px 0 #1d4aa3, 0 8px 18px rgba(0,0,0,.3); }
.big[hidden], #sbox[hidden] { display: none; }
#sbox { margin-top: 14px; padding: 12px; border-radius: 18px; background: rgba(18,32,58,.7); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; text-align: left; font-size: 15px; }
#sbox label { display: flex; flex-direction: column; gap: 4px; }
#sbox select { font: inherit; font-size: 15px; padding: 6px 8px; border-radius: 10px; border: 0; }
#sbox .big { grid-column: 1 / -1; padding: 10px 16px; font-size: 18px; }
#rot { position: fixed; inset: 0; z-index: 40; /* RZBUG8545: выше заставки, иначе титры поверх */ display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: #1a2230; font-size: 22px; text-align: center; padding: 20px; }
#rot b { font-size: 64px; }
@media (orientation: portrait) { body.touch.play #rot { display: flex; } }
@media (orientation: landscape) and (max-height: 520px) {
  .menu { max-width: 820px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; align-items: center; text-align: left; }
  .menu h1, .menu .sub { grid-column: 1; } .menu .btns, .menu #sbox, .menu .how { grid-column: 2; }
  .menu h1 { font-size: 48px; grid-row: 1; } .menu .sub { grid-row: 2; margin: 10px 0 0; font-size: 15px; }
  .menu .btns { grid-row: 1 / span 2; justify-content: flex-start; } .menu .how { grid-row: 3 / span 2; margin-top: 8px; font-size: 12px; }
  .menu #sbox { grid-row: 3; }
  #map { width: 104px; height: 104px; top: calc(max(8px, env(safe-area-inset-top)) + 50px); }
  .pill { font-size: 18px; padding: 4px 12px 4px 6px; } .tile { width: 40px; height: 40px; }
}

.bigw { position: relative; display: inline-block; }
.mz { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 8px; }
.mz button { width: 40px; height: 40px; border-radius: 12px; font-size: 24px; background: #dfe9f7; color: #22385e; box-shadow: 0 3px 0 #9fb6d6; }
@media (orientation: landscape) and (max-height: 520px) {
  .mapbox { display: flex; gap: 14px; align-items: center; text-align: left; }
  #big { width: calc(100vh - 28px); height: calc(100vh - 28px); }
  .mapbox .legend { max-width: 240px; line-height: 1.7; margin: 0; padding: 10px 14px 10px 4px; border-radius: 14px; background: rgba(18,22,28,.82); }
  .mapbox .legend span { display: block; }
}
#start { overflow-y: auto; touch-action: pan-y; align-items: safe center; }
.menu:has(#sbox:not([hidden])) .sub, .menu:has(#sbox:not([hidden])) .how { display: none; }
@media (orientation: landscape) and (max-height: 520px) { .menu:has(#sbox:not([hidden])) .btns { grid-row: 2; } .menu:has(#sbox:not([hidden])) #sbox { grid-row: 3; margin-top: 8px; }
  /* RZLOOTR 7 настроек песочницы: на всю ширину в 4 колонки, чтобы «Начать» влезала в 390 */ .menu #sbox { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); padding: 8px 10px; gap: 4px 10px; font-size: 13px; } .menu #sbox select { font-size: 13px; padding: 4px 6px; } .menu #sbox .big { padding: 7px 14px; font-size: 16px; } .menu:has(#sbox:not([hidden])) .mcp-login { display: none !important; } }

/* окно настроек */
.cfg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; text-align: left; font-size: 15px; }
.cfg h3 { grid-column: 1 / -1; font-size: 16px; margin-top: 6px; color: #2c4a7a; border-bottom: 1px solid #c9daf2; }
.cfg label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; }
.cfg input[type=range] { grid-column: 1; width: 100%; accent-color: #2f6fd6; height: 26px; }
.cfg output { grid-column: 2; grid-row: 2; min-width: 42px; text-align: right; font-weight: 700; }
.cfg select { grid-column: 1 / -1; font: inherit; padding: 6px 8px; border-radius: 10px; border: 1px solid #b8cce8; background: #fff; }
.cfg .keys { grid-column: 1 / -1; font-size: 12px; opacity: .75; margin-top: 6px; }
#panel.pcfg .card { width: min(640px, 100%); }
@media (max-width: 520px) { .cfg { grid-template-columns: 1fr; } }
#bAim { right: 70px; bottom: 148px; width: 52px; height: 52px; } #bAim b { font-size: 20px; } #pad > #bAim.lock { background: rgba(255,200,60,.75) !important; box-shadow: 0 0 14px #ffc83a; }
#aimX { position: fixed; width: 34px; height: 34px; margin: -17px 0 0 -17px; pointer-events: none; z-index: 30; opacity: 0; }
#aimX i { position: absolute; left: 15px; top: 0; width: 4px; height: 34px; background: #fff; box-shadow: 0 0 0 1.5px #b3261e, 0 0 8px #000; border-radius: 2px; transform: rotate(45deg); }
#aimX i + i { transform: rotate(-45deg); }
#aimX.show { animation: aimX .35s ease-out; }
@keyframes aimX { 0% { opacity: 1; transform: scale(1.5); } 60% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.9); } }
#bCrouch { right: 166px; bottom: 4px; width: 54px; height: 54px; } #bCrouch b { font-size: 22px; } #pad > #bCrouch.lit { background: rgba(110,190,90,.7); } /* крадучись */
#tag.show { pointer-events: auto; cursor: pointer; } #tag .tk { font-size: 11px; opacity: .65; }
#iBand.pulse { animation: rzPulse .7s ease-in-out infinite alternate; } /* кровотечение — тапни бинт */
@keyframes rzPulse { to { box-shadow: 0 0 16px 5px #e0302a; background: #8a1a16; outline: 2px solid #ff6a5a; } }

/* RZLOOT2: подпись у мебели — список кнопок под палец, значок летит в рюкзак */
#tag button { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 34px; margin-top: 3px; padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,.13); color: #fff; font: inherit; font-size: 14px; text-align: left; }
#tag button:active { background: rgba(255,155,46,.7); } #tag button.all { justify-content: center; background: #2f6fe0; font-weight: 800; }
#tag b[data-t] { padding: 2px 0 4px; font-size: 12px; } #tag button img { width: 24px; height: 24px; }
.fly { position: fixed; z-index: 60; display: flex; align-items: center; gap: 4px; padding: 3px 8px 3px 3px; border-radius: 10px; background: rgba(20,24,30,.85); color: #ffd36a; font-weight: 800; font-size: 14px; white-space: nowrap; pointer-events: none; transform-origin: 0 0; transition: transform .5s ease-in, opacity .5s ease-in; }
.fly img { width: 28px; height: 28px; }
#bBag.bump { transform: scale(1.25); transition: transform .12s; }
/* RZWND */ .hb { display: flex; gap: 14px; align-items: flex-start; } .hb svg { width: 118px; flex: none; } .hb svg [data-hb] { cursor: pointer; } .hbl { flex: 1; min-width: 0; } .hbl > p:first-child { margin: 0 0 8px; font-weight: 700; }
.hbw { padding: 7px 9px; margin: 0 0 6px; border-radius: 10px; background: rgba(255,255,255,.07); } .hbw small { display: block; opacity: .8; margin: 2px 0 5px; } .hbw span, .hbg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.hbw button, .hbg button { padding: 6px 10px; border-radius: 9px; border: 0; background: #2f6fe0; color: #fff; font-weight: 700; } .hbw button.off, .hbg button.off { opacity: .4; } .hbg { margin-top: 8px; }
@media (max-height: 500px) { .hb svg { width: 86px; } }
/* RZCMB */ .acts .cnd { opacity: .8; align-self: center; } .acts button.off { opacity: .4; }
/* RZCRF */ .crf { display: flex; align-items: center; gap: 8px; padding: 7px 9px; margin: 0 0 6px; border-radius: 10px; background: rgba(255,255,255,.07); } .crf span { flex: 1; } .crf img { width: 26px; height: 26px; vertical-align: middle; margin-right: 6px; } .crf small { display: block; opacity: .8; } .crf button { padding: 8px 12px; border-radius: 10px; border: 0; background: #2f6fe0; color: #fff; font-weight: 700; } .crf.off { opacity: .55; } .crf button.off { opacity: .4; } .crfl h3 { margin: 10px 0 6px; font-size: 14px; opacity: .8; }
body:has(#tag.show) #toast { top: 90%; font-size: 24px; } body:has(#tag.show):has(#toast.show) #hint { opacity: 0; } /* RZ8317: всплывашка не закрывает список лута */

/* RZ8324: плашка баржи не поверх карты и рюкзака; название вещи в две строки, без «Обезболив…» */
body:has(#panel.show) #evBar, body:has(#mapView.show) #evBar { display: none !important; }
.cell em { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-overflow: clip; font-size: 9px; line-height: 1.05; text-align: center; }

/* RZ8359 надпись входа в дом — выше героя, не поверх него */ #toast { top: 31%; font-size: 26px; } #toast small { font-size: 16px; }
#bSbGo{position:sticky;bottom:6px;z-index:2} /* песочница длиннее экрана телефона — «Начать» всегда видна */

/* RZV48 всплывашка (дом, рана) не наезжает на плашку кровотечения: на 2 с плашка прячется, бинт и так мигает */ body:has(#toast.show) #bleed { opacity: 0; }
#cmp { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top)) + 35px); width: min(320px, 44vw); height: 18px; pointer-events: none; overflow: hidden; background: rgba(10,12,16,.5); border-radius: 9px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
#cmp::after { content: ''; position: absolute; left: 50%; top: 0; width: 2px; height: 5px; margin-left: -1px; background: #ffcf4a; }
#cmp i { position: absolute; top: 1px; transform: translateX(-50%); font: 800 12px/16px sans-serif; font-style: normal; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; } #cmp i.d { color: #ffcf4a; } #cmp i.d2 { font-size: 9px; opacity: .8; } #cmp i.m { font-size: 12px; } /* RZCMP */
#thr { position: absolute; inset: 0; pointer-events: none; } /* RZTHD */
#plc { position: fixed; left: 50%; bottom: 13%; transform: translateX(-50%); max-width: 70vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 800 20px sans-serif; color: #fff; text-shadow: 0 1px 3px #000; opacity: 0; pointer-events: none; transition: opacity .5s; z-index: 6; } #plc.show { opacity: 1; } /* RZPLC 18.67 */
#mapHere { margin: 4px 0 0; font-size: 13px; color: #ddd; text-align: center; } #mapHere:empty { display: none; }
#bls { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 4% 12%, rgba(120,0,0,.9), transparent 14vmin), radial-gradient(circle at 10% 3%, rgba(140,5,5,.8), transparent 8vmin), radial-gradient(circle at 96% 85%, rgba(120,0,0,.9), transparent 16vmin), radial-gradient(circle at 88% 97%, rgba(140,5,5,.75), transparent 9vmin), radial-gradient(circle at 2% 70%, rgba(110,0,0,.8), transparent 10vmin), radial-gradient(circle at 98% 20%, rgba(110,0,0,.7), transparent 9vmin), radial-gradient(ellipse at center, transparent 58%, rgba(110,0,0,.75) 100%); } /* RZBLS */
#eye { position: absolute; inset: 0; pointer-events: none; --e: 0vh; } #eye::before, #eye::after { content: ''; position: absolute; left: 0; right: 0; height: var(--e); background: linear-gradient(#000 0 75%, transparent); } #eye::before { top: 0; } #eye::after { bottom: 0; transform: scaleY(-1); } /* RZEYE веки при усталости */
