/* B0X3 v140 - MY BOXER, one place: the game's screen (js/MyBoxer.js, #myboxer), the /profile page's tabs, and the
   CARD and SAVE tabs both draw (js/BoxerPanels.js). Uses the page tokens of css/social.css. */

/* ======================== the game's screen ======================== */
.mb {
    position: fixed; inset: 0; z-index: 170; display: flex; flex-direction: column;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: radial-gradient(120% 90% at 30% 20%, #1f2639 0%, #0e1119 60%, #08090e 100%);
    color: #f2f2f6; font-family: "Oswald", system-ui, sans-serif; opacity: 0; transition: opacity .16s ease;
}
.mb[hidden] { display: none; }
.mb.v { opacity: 1; }
.mb:focus { outline: none; }
.mb *, .mb *::before, .mb *::after { box-sizing: border-box; }
.mb canvas { position: static; z-index: auto; }     /* the page's global canvas rule is for the game's own canvas */
.mb-head { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.mb-back { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 12px; cursor: pointer;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); color: #fff; font: 16px/1 "Oswald", sans-serif; letter-spacing: 1.5px; }
.mb-back:hover { background: rgba(255, 255, 255, .14); }
.mb-title { margin: 0 4px; font: 600 28px/1 "Teko", sans-serif; letter-spacing: 4px; white-space: nowrap; }
.mb-tabs { flex: none; display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .35); }
.mb-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 76px; padding: 0 12px; border: 0; border-radius: 10px; cursor: pointer;
    background: transparent; color: rgba(255, 255, 255, .72); font: 600 21px/1 "Teko", sans-serif; letter-spacing: 2px; -webkit-tap-highlight-color: transparent; }
