/* TowaShop mobile app experience — loaded after the desktop theme. */
.mobile-dock{display:none}

@media (max-width:900px){
  :root{--mobile-dock-h:72px}
  html{scroll-padding-top:104px}
  body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
    padding-bottom:calc(var(--mobile-dock-h) + env(safe-area-inset-bottom,0px));
    -webkit-tap-highlight-color:transparent;
    overscroll-behavior-y:none;
  }
  button,a,input,select{touch-action:manipulation}
  button,.btn,.text-button,.footer-link{min-height:44px}
  input,select,textarea{font-size:16px!important}
  .topbar{position:sticky;top:0;z-index:189;height:26px}
  nav:not(.mobile-dock){position:sticky;top:26px;z-index:188}
  .nav-inner{height:58px!important;padding:0 14px!important}
  .nav-right{display:none!important}
  .nav-toggle{display:flex!important;order:3;width:42px;height:42px;border-radius:13px}
  .towa-logo-lockup{width:54px!important;height:46px!important}
  .towa-logo-lockup>img{width:48px!important;height:43px!important}
  .nav-links{
    position:fixed!important;
    top:92px!important;
    right:12px!important;
    left:12px!important;
    max-height:calc(100dvh - 184px);
    overflow-y:auto;
    padding:10px!important;
    border-radius:20px!important;
    background:rgba(7,11,28,.97)!important;
    box-shadow:0 26px 70px rgba(0,0,0,.58)!important;
  }
  .nav-links.open{display:grid!important;grid-template-columns:1fr 1fr}
  .nav-links .nav-link{justify-content:flex-start;min-height:48px;padding:12px 14px!important;border-radius:12px;font-size:13px}
  .nav-links .cur-toggle{grid-column:1/-1;justify-self:stretch;display:grid;grid-template-columns:1fr 1fr}
  .mobile-dock{
    position:fixed;
    top:auto!important;
    right:8px;
    bottom:max(8px,env(safe-area-inset-bottom,0px));
    left:8px;
    z-index:190;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    height:64px;
    padding:5px;
    border:1px solid rgba(132,149,255,.24);
    border-radius:21px;
    background:rgba(7,11,28,.92);
    box-shadow:0 15px 48px rgba(0,0,0,.5),inset 0 1px rgba(255,255,255,.04);
    backdrop-filter:blur(22px) saturate(150%);
  }
  .mobile-dock button{
    position:relative;
    display:grid;
    place-items:center;
    align-content:center;
    gap:3px;
    min-width:0;
    min-height:52px;
    padding:3px;
    border:0;
    border-radius:16px;
    background:transparent;
    color:#7784a2;
    font:800 9px/1 var(--display,Arial,sans-serif);
    letter-spacing:.02em;
    text-transform:uppercase;
  }
  .mobile-dock button i{font:normal 20px/1 system-ui;color:#aab5d2;transition:transform .22s ease,color .22s ease}
  .mobile-dock button.active{color:#fff;background:linear-gradient(145deg,rgba(88,106,255,.3),rgba(125,72,238,.17))}
  .mobile-dock button.active i{color:#69f0ff;transform:translateY(-1px)}
  .mobile-dock button.active::after{content:"";position:absolute;right:24%;bottom:1px;left:24%;height:2px;border-radius:9px;background:#67efff;box-shadow:0 0 10px #67efff}
  .mobile-dock b{
    position:absolute;top:3px;right:12%;
    min-width:17px;height:17px;padding:0 4px;
    border-radius:99px;background:#ffe141;color:#07101d;
    font:900 9px/17px system-ui;
  }
  body.cart-open .mobile-dock{transform:translateY(130%);opacity:0;transition:.25s ease}

  .page{min-width:0}
  .section{width:100%;padding:58px 16px!important}
  .sec-title{font-size:clamp(34px,10vw,48px)!important;line-height:.91!important}
  .sec-sub{font-size:13px;line-height:1.55}
  .section-kicker{font-size:10px}
  .towa-hero{min-height:0!important;padding:34px 14px 44px!important}
  .towa-hero .hero-inner{gap:26px!important}
  .towa-hero .hero-copy{text-align:left!important}
  .towa-hero h1{margin:0!important;font-size:clamp(47px,15vw,68px)!important;line-height:.81!important}
  .towa-hero .hero-copy>p{margin:20px 0 0!important;font-size:14px!important;line-height:1.6}
  .hero-badge{max-width:max-content}
  .hero-btns{justify-content:flex-start!important;display:grid;grid-template-columns:1fr 1fr;width:100%;gap:9px}
  .hero-btns .btn{width:100%;padding:12px 8px!important;font-size:11px}
  .drop-console{width:100%!important;max-width:none!important}
  .hero-showcase-controls button{width:44px;height:44px}
  .hero-showcase-dots{max-width:55%;overflow:hidden}
  .drop-board,.match-shell,.ready-shell,.account-grid,.account-history-grid{min-width:0}
  .drop-lanes,.services-grid,.gift-route,.bot-steps,.ready-shell,.account-grid,.account-history-grid{gap:12px!important}
  .gift-step,.service-card,.bot-step{min-height:0!important;padding:22px!important}
  .route-intro{gap:15px!important;margin-bottom:24px!important}
  .route-intro>p{font-size:12px}

  #page-shop>.section{padding:34px 10px 70px!important}
  #page-shop .sec-title{font-size:40px!important}
  .shop-search-wrap{margin-top:15px}
  .shop-search{height:50px!important;min-height:50px!important;padding:0 14px!important}
  .smart-filters{
    margin:10px -2px 13px!important;
    padding:2px 2px 7px!important;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }
  .smart-filters::-webkit-scrollbar,#sidebarLinks::-webkit-scrollbar{display:none}
  .smart-filters button{min-height:40px;scroll-snap-align:start}
  .shop-layout{display:flex!important;flex-direction:column;gap:14px!important}
  .shop-sidebar{
    order:-1;
    position:sticky!important;
    top:84px!important;
    z-index:80!important;
    width:calc(100% + 20px);
    max-width:none!important;
    max-height:none!important;
    margin:0 -10px 2px!important;
    padding:8px 10px!important;
    border-width:1px 0!important;
    border-radius:0!important;
    overflow-x:auto!important;
    background:rgba(7,11,28,.9)!important;
    backdrop-filter:blur(16px);
  }
  #sidebarLinks{display:flex!important;gap:7px;min-width:max-content}
  .sidebar-link{min-height:39px;padding:10px 13px!important;font-size:11px!important;scroll-snap-align:start}
  #shopContent{width:100%}
  .shop-section{margin-bottom:48px!important}
  .shop-sec-title{font-size:26px!important;margin-bottom:13px!important}
  .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  .item-card{min-width:0!important;min-height:0!important;border-radius:17px 5px!important}
  .item-thumb{aspect-ratio:.88!important}
  .item-thumb img{padding:3px 3px 0!important}
  .item-info{padding:10px!important}
  .item-name{min-height:30px;font-size:15px!important;line-height:1!important}
  .item-price{font-size:15px!important}
  .item-btns{margin-top:8px}
  .item-add-btn,.item-view-btn{width:36px!important;height:36px!important}
  .bundle-showcase-grid .bundle-card,.bundle-showcase-grid .bundle-card:first-child{
    min-height:0!important;
    grid-template-rows:260px auto!important;
  }
  .bundle-showcase-grid .bundle-card-img{min-height:260px!important}
  .bundle-showcase-grid .bundle-card-info,.bundle-showcase-grid .bundle-card:first-child .bundle-card-info{padding:18px!important}
  .bundle-showcase-grid .bundle-card-name,.bundle-showcase-grid .bundle-card:first-child .bundle-card-name{font-size:25px!important}

  .bot-form,.readiness-panel{padding:20px!important;border-radius:20px!important}
  .bot-target-selector>div,.recipient-bot-grid{grid-template-columns:1fr!important}
  .recipient-bot-state,.bot-target-selector label{min-height:50px}
  .recipient-request-all{min-height:48px}
  .epic-recipient-top{gap:10px}
  .epic-recipient-top strong{font-size:20px}
  .recipient-card-actions{align-items:flex-end!important}

  .coins-hero{margin-bottom:25px}
  .recharge-box,.calc-box{width:100%;padding:20px!important;border-radius:20px!important}
  .recharge-total{padding:18px!important;margin-bottom:20px!important}
  .recharge-stats{grid-template-columns:1fr 1fr!important}
  .packs-grid,.ranks-ladder{grid-template-columns:1fr!important}
  .rank-card{min-height:76px}
  .calc-quick{grid-template-columns:repeat(4,1fr)!important}
  .calc-actions{display:grid!important;grid-template-columns:1fr!important}

  .account-section{padding-top:38px!important}
  .account-heading{gap:15px!important;margin-bottom:20px!important}
  .account-heading .btn{width:100%}
  .account-verify{padding:15px!important}
  .wallet-card{min-height:275px!important;padding:25px!important}
  .account-profile-card,.account-list-card,.account-loyalty-card{padding:20px!important;border-radius:18px!important}
  .account-profile-card form{display:block!important}
  .account-phone-row{grid-template-columns:90px 1fr!important;margin:14px 0}
  .account-notifications{margin:13px 0}
  .account-list{max-height:none!important}
  .account-list-item{min-height:58px;padding:12px!important}
  .account-order-title{flex-direction:column}
  .account-order-numbers,.account-order-items{grid-template-columns:1fr!important}

  .cart-overlay.open{background:rgba(0,0,0,.72)}
  .cart-drawer{
    top:auto!important;
    right:0!important;
    bottom:0!important;
    left:0!important;
    width:100%!important;
    height:min(92dvh,820px)!important;
    max-height:calc(100dvh - env(safe-area-inset-top,0px) - 8px);
    border:1px solid rgba(130,147,255,.24)!important;
    border-bottom:0!important;
    border-radius:26px 26px 0 0;
    transform:translateY(105%)!important;
    transition:transform .34s cubic-bezier(.2,.75,.2,1)!important;
    box-shadow:0 -24px 70px rgba(0,0,0,.55);
  }
  .cart-drawer::before{
    content:"";position:absolute;top:8px;left:50%;width:42px;height:4px;
    border-radius:99px;background:#39435f;transform:translateX(-50%);
  }
  .cart-drawer.open{transform:translateY(0)!important}
  .cart-header{flex:0 0 auto;padding:24px 18px 12px!important}
  .cart-close{width:44px!important;height:44px!important}
  .cart-items{min-height:80px;padding:10px 14px!important}
  .cart-footer{padding:14px 14px calc(18px + env(safe-area-inset-bottom,0px))!important}
  .cart-contact-grid{grid-template-columns:1fr 1fr!important}
  .cart-ready-card{padding:11px!important}
  .cart-trust-note{line-height:1.45}

  .modal-overlay{
    align-items:flex-end!important;
    padding:8px 8px max(8px,env(safe-area-inset-bottom,0px))!important;
  }
  .modal-overlay>.modal{
    width:100%!important;
    max-width:none!important;
    max-height:92dvh!important;
    margin:0!important;
    overflow:auto!important;
    border-radius:24px 24px 14px 14px!important;
  }
  .modal-close{position:sticky!important;top:8px!important;float:right;z-index:8;width:44px!important;height:44px!important}
  .modal-body{padding:24px 20px!important}
  .locker-lab-modal{display:block!important}
  .locker-stage{min-height:300px!important}
  .locker-stage .modal-img{height:285px!important}
  .locker-info{padding:22px 20px!important}
  #bundleModalItems{grid-template-columns:repeat(2,minmax(0,1fr))!important;max-height:38dvh!important}
  .toast{right:12px!important;bottom:calc(var(--mobile-dock-h) + 18px + env(safe-area-inset-bottom,0px))!important;left:12px!important;max-width:none!important}
  footer{padding-bottom:18px}
  .footer-inner{gap:30px!important}
}

@media (max-width:370px){
  :root{--mobile-dock-h:67px}
  .mobile-dock{right:5px;bottom:max(5px,env(safe-area-inset-bottom,0px));left:5px;height:60px;border-radius:18px}
  .mobile-dock button{min-height:48px;font-size:8px}.mobile-dock button i{font-size:18px}
  .section{padding-right:12px!important;padding-left:12px!important}
  .towa-hero h1{font-size:45px!important}
  .hero-btns{grid-template-columns:1fr}
  .hero-drop-spotlight{min-height:405px!important}
  .hero-showcase-media{height:250px!important}
  .console-head{padding-right:105px!important}
  .shop-grid{gap:7px!important}
  .item-info{padding:8px!important}
  .item-name{font-size:13px!important}
  .item-price{font-size:13px!important}
  .item-add-btn,.item-view-btn{width:34px!important;height:34px!important}
  .cart-contact-grid{grid-template-columns:1fr!important}
  .account-phone-row{grid-template-columns:1fr!important}
}

@media (min-width:621px) and (max-width:900px){
  :root{--mobile-dock-h:78px}
  .mobile-dock{right:auto;left:50%;width:min(560px,calc(100vw - 32px));height:68px;transform:translateX(-50%)}
  .towa-hero .hero-inner{max-width:720px}
  .shop-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .account-grid{grid-template-columns:1fr 1.25fr!important}
  .account-history-grid{grid-template-columns:1fr 1fr!important}
  .modal-overlay>.modal{width:min(680px,calc(100vw - 24px))!important}
}

@media (max-width:900px) and (orientation:landscape) and (max-height:520px){
  :root{--mobile-dock-h:60px}
  .topbar{display:none}
  nav:not(.mobile-dock){top:0}
  .nav-links{top:66px!important;max-height:calc(100dvh - 136px)}
  .mobile-dock{right:10px;bottom:8px;left:auto;width:360px;height:54px;transform:none}
  .mobile-dock button{min-height:44px}
  .towa-hero{padding-top:24px!important}
  .towa-hero .hero-inner{grid-template-columns:.8fr 1.2fr!important;align-items:center}
  .towa-hero h1{font-size:45px!important}
  .towa-hero .hero-copy>p{display:none}
  .hero-drop-spotlight{min-height:320px!important}
  .cart-drawer{height:100dvh!important;max-height:100dvh;border-radius:20px 0 0 20px!important;right:0!important;left:auto!important;width:min(430px,94vw)!important;transform:translateX(105%)!important}
  .cart-drawer.open{transform:translateX(0)!important}
}

@media (prefers-reduced-motion:reduce){
  .mobile-dock,.cart-drawer,.mobile-dock button i{transition:none!important}
  .towa-entry{display:grid!important}
}
