/* Phone presentation. Keep tablet/desktop geometry and the approved palette.
   Canonical source; release asset phone-presentation-v1.css must be identical.
   Reference decisions and licenses: output/2026-11-03-视觉精修/github-research.md. */
@media (max-width: 600px) {
  html:has(.home-editorial, .case-catalog-page, .case-presentation-detail) {
    --home-shell: calc(100% - 40px);
    --presentation-shell: calc(100% - 40px);
  }

  /* The full announcement link remains in the menu. Give the brand room. */
  .site-header[data-renfa-public-navigation="v1"][data-renfa-mobile-nav-ux="v1"] .header-case-links a[href^="/activity-news"] {
    display: none;
  }
  .site-header[data-renfa-public-navigation="v1"][data-renfa-mobile-nav-ux="v1"] .header-inner {
    gap: 12px;
  }
  .site-header[data-renfa-public-navigation="v1"][data-renfa-mobile-nav-ux="v1"] .header-case-links a {
    min-height: 44px;
    padding-inline: 10px;
    font-size: 13px;
  }
  .site-header[data-brand-state] .menu-button { border-radius: 8px !important; }

  /* Reorder presentation only. Existing content and carousel state stay intact. */
  .home-editorial .hero {
    grid-template-areas: "title" "media" "services" "actions";
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-top: calc(98px + env(safe-area-inset-top, 0px));
  }
  .home-editorial .hero-content,
  .home-editorial .hero-copy { display: contents; }
  .home-editorial .hero-brand { display: none; }
  .home-editorial .hero h1.hero-title {
    grid-area: title;
    margin: 0 0 4px;
    font-size: clamp(29px, 7.6vw, 34px);
    font-weight: 600;
    line-height: 1.28;
    letter-spacing: -.035em;
  }
  .home-editorial .hero-media { grid-area: media; position: relative; }
  .home-editorial .hero-carousel-slides { aspect-ratio: 4 / 3; border-radius: 8px; }
  .home-editorial .hero-carousel-slide .home-media-stage img {
    object-position: var(--hero-object-position-mobile, 50% 50%);
  }
  .home-editorial .hero-services {
    grid-area: services;
    max-width: none;
    margin: 0;
    font-size: 14px;
    line-height: 1.75;
  }
  .home-editorial .hero-buttons {
    grid-area: actions;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin: 0;
  }
  .home-editorial .hero .hero-buttons .button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 12px 10px;
    border: 1px solid var(--presentation-line);
    border-radius: 8px;
    color: var(--presentation-ink);
    background: var(--presentation-surface);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
  }
  .home-editorial .hero .hero-buttons .button:first-child {
    border-color: var(--presentation-accent);
    background: var(--presentation-accent);
    color: #fff;
  }
  .home-editorial .hero-buttons .button::after {
    display: inline-block;
    margin: 0;
    transition: transform 180ms ease;
  }
  .home-editorial .hero-carousel-caption {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
  }
  .home-editorial .hero-carousel-caption p {
    max-width: none;
    min-width: 0;
    font-size: 12px;
    line-height: 1.5;
  }
  .home-editorial .hero-carousel-controls {
    grid-column: 2;
    justify-self: end;
    gap: 8px;
  }
  .home-editorial .hero-carousel-controls button {
    border-radius: 8px;
    transition: background-color 180ms ease, transform 180ms ease;
  }
  .home-editorial .section { padding-block: 48px; }
  .home-editorial .section-heading { gap: 10px; margin-bottom: 22px; }
  .home-editorial .section-heading h2 { font-size: 25px; line-height: 1.35; }
  .home-editorial .section-heading p { font-size: 14px; line-height: 1.75; }
  .home-editorial [data-featured-case-card] > a > div:first-child { border-radius: 8px; }
  .home-editorial [data-featured-case-card] h3 { font-size: 18px; line-height: 1.5; }
  .home-editorial .cases-footer .button {
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid var(--presentation-line);
    border-radius: 8px;
    background: var(--presentation-surface);
  }

  .case-catalog-page .case-library-hero {
    padding: calc(98px + env(safe-area-inset-top, 0px)) 0 20px;
  }
  .case-catalog-page .case-library-hero > .shell { gap: 14px; }
  .case-catalog-page .case-library-hero > .shell > div > span { display: none; }
  .case-catalog-page .case-library-hero h1 {
    margin: 0;
    font-size: clamp(27px, 7vw, 32px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.035em;
  }
  .case-catalog-page .case-library-hero p { font-size: 14px; line-height: 1.75; }
  .case-catalog-page .case-library-filters {
    margin-bottom: 24px;
    padding: 2px 14px;
    border: 1px solid var(--case-line);
    border-radius: 8px;
    background: var(--case-surface);
  }
  .case-catalog-page .case-filter-disclosure > summary { min-height: 48px; }
  .case-catalog-page .case-filter-icon { transition: transform 180ms ease; }
  .case-catalog-page .case-filter-disclosure .case-category-filters { gap: 8px; margin-block: 12px; }
  .case-catalog-page .case-category-filters a {
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    transition: background-color 180ms ease, color 180ms ease;
  }
  .case-catalog-page .case-category-filters a.is-active {
    color: var(--case-ink);
    border-color: var(--case-line);
    background: #182536;
  }
  .case-catalog-page .case-library-grid { gap: 28px; }
  .case-catalog-page .case-library-grid .case-card--library,
  .case-catalog-page .case-library-grid .case-card--library:is(:hover, :focus-within) {
    border: 1px solid var(--case-line);
    border-radius: 10px;
    overflow: hidden;
  }
  .case-catalog-page .case-library-grid .case-card--library .case-media-carousel { border-radius: 0; }
  .case-catalog-page .case-library-grid .case-card--library .case-content {
    padding: 16px 18px 18px;
  }
  .case-catalog-page .case-library-grid .case-card--library .case-content h3 {
    margin-top: 6px;
    font-size: 20px;
    line-height: 1.45;
  }
  .case-catalog-page .case-library-progress button,
  .case-presentation-detail .gallery-load-more .button,
  .case-presentation-detail .case-media-video-link,
  .case-presentation-detail .case-detail-description-toggle {
    min-height: 48px;
    border-radius: 8px;
    background: var(--presentation-surface);
    transition: background-color 180ms ease, transform 180ms ease;
  }
  .case-presentation-detail .case-detail-breadcrumb { margin-bottom: 12px; }
  .case-presentation-detail .case-detail-hero { gap: 20px; }
  .case-presentation-detail .case-detail-hero .case-hero-poster { border-radius: 8px; }
  .case-presentation-detail .case-detail-hero h1 { margin-block: 14px; font-size: 29px; line-height: 1.35; }
  .case-presentation-detail .case-detail-hero .case-detail-facts { gap: 10px 16px; margin-top: 18px; padding-top: 16px; }

  html:has(.home-editorial, .case-catalog-page, .case-presentation-detail) .mobile-action-bar {
    gap: 10px;
    padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  }
  html:has(.home-editorial, .case-catalog-page, .case-presentation-detail) .mobile-action-bar :is(a, button) {
    min-height: 48px;
    border-radius: 8px;
    font-size: 13px;
    transition: transform 180ms ease;
  }
  :is(.home-editorial .hero-buttons .button, .hero-carousel-controls button,
      .case-catalog-page .case-library-progress button, .mobile-action-bar a, .mobile-action-bar button):active {
    transform: scale(.98);
  }
  :is(.home-editorial .hero-buttons .button,
      .site-header .menu-button, .mobile-action-bar a, .mobile-action-bar button):focus-visible {
    outline: 2px solid var(--presentation-ink);
    outline-offset: 3px;
  }
}
@media (max-width: 600px) and (hover: hover) and (pointer: fine) {
  .home-editorial .hero-buttons .button:hover::after { transform: translate(2px, -2px); }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .home-editorial .hero-buttons .button,
  .home-editorial .hero-buttons .button::after,
  .hero-carousel-controls button,
  .case-catalog-page .case-filter-icon,
  .case-catalog-page .case-category-filters a,
  .case-catalog-page .case-library-progress button,
  .case-presentation-detail .gallery-load-more .button,
  .mobile-action-bar a,
  .mobile-action-bar button { transition: none; transform: none !important; }
}