.mb-tab:hover { color: #fff; }
.mb-tab[aria-selected="true"] { background: #f0c040; color: #17140a; }
.mb-tab .mb-ti { font-size: 17px; line-height: 1; }
.mb-back:focus-visible, .mb-tab:focus-visible { outline: 3px solid #f0c040; outline-offset: 2px; }
.mb-tools { flex: 0 1 auto; min-width: 0; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mb-tools:empty { display: none; }
.mb-body { flex: 1 1 auto; min-height: 0; position: relative; }
.mb-host { position: absolute; inset: 0; }
.mb-host[hidden] { display: none; }
.mb-page { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.mb-page.pg { min-height: 0; background: none; }
.mb-page[hidden] { display: none !important; }
.mb-page-in { width: min(880px, 100%); margin: 0 auto; padding: 12px 14px 40px; display: flex; flex-direction: column; gap: 14px; }
.mb-pane { display: flex; flex-direction: column; gap: 14px; }
.mb-pane[hidden] { display: none !important; }

/* LOOK: the maker in place (js/maker/maker.js): its UNDO / RANDOM / SAVE sit in the screen's head */
.mk.mk-in { position: absolute; inset: 0; z-index: auto; padding: 0; background: none; }
.mk.mk-in .mk-head { display: none; }
.mb-tools .mk-head { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; }
.mb-tools .mk-head #mk-back, .mb-tools .mk-head .mk-title { display: none; }
.mb-tools .mk-btn { min-height: 44px; padding: 0 13px; font-size: 15px; letter-spacing: 1px; }
/* GEAR: the locker in place (js/Locker.js): GLOVES / RINGS sit in the screen's head */
.lk.lk-in { position: absolute; inset: 0; z-index: auto; padding: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.lk.lk-in .lk-panel { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; background: none; transform: none; }
.lk.lk-in .lk-head { display: none; }
.mb-tools .lk-tabs { order: 0; width: auto; }
.mb-tools .lk-look { display: none; }
.mb-tools .lk-tab { min-height: 44px; min-width: 88px; }

/* a phone held upright: the head on two rows, the four tabs across the whole width */
@media (orientation: portrait) {
    .mb-tabs { order: 3; width: 100%; }
    .mb-tab { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; min-height: 52px; padding: 0 4px; font-size: 19px; letter-spacing: 1px; }
    .mb.has-tools .mb-title { display: none; }
    .mb-title { font-size: 25px; letter-spacing: 3px; margin-right: auto; }
    .mb-tools .mk-btn { padding: 0 11px; }
    .mb-tools .lk-tab { min-width: 84px; }
}
@media (orientation: portrait) and (max-width: 400px) {
    .mb-back { padding: 0 12px; }
    .mb-back .mb-bt { display: none; }
    .mb-tools .mk-btn { padding: 0 10px; font-size: 14px; }
}
/* a phone held sideways: one row, nothing wasted */
@media (orientation: landscape) and (max-height: 500px) {
    .mb-head { padding: 4px 8px; flex-wrap: nowrap; }
    .mb-title { display: none; }
    .mb-tab { min-width: 64px; padding: 0 10px; font-size: 20px; }
    .mb-page-in { padding: 10px 12px 28px; }
}
@media (orientation: landscape) and (max-width: 760px) {
    .mb-back .mb-bt { display: none; }
    .mb-back { padding: 0 12px; }
    .mb-tab .mb-ti { display: none; }
    .mb-tab { min-width: 56px; padding: 0 8px; }
    .mb-tools .mk-btn { padding: 0 10px; font-size: 14px; }
    .mb-tools .lk-tab { min-width: 76px; padding: 0 10px; }
}
@media (orientation: landscape) and (max-width: 1000px) { .mb.has-tools .mb-title { display: none; } }
@media (prefers-reduced-motion: reduce) { .mb { transition: none; } }

/* ======================== the /profile page: its tabs ======================== */
.mb-plead { margin-top: -6px; }
.mb-ptabs { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .08); }
.mb-ptabs-in { display: flex; gap: 6px; }
.mb-ptab { flex: 1 1 0; min-width: 0; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 6px; border: 0; border-radius: 12px; cursor: pointer;
    background: transparent; color: rgba(255, 255, 255, .74) !important; font: 600 23px/1 "Teko", sans-serif; letter-spacing: .12em; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.mb-ptab span { font-size: 18px; line-height: 1; }
.mb-ptab:hover { color: #fff !important; background: rgba(255, 255, 255, .06); }
.mb-ptab[aria-selected="true"] { background: var(--gold, #f0c040); color: #141414 !important; }
.mb-ptab:focus-visible { outline: 2px solid var(--gold, #f0c040); outline-offset: 2px; }
@media (max-width: 420px) { .mb-ptab { flex-direction: column; gap: 2px; font-size: 20px; } }

/* ======================== the CARD and SAVE tabs ======================== */
.mb-id .mb-id-t { min-width: 0; }
.mb-id-acts { margin-top: 12px; }
.mb-id-acts .pg-btn { flex: 0 1 auto; }
.mb-rename h2, .mb-rename label { margin: 0; }
.mb-name-row { display: flex; gap: 8px; }
.mb-name-row .pg-input { flex: 1 1 auto; min-width: 0; letter-spacing: .08em; }
.mb .pg-input, .mb-name-row .pg-input { font-size: 22px; }
.mb-pane .sh-link > .pg-btn { flex: none; white-space: nowrap; }   /* (LOG IN, COPY: one line, the field takes the rest) */
.mb-dice { flex: none; width: 52px; padding: 0; font-size: 24px; }
#pf-name-hint.bad { color: #ffb4a8; }
.mb-back-body { display: flex; flex-direction: column; gap: 10px; }
.mb-back-body[hidden] { display: none; }
.mb-warn { color: #ffd98a; }
.mb-h3 { margin: 6px 0 0; font: 600 21px/1 "Teko", sans-serif; letter-spacing: .14em; color: rgba(255, 255, 255, .82); }
.mb-code { display: flex; flex-direction: column; gap: 10px; }
.mb-confirm { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(240, 192, 64, .1); border: 1px solid rgba(240, 192, 64, .5); }
.mb-confirm p { margin: 0; font-size: 15px; line-height: 1.4; color: #fff; }
.mb-kept { text-align: center; }
.mb-level .pf-progress { margin: 0; }
@media (max-width: 700px) { .mb-id-acts { justify-content: center; } }
