/* Deterministic phone-only corrections. Loaded after all desktop feature CSS. */
@media(max-width:780px){
  /* Application visibility always beats presentation rules. */
  .home-view.hidden,.game-view.hidden,.leaderboard-view.hidden,#account-view.hidden,#public-profile-view.hidden,#contact-view.hidden,#daily-chest-view.hidden{display:none!important}
  .site-header .nav .route-legacy-home{display:none!important}

  /* Home: exactly one separator above the difficulty message. */
  .numbers-strip{row-gap:0!important}
  .numbers-strip::before,.numbers-strip::after{display:none!important;content:none!important}
  .numbers-strip>div:nth-child(-n+3){border-bottom:0!important;box-shadow:none!important}
  .numbers-strip .numbers-message{display:flex!important;grid-column:1/-1!important;border:0!important;border-top:1px solid var(--line)!important;box-shadow:none!important;margin:12px 0 0!important;padding:12px 8px 0!important;align-items:center!important;justify-content:center!important;gap:10px!important}
  .numbers-strip .numbers-message .little-star{font-size:23px!important}
  .numbers-strip .numbers-message p{margin:0!important;font-size:10px!important;line-height:1.45!important;color:var(--muted)!important;text-align:left!important}
  .numbers-strip .numbers-message p strong{font-size:10px!important;color:#ded4f1!important}
  .home-bottom>span{display:none!important}
  .home-bottom{margin-top:12px!important}

  /* Avoid expensive blur layers on phone GPUs. */
  .site-header,.site-header .nav,.profile-menu,#game-view .question-section,.account-sidebar{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  .site-header{background:#10101dfb!important}
  .site-header .nav,.profile-menu{background:#171625!important}
  #game-view .question-section{background:linear-gradient(180deg,#10101d 82%,#10101df3 92%,transparent)!important}

  /* Account hub: one stable horizontal tab strip and full-width content. */
  .account-hub-view{width:100%!important;max-width:none!important;padding:18px 0 42px!important}
  .account-hub-shell{display:block!important;width:100%!important;max-width:none!important}
  .account-sidebar{position:relative!important;top:auto!important;z-index:auto!important;width:100%!important;max-width:none!important;background:#10101d!important;box-shadow:none!important;border:1px solid var(--line)!important;border-radius:16px!important;margin:0 0 12px!important;padding:10px!important}
  .account-sidebar-user{display:none!important}
  .account-sidebar nav{display:flex!important;width:100%!important;gap:6px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0!important;touch-action:pan-x!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-x:contain!important;scrollbar-width:none}
  .account-sidebar nav::-webkit-scrollbar{display:none}
  .account-side-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;line-height:1.2!important;box-sizing:border-box!important;flex:0 0 auto!important;width:auto!important;min-width:max-content!important;min-height:42px!important;padding:9px 12px!important;pointer-events:auto!important;touch-action:manipulation!important;position:relative!important;z-index:1!important}
  .account-panel-stack,.account-panel{width:100%!important;max-width:none!important;min-width:0!important}
  .account-panel.hidden{display:none!important}
  .profile-hero{width:100%!important;min-width:0!important}
  .profile-section-card,.profile-settings-card,.profile-setting-block{width:100%!important;min-width:0!important;box-sizing:border-box!important}
  .profile-settings-card{display:grid!important;gap:12px!important}
  .profile-privacy-line,.profile-country-line,.profile-settings-actions{display:flex!important;flex-wrap:wrap!important;gap:9px!important;align-items:center!important}
  .profile-country-line select{width:100%!important;min-width:0!important;flex:1 1 100%!important}
  .profile-password-grid{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .profile-password-grid input{width:100%!important;min-width:0!important;box-sizing:border-box!important}

  /* Daily Chest: no desktop flex layout is allowed to leak into phones. */
  .daily-chest-view{display:block;width:100%!important;max-width:none!important;margin:0!important;padding:20px 0 calc(42px + env(safe-area-inset-bottom))!important;min-height:0!important;box-sizing:border-box!important}
  .daily-chest-view.hidden{display:none!important}
  .daily-chest-shell{width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important}
  .daily-chest-heading{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;width:100%!important;max-width:none!important;margin:0 0 14px!important;overflow:visible!important;text-align:center!important}
  .daily-chest-heading>div:first-child{display:block!important;width:100%!important;min-height:0!important;flex:none!important;text-align:center!important;overflow:visible!important}
  .daily-chest-heading h1{font-size:clamp(34px,10vw,44px)!important;line-height:1.2!important;letter-spacing:-1.7px!important;padding:0!important;margin:0!important;text-align:center!important}
  .daily-chest-heading .chest-reset-timer,.daily-chest-heading .daily-reset-timer{display:block!important;position:static!important;float:none!important;flex:none!important;width:min(100%,320px)!important;min-width:0!important;max-width:320px!important;height:auto!important;margin:0 auto!important;padding:10px 14px!important;box-sizing:border-box!important;overflow:visible!important;text-align:center!important}
  .daily-chest-heading .daily-reset-timer span{display:block!important;margin:0 0 5px!important;font-size:7px!important;letter-spacing:1.1px!important}
  .daily-chest-heading .daily-reset-timer strong{display:block!important;width:100%!important;font-size:22px!important;line-height:1.05!important;letter-spacing:.4px!important;white-space:nowrap!important;overflow:visible!important;text-align:center!important}
  .daily-chest-card{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:22px 13px 24px!important;box-sizing:border-box!important;border-radius:18px!important;overflow:hidden!important}
  .daily-chest-art{width:100%!important;max-width:310px!important;height:205px!important;margin:0 auto!important;overflow:visible!important}
  .treasure-chest{max-width:100%!important;transform:scale(.84) rotateX(2deg)!important;transform-origin:center center!important;margin-top:12px!important}
  .daily-chest-copy{width:100%!important;max-width:none!important;padding:0 4px!important;box-sizing:border-box!important}
  .daily-chest-copy h2{font-size:21px!important;line-height:1.2!important}
  .daily-chest-copy p{font-size:10px!important;line-height:1.45!important}
  .daily-chest-progress:not(.hidden){display:block!important;width:100%!important;max-width:360px!important;margin:18px auto 0!important;padding:0 2px!important;box-sizing:border-box!important}
  .daily-chest-progress-head{display:flex!important;width:100%!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin:0 0 8px!important}
  .daily-chest-progress-head span{font-size:7px!important;letter-spacing:1px!important}
  .daily-chest-progress-head strong{font-size:13px!important;white-space:nowrap!important}
  .daily-chest-progress-track{display:block!important;position:relative!important;width:100%!important;height:9px!important;min-height:9px!important;margin:0!important;border:1px solid #ffffff10!important;border-radius:999px!important;background:#ffffff18!important;overflow:hidden!important;box-sizing:border-box!important}
  .daily-chest-progress-track i{display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;transform-origin:left center!important;border-radius:inherit!important}
  #daily-chest-progress-wrap[data-mobile-progress="0"] .daily-chest-progress-track i{transform:scaleX(0)!important}
  #daily-chest-progress-wrap[data-mobile-progress="1"] .daily-chest-progress-track i{transform:scaleX(.2)!important}
  #daily-chest-progress-wrap[data-mobile-progress="2"] .daily-chest-progress-track i{transform:scaleX(.4)!important}
  #daily-chest-progress-wrap[data-mobile-progress="3"] .daily-chest-progress-track i{transform:scaleX(.6)!important}
  #daily-chest-progress-wrap[data-mobile-progress="4"] .daily-chest-progress-track i{transform:scaleX(.8)!important}
  #daily-chest-progress-wrap[data-mobile-progress="5"] .daily-chest-progress-track i{transform:scaleX(1)!important}
  .daily-chest-open{display:block!important;width:min(100%,320px)!important;min-width:0!important;max-width:320px!important;margin:18px auto 0!important;box-sizing:border-box!important}
  .daily-chest-reel-panel,.daily-chest-reward{width:100%!important;max-width:100%!important}
  .daily-reward-card,.daily-reward-complete{flex-direction:column!important;text-align:center!important;gap:12px!important;padding:16px!important}
}
