/* Mobile improvements, 2026-11-14. Loaded after the existing theme. */
.mobile-only { display: none; }
.hero-details > summary { cursor: pointer; }
.mobile-table-scroll { border-radius: 0; }
.mobile-table-scroll table { min-width: 0; }

@media (min-width: 901px) {
  .hero-details { display: block; order: 3; }
  .hero-details > summary { display: none; }
  .hero__copy > .eyebrow { order: 0; }
  .hero__copy > .hero-slogan--main { order: 1; }
  .hero__copy > .display { order: 2; margin-bottom: 18px; }
}

@media (max-width: 900px) {
  :root {
    --frame: calc(100% - 40px);
    --frame-wide: calc(100% - 40px);
    --section-space: 48px;
    --section-space-tight: 40px;
    --section-intro-space: 24px;
  }
  html { scroll-padding-top: 64px; scroll-padding-bottom: 96px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .page { overflow-x: clip; }
  .global-nav__inner { gap: 8px; }
  .brand { min-height: 44px; font-size: 14px; }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 2px 8px;
    overflow: visible;
    white-space: normal;
    background: rgba(251, 251, 253, .98);
  }
  .mobile-nav a {
    justify-content: center;
    min-width: 0;
    padding: 0 2px;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    letter-spacing: 0;
  }
  .mobile-nav a:focus-visible, .mobile-service-grid a:focus-visible,
  .hero-details > summary:focus-visible, .mobile-cta a:focus-visible {
    outline: 2px solid #06c;
    outline-offset: -3px;
  }
  .mobile-only { display: block; }
  .hero, .hero__grid { min-height: 0; }
  .hero { padding: 26px 0 24px; }
  .hero__grid { gap: 22px; }
  .hero__copy { padding: 0; justify-content: flex-start; }
  .hero__copy > .eyebrow {
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: .02em;
    text-wrap: initial;
  }
  .hero__copy > .hero-slogan--main { margin: 12px 0 10px; font-size: 15px; line-height: 1.6; }
  .hero__copy > .hero-slogan--main .hero-slogan__note { font-size: 12px; line-height: 1.6; }
  .hero__copy .display {
    max-width: 15em;
    font-size: clamp(28px, 8.2vw, 36px);
    line-height: 1.3;
    letter-spacing: -.02em;
    text-wrap: balance;
  }
  .hero__copy .display br, .display__kicker { display: none; }
  .mobile-service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0 0;
  }
  .mobile-service-grid a {
    min-height: 82px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(29, 29, 31, .06);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
  }
  .mobile-service-grid a:active { background: #fff; }
  .mobile-service-grid strong { display: flex; justify-content: space-between; align-items: center; gap: 5px; font-size: 17px; line-height: 1.35; }
  .mobile-service-grid strong span { font-weight: 400; font-size: 16px; color: #74612a; }
  .mobile-service-grid a > span { font-size: 13px; line-height: 1.4; color: #594d2e; }
  .mobile-hours { margin: 16px 0 0; font-size: 12px; line-height: 1.8; color: #514426; }
  .hero-details { margin-top: 16px; border-top: 1px solid rgba(29,29,31,.16); }
  .hero-details > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
    list-style: none;
    font-size: 14px;
    font-weight: 600;
  }
  .hero-details > summary::-webkit-details-marker { display: none; }
  .hero-details > summary span { font-size: 20px; }
  .hero-details[open] > summary span { transform: rotate(45deg); }
  .hero-details__content { padding: 8px 0 4px; }
  .hero-details .subhead, .hero-details .body-copy { font-size: 16px; line-height: 1.8; max-width: none; }
  .hero-details .hero-slogan--main { font-size: 16px; line-height: 1.7; }
  .hero-details .hero-slogan__note { font-size: 12px; }
  .hero-details .cta-row { margin-top: 18px; }
  .hero-details .link-row { gap: 10px; }
  .hero-details .learn-more { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }
  .hero__media { min-height: 220px; height: 220px; border-radius: 20px; overflow: hidden; }
  .hero__media .floating-card--hotline { display: none; }
  .hero__media .floating-card--service { width: min(260px, calc(100% - 24px)); margin: 12px; padding: 16px; }
  .hero__media .floating-card--service p { font-size: 13px; line-height: 1.5; }
  .hero__media .floating-card--service > strong { font-size: 21px; }
  .hero__media .floating-card__price { margin-top: 10px; }
  .hero__media .floating-card__price strong { font-size: 32px; }
  .headline { font-size: clamp(26px, 7.4vw, 34px); line-height: 1.35; letter-spacing: -.02em; }
  .section-intro .headline, .page-hero .headline { max-width: none; }
  .section-intro { gap: 18px; }
  .body-copy, .subhead { font-size: 16px; line-height: 1.75; letter-spacing: 0; }
  .subhead { margin-top: 16px; }
  .page-hero { padding: 28px 0 24px; }
  .breadcrumb { font-size: 13px; line-height: 1.6; margin-bottom: 14px; overflow-wrap: anywhere; }
  .prose { max-width: 100%; font-size: 16px; line-height: 1.85; overflow-wrap: break-word; }
  .prose h2 { font-size: 23px; line-height: 1.45; margin-top: 1.8em; }
  .prose h3 { font-size: 19px; line-height: 1.5; }
  .prose th, .prose td { padding: 10px; font-size: 14px; line-height: 1.65; }
  .prose th { width: auto; }
  .table-scroll { max-width: 100%; border: 1px solid var(--light-line); border-radius: 12px; }
  .table-scroll::before { content: '左右滑动查看完整表格 →'; display: block; position: sticky; left: 0; width: 100%; padding: 8px 12px; font-size: 12px; color: #555; background: #f5f5f7; }
  .table-scroll table { min-width: 600px; }
  .mobile-table-scroll table { min-width: 540px; }
  .link-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 22px 0; }
  .link-card { padding: 18px; }
  .link-card strong { font-size: 18px; line-height: 1.5; }
  .cta-box { padding: 22px 20px; margin-top: 28px; }
  .cta-box a.tel { display: inline-flex; align-items: center; min-height: 44px; font-size: 24px; }
  .service-card, .service-card--primary, .service-card--secondary { min-height: 350px; padding: 22px; border-radius: 24px; }
  .service-card__title a { display: inline-block; padding: 4px 0; }
  .service-card--primary .service-card__title, .service-card--secondary .service-card__title { font-size: 30px; line-height: 1.3; }
  .service-card__desc { font-size: 15px; line-height: 1.7; }
  .service-price strong { font-size: 32px; }
  .plan-card, .process-card { padding: 24px 20px; }
  .faq-question { font-size: 16px; line-height: 1.6; min-height: 56px; }
  .faq-answer { line-height: 1.8; }
  .footer-info { font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; }
  .footer-links { gap: 4px 14px; }
  .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer { padding: 28px 0 30px; }
  .last-updated { padding: 0 20px; line-height: 1.8; overflow-wrap: anywhere; }
  .mobile-cta {
    display: grid;
    grid-template-columns: minmax(88px, .8fr) minmax(0, 2fr);
    align-items: stretch;
    gap: 10px;
    left: 0; right: 0; bottom: 0;
    transform: none;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.98);
    border-top: 1px solid rgba(29,29,31,.1);
    box-shadow: 0 -4px 20px rgba(0,0,0,.04);
  }
  .mobile-cta.is-hidden { opacity: 1; pointer-events: auto; transform: none; }
  .mobile-cta__services {
    display: flex; align-items: center; justify-content: center;
    min-height: 54px; border-radius: 14px;
    font-size: 15px; font-weight: 600;
    color: var(--ink); background: var(--lemon-soft);
  }
  .mobile-cta__btn {
    min-width: 0; min-height: 54px; justify-content: center;
    padding: 4px 10px; gap: 10px; border-radius: 14px; box-shadow: none;
    background: var(--ink); letter-spacing: 0;
  }
  .mobile-cta__btn small { display: block; font-size: 11px; line-height: 1.5; font-weight: 400; color: rgba(255,255,255,.8); }
  .mobile-cta__btn strong { display: block; font-size: 18px; line-height: 1.4; font-weight: 600; letter-spacing: .02em; }
  /* All mobile content stays visible even if scroll observers fail. */
  .reveal, [data-tilt].reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 359px) {
  :root { --frame: calc(100% - 32px); --frame-wide: calc(100% - 32px); }
  .mobile-nav a { font-size: 12px; }
  .hero__copy .display { font-size: 28px; }
  .mobile-service-grid a { padding: 12px; }
  .mobile-service-grid strong { font-size: 16px; }
  .mobile-service-grid a > span { font-size: 12px; }
  .mobile-cta { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .mobile-cta__btn { gap: 7px; }
  .mobile-cta__btn strong { font-size: 17px; }
}
