*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#050806;color:#edf3ec;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input{font:inherit}.hidden{display:none!important}.screen{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 40%,#18251b,#050806 65%);z-index:50}.brand{font-weight:900;letter-spacing:.22em;font-size:clamp(34px,8vw,72px);text-align:center}.bootBrand{display:flex;justify-content:center;gap:.06em;letter-spacing:.12em}.bootBrand span{display:inline-block;opacity:0;transform:translateY(8px) scale(.92);animation:bootLetter .34s cubic-bezier(.2,.8,.2,1) forwards}.bootBrand span:nth-child(1){animation-delay:.04s}.bootBrand span:nth-child(2){animation-delay:.11s}.bootBrand span:nth-child(3){animation-delay:.18s}.bootBrand span:nth-child(4){animation-delay:.25s}.bootBrand span:nth-child(5){animation-delay:.32s}.bootBrand span:nth-child(6){animation-delay:.39s}.bootBrand span:nth-child(7){animation-delay:.46s}.bootBrand span:nth-child(8){animation-delay:.53s}@keyframes bootLetter{to{opacity:1;transform:translateY(0) scale(1)}}.brand.small{font-size:30px;margin-bottom:14px}.sub{margin-top:12px;color:#8fa18f;font-size:12px;letter-spacing:.2em;text-align:center}.panel{width:min(92vw,420px);padding:28px;border:1px solid #334538;background:#080e0af2;border-radius:18px;box-shadow:0 20px 70px #0009;text-align:center}.authInput{display:block;width:100%;padding:14px;margin:9px 0;border:1px solid #394a3d;background:#0d150f;color:#fff;border-radius:11px;outline:none}.primary,.secondary{width:100%;padding:14px;border-radius:11px;margin-top:10px}.primary{background:#dcebd8;color:#0a110b;font-weight:800}.secondary{background:#18231a;color:#d7e2d7}.msg{min-height:20px;margin-top:12px;color:#aab7aa;font-size:13px}.msg.error{color:#ff9c9c}#game{position:fixed;inset:0;background:#111;touch-action:none}#scene{width:100%;height:100%;display:block}.topbar{position:absolute;left:14px;right:14px;top:calc(12px + env(safe-area-inset-top));display:flex;align-items:center;gap:9px}.stat{font-size:11px;min-width:42px}.stat span{display:block;color:#92a292}.stat b{font-size:17px}.health{width:min(28vw,230px);height:8px;border-radius:8px;background:#252c26;overflow:hidden}.health i{display:block;height:100%;width:100%;background:#9ac29b;transition:width .15s}.stat:nth-last-child(-n+2){text-align:center}.stat:nth-last-child(2){margin-left:auto}#missionBox{position:absolute;top:72px;left:14px;width:min(430px,calc(100vw - 28px));padding:12px 14px;background:#071009d9;border-left:3px solid #91aa8e;border-radius:0 10px 10px 0}#missionTitle{font-size:16px;font-weight:850;margin-top:2px}.eyebrow{font-size:9px;letter-spacing:.18em;color:#8ea18e}#objective{font-size:12px;color:#b9c5ba;margin-top:5px}#ammo{position:absolute;right:18px;bottom:112px;font-size:15px;background:#071009d9;padding:9px 12px;border-radius:10px}#ammo b{font-size:28px}#notice{position:absolute;left:50%;top:38%;transform:translate(-50%,-50%);padding:12px 16px;border-radius:12px;background:#061008dd;opacity:0;transition:opacity .15s;pointer-events:none;text-align:center;max-width:80vw}#crosshair{position:absolute;left:50%;top:50%;width:20px;height:20px;transform:translate(-50%,-50%);border:1px solid #fff8;border-radius:50%;pointer-events:none}.touchActions{position:absolute;right:16px;bottom:16px;display:grid;grid-template-columns:repeat(2,92px);gap:8px}.touchActions button{height:46px;border-radius:12px;background:#09120bdd;color:#e8f0e8;border:1px solid #526252;font-size:10px;font-weight:800}.touchActions button:first-child{background:#dcebd8;color:#0a110b}#joystick{position:absolute;left:18px;bottom:18px;width:128px;height:128px;border-radius:50%;background:#ffffff10;border:1px solid #ffffff24}#stick{position:absolute;left:38px;top:38px;width:52px;height:52px;border-radius:50%;background:#ffffff2a;border:1px solid #ffffff40}.desktopHint{position:absolute;left:50%;bottom:9px;transform:translateX(-50%);font-size:10px;color:#9aa69b;background:#071009b8;padding:6px 9px;border-radius:8px;white-space:nowrap}.overlay{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;background:#0009}@media(pointer:fine){#joystick,.touchActions{display:none}}@media(pointer:coarse){.desktopHint{display:none}}@media(orientation:portrait) and (max-width:900px){#auth,#boot{width:100vh;height:100vw;left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%) rotate(90deg);transform-origin:center center}.bootInner{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}.authInput{font-size:16px}.panel{width:min(88vw,520px)}}
.lobby{width:min(1100px,94vw);max-height:94vh;overflow:auto;padding:24px}.lobbyHead{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:22px}.lobbyBrand{font-size:clamp(32px,5vw,54px);text-align:left}.sub.left{text-align:left;margin-top:4px}.profileBadge{min-width:150px;padding:12px 15px;border:1px solid #394a3d;background:#0a120cdd;border-radius:12px;text-align:right}.profileBadge span{display:block;font-weight:800}.profileBadge small{display:block;margin-top:4px;color:#93a293}.lobbyGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.lobbyCard{min-height:145px;padding:22px;border:1px solid #344637;border-radius:16px;background:#0a130cdd;color:#edf3ec;text-align:left;display:flex;flex-direction:column;justify-content:flex-end}.lobbyCard.play{background:linear-gradient(135deg,#dcebd8,#8da68d);color:#0a110b}.lobbyCard strong{font-size:22px}.lobbyCard span{font-size:12px;margin-top:7px;opacity:.75}.lobbyPanel{margin-top:16px;padding:18px;border:1px solid #344637;border-radius:15px;background:#080e0af2}.lobbyPanel h3{margin:0 0 12px}.lobbyPanel p{color:#aeb9ae;font-size:13px;line-height:1.5}.missionRow{padding:11px 0;border-top:1px solid #263329}.missionRow b{display:block}.missionRow span{display:block;color:#9ca99e;font-size:12px;margin-top:3px}.lobbyPanel button{padding:11px 15px;border-radius:10px;background:#dcebd8;color:#0a110b;font-weight:800;margin-top:10px}.lobbyLogout{margin-top:16px;background:none;color:#89978b;padding:8px}.charInput{width:100%;padding:12px;border-radius:10px;border:1px solid #394a3d;background:#0d150f;color:#fff}@media(max-width:650px){.lobbyGrid{grid-template-columns:1fr}.lobbyHead{align-items:flex-start}.profileBadge{min-width:125px}.lobby{padding:14px}}@media(orientation:portrait) and (max-width:900px){#game{width:100vh;height:100vw;left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%) rotate(90deg);transform-origin:center center}#game #scene{width:100%;height:100%}}
/* KARMADON 0.5 — guest-first lobby, maps and compact registration */
.authPanel h1{font-size:clamp(25px,4vw,34px);line-height:1.05;margin:8px 0 16px;overflow-wrap:anywhere}
.authPanel{padding:22px 26px}
.registerCorner{position:fixed;left:24px;bottom:22px;padding:12px 16px;border:1px solid #526252;border-radius:12px;background:#dcebd8;color:#0a110b;font-weight:900;box-shadow:0 8px 30px #0007}
.mapTitle{margin:8px 0 12px;display:flex;align-items:baseline;justify-content:space-between;gap:12px}.mapTitle span{font-size:10px;letter-spacing:.2em;color:#89988b}.mapTitle b{font-size:16px}.mapGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}.mapCard{min-height:108px;padding:15px;border:1px solid #344637;border-radius:14px;background:#0a130cdd;color:#edf3ec;text-align:left}.mapCard b{display:block;font-size:13px;line-height:1.25}.mapCard span{display:block;color:#9ca99e;font-size:11px;line-height:1.4;margin-top:7px}.mapCard.active{border-color:#dcebd8;box-shadow:inset 0 0 0 1px #dcebd855;background:#121d14}
.profileBadge.guest{border-color:#536653}.profileBadge.account{border-color:#91aa8e}.profileBadge{display:flex;align-items:center;gap:10px;text-align:left}.profileAvatar{width:38px;height:38px;min-width:38px;border-radius:50%;display:grid;place-items:center;background:#18251b;border:1px solid #6f806f;color:#dcebd8;font-weight:900}.profileBadge small{font-size:10px}.lobbyLogout{border:0}.charInput{font-size:16px}
@media(max-width:850px){.lobby{padding:18px}.mapGrid{grid-template-columns:1fr}.mapCard{min-height:82px}.lobbyGrid{grid-template-columns:1fr 1fr}.lobbyCard{min-height:120px}.lobbyCard strong{font-size:18px}.lobbyHead{margin-bottom:15px}.profileBadge{min-width:130px}.registerCorner{left:14px;bottom:14px}}
@media(orientation:portrait) and (max-width:900px){#lobby{width:100vh;height:100vw;left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%) rotate(90deg);transform-origin:center center}.lobby{width:100%;height:100%;max-height:none;overflow:auto}.registerCorner{left:18px;bottom:18px}.mapGrid{grid-template-columns:repeat(3,minmax(0,1fr))}.lobbyGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* KARMADON 0.7 — compact lobby, no blocking rotate overlay, higher visual quality */
.lobby{position:relative;padding:22px 22px 82px;min-height:0}
.lobbyHead{min-width:0}
.lobbyHead>div:first-child{min-width:0}
.lobbyBrand{white-space:nowrap}
.profileBadge{max-width:280px;min-width:0;flex:0 1 280px}
.profileBadge>div:last-child{min-width:0}
.profileBadge span,.profileBadge small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mapGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.mapCard{min-width:0;min-height:94px;overflow:hidden}
.mapCard b,.mapCard span{overflow-wrap:anywhere}
.lobbyGrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.lobbyCard{min-width:0;min-height:116px;padding:18px;overflow:hidden}
.lobbyCard strong,.lobbyCard span{overflow-wrap:anywhere}
.registerCorner{position:absolute;left:22px;bottom:18px;z-index:5}
#game{overscroll-behavior:none}
@media(max-width:980px){
  .lobbyGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lobbyCard{min-height:108px}
  .lobbyHead{gap:12px}
  .profileBadge{max-width:240px}
}
@media(max-width:700px){
  .lobby{padding:16px 16px 76px}
  .lobbyHead{align-items:center}
  .lobbyBrand{font-size:clamp(28px,6vw,44px)}
  .profileBadge{max-width:205px;padding:9px 10px}
  .profileAvatar{width:34px;height:34px;min-width:34px}
  .mapGrid{grid-template-columns:1fr;gap:8px}
  .mapCard{min-height:70px;padding:11px}
  .mapCard span{margin-top:4px}
  .lobbyGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .lobbyCard{min-height:92px;padding:13px}
  .lobbyCard strong{font-size:16px}
  .lobbyCard span{font-size:11px}
  .registerCorner{left:16px;bottom:12px;padding:10px 13px;font-size:12px}
}
@media(orientation:portrait) and (max-width:900px){
  #lobby,#auth,#boot,#game{width:100vh;height:100vw;left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%) rotate(90deg);transform-origin:center center}
  #lobby{display:flex}
  .lobby{width:100%;height:100%;max-height:none;overflow:auto}
  #game{inset:auto}
}
/* Subtle cinematic HUD treatment */
#game:after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 55%,rgba(0,0,0,.24) 100%);z-index:2}
#hud{z-index:3}
/* KARMADON 0.7 — stable full-viewport game on iPhone + cinematic presentation */
#game{position:fixed;inset:0;width:100vw;height:100vh;transform:none!important;left:0;top:0;right:0;bottom:0;overflow:hidden;background:#0b0e0d}
#scene{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}
#hud{position:absolute;inset:0;pointer-events:none}
#hud .touchActions,#hud #joystick,#hud #crosshair,#hud #ammo,#hud #missionBox,#hud .topbar{pointer-events:auto}
#crosshair{width:24px;height:24px;border-color:#ffffffb8;box-shadow:0 0 10px #0008}
.touchActions{grid-template-columns:repeat(2,minmax(76px,104px));gap:8px}
.touchActions button{backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#joystick{backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
@media(orientation:portrait) and (max-width:900px){
  #game{width:100vw;height:100vh;transform:none!important}
  #missionBox{top:calc(58px + env(safe-area-inset-top));max-width:calc(100vw - 28px)}
  .topbar{top:calc(10px + env(safe-area-inset-top));left:12px;right:12px}
  #ammo{right:12px;bottom:calc(116px + env(safe-area-inset-bottom))}
  #joystick{left:14px;bottom:calc(14px + env(safe-area-inset-bottom))}
  .touchActions{right:12px;bottom:calc(14px + env(safe-area-inset-bottom))}
}

/* KARMADON 0.8 — true landscape game viewport, death restart and sharper rendering */
.deathPanel{max-width:460px}.deathPanel h2{font-size:clamp(28px,4vw,44px);margin:10px 0}.deathPanel p{color:#aeb9ae;line-height:1.5;font-size:13px}.deathEyebrow{font-size:10px;letter-spacing:.18em;color:#d7e2d7;margin-top:8px}
@media(orientation:portrait) and (max-width:900px){
  #game{width:100vh!important;height:100vw!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%) rotate(90deg)!important;transform-origin:center center!important}
  #scene{width:100%!important;height:100%!important}
  #game .overlay{width:100%;height:100%}
}
@media(orientation:landscape){#game{width:100vw!important;height:100vh!important;transform:none!important;left:0!important;top:0!important}}
