
@media (max-width:760px){
  /* Mobile-only foundation. Desktop is intentionally untouched. */
  html,body{
    width:100%!important;
    max-width:100%!important;
    min-height:100%!important;
    height:auto!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  html.ss-home-no-page-scroll,
  body.ss-home-no-page-scroll{
    overflow-x:hidden!important;
    overflow-y:auto!important;
    height:auto!important;
    min-height:100%!important;
    overscroll-behavior-x:none!important;
    overscroll-behavior-y:auto!important;
  }
  body{background-attachment:scroll!important;}
  .app-shell{display:block!important;min-height:100dvh!important;height:auto!important;overflow:visible!important;}
  .main{min-height:100dvh!important;height:auto!important;overflow:visible!important;}
  .content{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:62px 12px 40px!important;
    margin:0!important;
    overflow:visible!important;
  }
  /* Home has its own hero/menu composition, so keep its previous top spacing. */
  .content:has(> .ss-home-stage){padding-top:10px!important;}
  .topbar{
    min-height:58px!important;
    height:58px!important;
    padding:8px 12px!important;
    background:rgba(2,8,13,.72)!important;
    border-bottom:0!important;
    backdrop-filter:blur(8px)!important;
  }
  .topbar .page-heading,
  .topbar .topbar-actions{display:none!important;}
  .mobile-menu-button{
    display:grid!important;
    width:46px!important;
    height:46px!important;
    border-radius:12px!important;
    background:rgba(3,13,20,.86)!important;
    border-color:rgba(73,176,229,.34)!important;
    color:#d5eaf4!important;
    box-shadow:0 8px 24px rgba(0,0,0,.22)!important;
  }
  .ss-floating-mobile-menu{
    top:10px!important;
    left:12px!important;
  }

  /* HOME: preserve the artwork but make the composition phone-native. */
  .ss-home-stage{
    width:100%!important;
    min-width:0!important;
    overflow:visible!important;
    padding:0!important;
  }
  .ss-home-stage::after{
    background:linear-gradient(180deg,rgba(2,9,14,.04) 0%,rgba(2,9,14,.05) 34%,rgba(2,9,14,.30) 58%,rgba(2,9,14,.78) 82%,rgba(2,9,14,.98) 100%)!important;
  }
  .ss-home-shield-bg{
    top:-42px!important;
    right:-72vw!important;
    width:172vw!important;
    max-width:none!important;
    opacity:1!important;
    -webkit-mask-image:none!important;
    mask-image:none!important;
    filter:saturate(1.05) drop-shadow(0 0 20px rgba(18,145,255,.15))!important;
  }
  .ss-home-hero{
    height:292px!important;
    min-height:292px!important;
    margin:0 0 12px!important;
    overflow:visible!important;
  }
  .ss-home-hero-copy{
    width:100%!important;
    height:auto!important;
    padding:52px 12px 0!important;
  }
  .ss-home-stage .ss-home-hero .ss-home-hero-copy .ss-home-hero-brand{
    width:min(292px,82vw)!important;
    max-width:82vw!important;
  }
  .ss-home-stage .ss-home-hero .ss-home-hero-copy .ss-home-hero-brand > .ss-home-hero-wordmark{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
  }
  .ss-home-stage .ss-home-hero .ss-home-hero-copy .ss-home-hero-brand > .ss-home-hero-slogan{
    width:260px!important;
    max-width:78vw!important;
    margin:-5px 0 0 2.35%!important;
    padding:0!important;
    font-size:17px!important;
    line-height:1.08!important;
    white-space:normal!important;
    text-wrap:balance!important;
  }
  .ss-home-stage .ss-home-hero .ss-home-hero-copy .ss-home-hero-brand > .ss-home-hero-slogan span{
    display:block!important;
    margin:1px 0 0!important;
  }

  .ss-home-stage .ss-main-dashboard-v124{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    margin:0!important;
  }
  .ss-home-stage .ss-main-dashboard-v124 > .ss-panel,
  .ss-home-stage .ss-final-upcoming,
  .ss-home-stage .ss-participation-v123,
  .ss-home-stage .ss-wallet-v124,
  .ss-home-stage .ss-home-wishlist-v124{
    grid-column:auto!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:hidden!important;
    border-radius:16px!important;
  }
  .ss-home-stage .ss-panel-head,
  .ss-home-stage .ss-final-upcoming .ss-panel-head{
    min-height:0!important;
    height:auto!important;
    padding:13px 14px!important;
    gap:10px!important;
    align-items:center!important;
  }
  .ss-home-stage .ss-panel-head > div{min-width:0!important;}
  .ss-home-stage .ss-panel-head h2,
  .ss-home-stage .ss-main-dashboard-v124 .ss-panel-head h2,
  .ss-home-stage .ss-ranking-section-head h2{
    font-size:17px!important;
    line-height:1.12!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  .ss-home-stage .ss-panel-head p,
  .ss-home-stage .ss-ranking-section-head p{
    margin-top:4px!important;
    font-size:10px!important;
    line-height:1.3!important;
  }
  .ss-home-stage .ss-link-button{
    flex:0 0 auto!important;
    min-width:96px!important;
    min-height:40px!important;
    padding:8px 12px!important;
    font-size:10px!important;
  }

  .ss-home-stage .ss-final-upcoming .ss-activity-list{
    display:grid!important;
    grid-template-rows:none!important;
    grid-auto-rows:auto!important;
    min-height:0!important;
    height:auto!important;
    padding:0!important;
    gap:0!important;
  }
  .ss-home-stage .ss-final-upcoming .ss-activity-row{
    height:auto!important;
    min-height:92px!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:'main reward' 'actions actions'!important;
    gap:7px 8px!important;
    padding:10px 12px!important;
    overflow:visible!important;
  }
  .ss-home-stage .ss-final-upcoming .ss-activity-main{grid-area:main!important;min-width:0!important;height:auto!important;}
  .ss-home-stage .ss-final-upcoming .ss-activity-reward{grid-area:reward!important;width:auto!important;justify-self:end!important;}
  .ss-home-stage .ss-final-upcoming .ss-attendance-actions{
    grid-area:actions!important;
    width:100%!important;
    min-width:0!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
  }
  .ss-home-stage .ss-final-upcoming .ss-choice{width:100%!important;height:38px!important;min-height:38px!important;}
  .ss-home-stage .ss-final-upcoming .ss-activity-copy strong{
    font-size:13px!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  .ss-home-stage .ss-final-upcoming .ss-activity-copy small{font-size:9px!important;white-space:normal!important;}

  .ss-home-stage .ss-participation-v123 .ss-participation-dual{
    min-height:236px!important;
    padding:12px 10px 16px!important;
    gap:8px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1.35fr) minmax(100px,.65fr)!important;
    align-items:center!important;
  }
  .ss-home-stage .ss-participation-v123 .ss-attendance-ring-main{width:176px!important;height:176px!important;max-width:100%!important;}
  .ss-home-stage .ss-guild-participation>span{font-size:9px!important;max-width:104px!important;padding:0!important;}

  .ss-home-stage .ss-wallet-v124 .ss-wallet-compact-body{min-height:238px!important;padding:12px 12px 18px!important;}
  .ss-home-stage .ss-wallet-v124 .ss-wallet-compact-flame img,
  .ss-home-stage .ss-wallet-compact-flame img{width:138px!important;height:138px!important;}
  .ss-home-stage .ss-wallet-v124 .ss-wallet-compact-flame strong,
  .ss-home-stage .ss-wallet-compact-flame strong{font-size:34px!important;}

  .ss-home-stage .ss-home-wishlist-v124 .ss-home-wishlist-body{padding:15px!important;}
  .ss-home-stage .ss-home-wishlist-v124 .ss-home-wishlist-lock{padding:12px!important;}

  .ss-home-stage .ss-featured-rankings{
    width:100%!important;
    margin:12px 0 0!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .ss-home-stage .ss-ranking-section-head{
    min-height:0!important;
    height:auto!important;
    padding:13px 14px!important;
    align-items:center!important;
  }
  .ss-home-stage .ss-featured-ranking-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    padding:10px!important;
  }
  .ss-home-stage .ss-ranking-category{min-width:0!important;width:100%!important;}

  .page-actions{flex-direction:column!important;align-items:stretch!important;gap:10px!important;}
  .page-actions-copy{min-width:0!important;}
  .page-actions h2{white-space:normal!important;}
  .panel,.wishlist-panel,.rule-chapter{max-width:100%!important;}
  .admin-page,.rules-shell,.activity-layout,.groups-board,.my-wishlist-shell{max-width:100%!important;min-width:0!important;}
  .table-wrap,.members-table-wrap{max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
}
