/* B0X3 v127 - navigation: the pause button of a fight and its sheet (js/Nav.js) */
#nav-pause {
    position: fixed; z-index: 60; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 46px); transform: translateX(-50%);
    width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
    display: grid; place-items: center; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
#nav-pause[hidden] { display: none; }
#nav-pause span {
    width: 34px; height: 34px; border-radius: 50%; display: block; position: relative;
    background: rgba(8, 9, 14, .5); border: 1px solid rgba(255, 255, 255, .28); box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
    transition: background .15s, transform .1s;
}
#nav-pause span::before, #nav-pause span::after {
    content: ""; position: absolute; top: 10px; width: 4px; height: 12px; border-radius: 1.5px; background: rgba(255, 255, 255, .9);
}
#nav-pause span::before { left: 10px; }
#nav-pause span::after { right: 10px; }
#nav-pause:hover span { background: rgba(8, 9, 14, .8); }
#nav-pause:active span { transform: scale(.92); }
#nav-pause:focus-visible span { outline: 2px solid #f0c040; outline-offset: 2px; }
@media (max-height: 500px) and (orientation: landscape) {
    #nav-pause { top: calc(env(safe-area-inset-top, 0px) + 32px); }
}

#nav-sheet {
    position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(4, 5, 9, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    font-family: "Oswald", sans-serif;
}
#nav-sheet.v { display: flex; animation: navIn .18s ease-out both; }
@keyframes navIn { from { opacity: 0; } to { opacity: 1; } }
.nav-box {
    width: min(360px, 100%); max-height: 100%; overflow: auto; display: grid; gap: 10px; padding: 20px;
    border-radius: 18px; color: #fff; text-align: center;
    background: linear-gradient(160deg, #1e2230, #0a0b10); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}
.nav-box h2 { margin: 0; font-family: "Teko", sans-serif; font-weight: 600; font-size: 40px; line-height: 1; letter-spacing: .14em; color: #f0c040; }
.nav-box p { margin: 0 0 4px; font-size: 14.5px; line-height: 1.35; color: rgba(255, 255, 255, .74); }
.nav-box p[hidden] { display: none; }
.nav-b {
    min-height: 52px; padding: 8px 14px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .08); color: #fff; font-family: "Teko", sans-serif; font-weight: 600; font-size: 24px;
    letter-spacing: .14em; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .1s, filter .15s;
}
.nav-b[hidden] { display: none; }
.nav-b:hover { filter: brightness(1.15); }
.nav-b:active { transform: scale(.97); }
.nav-b:focus-visible { outline: 2px solid #f0c040; outline-offset: 2px; }
.nav-main { background: linear-gradient(135deg, #d92027, #b3151b); border-color: transparent; }
.nav-quit { color: #ffb4b4; border-color: rgba(255, 120, 120, .35); background: rgba(255, 80, 80, .08); }
@media (max-height: 420px) {
    .nav-box { padding: 12px 16px; gap: 7px; }
    .nav-box h2 { font-size: 30px; }
    .nav-b { min-height: 44px; font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { #nav-sheet.v { animation: none; } }

/* victory screen: the way back to the menu is always there */
.vic-actions .vic-btn-menu { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .25); color: #fff; box-shadow: none; }

/* v128 (lead): result screen on a phone held sideways. The result on the left, the result card (XP, badges, fight
   stats) on the right in its own scroll area, the four exits pinned under both: nothing hides under the buttons. */
@media (max-height: 500px) and (orientation: landscape) {
    #victory .vic-content {
        grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); align-items: start; gap: 12px;
        padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) calc(84px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        height: 100dvh; max-height: 100dvh; box-sizing: border-box; overflow: hidden;
    }
    #victory .vic-main { gap: 2px; justify-content: center; height: 100%; }
    #victory .vic-result { font-size: clamp(34px, 13vh, 60px); letter-spacing: .06em; }
    #victory .vic-winner { font-size: clamp(20px, 7vh, 30px); }
    #victory .vic-side { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px 10px; align-self: stretch; }
}
