/* Shared marketing layout, calibrated against Youzan's public desktop frames.
   Use responsive containers and local spacing, keeping native readable type. */
:root {
  --site-container: 1280px;
  --site-gutter: 16px;
  --site-content-max: calc(var(--site-container) - var(--site-gutter) * 2);
  --site-content-width: min(calc(100% - var(--site-gutter) * 2), var(--site-content-max));
  --site-canvas-width: min(1440px,calc(var(--site-content-width) * 1.2));
  --site-desktop-scale: 1;
  --max: var(--site-container);
}
html { zoom: 1 !important; }
/* One composition from 1080P through 4K; the shared head script updates it
   before first paint and whenever the available desktop window changes. */
@media(min-width:1536px) {
  html { zoom:var(--desktop-frame-zoom,.9) !important; }
}
@media(min-width:640px) { :root { --site-gutter:24px; } }
@media(min-width:1024px) { :root { --site-gutter:32px; } }
@media(min-width:1280px) { :root { --site-gutter:40px; } }
@media(min-width:1536px) {
  :root { --site-container:1620px;--site-canvas-width:min(100%,calc(var(--site-content-max) * 1.2)); }
  body main.product-index { box-sizing:border-box;width:100%;max-width:var(--site-container);padding-inline:var(--site-gutter); }
  body .join-shell { max-width:min(1240px,var(--site-content-max)); }
  .about-intro { height:calc(var(--desktop-vh) * 100 - 200px); }
  .student-entry-main { min-height:calc(var(--desktop-vh) * 100 - var(--nav-h,72px)); }
  #floatQr.wecom-card { bottom:clamp(100px,calc(var(--desktop-vh) * 16),180px); }
}
@media(min-width:1101px) { :root { --nav-h:92px; } }

/* Keep every route on the same navigation and dropdown grid. */
#nav .nav-inner {
  box-sizing:border-box;
  width:100%;max-width:var(--site-container);
  margin-inline:auto;padding-inline:var(--site-gutter);
}
#nav .mega-inner { max-width:var(--site-content-max);margin-inline:auto; }
html[data-home-fullscreen] {
  --home-frame-max:var(--site-container);
  --home-frame-gutter:var(--site-gutter);
}

/* Native page sections: shared outer edges, original component interiors. */
body :is(.about-wrap,.ui-container,.wrap,.rp-container,.rh-wrap,.dist-wrap,
  .dw-wrap,.dsc-wrap,.mh-wrap,.ma-wrap,.mi-wrap,.mic-wrap,.mis-wrap,.mp-wrap,
  .sb-wrap,.se-wrap,.sl-wrap,.sr-wrap,.tc-wrap,.wci-wrap,.wcs-wrap,
  .scrm-container,.news-index .news-wrap,.cases-page .case-wrap,.price-wrap,
  .ai-container,.ai-chain-inner,.ai-hub-banner-inner,
  .learner-service-inner,.course-scenes-inner,.live-solution-inner,
  .pay-discount-wrap,.gp-hero-inner) {
  box-sizing:border-box;
  width:calc(100% - var(--site-gutter) * 2) !important;
  max-width:var(--site-content-max) !important;
  margin-inline:auto !important;padding-inline:0 !important;
}
body :is(.mh-wrap,.dist-wrap) { zoom:1 !important; }
@media(min-width:1101px) {
  .page-distribution .dhero .dist-hero-copy { padding-left:0; }
}
footer.footer :is(.footer-inner,.f-inner) {
  box-sizing:border-box;width:calc(100% - var(--site-gutter) * 2) !important;
  max-width:var(--site-content-max) !important;margin-inline:auto !important;padding-inline:0 !important;
}
#leadBar .lead-inner { width:calc(100% - var(--site-gutter) * 2);max-width:var(--site-content-max);margin-inline:auto; }

/* Keep the full QR card on roomy desktops; use the same consultation dialog
   from a compact rail where an open card would cover the content column. */
