/* PokéLocke v16.03 — unified phone navigation and mobile page system. */
.pl1600-mobile-masthead,.pl1600-mobile-nav{display:none}

@media (max-width:760px){
  :root{--pl1600-safe-bottom:max(8px,env(safe-area-inset-bottom));--pl1600-nav-height:72px}
  html{overflow-x:hidden;scroll-padding-top:72px}
  body{min-width:0;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body:not(.v11-room-page){padding-bottom:calc(var(--pl1600-nav-height) + var(--pl1600-safe-bottom))!important}
  body:not(.v11-room-page)>.pl1596-topbar,
  body:not(.v11-room-page)>.v11-nav,
  body.v1535-login-page>.v1535-topbar{display:none!important}

  .pl1600-mobile-masthead{
    position:sticky;z-index:120;top:0;display:flex;align-items:center;justify-content:space-between;
    min-height:62px;padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));
    border-bottom:1px solid rgba(116,194,237,.38);background:rgba(8,53,91,.94);
    box-shadow:0 7px 22px rgba(2,29,52,.18);backdrop-filter:blur(16px) saturate(135%);-webkit-backdrop-filter:blur(16px) saturate(135%)
  }
  .pl1600-mobile-brand{display:flex;align-items:center;gap:9px;min-width:0;color:#fff!important;text-decoration:none}
  .pl1600-mobile-brand>img{width:38px;height:38px;filter:drop-shadow(0 4px 8px rgba(0,0,0,.2))}
  .pl1600-mobile-brand span,.pl1600-mobile-brand b,.pl1600-mobile-brand small{display:block;min-width:0}
  .pl1600-mobile-brand b{font-size:15px;line-height:1;letter-spacing:-.02em}.pl1600-mobile-brand small{overflow:hidden;margin-top:4px;color:#9fd5f6;font-size:8px!important;font-weight:850;letter-spacing:.08em;text-transform:uppercase;text-overflow:ellipsis;white-space:nowrap}
  .pl1600-mobile-account{display:grid;place-items:center;width:42px;height:42px;border:1px solid rgba(182,226,251,.42);border-radius:14px;background:rgba(255,255,255,.1);box-shadow:inset 0 1px rgba(255,255,255,.16)}
  .pl1600-mobile-account img{width:21px;height:21px;filter:brightness(0) invert(1)}

  .pl1600-mobile-nav{
    position:fixed;z-index:150;left:max(7px,env(safe-area-inset-left));right:max(7px,env(safe-area-inset-right));bottom:var(--pl1600-safe-bottom);
    display:flex;align-items:stretch;justify-content:space-between;min-height:64px;padding:5px;
    border:1px solid rgba(150,213,248,.62);border-radius:20px;background:rgba(7,49,84,.96);
    box-shadow:0 14px 38px rgba(0,20,38,.34),inset 0 1px rgba(255,255,255,.14);backdrop-filter:blur(18px) saturate(140%);-webkit-backdrop-filter:blur(18px) saturate(140%)
  }
  .pl1600-mobile-nav a{position:relative;display:flex;flex:1 1 20%;min-width:0;min-height:52px;align-items:center;justify-content:center;flex-direction:column;gap:3px;border-radius:15px;color:#b9d9ed!important;text-decoration:none;-webkit-tap-highlight-color:transparent}
  .pl1600-mobile-nav a img{width:19px;height:19px;opacity:.82;filter:brightness(0) invert(1)}
  .pl1600-mobile-nav a span{display:block;max-width:100%;overflow:hidden;font-size:7px;font-weight:900;letter-spacing:.01em;text-overflow:ellipsis;white-space:nowrap}
  .pl1600-mobile-nav a.is-active{background:linear-gradient(145deg,#ffdc43,#ffbd1b);color:#12395d!important;box-shadow:0 4px 0 #b97d00,0 7px 13px rgba(0,0,0,.18)}
  .pl1600-mobile-nav a.is-active img{opacity:1;filter:invert(19%) sepia(25%) saturate(1941%) hue-rotate(165deg) brightness(88%)}

  body :is(button,a,input,select,textarea){touch-action:manipulation}
  body :is(input,select,textarea){font-size:16px!important}
  body :is(.v11-primary-button,.v11-outline-button,.v1535-primary,.v1535-secondary){min-height:46px}
  body .shell{width:calc(100% - 20px)!important;max-width:540px!important;margin-inline:auto!important}
  body .v1535-footer,body .v11-footer{padding-bottom:16px!important}

  /* Shared cards and dialogs */
  body.v11-page .v11-data-card{padding:14px!important;border-radius:18px!important}
  body.v11-page .v11-data-card>header{align-items:flex-start;gap:10px;margin-bottom:13px!important}
  body.v11-page .v11-data-card h2{font-size:18px!important;line-height:1.15}
  body.v11-page dialog.v11-dialog{box-sizing:border-box!important;width:100%!important;max-width:560px!important;max-height:92dvh!important;margin:auto 0 0!important;padding:22px 16px calc(18px + env(safe-area-inset-bottom))!important;border-right:0!important;border-bottom:0!important;border-left:0!important;border-radius:24px 24px 0 0!important;overflow:auto!important}
  body.v11-page dialog.v11-dialog::backdrop{background:rgba(2,20,36,.78)!important;backdrop-filter:blur(5px)}
  body.v11-page dialog.v11-dialog .v11-dialog-close{position:sticky!important;z-index:4;top:0!important;float:right!important;width:42px!important;height:42px!important}

  /* Home / play */
  .v11-home-grid{display:grid!important;grid-template-columns:1fr!important;gap:16px!important;padding:18px 0 20px!important}
  .v11-home-grid .v11-intro{min-width:0;padding:0!important}
  .v11-home-grid .v1468-alpha-notice{width:100%!important;margin:0 0 15px!important;padding:10px!important}
  .v11-home-grid .v11-intro h1{margin:13px 0 12px!important;font-size:clamp(38px,12vw,52px)!important;line-height:.95!important}
  .v11-home-grid .v11-lead{font-size:14px!important;line-height:1.52!important}
  .v11-home-grid .v11-proof{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important;margin-top:17px!important}
  .v11-home-grid .v11-proof span{justify-content:center;min-width:0;padding:8px 4px;border:1px solid rgba(90,158,205,.28);border-radius:11px;background:rgba(255,255,255,.6);font-size:8px!important;text-align:center}
  .v11-home-grid .v11-proof b{flex:0 0 22px}
  .v11-home-grid .v11-pokemon-line{height:124px!important;margin:18px 0 13px!important}
  .v11-home-grid .v11-pokemon-line img{width:74px!important;height:74px!important}.v11-home-grid .v11-pokemon-line .is-featured img{width:98px!important;height:98px!important}
  .v11-home-grid .v11-side-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .v11-home-grid .v11-join-card{grid-template-columns:minmax(0,1fr) 84px 46px!important;gap:7px!important;padding:13px!important}
  .v11-home-grid .v11-stat-card{padding:14px!important}
  .v11-home-grid .v11-start-card{width:100%!important;margin:0!important;border-radius:20px!important}
  .v11-home-grid .v11-start-card>header{padding:17px 14px!important}.v11-home-grid .v11-form-section{padding:14px!important}
  .v11-home-grid .v11-run-type-switch{grid-template-columns:1fr!important;padding:10px 12px 0!important}
  .v11-home-grid .v11-fixed-rules{grid-template-columns:1fr!important;gap:7px!important}
  .v11-home-grid .v11-mode-switch{grid-template-columns:1fr 1fr!important;padding:12px 14px 0!important}
  .v11-home-grid .v11-start-card>footer{padding:12px 14px!important}
  body.v1561-home-page .v1561-latias{right:-5px!important}

  /* Login / account */
  body.v1535-login-page{min-height:100svh!important;background-attachment:fixed!important}
  .v1535-login-page .v1535-main{box-sizing:border-box!important;width:100%!important;max-width:none!important;min-height:0!important;padding:18px 10px 24px!important;overflow:hidden!important}
  .v1535-login-page .v1535-auth-layout{box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:520px!important;min-width:0!important;gap:30px!important;margin:0 auto!important;padding:0!important}
  .v1535-login-page .v1535-hero-copy,.v1535-login-page .v1535-auth-card{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important}
  .v1535-login-page .v1574-hero-lockup{width:100%!important;max-width:330px!important;margin-inline:auto!important}.v1535-login-page .v1574-hero-lockup img{display:block;width:100%!important;height:auto!important}
  .v1535-login-page .v1535-hero-copy>p{width:100%!important;margin:13px auto!important;padding:0 5px!important;font-size:13px!important;line-height:1.5!important}.v1535-login-page .v1535-hero-copy>p br{display:none}
  .v1535-login-page .v1535-benefits{grid-template-columns:1fr 1fr!important;width:100%!important;gap:8px!important}.v1535-login-page .v1535-benefits article{min-width:0!important;padding:11px 7px!important}
  .v1535-login-page .v1535-auth-card{padding:48px 14px 16px!important;border-radius:24px!important}
  .v1535-login-page .v1535-auth-card header h2{font-size:29px!important}.v1535-login-page .v1535-field{width:100%!important;min-width:0!important}
  .v1535-login-page .v1535-field input{width:100%!important;min-width:0!important}.v1535-login-page .v1535-options{gap:8px!important}
  .v1535-login-page .v1535-security{align-items:flex-start!important}.v1535-login-page .v1535-footer{padding:16px 12px!important}

  /* Leaderboard */
  .v11-board-shell{padding:18px 0 22px!important}
  .v11-board-head{min-height:0!important;padding:8px 2px 4px!important}.v11-board-head h1{margin:8px 0!important;font-size:36px!important}.v11-board-head p{font-size:12px!important;line-height:1.45!important}.v11-board-head img{display:none!important}
  .v1468-board-scope{display:grid!important;grid-template-columns:1fr 1fr;width:100%!important;margin:14px 0 8px!important}.v1468-board-scope button{min-width:0!important;min-height:44px!important;padding:0 8px!important}
  .v11-board-tabs{margin:8px -2px 10px!important;padding:2px 2px 7px!important;scroll-snap-type:x proximity}.v11-board-tabs button{min-height:42px!important;scroll-snap-align:start}
  .v11-board-card{border-radius:16px!important}.v11-board-card>header,.v11-board-rows article{grid-template-columns:38px minmax(0,1fr) 76px!important;column-gap:6px!important;padding-left:8px!important;padding-right:8px!important}
  .v11-board-card>header{font-size:7px!important}.v11-board-rows article{min-height:68px!important}.v11-board-name{min-width:0!important;gap:7px!important}.v11-board-name .v14701-board-avatar{flex:0 0 34px!important;width:34px!important;height:34px!important}.v14701-board-avatar img{width:31px!important;height:31px!important}
  .v11-board-name>span{min-width:0!important}.v11-board-name b{display:block;overflow:hidden;font-size:10px!important;text-overflow:ellipsis;white-space:nowrap}.v11-board-name em{display:-webkit-box!important;overflow:hidden!important;font-size:7.5px!important;line-height:1.25!important;-webkit-box-orient:vertical;-webkit-line-clamp:2}.v11-board-rows article>strong{font-size:11px!important;white-space:nowrap}

  /* Community */
  .v1463-community-shell{padding:16px 0 22px!important}.v1463-community-hero{gap:13px!important;margin-bottom:10px!important;padding:18px 15px!important;border-radius:20px!important}.v1463-community-hero h1{font-size:33px!important;line-height:1!important}.v1463-community-hero p{font-size:11px!important;line-height:1.45!important}.v1463-prestige-card{padding:11px!important}
  .v1468-community-tabs{display:flex!important;width:100%!important;gap:5px!important;margin:10px 0!important;padding:5px!important;overflow-x:auto!important;scroll-snap-type:x mandatory}.v1468-community-tabs button{flex:1 0 82px!important;min-width:82px!important;min-height:44px!important;padding:0 7px!important;scroll-snap-align:start}
  .v1463-community-grid,.v1463-community-main,.v1463-community-side{grid-template-columns:1fr!important;gap:9px!important}.v1463-friend-search{grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important}.v1463-friend-search button{min-width:84px!important;padding:0 10px!important}
  .v1463-person{grid-template-columns:8px 38px minmax(0,1fr)!important;gap:7px!important;padding:9px!important}.v1463-person-actions,.v1463-person>button{grid-column:2/-1!important;width:100%!important;justify-self:stretch!important}.v1463-person-actions{display:grid!important;grid-template-columns:1fr 1fr!important}.v1463-person-actions button{width:100%!important;min-height:40px!important}
  .v1470-clan-management form,.v1470-clan-requests article{grid-template-columns:1fr!important}.v1470-clan-requests article{align-items:stretch!important}

  /* Saves */
  .v14-saves-shell{padding:18px 0 22px!important}.v14-page-head{gap:11px!important;margin-bottom:16px!important}.v14-page-head h1{margin:8px 0!important;font-size:37px!important}.v14-page-head p{font-size:12px!important;line-height:1.45!important}.v14-page-head>.v11-outline-button{width:100%!important}
  .v14-saves-summary{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}.v14-saves-summary span{min-width:0!important;padding:9px!important;text-align:center}
  .v14-save-group>summary{align-items:center!important;padding:12px!important}.v14-save-card{grid-template-columns:1fr!important;gap:11px!important;padding:13px!important}.v14-save-head h2{max-width:100%;overflow-wrap:anywhere}.v14-save-meta{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}.v14-save-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important;gap:7px!important}.v14-save-actions>*{width:100%!important;min-width:0!important;white-space:normal!important}

  /* Profile */
  .v1543-profile-page .v1543-profile-shell{padding-top:12px!important;padding-bottom:22px!important}.v1543-profile-page #profileView{min-width:0!important}.v1543-profile-page .v1543-profile-hero{min-width:0!important}.v1543-profile-page .v1543-mode-tabs{position:sticky!important;z-index:20!important;top:66px!important;padding:5px!important;border-radius:15px!important;background:rgba(232,246,255,.93)!important;box-shadow:0 6px 17px rgba(5,50,82,.1)!important;backdrop-filter:blur(10px)}
  .v1543-profile-page .v1543-showcase-grid{grid-template-columns:1fr 1fr!important}.v1543-profile-page .v1543-stat-grid{grid-template-columns:1fr 1fr!important}.v1543-profile-page .v1543-profile-grid{grid-template-columns:1fr!important}

  /* Admin */
  .v22-admin-shell{padding:18px 0 22px!important}.v22-admin-hero{gap:12px!important;margin-bottom:15px!important}.v22-admin-hero h1{font-size:36px!important}.v22-admin-hero p{font-size:12px!important}.v22-admin-hero .v11-outline-button{width:100%!important}
  .v22-admin-overview{grid-template-columns:1fr 1fr!important;gap:7px!important}.v22-admin-overview article{min-width:0!important;padding:12px!important}.v22-admin-overview strong{font-size:24px!important}
  .v158-feature-switches{grid-template-columns:1fr!important}.v158-feature-switch{min-width:0!important}.v22-admin-toolbar{gap:8px!important;margin:12px 0 8px!important}.v22-admin-tabs{width:100%!important;overflow-x:auto!important}.v22-admin-tabs button{flex:1 0 auto!important;min-height:42px!important}.v22-admin-search{width:100%!important}
  .v22-admin-panel{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}.v22-admin-table{min-width:760px!important}.v1463-admin-community-grid{grid-template-columns:1fr!important}

  /* Randomizer */
  .v11-randomizer-page .v11-randomizer-shell{padding:16px 0 24px!important}.v11-randomizer-head{gap:12px!important;margin-bottom:12px!important}.v11-randomizer-head h1{margin:8px 0!important;font-size:35px!important}.v11-randomizer-head p{font-size:11px!important;line-height:1.45!important}.v11-randomizer-steps{gap:4px!important}.v11-randomizer-steps span{font-size:8px!important}.v11-randomizer-steps i{width:8px!important}
  .v11-ranked-lock{align-items:flex-start!important;margin:8px auto!important;padding:10px!important}.v11-engine-frame{width:100%!important;height:calc(100dvh - 250px)!important;min-height:540px!important;border-right:0!important;border-left:0!important;border-radius:0!important}
  .v11-result-bar{left:8px!important;right:8px!important;bottom:calc(var(--pl1600-nav-height) + var(--pl1600-safe-bottom) + 5px)!important;width:auto!important;max-width:none!important;transform:none!important;gap:7px!important;padding:8px!important}.v11-result-bar p small{display:none!important}.v11-result-bar button{min-width:105px!important;white-space:normal!important}

  /* Spectator */
  .v1480-spectate-shell{min-height:calc(100svh - 160px)!important;padding:18px 0 22px!important}.v1480-spectate-shell>header h1{margin:7px 0!important;font-size:35px!important}.v1480-spectate-shell>header p{font-size:12px!important;line-height:1.5!important}.v1480-spectate-grid{grid-template-columns:1fr!important;gap:10px!important;margin-top:15px!important}.v1480-watch-stats{grid-template-columns:1fr 1fr!important}.v1480-watch-team{grid-template-columns:1fr!important}
}

@media (max-width:390px){
  .pl1600-mobile-nav{left:4px;right:4px;padding:4px}.pl1600-mobile-nav a span{font-size:6.4px}.pl1600-mobile-nav a img{width:18px;height:18px}
  .v11-home-grid .v11-proof{grid-template-columns:1fr!important}.v11-home-grid .v11-proof span{justify-content:flex-start;text-align:left}
  .v1535-login-page .v1535-benefits{grid-template-columns:1fr 1fr!important}.v14-save-actions{grid-template-columns:1fr!important}
  .v1543-profile-page .v1543-showcase-grid{grid-template-columns:1fr!important}
}

/* The room keeps a dedicated game-first navigation instead of the global bar. */
@media (max-width:760px){
  body.v11-room-page{min-height:100dvh!important;padding:0!important;overscroll-behavior-y:contain}
  body.v11-room-page .v11-room-nav{position:sticky!important;z-index:100!important;top:0!important;height:58px!important;min-height:58px!important;padding:6px max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left))!important;background:rgba(7,38,61,.96)!important;backdrop-filter:blur(14px)}
  body.v11-room-page .v156-brand-logo{width:108px!important;height:42px!important}body.v11-room-page .v156-brand-logo img{width:106px!important;height:40px!important}
  body.v11-room-page .v11-room-heading{display:none!important}.v11-room-nav-actions{gap:5px!important}.v11-room-share{display:none!important}.v11-room-code{height:38px!important}.v11-room-exit{width:38px!important;height:38px!important}
  body.v11-room-page .v11-room-shell{width:100%!important;padding:5px 7px calc(10px + env(safe-area-inset-bottom))!important}
  body.v11-room-page .v11-room-toolbar{position:static!important;display:grid!important;gap:6px!important;padding:6px!important;border-radius:14px!important}
  body.v11-room-page .v11-room-stats{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;width:100%!important}.v11-room-stats>span{min-width:0!important;padding:6px 3px!important}.v11-room-stats b,.v11-stat-button b{font-size:12px!important}.v11-room-stats small,.v11-stat-button small{font-size:7px!important}
  body.v11-room-page .v11-game-actions{display:flex!important;width:100%!important;gap:5px!important;padding:2px 1px 5px!important;overflow-x:auto!important;scroll-snap-type:x proximity}.v11-game-actions .v11-room-action{flex:0 0 auto!important;min-width:76px!important;min-height:42px!important;scroll-snap-align:start}
  body.v11-room-page .v1480-room-mobile-tabs{position:sticky!important;z-index:80!important;top:60px!important;grid-template-columns:repeat(3,1fr)!important;width:100%!important;margin:6px 0!important;padding:4px!important;border-radius:14px!important;background:rgba(232,246,255,.95)!important;box-shadow:0 6px 17px rgba(4,35,57,.15)!important;backdrop-filter:blur(10px)}
  body.v11-room-page .v1480-room-mobile-tabs button{min-height:42px!important;padding:0 5px!important;font-size:9px!important}
  body.v11-room-page .v11-player-grid{margin-top:5px!important}.v11-player-card{border-radius:15px!important}.v11-player-card>header{min-height:48px!important}
  body.v11-room-page .v11-game-frame{padding:5px!important}.v11-game-screen{border-radius:8px!important}
  body.v11-room-page .v11-system-line{margin-top:6px!important}.v149-room-preparation,.v11-coop-bar,.v11-challenge-panel{border-radius:14px!important}
  body.v11-room-page dialog.v11-dialog{box-sizing:border-box!important;width:100%!important;max-width:none!important;max-height:92dvh!important;margin:auto 0 0!important;padding:20px 14px calc(16px + env(safe-area-inset-bottom))!important;border-right:0!important;border-bottom:0!important;border-left:0!important;border-radius:23px 23px 0 0!important;overflow:auto!important}
  body.v11-room-page .v1549-trainer-card{width:100%!important;max-height:94dvh!important}.v1549-party{grid-template-columns:1fr 1fr!important}.v1549-trainer-summary{grid-template-columns:1fr 1fr!important}
}

@media (orientation:landscape) and (max-width:950px) and (max-height:560px){
  body.v11-room-page .v11-room-nav{height:48px!important;min-height:48px!important}
  body.v11-room-page .v11-room-shell{padding:4px 0 8px!important}
}

@media (prefers-reduced-motion:reduce){
  .pl1600-mobile-masthead,.pl1600-mobile-nav,*{scroll-behavior:auto!important}
}
