/* Shengcai AI mobile experience layer. Desktop rules intentionally untouched. */
.sc-mobile-hint{display:none}

@media (max-width:767px){
  :root{--sc-gutter:20px;--sc-radius:22px;--sc-line:rgba(148,163,184,.16)}
  html{scroll-behavior:smooth;scroll-padding-top:68px}
  body{overflow-x:hidden;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
  a,button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
  button,a{min-height:44px}
  .container{padding-left:var(--sc-gutter)!important;padding-right:var(--sc-gutter)!important}

  /* Compact glass navigation with a purpose-built full-screen mobile menu. */
  header{height:66px;background:rgba(6,17,31,.76)!important;border-bottom:1px solid rgba(148,163,184,.12);-webkit-backdrop-filter:blur(18px) saturate(145%);backdrop-filter:blur(18px) saturate(145%)}
  header>.container{height:66px!important}
  header>a,header .container>a{min-height:auto}
  header .container>a img{width:36px;height:36px}
  header .container>a .gap-3{gap:10px}
  header .container>a .text-lg{font-size:16px;letter-spacing:.02em}
  header .container>a .text-base{font-size:12px;letter-spacing:.08em;color:#bfeaff}
  header button[aria-label]{position:relative;width:44px;height:44px;align-items:center;justify-content:center;border:1px solid rgba(125,211,252,.18);border-radius:14px;background:linear-gradient(145deg,rgba(39,177,255,.13),rgba(139,92,246,.08));color:#e8f7ff}
  header>div[class*="overflow-hidden"]{position:fixed;inset:66px 0 auto;height:calc(100dvh - 66px)!important;min-height:calc(100vh - 66px);max-height:calc(100dvh - 66px);z-index:60;overflow-y:auto!important;border-top:0!important;background:radial-gradient(circle at 84% 8%,rgba(39,177,255,.2),transparent 38%),linear-gradient(180deg,#071a2f,#050f1d);animation:sc-menu-in .28s cubic-bezier(.2,.8,.2,1)}
  header>div[class*="overflow-hidden"]>.container{height:auto!important;padding-top:22px!important;padding-bottom:max(28px,env(safe-area-inset-bottom))!important}
  header>div[class*="overflow-hidden"] a{display:flex!important;align-items:center;min-height:54px;border:1px solid rgba(148,163,184,.12);border-radius:16px!important;background:rgba(255,255,255,.035);padding:0 18px!important;font-size:16px!important}
  header>div[class*="overflow-hidden"] .grid{gap:8px!important;padding:8px 0 8px 14px!important}
  header>div[class*="overflow-hidden"] .grid a{min-height:42px;border:0;background:rgba(39,177,255,.07);font-size:13px!important}
  header>div[class*="overflow-hidden"] a[class*="bg-gradient"]{justify-content:center;margin-top:10px;background:linear-gradient(100deg,#27b1ff,#55d4ff)!important;color:#03111f!important;font-weight:700}
  body.sc-menu-open{overflow:hidden}
  @keyframes sc-menu-in{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}

  /* Mobile typography and rhythm: shorter openings, stronger hierarchy. */
  main{overflow:hidden}
  main>[class=""]>section:first-child,main section:first-child{isolation:isolate}
  [class*="pt-[72px]"]{padding-top:66px!important}
  section[class*="min-h-[92vh]"]{min-height:auto!important;align-items:flex-start!important;padding-top:66px!important}
  section[class*="min-h-[92vh]"]>.container{padding-top:48px!important;padding-bottom:42px!important}
  section[class*="min-h-[92vh]"] h1{max-width:350px;font-size:clamp(38px,11vw,49px)!important;line-height:1.08!important;letter-spacing:-.04em;text-wrap:balance}
  .sc-page-home section[class*="min-h-[92vh]"] h1{max-width:390px;letter-spacing:-.01em}
  .sc-page-home section[class*="min-h-[92vh]"] h1>.text-gradient{display:inline-block;margin-top:8px;font-size:clamp(27px,8.5vw,36px);line-height:1.2;letter-spacing:-.04em;white-space:nowrap}
  .sc-page-home section[class*="min-h-[92vh]"] p[class*="mt-6"][class*="max-w-xl"]{text-align:justify;text-justify:inter-ideograph;text-indent:2em}
  main p.sc-mobile-prose{text-align:justify!important;text-justify:inter-ideograph;text-indent:2em}

  /* A clear six-industry index before the case collection. */
  .sc-industry-map{margin:28px 0 18px;padding:16px;border:1px solid rgba(56,189,248,.2);border-radius:22px;background:linear-gradient(145deg,rgba(39,177,255,.09),rgba(139,92,246,.045));box-shadow:inset 0 1px rgba(255,255,255,.05)}
  .sc-industry-map__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .sc-industry-map__item{display:flex;min-height:42px;align-items:center;justify-content:center;border:1px solid rgba(148,163,184,.14);border-radius:13px;background:rgba(2,6,23,.28);color:#dbeafe;font-size:13px;font-weight:600;white-space:nowrap}
  section[class*="min-h-[92vh]"] h1+*{margin-top:22px}
  h1.text-3xl,h1[class*="text-3xl"]{font-size:32px!important;line-height:1.18!important;letter-spacing:-.035em;text-wrap:balance}
  h2.text-3xl,h2[class*="text-3xl"]{font-size:29px!important;line-height:1.18!important;letter-spacing:-.035em;text-wrap:balance}
  h2.text-2xl,h2[class*="text-2xl"]{font-size:25px!important;line-height:1.25!important;text-wrap:balance}
  p{word-break:normal}
  .text-gradient{-webkit-box-decoration-break:clone;box-decoration-break:clone}
  [class*="tracking-[0.3em]"],[class*="tracking-[0.25em]"]{letter-spacing:.19em!important}

  /* Hero actions become a clear primary/secondary decision. */
  section[class*="min-h-[92vh]"] [class*="mt-8"][class*="flex-wrap"]{display:grid!important;grid-template-columns:1fr 1fr;gap:10px!important;margin-top:28px!important}
  section[class*="min-h-[92vh]"] [class*="mt-8"][class*="flex-wrap"] a{justify-content:center;min-width:0;padding:13px 14px!important;white-space:nowrap}
  section[class*="min-h-[92vh]"] [class*="mt-12"][class*="grid-cols-2"]{margin-top:32px!important;gap:10px!important}
  section[class*="min-h-[92vh]"] [class*="mt-12"][class*="grid-cols-2"]>div{min-height:105px;padding:16px;border:1px solid var(--sc-line);border-radius:18px;background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.018));box-shadow:inset 0 1px rgba(255,255,255,.06)}
  section[class*="min-h-[92vh]"] [class*="mt-12"][class*="grid-cols-2"] .text-2xl{font-size:27px}
  section[class*="min-h-[92vh]"] [class*="mt-12"][class*="grid-cols-2"] [class*="text-[15px]"]{font-size:13px!important;line-height:1.55!important}

  /* Section spacing is rebuilt for thumb-scrolling instead of desktop stacking. */
  section[class*="py-24"],section[class*="py-20"],section[class*="pb-24"],section[class*="pb-20"]{padding-top:58px!important;padding-bottom:58px!important}
  section[class*="border-t"][class*="py-20"]{padding-top:54px!important;padding-bottom:54px!important}
  [class*="mt-14"]{margin-top:32px!important}
  [class*="mt-12"]{margin-top:30px!important}
  [class*="mt-10"]{margin-top:26px!important}
  [class*="mt-16"]{margin-top:38px!important}

  /* Cards: tactile surfaces, tighter copy, no desktop hover dependence. */
  main [class*="rounded-3xl"][class*="border"],main [class*="rounded-2xl"][class*="border"]{border-color:rgba(125,211,252,.15);box-shadow:inset 0 1px rgba(255,255,255,.045),0 14px 40px rgba(1,8,20,.18)}
  main [class*="rounded-3xl"][class*="p-7"]{padding:21px!important;border-radius:22px!important}
  main [class*="rounded-2xl"][class*="p-6"]{padding:20px!important;border-radius:20px!important}
  main [class*="rounded-[2.5rem]"]{border-radius:26px!important;padding:38px 20px!important}
  main [class*="rounded-[2rem]"][class*="p-10"]{border-radius:24px!important;padding:28px 20px!important}
  main [class*="leading-8"]{line-height:1.82!important}
  main [class*="leading-7"]{line-height:1.78!important}

  /* Curated horizontal story rails reduce page length and feel native to touch. */
  .sc-swipe-rail{display:flex!important;gap:14px!important;overflow-x:auto!important;overflow-y:hidden;padding:3px var(--sc-gutter) 18px 0!important;margin-right:calc(var(--sc-gutter) * -1);scroll-snap-type:x mandatory;scroll-padding-left:var(--sc-gutter);overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .sc-swipe-rail::-webkit-scrollbar{display:none}
  .sc-swipe-rail>*{flex:0 0 min(84vw,340px);width:min(84vw,340px);scroll-snap-align:start}
  .sc-swipe-rail>*[class*="h-full"]{height:auto}
  .sc-mobile-hint{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:18px 0 8px;color:#7dd3fc;font-size:11px;letter-spacing:.14em}
  .sc-mobile-hint:before{content:"";width:32px;height:1px;background:linear-gradient(90deg,transparent,#38bdf8)}
  .sc-mobile-hint:after{content:"→";font-size:15px}

  /* Three-column figures need breathing room on narrow screens. */
  [class*="grid-cols-3"][class*="text-center"]{gap:8px!important}
  [class*="grid-cols-3"][class*="text-center"]>div{min-width:0}
  [class*="grid-cols-3"][class*="text-center"] [class*="text-3xl"]{font-size:28px!important;line-height:1.08!important}
  [class*="grid-cols-3"][class*="text-center"] .text-xs{font-size:11px;line-height:1.45}

  /* Case detail pages: compact editorial opening and swipeable screenshots. */
  .sc-page-case main section:first-child{padding-top:104px!important;padding-bottom:50px!important}
  .sc-page-case main section:first-child h1{font-size:36px!important;line-height:1.12!important}
  .sc-page-case main section:first-child [class*="mb-8"]{margin-bottom:25px!important}
  .sc-page-case main [class*="aspect-[16/9]"]{border-radius:14px}
  .sc-page-case main [class*="overflow-x-auto"]{scroll-snap-type:x proximity}

  /* Services stays a vertical journey, but loses the oversized desktop gaps. */
  .sc-page-services main [class*="group flex h-full gap-5"]{display:grid;grid-template-columns:54px 1fr;gap:16px!important;padding:20px!important}
  .sc-page-services main [class*="group flex h-full gap-5"]>[class*="rounded-2xl"]{width:54px;height:54px;padding:0!important;align-items:center;justify-content:center}
  .sc-page-services main [class*="group flex h-full gap-5"] h3{font-size:20px!important;line-height:1.35}

  /* Footer becomes a compact contact destination rather than another long page. */
  footer{padding-top:48px!important;padding-bottom:max(24px,env(safe-area-inset-bottom))!important}
  footer [class*="mb-12"][class*="grid"]{gap:30px!important;margin-bottom:34px!important}
  footer [class*="rounded-[1.75rem]"]{padding:19px!important;border-radius:22px!important}
  footer [class*="rounded-[2rem]"]{padding:20px!important;border-radius:24px!important}
  footer .space-y-2\.5{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}
  footer .space-y-2\.5>*{margin:0!important;line-height:1.55}
  footer [class*="border-t"][class*="pt-8"]{align-items:flex-start!important;gap:12px;text-align:left;font-size:12px;line-height:1.6}
  footer [class*="border-t"][class*="pt-8"]>div{margin-top:0!important}

  /* Legal pages switch to an editorial light header and readable document scale. */
  .sc-page-legal header{background:rgba(255,255,255,.88)!important;border-bottom-color:#e5e7eb}
  .sc-page-legal header .container>a .text-white{color:#111827!important}
  .sc-page-legal header .container>a .text-base{color:#4b5563!important}
  .sc-page-legal header button[aria-label]{border-color:#e5e7eb;background:#f8fafc;color:#334155}
  .sc-page-legal .bg-white.min-h-screen{padding-top:102px!important;padding-bottom:56px!important}
  .sc-page-legal h1{font-size:30px!important;line-height:1.18!important;margin-bottom:28px!important;overflow-wrap:anywhere}
  .sc-page-legal .prose{font-size:16px!important;line-height:1.85!important;color:#475569}
  .sc-page-legal .prose h2{font-size:22px!important;line-height:1.35!important;margin-top:38px!important;margin-bottom:14px!important;color:#111827}
  .sc-page-legal .prose h3{font-size:18px!important;line-height:1.45!important}
  .sc-page-legal .prose table{min-width:680px}
  .sc-page-legal [class*="bg-gray-50"],.sc-page-legal [class*="bg-gray-100"]{padding:18px!important;border-radius:16px!important}
}

@media (max-width:359px){
  :root{--sc-gutter:16px}
  section[class*="min-h-[92vh]"] h1{font-size:36px!important}
  section[class*="min-h-[92vh]"] [class*="mt-8"][class*="flex-wrap"]{grid-template-columns:1fr}
  header .container>a .text-lg{font-size:15px}
  header .container>a .text-base{font-size:11px}
  .sc-industry-map{padding:15px}
  .sc-industry-map__grid{gap:6px}
  .sc-industry-map__item{font-size:12px}
}

@media (prefers-reduced-motion:reduce){
  .sc-swipe-rail{scroll-behavior:auto}
  header>div[class*="overflow-hidden"]{animation:none}
}
