.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; left: 12px; top: -70px; padding: 10px 14px; border-radius: 10px; color: #042b42; background: #ffe178; font-weight: 900; text-decoration: none; transition: top .16s; }
.skip-link:focus { top: max(10px, env(safe-area-inset-top)); }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 3px solid #ffe178; outline-offset: 3px; }
.topbar nav button[aria-pressed="true"] { border-color: #5ff4df; background: #17647a; }
#more-btn { display: none; font-weight: 900; letter-spacing: 1px; }
.mission-tools { display: flex; justify-content: center; gap: 6px; margin-top: 7px; }
.mission-tools button { min-height: 32px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(35,101,125,.6); font-size: 11px; cursor: pointer; }
.action-controls { display: flex; align-items: end; gap: 12px; pointer-events: none; }
.action-controls > * { pointer-events: auto; }
.boost { width: 74px; height: 74px; border: 2px solid #85f7e4; border-radius: 50%; background: radial-gradient(circle at 35% 28%,#c8fff2,#21cbb4 62%,#087382); color: #053845; box-shadow: 0 8px 26px #001927; cursor: pointer; touch-action: none; }
.boost span,.boost b { display: block; }
.boost span { font-size: 24px; }
.boost b { font-size: 10px; }
.boost.active { transform: scale(.94); filter: brightness(1.15); }
.energy { width: 90px; padding: 7px 8px; border-radius: 11px; }
.energy span { display: block; margin-bottom: 3px; color: #9be9df; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.energy i { display: block; height: 6px; overflow: hidden; border-radius: 8px; background: #14384f; }
.energy b { display: block; width: 100%; height: 100%; background: linear-gradient(90deg,#42ebcf,#ffe16c); transition: width .12s linear; }
.modal-layer[hidden],.discovery[hidden] { display: none !important; }
.modal-layer, .discovery { padding: max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); }
.audio-options { display: grid; gap: 10px; margin: 18px 0; }
.audio-option { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: #0d3d5d; }
.audio-option button { min-width: 76px; }
.pause-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.collection-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.collection-summary span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: #0d3d5d; font-weight: 800; }
.creature-portrait { display: grid; min-height: 170px; place-items: center; }
.creature-portrait img { width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(0,8,20,.5)); }
.creature-thumb { display: grid !important; min-height: 112px; place-items: center; }
.creature-thumb img { width: 112px; height: 112px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,8,20,.4)); }
.daily-card { width: 100%; margin-top: 10px; border-color: #ffe178; background: linear-gradient(135deg,#164f6b,#38556f); }
.tile.wrong { border-color: #ff8b84; animation: lab-shake .18s linear 2; }
@keyframes lab-shake { 50% { transform: translateX(5px); } }
.game-wrap::after { content: ''; position: absolute; z-index: 55; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%,#54f4df 0,#0a5d7c 32%,#020b20 72%); }
.zone-transition .game-wrap::after { animation: zone-dive 1s ease-in-out; }
@keyframes zone-dive { 0%,100% { opacity: 0; transform: scale(1.08); } 42%,58% { opacity: 1; transform: scale(1); } }
@media(max-width:760px){
  #more-btn { display: inline-grid; place-items: center; }
  #home-btn,#shop-btn,#pause-btn,#full-btn { display: none; }
  .mission-tools button { min-height: 36px; }
  .action-controls { gap: 7px; }
  .energy { display: none; }
  .boost { width: 62px; height: 62px; }
}
@media(max-width:480px){
  .mission-tools { display: none; }
  .action-controls { gap: 6px; }
  .boost { width: 58px; height: 58px; }
  .camera { width: 66px; height: 66px; min-width: 66px; min-height: 66px; }
  .modal { max-height: calc(100dvh - 16px); }
}
@media(orientation:landscape) and (max-height:560px){
  .topbar { height: calc(54px + env(safe-area-inset-top)); padding-top: calc(5px + env(safe-area-inset-top)); padding-bottom: 5px; }
  .game-wrap,.welcome { inset: calc(54px + env(safe-area-inset-top)) 0 env(safe-area-inset-bottom); }
  .mission-hud { top: 10px; bottom: auto; max-width: 360px; padding: 7px 11px; }
  .mission-tools { display: none; }
  .zone-chip span { display: none; }
  .dpad { grid-template-columns:repeat(3,36px);grid-template-rows:repeat(3,36px); }
  .dpad button { min-width:36px;min-height:36px; }
  .boost,.camera { width:56px;height:56px;min-width:56px;min-height:56px; }
}
@media(prefers-reduced-motion:reduce){.flash{display:none}.depth-light{background:rgba(0,16,40,.08)}.tile.wrong,.zone-transition .game-wrap::after{animation:none}}
