/* Screenshot cases use ordinary document flow on every screen. */
.case-screenshots { margin-block: 28px 32px; }
.case-screenshots-head { margin-bottom: 24px; }
.site-shell #main .case-screenshots-head h2 { font-size: 24px; line-height: 1.4; }
.site-shell #main .case-screenshots-head p { margin-top: 10px; font-size: 16px; line-height: 1.75; color: #b4b4bd; }
.case-screenshot-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.case-screenshot { min-width: 0; margin: 0; border: 1px solid #34343a; border-radius: 12px; overflow: hidden; background: #18181b; }
.case-screenshot-image { display: block; }
.case-screenshot-image img { display: block; width: 100%; height: auto; max-width: 100%; }
.case-screenshot figcaption { display: block; padding: 20px; }
.site-shell #main .case-screenshot figcaption h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.4; }
.site-shell #main .case-screenshot figcaption p { margin: 0; font-size: 16px; line-height: 1.75; color: #c4c4cb; }
.case-screenshot-footer { display: flex; justify-content: flex-end; padding: 4px 12px; }
.case-screenshot-open { display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 44px; padding: 8px 12px; color: #e3e8ed; text-decoration: underline; text-underline-offset: 4px; }
.site-shell #main .case-image-note { margin-top: 20px; color: #b4b4bd; font-size: 15px; line-height: 1.8; }
.case-license-link { display: inline-flex; align-items: center; min-height: 44px; color: #d6d9e0; }
.home-cta-short, .case-summary-compact { display: none; }

/* FDE mobile composition. Last in the cascade, shared by both languages.
   Breakpoints follow content width; desktop styling stays with site.css. */
@media (max-width: 1023px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-block: 88px 80px; }
  body { --mobile-gutter: clamp(16px, 4.5vw, 28px); }
  body:has(> zhilian-contact[site="fde"]) :is(main .wrap, main > .industry-wrap, main > .catalog-directory, main > .catalog-related, main > .core-content, footer.wrap, footer .wrap),
  .site-header > .wrap, .case-page .site-header > .wrap {
    width: calc(100% - var(--mobile-gutter) * 2 - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    margin-inline: auto;
  }
  .site-header { padding-top: env(safe-area-inset-top, 0px); }
  .site-header .header-inner, .case-page .site-header .header-inner { height: 60px; gap: 10px; }
  .site-header .brand { min-width: 0; padding: 0; gap: 8px; }
  .site-header .brand .zhilian-logo { width: 28px; height: 34px; }
  .site-header .brand .zhilian-name { font-size: 18px; letter-spacing: 0; }
  .site-header .header-end { min-width: 0; gap: 8px; margin-left: auto; }
  .site-header .header-end .language-switch { justify-content: center; min-width: 44px; min-height: 44px; height: auto; padding: 8px 12px; font-size: 13px; }
  .site-header .header-cta[data-site-destination] { display: none; }
  .site-header .menu-open, .site-menu .menu-close { width: 44px; height: 44px; flex: none; }
  .site-menu:not([hidden]) { height: 100dvh; overflow-y: auto; overscroll-behavior: contain; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
  .site-menu .site-menu-top { flex: none; min-height: 64px; }
  .site-menu .site-menu-links a { min-height: 56px; padding-block: 14px; font-size: 21px; line-height: 1.4; gap: 16px; }
  .site-menu .site-menu-destination { line-height: 1.5; gap: 16px; }
  .menu-shown > zhilian-contact { visibility: hidden; }
  /* The former booking bar must not sit behind the current contact dock. */
  body:has(> zhilian-contact:defined) .fde-bar { display: none; }
  .page-chapters { display: none !important; }
  .site-shell #main :is(p, li) { line-height: 1.75; }
  .site-shell #main :is(h1, h2, h3, h4) { word-break: normal; overflow-wrap: break-word; }
  .site-shell #main :is(.fde-btn, .fde-ghost, .button, .service-guide-link) { min-height: 48px; height: auto; white-space: normal; text-align: center; overflow-wrap: break-word; }
  .site-shell #main :is(input, select, textarea) { font-size: 16px; min-height: 48px; }
  .site-shell #main form[data-lead-form] input::placeholder { color: #a6a6b0; opacity: 1; }
  .site-shell #main :is(a, button, input, textarea, select) { scroll-margin-block: 88px 88px; }
  .site-shell #main :is(.fde-hero-grid, .fde-offer-grid, .contact-layout, .about-grid, .company-overview) > * { min-width: 0; }
  .site-shell #main .fde-form-body, .site-shell #main .fde-inline-row { grid-template-columns: minmax(0, 1fr); }
  .site-shell #main .fde-inline .fde-btn { width: 100%; }
  .site-shell #main .fde-form-error { grid-column: 1 / -1; }
  .site-shell #main .fde-part { padding-block: 48px; }
  .site-shell #main .fde-head { margin-bottom: 26px; }
  .site-shell #main [data-reveal],
  .site-shell #main .svc-ind .svc-jobs li,
  .site-shell #main .svc-panel .svc-list li,
  .site-shell #main .svc-get li { opacity: 1; transform: none; transition: none; }
  .site-shell #main .fde-head h2 { font-size: clamp(24px, 4.5vw, 30px); line-height: 1.4; }
  .site-shell #main .fde-band { padding-block: 32px; }
  .site-shell #main .fde-inline { padding: 24px 20px; }
  .site-shell #main .fde-inline-copy h2 { font-size: 23px; line-height: 1.4; }
  .site-shell #main .news-fresh { flex-wrap: wrap; row-gap: 4px; line-height: 1.6; }
  .site-shell #main :is(.news-nav, .news-filters) a { min-height: 44px; display: inline-flex; align-items: center; }
  .site-shell #main .news-dayhead { top: calc(60px + env(safe-area-inset-top, 0px)); }
  .site-shell #main .catalog-related ul { grid-template-columns: minmax(0, 1fr); }
  .site-shell #main .catalog-directory > nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .site-footer .footer-bottom { flex-wrap: wrap; gap: 12px 20px; }
  .site-footer .footer-bottom, .site-footer .footer-bottom a { font-size: 14px; line-height: 1.6; }
  .site-footer .footer-bottom > * { overflow-wrap: anywhere; }
  .site-footer .footer-explore > nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
  .site-footer .back-top { min-height: 44px; }
  .site-shell #main #contact .fde-wechat-save { font-size: 14px; line-height: 1.75; }
  .site-shell #main #contact .fde-contact-wechat figcaption p, .site-shell #main #contact .fde-contact-chat { font-size: 15px; line-height: 1.75; }
  .site-shell #main #contact .fde-contact-chat { min-height: 44px; }
  .case-screenshot figcaption { padding: 16px; }
  .site-shell #main .case-screenshot figcaption h3 { font-size: 19px; }
  .case-screenshot-open { padding-inline: 8px; font-size: 14px; }
  .case-screenshots { margin-top: 24px; }
  .site-shell #main .cases-main:not(.home-hero) { padding-top: 24px; }
  .site-shell #main .cases-systems .fde-head { margin-bottom: 20px; }
  .site-shell #main .cases-systems .case-grid { gap: 14px; }
  .site-shell #main .cases-systems .case-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 16px; align-items: start; border-radius: 12px; }
  .site-shell #main .cases-systems .case-card:hover { transform: none; }
  .site-shell #main .cases-systems .case-cover { width: 84px; height: 84px; min-height: 0; aspect-ratio: 1; border-radius: 8px; }
  .site-shell #main .cases-systems .case-cover-top { display: none; }
  .site-shell #main .cases-systems .case-card-copy { padding: 0; }
  .site-shell #main .cases-systems .case-card-copy h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.4; }
  .site-shell #main .cases-systems .case-summary-full, .site-shell #main .cases-systems .case-role { display: none; }
  .site-shell #main .cases-systems .case-summary-compact { display: block; margin: 0; font-size: 16px; line-height: 1.65; color: #bfc0c8; }
  .site-shell #main .cases-systems .case-card-bottom { margin-top: 10px; padding-top: 4px; min-height: 44px; font-size: 14px; }
  .site-shell #main .case-title-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
  .site-shell #main .case-title { flex-basis: 100%; order: 2; }
  .site-shell #main .case-title h1 { font-size: clamp(24px, 4.5vw, 30px); line-height: 1.4; }
  .site-shell #main .case-title p { margin-top: 10px; line-height: 1.75; }
  .site-shell #main .demo-window-bar { flex-wrap: wrap; padding: 12px; gap: 10px; }
  .site-shell #main .demo-window-bar > span { flex: 1 0 100%; font-size: 14px; line-height: 1.5; white-space: normal; }
  .site-shell #main .demo-window-bar .window-traffic { display: none; }
  .site-shell #main .demo-action { flex: 1; justify-content: center; min-height: 44px; font-size: 14px; padding: 8px 10px; }
  .site-shell #main .demo-window iframe, .site-shell #main .demo-stage { height: clamp(360px, 68svh, 640px); }
  /* Let the application's own responsive layout run at the phone's CSS width. */
  .site-shell #main .demo-window .demo-stage > iframe { width: 100% !important; height: 100% !important; transform: none !important; }
  .site-shell #main .demo-caption { font-size: 14px; line-height: 1.8; margin-top: 16px; }
  .site-shell #main .demo-window.is-full { inset: 0; width: 100%; height: 100dvh; border-radius: 0; }
  .site-shell #main .demo-window.is-full > :is(iframe, .demo-stage) { flex: 1 1 0; height: 0; min-height: 0; }
  .site-shell #main .demo-window.is-full .demo-window-bar { padding-top: max(12px, env(safe-area-inset-top)); }
}

@media (max-width: 760px) {
  .site-shell #main .fde-part.home-hero { padding-top: 22px; }
  .site-shell #main .home-hero .cases-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 28px; }
  .site-shell #main .home-hero .cases-intro { display: flex; flex-direction: column; align-items: stretch; }
  .site-shell #main .home-hero .cases-stage { order: 1; width: min(100%, 300px); justify-self: center; }
  .site-shell #main .home-hero h1 { margin-top: 0; font-size: clamp(28px, 7.2vw, 32px); line-height: 1.32; letter-spacing: -.02em; }
  .site-shell #main .home-hero .fde-lead { margin-top: 16px; line-height: 1.75 !important; }
  .site-shell #main .home-hero .about-actions { order: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
  .site-shell #main .home-hero .about-actions > a { min-height: 48px; padding: 10px 12px; gap: 8px; font-size: 16px; line-height: 24px; }
  .home-hero .home-cta-full { display: none; }
  .home-hero .home-cta-short { display: inline; }
  .site-shell #main .home-hero .home-me { order: 2; width: 100%; margin-top: 20px; padding: 12px 0 0; gap: 10px; border: 0; border-top: 1px solid #303034; border-radius: 0; background: none; }
  .site-shell #main .home-hero .home-me img { width: 36px; height: 36px; }
  .site-shell #main .home-hero .home-me b { font-size: 15px; line-height: 22px; }
  .site-shell #main .home-hero .home-me b span { font-size: 14px; line-height: 22px; }
  .site-shell #main .home-hero .cases-roles { margin-top: 2px; gap: 0; }
  .site-shell #main .home-hero .cases-roles li { font-size: 14px; line-height: 22px; }
  .site-shell #main .home-hero .cases-formats { order: 3; margin-top: 14px; gap: 4px 14px; }
  .site-shell #main .home-hero .cases-formats > span { font-size: 14px; line-height: 22px; padding: 0; border: 0; border-radius: 0; background: none; color: #c4c4cb; }
  .site-shell #main .home-me p { font-size: 14px; line-height: 1.65; }
  .site-shell #main :is(.svc-inds, .svc-kinds) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .site-shell #main .svc-flow { row-gap: 28px; }
  .site-shell #main .svc-top .svc-flow li, .site-shell #main .svc-top .svc-flow .fde-node { animation: none; }
  .site-shell #main .svc-flow:not(.is-in) .fde-node { background: var(--fde-grad); color: #101010; border-color: transparent; }
  .site-shell #main .svc-flow li { grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; }
  .site-shell #main .svc-flow .fde-node { width: 44px; height: 44px; }
  .site-shell #main .svc-out { flex-wrap: wrap; gap: 4px 10px; }
  .site-shell #main .fde-bar-row { grid-template-columns: minmax(60px, .8fr) minmax(0, 1fr) minmax(60px, .8fr); gap: 8px; }
  .site-shell #main .fde-bar-row span { font-size: 14px; }
  .site-shell #main .company-hero:has(#services-guide) > .wrap { width: calc(100% - var(--mobile-gutter) * 2); }
  .site-shell #main #contact .fde-contact-wechat { width: 100%; max-width: 420px; margin-left: 0; }
  .site-shell #main #contact .fde-wechat-sheet { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 20px; }
  .site-shell #main #contact .fde-wechat-sheet-head { grid-column: 1; }
  .site-shell #main #contact .fde-contact-qr { width: min(192px, 100%); justify-self: center; }
  .site-shell #main #contact .fde-contact-wechat figcaption { text-align: center; }
  .site-shell #main #contact .fde-contact-wechat h3 { font-size: 20px; }
  .site-shell #main #contact .fde-contact-wechat figcaption p { font-size: 15px; line-height: 1.75; }
  .site-shell #main #contact .fde-contact-chat { min-height: 44px; font-size: 15px; }
  .site-shell #main #contact .fde-wechat-depth { display: none; }
}

@media (max-width: 540px) {
  .site-shell #main :is(.svc-inds, .svc-kinds, .fde-scenes) { grid-template-columns: minmax(0, 1fr); }
  .site-shell #main :is(.svc-ind, .svc-kind) { padding: 20px; }
  .site-shell #main .news-issue-head { flex-wrap: wrap; }
  .site-shell #main .case-next { flex-direction: column; align-items: stretch; }
}

@media (max-width: 359px) {
  .site-header .brand .zhilian-name { font-size: 16px; }
  .site-header .brand { gap: 6px; }
  .site-header .header-inner { gap: 8px; }
  .site-header .header-end .language-switch { padding-inline: 10px; }
  .site-shell #main .fde-inline { padding-inline: 16px; }
  .site-shell #main .fde-btn { padding-inline: 16px; }
  .site-shell #main .cases-systems .case-card { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .site-shell #main .cases-systems .case-cover { width: 64px; height: 72px; }
}

@media (max-width: 1023px) and (max-height: 500px) and (orientation: landscape) {
  .site-header .header-inner, .case-page .site-header .header-inner { height: 56px; }
  .site-shell #main .fde-part { padding-block: 32px; }
  .site-shell #main .home-hero .cases-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 28px; align-items: center; }
  .site-shell #main .home-hero .cases-stage { order: 1; }
  .site-shell #main .home-hero h1 { font-size: 28px; }
  .site-shell #main .demo-window iframe, .site-shell #main .demo-stage { height: 70svh; }
  .site-menu .site-menu-links { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .site-menu .site-menu-links a { padding-block: 8px; min-height: 48px; font-size: 18px; }
  .site-menu .site-menu-top { min-height: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (min-width: 1024px) and (max-width: 1100px) {
  .site-shell #main .fde-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-shell #main .fde-figs > div:nth-child(odd) { border-left: 0; }
  .site-shell #main .fde-win-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-shell #main .fde-win-head h3 { width: 100%; }
}
