/* Steel Ball — mobile-first presentation layer. Desktop rules are untouched. */
@media (max-width:700px){
  :root{--mobile-nav-height:72px;--mobile-safe-bottom:max(10px,env(safe-area-inset-bottom));}
  html{scroll-behavior:smooth;}
  body{padding-bottom:calc(var(--mobile-nav-height) + var(--mobile-safe-bottom));overflow-x:hidden;}
  body.mobile-panel-open{overflow:hidden;}

  /* Header: logo + search only */
  .header{height:62px;min-height:62px;padding:8px 12px;background:rgba(7,8,10,.92);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);}
  .header-inner{height:46px;display:flex;align-items:center;justify-content:space-between;gap:10px;direction:ltr;max-width:none;}
  .logo-brand-wrap{order:2;justify-self:auto;display:inline-flex;align-items:center;gap:1px;margin-inline-start:auto;padding:2px 0!important;transform:none!important;filter:none!important;}
  .brand-s-mark{font-size:31px!important;line-height:.78!important;transform:translateY(1px)!important;}
  .brand-text-main,.brand-text-gold{font-size:23px!important;line-height:.94!important;}
  .header-actions{order:1;display:flex;align-items:center;margin:0;gap:0;direction:ltr;}
  .header-actions .login-btn,.header-actions .mobile-menu-toggle{display:none!important;}
  .search-toggle{display:flex!important;width:43px!important;height:43px!important;min-width:43px!important;border-radius:13px!important;background:rgba(255,255,255,.035)!important;border:1px solid rgba(226,184,87,.2)!important;box-shadow:none!important;transform:none!important;}
  .search-toggle:hover,.search-toggle:active{transform:none!important;box-shadow:none!important;}
  .search-toggle::before{display:none!important;}

  /* Mobile search */
  .search-overlay{padding:74px 10px 20px!important;background:rgba(0,0,0,.76)!important;backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important;}
  .search-overlay-inner{width:100%;max-width:none;}
  .search-overlay-bar{height:52px;padding:0 13px;border-radius:14px;gap:9px;}
  .search-overlay-bar input{font-size:13px;}
  .search-overlay-close{width:34px;height:34px;font-size:21px;}
  .search-results{max-height:calc(100vh - 150px);overflow:auto;border-radius:13px;}
  .search-result-item{grid-template-columns:46px minmax(0,1fr) auto!important;gap:9px;padding:9px;}
  .search-result-item img{width:46px!important;height:62px!important;}

  /* The old dropdown menu is replaced by the bottom app nav. */
  .mobile-menu{display:none!important;}
  .main-nav{display:none!important;}

  .mobile-bottom-nav{position:fixed;left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom));height:66px;z-index:1600;display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:5px;border:1px solid rgba(226,184,87,.2);border-radius:19px;background:rgba(10,11,14,.95);box-shadow:0 18px 44px rgba(0,0,0,.56),0 0 28px rgba(226,184,87,.045);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);}
  .mobile-bottom-item{position:relative;min-width:0;border:0;background:transparent;color:#bfc0c5;text-decoration:none;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font:inherit;font-size:10px;font-weight:900;cursor:pointer;transition:background .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease;}
  .mobile-bottom-item i{font-size:16px;color:var(--gold);transition:transform .2s ease,color .2s ease;}
  .mobile-bottom-item:active{transform:scale(.96);}
  .mobile-bottom-item:hover,.mobile-bottom-item.active{color:#fff;background:rgba(226,184,87,.085);box-shadow:inset 0 0 0 1px rgba(226,184,87,.14);}
  .mobile-bottom-item:hover i,.mobile-bottom-item.active i{color:var(--gold-2);transform:translateY(-1px);}
  .mobile-bottom-item.active::after{content:"";position:absolute;left:50%;bottom:3px;width:18px;height:2px;border-radius:999px;background:var(--gold);transform:translateX(-50%);}

  /* Full-screen Explore experience */
  .mobile-explore-panel{position:fixed;inset:0;z-index:1800;padding:8px 9px calc(12px + env(safe-area-inset-bottom));background:rgba(3,4,6,.78);backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);display:none;align-items:stretch;overflow:hidden;}
  .mobile-explore-panel.open{display:flex;}
  .mobile-explore-inner{width:100%;max-width:none;max-height:none;overflow:hidden;display:flex;flex-direction:column;padding:10px;border:1px solid rgba(226,184,87,.19);border-radius:21px;background:#090a0c;box-shadow:0 24px 80px rgba(0,0,0,.72);}
  .mobile-explore-top{display:grid;grid-template-columns:42px 1fr 76px;align-items:center;gap:8px;padding:2px 2px 10px;border-bottom:1px solid rgba(255,255,255,.055);}
  .mobile-explore-title{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;}
  .mobile-explore-title span{color:#fff;font-size:16px;font-weight:900;}
  .mobile-explore-title small{color:var(--muted);font-size:8px;font-weight:700;}
  .mobile-explore-close,.mobile-explore-account{height:38px;border:1px solid rgba(226,184,87,.18);border-radius:11px;background:rgba(255,255,255,.035);color:#ddd;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;font:inherit;font-size:10px;font-weight:900;transition:.2s ease;}
  .mobile-explore-close{width:38px;font-size:21px;color:#aaa;}
  .mobile-explore-account{color:var(--gold-2);}
  .mobile-explore-close:hover,.mobile-explore-account:hover{background:rgba(226,184,87,.08);border-color:rgba(226,184,87,.35);color:#fff;}
  .mobile-explore-content{padding-top:10px;overflow:auto;min-height:0;display:flex;flex-direction:column;gap:10px;}
  .mobile-explore-content .explore-panel-heading{display:none!important;}
  .mobile-explore-content .explore-column{margin:0!important;padding:11px!important;border-radius:14px!important;}
  .mobile-explore-content .explore-column h3{font-size:12px!important;margin-bottom:8px!important;}
  .mobile-explore-content .explore-list{gap:6px!important;}
  .mobile-explore-content .explore-item{grid-template-columns:26px 58px minmax(0,1fr)!important;min-height:72px!important;padding:6px!important;gap:7px!important;}
  .mobile-explore-content .explore-item img{width:58px!important;height:68px!important;object-fit:cover!important;}
  .mobile-explore-content .explore-item-copy strong{font-size:10px!important;}
  .mobile-explore-content .explore-meta-line{font-size:8px!important;}
  .mobile-explore-content .explore-rank{width:24px!important;height:24px!important;font-size:9px!important;}
  .mobile-explore-content .explore-column:nth-of-type(n+3){display:block;}

  /* Account modal comfortably inside a phone viewport. */
  #userModal{padding:12px!important;align-items:flex-end!important;}
  #userModal .modal-content{width:100%!important;max-width:none!important;max-height:calc(100vh - 24px)!important;margin:0!important;border-radius:20px!important;overflow:auto!important;}
  #userModal .close-btn{top:10px!important;right:10px!important;}

  /* Hero / work pages */
  .page-content{padding-top:62px!important;}
  .hero-slider{height:calc(100svh - 120px)!important;min-height:520px!important;max-height:none!important;border-radius:0!important;}
  .hero-slide img{object-position:center top!important;}
  .hero-content{left:16px!important;right:16px!important;bottom:30px!important;transform:none!important;}
  .hero-title{font-size:29px!important;line-height:1.08!important;}
  .hero-ar-title{font-size:18px!important;}
  .hero-desc{font-size:11px!important;line-height:1.75!important;-webkit-line-clamp:3!important;}
  .hero-actions{grid-template-columns:1fr 1fr!important;gap:9px!important;}
  .hero-read-btn,.hero-save-btn{height:43px!important;font-size:12px!important;border-radius:12px!important;}
  .hero-dots{bottom:10px!important;right:16px!important;}

  .latest-updates-section{width:100%!important;padding:26px 12px 12px!important;}
  .latest-grid{grid-template-columns:1fr!important;gap:12px!important;}
  .latest-manga-card{grid-template-columns:minmax(0,1fr) 116px!important;height:250px!important;min-height:250px!important;max-height:250px!important;border-radius:15px!important;}
  .latest-manga-cover{height:250px!important;min-height:250px!important;}
  .latest-manga-body{padding:12px!important;}
  .latest-manga-meta h3{font-size:14px!important;height:41px!important;}

  .work-shell{width:calc(100% - 20px)!important;padding-top:78px!important;padding-bottom:36px!important;}
  .work-hero{grid-template-columns:1fr!important;gap:18px!important;padding:18px 0 34px!important;min-height:0!important;text-align:center!important;}
  .work-cover{width:min(248px,75vw)!important;margin:0 auto!important;box-shadow:0 20px 45px rgba(0,0,0,.58)!important;}
  .work-title{font-size:32px!important;text-align:center!important;}
  .work-ar-title{font-size:17px!important;margin:8px 0 13px!important;}
  .work-meta{justify-content:center!important;gap:7px!important;}
  .status-badge-large,.mal-badge{padding:7px 10px!important;font-size:10px!important;}
  .work-highlights{margin-top:18px!important;text-align:right!important;}
  .work-highlights li{font-size:10px!important;}
  .section-title{font-size:19px!important;margin-top:38px!important;}
  .story-copy{font-size:12px!important;line-height:2.05!important;}
  .info-row{grid-template-columns:1fr!important;gap:4px!important;padding:12px 0!important;}
  .info-row span{font-size:10px!important;}
  .info-row strong,.genre-list{font-size:12px!important;}
  .chapter-row{padding:12px 2px!important;gap:8px!important;}
  .chapter-num{font-size:14px!important;}
  .chapter-date{font-size:10px!important;}
  .chapter-read{font-size:10px!important;padding:6px 9px!important;}

  /* Catalog cards — one column, touch friendly, same-size geometry. */
  .catalog-section{padding-top:76px!important;}
  .catalog-grid{grid-template-columns:1fr!important;max-width:360px!important;gap:14px!important;margin:0 auto!important;}
  .catalog-grid .card{width:100%!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:0!important;}
  .catalog-grid .card-cover{aspect-ratio:2/3!important;height:auto!important;}
  .catalog-grid .card-cover img{width:100%!important;height:100%!important;object-fit:cover!important;}
  .catalog-grid .card-info{min-height:96px!important;}
  .catalog-toolbar{display:flex!important;flex-direction:column!important;gap:9px!important;}
  .catalog-search{width:100%!important;}

  .site-footer{margin-bottom:8px;}
}

@media (max-width:380px){
  .brand-s-mark{font-size:28px!important}.brand-text-main,.brand-text-gold{font-size:21px!important;}
  .latest-manga-card{grid-template-columns:minmax(0,1fr) 105px!important;}
  .latest-manga-cover{min-height:250px!important;}
  .hero-title{font-size:26px!important;}
}

@media (prefers-reduced-motion:reduce){
  .mobile-bottom-item,.mobile-explore-close,.mobile-explore-account{transition:none!important;}
}


/* ===== MOBILE V3: app-shell header, bottom nav, two-column catalog and work hero actions ===== */
@media (max-width:700px){
  .header{height:70px!important;min-height:70px!important;padding:10px 12px!important;}
  .header-inner{height:50px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;direction:ltr!important;}
  .logo-brand-wrap{order:2!important;margin-inline-start:0!important;margin-inline-end:auto!important;}
  .brand-s-mark{font-size:35px!important;}
  .brand-text-main,.brand-text-gold{font-size:25px!important;}
  .header-actions{order:1!important;flex:1 1 auto!important;display:flex!important;align-items:center!important;min-width:0!important;max-width:62%!important;}
  .mobile-searchbar{display:flex!important;align-items:center!important;gap:8px!important;flex:1 1 auto!important;min-width:0!important;height:44px!important;padding:0 12px!important;border:1px solid rgba(226,184,87,.22)!important;border-radius:14px!important;background:rgba(255,255,255,.035)!important;color:var(--muted)!important;box-sizing:border-box!important;}
  .mobile-searchbar i{color:var(--gold)!important;font-size:15px!important;flex:0 0 auto!important;}
  .mobile-searchbar input{width:100%!important;min-width:0!important;border:0!important;outline:0!important;background:transparent!important;color:#f0f0f0!important;font:inherit!important;font-size:12px!important;}
  .mobile-searchbar input::placeholder{color:#777!important;}
  .search-toggle{display:none!important;}
  .header-actions .login-btn,.header-actions .mobile-menu-toggle{display:none!important;}
  .main-nav,.mobile-menu{display:none!important;}

  .mobile-bottom-nav{position:fixed!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;height:74px!important;z-index:2200!important;display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:0!important;padding:5px 4px calc(5px + env(safe-area-inset-bottom))!important;border:0!important;border-top:1px solid rgba(226,184,87,.16)!important;border-radius:0!important;background:rgba(10,11,14,.98)!important;box-shadow:0 -10px 30px rgba(0,0,0,.35)!important;backdrop-filter:blur(16px)!important;-webkit-backdrop-filter:blur(16px)!important;}
  .mobile-bottom-item{border-radius:12px!important;gap:4px!important;font-size:10px!important;}
  .mobile-bottom-item i{font-size:18px!important;}
  .mobile-bottom-item:hover{background:transparent!important;box-shadow:none!important;}
  .mobile-bottom-item.active{background:rgba(226,184,87,.08)!important;color:#fff!important;box-shadow:none!important;}
  .mobile-bottom-item.active i{color:var(--gold-2)!important;transform:none!important;}
  .mobile-bottom-item.active::after{bottom:2px!important;width:22px!important;}

  body{padding-bottom:calc(74px + env(safe-area-inset-bottom))!important;}
  .page-content{padding-top:70px!important;}
  .search-overlay{display:none!important;}

  /* Catalog: exactly two cards side-by-side on mobile */
  .catalog-section{padding:82px 10px 22px!important;}
  .catalog-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) 48px!important;gap:8px!important;align-items:start!important;}
  .catalog-search{min-width:0!important;}
  .catalog-filter-trigger{width:48px!important;height:46px!important;}
  .catalog-filter-panel{position:fixed!important;left:10px!important;right:10px!important;top:82px!important;width:auto!important;max-height:calc(100svh - 165px)!important;z-index:2100!important;}
  .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;justify-content:stretch!important;align-items:start!important;}
  .catalog-grid .card{width:100%!important;max-width:none!important;min-width:0!important;}
  .catalog-grid .card-cover{aspect-ratio:2/3!important;}
  .catalog-grid .card-info{min-height:112px!important;padding:11px 10px 10px!important;}
  .catalog-grid .manga-title{min-height:42px!important;font-size:12px!important;line-height:1.5!important;text-align:center!important;justify-content:center!important;}
  .catalog-grid .rating-container{min-height:28px!important;gap:5px!important;}
  .catalog-grid .latest-rating{min-width:58px!important;padding:5px 6px!important;font-size:9px!important;}
  .catalog-grid .catalog-card-bottom{min-height:30px!important;gap:5px!important;}
  .catalog-grid .catalog-card-bottom .chapter-num{min-height:30px!important;padding:0 6px!important;font-size:9px!important;}
  .catalog-grid .catalog-type{font-size:8px!important;}

  /* Hero action sizes */
  .hero-actions{grid-template-columns:minmax(0,1.16fr) minmax(0,.84fr)!important;gap:8px!important;}
  .hero-read-btn,.hero-save-btn{height:46px!important;font-size:11px!important;}
  .hero-save-btn{max-width:none!important;padding-inline:9px!important;}

  /* Dedicated explore page */
  .explore-page{padding:92px 12px 24px!important;}
  .explore-page-head{margin-bottom:16px!important;text-align:right!important;}
  .explore-page-head h1{margin:4px 0 3px!important;font-size:25px!important;}
  .explore-page-head p{margin:0!important;color:var(--muted)!important;font-size:10px!important;}
  .latest-heading-kicker{color:var(--gold)!important;font-size:9px!important;font-weight:900!important;}
  .explore-page-grid{display:flex!important;flex-direction:column!important;gap:12px!important;}
  .explore-page-column{padding:12px!important;border:1px solid rgba(226,184,87,.12)!important;border-radius:15px!important;background:rgba(255,255,255,.025)!important;}
  .explore-page-column h2{display:flex!important;align-items:center!important;gap:7px!important;margin:0 0 9px!important;font-size:12px!important;color:#fff!important;}
  .explore-page-column h2 i{color:var(--gold)!important;font-size:12px!important;}
  .explore-page-list{display:flex!important;flex-direction:column!important;gap:7px!important;}
  .explore-page-item{display:grid!important;grid-template-columns:26px 56px minmax(0,1fr)!important;gap:8px!important;align-items:center!important;min-height:72px!important;padding:6px!important;border:1px solid rgba(255,255,255,.06)!important;border-radius:11px!important;background:rgba(0,0,0,.18)!important;color:inherit!important;text-decoration:none!important;}
  .explore-page-item img{width:56px!important;height:68px!important;object-fit:cover!important;border-radius:8px!important;display:block!important;}
  .explore-page-rank{width:24px!important;height:24px!important;display:grid!important;place-items:center!important;border-radius:8px!important;background:rgba(226,184,87,.1)!important;color:var(--gold)!important;font-size:9px!important;font-weight:900!important;}
  .explore-page-copy{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important;}
  .explore-page-copy strong{font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  .explore-page-copy small{font-size:8px!important;color:var(--muted)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
}

/* ===== FINAL MOBILE-ONLY POLISH ===== */
.mobile-searchbar{display:none!important;}
@media (max-width:700px){
  /* App header: logo + real search field only. */
  .header{position:sticky!important;top:0!important;z-index:2300!important;height:68px!important;min-height:68px!important;padding:9px 11px!important;background:rgba(6,7,9,.97)!important;border-bottom:1px solid rgba(226,184,87,.11)!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;}
  .header-inner{height:50px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;direction:ltr!important;}
  .logo-brand-wrap{order:2!important;display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;margin:0!important;padding:0!important;transform:none!important;filter:none!important;}
  .brand-s-mark{font-size:39px!important;line-height:.78!important;transform:translateY(1px)!important;}
  .brand-text-main,.brand-text-gold{font-size:27px!important;line-height:.94!important;}
  .header-actions{order:1!important;display:flex!important;align-items:center!important;flex:1 1 auto!important;min-width:0!important;max-width:none!important;gap:0!important;direction:ltr!important;}
  .header-actions .mobile-searchbar{display:flex!important;align-items:center!important;gap:9px!important;width:100%!important;min-width:0!important;height:44px!important;padding:0 12px!important;border:1px solid rgba(226,184,87,.24)!important;border-radius:13px!important;background:rgba(255,255,255,.035)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.015)!important;}
  .header-actions .mobile-searchbar i{flex:0 0 auto!important;color:var(--gold)!important;font-size:15px!important;}
  .header-actions .mobile-searchbar input{width:100%!important;min-width:0!important;border:0!important;outline:0!important;background:transparent!important;color:#f2f2f2!important;font:inherit!important;font-size:12px!important;direction:rtl!important;text-align:right!important;}
  .header-actions .mobile-searchbar input::placeholder{color:#85858b!important;}
  .header-actions .mobile-menu-toggle,.header-actions .search-toggle,.header-actions .login-btn{display:none!important;}
  .main-nav,.mobile-menu{display:none!important;}

  /* Bottom app navigation — flush to the viewport edge, never a floating card. */
  .mobile-bottom-nav{position:fixed!important;left:0!important;right:0!important;bottom:0!important;width:100%!important;height:74px!important;z-index:2400!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0!important;padding:4px 3px calc(4px + env(safe-area-inset-bottom))!important;margin:0!important;border:0!important;border-top:1px solid rgba(226,184,87,.14)!important;border-radius:0!important;background:rgba(9,10,13,.98)!important;box-shadow:0 -8px 26px rgba(0,0,0,.35)!important;backdrop-filter:blur(14px)!important;-webkit-backdrop-filter:blur(14px)!important;}
  .mobile-bottom-item{height:100%!important;border-radius:10px!important;background:transparent!important;color:#aaa!important;box-shadow:none!important;transform:none!important;font-size:10px!important;font-weight:900!important;}
  .mobile-bottom-item i{font-size:18px!important;color:#96979d!important;transform:none!important;}
  .mobile-bottom-item:hover{background:transparent!important;color:#aaa!important;box-shadow:none!important;}
  .mobile-bottom-item.active{background:rgba(226,184,87,.085)!important;color:#fff!important;}
  .mobile-bottom-item.active i{color:var(--gold-2)!important;}
  .mobile-bottom-item.active::after{width:24px!important;height:2px!important;bottom:3px!important;background:var(--gold)!important;}
  body{padding-bottom:calc(74px + env(safe-area-inset-bottom))!important;}

  /* Two-column manga catalog. */
  .catalog-section{padding:82px 11px 24px!important;}
  .catalog-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) 46px!important;gap:8px!important;align-items:start!important;margin-bottom:14px!important;}
  .catalog-search{min-width:0!important;}
  .catalog-search input{height:46px!important;width:100%!important;box-sizing:border-box!important;}
  .catalog-filter-trigger{width:46px!important;height:46px!important;padding:0!important;border-radius:12px!important;}
  .catalog-filter-panel{position:fixed!important;left:9px!important;right:9px!important;top:78px!important;width:auto!important;max-height:calc(100svh - 160px)!important;overflow:auto!important;z-index:2350!important;border-radius:16px!important;padding:14px!important;background:rgba(12,14,18,.985)!important;box-shadow:0 24px 70px rgba(0,0,0,.72)!important;}
  .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;width:100%!important;max-width:none!important;margin:0!important;justify-content:stretch!important;}
  .catalog-grid .card{width:100%!important;min-width:0!important;max-width:none!important;border-radius:12px!important;overflow:hidden!important;}
  .catalog-grid .card-cover{aspect-ratio:2/3!important;height:auto!important;}
  .catalog-grid .card-cover img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;}
  .catalog-grid .card-info{min-height:112px!important;padding:10px 9px 9px!important;gap:8px!important;}
  .catalog-grid .manga-title{min-height:39px!important;height:39px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;font-size:12px!important;line-height:1.45!important;overflow:hidden!important;}
  .catalog-grid .rating-container{min-height:28px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:5px!important;}
  .catalog-grid .latest-rating{min-width:56px!important;padding:5px 6px!important;font-size:9px!important;}
  .catalog-grid .catalog-card-bottom{min-height:29px!important;gap:5px!important;}
  .catalog-grid .catalog-card-bottom .chapter-num{min-height:29px!important;padding:0 5px!important;font-size:9px!important;}
  .catalog-grid .catalog-type{font-size:8px!important;}
  .catalog-grid .card:hover{transform:none!important;box-shadow:none!important;border-color:rgba(226,184,87,.25)!important;}
  .catalog-grid .card:hover::after{display:none!important;}
  .catalog-grid .card:active{transform:scale(.985)!important;}

  /* Slider actions: balanced, easy to tap. */
  .hero-actions{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr)!important;gap:8px!important;}
  .hero-read-btn,.hero-save-btn{width:100%!important;min-width:0!important;height:48px!important;font-size:11px!important;border-radius:12px!important;}
  .hero-save-btn{padding-inline:8px!important;}

  /* Mobile Explore is a normal page, never a modal/popup. */
  .explore-page{padding:84px 11px 26px!important;}
  .explore-page-grid{display:flex!important;flex-direction:column!important;gap:12px!important;}
  .explore-page-column{padding:11px!important;border-radius:14px!important;}

  /* Account modal remains a sheet on mobile and stays above bottom nav. */
  #userModal{padding:8px!important;align-items:flex-end!important;z-index:2600!important;}
  #userModal .modal-content{width:100%!important;max-width:none!important;max-height:calc(100svh - 16px)!important;border-radius:20px 20px 14px 14px!important;overflow:auto!important;}
  #userModal .close-btn{top:9px!important;right:9px!important;z-index:2!important;}
}

@media (max-width:700px){
  /* Compact dropdown results for the real header search field. */
  .search-overlay.mobile-search-open{display:block!important;position:fixed!important;inset:68px 0 auto 0!important;padding:8px 11px!important;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;z-index:2250!important;pointer-events:none!important;}
  .search-overlay.mobile-search-open .search-overlay-inner{width:100%!important;max-width:none!important;pointer-events:auto!important;}
  .search-overlay.mobile-search-open .search-overlay-bar{display:none!important;}
  .search-overlay.mobile-search-open .search-results{display:block!important;max-height:min(56vh,420px)!important;overflow:auto!important;border:1px solid rgba(226,184,87,.18)!important;border-radius:13px!important;background:rgba(10,11,14,.98)!important;box-shadow:0 18px 42px rgba(0,0,0,.5)!important;}
  .search-overlay.mobile-search-open .search-result-item{grid-template-columns:44px minmax(0,1fr) auto!important;gap:8px!important;padding:8px!important;}
  .search-overlay.mobile-search-open .search-result-item img{width:44px!important;height:60px!important;object-fit:cover!important;border-radius:7px!important;}
  .search-overlay.mobile-search-open .search-result-copy strong{font-size:10px!important;}
  .search-overlay.mobile-search-open .search-result-copy small{font-size:8px!important;}
  .search-overlay.mobile-search-open .search-result-rating{font-size:8px!important;}

  /* Make filter controls reliably tappable above the card grid. */
  .catalog-toolbar,.catalog-filter-wrap,.catalog-filter-trigger,.catalog-filter-panel{touch-action:manipulation!important;}
  .catalog-filter-panel.open{opacity:1!important;visibility:visible!important;transform:translateY(0)!important;pointer-events:auto!important;}
  .catalog-filter-panel:not(.open){pointer-events:none!important;}
  .filter-option,.filter-apply,.filter-reset{min-height:36px!important;touch-action:manipulation!important;}
}

/* ===== MOBILE HOME V7 POLISH — home/search/latest/hero only ===== */
@media (max-width:700px){
  /* Compact app header: logo + search icon only. */
  .header{height:68px!important;min-height:68px!important;padding:9px 12px!important;}
  .header-inner{height:50px!important;}
  .logo-brand-wrap{order:2!important;margin:0!important;flex:0 0 auto!important;}
  .brand-s-mark{font-size:39px!important;line-height:.78!important;}
  .brand-text-main,.brand-text-gold{font-size:27px!important;line-height:.94!important;}
  .header-actions{order:1!important;flex:0 0 auto!important;max-width:none!important;min-width:43px!important;}
  .header-actions .mobile-searchbar{display:none!important;}
  .header-actions .search-toggle{display:flex!important;width:43px!important;height:43px!important;min-width:43px!important;align-items:center!important;justify-content:center!important;border-radius:13px!important;background:rgba(255,255,255,.035)!important;border:1px solid rgba(226,184,87,.2)!important;color:#f3f3f3!important;}

  /* Search is a dedicated mobile screen/overlay, not a header field. */
  .search-overlay{display:none!important;inset:0!important;padding:68px 12px 88px!important;align-items:flex-start!important;justify-content:stretch!important;background:#090a0c!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;z-index:2400!important;overflow:auto!important;}
  .search-overlay.open{display:flex!important;}
  .search-overlay-inner{width:100%!important;max-width:none!important;}
  .search-overlay-bar{display:flex!important;height:54px!important;padding:0 12px!important;border:1px solid rgba(226,184,87,.23)!important;border-radius:15px!important;background:#101216!important;box-shadow:none!important;gap:9px!important;}
  .search-overlay-bar i{font-size:16px!important;color:var(--gold)!important;}
  .search-overlay-bar input{font-size:14px!important;}
  .search-overlay-close{width:34px!important;height:34px!important;border-radius:10px!important;background:rgba(255,255,255,.035)!important;color:#aaa!important;font-size:24px!important;}
  .search-results{display:block!important;max-height:none!important;overflow:visible!important;margin-top:13px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;}
  .search-result-item{grid-template-columns:54px minmax(0,1fr) auto!important;gap:10px!important;padding:10px!important;margin-bottom:8px!important;border:1px solid rgba(255,255,255,.06)!important;border-radius:13px!important;background:rgba(255,255,255,.025)!important;}
  .search-result-item img{width:54px!important;height:70px!important;border-radius:8px!important;object-fit:cover!important;}
  .search-result-copy strong{font-size:12px!important;}
  .search-result-copy small{font-size:9px!important;}
  .search-result-rating{font-size:9px!important;}
  .search-empty{padding:44px 10px!important;text-align:center!important;color:#888!important;font-size:12px!important;}
  body.search-open{overflow:hidden!important;}

  /* Hero: remove the artificial black band at the top; keep the blend at the bottom. */
  .hero-slider{height:calc(100svh - 108px)!important;min-height:590px!important;max-height:720px!important;margin:0!important;padding:0!important;background:#050505!important;}
  .hero-slide::before{background:linear-gradient(180deg,rgba(5,5,5,0) 0%,rgba(5,5,5,.04) 30%,rgba(5,5,5,.48) 67%,rgba(5,5,5,.92) 86%,#050505 100%)!important;}
  .hero-slide::after{background:linear-gradient(180deg,transparent 0%,transparent 42%,rgba(5,5,5,.18) 60%,rgba(5,5,5,.62) 82%,#050505 100%)!important;}
  .hero-bg-image{object-position:center center!important;transform:none!important;filter:brightness(.47) saturate(.9)!important;}
  .hero-content{width:calc(100% - 30px)!important;margin:0 15px!important;padding-top:92px!important;bottom:28px!important;left:auto!important;right:auto!important;text-align:right!important;}
  .hero-title{font-size:34px!important;line-height:1.05!important;}
  .hero-arabic-title{font-size:19px!important;}
  .hero-meta{gap:7px!important;}
  .hero-desc{font-size:11px!important;line-height:1.75!important;-webkit-line-clamp:3!important;}
  .hero-genres{gap:6px!important;}
  .hero-genres span{font-size:9px!important;padding:5px 8px!important;}
  .hero-actions{grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr)!important;gap:10px!important;margin-top:18px!important;}
  .hero-read-btn,.hero-save-btn{height:48px!important;font-size:12px!important;border-radius:13px!important;}
  .hero-save-btn{padding-inline:7px!important;}
  .hero-dots{bottom:10px!important;}

  /* Latest updates: compact landscape card, full cover visible. */
  .latest-updates-section{padding:22px 10px 18px!important;}
  .latest-grid{grid-template-columns:1fr!important;gap:10px!important;}
  .latest-manga-card{display:grid!important;grid-template-columns:minmax(0,1fr) 104px!important;width:100%!important;height:210px!important;min-height:210px!important;max-height:210px!important;border-radius:14px!important;overflow:hidden!important;}
  .latest-manga-cover{height:210px!important;min-height:210px!important;width:104px!important;order:2!important;overflow:hidden!important;}
  .latest-manga-cover img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;display:block!important;transform:none!important;filter:none!important;}
  .latest-cover-backdrop,.latest-cover-shine{display:none!important;}
  .latest-badge{top:8px!important;right:8px!important;font-size:8px!important;padding:5px 7px!important;}
  .latest-manga-body{order:1!important;min-width:0!important;padding:10px 11px!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;}
  .latest-manga-meta{gap:8px!important;align-items:flex-start!important;}
  .latest-manga-meta h3{font-size:13px!important;height:38px!important;line-height:1.35!important;overflow:hidden!important;margin:0!important;}
  .latest-manga-meta p{font-size:9px!important;margin-top:3px!important;}
  .latest-rating{min-width:53px!important;padding:5px 6px!important;font-size:8px!important;}
  .latest-chapter-list{gap:5px!important;}
  .latest-chapter-link{min-height:34px!important;padding:6px 7px!important;border-radius:9px!important;font-size:9px!important;}
  .latest-chapter-link small{font-size:7px!important;white-space:nowrap!important;}
  .latest-heading h2{font-size:19px!important;}
}
@media (max-width:380px){
  .latest-manga-card{grid-template-columns:minmax(0,1fr) 98px!important;height:202px!important;min-height:202px!important;max-height:202px!important;}
  .latest-manga-cover{width:98px!important;height:202px!important;min-height:202px!important;}
  .latest-manga-meta h3{font-size:12px!important;}
  .latest-chapter-link{font-size:8px!important;}
}
@media (min-width:701px){.mobile-searchbar{display:none!important}.search-overlay{display:none!important}.search-toggle{display:flex!important;width:46px!important;height:46px!important;align-items:center!important;justify-content:center!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}}
