/*
 * Mobile composition keeps the desktop visual rhythm without shrinking forms
 * and text into an unusable fixed-width desktop canvas.
 */
body.home-page .enter-icon svg {
  display: none;
}

body.home-page .strength-source {
  margin-top: 24px !important;
  padding: 12px 16px !important;
  grid-template-columns: 90px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 14px !important;
}

body.home-page .strength-source strong {
  font-size: 11px !important;
  line-height: 1.4 !important;
}

body.home-page .strength-source p {
  font-size: 8px !important;
  line-height: 1.5 !important;
}

body.project-page .faq {
  padding-top: 56px !important;
  padding-bottom: 56px !important;
}

body.project-page .faq-grid {
  gap: 18px !important;
}

body.project-page .faq .section-title h2 {
  font-size: clamp(38px, 3.8vw, 58px) !important;
}

body.project-page .faq details {
  min-height: 64px !important;
  padding: 14px 0 !important;
}

body.project-page .faq summary {
  font-size: 15px !important;
  line-height: 1.4 !important;
}

body.project-page .cta {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}

body.project-page .cta .cta-arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 720px) {
  html,
  body.mobile-web-composition {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body.mobile-web-composition .section {
    content-visibility: visible !important;
    contain-intrinsic-size: auto !important;
  }

  body.mobile-web-composition .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Home: retain paired comparison and metric composition. */
  body.home-page .official-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.home-page .official-stat {
    min-height: 132px !important;
    padding: 22px 18px !important;
  }

  body.home-page .difference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.home-page .difference-arrow {
    display: none !important;
  }

  body.home-page .difference-card {
    padding: 24px 18px !important;
  }

  body.home-page .difference-card h3 {
    font-size: 21px !important;
  }

  body.home-page .difference-card p,
  body.home-page .difference-card li {
    font-size: 12px !important;
    line-height: 1.7 !important;
  }

  body.home-page .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.home-page .lower-row {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    justify-items: center !important;
  }

  body.home-page .enter-button {
    position: relative !important;
    z-index: 10 !important;
    left: auto !important;
    top: auto !important;
    width: min(100%, 350px) !important;
    margin: 18px auto 0 !important;
    transform: none !important;
    animation: none !important;
    touch-action: manipulation;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(211, 173, 103, .18);
  }

  body.home-page .enter-button:hover,
  body.home-page .enter-button:active {
    transform: none !important;
  }

  body.home-page .enter-icon::before {
    content: none !important;
  }

  body.home-page .enter-icon svg {
    display: block !important;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    /* Keep the same up-right arrow direction as the desktop project entry. */
    transform: none;
  }

  body.home-page .strength-source {
    margin-top: 12px !important;
    padding: 7px 8px !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  body.home-page .strength-source strong {
    font-size: 7px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
  }

  body.home-page .strength-source p {
    font-size: 6px !important;
    line-height: 1.3 !important;
  }

  body.home-page .difference-grid {
    margin-top: 20px !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  body.home-page .difference-arrow {
    display: none !important;
  }

  body.home-page .difference-card {
    min-height: 0 !important;
    padding: 14px 11px 12px !important;
  }

  body.home-page .difference-title {
    font-size: 7px !important;
    line-height: 1.2 !important;
  }

  body.home-page .difference-card h3 {
    margin: 10px 0 8px !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
  }

  body.home-page .difference-card p {
    font-size: 8px !important;
    line-height: 1.4 !important;
  }

  body.home-page .difference-list {
    margin-top: 10px !important;
    gap: 3px !important;
  }

  body.home-page .difference-list li {
    padding-bottom: 4px !important;
    font-size: 7.5px !important;
    line-height: 1.35 !important;
  }

  body.home-page .welcome-footer {
    padding: 11px 0 13px !important;
  }

  body.home-page .welcome-footer-inner {
    width: calc(100% - 16px) !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 6px !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  body.home-page .welcome-footer-inner span {
    min-width: 0 !important;
  }

  /* About: use paired cards and swipeable history instead of one long stack. */
  body.about-page .group-grid,
  body.about-page .metrics,
  body.about-page .business-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.about-page .group-card {
    min-height: 0 !important;
    padding: 24px 18px !important;
  }

  body.about-page .group-card h3 {
    font-size: 19px !important;
  }

  body.about-page .group-card p,
  body.about-page .group-card li {
    font-size: 12px !important;
  }

  body.about-page .metric {
    min-height: 150px !important;
    padding: 22px 18px !important;
  }

  body.about-page .business-card {
    min-height: 210px !important;
    padding: 23px 18px !important;
  }

  body.about-page .business-card h4 {
    font-size: 19px !important;
  }

  body.about-page .gallery {
    grid-template-columns: 1.1fr .9fr !important;
    grid-template-rows: 180px 180px !important;
  }

  body.about-page .gallery figure:first-child {
    grid-row: 1 / 3 !important;
  }

  body.about-page .book-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.about-page .timeline-wrap {
    margin-top: 44px !important;
    scroll-snap-type: x mandatory;
  }

  body.about-page .timeline {
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 82% !important;
    gap: 12px !important;
    padding: 0 !important;
  }

  body.about-page .timeline::before,
  body.about-page .timeline-item::before {
    display: none !important;
  }

  body.about-page .timeline-item {
    min-height: 330px !important;
    padding: 25px 22px !important;
    border: 1px solid rgba(255,255,255,.13) !important;
    scroll-snap-align: start;
  }

  /* Project: preserve the desktop module relationships in compact two columns. */
  body.project-page .intro-points,
  body.project-page .stats,
  body.project-page .course-stage-grid,
  body.project-page .salary-grid,
  body.project-page .career-support-grid,
  body.project-page #process .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.project-page .course-stage,
  body.project-page .career-support-grid article,
  body.project-page .process-step {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body.project-page {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body.project-page .header .nav {
    width: calc(100% - 20px) !important;
    min-height: 66px !important;
    gap: 7px !important;
  }

  body.project-page .header .brand {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 7px !important;
  }

  body.project-page .header .brand-mark {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    font-size: 11px !important;
  }

  body.project-page .header .brand strong {
    font-size: 12px !important;
    line-height: 1.3 !important;
    letter-spacing: -.02em !important;
    white-space: nowrap !important;
  }

  body.project-page .project-nav-actions {
    flex: 0 0 auto !important;
    gap: 6px !important;
  }

  body.project-page .project-back-link {
    font-size: 10px !important;
    line-height: 1 !important;
  }

  body.project-page .project-login-btn {
    min-width: 68px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body.project-page .strength-main h3,
  body.project-page .course-stage h3,
  body.project-page .salary-panel h3,
  body.project-page .guarantee h3 {
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }

  body.project-page .course-stage {
    padding: 22px 17px !important;
  }

  body.project-page .course-stage h3,
  body.project-page .process-step h3 {
    font-size: 18px !important;
  }

  body.project-page .salary-panel,
  body.project-page .guarantee {
    min-width: 0 !important;
    min-height: 330px !important;
    padding: 18px 14px !important;
    border-radius: 18px !important;
  }

  body.project-page .course-tech-panel {
    overflow: hidden !important;
  }

  body.project-page .tech-scan {
    display: none !important;
  }

  body.project-page .guarantee .big {
    gap: 3px !important;
    flex-wrap: nowrap !important;
    margin-top: auto !important;
  }

  body.project-page .guarantee .big .num {
    font-size: clamp(42px, 12vw, 52px) !important;
  }

  body.project-page .guarantee .big .unit {
    font-size: clamp(22px, 7vw, 30px) !important;
    transform: none !important;
  }

  body.project-page .salary-item {
    display: block !important;
    min-height: 0 !important;
    padding: 10px 0 !important;
  }

  body.project-page .salary-item strong {
    font-size: 19px !important;
  }

  body.project-page .salary-item span {
    display: block !important;
    max-width: none !important;
    margin-top: 4px !important;
    text-align: left !important;
    line-height: 1.4 !important;
  }

  body.project-page .salary-item span,
  body.project-page .career-support-grid span,
  body.project-page .process-step p {
    font-size: 10px !important;
  }

  body.project-page .salary {
    padding-top: 48px !important;
    padding-bottom: 52px !important;
  }

  body.project-page .salary-heading {
    margin-bottom: 22px !important;
  }

  body.project-page .salary-heading h2 {
    font-size: 38px !important;
  }

  body.project-page .salary-grid {
    gap: 10px !important;
  }

  body.project-page .salary-panel h3,
  body.project-page .guarantee h3 {
    margin: 0 0 12px !important;
    font-size: 20px !important;
    line-height: 1.28 !important;
  }

  body.project-page .guarantee {
    display: flex !important;
    flex-direction: column !important;
  }

  body.project-page .guarantee p {
    font-size: 10px !important;
    line-height: 1.65 !important;
  }

  body.project-page .guarantee .big .num {
    font-size: 43px !important;
  }

  body.project-page .guarantee .big .unit {
    font-size: 23px !important;
  }

  body.project-page .salary-message {
    margin-top: 12px !important;
    padding: 14px 16px !important;
    border-radius: 14px !important;
  }

  body.project-page .salary-message p {
    font-size: 11px !important;
    line-height: 1.65 !important;
  }

  body.project-page .career-support {
    padding-top: 52px !important;
    padding-bottom: 56px !important;
  }

  body.project-page .career-support .section-title {
    margin-bottom: 24px !important;
  }

  body.project-page .career-support .section-title h2 {
    font-size: 38px !important;
  }

  body.project-page .career-support-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body.project-page .career-support-grid article {
    min-height: 0 !important;
    height: auto !important;
    padding: 8px 6px !important;
    gap: 5px !important;
    border-radius: 15px !important;
    justify-content: space-between !important;
  }

  body.project-page .career-support-grid article::before {
    width: 29px !important;
    height: 29px !important;
    border-radius: 9px !important;
    font-size: 11px !important;
  }

  body.project-page .career-support-grid strong {
    font-size: 11px !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere !important;
  }

  body.project-page .career-support-grid span {
    font-size: 8.5px !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere !important;
  }

  body.project-page .career-support-note {
    margin-top: 12px !important;
    font-size: 10px !important;
  }

  body.project-page #process {
    padding-top: 52px !important;
    padding-bottom: 56px !important;
  }

  body.project-page #process .section-title {
    margin-bottom: 20px !important;
  }

  body.project-page #process .section-title h2 {
    max-width: none !important;
    font-size: 24px !important;
    line-height: 1.35 !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
  }

  body.project-page #process .experience-banner {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 14px !important;
    padding: 13px 16px !important;
    border-radius: 14px !important;
    text-align: center !important;
  }

  body.project-page #process .experience-banner strong {
    width: 100% !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    text-align: center !important;
  }

  body.project-page #process .process-grid {
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 28% !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding-bottom: 8px !important;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  body.project-page #process .process-step,
  body.project-page #process .process-step.featured {
    min-height: 150px !important;
    height: auto !important;
    padding: 11px 9px !important;
    border-radius: 15px !important;
    transform: none !important;
    grid-column: auto !important;
    justify-content: space-between !important;
    scroll-snap-align: start;
  }

  body.project-page #process .process-step strong {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    font-size: 18px !important;
    border-radius: 10px !important;
  }

  body.project-page #process .process-step h3,
  body.project-page #process .process-step.featured h3 {
    margin: 10px 0 6px !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    text-align: center !important;
    white-space: normal !important;
  }

  /* 修复：featured卡片(五日体验)标题在横向滚动卡片中换行异常 */
  body.project-page #process .process-step.featured h3 {
    max-width: none !important;
    padding: 0 4px !important;
    white-space: nowrap !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
  }

  body.project-page #process .process-step p,
  body.project-page #process .process-step.featured p {
    font-size: 10px !important;
    line-height: 1.45 !important;
  }

  body.project-page .cta {
    padding: 18px 0 !important;
    overflow: hidden !important;
  }

  body.project-page .cta .cta-inner {
    width: calc(100% - 28px) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 9px !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  body.project-page .cta-copy {
    width: auto !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  body.project-page .cta h2 {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.16 !important;
    letter-spacing: -.035em !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    padding-bottom: 2px !important;
  }

  body.project-page .cta-motto {
    width: 100% !important;
    min-height: 0 !important;
    margin-top: 5px !important;
    justify-content: flex-start !important;
  }

  body.project-page .cta-motto .motto-text {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    font-size: 9px !important;
    line-height: 1.3 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow-wrap: anywhere !important;
  }

  body.project-page .cta-motto .motto-text > .motto-char {
    flex: 0 0 auto !important;
    padding: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
  }

  body.project-page .cta-motto .motto-text > .motto-char::after {
    content: none !important;
  }

  body.project-page .cta-motto::after {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    transform: none !important;
  }

  body.project-page .cta .btn {
    min-height: 34px !important;
    padding: 0 12px !important;
    align-self: flex-start !important;
    margin-top: 0 !important;
    font-size: 9px !important;
    white-space: nowrap !important;
  }

  body.project-page .cta .cta-arrow {
    width: 11px !important;
    height: 11px !important;
  }

  body.project-page .faq {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }

  body.project-page .faq-grid {
    gap: 10px !important;
  }

  body.project-page .faq .section-title h2 {
    font-size: 27px !important;
    line-height: 1.1 !important;
  }

  body.project-page .faq-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 10px !important;
  }

  body.project-page .faq details {
    min-height: 48px !important;
    padding: 9px 0 !important;
  }

  body.project-page .faq summary {
    padding-right: 18px !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
  }

  body.project-page .faq summary::after {
    font-size: 17px !important;
  }

  body.project-page .faq details p {
    margin-top: 6px !important;
    font-size: 8px !important;
    line-height: 1.4 !important;
  }

  body.project-page .footer {
    padding: 10px 0 12px !important;
    font-size: 6px !important;
  }

  body.project-page .footer-inner {
    width: calc(100% - 16px) !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  /* Cooperation page: keep public showcase grids paired; forms remain readable. */
  body.partner-page #publicSite .preview-metrics,
  body.partner-page #publicSite .coop-grid,
  body.partner-page #publicSite .permission-grid,
  body.partner-page #publicSite .mock-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.partner-page #publicSite .coop-card,
  body.partner-page #publicSite .permission-card {
    min-width: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  body.partner-page #publicSite .process-line {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* Console: compact dashboard cards and navigation while retaining table scrolling. */
  body.partner-page #app .sidebar {
    padding: 8px 10px !important;
  }

  body.partner-page #app .side-menu {
    gap: 4px !important;
    scrollbar-width: thin;
  }

  body.partner-page #app .side-menu button {
    flex: 0 0 auto !important;
    width: auto !important;
    padding: 10px 12px !important;
    font-size: 12px !important;
  }

  body.partner-page #app .app-main {
    padding: 0 12px 26px !important;
  }

  body.partner-page #app .app-top {
    margin: 0 -12px 14px !important;
    padding: 10px 12px !important;
  }

  body.partner-page #app .app-metrics,
  body.partner-page #app .application-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.partner-page #app .metric-card,
  body.partner-page #app .application-summary .metric-card {
    min-height: 108px !important;
    padding: 16px !important;
  }

  body.partner-page #app .metric-card strong {
    font-size: 30px !important;
  }

  body.partner-page #app .panel {
    padding: 15px !important;
  }

  body.partner-page #app .table-wrap {
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
}