#floatQr .site-consult-compact { display:none; }
@media(min-width:1101px) {
  #floatQr.wecom-card { width:clamp(206px,calc(13 * var(--desktop-vw, 1vw)),234px);right:12px;bottom:clamp(100px,calc(16 * var(--desktop-vh, 1vh)),180px);transform:none; }
}
@media(min-width:701px) and (max-width:1100px) {
  #floatQr.wecom-card { width:60px !important;right:12px;border:1px solid #d9e5f6;border-radius:16px;background:#fff;box-shadow:0 8px 24px #244b7b1c; }
  #floatQr.wecom-card > :not(.site-consult-compact) { display:none !important; }
  #floatQr .site-consult-compact { display:flex;flex-direction:column;align-items:center;gap:9px;width:100%;padding:16px 8px;border:0;border-radius:16px;background:transparent;color:#3568cb;font-family:inherit;font-size:13px;font-weight:500;line-height:1.6;cursor:pointer; }
  #floatQr .site-consult-compact svg { width:26px;height:26px; }
  #floatQr .site-consult-compact span { writing-mode:vertical-rl;letter-spacing:3px; }
  #floatQr .site-consult-compact:hover { background:#f0f6ff; }
  #floatQr .site-consult-compact:focus-visible { outline:2px solid #3778ff;outline-offset:3px; }
}

