/* One phone navigation for mobile browsers and standalone windows. */
.mobile-primary-nav,.mobile-more:not([open]){display:none}
body.phone-layout .sidebar,body.phone-layout.sidebar-collapsed .sidebar{display:none!important}
body.phone-layout .mobile-primary-nav:not([hidden]){position:fixed;z-index:35;inset:auto 0 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding:4px max(6px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));border-top:1px solid var(--border);background:var(--surface-elevated,#09151b)}
.mobile-primary-nav button{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:50px;padding:4px 0;border:0;border-radius:6px;background:transparent;color:var(--text-muted);font:inherit;font-size:11px;font-weight:650;line-height:1.2;white-space:nowrap;cursor:pointer}
.mobile-primary-nav button span{white-space:nowrap}
.mobile-primary-nav .pgl-icon{width:20px;height:20px;flex-shrink:0}
.mobile-primary-nav button.active{color:var(--accent-primary)}
.mobile-primary-nav button.active:before{content:"";position:absolute;z-index:-1;top:3px;left:50%;transform:translateX(-50%);width:34px;height:25px;border:1px solid rgba(0,229,195,.12);border-radius:8px;background:rgba(0,229,195,.05)}
.mobile-more button.active{color:var(--accent-primary);border-color:var(--border-illuminated);background:rgba(0,229,195,.09)}
.mobile-primary-nav button:focus-visible,.mobile-more button:focus-visible{outline:2px solid var(--accent-primary);outline-offset:-2px}
body.phone-layout .content,body.phone-layout.sidebar-collapsed .content{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
body.phone-layout .toast{bottom:calc(82px + env(safe-area-inset-bottom))}
.mobile-more{--mobile-more-header:58px;--mobile-more-nav:58px;--mobile-more-gap:12px;position:fixed;inset:calc(env(safe-area-inset-top) + var(--mobile-more-header) + var(--mobile-more-gap)) 12px calc(env(safe-area-inset-bottom) + var(--mobile-more-nav) + var(--mobile-more-gap));box-sizing:border-box;width:min(calc(100% - 24px),536px);max-width:none;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - var(--mobile-more-header) - var(--mobile-more-nav) - 2 * var(--mobile-more-gap));margin:auto;padding:14px 16px 16px;overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--border-strong);border-radius:18px;background:var(--surface-elevated,#09151b);color:var(--text-primary)}
.mobile-more::backdrop{background:rgba(2,6,9,.72)}
.mobile-more header{position:sticky;z-index:1;top:-14px;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:-14px -16px 6px;padding:14px 16px 6px;background:var(--surface-elevated,#09151b)}
.mobile-more h2{margin:0;font-size:19px}
.mobile-more header button{min-height:44px;min-width:64px}
.mobile-more section{margin-top:12px}
.mobile-more h3{margin:0 0 5px;color:var(--text-muted);font-size:11px;text-transform:uppercase;letter-spacing:.1em}
.mobile-more-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.mobile-more-links>button:only-child{grid-column:1/-1}
.mobile-more-utilities{margin-top:14px;padding-top:14px;border-top:1px solid var(--border)}
.mobile-more-links button{min-width:0;min-height:46px;padding:9px 10px;border:1px solid var(--border);border-radius:7px;background:var(--surface-soft);color:var(--text-primary);font:inherit;font-size:13px;text-align:left;cursor:pointer;overflow-wrap:anywhere}
@media(max-height:620px){.mobile-more{--mobile-more-gap:8px}.mobile-more section{margin-top:9px}}
body:is(.auth-unknown,.not-authenticated,.account-suspended,.first-run-open) .mobile-primary-nav{display:none!important}
/* Career only: preserve Matrix dimensions and all metric calculations. */
body.phone-layout #lifetime>.title-row{align-items:stretch;flex-direction:column;gap:10px;margin-bottom:12px}
body.phone-layout #lifetime>.title-row h1{font-size:24px;margin-bottom:3px}
body.phone-layout #lifetime>.title-row p{font-size:13px;line-height:1.4}
body.phone-layout #lifetime>.title-row .filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.78fr) minmax(0,1.2fr);gap:6px;width:100%;padding:6px}
body.phone-layout #lifetime>.title-row .filters label{min-width:0;font-size:11px;gap:3px}
body.phone-layout #lifetime>.title-row .filters :is(input,select){width:100%;min-width:0;min-height:44px;height:44px;padding:7px 5px;font-size:13px}
body.phone-layout #lifetime .career-metrics{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(76px,auto);gap:8px;margin-bottom:12px}
body.phone-layout #lifetime .career-metrics .metric{min-width:0;min-height:76px;padding:11px 12px}
body.phone-layout #lifetime .career-metrics .metric .label{font-size:11px;line-height:1.3}
body.phone-layout #lifetime .career-metrics .metric .value{font-size:23px;margin-top:5px;overflow-wrap:anywhere}
body.phone-layout #lifetime .career-metrics .career-hero-metric{grid-column:1/-1;grid-row:auto;min-height:108px;padding:14px}
body.phone-layout #lifetime .career-hero-metric .value{font-size:36px!important}
body.phone-layout #lifetime .career-snapshot{margin:0 0 12px;gap:6px}
/* POLISH-002: Calendar and session setup only; the Matrix keeps its existing dimensions. */
body.phone-layout #calendar>.panel{padding:10px}
body.phone-layout #calendar .calendar-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin-bottom:5px}
body.phone-layout #calendar .grind-calendar{grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;min-height:0}
body.phone-layout #calendar .calendar-cell{min-width:0;min-height:56px;padding:5px 2px;gap:3px}
body.phone-layout #calendar .calendar-cell.blank{display:flex;visibility:hidden}
body.phone-layout #calendar .calendar-cell b{font-size:11px;line-height:1.2}
body.phone-layout #calendar .calendar-cell strong{max-width:100%;font-size:11px;line-height:1.2}
body.phone-layout #calendar .calendar-cell .calendar-result-full{display:none}
body.phone-layout #calendar .calendar-cell .calendar-result-compact{display:block;font-size:11px;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
body.phone-layout #calendar .calendar-cell.good .calendar-result-compact{color:var(--pnl-positive)}
body.phone-layout #calendar .calendar-cell.bad .calendar-result-compact{color:var(--pnl-negative)}
body.phone-layout #calendar .calendar-cell small,body.phone-layout #calendar .calendar-cell:after{display:none}
body.phone-layout #session .live-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;align-items:start;padding:12px;margin-bottom:0}
body.phone-layout #session .live-meta>label{min-width:0;gap:4px}
body.phone-layout #session .live-meta>label:not(.live-result-field){padding:0;border-right:0}
body.phone-layout #session .live-meta>label:first-child,body.phone-layout #session .live-meta>label:nth-child(4),body.phone-layout #session .live-result-field{grid-column:1/-1}
body.phone-layout #session .live-meta input{width:100%;min-width:0;min-height:44px;margin-top:0;padding:9px 10px}
body.phone-layout #session .live-result-field{padding:10px;gap:6px}
body.phone-layout #session .live-result-field .money-field{display:grid;grid-template-columns:minmax(0,1fr) minmax(80px,.4fr);gap:8px}
body.phone-layout #session .live-result-field select{width:100%;min-width:0;min-height:44px}
body.phone-layout #session .live-result-field small{line-height:1.4}
body.phone-layout #session .session-form{gap:12px}
body.phone-layout #session #onlineSessionSummary{padding:12px;margin-bottom:0}
body.phone-layout #session #onlineSessionSummary .live-stat{padding:8px 10px}
