
/* Blox Fruits Trading Values V4.9 — Mobile & Tablet Polish
   Separate layer: does not replace the user's existing style.css or fruit-size edits. */

:root{
  --v49-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html{
  scroll-behavior:smooth;
  scroll-padding-top:96px;
  max-width:100%;
  overflow-x:hidden;
}

body{
  max-width:100%;
  overflow-x:hidden;
}

.topbar nav a,
button,
input,
select,
summary{
  min-height:44px;
}

.back-to-top{
  position:fixed;
  right:18px;
  bottom:22px;
  z-index:1200;
  width:48px;
  height:48px;
  border-radius:50%;
  border:1px solid rgba(125,211,252,.35);
  background:rgba(8,17,31,.92);
  color:#eef8ff;
  font-size:24px;
  font-weight:900;
  display:grid;
  place-items:center;
  box-shadow:0 14px 36px rgba(0,0,0,.34);
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
  transition:opacity .18s ease, transform .18s ease, border-color .18s ease;
}

.back-to-top.is-visible{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

.back-to-top:hover{
  border-color:rgba(125,211,252,.75);
}

.mobile-quick-nav{
  display:none;
}

/* Large tablet / smaller laptop */
@media (max-width: 1024px){
  .topbar{
    gap:12px;
    padding-left:18px !important;
    padding-right:18px !important;
  }

  .topbar nav{
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    white-space:nowrap;
    padding-bottom:2px;
  }

  .topbar nav::-webkit-scrollbar{
    display:none;
  }

  .topbar nav a{
    flex:0 0 auto;
  }

  .hero h1{
    font-size:clamp(42px,7vw,60px) !important;
    line-height:1.03 !important;
  }

  .section{
    width:min(100% - 28px, 1180px) !important;
  }

  .calculator-grid{
    gap:16px !important;
  }

  .trade-panel{
    min-width:0;
  }

  .modal-card{
    width:min(94vw,900px) !important;
    max-height:88vh;
    overflow:auto;
  }

  .detail-modal-card,
  .trade-creator-card{
    width:min(94vw,920px) !important;
  }
}

/* Tablet */
@media (max-width: 900px){
  .calculator-grid{
    grid-template-columns:1fr !important;
  }

  .vs-badge{
    margin:0 auto !important;
    transform:none !important;
  }

  .creator-grid{
    grid-template-columns:1fr !important;
  }

  .panel-metrics{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .featured-grid,
  .catalog-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .faq-grid{
    grid-template-columns:1fr !important;
  }
}

/* Phones */
@media (max-width: 700px){
  html{
    scroll-padding-top:76px;
  }

  body{
    padding-bottom:calc(74px + var(--v49-safe-bottom));
  }

  .topbar{
    padding:10px 12px !important;
  }

  .brand{
    max-width:56vw;
    min-width:0;
  }

  .brand span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .brand b{
    flex:0 0 auto;
  }

  .topbar nav{
    display:none !important;
  }

  .hero{
    padding-left:16px !important;
    padding-right:16px !important;
  }

  .hero h1{
    font-size:clamp(36px,11vw,50px) !important;
    overflow-wrap:anywhere;
  }

  .hero p{
    font-size:17px !important;
  }

  .hero-stats{
    grid-template-columns:1fr !important;
    gap:10px !important;
  }

  .section{
    width:calc(100% - 20px) !important;
    margin-left:auto !important;
    margin-right:auto !important;
    padding-left:0 !important;
    padding-right:0 !important;
  }

  .section-heading,
  .section-head{
    align-items:flex-start !important;
    gap:12px !important;
  }

  .section-heading h2,
  .section-head h2{
    font-size:clamp(30px,9vw,40px) !important;
    overflow-wrap:anywhere;
  }

  .featured-grid,
  .catalog-grid{
    grid-template-columns:1fr !important;
  }

  .filters,
  .collection-toolbar{
    gap:8px !important;
  }

  .collection-toolbar input,
  .collection-toolbar select,
  .filters button{
    width:100%;
    max-width:none;
  }

  .trade-panel{
    padding:14px !important;
  }

  .trade-items{
    gap:9px !important;
  }

  .trade-item,
  .empty-trade-slot{
    min-width:0 !important;
  }

  .panel-metrics{
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
  }

  .trade-result{
    padding:18px 14px !important;
  }

  .trade-result h3{
    font-size:clamp(27px,9vw,38px) !important;
  }

  .modal{
    padding:10px !important;
  }

  .modal-card,
  .detail-modal-card,
  .trade-creator-card{
    width:calc(100vw - 20px) !important;
    max-width:none !important;
    max-height:88dvh;
    border-radius:18px !important;
  }

  .modal-head{
    gap:10px;
  }

  .picker-list{
    max-height:58dvh !important;
  }

  .audit-grid{
    grid-template-columns:1fr 1fr !important;
  }

  .site-footer{
    gap:14px !important;
  }

  .mobile-quick-nav{
    position:fixed;
    left:8px;
    right:8px;
    bottom:calc(8px + var(--v49-safe-bottom));
    z-index:1100;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:4px;
    padding:7px;
    border:1px solid rgba(148,163,184,.22);
    border-radius:18px;
    background:rgba(8,17,31,.94);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    box-shadow:0 18px 44px rgba(0,0,0,.42);
  }

  .mobile-quick-nav a{
    min-width:0;
    min-height:50px;
    border-radius:13px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    color:#dcecff;
    text-decoration:none;
    font-weight:800;
  }

  .mobile-quick-nav a:active{
    background:rgba(125,211,252,.12);
  }

  .mobile-quick-nav a span{
    font-size:19px;
    line-height:1;
  }

  .mobile-quick-nav a small{
    font-size:11px;
    line-height:1;
  }

  .back-to-top{
    right:14px;
    bottom:calc(86px + var(--v49-safe-bottom));
    width:44px;
    height:44px;
    font-size:21px;
  }
}

@media (max-width: 430px){
  .audit-grid{
    grid-template-columns:1fr !important;
  }

  .panel-metrics{
    grid-template-columns:1fr !important;
  }
}

/* Make keyboard focus clearly visible without changing the site's visual theme. */
.mobile-quick-nav a:focus-visible,
.back-to-top:focus-visible{
  outline:3px solid rgba(125,211,252,.85);
  outline-offset:3px;
}