@media(min-width:1101px) {
  /* Enlarge this poster's illustration and its floating cards together. */
  .page-home .home-brand-hero .brand-hero-visual { scale:1.14;margin-block:25px; }
  /* The final conversion section is a content-sized block, not a scaled
     1440px illustration. Keep its text and button centered without blank height. */
  .product-restored section.product-module.site-footer-cta-area {
    height:auto !important;min-height:0;padding:64px var(--site-gutter);
  }
  .product-restored section.site-footer-cta-area > .product-canvas {
    position:relative;left:auto;top:auto !important;margin:0 auto;
    width:100%;max-width:1200px;height:auto;transform:none;padding:0;gap:20px;
  }
  .product-restored section.site-footer-cta-area > .product-canvas > :is(h2,h3) { height:auto !important; }
  .product-restored section.site-footer-cta-area { --footer-display-size:38px;--footer-display-line:56px; }
  .product-restored section.site-footer-cta-area .site-footer-only-action {
    width:176px !important;height:52px !important;min-height:52px;padding:0 20px;box-sizing:border-box;font-size:16px !important;
  }
  /* Internal grids must grow with their containers, not retain 1200px-era
     fixed tracks that leave blank columns on wider desktops. */
  .page-home .ops { min-height:0;padding-block:72px; }
  .page-home .ops-sub { max-width:1120px;margin-inline:auto; }
  .page-home .ops :is(.flow-rail,.cap-matrix,.base-bar) { min-width:0; }
  .page-home .ops .flow-inner { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;position:relative; }
  .page-home .ops .flow-node { width:auto;min-width:0; }
  .page-home .ops .flow-arrow { position:absolute;top:calc(50% - 5px); }
  .page-home .ops .flow-arrow:nth-of-type(1) { left:calc(20% - 6px); }
  .page-home .ops .flow-arrow:nth-of-type(2) { left:calc(40% - 6px); }
  .page-home .ops .flow-arrow:nth-of-type(3) { left:calc(60% - 6px); }
  .page-home .ops .flow-arrow:nth-of-type(4) { left:calc(80% - 6px); }
  .page-home .cap-matrix { grid-template-columns:repeat(5,minmax(0,1fr));gap:12px 16px;justify-content:normal; }
  .page-home .ops .cap-card { min-width:0;padding-inline:10px; }
  .page-home .ops .home-cap-row { display:flex; }
  .page-home .ops .cap-chip { width:auto;min-width:0;flex:1;padding:4px 6px;white-space:normal;line-height:1.45;text-align:center;overflow:visible; }
  .page-home .ops .cap-chip.wide { width:auto;flex-basis:100%; }
  .page-home .ops .cap-chip.ICO { gap:3px; }
  .page-home .ops .base-bar { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px; }
  .page-home .ops .base-card { width:auto;min-width:0; }

  .page-home .cap-grid3 { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.334fr);height:clamp(480px,calc(34 * var(--desktop-vw, 1vw)),520px); }
  .page-home :is(.cap-sec,.channel,.coop) { height:auto;padding-bottom:72px; }
  .page-home :is(.cap-wrap,.channel-wrap,.coop-wrap) { height:auto;padding-bottom:40px; }
  .page-home .cap-col { min-width:0;flex:initial; }
  .page-home .cap-col--wide { gap:24px; }
  .page-home .cap-col--wide .cap-card { height:auto;flex:1;min-height:0; }
  .page-home .cap-col--wide .cap-card + .cap-card { margin-top:0; }
  .page-home .cap-card--fig { height:100%;min-width:0; }
  .page-home .cap-card--fig .fig-img { height:62%;object-fit:cover; }
  .page-home .cap-row2 { grid-template-columns:repeat(2,minmax(0,1fr));height:248px; }
  .page-home .chan-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .page-home .chan-right { grid-column:span 2;min-width:0; }
  .page-home .chan-pair { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .page-home .chan-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .page-home :is(.chan-tall,.chan-wide,.chan-card,.chan-flat) { min-width:0; }
  .page-home .chan-tall .chan-art { left:50%;translate:-50% 0;top:auto;bottom:0;width:min(90%,400px);height:auto;max-height:50%;object-fit:contain;object-position:bottom; }
  .page-home .chan-wide .chan-art { left:auto;right:24px;top:auto;bottom:0;width:40%;height:75%;object-fit:contain;object-position:bottom; }
  .page-home .chan-wide .desc { max-width:calc(52% - 24px); }
  .page-home :is(.chan-card,.chan-flat) .chan-art { width:calc(100% - 48px);height:100px;top:auto;bottom:0;object-fit:cover;object-position:top; }
  .page-home .coop-grid { width:min(100%,1200px);grid-template-columns:repeat(4,minmax(0,1fr)); }
  .page-home .ci-assistant .coop-art { left:0;top:auto;bottom:0;width:100%; }
  .page-home .ai-grid { width:calc(100% - var(--site-gutter) * 2);max-width:var(--site-content-max); }
  .page-home .ai-item { width:calc((100% - 72px) * .219858156);flex:0 0 auto;min-width:0; }
  .page-home .ai-item.wide { width:calc((100% - 72px) * .340425532); }
  .page-home .serve-top { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .page-home .serve-hero { grid-column:span 2; }

  footer.footer :is(.footer-cols,.f-cols) { grid-template-columns:repeat(3,minmax(0,1fr));column-gap:80px; }
  /* Preserve the composition of exported 1440px canvases. Their native
     1200px content region follows the same grid as HTML-based sections. */
  .product-restored .product-module,.gongzhuan-page .gp-design-block {
    width:100%;max-width:none;
  }
  .page-sol { overflow:hidden; }
  .page-sol .sol-stage {
    width:min(var(--site-canvas-width),max(1280px,calc((var(--site-frame-height,100svh) - var(--nav-h,92px) - 16px) * var(--sw) / var(--sh))));
    max-width:none;margin-inline:auto;
  }
  .product-canvas .product-cta { font-size:calc(18px / var(--product-scale,1)) !important; }
  .gp-design-root .gp-native-cta { font-size:calc(18px / var(--gp-scale,1)) !important; }
  /* Source-exported SVG button fills are unreliable when layered over a
     full-bleed background. Give the native links their own readable surface. */
  .page-sol #sol-1 .sol-btn-p { background:linear-gradient(90deg,#398eff,#536bff);color:white;-webkit-text-fill-color:white;font-size:18px !important; }
  .page-sol #sol-1 .sol-btn-g { background:none;border:1.5px solid #398eff;color:#398eff;-webkit-text-fill-color:#398eff;font-size:18px !important; }
  /* Homepage body and all carousel slides share the navigation frame. */
  .page-home :is(.ops-wrap,.serve-wrap) {
    width:calc(100% - var(--site-gutter) * 2);max-width:var(--site-content-max);margin-inline:auto;
  }
  .page-home :is(.cap-wrap,.channel-wrap) {
    box-sizing:border-box;width:100%;max-width:var(--site-container);margin-inline:auto;padding-inline:var(--site-gutter);
  }
  .page-home .coop-wrap { width:min(100%,1400px); }
  .page-home .home-growth-poster .growth-inner { gap:48px;grid-template-rows:minmax(0,1fr);padding-top:calc(var(--home-nav-height,92px) + 20px);padding-bottom:64px; }
  .page-home .home-growth-poster .growth-showcase { transform:none;zoom:var(--home-showcase-scale,.9);width:100%;justify-self:center; }
  .gp-hero-art { left:auto;right:0; }
  .page-ai :is(.connect-stage,.connect-features,.private-stage,.service-layout) {
    width:calc(100% - var(--site-gutter) * 2);max-width:var(--site-content-max);margin-inline:auto;
  }
}

/* The two columns share a grid row. Reserve space below the copy equal
   to the feature buttons below the demo, aligning the cards above them. */
@media(min-width:1201px) {
  .page-home .home-growth-poster .growth-inner {
    align-content:safe center;align-items:end;grid-template-rows:max-content;
    padding-top:calc(var(--home-nav-height,92px) + 20px);
  }
  .page-home .home-growth-poster .growth-showcase { width:93.5%;justify-self:end;transform-origin:center top; }
  .page-home .home-growth-poster .growth-copy { box-sizing:border-box;display:flex;flex-direction:column;align-self:stretch;margin-bottom:var(--home-feature-space,0px);padding-top:var(--home-copy-top,54px); }
  .page-home .home-growth-poster .growth-description { margin-top:22px;margin-bottom:28px; }
  .page-home .home-growth-poster .growth-proof { margin-top:auto;padding-top:36px;top:0; }
  .page-home #home-cases { padding-top:72px; }
}

@media (min-width:1201px) and (max-height:700px) {
  .page-home .home-growth-poster .growth-copy { padding-top:min(var(--home-copy-top,54px),16px); }
  .page-home .home-growth-poster .growth-description { margin-top:12px;margin-bottom:14px; }
  .page-home .home-growth-poster .growth-proof { padding-top:12px; }
}
@media (min-width:1201px) and (max-height:600px) {
  .page-home .hero-carousel-track > .home-growth-poster { overflow-y:auto;scrollbar-width:none; }
}

/* Full-bleed galleries are intentionally outside the editorial grid. */
@media(min-width:1101px) {
  :root { --site-hero-size:44px;--site-section-size:36px;--site-card-size:22px; }
  /* Compact the 1080P composition through spacing and track heights. Keep
     the 12–16px UI copy, header, icons and buttons at their native size. */
  .page-home .ops { padding-block:48px; }
  .page-home .ops-title { margin-top:8px; }
  .page-home .ops-sub { margin-top:20px;line-height:1.6; }
  .page-home .ops-row:first-of-type { margin-top:32px; }
  .page-home .ops .flow-rail,.page-home .ops .base-bar { padding:10px 12px; }
  .page-home .ops .flow-inner,.page-home .ops .base-card { height:42px; }
  .page-home .ops .cap-matrix { grid-template-rows:180px 180px; }
  .page-home .ops .cap-matrix .cap-card { padding-top:12px; }
  .page-home .ops .cap-chips { margin-top:10px; }
  .page-home .ops .cap-chip { height:34px; }
  .page-home .ops .cap-chip.h61 { height:55px; }
  .page-home :is(.cap-grid3,.chan-grid,.ai-grid,.coop-grid) { margin-top:40px; }
  .page-home :is(.cap-wrap,.channel-wrap,.coop-wrap) > .sec-title { margin-top:56px; }
  .page-home .cap-grid3 { height:480px; }
  .page-home .cap-row2 { height:232px; }
  .page-home :is(.cap-sec,.channel,.coop) { padding-bottom:56px; }
}

#home-cases .case-wrap,.cases-page .case-wall {
  width:100% !important;max-width:none !important;padding-inline:0 !important;
}
@media(min-width:1101px) {
  .home-poster-slide .poster-visual {
    height:clamp(100px,calc(var(--home-screen-height,calc(100 * var(--desktop-vh, 1svh))) - 500px),440px);
    min-height:0;flex-shrink:1;
  }
}
@media(min-width:1101px) and (max-height:780px) {
  .page-home .hero-carousel .home-poster-slide { padding-top:calc(var(--home-nav-height,92px) + 12px);padding-bottom:52px; }
  .page-home .home-poster-slide h1 { --site-hero-size:40px; }
  .page-home .home-poster-slide p { margin:14px auto 18px; }
  .page-home .home-poster-slide .poster-visual { height:clamp(150px,calc(var(--home-screen-height,calc(100 * var(--desktop-vh, 1svh))) - 410px),340px);margin-top:16px; }
}

/* Long-form reading and form cards retain comfortable line lengths. */
.page-news:not(.news-index) .news-wrap,.page-news .article-layout {
  width:calc(100% - var(--site-gutter) * 2);max-width:1160px;margin-inline:auto;
}
@media(max-width:1100px) {
  #nav .nav-actions { margin-left:auto; }
  .page-home :is(.cap-sec,.channel,.coop,.serve,.ops,.ai) { padding-inline:var(--site-gutter); }
  .page-home :is(.ops-wrap,.serve-wrap,.cap-wrap,.channel-wrap,.coop-wrap) { width:100% !important; }
  .page-home .hero-carousel :is(.growth-inner,.overview-inner,.brand-hero-inner,
    .horizon-content,.acquisition-inner,.live-poster-inner,.home-poster-slide,.ai-poster-inner) {
    padding-inline:var(--site-gutter);
  }
  .refactor-page .ui-hero-grid,.rp-hero-grid,.sl-split { min-width:0; }
}
@media(max-width:700px) {
  #nav .nav-inner { padding-inline:var(--site-gutter); }
  .page-home .home-growth-poster .growth-inner { padding-inline:var(--site-gutter); }
  .page-news .article-layout { max-width:100%; }
}
