/* TH Social V118 — Mobile Home Phase 1 */
html{color-scheme:light!important;background:#f5f9ff!important}
body{background:#f5f9ff!important}
.mobileMenuToggleV118,.mobileNavBackdropV118,.mobileNavAuthV118{display:none}

@media(max-width:768px){
  html,body{background:#f5f9ff!important;color:#173554!important}
  body{overflow-x:hidden!important}

  /* Compact mobile header */
  .siteHeaderV87{
    position:sticky!important;
    top:0!important;
    z-index:1200!important;
    min-height:64px!important;
    height:64px!important;
    padding:8px 14px!important;
    display:grid!important;
    grid-template-columns:auto 1fr auto auto!important;
    align-items:center!important;
    gap:10px!important;
    background:rgba(255,255,255,.97)!important;
    border-bottom:1px solid #d7e6f5!important;
    box-shadow:0 6px 22px rgba(29,77,124,.07)!important;
  }
  .brandV87{grid-column:1!important;min-width:0!important;gap:7px!important}
  .brandV87 .logoMark{width:38px!important;height:38px!important;object-fit:contain!important}
  .brandNameV87{font-size:16px!important;font-weight:800!important;white-space:nowrap!important}

  .userMenu{grid-column:3!important;display:flex!important;align-items:center!important;gap:6px!important;min-width:0!important}
  .userMenu>.outlineBtn{display:none!important}
  .userMenu>.primary{
    min-height:40px!important;
    padding:0 14px!important;
    border-radius:13px!important;
    font-size:14px!important;
    font-weight:800!important;
    white-space:nowrap!important;
  }

  .mobileMenuToggleV118{
    grid-column:4!important;
    display:grid!important;
    place-content:center!important;
    width:42px!important;height:42px!important;
    border:1px solid #cfe0f2!important;
    border-radius:13px!important;
    background:#f6faff!important;
    padding:9px!important;
    gap:4px!important;
    cursor:pointer!important;
  }
  .mobileMenuToggleV118 span{display:block!important;width:20px!important;height:2px!important;background:#173554!important;border-radius:999px!important;transition:.18s ease!important}
  body.mobileNavOpenV118 .mobileMenuToggleV118 span:nth-child(1){transform:translateY(6px) rotate(45deg)}
  body.mobileNavOpenV118 .mobileMenuToggleV118 span:nth-child(2){opacity:0}
  body.mobileNavOpenV118 .mobileMenuToggleV118 span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}

  .mainNavV87{
    position:fixed!important;
    top:72px!important;
    left:12px!important;
    right:12px!important;
    z-index:1300!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:6px!important;
    padding:12px!important;
    max-height:calc(100dvh - 88px)!important;
    overflow:auto!important;
    background:#fff!important;
    border:1px solid #d6e5f4!important;
    border-radius:20px!important;
    box-shadow:0 24px 60px rgba(18,52,86,.2)!important;
    transform:translateY(-12px) scale(.98)!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transition:.18s ease!important;
  }
  body.mobileNavOpenV118 .mainNavV87{transform:none!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important}
  .mainNavV87>button{
    width:100%!important;
    min-height:48px!important;
    justify-content:flex-start!important;
    text-align:left!important;
    padding:0 16px!important;
    border-radius:13px!important;
    font-size:15px!important;
    font-weight:700!important;
    background:#fff!important;
    color:#264765!important;
  }
  .mainNavV87>button.active{background:#eaf4ff!important;color:#0b67d4!important}
  .mobileNavAuthV118{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;padding-top:8px!important;border-top:1px solid #e2ecf6!important;margin-top:4px!important}
  .mobileNavAuthV118 button{min-height:46px!important;border-radius:13px!important;font-size:14px!important;font-weight:800!important;cursor:pointer!important}
  .mobileLoginV118{background:#fff!important;color:#0b67d4!important;border:1px solid #a9cdf5!important}
  .mobileRegisterV118{background:linear-gradient(135deg,#1677ff,#0f9de8)!important;color:#fff!important;border:0!important}
  .mobileNavBackdropV118{display:block!important;position:fixed!important;inset:64px 0 0!important;z-index:1250!important;background:rgba(21,46,74,.26)!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transition:.18s ease!important}
  body.mobileNavOpenV118 .mobileNavBackdropV118{opacity:1!important;visibility:visible!important;pointer-events:auto!important}

  #app>main{width:min(100% - 24px,1180px)!important;margin:0 auto!important;padding-top:16px!important}

  /* Mobile hero: shorter and clearer */
  .heroV89{
    min-height:0!important;
    padding:26px 20px 24px!important;
    border-radius:22px!important;
    margin:0 0 26px!important;
    overflow:hidden!important;
  }
  .heroV89 h1{
    font-size:clamp(31px,9vw,38px)!important;
    line-height:1.06!important;
    letter-spacing:-.8px!important;
    margin:13px 0 15px!important;
  }
  .heroV89Copy>p{
    font-size:15px!important;
    line-height:1.7!important;
    margin:0!important;
    display:-webkit-box!important;
    -webkit-line-clamp:4!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }
  .heroV89Kicker{font-size:12px!important;padding:7px 11px!important}
  .heroV89Actions{margin-top:20px!important;display:block!important}
  .heroV89Primary{
    width:auto!important;
    min-width:190px!important;
    min-height:50px!important;
    padding:0 20px!important;
    border-radius:14px!important;
    background:#fff!important;
    color:#0b67d4!important;
    font-size:15px!important;
    font-weight:800!important;
    box-shadow:0 10px 24px rgba(0,43,106,.18)!important;
  }
  .heroV89Note{margin-top:12px!important;font-size:12.5px!important;line-height:1.5!important}

  /* Tighter section spacing */
  .heroV89+section{margin-top:0!important}
  main>section{margin-bottom:30px!important}
  .sectionTitle{margin:0 0 14px!important;align-items:center!important}
  .sectionTitle h2{font-size:23px!important;line-height:1.25!important;margin:0!important}
  .sectionTitle span{font-size:13px!important}

  /* Home popular categories: two columns instead of giant full-width cards */
  .heroV89+section .categoryGrid,
  .heroV89+section .categoryGridSizeA,
  .heroV89+section .categoryGridSizeB,
  .heroV89+section .categoryGridSizeC{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
  }
  .heroV89+section .categoryCard{
    min-height:190px!important;
    padding:16px 13px!important;
    border-radius:18px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    overflow:hidden!important;
  }
  .heroV89+section .categoryIcon{
    width:68px!important;height:68px!important;
    min-width:68px!important;
    margin:0 0 13px!important;
    border-radius:15px!important;
    overflow:hidden!important;
  }
  .heroV89+section .categoryIcon img{width:100%!important;height:100%!important;object-fit:contain!important}
  .heroV89+section .categoryCard h3{
    font-size:17px!important;
    line-height:1.25!important;
    margin:0 0 7px!important;
    width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .heroV89+section .categoryCard p{
    font-size:12.5px!important;
    line-height:1.45!important;
    margin:0!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }
  .heroV89+section .categoryCount{
    top:12px!important;right:10px!important;
    max-width:95px!important;
    padding:5px 8px!important;
    font-size:10.5px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}

@media(max-width:390px){
  .brandNameV87{display:none!important}
  .siteHeaderV87{grid-template-columns:auto 1fr auto auto!important;padding-inline:10px!important}
  .userMenu>.primary{padding:0 11px!important;font-size:13px!important}
  #app>main{width:calc(100% - 18px)!important}
  .heroV89{padding:23px 17px 22px!important}
  .heroV89 h1{font-size:32px!important}
  .heroV89+section .categoryGrid,
  .heroV89+section .categoryGridSizeA,
  .heroV89+section .categoryGridSizeB,
  .heroV89+section .categoryGridSizeC{gap:9px!important}
  .heroV89+section .categoryCard{min-height:176px!important;padding:13px 11px!important}
  .heroV89+section .categoryIcon{width:60px!important;height:60px!important;min-width:60px!important}
  .heroV89+section .categoryCard h3{font-size:15.5px!important}
}
